From 5960c181fda7921e6c920ea4c13f02225612c7b4 Mon Sep 17 00:00:00 2001 From: "github-merge-queue[bot]" Date: Fri, 29 Mar 2024 06:03:47 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20airtai/c?= =?UTF-8?q?aptn-web-ui@ddb255381b7203986fc284bdc0f4cc310b6b5135=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-BxYwe22T.js => index-D64xzO_z.js} | 114 +++++++++--------- index.html | 2 +- 2 files changed, 58 insertions(+), 58 deletions(-) rename assets/{index-BxYwe22T.js => index-D64xzO_z.js} (86%) diff --git a/assets/index-BxYwe22T.js b/assets/index-D64xzO_z.js similarity index 86% rename from assets/index-BxYwe22T.js rename to assets/index-D64xzO_z.js index 7d79a85..870bf9f 100644 --- a/assets/index-BxYwe22T.js +++ b/assets/index-D64xzO_z.js @@ -6,7 +6,7 @@ function v5(e,t){for(var r=0;r>>1,je=de[Ae];if(0>>1;Aeo(He,oe))Beo(Me,He)?(de[Ae]=Me,de[Be]=oe,Ae=Be):(de[Ae]=He,de[Ue]=oe,Ae=Ue);else if(Beo(Me,oe))de[Ae]=Me,de[Be]=oe,Ae=Be;else break e}}return le}function o(de,le){var oe=de.sortIndex-le.sortIndex;return oe!==0?oe:de.id-le.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var p=Date,v=p.now();e.unstable_now=function(){return p.now()-v}}var C=[],A=[],L=1,P=null,B=3,M=!1,H=!1,D=!1,Z=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(de){for(var le=r(A);le!==null;){if(le.callback===null)s(A);else if(le.startTime<=de)s(A),le.sortIndex=le.expirationTime,t(C,le);else break;le=r(A)}}function K(de){if(D=!1,_(de),!H)if(r(C)!==null)H=!0,qe(ee);else{var le=r(A);le!==null&&it(K,le.startTime-de)}}function ee(de,le){H=!1,D&&(D=!1,W(J),J=-1),M=!0;var oe=B;try{for(_(le),P=r(C);P!==null&&(!(P.expirationTime>le)||de&&!Te());){var Ae=P.callback;if(typeof Ae=="function"){P.callback=null,B=P.priorityLevel;var je=Ae(P.expirationTime<=le);le=e.unstable_now(),typeof je=="function"?P.callback=je:P===r(C)&&s(C),_(le)}else s(C);P=r(C)}if(P!==null)var ze=!0;else{var Ue=r(A);Ue!==null&&it(K,Ue.startTime-le),ze=!1}return ze}finally{P=null,B=oe,M=!1}}var X=!1,q=null,J=-1,me=5,ce=-1;function Te(){return!(e.unstable_now()-cede||125Ae?(de.sortIndex=oe,t(A,de),r(C)===null&&de===r(A)&&(D?(W(J),J=-1):D=!0,it(K,oe-Ae))):(de.sortIndex=je,t(C,de),H||M||(H=!0,qe(ee))),de},e.unstable_shouldYield=Te,e.unstable_wrapCallback=function(de){var le=B;return function(){var oe=B;B=le;try{return de.apply(this,arguments)}finally{B=oe}}}})($0);W0.exports=$0;var H5=W0.exports;/** + */(function(e){function t(de,ce){var le=de.length;de.push(ce);e:for(;0>>1,je=de[Ae];if(0>>1;Aeo(He,le))Beo(Me,He)?(de[Ae]=Me,de[Be]=le,Ae=Be):(de[Ae]=He,de[Ue]=le,Ae=Ue);else if(Beo(Me,le))de[Ae]=Me,de[Be]=le,Ae=Be;else break e}}return ce}function o(de,ce){var le=de.sortIndex-ce.sortIndex;return le!==0?le:de.id-ce.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var p=Date,v=p.now();e.unstable_now=function(){return p.now()-v}}var C=[],A=[],E=1,P=null,B=3,M=!1,H=!1,D=!1,Z=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(de){for(var ce=r(A);ce!==null;){if(ce.callback===null)s(A);else if(ce.startTime<=de)s(A),ce.sortIndex=ce.expirationTime,t(C,ce);else break;ce=r(A)}}function K(de){if(D=!1,_(de),!H)if(r(C)!==null)H=!0,qe(ee);else{var ce=r(A);ce!==null&&it(K,ce.startTime-de)}}function ee(de,ce){H=!1,D&&(D=!1,W(J),J=-1),M=!0;var le=B;try{for(_(ce),P=r(C);P!==null&&(!(P.expirationTime>ce)||de&&!Te());){var Ae=P.callback;if(typeof Ae=="function"){P.callback=null,B=P.priorityLevel;var je=Ae(P.expirationTime<=ce);ce=e.unstable_now(),typeof je=="function"?P.callback=je:P===r(C)&&s(C),_(ce)}else s(C);P=r(C)}if(P!==null)var ze=!0;else{var Ue=r(A);Ue!==null&&it(K,Ue.startTime-ce),ze=!1}return ze}finally{P=null,B=le,M=!1}}var X=!1,Q=null,J=-1,he=5,oe=-1;function Te(){return!(e.unstable_now()-oede||125Ae?(de.sortIndex=le,t(A,de),r(C)===null&&de===r(A)&&(D?(W(J),J=-1):D=!0,it(K,le-Ae))):(de.sortIndex=je,t(C,de),H||M||(H=!0,qe(ee))),de},e.unstable_shouldYield=Te,e.unstable_wrapCallback=function(de){var ce=B;return function(){var le=B;B=ce;try{return de.apply(this,arguments)}finally{B=le}}}})($0);W0.exports=$0;var H5=W0.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function v5(e,t){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ju=Object.prototype.hasOwnProperty,B5=/^[: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]*$/,$1={},X1={};function V5(e){return Ju.call(X1,e)?!0:Ju.call($1,e)?!1:B5.test(e)?X1[e]=!0:($1[e]=!0,!1)}function W5(e,t,r,s){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $5(e,t,r,s){if(t===null||typeof t>"u"||W5(e,t,r,s))return!0;if(s)return!1;if(r!==null)switch(r.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 nr(e,t,r,s,o,c,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=p}var Ht={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ht[e]=new nr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ht[t]=new nr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ht[e]=new nr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ht[e]=new nr(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){Ht[e]=new nr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ht[e]=new nr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ht[e]=new nr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ht[e]=new nr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ht[e]=new nr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Yf=/[\-:]([a-z])/g;function Uf(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(Yf,Uf);Ht[t]=new nr(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(Yf,Uf);Ht[t]=new nr(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(Yf,Uf);Ht[t]=new nr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ht[e]=new nr(e,1,!1,e.toLowerCase(),null,!1,!1)});Ht.xlinkHref=new nr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ht[e]=new nr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gf(e,t,r,s){var o=Ht.hasOwnProperty(t)?Ht[t]:null;(o!==null?o.type!==0:s||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ju=Object.prototype.hasOwnProperty,B5=/^[: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]*$/,$1={},X1={};function V5(e){return Ju.call(X1,e)?!0:Ju.call($1,e)?!1:B5.test(e)?X1[e]=!0:($1[e]=!0,!1)}function W5(e,t,r,s){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $5(e,t,r,s){if(t===null||typeof t>"u"||W5(e,t,r,s))return!0;if(s)return!1;if(r!==null)switch(r.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 nr(e,t,r,s,o,c,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=p}var Ht={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ht[e]=new nr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ht[t]=new nr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ht[e]=new nr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ht[e]=new nr(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){Ht[e]=new nr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ht[e]=new nr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ht[e]=new nr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ht[e]=new nr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ht[e]=new nr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Yf=/[\-:]([a-z])/g;function Uf(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(Yf,Uf);Ht[t]=new nr(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(Yf,Uf);Ht[t]=new nr(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(Yf,Uf);Ht[t]=new nr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ht[e]=new nr(e,1,!1,e.toLowerCase(),null,!1,!1)});Ht.xlinkHref=new nr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ht[e]=new nr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gf(e,t,r,s){var o=Ht.hasOwnProperty(t)?Ht[t]:null;(o!==null?o.type!==0:s||!(2v||o[p]!==c[v]){var C=` -`+o[p].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),C}while(1<=p&&0<=v);break}}}finally{Kd=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ea(e):""}function X5(e){switch(e.tag){case 5:return Ea(e.type);case 16:return Ea("Lazy");case 13:return Ea("Suspense");case 19:return Ea("SuspenseList");case 0:case 2:case 15:return e=Jd(e.type,!1),e;case 11:return e=Jd(e.type.render,!1),e;case 1:return e=Jd(e.type,!0),e;default:return""}}function ih(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 vs:return"Fragment";case xs:return"Portal";case eh:return"Profiler";case Zf:return"StrictMode";case th:return"Suspense";case rh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case G0:return(e.displayName||"Context")+".Consumer";case U0:return(e._context.displayName||"Context")+".Provider";case qf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Qf:return t=e.displayName||null,t!==null?t:ih(e.type)||"Memo";case Ui:t=e._payload,e=e._init;try{return ih(e(t))}catch{}}return null}function Y5(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 ih(t);case 8:return t===Zf?"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 mn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function q0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function U5(e){var t=q0(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,c=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){s=""+p,c.call(this,p)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return s},setValue:function(p){s=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function il(e){e._valueTracker||(e._valueTracker=U5(e))}function Q0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),s="";return e&&(s=q0(e)?e.checked?"true":"false":e.value),e=s,e!==r?(t.setValue(e),!0):!1}function tc(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 nh(e,t){var r=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function U1(e,t){var r=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;r=mn(t.value!=null?t.value:r),e._wrapperState={initialChecked:s,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function K0(e,t){t=t.checked,t!=null&&Gf(e,"checked",t,!1)}function sh(e,t){K0(e,t);var r=mn(t.value),s=t.type;if(r!=null)s==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ah(e,t.type,r):t.hasOwnProperty("defaultValue")&&ah(e,t.type,mn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function G1(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ah(e,t,r){(t!=="number"||tc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var La=Array.isArray;function Rs(e,t,r,s){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=nl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qa(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var za={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},G5=["Webkit","ms","Moz","O"];Object.keys(za).forEach(function(e){G5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),za[t]=za[e]})});function rx(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||za.hasOwnProperty(e)&&za[e]?(""+t).trim():t+"px"}function ix(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var s=r.indexOf("--")===0,o=rx(r,t[r],s);r==="float"&&(r="cssFloat"),s?e.setProperty(r,o):e[r]=o}}var Z5=mt({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 ch(e,t){if(t){if(Z5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ue(62))}}function dh(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 uh=null;function Kf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hh=null,_s=null,Ms=null;function Q1(e){if(e=Mo(e)){if(typeof hh!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=id(t),hh(e.stateNode,e.type,t))}}function nx(e){_s?Ms?Ms.push(e):Ms=[e]:_s=e}function sx(){if(_s){var e=_s,t=Ms;if(Ms=_s=null,Q1(e),t)for(e=0;e>>=0,e===0?32:31-(a3(e)/o3|0)|0}var sl=64,al=4194304;function Pa(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 sc(e,t){var r=e.pendingLanes;if(r===0)return 0;var s=0,o=e.suspendedLanes,c=e.pingedLanes,p=r&268435455;if(p!==0){var v=p&~o;v!==0?s=Pa(v):(c&=p,c!==0&&(s=Pa(c)))}else p=r&~o,p!==0?s=Pa(p):c!==0&&(s=Pa(c));if(s===0)return 0;if(t!==0&&t!==s&&!(t&o)&&(o=s&-s,c=t&-t,o>=c||o===16&&(c&4194240)!==0))return t;if(s&4&&(s|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0r;r++)t.push(e);return t}function Ro(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xr(t),e[t]=r}function u3(e,t){var r=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 s=e.eventTimes;for(e=e.expirationTimes;0=Da),ag=" ",og=!1;function Ax(e,t){switch(e){case"keyup":return D3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ys=!1;function B3(e,t){switch(e){case"compositionend":return jx(t);case"keypress":return t.which!==32?null:(og=!0,ag);case"textInput":return e=t.data,e===ag&&og?null:e;default:return null}}function V3(e,t){if(ys)return e==="compositionend"||!ap&&Ax(e,t)?(e=Cx(),Pl=ip=tn=null,ys=!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)return{node:r,offset:t-e};e=s}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ug(r)}}function Px(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Px(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tx(){for(var e=window,t=tc();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=tc(e.document)}return t}function op(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 Q3(e){var t=Tx(),r=e.focusedElem,s=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Px(r.ownerDocument.documentElement,r)){if(s!==null&&op(r)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,c=Math.min(s.start,o);s=s.end===void 0?c:Math.min(s.end,o),!e.extend&&c>s&&(o=s,s=c,c=o),o=hg(r,c);var p=hg(r,s);o&&p&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==p.node||e.focusOffset!==p.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),c>s?(e.addRange(t),e.extend(p.node,p.offset)):(t.setEnd(p.node,p.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,bs=null,vh=null,Ba=null,yh=!1;function fg(e,t,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;yh||bs==null||bs!==tc(s)||(s=bs,"selectionStart"in s&&op(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ba&&ro(Ba,s)||(Ba=s,s=lc(vh,"onSelect"),0Cs||(e.current=Ah[Cs],Ah[Cs]=null,Cs--)}function lt(e,t){Cs++,Ah[Cs]=e.current,e.current=t}var xn={},Ut=An(xn),cr=An(!1),Zn=xn;function Hs(e,t){var r=e.type.contextTypes;if(!r)return xn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var o={},c;for(c in r)o[c]=t[c];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function dr(e){return e=e.childContextTypes,e!=null}function dc(){ut(cr),ut(Ut)}function bg(e,t,r){if(Ut.current!==xn)throw Error(ue(168));lt(Ut,t),lt(cr,r)}function Hx(e,t,r){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return r;s=s.getChildContext();for(var o in s)if(!(o in t))throw Error(ue(108,Y5(e)||"Unknown",o));return mt({},r,s)}function uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,Zn=Ut.current,lt(Ut,e),lt(cr,cr.current),!0}function wg(e,t,r){var s=e.stateNode;if(!s)throw Error(ue(169));r?(e=Hx(e,t,Zn),s.__reactInternalMemoizedMergedChildContext=e,ut(cr),ut(Ut),lt(Ut,e)):ut(cr),lt(cr,r)}var ki=null,nd=!1,fu=!1;function Bx(e){ki===null?ki=[e]:ki.push(e)}function c4(e){nd=!0,Bx(e)}function jn(){if(!fu&&ki!==null){fu=!0;var e=0,t=nt;try{var r=ki;for(nt=1;e>=p,o-=p,Ai=1<<32-Xr(t)+o|r<J?(me=q,q=null):me=q.sibling;var ce=B(W,q,_[J],K);if(ce===null){q===null&&(q=me);break}e&&q&&ce.alternate===null&&t(W,q),V=c(ce,V,J),X===null?ee=ce:X.sibling=ce,X=ce,q=me}if(J===_.length)return r(W,q),ht&&_n(W,J),ee;if(q===null){for(;J<_.length;J++)q=P(W,_[J],K),q!==null&&(V=c(q,V,J),X===null?ee=q:X.sibling=q,X=q);return ht&&_n(W,J),ee}for(q=s(W,q);J<_.length;J++)me=M(q,W,J,_[J],K),me!==null&&(e&&me.alternate!==null&&q.delete(me.key===null?J:me.key),V=c(me,V,J),X===null?ee=me:X.sibling=me,X=me);return e&&q.forEach(function(Te){return t(W,Te)}),ht&&_n(W,J),ee}function D(W,V,_,K){var ee=ua(_);if(typeof ee!="function")throw Error(ue(150));if(_=ee.call(_),_==null)throw Error(ue(151));for(var X=ee=null,q=V,J=V=0,me=null,ce=_.next();q!==null&&!ce.done;J++,ce=_.next()){q.index>J?(me=q,q=null):me=q.sibling;var Te=B(W,q,ce.value,K);if(Te===null){q===null&&(q=me);break}e&&q&&Te.alternate===null&&t(W,q),V=c(Te,V,J),X===null?ee=Te:X.sibling=Te,X=Te,q=me}if(ce.done)return r(W,q),ht&&_n(W,J),ee;if(q===null){for(;!ce.done;J++,ce=_.next())ce=P(W,ce.value,K),ce!==null&&(V=c(ce,V,J),X===null?ee=ce:X.sibling=ce,X=ce);return ht&&_n(W,J),ee}for(q=s(W,q);!ce.done;J++,ce=_.next())ce=M(q,W,J,ce.value,K),ce!==null&&(e&&ce.alternate!==null&&q.delete(ce.key===null?J:ce.key),V=c(ce,V,J),X===null?ee=ce:X.sibling=ce,X=ce);return e&&q.forEach(function(we){return t(W,we)}),ht&&_n(W,J),ee}function Z(W,V,_,K){if(typeof _=="object"&&_!==null&&_.type===vs&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case rl:e:{for(var ee=_.key,X=V;X!==null;){if(X.key===ee){if(ee=_.type,ee===vs){if(X.tag===7){r(W,X.sibling),V=o(X,_.props.children),V.return=W,W=V;break e}}else if(X.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Ui&&Eg(ee)===X.type){r(W,X.sibling),V=o(X,_.props),V.ref=ma(W,X,_),V.return=W,W=V;break e}r(W,X);break}else t(W,X);X=X.sibling}_.type===vs?(V=$n(_.props.children,W.mode,K,_.key),V.return=W,W=V):(K=Fl(_.type,_.key,_.props,null,W.mode,K),K.ref=ma(W,V,_),K.return=W,W=K)}return p(W);case xs:e:{for(X=_.key;V!==null;){if(V.key===X)if(V.tag===4&&V.stateNode.containerInfo===_.containerInfo&&V.stateNode.implementation===_.implementation){r(W,V.sibling),V=o(V,_.children||[]),V.return=W,W=V;break e}else{r(W,V);break}else t(W,V);V=V.sibling}V=wu(_,W.mode,K),V.return=W,W=V}return p(W);case Ui:return X=_._init,Z(W,V,X(_._payload),K)}if(La(_))return H(W,V,_,K);if(ua(_))return D(W,V,_,K);fl(W,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,V!==null&&V.tag===6?(r(W,V.sibling),V=o(V,_),V.return=W,W=V):(r(W,V),V=bu(_,W.mode,K),V.return=W,W=V),p(W)):r(W,V)}return Z}var Vs=Zx(!0),qx=Zx(!1),Oo={},si=An(Oo),ao=An(Oo),oo=An(Oo);function Hn(e){if(e===Oo)throw Error(ue(174));return e}function mp(e,t){switch(lt(oo,t),lt(ao,e),lt(si,Oo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:lh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=lh(t,e)}ut(si),lt(si,t)}function Ws(){ut(si),ut(ao),ut(oo)}function Qx(e){Hn(oo.current);var t=Hn(si.current),r=lh(t,e.type);t!==r&&(lt(ao,e),lt(si,r))}function xp(e){ao.current===e&&(ut(si),ut(ao))}var pt=An(0);function xc(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 pu=[];function vp(){for(var e=0;er?r:4,e(!0);var s=gu.transition;gu.transition={};try{e(!1),t()}finally{nt=r,gu.transition=s}}function fv(){return _r().memoizedState}function f4(e,t,r){var s=fn(e);if(r={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null},pv(e))gv(t,r);else if(r=Xx(e,t,r,s),r!==null){var o=tr();Yr(r,e,s,o),mv(r,t,s)}}function p4(e,t,r){var s=fn(e),o={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null};if(pv(e))gv(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,v=c(p,r);if(o.hasEagerState=!0,o.eagerState=v,Zr(v,p)){var C=t.interleaved;C===null?(o.next=o,pp(t)):(o.next=C.next,C.next=o),t.interleaved=o;return}}catch{}finally{}r=Xx(e,t,o,s),r!==null&&(o=tr(),Yr(r,e,s,o),mv(r,t,s))}}function pv(e){var t=e.alternate;return e===gt||t!==null&&t===gt}function gv(e,t){Va=vc=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function mv(e,t,r){if(r&4194240){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,ep(e,r)}}var yc={readContext:Rr,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useInsertionEffect:Wt,useLayoutEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useMutableSource:Wt,useSyncExternalStore:Wt,useId:Wt,unstable_isNewReconciler:!1},g4={readContext:Rr,useCallback:function(e,t){return ei().memoizedState=[e,t===void 0?null:t],e},useContext:Rr,useEffect:Pg,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ml(4194308,4,lv.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ml(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ml(4,2,e,t)},useMemo:function(e,t){var r=ei();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var s=ei();return t=r!==void 0?r(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=f4.bind(null,gt,e),[s.memoizedState,e]},useRef:function(e){var t=ei();return e={current:e},t.memoizedState=e},useState:Lg,useDebugValue:Cp,useDeferredValue:function(e){return ei().memoizedState=e},useTransition:function(){var e=Lg(!1),t=e[0];return e=h4.bind(null,e[1]),ei().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var s=gt,o=ei();if(ht){if(r===void 0)throw Error(ue(407));r=r()}else{if(r=t(),Mt===null)throw Error(ue(349));Qn&30||ev(s,t,r)}o.memoizedState=r;var c={value:r,getSnapshot:t};return o.queue=c,Pg(rv.bind(null,s,c,e),[e]),s.flags|=2048,uo(9,tv.bind(null,s,c,r,t),void 0,null),r},useId:function(){var e=ei(),t=Mt.identifierPrefix;if(ht){var r=ji,s=Ai;r=(s&~(1<<32-Xr(s)-1)).toString(32)+r,t=":"+t+"R"+r,r=lo++,0")&&(C=C.replace("",e.displayName)),C}while(1<=p&&0<=v);break}}}finally{Kd=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?La(e):""}function X5(e){switch(e.tag){case 5:return La(e.type);case 16:return La("Lazy");case 13:return La("Suspense");case 19:return La("SuspenseList");case 0:case 2:case 15:return e=Jd(e.type,!1),e;case 11:return e=Jd(e.type.render,!1),e;case 1:return e=Jd(e.type,!0),e;default:return""}}function ih(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 ys:return"Fragment";case vs:return"Portal";case eh:return"Profiler";case Zf:return"StrictMode";case th:return"Suspense";case rh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case G0:return(e.displayName||"Context")+".Consumer";case U0:return(e._context.displayName||"Context")+".Provider";case qf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Qf:return t=e.displayName||null,t!==null?t:ih(e.type)||"Memo";case Ui:t=e._payload,e=e._init;try{return ih(e(t))}catch{}}return null}function Y5(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 ih(t);case 8:return t===Zf?"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 mn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function q0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function U5(e){var t=q0(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,c=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){s=""+p,c.call(this,p)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return s},setValue:function(p){s=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function il(e){e._valueTracker||(e._valueTracker=U5(e))}function Q0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),s="";return e&&(s=q0(e)?e.checked?"true":"false":e.value),e=s,e!==r?(t.setValue(e),!0):!1}function tc(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 nh(e,t){var r=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function U1(e,t){var r=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;r=mn(t.value!=null?t.value:r),e._wrapperState={initialChecked:s,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function K0(e,t){t=t.checked,t!=null&&Gf(e,"checked",t,!1)}function sh(e,t){K0(e,t);var r=mn(t.value),s=t.type;if(r!=null)s==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ah(e,t.type,r):t.hasOwnProperty("defaultValue")&&ah(e,t.type,mn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function G1(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ah(e,t,r){(t!=="number"||tc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Pa=Array.isArray;function _s(e,t,r,s){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=nl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Qa(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Fa={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},G5=["Webkit","ms","Moz","O"];Object.keys(Fa).forEach(function(e){G5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fa[t]=Fa[e]})});function rx(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Fa.hasOwnProperty(e)&&Fa[e]?(""+t).trim():t+"px"}function ix(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var s=r.indexOf("--")===0,o=rx(r,t[r],s);r==="float"&&(r="cssFloat"),s?e.setProperty(r,o):e[r]=o}}var Z5=mt({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 ch(e,t){if(t){if(Z5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ue(62))}}function dh(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 uh=null;function Kf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hh=null,Ms=null,Os=null;function Q1(e){if(e=Oo(e)){if(typeof hh!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=id(t),hh(e.stateNode,e.type,t))}}function nx(e){Ms?Os?Os.push(e):Os=[e]:Ms=e}function sx(){if(Ms){var e=Ms,t=Os;if(Os=Ms=null,Q1(e),t)for(e=0;e>>=0,e===0?32:31-(a3(e)/o3|0)|0}var sl=64,al=4194304;function Ta(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 sc(e,t){var r=e.pendingLanes;if(r===0)return 0;var s=0,o=e.suspendedLanes,c=e.pingedLanes,p=r&268435455;if(p!==0){var v=p&~o;v!==0?s=Ta(v):(c&=p,c!==0&&(s=Ta(c)))}else p=r&~o,p!==0?s=Ta(p):c!==0&&(s=Ta(c));if(s===0)return 0;if(t!==0&&t!==s&&!(t&o)&&(o=s&-s,c=t&-t,o>=c||o===16&&(c&4194240)!==0))return t;if(s&4&&(s|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0r;r++)t.push(e);return t}function _o(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xr(t),e[t]=r}function u3(e,t){var r=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 s=e.eventTimes;for(e=e.expirationTimes;0=Ha),ag=" ",og=!1;function Ax(e,t){switch(e){case"keyup":return D3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bs=!1;function B3(e,t){switch(e){case"compositionend":return jx(t);case"keypress":return t.which!==32?null:(og=!0,ag);case"textInput":return e=t.data,e===ag&&og?null:e;default:return null}}function V3(e,t){if(bs)return e==="compositionend"||!ap&&Ax(e,t)?(e=Cx(),Pl=ip=tn=null,bs=!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)return{node:r,offset:t-e};e=s}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ug(r)}}function Px(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Px(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tx(){for(var e=window,t=tc();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=tc(e.document)}return t}function op(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 Q3(e){var t=Tx(),r=e.focusedElem,s=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Px(r.ownerDocument.documentElement,r)){if(s!==null&&op(r)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,c=Math.min(s.start,o);s=s.end===void 0?c:Math.min(s.end,o),!e.extend&&c>s&&(o=s,s=c,c=o),o=hg(r,c);var p=hg(r,s);o&&p&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==p.node||e.focusOffset!==p.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),c>s?(e.addRange(t),e.extend(p.node,p.offset)):(t.setEnd(p.node,p.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,ws=null,vh=null,Va=null,yh=!1;function fg(e,t,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;yh||ws==null||ws!==tc(s)||(s=ws,"selectionStart"in s&&op(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Va&&io(Va,s)||(Va=s,s=lc(vh,"onSelect"),0Ss||(e.current=Ah[Ss],Ah[Ss]=null,Ss--)}function lt(e,t){Ss++,Ah[Ss]=e.current,e.current=t}var xn={},Ut=An(xn),cr=An(!1),qn=xn;function Bs(e,t){var r=e.type.contextTypes;if(!r)return xn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var o={},c;for(c in r)o[c]=t[c];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function dr(e){return e=e.childContextTypes,e!=null}function dc(){ut(cr),ut(Ut)}function bg(e,t,r){if(Ut.current!==xn)throw Error(ue(168));lt(Ut,t),lt(cr,r)}function Hx(e,t,r){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return r;s=s.getChildContext();for(var o in s)if(!(o in t))throw Error(ue(108,Y5(e)||"Unknown",o));return mt({},r,s)}function uc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,qn=Ut.current,lt(Ut,e),lt(cr,cr.current),!0}function wg(e,t,r){var s=e.stateNode;if(!s)throw Error(ue(169));r?(e=Hx(e,t,qn),s.__reactInternalMemoizedMergedChildContext=e,ut(cr),ut(Ut),lt(Ut,e)):ut(cr),lt(cr,r)}var ki=null,nd=!1,fu=!1;function Bx(e){ki===null?ki=[e]:ki.push(e)}function c4(e){nd=!0,Bx(e)}function jn(){if(!fu&&ki!==null){fu=!0;var e=0,t=nt;try{var r=ki;for(nt=1;e>=p,o-=p,Ai=1<<32-Xr(t)+o|r<J?(he=Q,Q=null):he=Q.sibling;var oe=B(W,Q,_[J],K);if(oe===null){Q===null&&(Q=he);break}e&&Q&&oe.alternate===null&&t(W,Q),V=c(oe,V,J),X===null?ee=oe:X.sibling=oe,X=oe,Q=he}if(J===_.length)return r(W,Q),ht&&_n(W,J),ee;if(Q===null){for(;J<_.length;J++)Q=P(W,_[J],K),Q!==null&&(V=c(Q,V,J),X===null?ee=Q:X.sibling=Q,X=Q);return ht&&_n(W,J),ee}for(Q=s(W,Q);J<_.length;J++)he=M(Q,W,J,_[J],K),he!==null&&(e&&he.alternate!==null&&Q.delete(he.key===null?J:he.key),V=c(he,V,J),X===null?ee=he:X.sibling=he,X=he);return e&&Q.forEach(function(Te){return t(W,Te)}),ht&&_n(W,J),ee}function D(W,V,_,K){var ee=ha(_);if(typeof ee!="function")throw Error(ue(150));if(_=ee.call(_),_==null)throw Error(ue(151));for(var X=ee=null,Q=V,J=V=0,he=null,oe=_.next();Q!==null&&!oe.done;J++,oe=_.next()){Q.index>J?(he=Q,Q=null):he=Q.sibling;var Te=B(W,Q,oe.value,K);if(Te===null){Q===null&&(Q=he);break}e&&Q&&Te.alternate===null&&t(W,Q),V=c(Te,V,J),X===null?ee=Te:X.sibling=Te,X=Te,Q=he}if(oe.done)return r(W,Q),ht&&_n(W,J),ee;if(Q===null){for(;!oe.done;J++,oe=_.next())oe=P(W,oe.value,K),oe!==null&&(V=c(oe,V,J),X===null?ee=oe:X.sibling=oe,X=oe);return ht&&_n(W,J),ee}for(Q=s(W,Q);!oe.done;J++,oe=_.next())oe=M(Q,W,J,oe.value,K),oe!==null&&(e&&oe.alternate!==null&&Q.delete(oe.key===null?J:oe.key),V=c(oe,V,J),X===null?ee=oe:X.sibling=oe,X=oe);return e&&Q.forEach(function(we){return t(W,we)}),ht&&_n(W,J),ee}function Z(W,V,_,K){if(typeof _=="object"&&_!==null&&_.type===ys&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case rl:e:{for(var ee=_.key,X=V;X!==null;){if(X.key===ee){if(ee=_.type,ee===ys){if(X.tag===7){r(W,X.sibling),V=o(X,_.props.children),V.return=W,W=V;break e}}else if(X.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Ui&&Eg(ee)===X.type){r(W,X.sibling),V=o(X,_.props),V.ref=xa(W,X,_),V.return=W,W=V;break e}r(W,X);break}else t(W,X);X=X.sibling}_.type===ys?(V=$n(_.props.children,W.mode,K,_.key),V.return=W,W=V):(K=Fl(_.type,_.key,_.props,null,W.mode,K),K.ref=xa(W,V,_),K.return=W,W=K)}return p(W);case vs:e:{for(X=_.key;V!==null;){if(V.key===X)if(V.tag===4&&V.stateNode.containerInfo===_.containerInfo&&V.stateNode.implementation===_.implementation){r(W,V.sibling),V=o(V,_.children||[]),V.return=W,W=V;break e}else{r(W,V);break}else t(W,V);V=V.sibling}V=wu(_,W.mode,K),V.return=W,W=V}return p(W);case Ui:return X=_._init,Z(W,V,X(_._payload),K)}if(Pa(_))return H(W,V,_,K);if(ha(_))return D(W,V,_,K);fl(W,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,V!==null&&V.tag===6?(r(W,V.sibling),V=o(V,_),V.return=W,W=V):(r(W,V),V=bu(_,W.mode,K),V.return=W,W=V),p(W)):r(W,V)}return Z}var Ws=Zx(!0),qx=Zx(!1),Io={},si=An(Io),oo=An(Io),lo=An(Io);function Hn(e){if(e===Io)throw Error(ue(174));return e}function mp(e,t){switch(lt(lo,t),lt(oo,e),lt(si,Io),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:lh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=lh(t,e)}ut(si),lt(si,t)}function $s(){ut(si),ut(oo),ut(lo)}function Qx(e){Hn(lo.current);var t=Hn(si.current),r=lh(t,e.type);t!==r&&(lt(oo,e),lt(si,r))}function xp(e){oo.current===e&&(ut(si),ut(oo))}var pt=An(0);function xc(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 pu=[];function vp(){for(var e=0;er?r:4,e(!0);var s=gu.transition;gu.transition={};try{e(!1),t()}finally{nt=r,gu.transition=s}}function fv(){return _r().memoizedState}function f4(e,t,r){var s=fn(e);if(r={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null},pv(e))gv(t,r);else if(r=Xx(e,t,r,s),r!==null){var o=tr();Yr(r,e,s,o),mv(r,t,s)}}function p4(e,t,r){var s=fn(e),o={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null};if(pv(e))gv(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,v=c(p,r);if(o.hasEagerState=!0,o.eagerState=v,Zr(v,p)){var C=t.interleaved;C===null?(o.next=o,pp(t)):(o.next=C.next,C.next=o),t.interleaved=o;return}}catch{}finally{}r=Xx(e,t,o,s),r!==null&&(o=tr(),Yr(r,e,s,o),mv(r,t,s))}}function pv(e){var t=e.alternate;return e===gt||t!==null&&t===gt}function gv(e,t){Wa=vc=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function mv(e,t,r){if(r&4194240){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,ep(e,r)}}var yc={readContext:Rr,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useInsertionEffect:Wt,useLayoutEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useMutableSource:Wt,useSyncExternalStore:Wt,useId:Wt,unstable_isNewReconciler:!1},g4={readContext:Rr,useCallback:function(e,t){return ei().memoizedState=[e,t===void 0?null:t],e},useContext:Rr,useEffect:Pg,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ml(4194308,4,lv.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ml(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ml(4,2,e,t)},useMemo:function(e,t){var r=ei();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var s=ei();return t=r!==void 0?r(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=f4.bind(null,gt,e),[s.memoizedState,e]},useRef:function(e){var t=ei();return e={current:e},t.memoizedState=e},useState:Lg,useDebugValue:Cp,useDeferredValue:function(e){return ei().memoizedState=e},useTransition:function(){var e=Lg(!1),t=e[0];return e=h4.bind(null,e[1]),ei().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var s=gt,o=ei();if(ht){if(r===void 0)throw Error(ue(407));r=r()}else{if(r=t(),Mt===null)throw Error(ue(349));Kn&30||ev(s,t,r)}o.memoizedState=r;var c={value:r,getSnapshot:t};return o.queue=c,Pg(rv.bind(null,s,c,e),[e]),s.flags|=2048,ho(9,tv.bind(null,s,c,r,t),void 0,null),r},useId:function(){var e=ei(),t=Mt.identifierPrefix;if(ht){var r=ji,s=Ai;r=(s&~(1<<32-Xr(s)-1)).toString(32)+r,t=":"+t+"R"+r,r=co++,0<\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=p.createElement(r,{is:s.is}):(e=p.createElement(r),r==="select"&&(p=e,s.multiple?p.multiple=!0:s.size&&(p.size=s.size))):e=p.createElementNS(e,r),e[ti]=t,e[so]=s,Av(e,t,!1,!1),t.stateNode=e;e:{switch(p=dh(r,s),r){case"dialog":ct("cancel",e),ct("close",e),o=s;break;case"iframe":case"object":case"embed":ct("load",e),o=s;break;case"video":case"audio":for(o=0;oXs&&(t.flags|=128,s=!0,xa(c,!1),t.lanes=4194304)}else{if(!s)if(e=xc(p),e!==null){if(t.flags|=128,s=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),xa(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!ht)return $t(t),null}else 2*yt()-c.renderingStartTime>Xs&&r!==1073741824&&(t.flags|=128,s=!0,xa(c,!1),t.lanes=4194304);c.isBackwards?(p.sibling=t.child,t.child=p):(r=c.last,r!==null?r.sibling=p:t.child=p,c.last=p)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=yt(),t.sibling=null,r=pt.current,lt(pt,s?r&1|2:r&1),t):($t(t),null);case 22:case 23:return Lp(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?fr&1073741824&&($t(t),t.subtreeFlags&6&&(t.flags|=8192)):$t(t),null;case 24:return null;case 25:return null}throw Error(ue(156,t.tag))}function C4(e,t){switch(cp(t),t.tag){case 1:return dr(t.type)&&dc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ws(),ut(cr),ut(Ut),vp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xp(t),null;case 13:if(ut(pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));Bs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ut(pt),null;case 4:return Ws(),null;case 10:return fp(t.type._context),null;case 22:case 23:return Lp(),null;case 24:return null;default:return null}}var gl=!1,Xt=!1,S4=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function Ns(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(s){xt(e,t,s)}else r.current=null}function zh(e,t,r){try{r()}catch(s){xt(e,t,s)}}var Dg=!1;function A4(e,t){if(bh=ac,e=Tx(),op(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var o=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{r.nodeType,c.nodeType}catch{r=null;break e}var p=0,v=-1,C=-1,A=0,L=0,P=e,B=null;t:for(;;){for(var M;P!==r||o!==0&&P.nodeType!==3||(v=p+o),P!==c||s!==0&&P.nodeType!==3||(C=p+s),P.nodeType===3&&(p+=P.nodeValue.length),(M=P.firstChild)!==null;)B=P,P=M;for(;;){if(P===e)break t;if(B===r&&++A===o&&(v=p),B===c&&++L===s&&(C=p),(M=P.nextSibling)!==null)break;P=B,B=P.parentNode}P=M}r=v===-1||C===-1?null:{start:v,end:C}}else r=null}r=r||{start:0,end:0}}else r=null;for(wh={focusedElem:e,selectionRange:r},ac=!1,Ce=t;Ce!==null;)if(t=Ce,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ce=e;else for(;Ce!==null;){t=Ce;try{var H=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(H!==null){var D=H.memoizedProps,Z=H.memoizedState,W=t.stateNode,V=W.getSnapshotBeforeUpdate(t.elementType===t.type?D:zr(t.type,D),Z);W.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(K){xt(t,t.return,K)}if(e=t.sibling,e!==null){e.return=t.return,Ce=e;break}Ce=t.return}return H=Dg,Dg=!1,H}function Wa(e,t,r){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var o=s=s.next;do{if((o.tag&e)===e){var c=o.destroy;o.destroy=void 0,c!==void 0&&zh(t,r,c)}o=o.next}while(o!==s)}}function od(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var s=r.create;r.destroy=s()}r=r.next}while(r!==t)}}function Fh(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Ev(e){var t=e.alternate;t!==null&&(e.alternate=null,Ev(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ti],delete t[so],delete t[Sh],delete t[o4],delete t[l4])),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 Lv(e){return e.tag===5||e.tag===3||e.tag===4}function Hg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lv(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 Dh(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=cc));else if(s!==4&&(e=e.child,e!==null))for(Dh(e,t,r),e=e.sibling;e!==null;)Dh(e,t,r),e=e.sibling}function Hh(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Hh(e,t,r),e=e.sibling;e!==null;)Hh(e,t,r),e=e.sibling}var zt=null,Fr=!1;function Wi(e,t,r){for(r=r.child;r!==null;)Pv(e,t,r),r=r.sibling}function Pv(e,t,r){if(ni&&typeof ni.onCommitFiberUnmount=="function")try{ni.onCommitFiberUnmount(Jc,r)}catch{}switch(r.tag){case 5:Xt||Ns(r,t);case 6:var s=zt,o=Fr;zt=null,Wi(e,t,r),zt=s,Fr=o,zt!==null&&(Fr?(e=zt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):zt.removeChild(r.stateNode));break;case 18:zt!==null&&(Fr?(e=zt,r=r.stateNode,e.nodeType===8?hu(e.parentNode,r):e.nodeType===1&&hu(e,r),eo(e)):hu(zt,r.stateNode));break;case 4:s=zt,o=Fr,zt=r.stateNode.containerInfo,Fr=!0,Wi(e,t,r),zt=s,Fr=o;break;case 0:case 11:case 14:case 15:if(!Xt&&(s=r.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){o=s=s.next;do{var c=o,p=c.destroy;c=c.tag,p!==void 0&&(c&2||c&4)&&zh(r,t,p),o=o.next}while(o!==s)}Wi(e,t,r);break;case 1:if(!Xt&&(Ns(r,t),s=r.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=r.memoizedProps,s.state=r.memoizedState,s.componentWillUnmount()}catch(v){xt(r,t,v)}Wi(e,t,r);break;case 21:Wi(e,t,r);break;case 22:r.mode&1?(Xt=(s=Xt)||r.memoizedState!==null,Wi(e,t,r),Xt=s):Wi(e,t,r);break;default:Wi(e,t,r)}}function Bg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new S4),t.forEach(function(s){var o=M4.bind(null,e,s);r.has(s)||(r.add(s),s.then(o,o))})}}function Ir(e,t){var r=t.deletions;if(r!==null)for(var s=0;so&&(o=p),s&=~c}if(s=o,s=yt()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*N4(s/1960))-s,10e?16:e,rn===null)var s=!1;else{if(e=rn,rn=null,kc=0,Ke&6)throw Error(ue(331));var o=Ke;for(Ke|=4,Ce=e.current;Ce!==null;){var c=Ce,p=c.child;if(Ce.flags&16){var v=c.deletions;if(v!==null){for(var C=0;Cyt()-Np?Wn(e,0):jp|=r),ur(e,t)}function Fv(e,t){t===0&&(e.mode&1?(t=al,al<<=1,!(al&130023424)&&(al=4194304)):t=1);var r=tr();e=_i(e,t),e!==null&&(Ro(e,t,r),ur(e,r))}function _4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Fv(e,r)}function M4(e,t){var r=0;switch(e.tag){case 13:var s=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(ue(314))}s!==null&&s.delete(t),Fv(e,r)}var Dv;Dv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||cr.current)lr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return lr=!1,w4(e,t,r);lr=!!(e.flags&131072)}else lr=!1,ht&&t.flags&1048576&&Vx(t,fc,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Ol(e,t),e=t.pendingProps;var o=Hs(t,Ut.current);Is(t,r),o=bp(null,t,s,e,o,r);var c=wp();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dr(s)?(c=!0,uc(t)):c=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,gp(t),o.updater=sd,t.stateNode=o,o._reactInternals=t,Ph(t,s,e,r),t=_h(null,t,s,!0,c,r)):(t.tag=0,ht&&c&&lp(t),Qt(null,t,o,r),t=t.child),t;case 16:s=t.elementType;e:{switch(Ol(e,t),e=t.pendingProps,o=s._init,s=o(s._payload),t.type=s,o=t.tag=I4(s),e=zr(s,e),o){case 0:t=Rh(null,t,s,e,r);break e;case 1:t=Ig(null,t,s,e,r);break e;case 11:t=Mg(null,t,s,e,r);break e;case 14:t=Og(null,t,s,zr(s.type,e),r);break e}throw Error(ue(306,s,""))}return t;case 0:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:zr(s,o),Rh(e,t,s,o,r);case 1:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:zr(s,o),Ig(e,t,s,o,r);case 3:e:{if(kv(t),e===null)throw Error(ue(387));s=t.pendingProps,c=t.memoizedState,o=c.element,Yx(e,t),mc(t,s,null,r);var p=t.memoizedState;if(s=p.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){o=$s(Error(ue(423)),t),t=zg(e,t,s,r,o);break e}else if(s!==o){o=$s(Error(ue(424)),t),t=zg(e,t,s,r,o);break e}else for(pr=dn(t.stateNode.containerInfo.firstChild),gr=t,ht=!0,Hr=null,r=qx(t,null,s,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Bs(),s===o){t=Mi(e,t,r);break e}Qt(e,t,s,r)}t=t.child}return t;case 5:return Qx(t),e===null&&Nh(t),s=t.type,o=t.pendingProps,c=e!==null?e.memoizedProps:null,p=o.children,kh(s,o)?p=null:c!==null&&kh(s,c)&&(t.flags|=32),wv(e,t),Qt(e,t,p,r),t.child;case 6:return e===null&&Nh(t),null;case 13:return Cv(e,t,r);case 4:return mp(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Vs(t,null,s,r):Qt(e,t,s,r),t.child;case 11:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:zr(s,o),Mg(e,t,s,o,r);case 7:return Qt(e,t,t.pendingProps,r),t.child;case 8:return Qt(e,t,t.pendingProps.children,r),t.child;case 12:return Qt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(s=t.type._context,o=t.pendingProps,c=t.memoizedProps,p=o.value,lt(pc,s._currentValue),s._currentValue=p,c!==null)if(Zr(c.value,p)){if(c.children===o.children&&!cr.current){t=Mi(e,t,r);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var v=c.dependencies;if(v!==null){p=c.child;for(var C=v.firstContext;C!==null;){if(C.context===s){if(c.tag===1){C=Ni(-1,r&-r),C.tag=2;var A=c.updateQueue;if(A!==null){A=A.shared;var L=A.pending;L===null?C.next=C:(C.next=L.next,L.next=C),A.pending=C}}c.lanes|=r,C=c.alternate,C!==null&&(C.lanes|=r),Eh(c.return,r,t),v.lanes|=r;break}C=C.next}}else if(c.tag===10)p=c.type===t.type?null:c.child;else if(c.tag===18){if(p=c.return,p===null)throw Error(ue(341));p.lanes|=r,v=p.alternate,v!==null&&(v.lanes|=r),Eh(p,r,t),p=c.sibling}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===t){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}Qt(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,s=t.pendingProps.children,Is(t,r),o=Rr(o),s=s(o),t.flags|=1,Qt(e,t,s,r),t.child;case 14:return s=t.type,o=zr(s,t.pendingProps),o=zr(s.type,o),Og(e,t,s,o,r);case 15:return yv(e,t,t.type,t.pendingProps,r);case 17:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:zr(s,o),Ol(e,t),t.tag=1,dr(s)?(e=!0,uc(t)):e=!1,Is(t,r),Gx(t,s,o),Ph(t,s,o,r),_h(null,t,s,!0,e,r);case 19:return Sv(e,t,r);case 22:return bv(e,t,r)}throw Error(ue(156,t.tag))};function Hv(e,t){return hx(e,t)}function O4(e,t,r,s){this.tag=e,this.key=r,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Er(e,t,r,s){return new O4(e,t,r,s)}function Tp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function I4(e){if(typeof e=="function")return Tp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qf)return 11;if(e===Qf)return 14}return 2}function pn(e,t){var r=e.alternate;return r===null?(r=Er(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Fl(e,t,r,s,o,c){var p=2;if(s=e,typeof e=="function")Tp(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case vs:return $n(r.children,o,c,t);case Zf:p=8,o|=8;break;case eh:return e=Er(12,r,t,o|2),e.elementType=eh,e.lanes=c,e;case th:return e=Er(13,r,t,o),e.elementType=th,e.lanes=c,e;case rh:return e=Er(19,r,t,o),e.elementType=rh,e.lanes=c,e;case Z0:return cd(r,o,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U0:p=10;break e;case G0:p=9;break e;case qf:p=11;break e;case Qf:p=14;break e;case Ui:p=16,s=null;break e}throw Error(ue(130,e==null?e:typeof e,""))}return t=Er(p,r,t,o),t.elementType=e,t.type=s,t.lanes=c,t}function $n(e,t,r,s){return e=Er(7,e,s,t),e.lanes=r,e}function cd(e,t,r,s){return e=Er(22,e,s,t),e.elementType=Z0,e.lanes=r,e.stateNode={isHidden:!1},e}function bu(e,t,r){return e=Er(6,e,null,t),e.lanes=r,e}function wu(e,t,r){return t=Er(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function z4(e,t,r,s,o){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=tu(0),this.expirationTimes=tu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tu(0),this.identifierPrefix=s,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Rp(e,t,r,s,o,c,p,v,C){return e=new z4(e,t,r,v,C),t===1?(t=1,c===!0&&(t|=8)):t=0,c=Er(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:s,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},gp(c),e}function F4(e,t,r){var s=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($v)}catch(e){console.error(e)}}$v(),V0.exports=xr;var Xv=V0.exports,Zg=Xv;Ku.createRoot=Zg.createRoot,Ku.hydrateRoot=Zg.hydrateRoot;class Io{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const r={listener:t};return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const fo=typeof window>"u"||"Deno"in window;function Cr(){}function W4(e,t){return typeof e=="function"?e(t):e}function Xh(e){return typeof e=="number"&&e>=0&&e!==1/0}function Yv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ra(e,t,r){return pd(e)?typeof t=="function"?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Zi(e,t,r){return pd(e)?[{...t,queryKey:e},r]:[e||{},t]}function qg(e,t){const{type:r="all",exact:s,fetchStatus:o,predicate:c,queryKey:p,stale:v}=e;if(pd(p)){if(s){if(t.queryHash!==Ip(p,t.options))return!1}else if(!Ac(t.queryKey,p))return!1}if(r!=="all"){const C=t.isActive();if(r==="active"&&!C||r==="inactive"&&C)return!1}return!(typeof v=="boolean"&&t.isStale()!==v||typeof o<"u"&&o!==t.state.fetchStatus||c&&!c(t))}function Qg(e,t){const{exact:r,fetching:s,predicate:o,mutationKey:c}=e;if(pd(c)){if(!t.options.mutationKey)return!1;if(r){if(nn(t.options.mutationKey)!==nn(c))return!1}else if(!Ac(t.options.mutationKey,c))return!1}return!(typeof s=="boolean"&&t.state.status==="loading"!==s||o&&!o(t))}function Ip(e,t){return((t==null?void 0:t.queryKeyHashFn)||nn)(e)}function nn(e){return JSON.stringify(e,(t,r)=>Uh(r)?Object.keys(r).sort().reduce((s,o)=>(s[o]=r[o],s),{}):r)}function Ac(e,t){return Uv(e,t)}function Uv(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!Uv(e[r],t[r])):!1}function Gv(e,t){if(e===t)return e;const r=Kg(e)&&Kg(t);if(r||Uh(e)&&Uh(t)){const s=r?e.length:Object.keys(e).length,o=r?t:Object.keys(t),c=o.length,p=r?[]:{};let v=0;for(let C=0;C"u")return!0;const r=t.prototype;return!(!Jg(r)||!r.hasOwnProperty("isPrototypeOf"))}function Jg(e){return Object.prototype.toString.call(e)==="[object Object]"}function pd(e){return Array.isArray(e)}function Zv(e){return new Promise(t=>{setTimeout(t,e)})}function em(e){Zv(0).then(e)}function $4(){if(typeof AbortController=="function")return new AbortController}function Gh(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Gv(e,t):t}class X4 extends Io{constructor(){super(),this.setup=t=>{if(!fo&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const jc=new X4,tm=["online","offline"];class Y4 extends Io{constructor(){super(),this.setup=t=>{if(!fo&&window.addEventListener){const r=()=>t();return tm.forEach(s=>{window.addEventListener(s,r,!1)}),()=>{tm.forEach(s=>{window.removeEventListener(s,r)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(s=>{typeof s=="boolean"?this.setOnline(s):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Nc=new Y4;function U4(e){return Math.min(1e3*2**e,3e4)}function gd(e){return(e??"online")==="online"?Nc.isOnline():!0}class qv{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Dl(e){return e instanceof qv}function Qv(e){let t=!1,r=0,s=!1,o,c,p;const v=new Promise((Z,W)=>{c=Z,p=W}),C=Z=>{s||(M(new qv(Z)),e.abort==null||e.abort())},A=()=>{t=!0},L=()=>{t=!1},P=()=>!jc.isFocused()||e.networkMode!=="always"&&!Nc.isOnline(),B=Z=>{s||(s=!0,e.onSuccess==null||e.onSuccess(Z),o==null||o(),c(Z))},M=Z=>{s||(s=!0,e.onError==null||e.onError(Z),o==null||o(),p(Z))},H=()=>new Promise(Z=>{o=W=>{const V=s||!P();return V&&Z(W),V},e.onPause==null||e.onPause()}).then(()=>{o=void 0,s||e.onContinue==null||e.onContinue()}),D=()=>{if(s)return;let Z;try{Z=e.fn()}catch(W){Z=Promise.reject(W)}Promise.resolve(Z).then(B).catch(W=>{var V,_;if(s)return;const K=(V=e.retry)!=null?V:3,ee=(_=e.retryDelay)!=null?_:U4,X=typeof ee=="function"?ee(r,W):ee,q=K===!0||typeof K=="number"&&r{if(P())return H()}).then(()=>{t?M(W):D()})})};return gd(e.networkMode)?D():H().then(D),{promise:v,cancel:C,continue:()=>(o==null?void 0:o())?v:Promise.resolve(),cancelRetry:A,continueRetry:L}}const zp=console;function G4(){let e=[],t=0,r=L=>{L()},s=L=>{L()};const o=L=>{let P;t++;try{P=L()}finally{t--,t||v()}return P},c=L=>{t?e.push(L):em(()=>{r(L)})},p=L=>(...P)=>{c(()=>{L(...P)})},v=()=>{const L=e;e=[],L.length&&em(()=>{s(()=>{L.forEach(P=>{r(P)})})})};return{batch:o,batchCalls:p,schedule:c,setNotifyFunction:L=>{r=L},setBatchNotifyFunction:L=>{s=L}}}const Ct=G4();class Kv{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Xh(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(fo?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Z4 extends Kv{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||zp,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||q4(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,r){const s=Gh(this.state.data,t,this.options);return this.dispatch({data:s,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),s}setState(t,r){this.dispatch({type:"setState",state:t,setStateOptions:r})}cancel(t){var r;const s=this.promise;return(r=this.retryer)==null||r.cancel(t),s?s.then(Cr).catch(Cr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Yv(this.state.dataUpdatedAt,t)}onFocus(){var t;const r=this.observers.find(s=>s.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const r=this.observers.find(s=>s.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,r){var s,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var c;return(c=this.retryer)==null||c.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const M=this.observers.find(H=>H.options.queryFn);M&&this.setOptions(M.options)}const p=$4(),v={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},C=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>{if(p)return this.abortSignalConsumed=!0,p.signal}})};C(v);const A=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(v)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),L={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:A};if(C(L),(s=this.options.behavior)==null||s.onFetch(L),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=L.fetchOptions)==null?void 0:o.meta)){var P;this.dispatch({type:"fetch",meta:(P=L.fetchOptions)==null?void 0:P.meta})}const B=M=>{if(Dl(M)&&M.silent||this.dispatch({type:"error",error:M}),!Dl(M)){var H,D,Z,W;(H=(D=this.cache.config).onError)==null||H.call(D,M,this),(Z=(W=this.cache.config).onSettled)==null||Z.call(W,this.state.data,M,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Qv({fn:L.fetchFn,abort:p==null?void 0:p.abort.bind(p),onSuccess:M=>{var H,D,Z,W;if(typeof M>"u"){B(new Error(this.queryHash+" data is undefined"));return}this.setData(M),(H=(D=this.cache.config).onSuccess)==null||H.call(D,M,this),(Z=(W=this.cache.config).onSettled)==null||Z.call(W,M,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:B,onFail:(M,H)=>{this.dispatch({type:"failed",failureCount:M,error:H})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:L.options.retry,retryDelay:L.options.retryDelay,networkMode:L.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const r=s=>{var o,c;switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:gd(this.options.networkMode)?"fetching":"paused",...!s.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...s,data:t.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:(c=t.dataUpdatedAt)!=null?c:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const p=t.error;return Dl(p)&&p.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...s,error:p,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:p,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=r(this.state),Ct.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function q4(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t<"u",s=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class Q4 extends Io{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,r,s){var o;const c=r.queryKey,p=(o=r.queryHash)!=null?o:Ip(c,r);let v=this.get(p);return v||(v=new Z4({cache:this,logger:t.getLogger(),queryKey:c,queryHash:p,options:t.defaultQueryOptions(r),state:s,defaultOptions:t.getQueryDefaults(c)}),this.add(v)),v}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const r=this.queriesMap[t.queryHash];r&&(t.destroy(),this.queries=this.queries.filter(s=>s!==t),r===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Ct.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,r){const[s]=Zi(t,r);return typeof s.exact>"u"&&(s.exact=!0),this.queries.find(o=>qg(s,o))}findAll(t,r){const[s]=Zi(t,r);return Object.keys(s).length>0?this.queries.filter(o=>qg(s,o)):this.queries}notify(t){Ct.batch(()=>{this.listeners.forEach(({listener:r})=>{r(t)})})}onFocus(){Ct.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Ct.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class K4 extends Kv{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||zp,this.observers=[],this.state=t.state||J4(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(r=>r!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,r;return(t=(r=this.retryer)==null?void 0:r.continue())!=null?t:this.execute()}async execute(){const t=()=>{var q;return this.retryer=Qv({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(J,me)=>{this.dispatch({type:"failed",failureCount:J,error:me})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(q=this.options.retry)!=null?q:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var s,o,c,p,v,C,A,L;if(!r){var P,B,M,H;this.dispatch({type:"loading",variables:this.options.variables}),await((P=(B=this.mutationCache.config).onMutate)==null?void 0:P.call(B,this.state.variables,this));const J=await((M=(H=this.options).onMutate)==null?void 0:M.call(H,this.state.variables));J!==this.state.context&&this.dispatch({type:"loading",context:J,variables:this.state.variables})}const q=await t();return await((s=(o=this.mutationCache.config).onSuccess)==null?void 0:s.call(o,q,this.state.variables,this.state.context,this)),await((c=(p=this.options).onSuccess)==null?void 0:c.call(p,q,this.state.variables,this.state.context)),await((v=(C=this.mutationCache.config).onSettled)==null?void 0:v.call(C,q,null,this.state.variables,this.state.context,this)),await((A=(L=this.options).onSettled)==null?void 0:A.call(L,q,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:q}),q}catch(q){try{var D,Z,W,V,_,K,ee,X;throw await((D=(Z=this.mutationCache.config).onError)==null?void 0:D.call(Z,q,this.state.variables,this.state.context,this)),await((W=(V=this.options).onError)==null?void 0:W.call(V,q,this.state.variables,this.state.context)),await((_=(K=this.mutationCache.config).onSettled)==null?void 0:_.call(K,void 0,q,this.state.variables,this.state.context,this)),await((ee=(X=this.options).onSettled)==null?void 0:ee.call(X,void 0,q,this.state.variables,this.state.context)),q}finally{this.dispatch({type:"error",error:q})}}}dispatch(t){const r=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"loading":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!gd(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...s,...t.state}}};this.state=r(this.state),Ct.batch(()=>{this.observers.forEach(s=>{s.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function J4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ew extends Io{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,s){const o=new K4({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(r),state:s,defaultOptions:r.mutationKey?t.getMutationDefaults(r.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(r=>r!==t),this.notify({type:"removed",mutation:t})}clear(){Ct.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(r=>Qg(t,r))}findAll(t){return this.mutations.filter(r=>Qg(t,r))}notify(t){Ct.batch(()=>{this.listeners.forEach(({listener:r})=>{r(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const r=this.mutations.filter(s=>s.state.isPaused);return Ct.batch(()=>r.reduce((s,o)=>s.then(()=>o.continue().catch(Cr)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function tw(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,s,o,c,p;const v=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,C=(s=e.fetchOptions)==null||(o=s.meta)==null?void 0:o.fetchMore,A=C==null?void 0:C.pageParam,L=(C==null?void 0:C.direction)==="forward",P=(C==null?void 0:C.direction)==="backward",B=((c=e.state.data)==null?void 0:c.pages)||[],M=((p=e.state.data)==null?void 0:p.pageParams)||[];let H=M,D=!1;const Z=X=>{Object.defineProperty(X,"signal",{enumerable:!0,get:()=>{var q;if((q=e.signal)!=null&&q.aborted)D=!0;else{var J;(J=e.signal)==null||J.addEventListener("abort",()=>{D=!0})}return e.signal}})},W=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),V=(X,q,J,me)=>(H=me?[q,...H]:[...H,q],me?[J,...X]:[...X,J]),_=(X,q,J,me)=>{if(D)return Promise.reject("Cancelled");if(typeof J>"u"&&!q&&X.length)return Promise.resolve(X);const ce={queryKey:e.queryKey,pageParam:J,meta:e.options.meta};Z(ce);const Te=W(ce);return Promise.resolve(Te).then(Ee=>V(X,J,Ee,me))};let K;if(!B.length)K=_([]);else if(L){const X=typeof A<"u",q=X?A:rm(e.options,B);K=_(B,X,q)}else if(P){const X=typeof A<"u",q=X?A:rw(e.options,B);K=_(B,X,q,!0)}else{H=[];const X=typeof e.options.getNextPageParam>"u";K=(v&&B[0]?v(B[0],0,B):!0)?_([],X,M[0]):Promise.resolve(V([],M[0],B[0]));for(let J=1;J{if(v&&B[J]?v(B[J],J,B):!0){const Te=X?M[J]:rm(e.options,me);return _(me,X,Te)}return Promise.resolve(V(me,M[J],B[J]))})}return K.then(X=>({pages:X,pageParams:H}))}}}}function rm(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function rw(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class iw{constructor(t={}){this.queryCache=t.queryCache||new Q4,this.mutationCache=t.mutationCache||new ew,this.logger=t.logger||zp,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=jc.subscribe(()=>{jc.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Nc.subscribe(()=>{Nc.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,r;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(t,r){const[s]=Zi(t,r);return s.fetchStatus="fetching",this.queryCache.findAll(s).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,r){var s;return(s=this.queryCache.find(t,r))==null?void 0:s.state.data}ensureQueryData(t,r,s){const o=Ra(t,r,s),c=this.getQueryData(o.queryKey);return c?Promise.resolve(c):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:r,state:s})=>{const o=s.data;return[r,o]})}setQueryData(t,r,s){const o=this.queryCache.find(t),c=o==null?void 0:o.state.data,p=W4(r,c);if(typeof p>"u")return;const v=Ra(t),C=this.defaultQueryOptions(v);return this.queryCache.build(this,C).setData(p,{...s,manual:!0})}setQueriesData(t,r,s){return Ct.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,r,s)]))}getQueryState(t,r){var s;return(s=this.queryCache.find(t,r))==null?void 0:s.state}removeQueries(t,r){const[s]=Zi(t,r),o=this.queryCache;Ct.batch(()=>{o.findAll(s).forEach(c=>{o.remove(c)})})}resetQueries(t,r,s){const[o,c]=Zi(t,r,s),p=this.queryCache,v={type:"active",...o};return Ct.batch(()=>(p.findAll(o).forEach(C=>{C.reset()}),this.refetchQueries(v,c)))}cancelQueries(t,r,s){const[o,c={}]=Zi(t,r,s);typeof c.revert>"u"&&(c.revert=!0);const p=Ct.batch(()=>this.queryCache.findAll(o).map(v=>v.cancel(c)));return Promise.all(p).then(Cr).catch(Cr)}invalidateQueries(t,r,s){const[o,c]=Zi(t,r,s);return Ct.batch(()=>{var p,v;if(this.queryCache.findAll(o).forEach(A=>{A.invalidate()}),o.refetchType==="none")return Promise.resolve();const C={...o,type:(p=(v=o.refetchType)!=null?v:o.type)!=null?p:"active"};return this.refetchQueries(C,c)})}refetchQueries(t,r,s){const[o,c]=Zi(t,r,s),p=Ct.batch(()=>this.queryCache.findAll(o).filter(C=>!C.isDisabled()).map(C=>{var A;return C.fetch(void 0,{...c,cancelRefetch:(A=c==null?void 0:c.cancelRefetch)!=null?A:!0,meta:{refetchPage:o.refetchPage}})}));let v=Promise.all(p).then(Cr);return c!=null&&c.throwOnError||(v=v.catch(Cr)),v}fetchQuery(t,r,s){const o=Ra(t,r,s),c=this.defaultQueryOptions(o);typeof c.retry>"u"&&(c.retry=!1);const p=this.queryCache.build(this,c);return p.isStaleByTime(c.staleTime)?p.fetch(c):Promise.resolve(p.state.data)}prefetchQuery(t,r,s){return this.fetchQuery(t,r,s).then(Cr).catch(Cr)}fetchInfiniteQuery(t,r,s){const o=Ra(t,r,s);return o.behavior=tw(),this.fetchQuery(o)}prefetchInfiniteQuery(t,r,s){return this.fetchInfiniteQuery(t,r,s).then(Cr).catch(Cr)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,r){const s=this.queryDefaults.find(o=>nn(t)===nn(o.queryKey));s?s.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(s=>Ac(t,s.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(t,r){const s=this.mutationDefaults.find(o=>nn(t)===nn(o.mutationKey));s?s.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(s=>Ac(t,s.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const r={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=Ip(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class nw extends Io{constructor(t,r){super(),this.client=t,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),im(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zh(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zh(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,r){const s=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),Yh(s,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();const c=this.hasListeners();c&&nm(this.currentQuery,o,this.options,s)&&this.executeFetch(),this.updateResult(r),c&&(this.currentQuery!==o||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();const p=this.computeRefetchInterval();c&&(this.currentQuery!==o||this.options.enabled!==s.enabled||p!==this.currentRefetchInterval)&&this.updateRefetchInterval(p)}getOptimisticResult(t){const r=this.client.getQueryCache().build(this.client,t),s=this.createResult(r,t);return aw(this,s,t)&&(this.currentResult=s,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),s}getCurrentResult(){return this.currentResult}trackResult(t){const r={};return Object.keys(t).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(s),t[s])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...r}={}){return this.fetch({...r,meta:{refetchPage:t}})}fetchOptimistic(t){const r=this.client.defaultQueryOptions(t),s=this.client.getQueryCache().build(this.client,r);return s.isFetchingOptimistic=!0,s.fetch().then(()=>this.createResult(s,r))}fetch(t){var r;return this.executeFetch({...t,cancelRefetch:(r=t.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let r=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Cr)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),fo||this.currentResult.isStale||!Xh(this.options.staleTime))return;const r=Yv(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(fo||this.options.enabled===!1||!Xh(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||jc.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,r){const s=this.currentQuery,o=this.options,c=this.currentResult,p=this.currentResultState,v=this.currentResultOptions,C=t!==s,A=C?t.state:this.currentQueryInitialState,L=C?this.currentResult:this.previousQueryResult,{state:P}=t;let{dataUpdatedAt:B,error:M,errorUpdatedAt:H,fetchStatus:D,status:Z}=P,W=!1,V=!1,_;if(r._optimisticResults){const J=this.hasListeners(),me=!J&&im(t,r),ce=J&&nm(t,s,r,o);(me||ce)&&(D=gd(t.options.networkMode)?"fetching":"paused",B||(Z="loading")),r._optimisticResults==="isRestoring"&&(D="idle")}if(r.keepPreviousData&&!P.dataUpdatedAt&&L!=null&&L.isSuccess&&Z!=="error")_=L.data,B=L.dataUpdatedAt,Z=L.status,W=!0;else if(r.select&&typeof P.data<"u")if(c&&P.data===(p==null?void 0:p.data)&&r.select===this.selectFn)_=this.selectResult;else try{this.selectFn=r.select,_=r.select(P.data),_=Gh(c==null?void 0:c.data,_,r),this.selectResult=_,this.selectError=null}catch(J){this.selectError=J}else _=P.data;if(typeof r.placeholderData<"u"&&typeof _>"u"&&Z==="loading"){let J;if(c!=null&&c.isPlaceholderData&&r.placeholderData===(v==null?void 0:v.placeholderData))J=c.data;else if(J=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof J<"u")try{J=r.select(J),this.selectError=null}catch(me){this.selectError=me}typeof J<"u"&&(Z="success",_=Gh(c==null?void 0:c.data,J,r),V=!0)}this.selectError&&(M=this.selectError,_=this.selectResult,H=Date.now(),Z="error");const K=D==="fetching",ee=Z==="loading",X=Z==="error";return{status:Z,fetchStatus:D,isLoading:ee,isSuccess:Z==="success",isError:X,isInitialLoading:ee&&K,data:_,dataUpdatedAt:B,error:M,errorUpdatedAt:H,failureCount:P.fetchFailureCount,failureReason:P.fetchFailureReason,errorUpdateCount:P.errorUpdateCount,isFetched:P.dataUpdateCount>0||P.errorUpdateCount>0,isFetchedAfterMount:P.dataUpdateCount>A.dataUpdateCount||P.errorUpdateCount>A.errorUpdateCount,isFetching:K,isRefetching:K&&!ee,isLoadingError:X&&P.dataUpdatedAt===0,isPaused:D==="paused",isPlaceholderData:V,isPreviousData:W,isRefetchError:X&&P.dataUpdatedAt!==0,isStale:Fp(t,r),refetch:this.refetch,remove:this.remove}}updateResult(t){const r=this.currentResult,s=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Yh(s,r))return;this.currentResult=s;const o={cache:!0},c=()=>{if(!r)return!0;const{notifyOnChangeProps:p}=this.options,v=typeof p=="function"?p():p;if(v==="all"||!v&&!this.trackedProps.size)return!0;const C=new Set(v??this.trackedProps);return this.options.useErrorBoundary&&C.add("error"),Object.keys(this.currentResult).some(A=>{const L=A;return this.currentResult[L]!==r[L]&&C.has(L)})};(t==null?void 0:t.listeners)!==!1&&c()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const r={};t.type==="success"?r.onSuccess=!t.manual:t.type==="error"&&!Dl(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){Ct.batch(()=>{if(t.onSuccess){var r,s,o,c;(r=(s=this.options).onSuccess)==null||r.call(s,this.currentResult.data),(o=(c=this.options).onSettled)==null||o.call(c,this.currentResult.data,null)}else if(t.onError){var p,v,C,A;(p=(v=this.options).onError)==null||p.call(v,this.currentResult.error),(C=(A=this.options).onSettled)==null||C.call(A,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:L})=>{L(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function sw(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function im(e,t){return sw(e,t)||e.state.dataUpdatedAt>0&&Zh(e,t,t.refetchOnMount)}function Zh(e,t,r){if(t.enabled!==!1){const s=typeof r=="function"?r(e):r;return s==="always"||s!==!1&&Fp(e,t)}return!1}function nm(e,t,r,s){return r.enabled!==!1&&(e!==t||s.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&Fp(e,r)}function Fp(e,t){return e.isStaleByTime(t.staleTime)}function aw(e,t,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?t.isPlaceholderData:!Yh(e.getCurrentResult(),t)}var Jv={exports:{}},ey={};/** +`+c.stack}return{value:e,source:t,stack:o,digest:null}}function vu(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Th(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var v4=typeof WeakMap=="function"?WeakMap:Map;function xv(e,t,r){r=Ni(-1,r),r.tag=3,r.payload={element:null};var s=t.value;return r.callback=function(){wc||(wc=!0,Bh=s),Th(e,t)},r}function vv(e,t,r){r=Ni(-1,r),r.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var o=t.value;r.payload=function(){return s(o)},r.callback=function(){Th(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(r.callback=function(){Th(e,t),typeof s!="function"&&(hn===null?hn=new Set([this]):hn.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),r}function Tg(e,t,r){var s=e.pingCache;if(s===null){s=e.pingCache=new v4;var o=new Set;s.set(t,o)}else o=s.get(t),o===void 0&&(o=new Set,s.set(t,o));o.has(r)||(o.add(r),e=R4.bind(null,e,t,r),t.then(e,e))}function Rg(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 _g(e,t,r,s,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Ni(-1,1),t.tag=2,un(r,t,1))),r.lanes|=1),e)}var y4=Fi.ReactCurrentOwner,lr=!1;function Qt(e,t,r,s){t.child=e===null?qx(t,null,r,s):Ws(t,e.child,r,s)}function Mg(e,t,r,s,o){r=r.render;var c=t.ref;return zs(t,o),s=bp(e,t,r,s,c,o),r=wp(),e!==null&&!lr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Mi(e,t,o)):(ht&&r&&lp(t),t.flags|=1,Qt(e,t,s,o),t.child)}function Og(e,t,r,s,o){if(e===null){var c=r.type;return typeof c=="function"&&!Tp(c)&&c.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=c,yv(e,t,c,s,o)):(e=Fl(r.type,null,s,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!(e.lanes&o)){var p=c.memoizedProps;if(r=r.compare,r=r!==null?r:io,r(p,s)&&e.ref===t.ref)return Mi(e,t,o)}return t.flags|=1,e=pn(c,s),e.ref=t.ref,e.return=t,t.child=e}function yv(e,t,r,s,o){if(e!==null){var c=e.memoizedProps;if(io(c,s)&&e.ref===t.ref)if(lr=!1,t.pendingProps=s=c,(e.lanes&o)!==0)e.flags&131072&&(lr=!0);else return t.lanes=e.lanes,Mi(e,t,o)}return Rh(e,t,r,s,o)}function bv(e,t,r){var s=t.pendingProps,o=s.children,c=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},lt(Ls,fr),fr|=r;else{if(!(r&1073741824))return e=c!==null?c.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,lt(Ls,fr),fr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=c!==null?c.baseLanes:r,lt(Ls,fr),fr|=s}else c!==null?(s=c.baseLanes|r,t.memoizedState=null):s=r,lt(Ls,fr),fr|=s;return Qt(e,t,o,r),t.child}function wv(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Rh(e,t,r,s,o){var c=dr(r)?qn:Ut.current;return c=Bs(t,c),zs(t,o),r=bp(e,t,r,s,c,o),s=wp(),e!==null&&!lr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Mi(e,t,o)):(ht&&s&&lp(t),t.flags|=1,Qt(e,t,r,o),t.child)}function Ig(e,t,r,s,o){if(dr(r)){var c=!0;uc(t)}else c=!1;if(zs(t,o),t.stateNode===null)Ol(e,t),Gx(t,r,s),Ph(t,r,s,o),s=!0;else if(e===null){var p=t.stateNode,v=t.memoizedProps;p.props=v;var C=p.context,A=r.contextType;typeof A=="object"&&A!==null?A=Rr(A):(A=dr(r)?qn:Ut.current,A=Bs(t,A));var E=r.getDerivedStateFromProps,P=typeof E=="function"||typeof p.getSnapshotBeforeUpdate=="function";P||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==s||C!==A)&&Ng(t,p,s,A),Gi=!1;var B=t.memoizedState;p.state=B,mc(t,s,p,o),C=t.memoizedState,v!==s||B!==C||cr.current||Gi?(typeof E=="function"&&(Lh(t,r,E,s),C=t.memoizedState),(v=Gi||jg(t,r,v,s,B,C,A))?(P||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=C),p.props=s,p.state=C,p.context=A,s=v):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{p=t.stateNode,Yx(e,t),v=t.memoizedProps,A=t.type===t.elementType?v:zr(t.type,v),p.props=A,P=t.pendingProps,B=p.context,C=r.contextType,typeof C=="object"&&C!==null?C=Rr(C):(C=dr(r)?qn:Ut.current,C=Bs(t,C));var M=r.getDerivedStateFromProps;(E=typeof M=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==P||B!==C)&&Ng(t,p,s,C),Gi=!1,B=t.memoizedState,p.state=B,mc(t,s,p,o);var H=t.memoizedState;v!==P||B!==H||cr.current||Gi?(typeof M=="function"&&(Lh(t,r,M,s),H=t.memoizedState),(A=Gi||jg(t,r,A,s,B,H,C)||!1)?(E||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(s,H,C),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(s,H,C)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=H),p.props=s,p.state=H,p.context=C,s=A):(typeof p.componentDidUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),s=!1)}return _h(e,t,r,s,c,o)}function _h(e,t,r,s,o,c){wv(e,t);var p=(t.flags&128)!==0;if(!s&&!p)return o&&wg(t,r,!1),Mi(e,t,c);s=t.stateNode,y4.current=t;var v=p&&typeof r.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&p?(t.child=Ws(t,e.child,null,c),t.child=Ws(t,null,v,c)):Qt(e,t,v,c),t.memoizedState=s.state,o&&wg(t,r,!0),t.child}function kv(e){var t=e.stateNode;t.pendingContext?bg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&bg(e,t.context,!1),mp(e,t.containerInfo)}function zg(e,t,r,s,o){return Vs(),dp(o),t.flags|=256,Qt(e,t,r,s),t.child}var Mh={dehydrated:null,treeContext:null,retryLane:0};function Oh(e){return{baseLanes:e,cachePool:null,transitions:null}}function Cv(e,t,r){var s=t.pendingProps,o=pt.current,c=!1,p=(t.flags&128)!==0,v;if((v=p)||(v=e!==null&&e.memoizedState===null?!1:(o&2)!==0),v?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),lt(pt,o&1),e===null)return Nh(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):(p=s.children,e=s.fallback,c?(s=t.mode,c=t.child,p={mode:"hidden",children:p},!(s&1)&&c!==null?(c.childLanes=0,c.pendingProps=p):c=cd(p,s,0,null),e=$n(e,s,r,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=Oh(r),t.memoizedState=Mh,e):Sp(t,p));if(o=e.memoizedState,o!==null&&(v=o.dehydrated,v!==null))return b4(e,t,p,s,v,o,r);if(c){c=s.fallback,p=t.mode,o=e.child,v=o.sibling;var C={mode:"hidden",children:s.children};return!(p&1)&&t.child!==o?(s=t.child,s.childLanes=0,s.pendingProps=C,t.deletions=null):(s=pn(o,C),s.subtreeFlags=o.subtreeFlags&14680064),v!==null?c=pn(v,c):(c=$n(c,p,r,null),c.flags|=2),c.return=t,s.return=t,s.sibling=c,t.child=s,s=c,c=t.child,p=e.child.memoizedState,p=p===null?Oh(r):{baseLanes:p.baseLanes|r,cachePool:null,transitions:p.transitions},c.memoizedState=p,c.childLanes=e.childLanes&~r,t.memoizedState=Mh,s}return c=e.child,e=c.sibling,s=pn(c,{mode:"visible",children:s.children}),!(t.mode&1)&&(s.lanes=r),s.return=t,s.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=s,t.memoizedState=null,s}function Sp(e,t){return t=cd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function pl(e,t,r,s){return s!==null&&dp(s),Ws(t,e.child,null,r),e=Sp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function b4(e,t,r,s,o,c,p){if(r)return t.flags&256?(t.flags&=-257,s=vu(Error(ue(422))),pl(e,t,p,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=s.fallback,o=t.mode,s=cd({mode:"visible",children:s.children},o,0,null),c=$n(c,o,p,null),c.flags|=2,s.return=t,c.return=t,s.sibling=c,t.child=s,t.mode&1&&Ws(t,e.child,null,p),t.child.memoizedState=Oh(p),t.memoizedState=Mh,c);if(!(t.mode&1))return pl(e,t,p,null);if(o.data==="$!"){if(s=o.nextSibling&&o.nextSibling.dataset,s)var v=s.dgst;return s=v,c=Error(ue(419)),s=vu(c,s,void 0),pl(e,t,p,s)}if(v=(p&e.childLanes)!==0,lr||v){if(s=Mt,s!==null){switch(p&-p){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|p)?0:o,o!==0&&o!==c.retryLane&&(c.retryLane=o,_i(e,o),Yr(s,e,o,-1))}return Pp(),s=vu(Error(ue(421))),pl(e,t,p,s)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=_4.bind(null,e),o._reactRetry=t,null):(e=c.treeContext,pr=dn(o.nextSibling),gr=t,ht=!0,Hr=null,e!==null&&(Ar[jr++]=Ai,Ar[jr++]=ji,Ar[jr++]=Qn,Ai=e.id,ji=e.overflow,Qn=t),t=Sp(t,s.children),t.flags|=4096,t)}function Fg(e,t,r){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Eh(e.return,t,r)}function yu(e,t,r,s,o){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:r,tailMode:o}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=s,c.tail=r,c.tailMode=o)}function Sv(e,t,r){var s=t.pendingProps,o=s.revealOrder,c=s.tail;if(Qt(e,t,s.children,r),s=pt.current,s&2)s=s&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&&Fg(e,r,t);else if(e.tag===19)Fg(e,r,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}s&=1}if(lt(pt,s),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&xc(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),yu(t,!1,o,r,c);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&xc(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}yu(t,!0,r,null,c);break;case"together":yu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ol(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Mi(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Jn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ue(153));if(t.child!==null){for(e=t.child,r=pn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=pn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function w4(e,t,r){switch(t.tag){case 3:kv(t),Vs();break;case 5:Qx(t);break;case 1:dr(t.type)&&uc(t);break;case 4:mp(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,o=t.memoizedProps.value;lt(pc,s._currentValue),s._currentValue=o;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(lt(pt,pt.current&1),t.flags|=128,null):r&t.child.childLanes?Cv(e,t,r):(lt(pt,pt.current&1),e=Mi(e,t,r),e!==null?e.sibling:null);lt(pt,pt.current&1);break;case 19:if(s=(r&t.childLanes)!==0,e.flags&128){if(s)return Sv(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),lt(pt,pt.current),s)break;return null;case 22:case 23:return t.lanes=0,bv(e,t,r)}return Mi(e,t,r)}var Av,Ih,jv,Nv;Av=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Ih=function(){};jv=function(e,t,r,s){var o=e.memoizedProps;if(o!==s){e=t.stateNode,Hn(si.current);var c=null;switch(r){case"input":o=nh(e,o),s=nh(e,s),c=[];break;case"select":o=mt({},o,{value:void 0}),s=mt({},s,{value:void 0}),c=[];break;case"textarea":o=oh(e,o),s=oh(e,s),c=[];break;default:typeof o.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=cc)}ch(r,s);var p;r=null;for(A in o)if(!s.hasOwnProperty(A)&&o.hasOwnProperty(A)&&o[A]!=null)if(A==="style"){var v=o[A];for(p in v)v.hasOwnProperty(p)&&(r||(r={}),r[p]="")}else A!=="dangerouslySetInnerHTML"&&A!=="children"&&A!=="suppressContentEditableWarning"&&A!=="suppressHydrationWarning"&&A!=="autoFocus"&&(qa.hasOwnProperty(A)?c||(c=[]):(c=c||[]).push(A,null));for(A in s){var C=s[A];if(v=o!=null?o[A]:void 0,s.hasOwnProperty(A)&&C!==v&&(C!=null||v!=null))if(A==="style")if(v){for(p in v)!v.hasOwnProperty(p)||C&&C.hasOwnProperty(p)||(r||(r={}),r[p]="");for(p in C)C.hasOwnProperty(p)&&v[p]!==C[p]&&(r||(r={}),r[p]=C[p])}else r||(c||(c=[]),c.push(A,r)),r=C;else A==="dangerouslySetInnerHTML"?(C=C?C.__html:void 0,v=v?v.__html:void 0,C!=null&&v!==C&&(c=c||[]).push(A,C)):A==="children"?typeof C!="string"&&typeof C!="number"||(c=c||[]).push(A,""+C):A!=="suppressContentEditableWarning"&&A!=="suppressHydrationWarning"&&(qa.hasOwnProperty(A)?(C!=null&&A==="onScroll"&&ct("scroll",e),c||v===C||(c=[])):(c=c||[]).push(A,C))}r&&(c=c||[]).push("style",r);var A=c;(t.updateQueue=A)&&(t.flags|=4)}};Nv=function(e,t,r,s){r!==s&&(t.flags|=4)};function va(e,t){if(!ht)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function $t(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,s=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,s|=o.subtreeFlags&14680064,s|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,s|=o.subtreeFlags,s|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=s,e.childLanes=r,t}function k4(e,t,r){var s=t.pendingProps;switch(cp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(t),null;case 1:return dr(t.type)&&dc(),$t(t),null;case 3:return s=t.stateNode,$s(),ut(cr),ut(Ut),vp(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(hl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Hr!==null&&($h(Hr),Hr=null))),Ih(e,t),$t(t),null;case 5:xp(t);var o=Hn(lo.current);if(r=t.type,e!==null&&t.stateNode!=null)jv(e,t,r,s,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(ue(166));return $t(t),null}if(e=Hn(si.current),hl(t)){s=t.stateNode,r=t.type;var c=t.memoizedProps;switch(s[ti]=t,s[ao]=c,e=(t.mode&1)!==0,r){case"dialog":ct("cancel",s),ct("close",s);break;case"iframe":case"object":case"embed":ct("load",s);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=p.createElement(r,{is:s.is}):(e=p.createElement(r),r==="select"&&(p=e,s.multiple?p.multiple=!0:s.size&&(p.size=s.size))):e=p.createElementNS(e,r),e[ti]=t,e[ao]=s,Av(e,t,!1,!1),t.stateNode=e;e:{switch(p=dh(r,s),r){case"dialog":ct("cancel",e),ct("close",e),o=s;break;case"iframe":case"object":case"embed":ct("load",e),o=s;break;case"video":case"audio":for(o=0;oYs&&(t.flags|=128,s=!0,va(c,!1),t.lanes=4194304)}else{if(!s)if(e=xc(p),e!==null){if(t.flags|=128,s=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),va(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!ht)return $t(t),null}else 2*yt()-c.renderingStartTime>Ys&&r!==1073741824&&(t.flags|=128,s=!0,va(c,!1),t.lanes=4194304);c.isBackwards?(p.sibling=t.child,t.child=p):(r=c.last,r!==null?r.sibling=p:t.child=p,c.last=p)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=yt(),t.sibling=null,r=pt.current,lt(pt,s?r&1|2:r&1),t):($t(t),null);case 22:case 23:return Lp(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?fr&1073741824&&($t(t),t.subtreeFlags&6&&(t.flags|=8192)):$t(t),null;case 24:return null;case 25:return null}throw Error(ue(156,t.tag))}function C4(e,t){switch(cp(t),t.tag){case 1:return dr(t.type)&&dc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $s(),ut(cr),ut(Ut),vp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xp(t),null;case 13:if(ut(pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));Vs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ut(pt),null;case 4:return $s(),null;case 10:return fp(t.type._context),null;case 22:case 23:return Lp(),null;case 24:return null;default:return null}}var gl=!1,Xt=!1,S4=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function Es(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(s){xt(e,t,s)}else r.current=null}function zh(e,t,r){try{r()}catch(s){xt(e,t,s)}}var Dg=!1;function A4(e,t){if(bh=ac,e=Tx(),op(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var o=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{r.nodeType,c.nodeType}catch{r=null;break e}var p=0,v=-1,C=-1,A=0,E=0,P=e,B=null;t:for(;;){for(var M;P!==r||o!==0&&P.nodeType!==3||(v=p+o),P!==c||s!==0&&P.nodeType!==3||(C=p+s),P.nodeType===3&&(p+=P.nodeValue.length),(M=P.firstChild)!==null;)B=P,P=M;for(;;){if(P===e)break t;if(B===r&&++A===o&&(v=p),B===c&&++E===s&&(C=p),(M=P.nextSibling)!==null)break;P=B,B=P.parentNode}P=M}r=v===-1||C===-1?null:{start:v,end:C}}else r=null}r=r||{start:0,end:0}}else r=null;for(wh={focusedElem:e,selectionRange:r},ac=!1,Ce=t;Ce!==null;)if(t=Ce,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ce=e;else for(;Ce!==null;){t=Ce;try{var H=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(H!==null){var D=H.memoizedProps,Z=H.memoizedState,W=t.stateNode,V=W.getSnapshotBeforeUpdate(t.elementType===t.type?D:zr(t.type,D),Z);W.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(K){xt(t,t.return,K)}if(e=t.sibling,e!==null){e.return=t.return,Ce=e;break}Ce=t.return}return H=Dg,Dg=!1,H}function $a(e,t,r){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var o=s=s.next;do{if((o.tag&e)===e){var c=o.destroy;o.destroy=void 0,c!==void 0&&zh(t,r,c)}o=o.next}while(o!==s)}}function od(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var s=r.create;r.destroy=s()}r=r.next}while(r!==t)}}function Fh(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Ev(e){var t=e.alternate;t!==null&&(e.alternate=null,Ev(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ti],delete t[ao],delete t[Sh],delete t[o4],delete t[l4])),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 Lv(e){return e.tag===5||e.tag===3||e.tag===4}function Hg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lv(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 Dh(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=cc));else if(s!==4&&(e=e.child,e!==null))for(Dh(e,t,r),e=e.sibling;e!==null;)Dh(e,t,r),e=e.sibling}function Hh(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Hh(e,t,r),e=e.sibling;e!==null;)Hh(e,t,r),e=e.sibling}var zt=null,Fr=!1;function Wi(e,t,r){for(r=r.child;r!==null;)Pv(e,t,r),r=r.sibling}function Pv(e,t,r){if(ni&&typeof ni.onCommitFiberUnmount=="function")try{ni.onCommitFiberUnmount(Jc,r)}catch{}switch(r.tag){case 5:Xt||Es(r,t);case 6:var s=zt,o=Fr;zt=null,Wi(e,t,r),zt=s,Fr=o,zt!==null&&(Fr?(e=zt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):zt.removeChild(r.stateNode));break;case 18:zt!==null&&(Fr?(e=zt,r=r.stateNode,e.nodeType===8?hu(e.parentNode,r):e.nodeType===1&&hu(e,r),to(e)):hu(zt,r.stateNode));break;case 4:s=zt,o=Fr,zt=r.stateNode.containerInfo,Fr=!0,Wi(e,t,r),zt=s,Fr=o;break;case 0:case 11:case 14:case 15:if(!Xt&&(s=r.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){o=s=s.next;do{var c=o,p=c.destroy;c=c.tag,p!==void 0&&(c&2||c&4)&&zh(r,t,p),o=o.next}while(o!==s)}Wi(e,t,r);break;case 1:if(!Xt&&(Es(r,t),s=r.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=r.memoizedProps,s.state=r.memoizedState,s.componentWillUnmount()}catch(v){xt(r,t,v)}Wi(e,t,r);break;case 21:Wi(e,t,r);break;case 22:r.mode&1?(Xt=(s=Xt)||r.memoizedState!==null,Wi(e,t,r),Xt=s):Wi(e,t,r);break;default:Wi(e,t,r)}}function Bg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new S4),t.forEach(function(s){var o=M4.bind(null,e,s);r.has(s)||(r.add(s),s.then(o,o))})}}function Ir(e,t){var r=t.deletions;if(r!==null)for(var s=0;so&&(o=p),s&=~c}if(s=o,s=yt()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*N4(s/1960))-s,10e?16:e,rn===null)var s=!1;else{if(e=rn,rn=null,kc=0,Ke&6)throw Error(ue(331));var o=Ke;for(Ke|=4,Ce=e.current;Ce!==null;){var c=Ce,p=c.child;if(Ce.flags&16){var v=c.deletions;if(v!==null){for(var C=0;Cyt()-Np?Wn(e,0):jp|=r),ur(e,t)}function Fv(e,t){t===0&&(e.mode&1?(t=al,al<<=1,!(al&130023424)&&(al=4194304)):t=1);var r=tr();e=_i(e,t),e!==null&&(_o(e,t,r),ur(e,r))}function _4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Fv(e,r)}function M4(e,t){var r=0;switch(e.tag){case 13:var s=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(ue(314))}s!==null&&s.delete(t),Fv(e,r)}var Dv;Dv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||cr.current)lr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return lr=!1,w4(e,t,r);lr=!!(e.flags&131072)}else lr=!1,ht&&t.flags&1048576&&Vx(t,fc,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Ol(e,t),e=t.pendingProps;var o=Bs(t,Ut.current);zs(t,r),o=bp(null,t,s,e,o,r);var c=wp();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dr(s)?(c=!0,uc(t)):c=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,gp(t),o.updater=sd,t.stateNode=o,o._reactInternals=t,Ph(t,s,e,r),t=_h(null,t,s,!0,c,r)):(t.tag=0,ht&&c&&lp(t),Qt(null,t,o,r),t=t.child),t;case 16:s=t.elementType;e:{switch(Ol(e,t),e=t.pendingProps,o=s._init,s=o(s._payload),t.type=s,o=t.tag=I4(s),e=zr(s,e),o){case 0:t=Rh(null,t,s,e,r);break e;case 1:t=Ig(null,t,s,e,r);break e;case 11:t=Mg(null,t,s,e,r);break e;case 14:t=Og(null,t,s,zr(s.type,e),r);break e}throw Error(ue(306,s,""))}return t;case 0:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:zr(s,o),Rh(e,t,s,o,r);case 1:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:zr(s,o),Ig(e,t,s,o,r);case 3:e:{if(kv(t),e===null)throw Error(ue(387));s=t.pendingProps,c=t.memoizedState,o=c.element,Yx(e,t),mc(t,s,null,r);var p=t.memoizedState;if(s=p.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:p.cache,pendingSuspenseBoundaries:p.pendingSuspenseBoundaries,transitions:p.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){o=Xs(Error(ue(423)),t),t=zg(e,t,s,r,o);break e}else if(s!==o){o=Xs(Error(ue(424)),t),t=zg(e,t,s,r,o);break e}else for(pr=dn(t.stateNode.containerInfo.firstChild),gr=t,ht=!0,Hr=null,r=qx(t,null,s,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Vs(),s===o){t=Mi(e,t,r);break e}Qt(e,t,s,r)}t=t.child}return t;case 5:return Qx(t),e===null&&Nh(t),s=t.type,o=t.pendingProps,c=e!==null?e.memoizedProps:null,p=o.children,kh(s,o)?p=null:c!==null&&kh(s,c)&&(t.flags|=32),wv(e,t),Qt(e,t,p,r),t.child;case 6:return e===null&&Nh(t),null;case 13:return Cv(e,t,r);case 4:return mp(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ws(t,null,s,r):Qt(e,t,s,r),t.child;case 11:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:zr(s,o),Mg(e,t,s,o,r);case 7:return Qt(e,t,t.pendingProps,r),t.child;case 8:return Qt(e,t,t.pendingProps.children,r),t.child;case 12:return Qt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(s=t.type._context,o=t.pendingProps,c=t.memoizedProps,p=o.value,lt(pc,s._currentValue),s._currentValue=p,c!==null)if(Zr(c.value,p)){if(c.children===o.children&&!cr.current){t=Mi(e,t,r);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var v=c.dependencies;if(v!==null){p=c.child;for(var C=v.firstContext;C!==null;){if(C.context===s){if(c.tag===1){C=Ni(-1,r&-r),C.tag=2;var A=c.updateQueue;if(A!==null){A=A.shared;var E=A.pending;E===null?C.next=C:(C.next=E.next,E.next=C),A.pending=C}}c.lanes|=r,C=c.alternate,C!==null&&(C.lanes|=r),Eh(c.return,r,t),v.lanes|=r;break}C=C.next}}else if(c.tag===10)p=c.type===t.type?null:c.child;else if(c.tag===18){if(p=c.return,p===null)throw Error(ue(341));p.lanes|=r,v=p.alternate,v!==null&&(v.lanes|=r),Eh(p,r,t),p=c.sibling}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===t){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}Qt(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,s=t.pendingProps.children,zs(t,r),o=Rr(o),s=s(o),t.flags|=1,Qt(e,t,s,r),t.child;case 14:return s=t.type,o=zr(s,t.pendingProps),o=zr(s.type,o),Og(e,t,s,o,r);case 15:return yv(e,t,t.type,t.pendingProps,r);case 17:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:zr(s,o),Ol(e,t),t.tag=1,dr(s)?(e=!0,uc(t)):e=!1,zs(t,r),Gx(t,s,o),Ph(t,s,o,r),_h(null,t,s,!0,e,r);case 19:return Sv(e,t,r);case 22:return bv(e,t,r)}throw Error(ue(156,t.tag))};function Hv(e,t){return hx(e,t)}function O4(e,t,r,s){this.tag=e,this.key=r,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Er(e,t,r,s){return new O4(e,t,r,s)}function Tp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function I4(e){if(typeof e=="function")return Tp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qf)return 11;if(e===Qf)return 14}return 2}function pn(e,t){var r=e.alternate;return r===null?(r=Er(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Fl(e,t,r,s,o,c){var p=2;if(s=e,typeof e=="function")Tp(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case ys:return $n(r.children,o,c,t);case Zf:p=8,o|=8;break;case eh:return e=Er(12,r,t,o|2),e.elementType=eh,e.lanes=c,e;case th:return e=Er(13,r,t,o),e.elementType=th,e.lanes=c,e;case rh:return e=Er(19,r,t,o),e.elementType=rh,e.lanes=c,e;case Z0:return cd(r,o,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U0:p=10;break e;case G0:p=9;break e;case qf:p=11;break e;case Qf:p=14;break e;case Ui:p=16,s=null;break e}throw Error(ue(130,e==null?e:typeof e,""))}return t=Er(p,r,t,o),t.elementType=e,t.type=s,t.lanes=c,t}function $n(e,t,r,s){return e=Er(7,e,s,t),e.lanes=r,e}function cd(e,t,r,s){return e=Er(22,e,s,t),e.elementType=Z0,e.lanes=r,e.stateNode={isHidden:!1},e}function bu(e,t,r){return e=Er(6,e,null,t),e.lanes=r,e}function wu(e,t,r){return t=Er(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function z4(e,t,r,s,o){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=tu(0),this.expirationTimes=tu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tu(0),this.identifierPrefix=s,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Rp(e,t,r,s,o,c,p,v,C){return e=new z4(e,t,r,v,C),t===1?(t=1,c===!0&&(t|=8)):t=0,c=Er(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:s,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},gp(c),e}function F4(e,t,r){var s=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($v)}catch(e){console.error(e)}}$v(),V0.exports=xr;var Xv=V0.exports,Zg=Xv;Ku.createRoot=Zg.createRoot,Ku.hydrateRoot=Zg.hydrateRoot;class zo{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const r={listener:t};return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const po=typeof window>"u"||"Deno"in window;function Cr(){}function W4(e,t){return typeof e=="function"?e(t):e}function Xh(e){return typeof e=="number"&&e>=0&&e!==1/0}function Yv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _a(e,t,r){return pd(e)?typeof t=="function"?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Zi(e,t,r){return pd(e)?[{...t,queryKey:e},r]:[e||{},t]}function qg(e,t){const{type:r="all",exact:s,fetchStatus:o,predicate:c,queryKey:p,stale:v}=e;if(pd(p)){if(s){if(t.queryHash!==Ip(p,t.options))return!1}else if(!Ac(t.queryKey,p))return!1}if(r!=="all"){const C=t.isActive();if(r==="active"&&!C||r==="inactive"&&C)return!1}return!(typeof v=="boolean"&&t.isStale()!==v||typeof o<"u"&&o!==t.state.fetchStatus||c&&!c(t))}function Qg(e,t){const{exact:r,fetching:s,predicate:o,mutationKey:c}=e;if(pd(c)){if(!t.options.mutationKey)return!1;if(r){if(nn(t.options.mutationKey)!==nn(c))return!1}else if(!Ac(t.options.mutationKey,c))return!1}return!(typeof s=="boolean"&&t.state.status==="loading"!==s||o&&!o(t))}function Ip(e,t){return((t==null?void 0:t.queryKeyHashFn)||nn)(e)}function nn(e){return JSON.stringify(e,(t,r)=>Uh(r)?Object.keys(r).sort().reduce((s,o)=>(s[o]=r[o],s),{}):r)}function Ac(e,t){return Uv(e,t)}function Uv(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!Uv(e[r],t[r])):!1}function Gv(e,t){if(e===t)return e;const r=Kg(e)&&Kg(t);if(r||Uh(e)&&Uh(t)){const s=r?e.length:Object.keys(e).length,o=r?t:Object.keys(t),c=o.length,p=r?[]:{};let v=0;for(let C=0;C"u")return!0;const r=t.prototype;return!(!Jg(r)||!r.hasOwnProperty("isPrototypeOf"))}function Jg(e){return Object.prototype.toString.call(e)==="[object Object]"}function pd(e){return Array.isArray(e)}function Zv(e){return new Promise(t=>{setTimeout(t,e)})}function em(e){Zv(0).then(e)}function $4(){if(typeof AbortController=="function")return new AbortController}function Gh(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Gv(e,t):t}class X4 extends zo{constructor(){super(),this.setup=t=>{if(!po&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const jc=new X4,tm=["online","offline"];class Y4 extends zo{constructor(){super(),this.setup=t=>{if(!po&&window.addEventListener){const r=()=>t();return tm.forEach(s=>{window.addEventListener(s,r,!1)}),()=>{tm.forEach(s=>{window.removeEventListener(s,r)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(s=>{typeof s=="boolean"?this.setOnline(s):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Nc=new Y4;function U4(e){return Math.min(1e3*2**e,3e4)}function gd(e){return(e??"online")==="online"?Nc.isOnline():!0}class qv{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Dl(e){return e instanceof qv}function Qv(e){let t=!1,r=0,s=!1,o,c,p;const v=new Promise((Z,W)=>{c=Z,p=W}),C=Z=>{s||(M(new qv(Z)),e.abort==null||e.abort())},A=()=>{t=!0},E=()=>{t=!1},P=()=>!jc.isFocused()||e.networkMode!=="always"&&!Nc.isOnline(),B=Z=>{s||(s=!0,e.onSuccess==null||e.onSuccess(Z),o==null||o(),c(Z))},M=Z=>{s||(s=!0,e.onError==null||e.onError(Z),o==null||o(),p(Z))},H=()=>new Promise(Z=>{o=W=>{const V=s||!P();return V&&Z(W),V},e.onPause==null||e.onPause()}).then(()=>{o=void 0,s||e.onContinue==null||e.onContinue()}),D=()=>{if(s)return;let Z;try{Z=e.fn()}catch(W){Z=Promise.reject(W)}Promise.resolve(Z).then(B).catch(W=>{var V,_;if(s)return;const K=(V=e.retry)!=null?V:3,ee=(_=e.retryDelay)!=null?_:U4,X=typeof ee=="function"?ee(r,W):ee,Q=K===!0||typeof K=="number"&&r{if(P())return H()}).then(()=>{t?M(W):D()})})};return gd(e.networkMode)?D():H().then(D),{promise:v,cancel:C,continue:()=>(o==null?void 0:o())?v:Promise.resolve(),cancelRetry:A,continueRetry:E}}const zp=console;function G4(){let e=[],t=0,r=E=>{E()},s=E=>{E()};const o=E=>{let P;t++;try{P=E()}finally{t--,t||v()}return P},c=E=>{t?e.push(E):em(()=>{r(E)})},p=E=>(...P)=>{c(()=>{E(...P)})},v=()=>{const E=e;e=[],E.length&&em(()=>{s(()=>{E.forEach(P=>{r(P)})})})};return{batch:o,batchCalls:p,schedule:c,setNotifyFunction:E=>{r=E},setBatchNotifyFunction:E=>{s=E}}}const Ct=G4();class Kv{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Xh(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(po?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Z4 extends Kv{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||zp,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||q4(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,r){const s=Gh(this.state.data,t,this.options);return this.dispatch({data:s,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),s}setState(t,r){this.dispatch({type:"setState",state:t,setStateOptions:r})}cancel(t){var r;const s=this.promise;return(r=this.retryer)==null||r.cancel(t),s?s.then(Cr).catch(Cr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Yv(this.state.dataUpdatedAt,t)}onFocus(){var t;const r=this.observers.find(s=>s.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const r=this.observers.find(s=>s.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,r){var s,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var c;return(c=this.retryer)==null||c.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const M=this.observers.find(H=>H.options.queryFn);M&&this.setOptions(M.options)}const p=$4(),v={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},C=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>{if(p)return this.abortSignalConsumed=!0,p.signal}})};C(v);const A=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(v)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),E={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:A};if(C(E),(s=this.options.behavior)==null||s.onFetch(E),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=E.fetchOptions)==null?void 0:o.meta)){var P;this.dispatch({type:"fetch",meta:(P=E.fetchOptions)==null?void 0:P.meta})}const B=M=>{if(Dl(M)&&M.silent||this.dispatch({type:"error",error:M}),!Dl(M)){var H,D,Z,W;(H=(D=this.cache.config).onError)==null||H.call(D,M,this),(Z=(W=this.cache.config).onSettled)==null||Z.call(W,this.state.data,M,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Qv({fn:E.fetchFn,abort:p==null?void 0:p.abort.bind(p),onSuccess:M=>{var H,D,Z,W;if(typeof M>"u"){B(new Error(this.queryHash+" data is undefined"));return}this.setData(M),(H=(D=this.cache.config).onSuccess)==null||H.call(D,M,this),(Z=(W=this.cache.config).onSettled)==null||Z.call(W,M,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:B,onFail:(M,H)=>{this.dispatch({type:"failed",failureCount:M,error:H})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:E.options.retry,retryDelay:E.options.retryDelay,networkMode:E.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const r=s=>{var o,c;switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:gd(this.options.networkMode)?"fetching":"paused",...!s.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...s,data:t.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:(c=t.dataUpdatedAt)!=null?c:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const p=t.error;return Dl(p)&&p.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...s,error:p,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:p,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=r(this.state),Ct.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function q4(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t<"u",s=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class Q4 extends zo{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,r,s){var o;const c=r.queryKey,p=(o=r.queryHash)!=null?o:Ip(c,r);let v=this.get(p);return v||(v=new Z4({cache:this,logger:t.getLogger(),queryKey:c,queryHash:p,options:t.defaultQueryOptions(r),state:s,defaultOptions:t.getQueryDefaults(c)}),this.add(v)),v}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const r=this.queriesMap[t.queryHash];r&&(t.destroy(),this.queries=this.queries.filter(s=>s!==t),r===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Ct.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,r){const[s]=Zi(t,r);return typeof s.exact>"u"&&(s.exact=!0),this.queries.find(o=>qg(s,o))}findAll(t,r){const[s]=Zi(t,r);return Object.keys(s).length>0?this.queries.filter(o=>qg(s,o)):this.queries}notify(t){Ct.batch(()=>{this.listeners.forEach(({listener:r})=>{r(t)})})}onFocus(){Ct.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Ct.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class K4 extends Kv{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||zp,this.observers=[],this.state=t.state||J4(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(r=>r!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,r;return(t=(r=this.retryer)==null?void 0:r.continue())!=null?t:this.execute()}async execute(){const t=()=>{var Q;return this.retryer=Qv({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(J,he)=>{this.dispatch({type:"failed",failureCount:J,error:he})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(Q=this.options.retry)!=null?Q:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var s,o,c,p,v,C,A,E;if(!r){var P,B,M,H;this.dispatch({type:"loading",variables:this.options.variables}),await((P=(B=this.mutationCache.config).onMutate)==null?void 0:P.call(B,this.state.variables,this));const J=await((M=(H=this.options).onMutate)==null?void 0:M.call(H,this.state.variables));J!==this.state.context&&this.dispatch({type:"loading",context:J,variables:this.state.variables})}const Q=await t();return await((s=(o=this.mutationCache.config).onSuccess)==null?void 0:s.call(o,Q,this.state.variables,this.state.context,this)),await((c=(p=this.options).onSuccess)==null?void 0:c.call(p,Q,this.state.variables,this.state.context)),await((v=(C=this.mutationCache.config).onSettled)==null?void 0:v.call(C,Q,null,this.state.variables,this.state.context,this)),await((A=(E=this.options).onSettled)==null?void 0:A.call(E,Q,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:Q}),Q}catch(Q){try{var D,Z,W,V,_,K,ee,X;throw await((D=(Z=this.mutationCache.config).onError)==null?void 0:D.call(Z,Q,this.state.variables,this.state.context,this)),await((W=(V=this.options).onError)==null?void 0:W.call(V,Q,this.state.variables,this.state.context)),await((_=(K=this.mutationCache.config).onSettled)==null?void 0:_.call(K,void 0,Q,this.state.variables,this.state.context,this)),await((ee=(X=this.options).onSettled)==null?void 0:ee.call(X,void 0,Q,this.state.variables,this.state.context)),Q}finally{this.dispatch({type:"error",error:Q})}}}dispatch(t){const r=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"loading":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!gd(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...s,...t.state}}};this.state=r(this.state),Ct.batch(()=>{this.observers.forEach(s=>{s.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function J4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ew extends zo{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,s){const o=new K4({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(r),state:s,defaultOptions:r.mutationKey?t.getMutationDefaults(r.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(r=>r!==t),this.notify({type:"removed",mutation:t})}clear(){Ct.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(r=>Qg(t,r))}findAll(t){return this.mutations.filter(r=>Qg(t,r))}notify(t){Ct.batch(()=>{this.listeners.forEach(({listener:r})=>{r(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const r=this.mutations.filter(s=>s.state.isPaused);return Ct.batch(()=>r.reduce((s,o)=>s.then(()=>o.continue().catch(Cr)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function tw(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,s,o,c,p;const v=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,C=(s=e.fetchOptions)==null||(o=s.meta)==null?void 0:o.fetchMore,A=C==null?void 0:C.pageParam,E=(C==null?void 0:C.direction)==="forward",P=(C==null?void 0:C.direction)==="backward",B=((c=e.state.data)==null?void 0:c.pages)||[],M=((p=e.state.data)==null?void 0:p.pageParams)||[];let H=M,D=!1;const Z=X=>{Object.defineProperty(X,"signal",{enumerable:!0,get:()=>{var Q;if((Q=e.signal)!=null&&Q.aborted)D=!0;else{var J;(J=e.signal)==null||J.addEventListener("abort",()=>{D=!0})}return e.signal}})},W=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),V=(X,Q,J,he)=>(H=he?[Q,...H]:[...H,Q],he?[J,...X]:[...X,J]),_=(X,Q,J,he)=>{if(D)return Promise.reject("Cancelled");if(typeof J>"u"&&!Q&&X.length)return Promise.resolve(X);const oe={queryKey:e.queryKey,pageParam:J,meta:e.options.meta};Z(oe);const Te=W(oe);return Promise.resolve(Te).then(Ee=>V(X,J,Ee,he))};let K;if(!B.length)K=_([]);else if(E){const X=typeof A<"u",Q=X?A:rm(e.options,B);K=_(B,X,Q)}else if(P){const X=typeof A<"u",Q=X?A:rw(e.options,B);K=_(B,X,Q,!0)}else{H=[];const X=typeof e.options.getNextPageParam>"u";K=(v&&B[0]?v(B[0],0,B):!0)?_([],X,M[0]):Promise.resolve(V([],M[0],B[0]));for(let J=1;J{if(v&&B[J]?v(B[J],J,B):!0){const Te=X?M[J]:rm(e.options,he);return _(he,X,Te)}return Promise.resolve(V(he,M[J],B[J]))})}return K.then(X=>({pages:X,pageParams:H}))}}}}function rm(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function rw(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class iw{constructor(t={}){this.queryCache=t.queryCache||new Q4,this.mutationCache=t.mutationCache||new ew,this.logger=t.logger||zp,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=jc.subscribe(()=>{jc.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Nc.subscribe(()=>{Nc.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,r;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(t,r){const[s]=Zi(t,r);return s.fetchStatus="fetching",this.queryCache.findAll(s).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,r){var s;return(s=this.queryCache.find(t,r))==null?void 0:s.state.data}ensureQueryData(t,r,s){const o=_a(t,r,s),c=this.getQueryData(o.queryKey);return c?Promise.resolve(c):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:r,state:s})=>{const o=s.data;return[r,o]})}setQueryData(t,r,s){const o=this.queryCache.find(t),c=o==null?void 0:o.state.data,p=W4(r,c);if(typeof p>"u")return;const v=_a(t),C=this.defaultQueryOptions(v);return this.queryCache.build(this,C).setData(p,{...s,manual:!0})}setQueriesData(t,r,s){return Ct.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,r,s)]))}getQueryState(t,r){var s;return(s=this.queryCache.find(t,r))==null?void 0:s.state}removeQueries(t,r){const[s]=Zi(t,r),o=this.queryCache;Ct.batch(()=>{o.findAll(s).forEach(c=>{o.remove(c)})})}resetQueries(t,r,s){const[o,c]=Zi(t,r,s),p=this.queryCache,v={type:"active",...o};return Ct.batch(()=>(p.findAll(o).forEach(C=>{C.reset()}),this.refetchQueries(v,c)))}cancelQueries(t,r,s){const[o,c={}]=Zi(t,r,s);typeof c.revert>"u"&&(c.revert=!0);const p=Ct.batch(()=>this.queryCache.findAll(o).map(v=>v.cancel(c)));return Promise.all(p).then(Cr).catch(Cr)}invalidateQueries(t,r,s){const[o,c]=Zi(t,r,s);return Ct.batch(()=>{var p,v;if(this.queryCache.findAll(o).forEach(A=>{A.invalidate()}),o.refetchType==="none")return Promise.resolve();const C={...o,type:(p=(v=o.refetchType)!=null?v:o.type)!=null?p:"active"};return this.refetchQueries(C,c)})}refetchQueries(t,r,s){const[o,c]=Zi(t,r,s),p=Ct.batch(()=>this.queryCache.findAll(o).filter(C=>!C.isDisabled()).map(C=>{var A;return C.fetch(void 0,{...c,cancelRefetch:(A=c==null?void 0:c.cancelRefetch)!=null?A:!0,meta:{refetchPage:o.refetchPage}})}));let v=Promise.all(p).then(Cr);return c!=null&&c.throwOnError||(v=v.catch(Cr)),v}fetchQuery(t,r,s){const o=_a(t,r,s),c=this.defaultQueryOptions(o);typeof c.retry>"u"&&(c.retry=!1);const p=this.queryCache.build(this,c);return p.isStaleByTime(c.staleTime)?p.fetch(c):Promise.resolve(p.state.data)}prefetchQuery(t,r,s){return this.fetchQuery(t,r,s).then(Cr).catch(Cr)}fetchInfiniteQuery(t,r,s){const o=_a(t,r,s);return o.behavior=tw(),this.fetchQuery(o)}prefetchInfiniteQuery(t,r,s){return this.fetchInfiniteQuery(t,r,s).then(Cr).catch(Cr)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,r){const s=this.queryDefaults.find(o=>nn(t)===nn(o.queryKey));s?s.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(s=>Ac(t,s.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(t,r){const s=this.mutationDefaults.find(o=>nn(t)===nn(o.mutationKey));s?s.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(s=>Ac(t,s.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const r={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=Ip(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class nw extends zo{constructor(t,r){super(),this.client=t,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),im(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zh(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zh(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,r){const s=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),Yh(s,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();const c=this.hasListeners();c&&nm(this.currentQuery,o,this.options,s)&&this.executeFetch(),this.updateResult(r),c&&(this.currentQuery!==o||this.options.enabled!==s.enabled||this.options.staleTime!==s.staleTime)&&this.updateStaleTimeout();const p=this.computeRefetchInterval();c&&(this.currentQuery!==o||this.options.enabled!==s.enabled||p!==this.currentRefetchInterval)&&this.updateRefetchInterval(p)}getOptimisticResult(t){const r=this.client.getQueryCache().build(this.client,t),s=this.createResult(r,t);return aw(this,s,t)&&(this.currentResult=s,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),s}getCurrentResult(){return this.currentResult}trackResult(t){const r={};return Object.keys(t).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(s),t[s])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...r}={}){return this.fetch({...r,meta:{refetchPage:t}})}fetchOptimistic(t){const r=this.client.defaultQueryOptions(t),s=this.client.getQueryCache().build(this.client,r);return s.isFetchingOptimistic=!0,s.fetch().then(()=>this.createResult(s,r))}fetch(t){var r;return this.executeFetch({...t,cancelRefetch:(r=t.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let r=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Cr)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),po||this.currentResult.isStale||!Xh(this.options.staleTime))return;const r=Yv(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(po||this.options.enabled===!1||!Xh(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||jc.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,r){const s=this.currentQuery,o=this.options,c=this.currentResult,p=this.currentResultState,v=this.currentResultOptions,C=t!==s,A=C?t.state:this.currentQueryInitialState,E=C?this.currentResult:this.previousQueryResult,{state:P}=t;let{dataUpdatedAt:B,error:M,errorUpdatedAt:H,fetchStatus:D,status:Z}=P,W=!1,V=!1,_;if(r._optimisticResults){const J=this.hasListeners(),he=!J&&im(t,r),oe=J&&nm(t,s,r,o);(he||oe)&&(D=gd(t.options.networkMode)?"fetching":"paused",B||(Z="loading")),r._optimisticResults==="isRestoring"&&(D="idle")}if(r.keepPreviousData&&!P.dataUpdatedAt&&E!=null&&E.isSuccess&&Z!=="error")_=E.data,B=E.dataUpdatedAt,Z=E.status,W=!0;else if(r.select&&typeof P.data<"u")if(c&&P.data===(p==null?void 0:p.data)&&r.select===this.selectFn)_=this.selectResult;else try{this.selectFn=r.select,_=r.select(P.data),_=Gh(c==null?void 0:c.data,_,r),this.selectResult=_,this.selectError=null}catch(J){this.selectError=J}else _=P.data;if(typeof r.placeholderData<"u"&&typeof _>"u"&&Z==="loading"){let J;if(c!=null&&c.isPlaceholderData&&r.placeholderData===(v==null?void 0:v.placeholderData))J=c.data;else if(J=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof J<"u")try{J=r.select(J),this.selectError=null}catch(he){this.selectError=he}typeof J<"u"&&(Z="success",_=Gh(c==null?void 0:c.data,J,r),V=!0)}this.selectError&&(M=this.selectError,_=this.selectResult,H=Date.now(),Z="error");const K=D==="fetching",ee=Z==="loading",X=Z==="error";return{status:Z,fetchStatus:D,isLoading:ee,isSuccess:Z==="success",isError:X,isInitialLoading:ee&&K,data:_,dataUpdatedAt:B,error:M,errorUpdatedAt:H,failureCount:P.fetchFailureCount,failureReason:P.fetchFailureReason,errorUpdateCount:P.errorUpdateCount,isFetched:P.dataUpdateCount>0||P.errorUpdateCount>0,isFetchedAfterMount:P.dataUpdateCount>A.dataUpdateCount||P.errorUpdateCount>A.errorUpdateCount,isFetching:K,isRefetching:K&&!ee,isLoadingError:X&&P.dataUpdatedAt===0,isPaused:D==="paused",isPlaceholderData:V,isPreviousData:W,isRefetchError:X&&P.dataUpdatedAt!==0,isStale:Fp(t,r),refetch:this.refetch,remove:this.remove}}updateResult(t){const r=this.currentResult,s=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Yh(s,r))return;this.currentResult=s;const o={cache:!0},c=()=>{if(!r)return!0;const{notifyOnChangeProps:p}=this.options,v=typeof p=="function"?p():p;if(v==="all"||!v&&!this.trackedProps.size)return!0;const C=new Set(v??this.trackedProps);return this.options.useErrorBoundary&&C.add("error"),Object.keys(this.currentResult).some(A=>{const E=A;return this.currentResult[E]!==r[E]&&C.has(E)})};(t==null?void 0:t.listeners)!==!1&&c()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const r={};t.type==="success"?r.onSuccess=!t.manual:t.type==="error"&&!Dl(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){Ct.batch(()=>{if(t.onSuccess){var r,s,o,c;(r=(s=this.options).onSuccess)==null||r.call(s,this.currentResult.data),(o=(c=this.options).onSettled)==null||o.call(c,this.currentResult.data,null)}else if(t.onError){var p,v,C,A;(p=(v=this.options).onError)==null||p.call(v,this.currentResult.error),(C=(A=this.options).onSettled)==null||C.call(A,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:E})=>{E(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function sw(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function im(e,t){return sw(e,t)||e.state.dataUpdatedAt>0&&Zh(e,t,t.refetchOnMount)}function Zh(e,t,r){if(t.enabled!==!1){const s=typeof r=="function"?r(e):r;return s==="always"||s!==!1&&Fp(e,t)}return!1}function nm(e,t,r,s){return r.enabled!==!1&&(e!==t||s.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&Fp(e,r)}function Fp(e,t){return e.isStaleByTime(t.staleTime)}function aw(e,t,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?t.isPlaceholderData:!Yh(e.getCurrentResult(),t)}var Jv={exports:{}},ey={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -45,37 +45,37 @@ Error generating stack: `+c.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Ys=G;function ow(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lw=typeof Object.is=="function"?Object.is:ow,cw=Ys.useState,dw=Ys.useEffect,uw=Ys.useLayoutEffect,hw=Ys.useDebugValue;function fw(e,t){var r=t(),s=cw({inst:{value:r,getSnapshot:t}}),o=s[0].inst,c=s[1];return uw(function(){o.value=r,o.getSnapshot=t,ku(o)&&c({inst:o})},[e,r,t]),dw(function(){return ku(o)&&c({inst:o}),e(function(){ku(o)&&c({inst:o})})},[e]),hw(r),r}function ku(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!lw(e,r)}catch{return!0}}function pw(e,t){return t()}var gw=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?pw:fw;ey.useSyncExternalStore=Ys.useSyncExternalStore!==void 0?Ys.useSyncExternalStore:gw;Jv.exports=ey;var mw=Jv.exports;const xw=mw.useSyncExternalStore,sm=G.createContext(void 0),ty=G.createContext(!1);function ry(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=sm),window.ReactQueryClientContext):sm)}const vw=({context:e}={})=>{const t=G.useContext(ry(e,G.useContext(ty)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},yw=({client:e,children:t,context:r,contextSharing:s=!1})=>{G.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=ry(r,s);return G.createElement(ty.Provider,{value:!r&&s},G.createElement(o.Provider,{value:e},t))},iy=G.createContext(!1),bw=()=>G.useContext(iy);iy.Provider;function ww(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const kw=G.createContext(ww()),Cw=()=>G.useContext(kw);function Sw(e,t){return typeof e=="function"?e(...t):!!e}const Aw=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},jw=e=>{G.useEffect(()=>{e.clearReset()},[e])},Nw=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:s})=>e.isError&&!t.isReset()&&!e.isFetching&&Sw(r,[e.error,s]),Ew=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Lw=(e,t)=>e.isLoading&&e.isFetching&&!t,Pw=(e,t,r)=>(e==null?void 0:e.suspense)&&Lw(t,r),Tw=(e,t,r)=>t.fetchOptimistic(e).then(({data:s})=>{e.onSuccess==null||e.onSuccess(s),e.onSettled==null||e.onSettled(s,null)}).catch(s=>{r.clearReset(),e.onError==null||e.onError(s),e.onSettled==null||e.onSettled(void 0,s)});function Rw(e,t){const r=vw({context:e.context}),s=bw(),o=Cw(),c=r.defaultQueryOptions(e);c._optimisticResults=s?"isRestoring":"optimistic",c.onError&&(c.onError=Ct.batchCalls(c.onError)),c.onSuccess&&(c.onSuccess=Ct.batchCalls(c.onSuccess)),c.onSettled&&(c.onSettled=Ct.batchCalls(c.onSettled)),Ew(c),Aw(c,o),jw(o);const[p]=G.useState(()=>new t(r,c)),v=p.getOptimisticResult(c);if(xw(G.useCallback(C=>{const A=s?()=>{}:p.subscribe(Ct.batchCalls(C));return p.updateResult(),A},[p,s]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),G.useEffect(()=>{p.setOptions(c,{listeners:!1})},[c,p]),Pw(c,v,s))throw Tw(c,p,o);if(Nw({result:v,errorResetBoundary:o,useErrorBoundary:c.useErrorBoundary,query:p.getCurrentQuery()}))throw v.error;return c.notifyOnChangeProps?v:p.trackResult(v)}function _w(e,t,r){const s=Ra(e,t,r);return Rw(s,nw)}function qh(e,t){return qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,o){return s.__proto__=o,s},qh(e,t)}function oi(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,qh(e,t)}var ny={exports:{}},Mw="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Ow=Mw,Iw=Ow;function sy(){}function ay(){}ay.resetWarningCache=sy;var zw=function(){function e(s,o,c,p,v,C){if(C!==Iw){var A=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 A.name="Invariant Violation",A}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ay,resetWarningCache:sy};return r.PropTypes=r,r};ny.exports=zw();var Fw=ny.exports;const am=Bf(Fw);function Bt(){return Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;L--){var P=s[L];P==="."?Cu(s,L):P===".."?(Cu(s,L),A++):A&&(Cu(s,L),A--)}if(!p)for(;A--;A)s.unshift("..");p&&s[0]!==""&&(!s[0]||!vl(s[0]))&&s.unshift("");var B=s.join("/");return v&&B.substr(-1)!=="/"&&(B+="/"),B}function om(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}function Hl(e,t){if(e===t)return!0;if(e==null||t==null)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(o,c){return Hl(o,t[c])});if(typeof e=="object"||typeof t=="object"){var r=om(e),s=om(t);return r!==e||s!==t?Hl(r,s):Object.keys(Object.assign({},e,t)).every(function(o){return Hl(e[o],t[o])})}return!1}var Hw="Invariant failed";function Nn(e,t){if(!e)throw new Error(Hw)}function Ya(e){return e.charAt(0)==="/"?e:"/"+e}function lm(e){return e.charAt(0)==="/"?e.substr(1):e}function Bw(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function oy(e,t){return Bw(e,t)?e.substr(t.length):e}function ly(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function Vw(e){var t=e||"/",r="",s="",o=t.indexOf("#");o!==-1&&(s=t.substr(o),t=t.substr(0,o));var c=t.indexOf("?");return c!==-1&&(r=t.substr(c),t=t.substr(0,c)),{pathname:t,search:r==="?"?"":r,hash:s==="#"?"":s}}function ar(e){var t=e.pathname,r=e.search,s=e.hash,o=t||"/";return r&&r!=="?"&&(o+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(o+=s.charAt(0)==="#"?s:"#"+s),o}function Jt(e,t,r,s){var o;typeof e=="string"?(o=Vw(e),o.state=t):(o=Bt({},e),o.pathname===void 0&&(o.pathname=""),o.search?o.search.charAt(0)!=="?"&&(o.search="?"+o.search):o.search="",o.hash?o.hash.charAt(0)!=="#"&&(o.hash="#"+o.hash):o.hash="",t!==void 0&&o.state===void 0&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(c){throw c instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):c}return r&&(o.key=r),s?o.pathname?o.pathname.charAt(0)!=="/"&&(o.pathname=Dw(o.pathname,s.pathname)):o.pathname=s.pathname:o.pathname||(o.pathname="/"),o}function Ww(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&Hl(e.state,t.state)}function Dp(){var e=null;function t(p){return e=p,function(){e===p&&(e=null)}}function r(p,v,C,A){if(e!=null){var L=typeof e=="function"?e(p,v):e;typeof L=="string"?typeof C=="function"?C(L,A):A(!0):A(L!==!1)}else A(!0)}var s=[];function o(p){var v=!0;function C(){v&&p.apply(void 0,arguments)}return s.push(C),function(){v=!1,s=s.filter(function(A){return A!==C})}}function c(){for(var p=arguments.length,v=new Array(p),C=0;CFe?Re.splice(Fe,Re.length-Fe,Te):Re.push(Te),L({action:ce,location:Te,index:Fe,entries:Re})}})}function Z(J,me){var ce="REPLACE",Te=Jt(J,me,P(),q.location);A.confirmTransitionTo(Te,ce,r,function(we){we&&(q.entries[q.index]=Te,L({action:ce,location:Te}))})}function W(J){var me=fm(q.index+J,0,q.entries.length-1),ce="POP",Te=q.entries[me];A.confirmTransitionTo(Te,ce,r,function(we){we?L({action:ce,location:Te,index:me}):L()})}function V(){W(-1)}function _(){W(1)}function K(J){var me=q.index+J;return me>=0&&me"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?pw:fw;ey.useSyncExternalStore=Us.useSyncExternalStore!==void 0?Us.useSyncExternalStore:gw;Jv.exports=ey;var mw=Jv.exports;const xw=mw.useSyncExternalStore,sm=G.createContext(void 0),ty=G.createContext(!1);function ry(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=sm),window.ReactQueryClientContext):sm)}const vw=({context:e}={})=>{const t=G.useContext(ry(e,G.useContext(ty)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},yw=({client:e,children:t,context:r,contextSharing:s=!1})=>{G.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=ry(r,s);return G.createElement(ty.Provider,{value:!r&&s},G.createElement(o.Provider,{value:e},t))},iy=G.createContext(!1),bw=()=>G.useContext(iy);iy.Provider;function ww(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const kw=G.createContext(ww()),Cw=()=>G.useContext(kw);function Sw(e,t){return typeof e=="function"?e(...t):!!e}const Aw=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},jw=e=>{G.useEffect(()=>{e.clearReset()},[e])},Nw=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:s})=>e.isError&&!t.isReset()&&!e.isFetching&&Sw(r,[e.error,s]),Ew=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Lw=(e,t)=>e.isLoading&&e.isFetching&&!t,Pw=(e,t,r)=>(e==null?void 0:e.suspense)&&Lw(t,r),Tw=(e,t,r)=>t.fetchOptimistic(e).then(({data:s})=>{e.onSuccess==null||e.onSuccess(s),e.onSettled==null||e.onSettled(s,null)}).catch(s=>{r.clearReset(),e.onError==null||e.onError(s),e.onSettled==null||e.onSettled(void 0,s)});function Rw(e,t){const r=vw({context:e.context}),s=bw(),o=Cw(),c=r.defaultQueryOptions(e);c._optimisticResults=s?"isRestoring":"optimistic",c.onError&&(c.onError=Ct.batchCalls(c.onError)),c.onSuccess&&(c.onSuccess=Ct.batchCalls(c.onSuccess)),c.onSettled&&(c.onSettled=Ct.batchCalls(c.onSettled)),Ew(c),Aw(c,o),jw(o);const[p]=G.useState(()=>new t(r,c)),v=p.getOptimisticResult(c);if(xw(G.useCallback(C=>{const A=s?()=>{}:p.subscribe(Ct.batchCalls(C));return p.updateResult(),A},[p,s]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),G.useEffect(()=>{p.setOptions(c,{listeners:!1})},[c,p]),Pw(c,v,s))throw Tw(c,p,o);if(Nw({result:v,errorResetBoundary:o,useErrorBoundary:c.useErrorBoundary,query:p.getCurrentQuery()}))throw v.error;return c.notifyOnChangeProps?v:p.trackResult(v)}function _w(e,t,r){const s=_a(e,t,r);return Rw(s,nw)}function qh(e,t){return qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,o){return s.__proto__=o,s},qh(e,t)}function oi(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,qh(e,t)}var ny={exports:{}},Mw="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Ow=Mw,Iw=Ow;function sy(){}function ay(){}ay.resetWarningCache=sy;var zw=function(){function e(s,o,c,p,v,C){if(C!==Iw){var A=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 A.name="Invariant Violation",A}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ay,resetWarningCache:sy};return r.PropTypes=r,r};ny.exports=zw();var Fw=ny.exports;const am=Bf(Fw);function Bt(){return Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;E--){var P=s[E];P==="."?Cu(s,E):P===".."?(Cu(s,E),A++):A&&(Cu(s,E),A--)}if(!p)for(;A--;A)s.unshift("..");p&&s[0]!==""&&(!s[0]||!vl(s[0]))&&s.unshift("");var B=s.join("/");return v&&B.substr(-1)!=="/"&&(B+="/"),B}function om(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}function Hl(e,t){if(e===t)return!0;if(e==null||t==null)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(o,c){return Hl(o,t[c])});if(typeof e=="object"||typeof t=="object"){var r=om(e),s=om(t);return r!==e||s!==t?Hl(r,s):Object.keys(Object.assign({},e,t)).every(function(o){return Hl(e[o],t[o])})}return!1}var Hw="Invariant failed";function Nn(e,t){if(!e)throw new Error(Hw)}function Ua(e){return e.charAt(0)==="/"?e:"/"+e}function lm(e){return e.charAt(0)==="/"?e.substr(1):e}function Bw(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function oy(e,t){return Bw(e,t)?e.substr(t.length):e}function ly(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function Vw(e){var t=e||"/",r="",s="",o=t.indexOf("#");o!==-1&&(s=t.substr(o),t=t.substr(0,o));var c=t.indexOf("?");return c!==-1&&(r=t.substr(c),t=t.substr(0,c)),{pathname:t,search:r==="?"?"":r,hash:s==="#"?"":s}}function ar(e){var t=e.pathname,r=e.search,s=e.hash,o=t||"/";return r&&r!=="?"&&(o+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(o+=s.charAt(0)==="#"?s:"#"+s),o}function Jt(e,t,r,s){var o;typeof e=="string"?(o=Vw(e),o.state=t):(o=Bt({},e),o.pathname===void 0&&(o.pathname=""),o.search?o.search.charAt(0)!=="?"&&(o.search="?"+o.search):o.search="",o.hash?o.hash.charAt(0)!=="#"&&(o.hash="#"+o.hash):o.hash="",t!==void 0&&o.state===void 0&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(c){throw c instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):c}return r&&(o.key=r),s?o.pathname?o.pathname.charAt(0)!=="/"&&(o.pathname=Dw(o.pathname,s.pathname)):o.pathname=s.pathname:o.pathname||(o.pathname="/"),o}function Ww(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&Hl(e.state,t.state)}function Dp(){var e=null;function t(p){return e=p,function(){e===p&&(e=null)}}function r(p,v,C,A){if(e!=null){var E=typeof e=="function"?e(p,v):e;typeof E=="string"?typeof C=="function"?C(E,A):A(!0):A(E!==!1)}else A(!0)}var s=[];function o(p){var v=!0;function C(){v&&p.apply(void 0,arguments)}return s.push(C),function(){v=!1,s=s.filter(function(A){return A!==C})}}function c(){for(var p=arguments.length,v=new Array(p),C=0;CFe?Re.splice(Fe,Re.length-Fe,Te):Re.push(Te),E({action:oe,location:Te,index:Fe,entries:Re})}})}function Z(J,he){var oe="REPLACE",Te=Jt(J,he,P(),Q.location);A.confirmTransitionTo(Te,oe,r,function(we){we&&(Q.entries[Q.index]=Te,E({action:oe,location:Te}))})}function W(J){var he=fm(Q.index+J,0,Q.entries.length-1),oe="POP",Te=Q.entries[he];A.confirmTransitionTo(Te,oe,r,function(we){we?E({action:oe,location:Te,index:he}):E()})}function V(){W(-1)}function _(){W(1)}function K(J){var he=Q.index+J;return he>=0&&he=0)&&(r[o]=e[o]);return r}var vy=p8,g8={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},m8={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yy={};yy[vy.ForwardRef]=g8;yy[vy.Memo]=m8;var Au=1073741823,pm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{};function x8(){var e="__global_unique_id__";return pm[e]=(pm[e]||0)+1}function v8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function y8(e){var t=[];return{on:function(s){t.push(s)},off:function(s){t=t.filter(function(o){return o!==s})},get:function(){return e},set:function(s,o){e=s,t.forEach(function(c){return c(e,o)})}}}function b8(e){return Array.isArray(e)?e[0]:e}function w8(e,t){var r,s,o="__create-react-context-"+x8()+"__",c=function(v){oi(C,v);function C(){for(var L,P=arguments.length,B=new Array(P),M=0;M"u"&&(Us=Zp);function _8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var M8=Us(function(e,t){var r=e.innerRef,s=e.navigate,o=e.onClick,c=jd(e,["innerRef","navigate","onClick"]),p=c.target,v=Bt({},c,{onClick:function(A){try{o&&o(A)}catch(L){throw A.preventDefault(),L}!A.defaultPrevented&&A.button===0&&(!p||p==="_self")&&!_8(A)&&(A.preventDefault(),s())}});return Zp!==Us?v.ref=t||r:v.ref=r,pe.createElement("a",v)}),rt=Us(function(e,t){var r=e.component,s=r===void 0?M8:r,o=e.replace,c=e.to,p=e.innerRef,v=jd(e,["component","replace","to","innerRef"]);return pe.createElement(vn.Consumer,null,function(C){C||Nn(!1);var A=C.history,L=Kh(Qh(c,C.location),C.location),P=L?A.createHref(L):"",B=Bt({},v,{href:P,navigate:function(){var H=Qh(c,C.location),D=ar(C.location)===ar(Kh(H)),Z=o||D?A.replace:A.push;Z(H)}});return Zp!==Us?B.ref=t||p:B.innerRef=p,pe.createElement(s,B)})}),Cy=function(t){return t},Lc=pe.forwardRef;typeof Lc>"u"&&(Lc=Cy);function O8(){for(var e=arguments.length,t=new Array(e),r=0;rtypeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,sa=()=>{const e=Object.create(null);return(t,r,...s)=>{const o=(c=>JSON.stringify(c,z8))(t);return o in e?e[o]:e[o]=r(t,...s)}},Xn=Symbol.for("sxs.internal"),qp=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),km=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:F8}=Object.prototype,Jh=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),D8=/\s+(?![^()]*\))/,hs=e=>t=>e(...typeof t=="string"?String(t).split(D8):[t]),Cm={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:hs((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:hs((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:hs((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:hs((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:hs((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:hs((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},Eu=/([\d.]+)([^]*)/,H8=(e,t)=>e.length?e.reduce((r,s)=>(r.push(...t.map(o=>o.includes("&")?o.replace(/&/g,/[ +>|~]/.test(s)&&/&.*&/.test(o)?`:is(${s})`:s):s+" "+o)),r),[]):t,B8=(e,t)=>e in V8&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(r,s,o,c)=>s+(o==="stretch"?`-moz-available${c};${Jh(e)}:${s}-webkit-fill-available`:`-moz-fit-content${c};${Jh(e)}:${s}fit-content`)+c):String(t),V8={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},Oi=e=>e?e+"-":"",Sy=(e,t,r)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(s,o,c,p,v)=>p=="$"==!!c?s:(o||p=="--"?"calc(":"")+"var(--"+(p==="$"?Oi(t)+(v.includes("$")?"":Oi(r))+v.replace(/\$/g,"-"):v)+")"+(o||p=="--"?"*"+(o||"")+(c||"1")+")":"")),W8=/\s*,\s*(?![^()]*\))/,$8=Object.prototype.toString,Ls=(e,t,r,s,o)=>{let c,p,v;const C=(A,L,P)=>{let B,M;const H=D=>{for(B in D){const V=B.charCodeAt(0)===64,_=V&&Array.isArray(D[B])?D[B]:[D[B]];for(M of _){const K=/[A-Z]/.test(W=B)?W:W.replace(/-[^]/g,X=>X[1].toUpperCase()),ee=typeof M=="object"&&M&&M.toString===$8&&(!s.utils[K]||!L.length);if(K in s.utils&&!ee){const X=s.utils[K];if(X!==p){p=X,H(X(M)),p=null;continue}}else if(K in Cm){const X=Cm[K];if(X!==v){v=X,H(X(M)),v=null;continue}}if(V&&(Z=B.slice(1)in s.media?"@media "+s.media[B.slice(1)]:B,B=Z.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(X,q,J,me,ce,Te)=>{const we=Eu.test(q),Ee=.0625*(we?-1:1),[Fe,Re]=we?[me,q]:[q,me];return"("+(J[0]==="="?"":J[0]===">"===we?"max-":"min-")+Fe+":"+(J[0]!=="="&&J.length===1?Re.replace(Eu,(qe,it,de)=>Number(it)+Ee*(J===">"?1:-1)+de):Re)+(ce?") and ("+(ce[0]===">"?"min-":"max-")+Fe+":"+(ce.length===1?Te.replace(Eu,(qe,it,de)=>Number(it)+Ee*(ce===">"?-1:1)+de):Te):"")+")"})),ee){const X=V?P.concat(B):[...P],q=V?[...L]:H8(L,B.split(W8));c!==void 0&&o(Sm(...c)),c=void 0,C(M,q,X)}else c===void 0&&(c=[[],L,P]),B=V||B.charCodeAt(0)!==36?B:`--${Oi(s.prefix)}${B.slice(1).replace(/\$/g,"-")}`,M=ee?M:typeof M=="number"?M&&K in X8?String(M)+"px":String(M):Sy(B8(K,M??""),s.prefix,s.themeMap[K]),c[0].push(`${V?`${B} `:`${Jh(B)}:`}${M}`)}}var Z,W};H(A),c!==void 0&&o(Sm(...c)),c=void 0};C(e,t,r)},Sm=(e,t,r)=>`${r.map(s=>`${s}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(r.length?r.length+1:0).join("}")}`,X8={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},Am=e=>String.fromCharCode(e+(e>25?39:97)),Yn=e=>(t=>{let r,s="";for(r=Math.abs(t);r>52;r=r/52|0)s=Am(r%52)+s;return Am(r%52)+s})(((t,r)=>{let s=r.length;for(;s;)t=33*t^r.charCodeAt(--s);return t})(5381,JSON.stringify(e))>>>0),_a=["themed","global","styled","onevar","resonevar","allvar","inline"],Y8=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},U8=e=>{let t;const r=()=>{const{cssRules:o}=t.sheet;return[].map.call(o,(c,p)=>{const{cssText:v}=c;let C="";if(v.startsWith("--sxs"))return"";if(o[p-1]&&(C=o[p-1].cssText).startsWith("--sxs")){if(!c.cssRules.length)return"";for(const A in t.rules)if(t.rules[A].group===c)return`--sxs{--sxs:${[...t.rules[A].cache].join(" ")}}${v}`;return c.cssRules.length?`${C}${v}`:""}return v}).join("")},s=()=>{if(t){const{rules:v,sheet:C}=t;if(!C.deleteRule){for(;Object(Object(C.cssRules)[0]).type===3;)C.cssRules.splice(0,1);C.cssRules=[]}for(const A in v)delete v[A]}const o=Object(e).styleSheets||[];for(const v of o)if(Y8(v)){for(let C=0,A=v.cssRules;A[C];++C){const L=Object(A[C]);if(L.type!==1)continue;const P=Object(A[C+1]);if(P.type!==4)continue;++C;const{cssText:B}=L;if(!B.startsWith("--sxs"))continue;const M=B.slice(14,-3).trim().split(/\s+/),H=_a[M[0]];H&&(t||(t={sheet:v,reset:s,rules:{},toString:r}),t.rules[H]={group:P,index:C,cache:new Set(M)})}if(t)break}if(!t){const v=(C,A)=>({type:A,cssRules:[],insertRule(L,P){this.cssRules.splice(P,0,v(L,{import:3,undefined:1}[(L.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return C==="@media{}"?`@media{${[].map.call(this.cssRules,L=>L.cssText).join("")}}`:C}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:v("","text/css"),rules:{},reset:s,toString:r}}const{sheet:c,rules:p}=t;for(let v=_a.length-1;v>=0;--v){const C=_a[v];if(!p[C]){const A=_a[v+1],L=p[A]?p[A].index:c.cssRules.length;c.insertRule("@media{}",L),c.insertRule(`--sxs{--sxs:${v}}`,L),p[C]={group:c.cssRules[L+1],index:L,cache:new Set([v])}}G8(p[C])}};return s(),t},G8=e=>{const t=e.group;let r=t.cssRules.length;e.apply=s=>{try{t.insertRule(s,r),++r}catch{}}},ba=Symbol(),Z8=sa(),jm=(e,t)=>Z8(e,()=>(...r)=>{let s={type:null,composers:new Set};for(const o of r)if(o!=null)if(o[Xn]){s.type==null&&(s.type=o[Xn].type);for(const c of o[Xn].composers)s.composers.add(c)}else o.constructor!==Object||o.$$typeof?s.type==null&&(s.type=o):s.composers.add(q8(o,e));return s.type==null&&(s.type="span"),s.composers.size||s.composers.add(["PJLV",{},[],[],{},[]]),Q8(e,s,t)}),q8=({variants:e,compoundVariants:t,defaultVariants:r,...s},o)=>{const c=`${Oi(o.prefix)}c-${Yn(s)}`,p=[],v=[],C=Object.create(null),A=[];for(const B in r)C[B]=String(r[B]);if(typeof e=="object"&&e)for(const B in e){L=C,P=B,F8.call(L,P)||(C[B]="undefined");const M=e[B];for(const H in M){const D={[B]:String(H)};String(H)==="undefined"&&A.push(B);const Z=M[H],W=[D,Z,!km(Z)];p.push(W)}}var L,P;if(typeof t=="object"&&t)for(const B of t){let{css:M,...H}=B;M=typeof M=="object"&&M||{};for(const Z in H)H[Z]=String(H[Z]);const D=[H,M,!km(M)];v.push(D)}return[c,s,p,v,C,A]},Q8=(e,t,r)=>{const[s,o,c,p]=K8(t.composers),v=typeof t.type=="function"||t.type.$$typeof?(P=>{function B(){for(let M=0;MB.rules[M]={apply:H=>B[ba].push([M,H])}),B})(r):null,C=(v||r).rules,A=`.${s}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,L=P=>{P=typeof P=="object"&&P||J8;const{css:B,...M}=P,H={};for(const W in c)if(delete M[W],W in P){let V=P[W];typeof V=="object"&&V?H[W]={"@initial":c[W],...V}:(V=String(V),H[W]=V!=="undefined"||p.has(W)?V:c[W])}else H[W]=c[W];const D=new Set([...o]);for(const[W,V,_,K]of t.composers){r.rules.styled.cache.has(W)||(r.rules.styled.cache.add(W),Ls(V,[`.${W}`],[],e,q=>{C.styled.apply(q)}));const ee=Nm(_,H,e.media),X=Nm(K,H,e.media,!0);for(const q of ee)if(q!==void 0)for(const[J,me,ce]of q){const Te=`${W}-${Yn(me)}-${J}`;D.add(Te);const we=(ce?r.rules.resonevar:r.rules.onevar).cache,Ee=ce?C.resonevar:C.onevar;we.has(Te)||(we.add(Te),Ls(me,[`.${Te}`],[],e,Fe=>{Ee.apply(Fe)}))}for(const q of X)if(q!==void 0)for(const[J,me]of q){const ce=`${W}-${Yn(me)}-${J}`;D.add(ce),r.rules.allvar.cache.has(ce)||(r.rules.allvar.cache.add(ce),Ls(me,[`.${ce}`],[],e,Te=>{C.allvar.apply(Te)}))}}if(typeof B=="object"&&B){const W=`${s}-i${Yn(B)}-css`;D.add(W),r.rules.inline.cache.has(W)||(r.rules.inline.cache.add(W),Ls(B,[`.${W}`],[],e,V=>{C.inline.apply(V)}))}for(const W of String(P.className||"").trim().split(/\s+/))W&&D.add(W);const Z=M.className=[...D].join(" ");return{type:t.type,className:Z,selector:A,props:M,toString:()=>Z,deferredInjector:v}};return qp(L,{className:s,selector:A,[Xn]:t,toString:()=>(r.rules.styled.cache.has(s)||L(),s)})},K8=e=>{let t="";const r=[],s={},o=[];for(const[c,,,,p,v]of e){t===""&&(t=c),r.push(c),o.push(...v);for(const C in p){const A=p[C];(s[C]===void 0||A!=="undefined"||v.includes(A))&&(s[C]=A)}}return[t,r,s,new Set(o)]},Nm=(e,t,r,s)=>{const o=[];e:for(let[c,p,v]of e){if(v)continue;let C,A=0,L=!1;for(C in c){const P=c[C];let B=t[C];if(B!==P){if(typeof B!="object"||!B)continue e;{let M,H,D=0;for(const Z in B){if(P===String(B[Z])){if(Z!=="@initial"){const W=Z.slice(1);(H=H||[]).push(W in r?r[W]:Z.replace(/^@media ?/,"")),L=!0}A+=D,M=!0}++D}if(H&&H.length&&(p={["@media "+H.join(", ")]:p}),!M)continue e}}}(o[A]=o[A]||[]).push([s?"cv":`${C}-${c[C]}`,p,L])}return o},J8={},e7=sa(),t7=(e,t)=>e7(e,()=>(...r)=>{const s=()=>{for(let o of r){o=typeof o=="object"&&o||{};let c=Yn(o);if(!t.rules.global.cache.has(c)){if(t.rules.global.cache.add(c),"@import"in o){let p=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let v of[].concat(o["@import"]))v=v.includes('"')||v.includes("'")?v:`"${v}"`,t.sheet.insertRule(`@import ${v};`,p++);delete o["@import"]}Ls(o,[],[],e,p=>{t.rules.global.apply(p)})}}return""};return qp(s,{toString:s})}),r7=sa(),i7=(e,t)=>r7(e,()=>r=>{const s=`${Oi(e.prefix)}k-${Yn(r)}`,o=()=>{if(!t.rules.global.cache.has(s)){t.rules.global.cache.add(s);const c=[];Ls(r,[],[],e,v=>c.push(v));const p=`@keyframes ${s}{${c.join("")}}`;t.rules.global.apply(p)}return s};return qp(o,{get name(){return o()},toString:o})}),n7=class{constructor(t,r,s,o){this.token=t==null?"":String(t),this.value=r==null?"":String(r),this.scale=s==null?"":String(s),this.prefix=o==null?"":String(o)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+Oi(this.prefix)+Oi(this.scale)+this.token}toString(){return this.computedValue}},s7=sa(),a7=(e,t)=>s7(e,()=>(r,s)=>{s=typeof r=="object"&&r||Object(s);const o=`.${r=(r=typeof r=="string"?r:"")||`${Oi(e.prefix)}t-${Yn(s)}`}`,c={},p=[];for(const C in s){c[C]={};for(const A in s[C]){const L=`--${Oi(e.prefix)}${C}-${A}`,P=Sy(String(s[C][A]),e.prefix,C);c[C][A]=new n7(A,P,C,e.prefix),p.push(`${L}:${P}`)}}const v=()=>{if(p.length&&!t.rules.themed.cache.has(r)){t.rules.themed.cache.add(r);const C=`${s===e.theme?":root,":""}.${r}{${p.join(";")}}`;t.rules.themed.apply(C)}return r};return{...c,get className(){return v()},selector:o,toString:v}}),o7=sa(),Em,l7=sa(),Qp=e=>{const t=(r=>{let s=!1;const o=o7(r,c=>{s=!0;const p="prefix"in(c=typeof c=="object"&&c||{})?String(c.prefix):"",v=typeof c.media=="object"&&c.media||{},C=typeof c.root=="object"?c.root||null:globalThis.document||null,A=typeof c.theme=="object"&&c.theme||{},L={prefix:p,media:v,theme:A,themeMap:typeof c.themeMap=="object"&&c.themeMap||{...I8},utils:typeof c.utils=="object"&&c.utils||{}},P=U8(C),B={css:jm(L,P),globalCss:t7(L,P),keyframes:i7(L,P),createTheme:a7(L,P),reset(){P.reset(),B.theme.toString()},theme:{},sheet:P,config:L,prefix:p,getCssText:P.toString,toString:P.toString};return String(B.theme=B.createTheme(A)),B});return s||o.reset(),o})(e);return t.styled=(({config:r,sheet:s})=>l7(r,()=>{const o=jm(r,s);return(...c)=>{const p=o(...c),v=p[Xn].type,C=pe.forwardRef((A,L)=>{const P=A&&A.as||v,{props:B,deferredInjector:M}=p(A);return delete B.as,B.ref=L,M?pe.createElement(pe.Fragment,null,pe.createElement(P,B),pe.createElement(M,null)):pe.createElement(P,B)});return C.className=p.className,C.displayName=`Styled.${v.displayName||v.name||v}`,C.selector=p.selector,C.toString=()=>p.selector,C[Xn]=p[Xn],C}}))(t),t},Ay=()=>Em||(Em=Qp()),jy=(...e)=>Ay().createTheme(...e),c7=(...e)=>Ay().css(...e);const{styled:bt,css:QL}=Qp({theme:{colors:{waspYellow:"#ffcc00",gray700:"#a1a5ab",gray600:"#d1d5db",gray500:"gainsboro",gray400:"#f0f0f0",red:"#FED7D7",darkRed:"#fa3838",green:"#C6F6D5",brand:"$waspYellow",brandAccent:"#ffdb46",errorBackground:"$red",errorText:"#2D3748",successBackground:"$green",successText:"#2D3748",submitButtonText:"black",formErrorText:"$darkRed"},fontSizes:{sm:"0.875rem"}}});var zo=e=>e.type==="checkbox",Ps=e=>e instanceof Date,Kt=e=>e==null;const Ny=e=>typeof e=="object";var At=e=>!Kt(e)&&!Array.isArray(e)&&Ny(e)&&!Ps(e),d7=e=>At(e)&&e.target?zo(e.target)?e.target.checked:e.target.value:e,u7=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,h7=(e,t)=>e.has(u7(t)),f7=e=>{const t=e.constructor&&e.constructor.prototype;return At(t)&&t.hasOwnProperty("isPrototypeOf")},Kp=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function kr(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Kp&&(e instanceof Blob||e instanceof FileList))&&(r||At(e)))if(t=r?[]:{},!r&&!f7(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=kr(e[s]));else return e;return t}var Fo=e=>Array.isArray(e)?e.filter(Boolean):[],vt=e=>e===void 0,Ne=(e,t,r)=>{if(!t||!At(e))return r;const s=Fo(t.split(/[,[\].]+?/)).reduce((o,c)=>Kt(o)?o:o[c],e);return vt(s)||s===e?vt(e[t])?r:e[t]:s},Ci=e=>typeof e=="boolean";const Lm={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Vr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},mi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};pe.createContext(null);var p7=(e,t,r,s=!0)=>{const o={defaultValues:t._defaultValues};for(const c in e)Object.defineProperty(o,c,{get:()=>{const p=c;return t._proxyFormState[p]!==Vr.all&&(t._proxyFormState[p]=!s||Vr.all),r&&(r[p]=!0),e[p]}});return o},Sr=e=>At(e)&&!Object.keys(e).length,g7=(e,t,r,s)=>{r(e);const{name:o,...c}=e;return Sr(c)||Object.keys(c).length>=Object.keys(t).length||Object.keys(c).find(p=>t[p]===(!s||Vr.all))},Lu=e=>Array.isArray(e)?e:[e];function m7(e){const t=pe.useRef(e);t.current=e,pe.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var ri=e=>typeof e=="string",x7=(e,t,r,s,o)=>ri(e)?(s&&t.watch.add(e),Ne(r,e,o)):Array.isArray(e)?e.map(c=>(s&&t.watch.add(c),Ne(r,c))):(s&&(t.watchAll=!0),r),Jp=e=>/^\w*$/.test(e),Ey=e=>Fo(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dt=(e,t,r)=>{let s=-1;const o=Jp(t)?[t]:Ey(t),c=o.length,p=c-1;for(;++st?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[s]:o||!0}}:{},Pm=e=>({isOnSubmit:!e||e===Vr.onSubmit,isOnBlur:e===Vr.onBlur,isOnChange:e===Vr.onChange,isOnAll:e===Vr.all,isOnTouch:e===Vr.onTouched}),Tm=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Ua=(e,t,r,s)=>{for(const o of r||Object.keys(e)){const c=Ne(e,o);if(c){const{_f:p,...v}=c;if(p){if(p.refs&&p.refs[0]&&t(p.refs[0],o)&&!s)break;if(p.ref&&t(p.ref,p.name)&&!s)break;Ua(v,t)}else At(v)&&Ua(v,t)}}};var y7=(e,t,r)=>{const s=Fo(Ne(e,r));return dt(s,"root",t[r]),dt(e,r,s),e},e1=e=>e.type==="file",sn=e=>typeof e=="function",Pc=e=>{if(!Kp)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Vl=e=>ri(e),t1=e=>e.type==="radio",Tc=e=>e instanceof RegExp;const Rm={value:!1,isValid:!1},_m={value:!0,isValid:!0};var Ly=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!vt(e[0].attributes.value)?vt(e[0].value)||e[0].value===""?_m:{value:e[0].value,isValid:!0}:_m:Rm}return Rm};const Mm={isValid:!1,value:null};var Py=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Mm):Mm;function Om(e,t,r="validate"){if(Vl(e)||Array.isArray(e)&&e.every(Vl)||Ci(e)&&!e)return{type:r,message:Vl(e)?e:"",ref:t}}var fs=e=>At(e)&&!Tc(e)?e:{value:e,message:""},Im=async(e,t,r,s,o)=>{const{ref:c,refs:p,required:v,maxLength:C,minLength:A,min:L,max:P,pattern:B,validate:M,name:H,valueAsNumber:D,mount:Z,disabled:W}=e._f,V=Ne(t,H);if(!Z||W)return{};const _=p?p[0]:c,K=we=>{s&&_.reportValidity&&(_.setCustomValidity(Ci(we)?"":we||""),_.reportValidity())},ee={},X=t1(c),q=zo(c),J=X||q,me=(D||e1(c))&&vt(c.value)&&vt(V)||Pc(c)&&c.value===""||V===""||Array.isArray(V)&&!V.length,ce=v7.bind(null,H,r,ee),Te=(we,Ee,Fe,Re=mi.maxLength,qe=mi.minLength)=>{const it=we?Ee:Fe;ee[H]={type:we?Re:qe,message:it,ref:c,...ce(we?Re:qe,it)}};if(o?!Array.isArray(V)||!V.length:v&&(!J&&(me||Kt(V))||Ci(V)&&!V||q&&!Ly(p).isValid||X&&!Py(p).isValid)){const{value:we,message:Ee}=Vl(v)?{value:!!v,message:v}:fs(v);if(we&&(ee[H]={type:mi.required,message:Ee,ref:_,...ce(mi.required,Ee)},!r))return K(Ee),ee}if(!me&&(!Kt(L)||!Kt(P))){let we,Ee;const Fe=fs(P),Re=fs(L);if(!Kt(V)&&!isNaN(V)){const qe=c.valueAsNumber||V&&+V;Kt(Fe.value)||(we=qe>Fe.value),Kt(Re.value)||(Ee=qenew Date(new Date().toDateString()+" "+oe),de=c.type=="time",le=c.type=="week";ri(Fe.value)&&V&&(we=de?it(V)>it(Fe.value):le?V>Fe.value:qe>new Date(Fe.value)),ri(Re.value)&&V&&(Ee=de?it(V)+we.value,Re=!Kt(Ee.value)&&V.length<+Ee.value;if((Fe||Re)&&(Te(Fe,we.message,Ee.message),!r))return K(ee[H].message),ee}if(B&&!me&&ri(V)){const{value:we,message:Ee}=fs(B);if(Tc(we)&&!V.match(we)&&(ee[H]={type:mi.pattern,message:Ee,ref:c,...ce(mi.pattern,Ee)},!r))return K(Ee),ee}if(M){if(sn(M)){const we=await M(V,t),Ee=Om(we,_);if(Ee&&(ee[H]={...Ee,...ce(mi.validate,Ee.message)},!r))return K(Ee.message),ee}else if(At(M)){let we={};for(const Ee in M){if(!Sr(we)&&!r)break;const Fe=Om(await M[Ee](V,t),_,Ee);Fe&&(we={...Fe,...ce(Ee,Fe.message)},K(Fe.message),r&&(ee[H]=we))}if(!Sr(we)&&(ee[H]={ref:_,...we},!r))return ee}}return K(!0),ee};function b7(e,t){const r=t.slice(0,-1).length;let s=0;for(;s{let e=[];return{get observers(){return e},next:o=>{for(const c of e)c.next&&c.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(c=>c!==o)}}),unsubscribe:()=>{e=[]}}},Rc=e=>Kt(e)||!Ny(e);function Bn(e,t){if(Rc(e)||Rc(t))return e===t;if(Ps(e)&&Ps(t))return e.getTime()===t.getTime();const r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;for(const o of r){const c=e[o];if(!s.includes(o))return!1;if(o!=="ref"){const p=t[o];if(Ps(c)&&Ps(p)||At(c)&&At(p)||Array.isArray(c)&&Array.isArray(p)?!Bn(c,p):c!==p)return!1}}return!0}var Ty=e=>e.type==="select-multiple",k7=e=>t1(e)||zo(e),Tu=e=>Pc(e)&&e.isConnected,C7=e=>At(e)&&Object.values(e).some(t=>t),Ry=e=>{for(const t in e)if(sn(e[t]))return!0;return!1};function _c(e,t={}){const r=Array.isArray(e);if(At(e)||r)for(const s in e)Array.isArray(e[s])||At(e[s])&&!Ry(e[s])?(t[s]=Array.isArray(e[s])?[]:{},_c(e[s],t[s])):Kt(e[s])||(t[s]=!0);return t}function _y(e,t,r){const s=Array.isArray(e);if(At(e)||s)for(const o in e)Array.isArray(e[o])||At(e[o])&&!Ry(e[o])?vt(t)||Rc(r[o])?r[o]=Array.isArray(e[o])?_c(e[o],[]):{..._c(e[o])}:_y(e[o],Kt(t)?{}:t[o],r[o]):r[o]=!Bn(e[o],t[o]);return r}var yl=(e,t)=>_y(e,t,_c(t)),My=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:s})=>vt(e)?e:t?e===""?NaN:e&&+e:r&&ri(e)?new Date(e):s?s(e):e;function Ru(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return e1(t)?t.files:t1(t)?Py(e.refs).value:Ty(t)?[...t.selectedOptions].map(({value:r})=>r):zo(t)?Ly(e.refs).value:My(vt(t.value)?e.ref.value:t.value,e)}var S7=(e,t,r,s)=>{const o={};for(const c of e){const p=Ne(t,c);p&&dt(o,c,p._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:s}},wa=e=>vt(e)?e:Tc(e)?e.source:At(e)?Tc(e.value)?e.value.source:e.value:e,A7=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function zm(e,t,r){const s=Ne(e,r);if(s||Jp(r))return{error:s,name:r};const o=r.split(".");for(;o.length;){const c=o.join("."),p=Ne(t,c),v=Ne(e,c);if(p&&!Array.isArray(p)&&r!==c)return{name:r};if(v&&v.type)return{name:c,error:v};o.pop()}return{name:r}}var j7=(e,t,r,s,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?s.isOnBlur:o.isOnBlur)?!e:(r?s.isOnChange:o.isOnChange)?e:!0,N7=(e,t)=>!Fo(Ne(e,t)).length&&Rt(e,t);const E7={mode:Vr.onSubmit,reValidateMode:Vr.onChange,shouldFocusError:!0};function L7(e={}){let t={...E7,...e},r={submitCount:0,isDirty:!1,isLoading:sn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},s={},o=At(t.defaultValues)||At(t.values)?kr(t.defaultValues||t.values)||{}:{},c=t.shouldUnregister?{}:kr(o),p={action:!1,mount:!1,watch:!1},v={mount:new Set,unMount:new Set,array:new Set,watch:new Set},C,A=0;const L={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},P={values:Pu(),array:Pu(),state:Pu()},B=Pm(t.mode),M=Pm(t.reValidateMode),H=t.criteriaMode===Vr.all,D=Q=>re=>{clearTimeout(A),A=setTimeout(Q,re)},Z=async Q=>{if(L.isValid||Q){const re=t.resolver?Sr((await J()).errors):await ce(s,!0);re!==r.isValid&&P.state.next({isValid:re})}},W=(Q,re)=>{(L.isValidating||L.validatingFields)&&(re.forEach(se=>{dt(r.validatingFields,se,Q)}),r.isValidating=C7(r.validatingFields),P.state.next({validatingFields:r.validatingFields,isValidating:r.isValidating}))},V=(Q,re=[],se,ye,xe=!0,fe=!0)=>{if(ye&&se){if(p.action=!0,fe&&Array.isArray(Ne(s,Q))){const Pe=se(Ne(s,Q),ye.argA,ye.argB);xe&&dt(s,Q,Pe)}if(fe&&Array.isArray(Ne(r.errors,Q))){const Pe=se(Ne(r.errors,Q),ye.argA,ye.argB);xe&&dt(r.errors,Q,Pe),N7(r.errors,Q)}if(L.touchedFields&&fe&&Array.isArray(Ne(r.touchedFields,Q))){const Pe=se(Ne(r.touchedFields,Q),ye.argA,ye.argB);xe&&dt(r.touchedFields,Q,Pe)}L.dirtyFields&&(r.dirtyFields=yl(o,c)),P.state.next({name:Q,isDirty:we(Q,re),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else dt(c,Q,re)},_=(Q,re)=>{dt(r.errors,Q,re),P.state.next({errors:r.errors})},K=Q=>{r.errors=Q,P.state.next({errors:r.errors,isValid:!1})},ee=(Q,re,se,ye)=>{const xe=Ne(s,Q);if(xe){const fe=Ne(c,Q,vt(se)?Ne(o,Q):se);vt(fe)||ye&&ye.defaultChecked||re?dt(c,Q,re?fe:Ru(xe._f)):Re(Q,fe),p.mount&&Z()}},X=(Q,re,se,ye,xe)=>{let fe=!1,Pe=!1;const et={name:Q},wt=!!(Ne(s,Q)&&Ne(s,Q)._f.disabled);if(!se||ye){L.isDirty&&(Pe=r.isDirty,r.isDirty=et.isDirty=we(),fe=Pe!==et.isDirty);const Pt=wt||Bn(Ne(o,Q),re);Pe=!!(!wt&&Ne(r.dirtyFields,Q)),Pt||wt?Rt(r.dirtyFields,Q):dt(r.dirtyFields,Q,!0),et.dirtyFields=r.dirtyFields,fe=fe||L.dirtyFields&&Pe!==!Pt}if(se){const Pt=Ne(r.touchedFields,Q);Pt||(dt(r.touchedFields,Q,se),et.touchedFields=r.touchedFields,fe=fe||L.touchedFields&&Pt!==se)}return fe&&xe&&P.state.next(et),fe?et:{}},q=(Q,re,se,ye)=>{const xe=Ne(r.errors,Q),fe=L.isValid&&Ci(re)&&r.isValid!==re;if(e.delayError&&se?(C=D(()=>_(Q,se)),C(e.delayError)):(clearTimeout(A),C=null,se?dt(r.errors,Q,se):Rt(r.errors,Q)),(se?!Bn(xe,se):xe)||!Sr(ye)||fe){const Pe={...ye,...fe&&Ci(re)?{isValid:re}:{},errors:r.errors,name:Q};r={...r,...Pe},P.state.next(Pe)}W(!1,Object.keys(r.validatingFields).filter(Pe=>Pe===Q))},J=async Q=>t.resolver(c,t.context,S7(Q||v.mount,s,t.criteriaMode,t.shouldUseNativeValidation)),me=async Q=>{const{errors:re}=await J(Q);if(Q)for(const se of Q){const ye=Ne(re,se);ye?dt(r.errors,se,ye):Rt(r.errors,se)}else r.errors=re;return re},ce=async(Q,re,se={valid:!0})=>{for(const ye in Q){const xe=Q[ye];if(xe){const{_f:fe,...Pe}=xe;if(fe){const et=v.array.has(fe.name),wt=await Im(xe,c,H,t.shouldUseNativeValidation&&!re,et);if(wt[fe.name]&&(se.valid=!1,re))break;!re&&(Ne(wt,fe.name)?et?y7(r.errors,wt,fe.name):dt(r.errors,fe.name,wt[fe.name]):Rt(r.errors,fe.name))}Pe&&await ce(Pe,re,se)}}return se.valid},Te=()=>{for(const Q of v.unMount){const re=Ne(s,Q);re&&(re._f.refs?re._f.refs.every(se=>!Tu(se)):!Tu(re._f.ref))&&Be(Q)}v.unMount=new Set},we=(Q,re)=>(Q&&re&&dt(c,Q,re),!Bn(Ae(),o)),Ee=(Q,re,se)=>x7(Q,v,{...p.mount?c:vt(re)?o:ri(Q)?{[Q]:re}:re},se,re),Fe=Q=>Fo(Ne(p.mount?c:o,Q,e.shouldUnregister?Ne(o,Q,[]):[])),Re=(Q,re,se={})=>{const ye=Ne(s,Q);let xe=re;if(ye){const fe=ye._f;fe&&(!fe.disabled&&dt(c,Q,My(re,fe)),xe=Pc(fe.ref)&&Kt(re)?"":re,Ty(fe.ref)?[...fe.ref.options].forEach(Pe=>Pe.selected=xe.includes(Pe.value)):fe.refs?zo(fe.ref)?fe.refs.length>1?fe.refs.forEach(Pe=>(!Pe.defaultChecked||!Pe.disabled)&&(Pe.checked=Array.isArray(xe)?!!xe.find(et=>et===Pe.value):xe===Pe.value)):fe.refs[0]&&(fe.refs[0].checked=!!xe):fe.refs.forEach(Pe=>Pe.checked=Pe.value===xe):e1(fe.ref)?fe.ref.value="":(fe.ref.value=xe,fe.ref.type||P.values.next({name:Q,values:{...c}})))}(se.shouldDirty||se.shouldTouch)&&X(Q,xe,se.shouldTouch,se.shouldDirty,!0),se.shouldValidate&&oe(Q)},qe=(Q,re,se)=>{for(const ye in re){const xe=re[ye],fe=`${Q}.${ye}`,Pe=Ne(s,fe);(v.array.has(Q)||!Rc(xe)||Pe&&!Pe._f)&&!Ps(xe)?qe(fe,xe,se):Re(fe,xe,se)}},it=(Q,re,se={})=>{const ye=Ne(s,Q),xe=v.array.has(Q),fe=kr(re);dt(c,Q,fe),xe?(P.array.next({name:Q,values:{...c}}),(L.isDirty||L.dirtyFields)&&se.shouldDirty&&P.state.next({name:Q,dirtyFields:yl(o,c),isDirty:we(Q,fe)})):ye&&!ye._f&&!Kt(fe)?qe(Q,fe,se):Re(Q,fe,se),Tm(Q,v)&&P.state.next({...r}),P.values.next({name:p.mount?Q:void 0,values:{...c}})},de=async Q=>{const re=Q.target;let se=re.name,ye=!0;const xe=Ne(s,se),fe=()=>re.type?Ru(xe._f):d7(Q),Pe=et=>{ye=Number.isNaN(et)||et===Ne(c,se,et)};if(xe){let et,wt;const Pt=fe(),Vi=Q.type===Lm.BLUR||Q.type===Lm.FOCUS_OUT,Zo=!A7(xe._f)&&!t.resolver&&!Ne(r.errors,se)&&!xe._f.deps||j7(Vi,Ne(r.touchedFields,se),r.isSubmitted,M,B),cs=Tm(se,v,Vi);dt(c,se,Pt),Vi?(xe._f.onBlur&&xe._f.onBlur(Q),C&&C(0)):xe._f.onChange&&xe._f.onChange(Q);const da=X(se,Pt,Vi,!1),qo=!Sr(da)||cs;if(!Vi&&P.values.next({name:se,type:Q.type,values:{...c}}),Zo)return L.isValid&&Z(),qo&&P.state.next({name:se,...cs?{}:da});if(!Vi&&cs&&P.state.next({...r}),W(!0,[se]),t.resolver){const{errors:Qo}=await J([se]);if(Pe(Pt),ye){const Ko=zm(r.errors,s,se),Jo=zm(Qo,s,Ko.name||se);et=Jo.error,se=Jo.name,wt=Sr(Qo)}}else et=(await Im(xe,c,H,t.shouldUseNativeValidation))[se],Pe(Pt),ye&&(et?wt=!1:L.isValid&&(wt=await ce(s,!0)));ye&&(xe._f.deps&&oe(xe._f.deps),q(se,wt,et,da))}},le=(Q,re)=>{if(Ne(r.errors,re)&&Q.focus)return Q.focus(),1},oe=async(Q,re={})=>{let se,ye;const xe=Lu(Q);if(W(!0,xe),t.resolver){const fe=await me(vt(Q)?Q:xe);se=Sr(fe),ye=Q?!xe.some(Pe=>Ne(fe,Pe)):se}else Q?(ye=(await Promise.all(xe.map(async fe=>{const Pe=Ne(s,fe);return await ce(Pe&&Pe._f?{[fe]:Pe}:Pe)}))).every(Boolean),!(!ye&&!r.isValid)&&Z()):ye=se=await ce(s);return P.state.next({...!ri(Q)||L.isValid&&se!==r.isValid?{}:{name:Q},...t.resolver||!Q?{isValid:se}:{},errors:r.errors,isValidating:!1}),re.shouldFocus&&!ye&&Ua(s,le,Q?xe:v.mount),ye},Ae=Q=>{const re={...o,...p.mount?c:{}};return vt(Q)?re:ri(Q)?Ne(re,Q):Q.map(se=>Ne(re,se))},je=(Q,re)=>({invalid:!!Ne((re||r).errors,Q),isDirty:!!Ne((re||r).dirtyFields,Q),isTouched:!!Ne((re||r).touchedFields,Q),isValidating:!!Ne((re||r).validatingFields,Q),error:Ne((re||r).errors,Q)}),ze=Q=>{Q&&Lu(Q).forEach(re=>Rt(r.errors,re)),P.state.next({errors:Q?r.errors:{}})},Ue=(Q,re,se)=>{const ye=(Ne(s,Q,{_f:{}})._f||{}).ref;dt(r.errors,Q,{...re,ref:ye}),P.state.next({name:Q,errors:r.errors,isValid:!1}),se&&se.shouldFocus&&ye&&ye.focus&&ye.focus()},He=(Q,re)=>sn(Q)?P.values.subscribe({next:se=>Q(Ee(void 0,re),se)}):Ee(Q,re,!0),Be=(Q,re={})=>{for(const se of Q?Lu(Q):v.mount)v.mount.delete(se),v.array.delete(se),re.keepValue||(Rt(s,se),Rt(c,se)),!re.keepError&&Rt(r.errors,se),!re.keepDirty&&Rt(r.dirtyFields,se),!re.keepTouched&&Rt(r.touchedFields,se),!re.keepIsValidating&&Rt(r.validatingFields,se),!t.shouldUnregister&&!re.keepDefaultValue&&Rt(o,se);P.values.next({values:{...c}}),P.state.next({...r,...re.keepDirty?{isDirty:we()}:{}}),!re.keepIsValid&&Z()},Me=({disabled:Q,name:re,field:se,fields:ye,value:xe})=>{if(Ci(Q)){const fe=Q?void 0:vt(xe)?Ru(se?se._f:Ne(ye,re)._f):xe;dt(c,re,fe),X(re,fe,!1,!1,!0)}},Nt=(Q,re={})=>{let se=Ne(s,Q);const ye=Ci(re.disabled);return dt(s,Q,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:Q}},name:Q,mount:!0,...re}}),v.mount.add(Q),se?Me({field:se,disabled:re.disabled,name:Q,value:re.value}):ee(Q,!0,re.value),{...ye?{disabled:re.disabled}:{},...t.progressive?{required:!!re.required,min:wa(re.min),max:wa(re.max),minLength:wa(re.minLength),maxLength:wa(re.maxLength),pattern:wa(re.pattern)}:{},name:Q,onChange:de,onBlur:de,ref:xe=>{if(xe){Nt(Q,re),se=Ne(s,Q);const fe=vt(xe.value)&&xe.querySelectorAll&&xe.querySelectorAll("input,select,textarea")[0]||xe,Pe=k7(fe),et=se._f.refs||[];if(Pe?et.find(wt=>wt===fe):fe===se._f.ref)return;dt(s,Q,{_f:{...se._f,...Pe?{refs:[...et.filter(Tu),fe,...Array.isArray(Ne(o,Q))?[{}]:[]],ref:{type:fe.type,name:Q}}:{ref:fe}}}),ee(Q,!1,void 0,fe)}else se=Ne(s,Q,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||re.shouldUnregister)&&!(h7(v.array,Q)&&p.action)&&v.unMount.add(Q)}}},hr=()=>t.shouldFocusError&&Ua(s,le,v.mount),os=Q=>{Ci(Q)&&(P.state.next({disabled:Q}),Ua(s,(re,se)=>{let ye=Q;const xe=Ne(s,se);xe&&Ci(xe._f.disabled)&&(ye||(ye=xe._f.disabled)),re.disabled=ye},0,!1))},Bi=(Q,re)=>async se=>{let ye;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let xe=kr(c);if(P.state.next({isSubmitting:!0}),t.resolver){const{errors:fe,values:Pe}=await J();r.errors=fe,xe=Pe}else await ce(s);if(Rt(r.errors,"root"),Sr(r.errors)){P.state.next({errors:{}});try{await Q(xe,se)}catch(fe){ye=fe}}else re&&await re({...r.errors},se),hr(),setTimeout(hr);if(P.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sr(r.errors)&&!ye,submitCount:r.submitCount+1,errors:r.errors}),ye)throw ye},Uo=(Q,re={})=>{Ne(s,Q)&&(vt(re.defaultValue)?it(Q,kr(Ne(o,Q))):(it(Q,re.defaultValue),dt(o,Q,kr(re.defaultValue))),re.keepTouched||Rt(r.touchedFields,Q),re.keepDirty||(Rt(r.dirtyFields,Q),r.isDirty=re.defaultValue?we(Q,kr(Ne(o,Q))):we()),re.keepError||(Rt(r.errors,Q),L.isValid&&Z()),P.state.next({...r}))},ca=(Q,re={})=>{const se=Q?kr(Q):o,ye=kr(se),xe=Sr(Q),fe=xe?o:ye;if(re.keepDefaultValues||(o=se),!re.keepValues){if(re.keepDirtyValues)for(const Pe of v.mount)Ne(r.dirtyFields,Pe)?dt(fe,Pe,Ne(c,Pe)):it(Pe,Ne(fe,Pe));else{if(Kp&&vt(Q))for(const Pe of v.mount){const et=Ne(s,Pe);if(et&&et._f){const wt=Array.isArray(et._f.refs)?et._f.refs[0]:et._f.ref;if(Pc(wt)){const Pt=wt.closest("form");if(Pt){Pt.reset();break}}}}s={}}c=e.shouldUnregister?re.keepDefaultValues?kr(o):{}:kr(fe),P.array.next({values:{...fe}}),P.values.next({values:{...fe}})}v={mount:re.keepDirtyValues?v.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},p.mount=!L.isValid||!!re.keepIsValid||!!re.keepDirtyValues,p.watch=!!e.shouldUnregister,P.state.next({submitCount:re.keepSubmitCount?r.submitCount:0,isDirty:xe?!1:re.keepDirty?r.isDirty:!!(re.keepDefaultValues&&!Bn(Q,o)),isSubmitted:re.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:xe?[]:re.keepDirtyValues?re.keepDefaultValues&&c?yl(o,c):r.dirtyFields:re.keepDefaultValues&&Q?yl(o,Q):{},touchedFields:re.keepTouched?r.touchedFields:{},errors:re.keepErrors?r.errors:{},isSubmitSuccessful:re.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},ls=(Q,re)=>ca(sn(Q)?Q(c):Q,re);return{control:{register:Nt,unregister:Be,getFieldState:je,handleSubmit:Bi,setError:Ue,_executeSchema:J,_getWatch:Ee,_getDirty:we,_updateValid:Z,_removeUnmounted:Te,_updateFieldArray:V,_updateDisabledField:Me,_getFieldArray:Fe,_reset:ca,_resetDefaultValues:()=>sn(t.defaultValues)&&t.defaultValues().then(Q=>{ls(Q,t.resetOptions),P.state.next({isLoading:!1})}),_updateFormState:Q=>{r={...r,...Q}},_disableForm:os,_subjects:P,_proxyFormState:L,_setErrors:K,get _fields(){return s},get _formValues(){return c},get _state(){return p},set _state(Q){p=Q},get _defaultValues(){return o},get _names(){return v},set _names(Q){v=Q},get _formState(){return r},set _formState(Q){r=Q},get _options(){return t},set _options(Q){t={...t,...Q}}},trigger:oe,register:Nt,handleSubmit:Bi,watch:He,setValue:it,getValues:Ae,reset:ls,resetField:Uo,clearErrors:ze,unregister:Be,setError:Ue,setFocus:(Q,re={})=>{const se=Ne(s,Q),ye=se&&se._f;if(ye){const xe=ye.refs?ye.refs[0]:ye.ref;xe.focus&&(xe.focus(),re.shouldSelect&&xe.select())}},getFieldState:je}}function Oy(e={}){const t=pe.useRef(),r=pe.useRef(),[s,o]=pe.useState({isDirty:!1,isValidating:!1,isLoading:sn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:sn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...L7(e),formState:s});const c=t.current.control;return c._options=e,m7({subject:c._subjects.state,next:p=>{g7(p,c._proxyFormState,c._updateFormState,!0)&&o({...c._formState})}}),pe.useEffect(()=>c._disableForm(e.disabled),[c,e.disabled]),pe.useEffect(()=>{if(c._proxyFormState.isDirty){const p=c._getDirty();p!==s.isDirty&&c._subjects.state.next({isDirty:p})}},[c,s.isDirty]),pe.useEffect(()=>{e.values&&!Bn(e.values,r.current)?(c._reset(e.values,c._options.resetOptions),r.current=e.values,o(p=>({...p}))):c._resetDefaultValues()},[e.values,c]),pe.useEffect(()=>{e.errors&&c._setErrors(e.errors)},[e.errors,c]),pe.useEffect(()=>{c._state.mount||(c._updateValid(),c._state.mount=!0),c._state.watch&&(c._state.watch=!1,c._subjects.state.next({...c._formState})),c._removeUnmounted()}),pe.useEffect(()=>{e.shouldUnregister&&c._subjects.values.next({values:c._getWatch()})},[e.shouldUnregister,c]),t.current.formState=p7(s,c),t.current}function P7(e){return e==null?void 0:e.replace(/\/$/,"")}const T7=P7("https://backend.captn.ai")||"http://localhost:3001",r1={apiUrl:T7};var Mc;(function(e){e.Get="GET",e.Post="POST",e.Put="PUT",e.Delete="DELETE"})(Mc||(Mc={}));const R7=bt("form",{marginTop:"1.5rem"}),Wl=bt("div",{"& + div":{marginTop:"1.5rem"}}),ef=bt("label",{display:"block !important",fontSize:"$sm !important",fontWeight:"500 !important",marginBottom:"0.5rem !important"}),Iy={display:"block !important",lineHeight:"1.5rem !important",fontSize:"$sm !important",borderWidth:"1px !important",borderColor:"$gray600 !important",backgroundColor:"#f8f4ff !important",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05) !important","&:focus":{borderWidth:"1px !important",borderColor:"$gray700 !important",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05) !important"},"&:disabled":{opacity:"0.5 !important",cursor:"not-allowed !important",backgroundColor:"$gray400 !important",borderColor:"$gray400 !important",color:"$gray500 !important"},borderRadius:"0.375rem !important",width:"100% !important",paddingTop:"0.375rem !important",paddingBottom:"0.375rem !important",paddingLeft:"0.75rem !important",paddingRight:"0.75rem !important",margin:"0 !important"},tf=bt("input",Iy),_7=bt("textarea",Iy),rf=bt("div",{display:"block",fontSize:"$sm",fontWeight:"500",color:"$formErrorText",marginTop:"0.5rem"}),M7=bt("button",{display:"flex !important",justifyContent:"center !important",width:"100% !important",borderWidth:"1px !important",borderColor:"$brand !important",backgroundColor:"$brand !important",color:"$submitButtonText !important",padding:"0.5rem 0.75rem !important",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05) !important",fontWeight:"600 !important",fontSize:"$sm !important",lineHeight:"1.25rem !important",borderRadius:"0.375rem !important","&:hover":{backgroundColor:"$brandAccent !important",borderColor:"$brandAccent !important"},"&:disabled":{opacity:"0.5 !important",cursor:"not-allowed !important",backgroundColor:"$gray400 !important",borderColor:"$gray400 !important",color:"$gray500 !important"},transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1) !important",transitionDuration:"100ms !important"}),O7=c7({width:"1.25rem",height:"1.25rem"}),I7=()=>f.jsx("svg",{className:O7(),"aria-hidden":"true",fill:"currentColor",viewBox:"0 0 24 24",children:f.jsx("g",{id:"brand",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:f.jsx("g",{id:"google",fill:"#000000",fillRule:"nonzero",children:f.jsx("path",{d:"M11.99,13.9 L11.99,10.18 L21.35,10.18 C21.49,10.81 21.6,11.4 21.6,12.23 C21.6,17.94 17.77,22 12,22 C6.48,22 2,17.52 2,12 C2,6.48 6.48,2 12,2 C14.7,2 16.96,2.99 18.69,4.61 L15.85,7.37 C15.13,6.69 13.87,5.89 12,5.89 C8.69,5.89 5.99,8.64 5.99,12.01 C5.99,15.38 8.69,18.13 12,18.13 C15.83,18.13 17.24,15.48 17.5,13.91 L11.99,13.91 L11.99,13.9 Z",id:"Shape"})})})}),z7=bt("a",{display:"flex !important",justifyContent:"center !important",cursor:"pointer !important",color:"inherit !important",backgroundColor:"#f0f0f0 !important",borderRadius:"0.375rem !important",borderWidth:"1px !important",borderColor:"$gray600 !important",fontSize:"13px !important",padding:"0.5rem 0.75rem !important",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05) !important","&:visited":{color:"inherit !important"},"&:hover":{backgroundColor:"$gray500 !important",color:"inherit !important"},transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1) !important",transitionDuration:"100ms !important"});function zy(e,t){return function(){return e.apply(t,arguments)}}const{toString:F7}=Object.prototype,{getPrototypeOf:i1}=Object,Ed=(e=>t=>{const r=F7.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ui=e=>(e=e.toLowerCase(),t=>Ed(t)===e),Ld=e=>t=>typeof t===e,{isArray:aa}=Array,po=Ld("undefined");function D7(e){return e!==null&&!po(e)&&e.constructor!==null&&!po(e.constructor)&&Tr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fy=ui("ArrayBuffer");function H7(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Fy(e.buffer),t}const B7=Ld("string"),Tr=Ld("function"),Dy=Ld("number"),Pd=e=>e!==null&&typeof e=="object",V7=e=>e===!0||e===!1,$l=e=>{if(Ed(e)!=="object")return!1;const t=i1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},W7=ui("Date"),$7=ui("File"),X7=ui("Blob"),Y7=ui("FileList"),U7=e=>Pd(e)&&Tr(e.pipe),G7=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tr(e.append)&&((t=Ed(e))==="formdata"||t==="object"&&Tr(e.toString)&&e.toString()==="[object FormData]"))},Z7=ui("URLSearchParams"),q7=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Do(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),aa(e))for(s=0,o=e.length;s0;)if(o=r[s],t===o.toLowerCase())return o;return null}const By=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vy=e=>!po(e)&&e!==By;function nf(){const{caseless:e}=Vy(this)&&this||{},t={},r=(s,o)=>{const c=e&&Hy(t,o)||o;$l(t[c])&&$l(s)?t[c]=nf(t[c],s):$l(s)?t[c]=nf({},s):aa(s)?t[c]=s.slice():t[c]=s};for(let s=0,o=arguments.length;s(Do(t,(o,c)=>{r&&Tr(o)?e[c]=zy(o,r):e[c]=o},{allOwnKeys:s}),e),K7=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),J7=(e,t,r,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},e6=(e,t,r,s)=>{let o,c,p;const v={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),c=o.length;c-- >0;)p=o[c],(!s||s(p,e,t))&&!v[p]&&(t[p]=e[p],v[p]=!0);e=r!==!1&&i1(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},t6=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const s=e.indexOf(t,r);return s!==-1&&s===r},r6=e=>{if(!e)return null;if(aa(e))return e;let t=e.length;if(!Dy(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},i6=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&i1(Uint8Array)),n6=(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=s.next())&&!o.done;){const c=o.value;t.call(e,c[0],c[1])}},s6=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},a6=ui("HTMLFormElement"),o6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,o){return s.toUpperCase()+o}),Fm=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),l6=ui("RegExp"),Wy=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};Do(r,(o,c)=>{let p;(p=t(o,c,e))!==!1&&(s[c]=p||o)}),Object.defineProperties(e,s)},c6=e=>{Wy(e,(t,r)=>{if(Tr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(Tr(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},d6=(e,t)=>{const r={},s=o=>{o.forEach(c=>{r[c]=!0})};return aa(e)?s(e):s(String(e).split(t)),r},u6=()=>{},h6=(e,t)=>(e=+e,Number.isFinite(e)?e:t),_u="abcdefghijklmnopqrstuvwxyz",Dm="0123456789",$y={DIGIT:Dm,ALPHA:_u,ALPHA_DIGIT:_u+_u.toUpperCase()+Dm},f6=(e=16,t=$y.ALPHA_DIGIT)=>{let r="";const{length:s}=t;for(;e--;)r+=t[Math.random()*s|0];return r};function p6(e){return!!(e&&Tr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const g6=e=>{const t=new Array(10),r=(s,o)=>{if(Pd(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[o]=s;const c=aa(s)?[]:{};return Do(s,(p,v)=>{const C=r(p,o+1);!po(C)&&(c[v]=C)}),t[o]=void 0,c}}return s};return r(e,0)},m6=ui("AsyncFunction"),x6=e=>e&&(Pd(e)||Tr(e))&&Tr(e.then)&&Tr(e.catch),ae={isArray:aa,isArrayBuffer:Fy,isBuffer:D7,isFormData:G7,isArrayBufferView:H7,isString:B7,isNumber:Dy,isBoolean:V7,isObject:Pd,isPlainObject:$l,isUndefined:po,isDate:W7,isFile:$7,isBlob:X7,isRegExp:l6,isFunction:Tr,isStream:U7,isURLSearchParams:Z7,isTypedArray:i6,isFileList:Y7,forEach:Do,merge:nf,extend:Q7,trim:q7,stripBOM:K7,inherits:J7,toFlatObject:e6,kindOf:Ed,kindOfTest:ui,endsWith:t6,toArray:r6,forEachEntry:n6,matchAll:s6,isHTMLForm:a6,hasOwnProperty:Fm,hasOwnProp:Fm,reduceDescriptors:Wy,freezeMethods:c6,toObjectSet:d6,toCamelCase:o6,noop:u6,toFiniteNumber:h6,findKey:Hy,global:By,isContextDefined:Vy,ALPHABET:$y,generateString:f6,isSpecCompliantForm:p6,toJSONObject:g6,isAsyncFn:m6,isThenable:x6};function Qe(e,t,r,s,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o)}ae.inherits(Qe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ae.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Xy=Qe.prototype,Yy={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Yy[e]={value:e}});Object.defineProperties(Qe,Yy);Object.defineProperty(Xy,"isAxiosError",{value:!0});Qe.from=(e,t,r,s,o,c)=>{const p=Object.create(Xy);return ae.toFlatObject(e,p,function(C){return C!==Error.prototype},v=>v!=="isAxiosError"),Qe.call(p,e.message,t,r,s,o),p.cause=e,p.name=e.name,c&&Object.assign(p,c),p};const v6=null;function sf(e){return ae.isPlainObject(e)||ae.isArray(e)}function Uy(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function Hm(e,t,r){return e?e.concat(t).map(function(o,c){return o=Uy(o),!r&&c?"["+o+"]":o}).join(r?".":""):t}function y6(e){return ae.isArray(e)&&!e.some(sf)}const b6=ae.toFlatObject(ae,{},null,function(t){return/^is[A-Z]/.test(t)});function Td(e,t,r){if(!ae.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=ae.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(D,Z){return!ae.isUndefined(Z[D])});const s=r.metaTokens,o=r.visitor||L,c=r.dots,p=r.indexes,C=(r.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(t);if(!ae.isFunction(o))throw new TypeError("visitor must be a function");function A(H){if(H===null)return"";if(ae.isDate(H))return H.toISOString();if(!C&&ae.isBlob(H))throw new Qe("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(H)||ae.isTypedArray(H)?C&&typeof Blob=="function"?new Blob([H]):Buffer.from(H):H}function L(H,D,Z){let W=H;if(H&&!Z&&typeof H=="object"){if(ae.endsWith(D,"{}"))D=s?D:D.slice(0,-2),H=JSON.stringify(H);else if(ae.isArray(H)&&y6(H)||(ae.isFileList(H)||ae.endsWith(D,"[]"))&&(W=ae.toArray(H)))return D=Uy(D),W.forEach(function(_,K){!(ae.isUndefined(_)||_===null)&&t.append(p===!0?Hm([D],K,c):p===null?D:D+"[]",A(_))}),!1}return sf(H)?!0:(t.append(Hm(Z,D,c),A(H)),!1)}const P=[],B=Object.assign(b6,{defaultVisitor:L,convertValue:A,isVisitable:sf});function M(H,D){if(!ae.isUndefined(H)){if(P.indexOf(H)!==-1)throw Error("Circular reference detected in "+D.join("."));P.push(H),ae.forEach(H,function(W,V){(!(ae.isUndefined(W)||W===null)&&o.call(t,W,ae.isString(V)?V.trim():V,D,B))===!0&&M(W,D?D.concat(V):[V])}),P.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return M(e),t}function Bm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function n1(e,t){this._pairs=[],e&&Td(e,this,t)}const Gy=n1.prototype;Gy.append=function(t,r){this._pairs.push([t,r])};Gy.toString=function(t){const r=t?function(s){return t.call(this,s,Bm)}:Bm;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function w6(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zy(e,t,r){if(!t)return e;const s=r&&r.encode||w6,o=r&&r.serialize;let c;if(o?c=o(t,r):c=ae.isURLSearchParams(t)?t.toString():new n1(t,r).toString(s),c){const p=e.indexOf("#");p!==-1&&(e=e.slice(0,p)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class Vm{constructor(){this.handlers=[]}use(t,r,s){return this.handlers.push({fulfilled:t,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ae.forEach(this.handlers,function(s){s!==null&&t(s)})}}const qy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},k6=typeof URLSearchParams<"u"?URLSearchParams:n1,C6=typeof FormData<"u"?FormData:null,S6=typeof Blob<"u"?Blob:null,A6={isBrowser:!0,classes:{URLSearchParams:k6,FormData:C6,Blob:S6},protocols:["http","https","file","blob","url","data"]},Qy=typeof window<"u"&&typeof document<"u",j6=(e=>Qy&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),N6=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",E6=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qy,hasStandardBrowserEnv:j6,hasStandardBrowserWebWorkerEnv:N6},Symbol.toStringTag,{value:"Module"})),ii={...E6,...A6};function L6(e,t){return Td(e,new ii.classes.URLSearchParams,Object.assign({visitor:function(r,s,o,c){return ii.isNode&&ae.isBuffer(r)?(this.append(s,r.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)}},t))}function P6(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function T6(e){const t={},r=Object.keys(e);let s;const o=r.length;let c;for(s=0;s=r.length;return p=!p&&ae.isArray(o)?o.length:p,C?(ae.hasOwnProp(o,p)?o[p]=[o[p],s]:o[p]=s,!v):((!o[p]||!ae.isObject(o[p]))&&(o[p]=[]),t(r,s,o[p],c)&&ae.isArray(o[p])&&(o[p]=T6(o[p])),!v)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const r={};return ae.forEachEntry(e,(s,o)=>{t(P6(s),o,r,0)}),r}return null}function R6(e,t,r){if(ae.isString(e))try{return(t||JSON.parse)(e),ae.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(e)}const s1={transitional:qy,adapter:["xhr","http"],transformRequest:[function(t,r){const s=r.getContentType()||"",o=s.indexOf("application/json")>-1,c=ae.isObject(t);if(c&&ae.isHTMLForm(t)&&(t=new FormData(t)),ae.isFormData(t))return o?JSON.stringify(Ky(t)):t;if(ae.isArrayBuffer(t)||ae.isBuffer(t)||ae.isStream(t)||ae.isFile(t)||ae.isBlob(t))return t;if(ae.isArrayBufferView(t))return t.buffer;if(ae.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let v;if(c){if(s.indexOf("application/x-www-form-urlencoded")>-1)return L6(t,this.formSerializer).toString();if((v=ae.isFileList(t))||s.indexOf("multipart/form-data")>-1){const C=this.env&&this.env.FormData;return Td(v?{"files[]":t}:t,C&&new C,this.formSerializer)}}return c||o?(r.setContentType("application/json",!1),R6(t)):t}],transformResponse:[function(t){const r=this.transitional||s1.transitional,s=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&ae.isString(t)&&(s&&!this.responseType||o)){const p=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(v){if(p)throw v.name==="SyntaxError"?Qe.from(v,Qe.ERR_BAD_RESPONSE,this,null,this.response):v}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ii.classes.FormData,Blob:ii.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ae.forEach(["delete","get","head","post","put","patch"],e=>{s1.headers[e]={}});const a1=s1,_6=ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),M6=e=>{const t={};let r,s,o;return e&&e.split(` -`).forEach(function(p){o=p.indexOf(":"),r=p.substring(0,o).trim().toLowerCase(),s=p.substring(o+1).trim(),!(!r||t[r]&&_6[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t},Wm=Symbol("internals");function ka(e){return e&&String(e).trim().toLowerCase()}function Xl(e){return e===!1||e==null?e:ae.isArray(e)?e.map(Xl):String(e)}function O6(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(e);)t[s[1]]=s[2];return t}const I6=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Mu(e,t,r,s,o){if(ae.isFunction(s))return s.call(this,t,r);if(o&&(t=r),!!ae.isString(t)){if(ae.isString(s))return t.indexOf(s)!==-1;if(ae.isRegExp(s))return s.test(t)}}function z6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function F6(e,t){const r=ae.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+r,{value:function(o,c,p){return this[s].call(this,t,o,c,p)},configurable:!0})})}class Rd{constructor(t){t&&this.set(t)}set(t,r,s){const o=this;function c(v,C,A){const L=ka(C);if(!L)throw new Error("header name must be a non-empty string");const P=ae.findKey(o,L);(!P||o[P]===void 0||A===!0||A===void 0&&o[P]!==!1)&&(o[P||C]=Xl(v))}const p=(v,C)=>ae.forEach(v,(A,L)=>c(A,L,C));return ae.isPlainObject(t)||t instanceof this.constructor?p(t,r):ae.isString(t)&&(t=t.trim())&&!I6(t)?p(M6(t),r):t!=null&&c(r,t,s),this}get(t,r){if(t=ka(t),t){const s=ae.findKey(this,t);if(s){const o=this[s];if(!r)return o;if(r===!0)return O6(o);if(ae.isFunction(r))return r.call(this,o,s);if(ae.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ka(t),t){const s=ae.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||Mu(this,this[s],s,r)))}return!1}delete(t,r){const s=this;let o=!1;function c(p){if(p=ka(p),p){const v=ae.findKey(s,p);v&&(!r||Mu(s,s[v],v,r))&&(delete s[v],o=!0)}}return ae.isArray(t)?t.forEach(c):c(t),o}clear(t){const r=Object.keys(this);let s=r.length,o=!1;for(;s--;){const c=r[s];(!t||Mu(this,this[c],c,t,!0))&&(delete this[c],o=!0)}return o}normalize(t){const r=this,s={};return ae.forEach(this,(o,c)=>{const p=ae.findKey(s,c);if(p){r[p]=Xl(o),delete r[c];return}const v=t?z6(c):String(c).trim();v!==c&&delete r[c],r[v]=Xl(o),s[v]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return ae.forEach(this,(s,o)=>{s!=null&&s!==!1&&(r[o]=t&&ae.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const s=new this(t);return r.forEach(o=>s.set(o)),s}static accessor(t){const s=(this[Wm]=this[Wm]={accessors:{}}).accessors,o=this.prototype;function c(p){const v=ka(p);s[v]||(F6(o,p),s[v]=!0)}return ae.isArray(t)?t.forEach(c):c(t),this}}Rd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(Rd.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});ae.freezeMethods(Rd);const Ei=Rd;function Ou(e,t){const r=this||a1,s=t||r,o=Ei.from(s.headers);let c=s.data;return ae.forEach(e,function(v){c=v.call(r,c,o.normalize(),t?t.status:void 0)}),o.normalize(),c}function Jy(e){return!!(e&&e.__CANCEL__)}function Ho(e,t,r){Qe.call(this,e??"canceled",Qe.ERR_CANCELED,t,r),this.name="CanceledError"}ae.inherits(Ho,Qe,{__CANCEL__:!0});function D6(e,t,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?e(r):t(new Qe("Request failed with status code "+r.status,[Qe.ERR_BAD_REQUEST,Qe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const H6=ii.hasStandardBrowserEnv?{write(e,t,r,s,o,c){const p=[e+"="+encodeURIComponent(t)];ae.isNumber(r)&&p.push("expires="+new Date(r).toGMTString()),ae.isString(s)&&p.push("path="+s),ae.isString(o)&&p.push("domain="+o),c===!0&&p.push("secure"),document.cookie=p.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function B6(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function V6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function eb(e,t){return e&&!B6(t)?V6(e,t):t}const W6=ii.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let s;function o(c){let p=c;return t&&(r.setAttribute("href",p),p=r.href),r.setAttribute("href",p),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return s=o(window.location.href),function(p){const v=ae.isString(p)?o(p):p;return v.protocol===s.protocol&&v.host===s.host}}():function(){return function(){return!0}}();function $6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function X6(e,t){e=e||10;const r=new Array(e),s=new Array(e);let o=0,c=0,p;return t=t!==void 0?t:1e3,function(C){const A=Date.now(),L=s[c];p||(p=A),r[o]=C,s[o]=A;let P=c,B=0;for(;P!==o;)B+=r[P++],P=P%e;if(o=(o+1)%e,o===c&&(c=(c+1)%e),A-p{const c=o.loaded,p=o.lengthComputable?o.total:void 0,v=c-r,C=s(v),A=c<=p;r=c;const L={loaded:c,total:p,progress:p?c/p:void 0,bytes:v,rate:C||void 0,estimated:C&&p&&A?(p-c)/C:void 0,event:o};L[t?"download":"upload"]=!0,e(L)}}const Y6=typeof XMLHttpRequest<"u",U6=Y6&&function(e){return new Promise(function(r,s){let o=e.data;const c=Ei.from(e.headers).normalize();let{responseType:p,withXSRFToken:v}=e,C;function A(){e.cancelToken&&e.cancelToken.unsubscribe(C),e.signal&&e.signal.removeEventListener("abort",C)}let L;if(ae.isFormData(o)){if(ii.hasStandardBrowserEnv||ii.hasStandardBrowserWebWorkerEnv)c.setContentType(!1);else if((L=c.getContentType())!==!1){const[D,...Z]=L?L.split(";").map(W=>W.trim()).filter(Boolean):[];c.setContentType([D||"multipart/form-data",...Z].join("; "))}}let P=new XMLHttpRequest;if(e.auth){const D=e.auth.username||"",Z=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";c.set("Authorization","Basic "+btoa(D+":"+Z))}const B=eb(e.baseURL,e.url);P.open(e.method.toUpperCase(),Zy(B,e.params,e.paramsSerializer),!0),P.timeout=e.timeout;function M(){if(!P)return;const D=Ei.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),W={data:!p||p==="text"||p==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:D,config:e,request:P};D6(function(_){r(_),A()},function(_){s(_),A()},W),P=null}if("onloadend"in P?P.onloadend=M:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(M)},P.onabort=function(){P&&(s(new Qe("Request aborted",Qe.ECONNABORTED,e,P)),P=null)},P.onerror=function(){s(new Qe("Network Error",Qe.ERR_NETWORK,e,P)),P=null},P.ontimeout=function(){let Z=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const W=e.transitional||qy;e.timeoutErrorMessage&&(Z=e.timeoutErrorMessage),s(new Qe(Z,W.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,e,P)),P=null},ii.hasStandardBrowserEnv&&(v&&ae.isFunction(v)&&(v=v(e)),v||v!==!1&&W6(B))){const D=e.xsrfHeaderName&&e.xsrfCookieName&&H6.read(e.xsrfCookieName);D&&c.set(e.xsrfHeaderName,D)}o===void 0&&c.setContentType(null),"setRequestHeader"in P&&ae.forEach(c.toJSON(),function(Z,W){P.setRequestHeader(W,Z)}),ae.isUndefined(e.withCredentials)||(P.withCredentials=!!e.withCredentials),p&&p!=="json"&&(P.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&P.addEventListener("progress",$m(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&P.upload&&P.upload.addEventListener("progress",$m(e.onUploadProgress)),(e.cancelToken||e.signal)&&(C=D=>{P&&(s(!D||D.type?new Ho(null,e,P):D),P.abort(),P=null)},e.cancelToken&&e.cancelToken.subscribe(C),e.signal&&(e.signal.aborted?C():e.signal.addEventListener("abort",C)));const H=$6(B);if(H&&ii.protocols.indexOf(H)===-1){s(new Qe("Unsupported protocol "+H+":",Qe.ERR_BAD_REQUEST,e));return}P.send(o||null)})},af={http:v6,xhr:U6};ae.forEach(af,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Xm=e=>`- ${e}`,G6=e=>ae.isFunction(e)||e===null||e===!1,tb={getAdapter:e=>{e=ae.isArray(e)?e:[e];const{length:t}=e;let r,s;const o={};for(let c=0;c`adapter ${v} `+(C===!1?"is not supported by the environment":"is not available in the build"));let p=t?c.length>1?`since : + */var Ot=typeof Symbol=="function"&&Symbol.for,Wp=Ot?Symbol.for("react.element"):60103,$p=Ot?Symbol.for("react.portal"):60106,md=Ot?Symbol.for("react.fragment"):60107,xd=Ot?Symbol.for("react.strict_mode"):60108,vd=Ot?Symbol.for("react.profiler"):60114,yd=Ot?Symbol.for("react.provider"):60109,bd=Ot?Symbol.for("react.context"):60110,Xp=Ot?Symbol.for("react.async_mode"):60111,wd=Ot?Symbol.for("react.concurrent_mode"):60111,kd=Ot?Symbol.for("react.forward_ref"):60112,Cd=Ot?Symbol.for("react.suspense"):60113,c8=Ot?Symbol.for("react.suspense_list"):60120,Sd=Ot?Symbol.for("react.memo"):60115,Ad=Ot?Symbol.for("react.lazy"):60116,d8=Ot?Symbol.for("react.block"):60121,u8=Ot?Symbol.for("react.fundamental"):60117,h8=Ot?Symbol.for("react.responder"):60118,f8=Ot?Symbol.for("react.scope"):60119;function yr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Wp:switch(e=e.type,e){case Xp:case wd:case md:case vd:case xd:case Cd:return e;default:switch(e=e&&e.$$typeof,e){case bd:case kd:case Ad:case Sd:case yd:return e;default:return t}}case $p:return t}}}function xy(e){return yr(e)===wd}st.AsyncMode=Xp;st.ConcurrentMode=wd;st.ContextConsumer=bd;st.ContextProvider=yd;st.Element=Wp;st.ForwardRef=kd;st.Fragment=md;st.Lazy=Ad;st.Memo=Sd;st.Portal=$p;st.Profiler=vd;st.StrictMode=xd;st.Suspense=Cd;st.isAsyncMode=function(e){return xy(e)||yr(e)===Xp};st.isConcurrentMode=xy;st.isContextConsumer=function(e){return yr(e)===bd};st.isContextProvider=function(e){return yr(e)===yd};st.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wp};st.isForwardRef=function(e){return yr(e)===kd};st.isFragment=function(e){return yr(e)===md};st.isLazy=function(e){return yr(e)===Ad};st.isMemo=function(e){return yr(e)===Sd};st.isPortal=function(e){return yr(e)===$p};st.isProfiler=function(e){return yr(e)===vd};st.isStrictMode=function(e){return yr(e)===xd};st.isSuspense=function(e){return yr(e)===Cd};st.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===md||e===wd||e===vd||e===xd||e===Cd||e===c8||typeof e=="object"&&e!==null&&(e.$$typeof===Ad||e.$$typeof===Sd||e.$$typeof===yd||e.$$typeof===bd||e.$$typeof===kd||e.$$typeof===u8||e.$$typeof===h8||e.$$typeof===f8||e.$$typeof===d8)};st.typeOf=yr;my.exports=st;var p8=my.exports;function jd(e,t){if(e==null)return{};var r={},s=Object.keys(e),o,c;for(c=0;c=0)&&(r[o]=e[o]);return r}var vy=p8,g8={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},m8={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},yy={};yy[vy.ForwardRef]=g8;yy[vy.Memo]=m8;var Au=1073741823,pm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{};function x8(){var e="__global_unique_id__";return pm[e]=(pm[e]||0)+1}function v8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function y8(e){var t=[];return{on:function(s){t.push(s)},off:function(s){t=t.filter(function(o){return o!==s})},get:function(){return e},set:function(s,o){e=s,t.forEach(function(c){return c(e,o)})}}}function b8(e){return Array.isArray(e)?e[0]:e}function w8(e,t){var r,s,o="__create-react-context-"+x8()+"__",c=function(v){oi(C,v);function C(){for(var E,P=arguments.length,B=new Array(P),M=0;M"u"&&(Gs=Zp);function _8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var M8=Gs(function(e,t){var r=e.innerRef,s=e.navigate,o=e.onClick,c=jd(e,["innerRef","navigate","onClick"]),p=c.target,v=Bt({},c,{onClick:function(A){try{o&&o(A)}catch(E){throw A.preventDefault(),E}!A.defaultPrevented&&A.button===0&&(!p||p==="_self")&&!_8(A)&&(A.preventDefault(),s())}});return Zp!==Gs?v.ref=t||r:v.ref=r,ge.createElement("a",v)}),rt=Gs(function(e,t){var r=e.component,s=r===void 0?M8:r,o=e.replace,c=e.to,p=e.innerRef,v=jd(e,["component","replace","to","innerRef"]);return ge.createElement(vn.Consumer,null,function(C){C||Nn(!1);var A=C.history,E=Kh(Qh(c,C.location),C.location),P=E?A.createHref(E):"",B=Bt({},v,{href:P,navigate:function(){var H=Qh(c,C.location),D=ar(C.location)===ar(Kh(H)),Z=o||D?A.replace:A.push;Z(H)}});return Zp!==Gs?B.ref=t||p:B.innerRef=p,ge.createElement(s,B)})}),Cy=function(t){return t},Lc=ge.forwardRef;typeof Lc>"u"&&(Lc=Cy);function O8(){for(var e=arguments.length,t=new Array(e),r=0;rtypeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,sa=()=>{const e=Object.create(null);return(t,r,...s)=>{const o=(c=>JSON.stringify(c,z8))(t);return o in e?e[o]:e[o]=r(t,...s)}},Xn=Symbol.for("sxs.internal"),qp=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),km=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:F8}=Object.prototype,Jh=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),D8=/\s+(?![^()]*\))/,fs=e=>t=>e(...typeof t=="string"?String(t).split(D8):[t]),Cm={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:fs((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:fs((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:fs((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:fs((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:fs((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:fs((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},Eu=/([\d.]+)([^]*)/,H8=(e,t)=>e.length?e.reduce((r,s)=>(r.push(...t.map(o=>o.includes("&")?o.replace(/&/g,/[ +>|~]/.test(s)&&/&.*&/.test(o)?`:is(${s})`:s):s+" "+o)),r),[]):t,B8=(e,t)=>e in V8&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(r,s,o,c)=>s+(o==="stretch"?`-moz-available${c};${Jh(e)}:${s}-webkit-fill-available`:`-moz-fit-content${c};${Jh(e)}:${s}fit-content`)+c):String(t),V8={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},Oi=e=>e?e+"-":"",Sy=(e,t,r)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(s,o,c,p,v)=>p=="$"==!!c?s:(o||p=="--"?"calc(":"")+"var(--"+(p==="$"?Oi(t)+(v.includes("$")?"":Oi(r))+v.replace(/\$/g,"-"):v)+")"+(o||p=="--"?"*"+(o||"")+(c||"1")+")":"")),W8=/\s*,\s*(?![^()]*\))/,$8=Object.prototype.toString,Ps=(e,t,r,s,o)=>{let c,p,v;const C=(A,E,P)=>{let B,M;const H=D=>{for(B in D){const V=B.charCodeAt(0)===64,_=V&&Array.isArray(D[B])?D[B]:[D[B]];for(M of _){const K=/[A-Z]/.test(W=B)?W:W.replace(/-[^]/g,X=>X[1].toUpperCase()),ee=typeof M=="object"&&M&&M.toString===$8&&(!s.utils[K]||!E.length);if(K in s.utils&&!ee){const X=s.utils[K];if(X!==p){p=X,H(X(M)),p=null;continue}}else if(K in Cm){const X=Cm[K];if(X!==v){v=X,H(X(M)),v=null;continue}}if(V&&(Z=B.slice(1)in s.media?"@media "+s.media[B.slice(1)]:B,B=Z.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(X,Q,J,he,oe,Te)=>{const we=Eu.test(Q),Ee=.0625*(we?-1:1),[Fe,Re]=we?[he,Q]:[Q,he];return"("+(J[0]==="="?"":J[0]===">"===we?"max-":"min-")+Fe+":"+(J[0]!=="="&&J.length===1?Re.replace(Eu,(qe,it,de)=>Number(it)+Ee*(J===">"?1:-1)+de):Re)+(oe?") and ("+(oe[0]===">"?"min-":"max-")+Fe+":"+(oe.length===1?Te.replace(Eu,(qe,it,de)=>Number(it)+Ee*(oe===">"?-1:1)+de):Te):"")+")"})),ee){const X=V?P.concat(B):[...P],Q=V?[...E]:H8(E,B.split(W8));c!==void 0&&o(Sm(...c)),c=void 0,C(M,Q,X)}else c===void 0&&(c=[[],E,P]),B=V||B.charCodeAt(0)!==36?B:`--${Oi(s.prefix)}${B.slice(1).replace(/\$/g,"-")}`,M=ee?M:typeof M=="number"?M&&K in X8?String(M)+"px":String(M):Sy(B8(K,M??""),s.prefix,s.themeMap[K]),c[0].push(`${V?`${B} `:`${Jh(B)}:`}${M}`)}}var Z,W};H(A),c!==void 0&&o(Sm(...c)),c=void 0};C(e,t,r)},Sm=(e,t,r)=>`${r.map(s=>`${s}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(r.length?r.length+1:0).join("}")}`,X8={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},Am=e=>String.fromCharCode(e+(e>25?39:97)),Yn=e=>(t=>{let r,s="";for(r=Math.abs(t);r>52;r=r/52|0)s=Am(r%52)+s;return Am(r%52)+s})(((t,r)=>{let s=r.length;for(;s;)t=33*t^r.charCodeAt(--s);return t})(5381,JSON.stringify(e))>>>0),Ma=["themed","global","styled","onevar","resonevar","allvar","inline"],Y8=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},U8=e=>{let t;const r=()=>{const{cssRules:o}=t.sheet;return[].map.call(o,(c,p)=>{const{cssText:v}=c;let C="";if(v.startsWith("--sxs"))return"";if(o[p-1]&&(C=o[p-1].cssText).startsWith("--sxs")){if(!c.cssRules.length)return"";for(const A in t.rules)if(t.rules[A].group===c)return`--sxs{--sxs:${[...t.rules[A].cache].join(" ")}}${v}`;return c.cssRules.length?`${C}${v}`:""}return v}).join("")},s=()=>{if(t){const{rules:v,sheet:C}=t;if(!C.deleteRule){for(;Object(Object(C.cssRules)[0]).type===3;)C.cssRules.splice(0,1);C.cssRules=[]}for(const A in v)delete v[A]}const o=Object(e).styleSheets||[];for(const v of o)if(Y8(v)){for(let C=0,A=v.cssRules;A[C];++C){const E=Object(A[C]);if(E.type!==1)continue;const P=Object(A[C+1]);if(P.type!==4)continue;++C;const{cssText:B}=E;if(!B.startsWith("--sxs"))continue;const M=B.slice(14,-3).trim().split(/\s+/),H=Ma[M[0]];H&&(t||(t={sheet:v,reset:s,rules:{},toString:r}),t.rules[H]={group:P,index:C,cache:new Set(M)})}if(t)break}if(!t){const v=(C,A)=>({type:A,cssRules:[],insertRule(E,P){this.cssRules.splice(P,0,v(E,{import:3,undefined:1}[(E.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return C==="@media{}"?`@media{${[].map.call(this.cssRules,E=>E.cssText).join("")}}`:C}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:v("","text/css"),rules:{},reset:s,toString:r}}const{sheet:c,rules:p}=t;for(let v=Ma.length-1;v>=0;--v){const C=Ma[v];if(!p[C]){const A=Ma[v+1],E=p[A]?p[A].index:c.cssRules.length;c.insertRule("@media{}",E),c.insertRule(`--sxs{--sxs:${v}}`,E),p[C]={group:c.cssRules[E+1],index:E,cache:new Set([v])}}G8(p[C])}};return s(),t},G8=e=>{const t=e.group;let r=t.cssRules.length;e.apply=s=>{try{t.insertRule(s,r),++r}catch{}}},wa=Symbol(),Z8=sa(),jm=(e,t)=>Z8(e,()=>(...r)=>{let s={type:null,composers:new Set};for(const o of r)if(o!=null)if(o[Xn]){s.type==null&&(s.type=o[Xn].type);for(const c of o[Xn].composers)s.composers.add(c)}else o.constructor!==Object||o.$$typeof?s.type==null&&(s.type=o):s.composers.add(q8(o,e));return s.type==null&&(s.type="span"),s.composers.size||s.composers.add(["PJLV",{},[],[],{},[]]),Q8(e,s,t)}),q8=({variants:e,compoundVariants:t,defaultVariants:r,...s},o)=>{const c=`${Oi(o.prefix)}c-${Yn(s)}`,p=[],v=[],C=Object.create(null),A=[];for(const B in r)C[B]=String(r[B]);if(typeof e=="object"&&e)for(const B in e){E=C,P=B,F8.call(E,P)||(C[B]="undefined");const M=e[B];for(const H in M){const D={[B]:String(H)};String(H)==="undefined"&&A.push(B);const Z=M[H],W=[D,Z,!km(Z)];p.push(W)}}var E,P;if(typeof t=="object"&&t)for(const B of t){let{css:M,...H}=B;M=typeof M=="object"&&M||{};for(const Z in H)H[Z]=String(H[Z]);const D=[H,M,!km(M)];v.push(D)}return[c,s,p,v,C,A]},Q8=(e,t,r)=>{const[s,o,c,p]=K8(t.composers),v=typeof t.type=="function"||t.type.$$typeof?(P=>{function B(){for(let M=0;MB.rules[M]={apply:H=>B[wa].push([M,H])}),B})(r):null,C=(v||r).rules,A=`.${s}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,E=P=>{P=typeof P=="object"&&P||J8;const{css:B,...M}=P,H={};for(const W in c)if(delete M[W],W in P){let V=P[W];typeof V=="object"&&V?H[W]={"@initial":c[W],...V}:(V=String(V),H[W]=V!=="undefined"||p.has(W)?V:c[W])}else H[W]=c[W];const D=new Set([...o]);for(const[W,V,_,K]of t.composers){r.rules.styled.cache.has(W)||(r.rules.styled.cache.add(W),Ps(V,[`.${W}`],[],e,Q=>{C.styled.apply(Q)}));const ee=Nm(_,H,e.media),X=Nm(K,H,e.media,!0);for(const Q of ee)if(Q!==void 0)for(const[J,he,oe]of Q){const Te=`${W}-${Yn(he)}-${J}`;D.add(Te);const we=(oe?r.rules.resonevar:r.rules.onevar).cache,Ee=oe?C.resonevar:C.onevar;we.has(Te)||(we.add(Te),Ps(he,[`.${Te}`],[],e,Fe=>{Ee.apply(Fe)}))}for(const Q of X)if(Q!==void 0)for(const[J,he]of Q){const oe=`${W}-${Yn(he)}-${J}`;D.add(oe),r.rules.allvar.cache.has(oe)||(r.rules.allvar.cache.add(oe),Ps(he,[`.${oe}`],[],e,Te=>{C.allvar.apply(Te)}))}}if(typeof B=="object"&&B){const W=`${s}-i${Yn(B)}-css`;D.add(W),r.rules.inline.cache.has(W)||(r.rules.inline.cache.add(W),Ps(B,[`.${W}`],[],e,V=>{C.inline.apply(V)}))}for(const W of String(P.className||"").trim().split(/\s+/))W&&D.add(W);const Z=M.className=[...D].join(" ");return{type:t.type,className:Z,selector:A,props:M,toString:()=>Z,deferredInjector:v}};return qp(E,{className:s,selector:A,[Xn]:t,toString:()=>(r.rules.styled.cache.has(s)||E(),s)})},K8=e=>{let t="";const r=[],s={},o=[];for(const[c,,,,p,v]of e){t===""&&(t=c),r.push(c),o.push(...v);for(const C in p){const A=p[C];(s[C]===void 0||A!=="undefined"||v.includes(A))&&(s[C]=A)}}return[t,r,s,new Set(o)]},Nm=(e,t,r,s)=>{const o=[];e:for(let[c,p,v]of e){if(v)continue;let C,A=0,E=!1;for(C in c){const P=c[C];let B=t[C];if(B!==P){if(typeof B!="object"||!B)continue e;{let M,H,D=0;for(const Z in B){if(P===String(B[Z])){if(Z!=="@initial"){const W=Z.slice(1);(H=H||[]).push(W in r?r[W]:Z.replace(/^@media ?/,"")),E=!0}A+=D,M=!0}++D}if(H&&H.length&&(p={["@media "+H.join(", ")]:p}),!M)continue e}}}(o[A]=o[A]||[]).push([s?"cv":`${C}-${c[C]}`,p,E])}return o},J8={},e7=sa(),t7=(e,t)=>e7(e,()=>(...r)=>{const s=()=>{for(let o of r){o=typeof o=="object"&&o||{};let c=Yn(o);if(!t.rules.global.cache.has(c)){if(t.rules.global.cache.add(c),"@import"in o){let p=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let v of[].concat(o["@import"]))v=v.includes('"')||v.includes("'")?v:`"${v}"`,t.sheet.insertRule(`@import ${v};`,p++);delete o["@import"]}Ps(o,[],[],e,p=>{t.rules.global.apply(p)})}}return""};return qp(s,{toString:s})}),r7=sa(),i7=(e,t)=>r7(e,()=>r=>{const s=`${Oi(e.prefix)}k-${Yn(r)}`,o=()=>{if(!t.rules.global.cache.has(s)){t.rules.global.cache.add(s);const c=[];Ps(r,[],[],e,v=>c.push(v));const p=`@keyframes ${s}{${c.join("")}}`;t.rules.global.apply(p)}return s};return qp(o,{get name(){return o()},toString:o})}),n7=class{constructor(t,r,s,o){this.token=t==null?"":String(t),this.value=r==null?"":String(r),this.scale=s==null?"":String(s),this.prefix=o==null?"":String(o)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+Oi(this.prefix)+Oi(this.scale)+this.token}toString(){return this.computedValue}},s7=sa(),a7=(e,t)=>s7(e,()=>(r,s)=>{s=typeof r=="object"&&r||Object(s);const o=`.${r=(r=typeof r=="string"?r:"")||`${Oi(e.prefix)}t-${Yn(s)}`}`,c={},p=[];for(const C in s){c[C]={};for(const A in s[C]){const E=`--${Oi(e.prefix)}${C}-${A}`,P=Sy(String(s[C][A]),e.prefix,C);c[C][A]=new n7(A,P,C,e.prefix),p.push(`${E}:${P}`)}}const v=()=>{if(p.length&&!t.rules.themed.cache.has(r)){t.rules.themed.cache.add(r);const C=`${s===e.theme?":root,":""}.${r}{${p.join(";")}}`;t.rules.themed.apply(C)}return r};return{...c,get className(){return v()},selector:o,toString:v}}),o7=sa(),Em,l7=sa(),Qp=e=>{const t=(r=>{let s=!1;const o=o7(r,c=>{s=!0;const p="prefix"in(c=typeof c=="object"&&c||{})?String(c.prefix):"",v=typeof c.media=="object"&&c.media||{},C=typeof c.root=="object"?c.root||null:globalThis.document||null,A=typeof c.theme=="object"&&c.theme||{},E={prefix:p,media:v,theme:A,themeMap:typeof c.themeMap=="object"&&c.themeMap||{...I8},utils:typeof c.utils=="object"&&c.utils||{}},P=U8(C),B={css:jm(E,P),globalCss:t7(E,P),keyframes:i7(E,P),createTheme:a7(E,P),reset(){P.reset(),B.theme.toString()},theme:{},sheet:P,config:E,prefix:p,getCssText:P.toString,toString:P.toString};return String(B.theme=B.createTheme(A)),B});return s||o.reset(),o})(e);return t.styled=(({config:r,sheet:s})=>l7(r,()=>{const o=jm(r,s);return(...c)=>{const p=o(...c),v=p[Xn].type,C=ge.forwardRef((A,E)=>{const P=A&&A.as||v,{props:B,deferredInjector:M}=p(A);return delete B.as,B.ref=E,M?ge.createElement(ge.Fragment,null,ge.createElement(P,B),ge.createElement(M,null)):ge.createElement(P,B)});return C.className=p.className,C.displayName=`Styled.${v.displayName||v.name||v}`,C.selector=p.selector,C.toString=()=>p.selector,C[Xn]=p[Xn],C}}))(t),t},Ay=()=>Em||(Em=Qp()),jy=(...e)=>Ay().createTheme(...e),c7=(...e)=>Ay().css(...e);const{styled:bt,css:KL}=Qp({theme:{colors:{waspYellow:"#ffcc00",gray700:"#a1a5ab",gray600:"#d1d5db",gray500:"gainsboro",gray400:"#f0f0f0",red:"#FED7D7",darkRed:"#fa3838",green:"#C6F6D5",brand:"$waspYellow",brandAccent:"#ffdb46",errorBackground:"$red",errorText:"#2D3748",successBackground:"$green",successText:"#2D3748",submitButtonText:"black",formErrorText:"$darkRed"},fontSizes:{sm:"0.875rem"}}});var Fo=e=>e.type==="checkbox",Ts=e=>e instanceof Date,Kt=e=>e==null;const Ny=e=>typeof e=="object";var At=e=>!Kt(e)&&!Array.isArray(e)&&Ny(e)&&!Ts(e),d7=e=>At(e)&&e.target?Fo(e.target)?e.target.checked:e.target.value:e,u7=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,h7=(e,t)=>e.has(u7(t)),f7=e=>{const t=e.constructor&&e.constructor.prototype;return At(t)&&t.hasOwnProperty("isPrototypeOf")},Kp=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function kr(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Kp&&(e instanceof Blob||e instanceof FileList))&&(r||At(e)))if(t=r?[]:{},!r&&!f7(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=kr(e[s]));else return e;return t}var Do=e=>Array.isArray(e)?e.filter(Boolean):[],vt=e=>e===void 0,Ne=(e,t,r)=>{if(!t||!At(e))return r;const s=Do(t.split(/[,[\].]+?/)).reduce((o,c)=>Kt(o)?o:o[c],e);return vt(s)||s===e?vt(e[t])?r:e[t]:s},Ci=e=>typeof e=="boolean";const Lm={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Vr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},mi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ge.createContext(null);var p7=(e,t,r,s=!0)=>{const o={defaultValues:t._defaultValues};for(const c in e)Object.defineProperty(o,c,{get:()=>{const p=c;return t._proxyFormState[p]!==Vr.all&&(t._proxyFormState[p]=!s||Vr.all),r&&(r[p]=!0),e[p]}});return o},Sr=e=>At(e)&&!Object.keys(e).length,g7=(e,t,r,s)=>{r(e);const{name:o,...c}=e;return Sr(c)||Object.keys(c).length>=Object.keys(t).length||Object.keys(c).find(p=>t[p]===(!s||Vr.all))},Lu=e=>Array.isArray(e)?e:[e];function m7(e){const t=ge.useRef(e);t.current=e,ge.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var ri=e=>typeof e=="string",x7=(e,t,r,s,o)=>ri(e)?(s&&t.watch.add(e),Ne(r,e,o)):Array.isArray(e)?e.map(c=>(s&&t.watch.add(c),Ne(r,c))):(s&&(t.watchAll=!0),r),Jp=e=>/^\w*$/.test(e),Ey=e=>Do(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dt=(e,t,r)=>{let s=-1;const o=Jp(t)?[t]:Ey(t),c=o.length,p=c-1;for(;++st?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[s]:o||!0}}:{},Pm=e=>({isOnSubmit:!e||e===Vr.onSubmit,isOnBlur:e===Vr.onBlur,isOnChange:e===Vr.onChange,isOnAll:e===Vr.all,isOnTouch:e===Vr.onTouched}),Tm=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Ga=(e,t,r,s)=>{for(const o of r||Object.keys(e)){const c=Ne(e,o);if(c){const{_f:p,...v}=c;if(p){if(p.refs&&p.refs[0]&&t(p.refs[0],o)&&!s)break;if(p.ref&&t(p.ref,p.name)&&!s)break;Ga(v,t)}else At(v)&&Ga(v,t)}}};var y7=(e,t,r)=>{const s=Do(Ne(e,r));return dt(s,"root",t[r]),dt(e,r,s),e},e1=e=>e.type==="file",sn=e=>typeof e=="function",Pc=e=>{if(!Kp)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Vl=e=>ri(e),t1=e=>e.type==="radio",Tc=e=>e instanceof RegExp;const Rm={value:!1,isValid:!1},_m={value:!0,isValid:!0};var Ly=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!vt(e[0].attributes.value)?vt(e[0].value)||e[0].value===""?_m:{value:e[0].value,isValid:!0}:_m:Rm}return Rm};const Mm={isValid:!1,value:null};var Py=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Mm):Mm;function Om(e,t,r="validate"){if(Vl(e)||Array.isArray(e)&&e.every(Vl)||Ci(e)&&!e)return{type:r,message:Vl(e)?e:"",ref:t}}var ps=e=>At(e)&&!Tc(e)?e:{value:e,message:""},Im=async(e,t,r,s,o)=>{const{ref:c,refs:p,required:v,maxLength:C,minLength:A,min:E,max:P,pattern:B,validate:M,name:H,valueAsNumber:D,mount:Z,disabled:W}=e._f,V=Ne(t,H);if(!Z||W)return{};const _=p?p[0]:c,K=we=>{s&&_.reportValidity&&(_.setCustomValidity(Ci(we)?"":we||""),_.reportValidity())},ee={},X=t1(c),Q=Fo(c),J=X||Q,he=(D||e1(c))&&vt(c.value)&&vt(V)||Pc(c)&&c.value===""||V===""||Array.isArray(V)&&!V.length,oe=v7.bind(null,H,r,ee),Te=(we,Ee,Fe,Re=mi.maxLength,qe=mi.minLength)=>{const it=we?Ee:Fe;ee[H]={type:we?Re:qe,message:it,ref:c,...oe(we?Re:qe,it)}};if(o?!Array.isArray(V)||!V.length:v&&(!J&&(he||Kt(V))||Ci(V)&&!V||Q&&!Ly(p).isValid||X&&!Py(p).isValid)){const{value:we,message:Ee}=Vl(v)?{value:!!v,message:v}:ps(v);if(we&&(ee[H]={type:mi.required,message:Ee,ref:_,...oe(mi.required,Ee)},!r))return K(Ee),ee}if(!he&&(!Kt(E)||!Kt(P))){let we,Ee;const Fe=ps(P),Re=ps(E);if(!Kt(V)&&!isNaN(V)){const qe=c.valueAsNumber||V&&+V;Kt(Fe.value)||(we=qe>Fe.value),Kt(Re.value)||(Ee=qenew Date(new Date().toDateString()+" "+le),de=c.type=="time",ce=c.type=="week";ri(Fe.value)&&V&&(we=de?it(V)>it(Fe.value):ce?V>Fe.value:qe>new Date(Fe.value)),ri(Re.value)&&V&&(Ee=de?it(V)+we.value,Re=!Kt(Ee.value)&&V.length<+Ee.value;if((Fe||Re)&&(Te(Fe,we.message,Ee.message),!r))return K(ee[H].message),ee}if(B&&!he&&ri(V)){const{value:we,message:Ee}=ps(B);if(Tc(we)&&!V.match(we)&&(ee[H]={type:mi.pattern,message:Ee,ref:c,...oe(mi.pattern,Ee)},!r))return K(Ee),ee}if(M){if(sn(M)){const we=await M(V,t),Ee=Om(we,_);if(Ee&&(ee[H]={...Ee,...oe(mi.validate,Ee.message)},!r))return K(Ee.message),ee}else if(At(M)){let we={};for(const Ee in M){if(!Sr(we)&&!r)break;const Fe=Om(await M[Ee](V,t),_,Ee);Fe&&(we={...Fe,...oe(Ee,Fe.message)},K(Fe.message),r&&(ee[H]=we))}if(!Sr(we)&&(ee[H]={ref:_,...we},!r))return ee}}return K(!0),ee};function b7(e,t){const r=t.slice(0,-1).length;let s=0;for(;s{let e=[];return{get observers(){return e},next:o=>{for(const c of e)c.next&&c.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(c=>c!==o)}}),unsubscribe:()=>{e=[]}}},Rc=e=>Kt(e)||!Ny(e);function Bn(e,t){if(Rc(e)||Rc(t))return e===t;if(Ts(e)&&Ts(t))return e.getTime()===t.getTime();const r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;for(const o of r){const c=e[o];if(!s.includes(o))return!1;if(o!=="ref"){const p=t[o];if(Ts(c)&&Ts(p)||At(c)&&At(p)||Array.isArray(c)&&Array.isArray(p)?!Bn(c,p):c!==p)return!1}}return!0}var Ty=e=>e.type==="select-multiple",k7=e=>t1(e)||Fo(e),Tu=e=>Pc(e)&&e.isConnected,C7=e=>At(e)&&Object.values(e).some(t=>t),Ry=e=>{for(const t in e)if(sn(e[t]))return!0;return!1};function _c(e,t={}){const r=Array.isArray(e);if(At(e)||r)for(const s in e)Array.isArray(e[s])||At(e[s])&&!Ry(e[s])?(t[s]=Array.isArray(e[s])?[]:{},_c(e[s],t[s])):Kt(e[s])||(t[s]=!0);return t}function _y(e,t,r){const s=Array.isArray(e);if(At(e)||s)for(const o in e)Array.isArray(e[o])||At(e[o])&&!Ry(e[o])?vt(t)||Rc(r[o])?r[o]=Array.isArray(e[o])?_c(e[o],[]):{..._c(e[o])}:_y(e[o],Kt(t)?{}:t[o],r[o]):r[o]=!Bn(e[o],t[o]);return r}var yl=(e,t)=>_y(e,t,_c(t)),My=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:s})=>vt(e)?e:t?e===""?NaN:e&&+e:r&&ri(e)?new Date(e):s?s(e):e;function Ru(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return e1(t)?t.files:t1(t)?Py(e.refs).value:Ty(t)?[...t.selectedOptions].map(({value:r})=>r):Fo(t)?Ly(e.refs).value:My(vt(t.value)?e.ref.value:t.value,e)}var S7=(e,t,r,s)=>{const o={};for(const c of e){const p=Ne(t,c);p&&dt(o,c,p._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:s}},ka=e=>vt(e)?e:Tc(e)?e.source:At(e)?Tc(e.value)?e.value.source:e.value:e,A7=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function zm(e,t,r){const s=Ne(e,r);if(s||Jp(r))return{error:s,name:r};const o=r.split(".");for(;o.length;){const c=o.join("."),p=Ne(t,c),v=Ne(e,c);if(p&&!Array.isArray(p)&&r!==c)return{name:r};if(v&&v.type)return{name:c,error:v};o.pop()}return{name:r}}var j7=(e,t,r,s,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?s.isOnBlur:o.isOnBlur)?!e:(r?s.isOnChange:o.isOnChange)?e:!0,N7=(e,t)=>!Do(Ne(e,t)).length&&Rt(e,t);const E7={mode:Vr.onSubmit,reValidateMode:Vr.onChange,shouldFocusError:!0};function L7(e={}){let t={...E7,...e},r={submitCount:0,isDirty:!1,isLoading:sn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},s={},o=At(t.defaultValues)||At(t.values)?kr(t.defaultValues||t.values)||{}:{},c=t.shouldUnregister?{}:kr(o),p={action:!1,mount:!1,watch:!1},v={mount:new Set,unMount:new Set,array:new Set,watch:new Set},C,A=0;const E={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},P={values:Pu(),array:Pu(),state:Pu()},B=Pm(t.mode),M=Pm(t.reValidateMode),H=t.criteriaMode===Vr.all,D=q=>re=>{clearTimeout(A),A=setTimeout(q,re)},Z=async q=>{if(E.isValid||q){const re=t.resolver?Sr((await J()).errors):await oe(s,!0);re!==r.isValid&&P.state.next({isValid:re})}},W=(q,re)=>{(E.isValidating||E.validatingFields)&&(re.forEach(se=>{dt(r.validatingFields,se,q)}),r.isValidating=C7(r.validatingFields),P.state.next({validatingFields:r.validatingFields,isValidating:r.isValidating}))},V=(q,re=[],se,ye,xe=!0,pe=!0)=>{if(ye&&se){if(p.action=!0,pe&&Array.isArray(Ne(s,q))){const Pe=se(Ne(s,q),ye.argA,ye.argB);xe&&dt(s,q,Pe)}if(pe&&Array.isArray(Ne(r.errors,q))){const Pe=se(Ne(r.errors,q),ye.argA,ye.argB);xe&&dt(r.errors,q,Pe),N7(r.errors,q)}if(E.touchedFields&&pe&&Array.isArray(Ne(r.touchedFields,q))){const Pe=se(Ne(r.touchedFields,q),ye.argA,ye.argB);xe&&dt(r.touchedFields,q,Pe)}E.dirtyFields&&(r.dirtyFields=yl(o,c)),P.state.next({name:q,isDirty:we(q,re),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else dt(c,q,re)},_=(q,re)=>{dt(r.errors,q,re),P.state.next({errors:r.errors})},K=q=>{r.errors=q,P.state.next({errors:r.errors,isValid:!1})},ee=(q,re,se,ye)=>{const xe=Ne(s,q);if(xe){const pe=Ne(c,q,vt(se)?Ne(o,q):se);vt(pe)||ye&&ye.defaultChecked||re?dt(c,q,re?pe:Ru(xe._f)):Re(q,pe),p.mount&&Z()}},X=(q,re,se,ye,xe)=>{let pe=!1,Pe=!1;const et={name:q},wt=!!(Ne(s,q)&&Ne(s,q)._f.disabled);if(!se||ye){E.isDirty&&(Pe=r.isDirty,r.isDirty=et.isDirty=we(),pe=Pe!==et.isDirty);const Pt=wt||Bn(Ne(o,q),re);Pe=!!(!wt&&Ne(r.dirtyFields,q)),Pt||wt?Rt(r.dirtyFields,q):dt(r.dirtyFields,q,!0),et.dirtyFields=r.dirtyFields,pe=pe||E.dirtyFields&&Pe!==!Pt}if(se){const Pt=Ne(r.touchedFields,q);Pt||(dt(r.touchedFields,q,se),et.touchedFields=r.touchedFields,pe=pe||E.touchedFields&&Pt!==se)}return pe&&xe&&P.state.next(et),pe?et:{}},Q=(q,re,se,ye)=>{const xe=Ne(r.errors,q),pe=E.isValid&&Ci(re)&&r.isValid!==re;if(e.delayError&&se?(C=D(()=>_(q,se)),C(e.delayError)):(clearTimeout(A),C=null,se?dt(r.errors,q,se):Rt(r.errors,q)),(se?!Bn(xe,se):xe)||!Sr(ye)||pe){const Pe={...ye,...pe&&Ci(re)?{isValid:re}:{},errors:r.errors,name:q};r={...r,...Pe},P.state.next(Pe)}W(!1,Object.keys(r.validatingFields).filter(Pe=>Pe===q))},J=async q=>t.resolver(c,t.context,S7(q||v.mount,s,t.criteriaMode,t.shouldUseNativeValidation)),he=async q=>{const{errors:re}=await J(q);if(q)for(const se of q){const ye=Ne(re,se);ye?dt(r.errors,se,ye):Rt(r.errors,se)}else r.errors=re;return re},oe=async(q,re,se={valid:!0})=>{for(const ye in q){const xe=q[ye];if(xe){const{_f:pe,...Pe}=xe;if(pe){const et=v.array.has(pe.name),wt=await Im(xe,c,H,t.shouldUseNativeValidation&&!re,et);if(wt[pe.name]&&(se.valid=!1,re))break;!re&&(Ne(wt,pe.name)?et?y7(r.errors,wt,pe.name):dt(r.errors,pe.name,wt[pe.name]):Rt(r.errors,pe.name))}Pe&&await oe(Pe,re,se)}}return se.valid},Te=()=>{for(const q of v.unMount){const re=Ne(s,q);re&&(re._f.refs?re._f.refs.every(se=>!Tu(se)):!Tu(re._f.ref))&&Be(q)}v.unMount=new Set},we=(q,re)=>(q&&re&&dt(c,q,re),!Bn(Ae(),o)),Ee=(q,re,se)=>x7(q,v,{...p.mount?c:vt(re)?o:ri(q)?{[q]:re}:re},se,re),Fe=q=>Do(Ne(p.mount?c:o,q,e.shouldUnregister?Ne(o,q,[]):[])),Re=(q,re,se={})=>{const ye=Ne(s,q);let xe=re;if(ye){const pe=ye._f;pe&&(!pe.disabled&&dt(c,q,My(re,pe)),xe=Pc(pe.ref)&&Kt(re)?"":re,Ty(pe.ref)?[...pe.ref.options].forEach(Pe=>Pe.selected=xe.includes(Pe.value)):pe.refs?Fo(pe.ref)?pe.refs.length>1?pe.refs.forEach(Pe=>(!Pe.defaultChecked||!Pe.disabled)&&(Pe.checked=Array.isArray(xe)?!!xe.find(et=>et===Pe.value):xe===Pe.value)):pe.refs[0]&&(pe.refs[0].checked=!!xe):pe.refs.forEach(Pe=>Pe.checked=Pe.value===xe):e1(pe.ref)?pe.ref.value="":(pe.ref.value=xe,pe.ref.type||P.values.next({name:q,values:{...c}})))}(se.shouldDirty||se.shouldTouch)&&X(q,xe,se.shouldTouch,se.shouldDirty,!0),se.shouldValidate&&le(q)},qe=(q,re,se)=>{for(const ye in re){const xe=re[ye],pe=`${q}.${ye}`,Pe=Ne(s,pe);(v.array.has(q)||!Rc(xe)||Pe&&!Pe._f)&&!Ts(xe)?qe(pe,xe,se):Re(pe,xe,se)}},it=(q,re,se={})=>{const ye=Ne(s,q),xe=v.array.has(q),pe=kr(re);dt(c,q,pe),xe?(P.array.next({name:q,values:{...c}}),(E.isDirty||E.dirtyFields)&&se.shouldDirty&&P.state.next({name:q,dirtyFields:yl(o,c),isDirty:we(q,pe)})):ye&&!ye._f&&!Kt(pe)?qe(q,pe,se):Re(q,pe,se),Tm(q,v)&&P.state.next({...r}),P.values.next({name:p.mount?q:void 0,values:{...c}})},de=async q=>{const re=q.target;let se=re.name,ye=!0;const xe=Ne(s,se),pe=()=>re.type?Ru(xe._f):d7(q),Pe=et=>{ye=Number.isNaN(et)||et===Ne(c,se,et)};if(xe){let et,wt;const Pt=pe(),Vi=q.type===Lm.BLUR||q.type===Lm.FOCUS_OUT,Zo=!A7(xe._f)&&!t.resolver&&!Ne(r.errors,se)&&!xe._f.deps||j7(Vi,Ne(r.touchedFields,se),r.isSubmitted,M,B),ds=Tm(se,v,Vi);dt(c,se,Pt),Vi?(xe._f.onBlur&&xe._f.onBlur(q),C&&C(0)):xe._f.onChange&&xe._f.onChange(q);const ua=X(se,Pt,Vi,!1),qo=!Sr(ua)||ds;if(!Vi&&P.values.next({name:se,type:q.type,values:{...c}}),Zo)return E.isValid&&Z(),qo&&P.state.next({name:se,...ds?{}:ua});if(!Vi&&ds&&P.state.next({...r}),W(!0,[se]),t.resolver){const{errors:Qo}=await J([se]);if(Pe(Pt),ye){const Ko=zm(r.errors,s,se),Jo=zm(Qo,s,Ko.name||se);et=Jo.error,se=Jo.name,wt=Sr(Qo)}}else et=(await Im(xe,c,H,t.shouldUseNativeValidation))[se],Pe(Pt),ye&&(et?wt=!1:E.isValid&&(wt=await oe(s,!0)));ye&&(xe._f.deps&&le(xe._f.deps),Q(se,wt,et,ua))}},ce=(q,re)=>{if(Ne(r.errors,re)&&q.focus)return q.focus(),1},le=async(q,re={})=>{let se,ye;const xe=Lu(q);if(W(!0,xe),t.resolver){const pe=await he(vt(q)?q:xe);se=Sr(pe),ye=q?!xe.some(Pe=>Ne(pe,Pe)):se}else q?(ye=(await Promise.all(xe.map(async pe=>{const Pe=Ne(s,pe);return await oe(Pe&&Pe._f?{[pe]:Pe}:Pe)}))).every(Boolean),!(!ye&&!r.isValid)&&Z()):ye=se=await oe(s);return P.state.next({...!ri(q)||E.isValid&&se!==r.isValid?{}:{name:q},...t.resolver||!q?{isValid:se}:{},errors:r.errors,isValidating:!1}),re.shouldFocus&&!ye&&Ga(s,ce,q?xe:v.mount),ye},Ae=q=>{const re={...o,...p.mount?c:{}};return vt(q)?re:ri(q)?Ne(re,q):q.map(se=>Ne(re,se))},je=(q,re)=>({invalid:!!Ne((re||r).errors,q),isDirty:!!Ne((re||r).dirtyFields,q),isTouched:!!Ne((re||r).touchedFields,q),isValidating:!!Ne((re||r).validatingFields,q),error:Ne((re||r).errors,q)}),ze=q=>{q&&Lu(q).forEach(re=>Rt(r.errors,re)),P.state.next({errors:q?r.errors:{}})},Ue=(q,re,se)=>{const ye=(Ne(s,q,{_f:{}})._f||{}).ref;dt(r.errors,q,{...re,ref:ye}),P.state.next({name:q,errors:r.errors,isValid:!1}),se&&se.shouldFocus&&ye&&ye.focus&&ye.focus()},He=(q,re)=>sn(q)?P.values.subscribe({next:se=>q(Ee(void 0,re),se)}):Ee(q,re,!0),Be=(q,re={})=>{for(const se of q?Lu(q):v.mount)v.mount.delete(se),v.array.delete(se),re.keepValue||(Rt(s,se),Rt(c,se)),!re.keepError&&Rt(r.errors,se),!re.keepDirty&&Rt(r.dirtyFields,se),!re.keepTouched&&Rt(r.touchedFields,se),!re.keepIsValidating&&Rt(r.validatingFields,se),!t.shouldUnregister&&!re.keepDefaultValue&&Rt(o,se);P.values.next({values:{...c}}),P.state.next({...r,...re.keepDirty?{isDirty:we()}:{}}),!re.keepIsValid&&Z()},Me=({disabled:q,name:re,field:se,fields:ye,value:xe})=>{if(Ci(q)){const pe=q?void 0:vt(xe)?Ru(se?se._f:Ne(ye,re)._f):xe;dt(c,re,pe),X(re,pe,!1,!1,!0)}},Nt=(q,re={})=>{let se=Ne(s,q);const ye=Ci(re.disabled);return dt(s,q,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:q}},name:q,mount:!0,...re}}),v.mount.add(q),se?Me({field:se,disabled:re.disabled,name:q,value:re.value}):ee(q,!0,re.value),{...ye?{disabled:re.disabled}:{},...t.progressive?{required:!!re.required,min:ka(re.min),max:ka(re.max),minLength:ka(re.minLength),maxLength:ka(re.maxLength),pattern:ka(re.pattern)}:{},name:q,onChange:de,onBlur:de,ref:xe=>{if(xe){Nt(q,re),se=Ne(s,q);const pe=vt(xe.value)&&xe.querySelectorAll&&xe.querySelectorAll("input,select,textarea")[0]||xe,Pe=k7(pe),et=se._f.refs||[];if(Pe?et.find(wt=>wt===pe):pe===se._f.ref)return;dt(s,q,{_f:{...se._f,...Pe?{refs:[...et.filter(Tu),pe,...Array.isArray(Ne(o,q))?[{}]:[]],ref:{type:pe.type,name:q}}:{ref:pe}}}),ee(q,!1,void 0,pe)}else se=Ne(s,q,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||re.shouldUnregister)&&!(h7(v.array,q)&&p.action)&&v.unMount.add(q)}}},hr=()=>t.shouldFocusError&&Ga(s,ce,v.mount),ls=q=>{Ci(q)&&(P.state.next({disabled:q}),Ga(s,(re,se)=>{let ye=q;const xe=Ne(s,se);xe&&Ci(xe._f.disabled)&&(ye||(ye=xe._f.disabled)),re.disabled=ye},0,!1))},Bi=(q,re)=>async se=>{let ye;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let xe=kr(c);if(P.state.next({isSubmitting:!0}),t.resolver){const{errors:pe,values:Pe}=await J();r.errors=pe,xe=Pe}else await oe(s);if(Rt(r.errors,"root"),Sr(r.errors)){P.state.next({errors:{}});try{await q(xe,se)}catch(pe){ye=pe}}else re&&await re({...r.errors},se),hr(),setTimeout(hr);if(P.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sr(r.errors)&&!ye,submitCount:r.submitCount+1,errors:r.errors}),ye)throw ye},Uo=(q,re={})=>{Ne(s,q)&&(vt(re.defaultValue)?it(q,kr(Ne(o,q))):(it(q,re.defaultValue),dt(o,q,kr(re.defaultValue))),re.keepTouched||Rt(r.touchedFields,q),re.keepDirty||(Rt(r.dirtyFields,q),r.isDirty=re.defaultValue?we(q,kr(Ne(o,q))):we()),re.keepError||(Rt(r.errors,q),E.isValid&&Z()),P.state.next({...r}))},da=(q,re={})=>{const se=q?kr(q):o,ye=kr(se),xe=Sr(q),pe=xe?o:ye;if(re.keepDefaultValues||(o=se),!re.keepValues){if(re.keepDirtyValues)for(const Pe of v.mount)Ne(r.dirtyFields,Pe)?dt(pe,Pe,Ne(c,Pe)):it(Pe,Ne(pe,Pe));else{if(Kp&&vt(q))for(const Pe of v.mount){const et=Ne(s,Pe);if(et&&et._f){const wt=Array.isArray(et._f.refs)?et._f.refs[0]:et._f.ref;if(Pc(wt)){const Pt=wt.closest("form");if(Pt){Pt.reset();break}}}}s={}}c=e.shouldUnregister?re.keepDefaultValues?kr(o):{}:kr(pe),P.array.next({values:{...pe}}),P.values.next({values:{...pe}})}v={mount:re.keepDirtyValues?v.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},p.mount=!E.isValid||!!re.keepIsValid||!!re.keepDirtyValues,p.watch=!!e.shouldUnregister,P.state.next({submitCount:re.keepSubmitCount?r.submitCount:0,isDirty:xe?!1:re.keepDirty?r.isDirty:!!(re.keepDefaultValues&&!Bn(q,o)),isSubmitted:re.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:xe?[]:re.keepDirtyValues?re.keepDefaultValues&&c?yl(o,c):r.dirtyFields:re.keepDefaultValues&&q?yl(o,q):{},touchedFields:re.keepTouched?r.touchedFields:{},errors:re.keepErrors?r.errors:{},isSubmitSuccessful:re.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},cs=(q,re)=>da(sn(q)?q(c):q,re);return{control:{register:Nt,unregister:Be,getFieldState:je,handleSubmit:Bi,setError:Ue,_executeSchema:J,_getWatch:Ee,_getDirty:we,_updateValid:Z,_removeUnmounted:Te,_updateFieldArray:V,_updateDisabledField:Me,_getFieldArray:Fe,_reset:da,_resetDefaultValues:()=>sn(t.defaultValues)&&t.defaultValues().then(q=>{cs(q,t.resetOptions),P.state.next({isLoading:!1})}),_updateFormState:q=>{r={...r,...q}},_disableForm:ls,_subjects:P,_proxyFormState:E,_setErrors:K,get _fields(){return s},get _formValues(){return c},get _state(){return p},set _state(q){p=q},get _defaultValues(){return o},get _names(){return v},set _names(q){v=q},get _formState(){return r},set _formState(q){r=q},get _options(){return t},set _options(q){t={...t,...q}}},trigger:le,register:Nt,handleSubmit:Bi,watch:He,setValue:it,getValues:Ae,reset:cs,resetField:Uo,clearErrors:ze,unregister:Be,setError:Ue,setFocus:(q,re={})=>{const se=Ne(s,q),ye=se&&se._f;if(ye){const xe=ye.refs?ye.refs[0]:ye.ref;xe.focus&&(xe.focus(),re.shouldSelect&&xe.select())}},getFieldState:je}}function Oy(e={}){const t=ge.useRef(),r=ge.useRef(),[s,o]=ge.useState({isDirty:!1,isValidating:!1,isLoading:sn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:sn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...L7(e),formState:s});const c=t.current.control;return c._options=e,m7({subject:c._subjects.state,next:p=>{g7(p,c._proxyFormState,c._updateFormState,!0)&&o({...c._formState})}}),ge.useEffect(()=>c._disableForm(e.disabled),[c,e.disabled]),ge.useEffect(()=>{if(c._proxyFormState.isDirty){const p=c._getDirty();p!==s.isDirty&&c._subjects.state.next({isDirty:p})}},[c,s.isDirty]),ge.useEffect(()=>{e.values&&!Bn(e.values,r.current)?(c._reset(e.values,c._options.resetOptions),r.current=e.values,o(p=>({...p}))):c._resetDefaultValues()},[e.values,c]),ge.useEffect(()=>{e.errors&&c._setErrors(e.errors)},[e.errors,c]),ge.useEffect(()=>{c._state.mount||(c._updateValid(),c._state.mount=!0),c._state.watch&&(c._state.watch=!1,c._subjects.state.next({...c._formState})),c._removeUnmounted()}),ge.useEffect(()=>{e.shouldUnregister&&c._subjects.values.next({values:c._getWatch()})},[e.shouldUnregister,c]),t.current.formState=p7(s,c),t.current}function P7(e){return e==null?void 0:e.replace(/\/$/,"")}const T7=P7("https://backend.captn.ai")||"http://localhost:3001",r1={apiUrl:T7};var Mc;(function(e){e.Get="GET",e.Post="POST",e.Put="PUT",e.Delete="DELETE"})(Mc||(Mc={}));const R7=bt("form",{marginTop:"1.5rem"}),Wl=bt("div",{"& + div":{marginTop:"1.5rem"}}),ef=bt("label",{display:"block !important",fontSize:"$sm !important",fontWeight:"500 !important",marginBottom:"0.5rem !important"}),Iy={display:"block !important",lineHeight:"1.5rem !important",fontSize:"$sm !important",borderWidth:"1px !important",borderColor:"$gray600 !important",backgroundColor:"#f8f4ff !important",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05) !important","&:focus":{borderWidth:"1px !important",borderColor:"$gray700 !important",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05) !important"},"&:disabled":{opacity:"0.5 !important",cursor:"not-allowed !important",backgroundColor:"$gray400 !important",borderColor:"$gray400 !important",color:"$gray500 !important"},borderRadius:"0.375rem !important",width:"100% !important",paddingTop:"0.375rem !important",paddingBottom:"0.375rem !important",paddingLeft:"0.75rem !important",paddingRight:"0.75rem !important",margin:"0 !important"},tf=bt("input",Iy),_7=bt("textarea",Iy),rf=bt("div",{display:"block",fontSize:"$sm",fontWeight:"500",color:"$formErrorText",marginTop:"0.5rem"}),M7=bt("button",{display:"flex !important",justifyContent:"center !important",width:"100% !important",borderWidth:"1px !important",borderColor:"$brand !important",backgroundColor:"$brand !important",color:"$submitButtonText !important",padding:"0.5rem 0.75rem !important",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05) !important",fontWeight:"600 !important",fontSize:"$sm !important",lineHeight:"1.25rem !important",borderRadius:"0.375rem !important","&:hover":{backgroundColor:"$brandAccent !important",borderColor:"$brandAccent !important"},"&:disabled":{opacity:"0.5 !important",cursor:"not-allowed !important",backgroundColor:"$gray400 !important",borderColor:"$gray400 !important",color:"$gray500 !important"},transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1) !important",transitionDuration:"100ms !important"}),O7=c7({width:"1.25rem",height:"1.25rem"}),I7=()=>f.jsx("svg",{className:O7(),"aria-hidden":"true",fill:"currentColor",viewBox:"0 0 24 24",children:f.jsx("g",{id:"brand",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:f.jsx("g",{id:"google",fill:"#000000",fillRule:"nonzero",children:f.jsx("path",{d:"M11.99,13.9 L11.99,10.18 L21.35,10.18 C21.49,10.81 21.6,11.4 21.6,12.23 C21.6,17.94 17.77,22 12,22 C6.48,22 2,17.52 2,12 C2,6.48 6.48,2 12,2 C14.7,2 16.96,2.99 18.69,4.61 L15.85,7.37 C15.13,6.69 13.87,5.89 12,5.89 C8.69,5.89 5.99,8.64 5.99,12.01 C5.99,15.38 8.69,18.13 12,18.13 C15.83,18.13 17.24,15.48 17.5,13.91 L11.99,13.91 L11.99,13.9 Z",id:"Shape"})})})}),z7=bt("a",{display:"flex !important",justifyContent:"center !important",cursor:"pointer !important",color:"inherit !important",backgroundColor:"#f0f0f0 !important",borderRadius:"0.375rem !important",borderWidth:"1px !important",borderColor:"$gray600 !important",fontSize:"13px !important",padding:"0.5rem 0.75rem !important",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05) !important","&:visited":{color:"inherit !important"},"&:hover":{backgroundColor:"$gray500 !important",color:"inherit !important"},transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1) !important",transitionDuration:"100ms !important"});function zy(e,t){return function(){return e.apply(t,arguments)}}const{toString:F7}=Object.prototype,{getPrototypeOf:i1}=Object,Ed=(e=>t=>{const r=F7.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ui=e=>(e=e.toLowerCase(),t=>Ed(t)===e),Ld=e=>t=>typeof t===e,{isArray:aa}=Array,go=Ld("undefined");function D7(e){return e!==null&&!go(e)&&e.constructor!==null&&!go(e.constructor)&&Tr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fy=ui("ArrayBuffer");function H7(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Fy(e.buffer),t}const B7=Ld("string"),Tr=Ld("function"),Dy=Ld("number"),Pd=e=>e!==null&&typeof e=="object",V7=e=>e===!0||e===!1,$l=e=>{if(Ed(e)!=="object")return!1;const t=i1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},W7=ui("Date"),$7=ui("File"),X7=ui("Blob"),Y7=ui("FileList"),U7=e=>Pd(e)&&Tr(e.pipe),G7=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tr(e.append)&&((t=Ed(e))==="formdata"||t==="object"&&Tr(e.toString)&&e.toString()==="[object FormData]"))},Z7=ui("URLSearchParams"),q7=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ho(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),aa(e))for(s=0,o=e.length;s0;)if(o=r[s],t===o.toLowerCase())return o;return null}const By=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vy=e=>!go(e)&&e!==By;function nf(){const{caseless:e}=Vy(this)&&this||{},t={},r=(s,o)=>{const c=e&&Hy(t,o)||o;$l(t[c])&&$l(s)?t[c]=nf(t[c],s):$l(s)?t[c]=nf({},s):aa(s)?t[c]=s.slice():t[c]=s};for(let s=0,o=arguments.length;s(Ho(t,(o,c)=>{r&&Tr(o)?e[c]=zy(o,r):e[c]=o},{allOwnKeys:s}),e),K7=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),J7=(e,t,r,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},e6=(e,t,r,s)=>{let o,c,p;const v={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),c=o.length;c-- >0;)p=o[c],(!s||s(p,e,t))&&!v[p]&&(t[p]=e[p],v[p]=!0);e=r!==!1&&i1(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},t6=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const s=e.indexOf(t,r);return s!==-1&&s===r},r6=e=>{if(!e)return null;if(aa(e))return e;let t=e.length;if(!Dy(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},i6=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&i1(Uint8Array)),n6=(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=s.next())&&!o.done;){const c=o.value;t.call(e,c[0],c[1])}},s6=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},a6=ui("HTMLFormElement"),o6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,o){return s.toUpperCase()+o}),Fm=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),l6=ui("RegExp"),Wy=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};Ho(r,(o,c)=>{let p;(p=t(o,c,e))!==!1&&(s[c]=p||o)}),Object.defineProperties(e,s)},c6=e=>{Wy(e,(t,r)=>{if(Tr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(Tr(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},d6=(e,t)=>{const r={},s=o=>{o.forEach(c=>{r[c]=!0})};return aa(e)?s(e):s(String(e).split(t)),r},u6=()=>{},h6=(e,t)=>(e=+e,Number.isFinite(e)?e:t),_u="abcdefghijklmnopqrstuvwxyz",Dm="0123456789",$y={DIGIT:Dm,ALPHA:_u,ALPHA_DIGIT:_u+_u.toUpperCase()+Dm},f6=(e=16,t=$y.ALPHA_DIGIT)=>{let r="";const{length:s}=t;for(;e--;)r+=t[Math.random()*s|0];return r};function p6(e){return!!(e&&Tr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const g6=e=>{const t=new Array(10),r=(s,o)=>{if(Pd(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[o]=s;const c=aa(s)?[]:{};return Ho(s,(p,v)=>{const C=r(p,o+1);!go(C)&&(c[v]=C)}),t[o]=void 0,c}}return s};return r(e,0)},m6=ui("AsyncFunction"),x6=e=>e&&(Pd(e)||Tr(e))&&Tr(e.then)&&Tr(e.catch),ae={isArray:aa,isArrayBuffer:Fy,isBuffer:D7,isFormData:G7,isArrayBufferView:H7,isString:B7,isNumber:Dy,isBoolean:V7,isObject:Pd,isPlainObject:$l,isUndefined:go,isDate:W7,isFile:$7,isBlob:X7,isRegExp:l6,isFunction:Tr,isStream:U7,isURLSearchParams:Z7,isTypedArray:i6,isFileList:Y7,forEach:Ho,merge:nf,extend:Q7,trim:q7,stripBOM:K7,inherits:J7,toFlatObject:e6,kindOf:Ed,kindOfTest:ui,endsWith:t6,toArray:r6,forEachEntry:n6,matchAll:s6,isHTMLForm:a6,hasOwnProperty:Fm,hasOwnProp:Fm,reduceDescriptors:Wy,freezeMethods:c6,toObjectSet:d6,toCamelCase:o6,noop:u6,toFiniteNumber:h6,findKey:Hy,global:By,isContextDefined:Vy,ALPHABET:$y,generateString:f6,isSpecCompliantForm:p6,toJSONObject:g6,isAsyncFn:m6,isThenable:x6};function Qe(e,t,r,s,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o)}ae.inherits(Qe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ae.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Xy=Qe.prototype,Yy={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Yy[e]={value:e}});Object.defineProperties(Qe,Yy);Object.defineProperty(Xy,"isAxiosError",{value:!0});Qe.from=(e,t,r,s,o,c)=>{const p=Object.create(Xy);return ae.toFlatObject(e,p,function(C){return C!==Error.prototype},v=>v!=="isAxiosError"),Qe.call(p,e.message,t,r,s,o),p.cause=e,p.name=e.name,c&&Object.assign(p,c),p};const v6=null;function sf(e){return ae.isPlainObject(e)||ae.isArray(e)}function Uy(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function Hm(e,t,r){return e?e.concat(t).map(function(o,c){return o=Uy(o),!r&&c?"["+o+"]":o}).join(r?".":""):t}function y6(e){return ae.isArray(e)&&!e.some(sf)}const b6=ae.toFlatObject(ae,{},null,function(t){return/^is[A-Z]/.test(t)});function Td(e,t,r){if(!ae.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=ae.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(D,Z){return!ae.isUndefined(Z[D])});const s=r.metaTokens,o=r.visitor||E,c=r.dots,p=r.indexes,C=(r.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(t);if(!ae.isFunction(o))throw new TypeError("visitor must be a function");function A(H){if(H===null)return"";if(ae.isDate(H))return H.toISOString();if(!C&&ae.isBlob(H))throw new Qe("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(H)||ae.isTypedArray(H)?C&&typeof Blob=="function"?new Blob([H]):Buffer.from(H):H}function E(H,D,Z){let W=H;if(H&&!Z&&typeof H=="object"){if(ae.endsWith(D,"{}"))D=s?D:D.slice(0,-2),H=JSON.stringify(H);else if(ae.isArray(H)&&y6(H)||(ae.isFileList(H)||ae.endsWith(D,"[]"))&&(W=ae.toArray(H)))return D=Uy(D),W.forEach(function(_,K){!(ae.isUndefined(_)||_===null)&&t.append(p===!0?Hm([D],K,c):p===null?D:D+"[]",A(_))}),!1}return sf(H)?!0:(t.append(Hm(Z,D,c),A(H)),!1)}const P=[],B=Object.assign(b6,{defaultVisitor:E,convertValue:A,isVisitable:sf});function M(H,D){if(!ae.isUndefined(H)){if(P.indexOf(H)!==-1)throw Error("Circular reference detected in "+D.join("."));P.push(H),ae.forEach(H,function(W,V){(!(ae.isUndefined(W)||W===null)&&o.call(t,W,ae.isString(V)?V.trim():V,D,B))===!0&&M(W,D?D.concat(V):[V])}),P.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return M(e),t}function Bm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function n1(e,t){this._pairs=[],e&&Td(e,this,t)}const Gy=n1.prototype;Gy.append=function(t,r){this._pairs.push([t,r])};Gy.toString=function(t){const r=t?function(s){return t.call(this,s,Bm)}:Bm;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function w6(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zy(e,t,r){if(!t)return e;const s=r&&r.encode||w6,o=r&&r.serialize;let c;if(o?c=o(t,r):c=ae.isURLSearchParams(t)?t.toString():new n1(t,r).toString(s),c){const p=e.indexOf("#");p!==-1&&(e=e.slice(0,p)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class Vm{constructor(){this.handlers=[]}use(t,r,s){return this.handlers.push({fulfilled:t,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ae.forEach(this.handlers,function(s){s!==null&&t(s)})}}const qy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},k6=typeof URLSearchParams<"u"?URLSearchParams:n1,C6=typeof FormData<"u"?FormData:null,S6=typeof Blob<"u"?Blob:null,A6={isBrowser:!0,classes:{URLSearchParams:k6,FormData:C6,Blob:S6},protocols:["http","https","file","blob","url","data"]},Qy=typeof window<"u"&&typeof document<"u",j6=(e=>Qy&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),N6=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",E6=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qy,hasStandardBrowserEnv:j6,hasStandardBrowserWebWorkerEnv:N6},Symbol.toStringTag,{value:"Module"})),ii={...E6,...A6};function L6(e,t){return Td(e,new ii.classes.URLSearchParams,Object.assign({visitor:function(r,s,o,c){return ii.isNode&&ae.isBuffer(r)?(this.append(s,r.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)}},t))}function P6(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function T6(e){const t={},r=Object.keys(e);let s;const o=r.length;let c;for(s=0;s=r.length;return p=!p&&ae.isArray(o)?o.length:p,C?(ae.hasOwnProp(o,p)?o[p]=[o[p],s]:o[p]=s,!v):((!o[p]||!ae.isObject(o[p]))&&(o[p]=[]),t(r,s,o[p],c)&&ae.isArray(o[p])&&(o[p]=T6(o[p])),!v)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const r={};return ae.forEachEntry(e,(s,o)=>{t(P6(s),o,r,0)}),r}return null}function R6(e,t,r){if(ae.isString(e))try{return(t||JSON.parse)(e),ae.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(e)}const s1={transitional:qy,adapter:["xhr","http"],transformRequest:[function(t,r){const s=r.getContentType()||"",o=s.indexOf("application/json")>-1,c=ae.isObject(t);if(c&&ae.isHTMLForm(t)&&(t=new FormData(t)),ae.isFormData(t))return o?JSON.stringify(Ky(t)):t;if(ae.isArrayBuffer(t)||ae.isBuffer(t)||ae.isStream(t)||ae.isFile(t)||ae.isBlob(t))return t;if(ae.isArrayBufferView(t))return t.buffer;if(ae.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let v;if(c){if(s.indexOf("application/x-www-form-urlencoded")>-1)return L6(t,this.formSerializer).toString();if((v=ae.isFileList(t))||s.indexOf("multipart/form-data")>-1){const C=this.env&&this.env.FormData;return Td(v?{"files[]":t}:t,C&&new C,this.formSerializer)}}return c||o?(r.setContentType("application/json",!1),R6(t)):t}],transformResponse:[function(t){const r=this.transitional||s1.transitional,s=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&ae.isString(t)&&(s&&!this.responseType||o)){const p=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(v){if(p)throw v.name==="SyntaxError"?Qe.from(v,Qe.ERR_BAD_RESPONSE,this,null,this.response):v}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ii.classes.FormData,Blob:ii.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ae.forEach(["delete","get","head","post","put","patch"],e=>{s1.headers[e]={}});const a1=s1,_6=ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),M6=e=>{const t={};let r,s,o;return e&&e.split(` +`).forEach(function(p){o=p.indexOf(":"),r=p.substring(0,o).trim().toLowerCase(),s=p.substring(o+1).trim(),!(!r||t[r]&&_6[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t},Wm=Symbol("internals");function Ca(e){return e&&String(e).trim().toLowerCase()}function Xl(e){return e===!1||e==null?e:ae.isArray(e)?e.map(Xl):String(e)}function O6(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(e);)t[s[1]]=s[2];return t}const I6=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Mu(e,t,r,s,o){if(ae.isFunction(s))return s.call(this,t,r);if(o&&(t=r),!!ae.isString(t)){if(ae.isString(s))return t.indexOf(s)!==-1;if(ae.isRegExp(s))return s.test(t)}}function z6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function F6(e,t){const r=ae.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+r,{value:function(o,c,p){return this[s].call(this,t,o,c,p)},configurable:!0})})}class Rd{constructor(t){t&&this.set(t)}set(t,r,s){const o=this;function c(v,C,A){const E=Ca(C);if(!E)throw new Error("header name must be a non-empty string");const P=ae.findKey(o,E);(!P||o[P]===void 0||A===!0||A===void 0&&o[P]!==!1)&&(o[P||C]=Xl(v))}const p=(v,C)=>ae.forEach(v,(A,E)=>c(A,E,C));return ae.isPlainObject(t)||t instanceof this.constructor?p(t,r):ae.isString(t)&&(t=t.trim())&&!I6(t)?p(M6(t),r):t!=null&&c(r,t,s),this}get(t,r){if(t=Ca(t),t){const s=ae.findKey(this,t);if(s){const o=this[s];if(!r)return o;if(r===!0)return O6(o);if(ae.isFunction(r))return r.call(this,o,s);if(ae.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Ca(t),t){const s=ae.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||Mu(this,this[s],s,r)))}return!1}delete(t,r){const s=this;let o=!1;function c(p){if(p=Ca(p),p){const v=ae.findKey(s,p);v&&(!r||Mu(s,s[v],v,r))&&(delete s[v],o=!0)}}return ae.isArray(t)?t.forEach(c):c(t),o}clear(t){const r=Object.keys(this);let s=r.length,o=!1;for(;s--;){const c=r[s];(!t||Mu(this,this[c],c,t,!0))&&(delete this[c],o=!0)}return o}normalize(t){const r=this,s={};return ae.forEach(this,(o,c)=>{const p=ae.findKey(s,c);if(p){r[p]=Xl(o),delete r[c];return}const v=t?z6(c):String(c).trim();v!==c&&delete r[c],r[v]=Xl(o),s[v]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return ae.forEach(this,(s,o)=>{s!=null&&s!==!1&&(r[o]=t&&ae.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const s=new this(t);return r.forEach(o=>s.set(o)),s}static accessor(t){const s=(this[Wm]=this[Wm]={accessors:{}}).accessors,o=this.prototype;function c(p){const v=Ca(p);s[v]||(F6(o,p),s[v]=!0)}return ae.isArray(t)?t.forEach(c):c(t),this}}Rd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(Rd.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});ae.freezeMethods(Rd);const Ei=Rd;function Ou(e,t){const r=this||a1,s=t||r,o=Ei.from(s.headers);let c=s.data;return ae.forEach(e,function(v){c=v.call(r,c,o.normalize(),t?t.status:void 0)}),o.normalize(),c}function Jy(e){return!!(e&&e.__CANCEL__)}function Bo(e,t,r){Qe.call(this,e??"canceled",Qe.ERR_CANCELED,t,r),this.name="CanceledError"}ae.inherits(Bo,Qe,{__CANCEL__:!0});function D6(e,t,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?e(r):t(new Qe("Request failed with status code "+r.status,[Qe.ERR_BAD_REQUEST,Qe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const H6=ii.hasStandardBrowserEnv?{write(e,t,r,s,o,c){const p=[e+"="+encodeURIComponent(t)];ae.isNumber(r)&&p.push("expires="+new Date(r).toGMTString()),ae.isString(s)&&p.push("path="+s),ae.isString(o)&&p.push("domain="+o),c===!0&&p.push("secure"),document.cookie=p.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function B6(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function V6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function eb(e,t){return e&&!B6(t)?V6(e,t):t}const W6=ii.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let s;function o(c){let p=c;return t&&(r.setAttribute("href",p),p=r.href),r.setAttribute("href",p),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return s=o(window.location.href),function(p){const v=ae.isString(p)?o(p):p;return v.protocol===s.protocol&&v.host===s.host}}():function(){return function(){return!0}}();function $6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function X6(e,t){e=e||10;const r=new Array(e),s=new Array(e);let o=0,c=0,p;return t=t!==void 0?t:1e3,function(C){const A=Date.now(),E=s[c];p||(p=A),r[o]=C,s[o]=A;let P=c,B=0;for(;P!==o;)B+=r[P++],P=P%e;if(o=(o+1)%e,o===c&&(c=(c+1)%e),A-p{const c=o.loaded,p=o.lengthComputable?o.total:void 0,v=c-r,C=s(v),A=c<=p;r=c;const E={loaded:c,total:p,progress:p?c/p:void 0,bytes:v,rate:C||void 0,estimated:C&&p&&A?(p-c)/C:void 0,event:o};E[t?"download":"upload"]=!0,e(E)}}const Y6=typeof XMLHttpRequest<"u",U6=Y6&&function(e){return new Promise(function(r,s){let o=e.data;const c=Ei.from(e.headers).normalize();let{responseType:p,withXSRFToken:v}=e,C;function A(){e.cancelToken&&e.cancelToken.unsubscribe(C),e.signal&&e.signal.removeEventListener("abort",C)}let E;if(ae.isFormData(o)){if(ii.hasStandardBrowserEnv||ii.hasStandardBrowserWebWorkerEnv)c.setContentType(!1);else if((E=c.getContentType())!==!1){const[D,...Z]=E?E.split(";").map(W=>W.trim()).filter(Boolean):[];c.setContentType([D||"multipart/form-data",...Z].join("; "))}}let P=new XMLHttpRequest;if(e.auth){const D=e.auth.username||"",Z=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";c.set("Authorization","Basic "+btoa(D+":"+Z))}const B=eb(e.baseURL,e.url);P.open(e.method.toUpperCase(),Zy(B,e.params,e.paramsSerializer),!0),P.timeout=e.timeout;function M(){if(!P)return;const D=Ei.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),W={data:!p||p==="text"||p==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:D,config:e,request:P};D6(function(_){r(_),A()},function(_){s(_),A()},W),P=null}if("onloadend"in P?P.onloadend=M:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(M)},P.onabort=function(){P&&(s(new Qe("Request aborted",Qe.ECONNABORTED,e,P)),P=null)},P.onerror=function(){s(new Qe("Network Error",Qe.ERR_NETWORK,e,P)),P=null},P.ontimeout=function(){let Z=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const W=e.transitional||qy;e.timeoutErrorMessage&&(Z=e.timeoutErrorMessage),s(new Qe(Z,W.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,e,P)),P=null},ii.hasStandardBrowserEnv&&(v&&ae.isFunction(v)&&(v=v(e)),v||v!==!1&&W6(B))){const D=e.xsrfHeaderName&&e.xsrfCookieName&&H6.read(e.xsrfCookieName);D&&c.set(e.xsrfHeaderName,D)}o===void 0&&c.setContentType(null),"setRequestHeader"in P&&ae.forEach(c.toJSON(),function(Z,W){P.setRequestHeader(W,Z)}),ae.isUndefined(e.withCredentials)||(P.withCredentials=!!e.withCredentials),p&&p!=="json"&&(P.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&P.addEventListener("progress",$m(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&P.upload&&P.upload.addEventListener("progress",$m(e.onUploadProgress)),(e.cancelToken||e.signal)&&(C=D=>{P&&(s(!D||D.type?new Bo(null,e,P):D),P.abort(),P=null)},e.cancelToken&&e.cancelToken.subscribe(C),e.signal&&(e.signal.aborted?C():e.signal.addEventListener("abort",C)));const H=$6(B);if(H&&ii.protocols.indexOf(H)===-1){s(new Qe("Unsupported protocol "+H+":",Qe.ERR_BAD_REQUEST,e));return}P.send(o||null)})},af={http:v6,xhr:U6};ae.forEach(af,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Xm=e=>`- ${e}`,G6=e=>ae.isFunction(e)||e===null||e===!1,tb={getAdapter:e=>{e=ae.isArray(e)?e:[e];const{length:t}=e;let r,s;const o={};for(let c=0;c`adapter ${v} `+(C===!1?"is not supported by the environment":"is not available in the build"));let p=t?c.length>1?`since : `+c.map(Xm).join(` -`):" "+Xm(c[0]):"as no adapter specified";throw new Qe("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return s},adapters:af};function Iu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ho(null,e)}function Ym(e){return Iu(e),e.headers=Ei.from(e.headers),e.data=Ou.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tb.getAdapter(e.adapter||a1.adapter)(e).then(function(s){return Iu(e),s.data=Ou.call(e,e.transformResponse,s),s.headers=Ei.from(s.headers),s},function(s){return Jy(s)||(Iu(e),s&&s.response&&(s.response.data=Ou.call(e,e.transformResponse,s.response),s.response.headers=Ei.from(s.response.headers))),Promise.reject(s)})}const Um=e=>e instanceof Ei?e.toJSON():e;function Gs(e,t){t=t||{};const r={};function s(A,L,P){return ae.isPlainObject(A)&&ae.isPlainObject(L)?ae.merge.call({caseless:P},A,L):ae.isPlainObject(L)?ae.merge({},L):ae.isArray(L)?L.slice():L}function o(A,L,P){if(ae.isUndefined(L)){if(!ae.isUndefined(A))return s(void 0,A,P)}else return s(A,L,P)}function c(A,L){if(!ae.isUndefined(L))return s(void 0,L)}function p(A,L){if(ae.isUndefined(L)){if(!ae.isUndefined(A))return s(void 0,A)}else return s(void 0,L)}function v(A,L,P){if(P in t)return s(A,L);if(P in e)return s(void 0,A)}const C={url:c,method:c,data:c,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:v,headers:(A,L)=>o(Um(A),Um(L),!0)};return ae.forEach(Object.keys(Object.assign({},e,t)),function(L){const P=C[L]||o,B=P(e[L],t[L],L);ae.isUndefined(B)&&P!==v||(r[L]=B)}),r}const rb="1.6.7",o1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{o1[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Gm={};o1.transitional=function(t,r,s){function o(c,p){return"[Axios v"+rb+"] Transitional option '"+c+"'"+p+(s?". "+s:"")}return(c,p,v)=>{if(t===!1)throw new Qe(o(p," has been removed"+(r?" in "+r:"")),Qe.ERR_DEPRECATED);return r&&!Gm[p]&&(Gm[p]=!0,console.warn(o(p," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(c,p,v):!0}};function Z6(e,t,r){if(typeof e!="object")throw new Qe("options must be an object",Qe.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let o=s.length;for(;o-- >0;){const c=s[o],p=t[c];if(p){const v=e[c],C=v===void 0||p(v,c,e);if(C!==!0)throw new Qe("option "+c+" must be "+C,Qe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Qe("Unknown option "+c,Qe.ERR_BAD_OPTION)}}const of={assertOptions:Z6,validators:o1},$i=of.validators;class Oc{constructor(t){this.defaults=t,this.interceptors={request:new Vm,response:new Vm}}async request(t,r){try{return await this._request(t,r)}catch(s){if(s instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const c=o.stack?o.stack.replace(/^.+\n/,""):"";s.stack?c&&!String(s.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(s.stack+=` -`+c):s.stack=c}throw s}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Gs(this.defaults,r);const{transitional:s,paramsSerializer:o,headers:c}=r;s!==void 0&&of.assertOptions(s,{silentJSONParsing:$i.transitional($i.boolean),forcedJSONParsing:$i.transitional($i.boolean),clarifyTimeoutError:$i.transitional($i.boolean)},!1),o!=null&&(ae.isFunction(o)?r.paramsSerializer={serialize:o}:of.assertOptions(o,{encode:$i.function,serialize:$i.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let p=c&&ae.merge(c.common,c[r.method]);c&&ae.forEach(["delete","get","head","post","put","patch","common"],H=>{delete c[H]}),r.headers=Ei.concat(p,c);const v=[];let C=!0;this.interceptors.request.forEach(function(D){typeof D.runWhen=="function"&&D.runWhen(r)===!1||(C=C&&D.synchronous,v.unshift(D.fulfilled,D.rejected))});const A=[];this.interceptors.response.forEach(function(D){A.push(D.fulfilled,D.rejected)});let L,P=0,B;if(!C){const H=[Ym.bind(this),void 0];for(H.unshift.apply(H,v),H.push.apply(H,A),B=H.length,L=Promise.resolve(r);P{if(!s._listeners)return;let c=s._listeners.length;for(;c-- >0;)s._listeners[c](o);s._listeners=null}),this.promise.then=o=>{let c;const p=new Promise(v=>{s.subscribe(v),c=v}).then(o);return p.cancel=function(){s.unsubscribe(c)},p},t(function(c,p,v){s.reason||(s.reason=new Ho(c,p,v),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new l1(function(o){t=o}),cancel:t}}}const q6=l1;function Q6(e){return function(r){return e.apply(null,r)}}function K6(e){return ae.isObject(e)&&e.isAxiosError===!0}const lf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(lf).forEach(([e,t])=>{lf[t]=e});const J6=lf;function ib(e){const t=new Yl(e),r=zy(Yl.prototype.request,t);return ae.extend(r,Yl.prototype,t,{allOwnKeys:!0}),ae.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return ib(Gs(e,o))},r}const jt=ib(a1);jt.Axios=Yl;jt.CanceledError=Ho;jt.CancelToken=q6;jt.isCancel=Jy;jt.VERSION=rb;jt.toFormData=Td;jt.AxiosError=Qe;jt.Cancel=jt.CanceledError;jt.all=function(t){return Promise.all(t)};jt.spread=Q6;jt.isAxiosError=K6;jt.mergeConfig=Gs;jt.AxiosHeaders=Ei;jt.formToJSON=e=>Ky(ae.isHTMLForm(e)?new FormData(e):e);jt.getAdapter=tb.getAdapter;jt.HttpStatusCode=J6;jt.default=jt;function e9(e){function t(r){return`${e}:${r}`}return{getPrefixedKey:t,set(r,s){bl(),localStorage.setItem(t(r),JSON.stringify(s))},get(r){bl();const s=localStorage.getItem(t(r));try{return s?JSON.parse(s):void 0}catch{return}},remove(r){bl(),localStorage.removeItem(t(r))},clear(){bl(),Object.keys(localStorage).forEach(r=>{r.startsWith(e)&&localStorage.removeItem(r)})}}}const Bo=e9("wasp");function bl(){if(!window.localStorage)throw new Error("Local storage is not available.")}function t9(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(o){o(r)}),(s=e.get("*"))&&s.slice().map(function(o){o(t,r)})}}}const es=t9(),En=jt.create({baseURL:r1.apiUrl}),_d="sessionId";let Zs=Bo.get(_d);function r9(e){Zs=e,Bo.set(_d,e),es.emit("sessionId.set")}function nb(){return Zs}function i9(){Zs=void 0,Bo.remove(_d),es.emit("sessionId.clear")}function n9(){Zs=void 0,Bo.clear(),es.emit("sessionId.clear")}En.interceptors.request.use(e=>{const t=nb();return t&&(e.headers.Authorization=`Bearer ${t}`),e});En.interceptors.response.use(void 0,e=>{var t;return((t=e.response)===null||t===void 0?void 0:t.status)===401&&i9(),Promise.reject(e)});window.addEventListener("storage",e=>{e.key===Bo.getPrefixedKey(_d)&&(e.newValue?(Zs=e.newValue,es.emit("sessionId.set")):(Zs=void 0,es.emit("sessionId.clear")))});function Md(e){var t,r;if(e!=null&&e.response){const s=(t=e.response)===null||t===void 0?void 0:t.data,o=e.response.status;throw new s9(o,(r=s==null?void 0:s.message)!==null&&r!==void 0?r:e.message,s)}else throw e}class s9 extends Error{constructor(t,r,s){super(r),this.statusCode=t,this.data=s}}async function a9(e){try{await En.post("/auth/username/signup",e)}catch(t){Md(t)}}const o9={};let sb;const c1=new Promise(e=>{sb=e});function l9(){const e=new iw(o9);sb(e)}function c9(e){const t=new Map;function r(p){return t.get(p)||[]}function s(p,v){const C=e(p),A=r(C);t.set(C,[...A,{queryKey:p,updateQuery:v}])}function o(p){const v=e(p);return r(v).map(({updateQuery:C})=>C)}function c(p){const v=e(p),C=r(v).filter(({queryKey:A})=>A!==p);C.length>0?t.set(v,C):t.delete(v)}return{add:s,remove:c,getUpdateHandlers:o}}const cf=new Map,d1=c9(nn);function d9(e,t){for(const r of t){let s=cf.get(r);s||(s=new Set,cf.set(r,s)),s.add(e)}}function u9(e){e.forEach(({queryKey:t,updateQuery:r})=>d1.add(t,r))}async function h9(e,t){t.forEach(({queryKey:r})=>d1.remove(r)),await p9(e)}function f9(e){return d1.getUpdateHandlers(e)}async function ab(){const e=await c1;e.resetQueries(),e.removeQueries()}async function p9(e){const t=await c1;m9(e).forEach(s=>t.invalidateQueries(s))}function g9(e){return Array.from(cf.get(e)||[])}function m9(e){return Array.from(new Set(e.flatMap(g9)))}async function ob(e){r9(e),await ab()}async function x9(e,t){try{const r={username:e,password:t},s=await En.post("/auth/username/login",r);await ob(s.data.sessionId)}catch(r){Md(r)}}function v9({onError:e,onSuccess:t,isLogin:r}){async function s(o){try{r||await a9(o),await x9(o.username,o.password),t()}catch(c){e(c)}}return{handleSubmit:s}}const y9=bt("div",{position:"relative",marginTop:"1.5rem"}),b9=bt("div",{position:"absolute",inset:"0px",display:"flex",alignItems:"center"}),w9=bt("div",{width:"100%",borderTopWidth:"1px",borderColor:"$gray500"}),k9=bt("div",{position:"relative",display:"flex",justifyContent:"center",fontSize:"$sm"}),C9=bt("span",{backgroundColor:"white",paddingLeft:"0.5rem",paddingRight:"0.5rem"}),S9=bt("div",{marginTop:"1.5rem"}),A9=bt("div",{fontWeight:"500",fontSize:"$sm"}),j9=bt("div",{marginTop:"0.5rem",display:"flex",variants:{direction:{horizontal:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(48px, 1fr))"},vertical:{flexDirection:"column",margin:"8px 0"}},gap:{small:{gap:"4px"},medium:{gap:"8px"},large:{gap:"16px"}}}}),N9=`${r1.apiUrl}/auth/google/login`,E9=({state:e,socialButtonsDirection:t="horizontal",additionalSignupFields:r})=>{const{isLoading:s,setErrorMessage:o,setSuccessMessage:c,setIsLoading:p}=G.useContext(cb),v=e==="login",C=v?"Log in":"Sign up",A=Mr(),L=W=>{var V,_;o({title:W.message,description:(_=(V=W.data)===null||V===void 0?void 0:V.data)===null||_===void 0?void 0:_.message})},P=Oy(),{register:B,formState:{errors:M},handleSubmit:H}=P,{handleSubmit:D}=v9({isLogin:v,onError:L,onSuccess(){A.push("/chat")}});async function Z(W){p(!0),o(null),c(null);try{await D(W)}finally{p(!1)}}return f.jsxs(f.Fragment,{children:[f.jsxs(S9,{children:[f.jsxs(A9,{children:[C," with"]}),f.jsx(j9,{gap:"large",direction:t,children:f.jsx(z7,{href:N9,children:f.jsx(I7,{})})})]}),f.jsxs(y9,{children:[f.jsx(b9,{children:f.jsx(w9,{})}),f.jsx(k9,{children:f.jsx(C9,{children:"Or continue with"})})]}),f.jsxs(R7,{onSubmit:H(Z),children:[f.jsxs(Wl,{children:[f.jsx(ef,{children:"Username"}),f.jsx(tf,{...B("username",{required:"Username is required"}),type:"text",disabled:s}),M.username&&f.jsx(rf,{children:M.username.message})]}),f.jsxs(Wl,{children:[f.jsx(ef,{children:"Password"}),f.jsx(tf,{...B("password",{required:"Password is required"}),type:"password",disabled:s}),M.password&&f.jsx(rf,{children:M.password.message})]}),f.jsx(L9,{hookForm:P,formState:{isLoading:s},additionalSignupFields:r}),f.jsx(Wl,{children:f.jsx(M7,{type:"submit",disabled:s,children:C})})]})]})};function L9({hookForm:e,formState:{isLoading:t},additionalSignupFields:r}){const{register:s,formState:{errors:o}}=e;function c(p,v,C){return f.jsxs(Wl,{children:[f.jsx(ef,{children:p.label}),f.jsx(v,{...s(p.name,p.validations),...C,disabled:t}),o[p.name]&&f.jsx(rf,{children:o[p.name].message})]},p.name)}return T9(r)?r(e,{isLoading:t}):r&&r.map(p=>{if(P9(p))return p(e,{isLoading:t});switch(p.type){case"input":return c(p,tf,{type:"text"});case"textarea":return c(p,_7);default:throw new Error(`Unsupported additional signup field type: ${p.type}`)}})}function P9(e){return typeof e=="function"}function T9(e){return typeof e=="function"}const lb=bt("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),R9=bt(lb,{background:"$errorBackground",color:"$errorText"}),_9=bt(lb,{background:"$successBackground",color:"$successText"}),M9={height:"3rem"},O9=bt("div",{display:"flex",flexDirection:"column"}),I9=bt("h2",{fontSize:"1.875rem !important",fontWeight:"700 !important",marginTop:"1.5rem !important"}),cb=G.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}});function z9({state:e,appearance:t,logo:r,socialLayout:s="horizontal",additionalSignupFields:o}){const[c,p]=G.useState(null),[v,C]=G.useState(null),[A,L]=G.useState(!1),P=jy(t??{}),M={login:"Log in to your account",signup:"Create a new account"}[e],H=s==="vertical"?"vertical":"horizontal";return f.jsxs(O9,{className:P,children:[f.jsxs("div",{children:[r&&f.jsx("img",{style:M9,src:r,alt:"Your Company"}),f.jsx(I9,{children:M})]}),c&&f.jsxs(R9,{children:[c.title,c.description&&": ",c.description]}),v&&f.jsx(_9,{children:v}),f.jsx(cb.Provider,{value:{isLoading:A,setIsLoading:L,setErrorMessage:p,setSuccessMessage:C},children:(e==="login"||e==="signup")&&f.jsx(E9,{state:e,socialButtonsDirection:H,additionalSignupFields:o})})]})}var df;(function(e){e.Login="login",e.Signup="signup"})(df||(df={}));function F9({appearance:e,logo:t,socialLayout:r,additionalFields:s}){return f.jsx(z9,{appearance:e,logo:t,socialLayout:r,state:df.Signup,additionalSignupFields:s})}var D9=function(){function e(){this.keyToValue=new Map,this.valueToKey=new Map}return e.prototype.set=function(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)},e.prototype.getByKey=function(t){return this.keyToValue.get(t)},e.prototype.getByValue=function(t){return this.valueToKey.get(t)},e.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},e}(),db=function(){function e(t){this.generateIdentifier=t,this.kv=new D9}return e.prototype.register=function(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))},e.prototype.clear=function(){this.kv.clear()},e.prototype.getIdentifier=function(t){return this.kv.getByValue(t)},e.prototype.getValue=function(t){return this.kv.getByKey(t)},e}(),H9=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,o){s.__proto__=o}||function(s,o){for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(s[c]=o[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function s(){this.constructor=t}t.prototype=r===null?Object.create(r):(s.prototype=r.prototype,new s)}}(),B9=function(e){H9(t,e);function t(){var r=e.call(this,function(s){return s.name})||this;return r.classToAllowedProps=new Map,r}return t.prototype.register=function(r,s){typeof s=="object"?(s.allowProps&&this.classToAllowedProps.set(r,s.allowProps),e.prototype.register.call(this,r,s.identifier)):e.prototype.register.call(this,r,s)},t.prototype.getAllowedProps=function(r){return this.classToAllowedProps.get(r)},t}(db),V9=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s=r.call(e),o,c=[],p;try{for(;(t===void 0||t-- >0)&&!(o=s.next()).done;)c.push(o.value)}catch(v){p={error:v}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(p)throw p.error}}return c};function W9(e){if("values"in Object)return Object.values(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function $9(e,t){var r=W9(e);if("find"in r)return r.find(t);for(var s=r,o=0;o"u"},U9=function(e){return e===null},go=function(e){return typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype},uf=function(e){return go(e)&&Object.keys(e).length===0},yn=function(e){return Array.isArray(e)},G9=function(e){return typeof e=="string"},Z9=function(e){return typeof e=="number"&&!isNaN(e)},q9=function(e){return typeof e=="boolean"},Q9=function(e){return e instanceof RegExp},mo=function(e){return e instanceof Map},xo=function(e){return e instanceof Set},hb=function(e){return Y9(e)==="Symbol"},K9=function(e){return e instanceof Date&&!isNaN(e.valueOf())},J9=function(e){return e instanceof Error},qm=function(e){return typeof e=="number"&&isNaN(e)},ek=function(e){return q9(e)||U9(e)||ub(e)||Z9(e)||G9(e)||hb(e)},tk=function(e){return typeof e=="bigint"},rk=function(e){return e===1/0||e===-1/0},ik=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},nk=function(e){return e instanceof URL},fb=function(e){return e.replace(/\./g,"\\.")},zu=function(e){return e.map(String).map(fb).join(".")},Ga=function(e){for(var t=[],r="",s=0;s0)&&!(o=s.next()).done;)c.push(o.value)}catch(v){p={error:v}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(p)throw p.error}}return c},pf=function(e,t){for(var r=0,s=t.length,o=e.length;r0?"Infinity":"-Infinity"},Number),Jr(function(e){return e===0&&1/e===-1/0},"number",function(){return"-0"},Number),Jr(nk,"URL",function(e){return e.toString()},function(e){return new URL(e)})];function Od(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}var gb=Od(function(e,t){if(hb(e)){var r=!!t.symbolRegistry.getIdentifier(e);return r}return!1},function(e,t){var r=t.symbolRegistry.getIdentifier(e);return["symbol",r]},function(e){return e.description},function(e,t,r){var s=r.symbolRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown symbol");return s}),sk=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),mb=Od(ik,function(e){return["typed-array",e.constructor.name]},function(e){return pf([],ff(e))},function(e,t){var r=sk[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function xb(e,t){if(e!=null&&e.constructor){var r=!!t.classRegistry.getIdentifier(e.constructor);return r}return!1}var vb=Od(xb,function(e,t){var r=t.classRegistry.getIdentifier(e.constructor);return["class",r]},function(e,t){var r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return hf({},e);var s={};return r.forEach(function(o){s[o]=e[o]}),s},function(e,t,r){var s=r.classRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(s.prototype),e)}),yb=Od(function(e,t){return!!t.customTransformerRegistry.findApplicable(e)},function(e,t){var r=t.customTransformerRegistry.findApplicable(e);return["custom",r.name]},function(e,t){var r=t.customTransformerRegistry.findApplicable(e);return r.serialize(e)},function(e,t,r){var s=r.customTransformerRegistry.findByName(t[1]);if(!s)throw new Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),ak=[vb,gb,yb,mb],Qm=function(e,t){var r=Zm(ak,function(o){return o.isApplicable(e,t)});if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};var s=Zm(pb,function(o){return o.isApplicable(e,t)});if(s)return{value:s.transform(e,t),type:s.annotation}},bb={};pb.forEach(function(e){bb[e.annotation]=e});var ok=function(e,t,r){if(yn(t))switch(t[0]){case"symbol":return gb.untransform(e,t,r);case"class":return vb.untransform(e,t,r);case"custom":return yb.untransform(e,t,r);case"typed-array":return mb.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{var s=bb[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,r)}},Ts=function(e,t){for(var r=e.keys();t>0;)r.next(),t--;return r.next().value};function wb(e){if(Ul(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Ul(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Ul(e,"constructor"))throw new Error("constructor is not allowed as a property")}var lk=function(e,t){wb(t);for(var r=0;r0)&&!(o=s.next()).done;)c.push(o.value)}catch(v){p={error:v}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(p)throw p.error}}return c},an=function(e,t){for(var r=0,s=t.length,o=e.length;rxf(o,t));if(!pk(e))return e;const r=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...r,...s].reduce((o,c)=>{if(Km(t.props)&&!t.props.includes(c))return o;const p=e[c],v=xf(p,t);return gk(o,c,v,e,t.nonenumerable),o},{})}var On=function(){return On=Object.assign||function(e){for(var t,r=1,s=arguments.length;r0)&&!(o=s.next()).done;)c.push(o.value)}catch(v){p={error:v}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(p)throw p.error}}return c},xk=function(e,t){for(var r=0,s=t.length,o=e.length;rs(c,[]);return o.internal=s,o}const Eb=hi("operations/stripe-payment",["User"]),Lb=hi("operations/update-current-user",["User"]);hi("operations/update-user-by-id",["User"]);const Pb=hi("operations/create-new-chat",["Chat","Conversation"]),yk=hi("operations/create-new-daily-analysis-chat",["Chat","Conversation"]),bi=hi("operations/update-current-chat",["Chat"]),Jm=hi("operations/update-current-conversation",["Conversation"]),bk=hi("operations/create-new-and-return-all-conversations",["Conversation"]),wk=hi("operations/create-new-and-return-last-conversation",["Conversation"]),kk=hi("operations/get-agent-response",["Chat","Conversation"]);function Vo(e,t){const r=Nb(e);async function s(o,c){const p=await jb(r,c);return f9(o).reduce((v,C)=>C(v),p)}return Tb(s,{relativeQueryPath:e,queryRoute:r,entitiesUsed:t}),s}function Tb(e,{relativeQueryPath:t,queryRoute:r,entitiesUsed:s}){e.queryCacheKey=[t],e.route=r,d9(e.queryCacheKey,s)}const Ck=Vo("operations/get-daily-stats",["User","DailyStats"]),Sk=Vo("operations/get-paginated-users",["User"]),Ak=Vo("operations/get-chat",["Chat"]),jk=Vo("operations/get-chats",["Chat"]),Nk=Vo("operations/get-conversations",["Conversation"]);function Qs(e,t,r){if(typeof e!="function")throw new TypeError("useQuery requires queryFn to be a function.");if(!e.queryCacheKey)throw new TypeError("queryFn needs to have queryCacheKey property defined.");const s=t!==void 0?[...e.queryCacheKey,t]:e.queryCacheKey;return _w(Object.assign({queryKey:s,queryFn:()=>e(s,t)},r))}const Ek=Lk();function Qr(e,t){return Qs(Ek,e,t)}function Lk(){const e="auth/me",t={method:Mc.Get,path:`/${e}`};async function r(){var s;try{const o=await En.get(t.path);return Ab(o.data)}catch(o){if(((s=o.response)===null||s===void 0?void 0:s.status)===401)return null;Md(o)}}return Tb(r,{relativeQueryPath:e,queryRoute:t,entitiesUsed:["User"]}),r}async function Rb(){try{await En.post("/auth/logout")}finally{n9(),await ab()}}function kt(e,t,r,s){const o=t?Pk(e,t):e,c=r?`?${new URLSearchParams(r).toString()}`:"",p=s?`#${s}`:"";return o+c+p}function Pk(e,t){function r(o){if(o.startsWith(":")){const c=Rk(o);return t[c]}return o}const s=e.split("/").map(r).filter(Tk).join("/");return e.startsWith("/")?`/${s}`:s}function Tk(e){return!!e}function Rk(e){return e.endsWith("?")?e.slice(1,-1):e.slice(1)}var _k=function(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);okt(t,r,s,o),[t,r]);return f.jsx(rt,{to:p,...c})}const Mk={LandingPageRoute:{to:"/",build:e=>kt("/",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},LoginRoute:{to:"/login",build:e=>kt("/login",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},SignupRoute:{to:"/signup",build:e=>kt("/signup",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},TocPageRoute:{to:"/toc",build:e=>kt("/toc",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},PrivacyRoute:{to:"/privacy",build:e=>kt("/privacy",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},ChatPageRoute:{to:"/chat/:id?",build:e=>kt("/chat/:id?",e.params,e==null?void 0:e.search,e==null?void 0:e.hash)},PricingPageRoute:{to:"/pricing",build:e=>kt("/pricing",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AccountRoute:{to:"/account",build:e=>kt("/account",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},CheckoutRoute:{to:"/checkout",build:e=>kt("/checkout",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminRoute:{to:"/admin",build:e=>kt("/admin",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminUsersRoute:{to:"/admin/users",build:e=>kt("/admin/users",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminSettingsRoute:{to:"/admin/settings",build:e=>kt("/admin/settings",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminChartsRoute:{to:"/admin/chart",build:e=>kt("/admin/chart",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminMessagesRoute:{to:"/admin/messages",build:e=>kt("/admin/messages",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminFormElementsRoute:{to:"/admin/forms/form-elements",build:e=>kt("/admin/forms/form-elements",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminFormLayoutsRoute:{to:"/admin/forms/form-layouts",build:e=>kt("/admin/forms/form-layouts",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminCalendarRoute:{to:"/admin/calendar",build:e=>kt("/admin/calendar",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminUIAlertsRoute:{to:"/admin/ui/alerts",build:e=>kt("/admin/ui/alerts",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminUIButtonsRoute:{to:"/admin/ui/buttons",build:e=>kt("/admin/ui/buttons",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)}};var Ok=Object.defineProperty,Ik=(e,t,r)=>t in e?Ok(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fu=(e,t,r)=>(Ik(e,typeof t!="symbol"?t+"":t,r),r);let zk=class{constructor(){Fu(this,"current",this.detect()),Fu(this,"handoffState","pending"),Fu(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Li=new zk,Ln=(e,t)=>{Li.isServer?G.useEffect(e,t):G.useLayoutEffect(e,t)};function Id(e){let t=G.useRef(e);return Ln(()=>{t.current=e},[e]),t}function Wo(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function u1(){let e=[],t={addEventListener(r,s,o,c){return r.addEventListener(s,o,c),t.add(()=>r.removeEventListener(s,o,c))},requestAnimationFrame(...r){let s=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(s))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let s=setTimeout(...r);return t.add(()=>clearTimeout(s))},microTask(...r){let s={current:!0};return Wo(()=>{s.current&&r[0]()}),t.add(()=>{s.current=!1})},style(r,s,o){let c=r.style.getPropertyValue(s);return Object.assign(r.style,{[s]:o}),this.add(()=>{Object.assign(r.style,{[s]:c})})},group(r){let s=u1();return r(s),this.add(()=>s.dispose())},add(r){return e.push(r),()=>{let s=e.indexOf(r);if(s>=0)for(let o of e.splice(s,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function Fk(){let[e]=G.useState(u1);return G.useEffect(()=>()=>e.dispose(),[e]),e}let Lr=function(e){let t=Id(e);return pe.useCallback((...r)=>t.current(...r),[t])};function zd(){let[e,t]=G.useState(Li.isHandoffComplete);return e&&Li.isHandoffComplete===!1&&t(!1),G.useEffect(()=>{e!==!0&&t(!0)},[e]),G.useEffect(()=>Li.handoff(),[]),e}var e0;let oa=(e0=pe.useId)!=null?e0:function(){let e=zd(),[t,r]=pe.useState(e?()=>Li.nextId():null);return Ln(()=>{t===null&&r(Li.nextId())},[t]),t!=null?""+t:void 0};function bn(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let s=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,bn),s}function _b(e){return Li.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let vf=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var In=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(In||{}),Mb=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Mb||{}),Dk=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Dk||{});function Hk(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(vf)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ob=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ob||{});function Bk(e,t=0){var r;return e===((r=_b(e))==null?void 0:r.body)?!1:bn(t,{0(){return e.matches(vf)},1(){let s=e;for(;s!==null;){if(s.matches(vf))return!0;s=s.parentElement}return!1}})}function Un(e){e==null||e.focus({preventScroll:!0})}let Vk=["textarea","input"].join(",");function Wk(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Vk))!=null?r:!1}function $k(e,t=r=>r){return e.slice().sort((r,s)=>{let o=t(r),c=t(s);if(o===null||c===null)return 0;let p=o.compareDocumentPosition(c);return p&Node.DOCUMENT_POSITION_FOLLOWING?-1:p&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Gl(e,t,{sorted:r=!0,relativeTo:s=null,skipElements:o=[]}={}){let c=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,p=Array.isArray(e)?r?$k(e):e:Hk(e);o.length>0&&p.length>1&&(p=p.filter(M=>!o.includes(M))),s=s??c.activeElement;let v=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),C=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,p.indexOf(s))-1;if(t&4)return Math.max(0,p.indexOf(s))+1;if(t&8)return p.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),A=t&32?{preventScroll:!0}:{},L=0,P=p.length,B;do{if(L>=P||L+P<=0)return 0;let M=C+L;if(t&16)M=(M+P)%P;else{if(M<0)return 3;if(M>=P)return 1}B=p[M],B==null||B.focus(A),L+=v}while(B!==c.activeElement);return t&6&&Wk(B)&&B.select(),B.hasAttribute("tabindex")||B.setAttribute("tabindex","0"),2}function Du(e,t,r){let s=Id(t);G.useEffect(()=>{function o(c){s.current(c)}return document.addEventListener(e,o,r),()=>document.removeEventListener(e,o,r)},[e,r])}function Xk(e,t,r=!0){let s=G.useRef(!1);G.useEffect(()=>{requestAnimationFrame(()=>{s.current=r})},[r]);function o(p,v){if(!s.current||p.defaultPrevented)return;let C=function L(P){return typeof P=="function"?L(P()):Array.isArray(P)||P instanceof Set?P:[P]}(e),A=v(p);if(A!==null&&A.getRootNode().contains(A)){for(let L of C){if(L===null)continue;let P=L instanceof HTMLElement?L:L.current;if(P!=null&&P.contains(A)||p.composed&&p.composedPath().includes(P))return}return!Bk(A,Ob.Loose)&&A.tabIndex!==-1&&p.preventDefault(),t(p,A)}}let c=G.useRef(null);Du("mousedown",p=>{var v,C;s.current&&(c.current=((C=(v=p.composedPath)==null?void 0:v.call(p))==null?void 0:C[0])||p.target)},!0),Du("click",p=>{c.current&&(o(p,()=>c.current),c.current=null)},!0),Du("blur",p=>o(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let Ib=Symbol();function Yk(e,t=!0){return Object.assign(e,{[Ib]:t})}function Di(...e){let t=G.useRef(e);G.useEffect(()=>{t.current=e},[e]);let r=Lr(s=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(s):o.current=s)});return e.every(s=>s==null||(s==null?void 0:s[Ib]))?void 0:r}function Uk(...e){return e.filter(Boolean).join(" ")}var yf=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(yf||{}),Gk=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Gk||{});function fi({ourProps:e,theirProps:t,slot:r,defaultTag:s,features:o,visible:c=!0,name:p}){let v=zb(t,e);if(c)return wl(v,r,s,p);let C=o??0;if(C&2){let{static:A=!1,...L}=v;if(A)return wl(L,r,s,p)}if(C&1){let{unmount:A=!0,...L}=v;return bn(A?0:1,{0(){return null},1(){return wl({...L,hidden:!0,style:{display:"none"}},r,s,p)}})}return wl(v,r,s,p)}function wl(e,t={},r,s){var o;let{as:c=r,children:p,refName:v="ref",...C}=Hu(e,["unmount","static"]),A=e.ref!==void 0?{[v]:e.ref}:{},L=typeof p=="function"?p(t):p;"className"in C&&C.className&&typeof C.className=="function"&&(C.className=C.className(t));let P={};if(t){let B=!1,M=[];for(let[H,D]of Object.entries(t))typeof D=="boolean"&&(B=!0),D===!0&&M.push(H);B&&(P["data-headlessui-state"]=M.join(" "))}if(c===G.Fragment&&Object.keys(t0(C)).length>0){if(!G.isValidElement(L)||Array.isArray(L)&&L.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${s} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(C).map(H=>` - ${H}`).join(` +`):" "+Xm(c[0]):"as no adapter specified";throw new Qe("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return s},adapters:af};function Iu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Bo(null,e)}function Ym(e){return Iu(e),e.headers=Ei.from(e.headers),e.data=Ou.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tb.getAdapter(e.adapter||a1.adapter)(e).then(function(s){return Iu(e),s.data=Ou.call(e,e.transformResponse,s),s.headers=Ei.from(s.headers),s},function(s){return Jy(s)||(Iu(e),s&&s.response&&(s.response.data=Ou.call(e,e.transformResponse,s.response),s.response.headers=Ei.from(s.response.headers))),Promise.reject(s)})}const Um=e=>e instanceof Ei?e.toJSON():e;function Zs(e,t){t=t||{};const r={};function s(A,E,P){return ae.isPlainObject(A)&&ae.isPlainObject(E)?ae.merge.call({caseless:P},A,E):ae.isPlainObject(E)?ae.merge({},E):ae.isArray(E)?E.slice():E}function o(A,E,P){if(ae.isUndefined(E)){if(!ae.isUndefined(A))return s(void 0,A,P)}else return s(A,E,P)}function c(A,E){if(!ae.isUndefined(E))return s(void 0,E)}function p(A,E){if(ae.isUndefined(E)){if(!ae.isUndefined(A))return s(void 0,A)}else return s(void 0,E)}function v(A,E,P){if(P in t)return s(A,E);if(P in e)return s(void 0,A)}const C={url:c,method:c,data:c,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:v,headers:(A,E)=>o(Um(A),Um(E),!0)};return ae.forEach(Object.keys(Object.assign({},e,t)),function(E){const P=C[E]||o,B=P(e[E],t[E],E);ae.isUndefined(B)&&P!==v||(r[E]=B)}),r}const rb="1.6.7",o1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{o1[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Gm={};o1.transitional=function(t,r,s){function o(c,p){return"[Axios v"+rb+"] Transitional option '"+c+"'"+p+(s?". "+s:"")}return(c,p,v)=>{if(t===!1)throw new Qe(o(p," has been removed"+(r?" in "+r:"")),Qe.ERR_DEPRECATED);return r&&!Gm[p]&&(Gm[p]=!0,console.warn(o(p," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(c,p,v):!0}};function Z6(e,t,r){if(typeof e!="object")throw new Qe("options must be an object",Qe.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let o=s.length;for(;o-- >0;){const c=s[o],p=t[c];if(p){const v=e[c],C=v===void 0||p(v,c,e);if(C!==!0)throw new Qe("option "+c+" must be "+C,Qe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Qe("Unknown option "+c,Qe.ERR_BAD_OPTION)}}const of={assertOptions:Z6,validators:o1},$i=of.validators;class Oc{constructor(t){this.defaults=t,this.interceptors={request:new Vm,response:new Vm}}async request(t,r){try{return await this._request(t,r)}catch(s){if(s instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const c=o.stack?o.stack.replace(/^.+\n/,""):"";s.stack?c&&!String(s.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(s.stack+=` +`+c):s.stack=c}throw s}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Zs(this.defaults,r);const{transitional:s,paramsSerializer:o,headers:c}=r;s!==void 0&&of.assertOptions(s,{silentJSONParsing:$i.transitional($i.boolean),forcedJSONParsing:$i.transitional($i.boolean),clarifyTimeoutError:$i.transitional($i.boolean)},!1),o!=null&&(ae.isFunction(o)?r.paramsSerializer={serialize:o}:of.assertOptions(o,{encode:$i.function,serialize:$i.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let p=c&&ae.merge(c.common,c[r.method]);c&&ae.forEach(["delete","get","head","post","put","patch","common"],H=>{delete c[H]}),r.headers=Ei.concat(p,c);const v=[];let C=!0;this.interceptors.request.forEach(function(D){typeof D.runWhen=="function"&&D.runWhen(r)===!1||(C=C&&D.synchronous,v.unshift(D.fulfilled,D.rejected))});const A=[];this.interceptors.response.forEach(function(D){A.push(D.fulfilled,D.rejected)});let E,P=0,B;if(!C){const H=[Ym.bind(this),void 0];for(H.unshift.apply(H,v),H.push.apply(H,A),B=H.length,E=Promise.resolve(r);P{if(!s._listeners)return;let c=s._listeners.length;for(;c-- >0;)s._listeners[c](o);s._listeners=null}),this.promise.then=o=>{let c;const p=new Promise(v=>{s.subscribe(v),c=v}).then(o);return p.cancel=function(){s.unsubscribe(c)},p},t(function(c,p,v){s.reason||(s.reason=new Bo(c,p,v),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new l1(function(o){t=o}),cancel:t}}}const q6=l1;function Q6(e){return function(r){return e.apply(null,r)}}function K6(e){return ae.isObject(e)&&e.isAxiosError===!0}const lf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(lf).forEach(([e,t])=>{lf[t]=e});const J6=lf;function ib(e){const t=new Yl(e),r=zy(Yl.prototype.request,t);return ae.extend(r,Yl.prototype,t,{allOwnKeys:!0}),ae.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return ib(Zs(e,o))},r}const jt=ib(a1);jt.Axios=Yl;jt.CanceledError=Bo;jt.CancelToken=q6;jt.isCancel=Jy;jt.VERSION=rb;jt.toFormData=Td;jt.AxiosError=Qe;jt.Cancel=jt.CanceledError;jt.all=function(t){return Promise.all(t)};jt.spread=Q6;jt.isAxiosError=K6;jt.mergeConfig=Zs;jt.AxiosHeaders=Ei;jt.formToJSON=e=>Ky(ae.isHTMLForm(e)?new FormData(e):e);jt.getAdapter=tb.getAdapter;jt.HttpStatusCode=J6;jt.default=jt;function e9(e){function t(r){return`${e}:${r}`}return{getPrefixedKey:t,set(r,s){bl(),localStorage.setItem(t(r),JSON.stringify(s))},get(r){bl();const s=localStorage.getItem(t(r));try{return s?JSON.parse(s):void 0}catch{return}},remove(r){bl(),localStorage.removeItem(t(r))},clear(){bl(),Object.keys(localStorage).forEach(r=>{r.startsWith(e)&&localStorage.removeItem(r)})}}}const Vo=e9("wasp");function bl(){if(!window.localStorage)throw new Error("Local storage is not available.")}function t9(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(o){o(r)}),(s=e.get("*"))&&s.slice().map(function(o){o(t,r)})}}}const ts=t9(),En=jt.create({baseURL:r1.apiUrl}),_d="sessionId";let qs=Vo.get(_d);function r9(e){qs=e,Vo.set(_d,e),ts.emit("sessionId.set")}function nb(){return qs}function i9(){qs=void 0,Vo.remove(_d),ts.emit("sessionId.clear")}function n9(){qs=void 0,Vo.clear(),ts.emit("sessionId.clear")}En.interceptors.request.use(e=>{const t=nb();return t&&(e.headers.Authorization=`Bearer ${t}`),e});En.interceptors.response.use(void 0,e=>{var t;return((t=e.response)===null||t===void 0?void 0:t.status)===401&&i9(),Promise.reject(e)});window.addEventListener("storage",e=>{e.key===Vo.getPrefixedKey(_d)&&(e.newValue?(qs=e.newValue,ts.emit("sessionId.set")):(qs=void 0,ts.emit("sessionId.clear")))});function Md(e){var t,r;if(e!=null&&e.response){const s=(t=e.response)===null||t===void 0?void 0:t.data,o=e.response.status;throw new s9(o,(r=s==null?void 0:s.message)!==null&&r!==void 0?r:e.message,s)}else throw e}class s9 extends Error{constructor(t,r,s){super(r),this.statusCode=t,this.data=s}}async function a9(e){try{await En.post("/auth/username/signup",e)}catch(t){Md(t)}}const o9={};let sb;const c1=new Promise(e=>{sb=e});function l9(){const e=new iw(o9);sb(e)}function c9(e){const t=new Map;function r(p){return t.get(p)||[]}function s(p,v){const C=e(p),A=r(C);t.set(C,[...A,{queryKey:p,updateQuery:v}])}function o(p){const v=e(p);return r(v).map(({updateQuery:C})=>C)}function c(p){const v=e(p),C=r(v).filter(({queryKey:A})=>A!==p);C.length>0?t.set(v,C):t.delete(v)}return{add:s,remove:c,getUpdateHandlers:o}}const cf=new Map,d1=c9(nn);function d9(e,t){for(const r of t){let s=cf.get(r);s||(s=new Set,cf.set(r,s)),s.add(e)}}function u9(e){e.forEach(({queryKey:t,updateQuery:r})=>d1.add(t,r))}async function h9(e,t){t.forEach(({queryKey:r})=>d1.remove(r)),await p9(e)}function f9(e){return d1.getUpdateHandlers(e)}async function ab(){const e=await c1;e.resetQueries(),e.removeQueries()}async function p9(e){const t=await c1;m9(e).forEach(s=>t.invalidateQueries(s))}function g9(e){return Array.from(cf.get(e)||[])}function m9(e){return Array.from(new Set(e.flatMap(g9)))}async function ob(e){r9(e),await ab()}async function x9(e,t){try{const r={username:e,password:t},s=await En.post("/auth/username/login",r);await ob(s.data.sessionId)}catch(r){Md(r)}}function v9({onError:e,onSuccess:t,isLogin:r}){async function s(o){try{r||await a9(o),await x9(o.username,o.password),t()}catch(c){e(c)}}return{handleSubmit:s}}const y9=bt("div",{position:"relative",marginTop:"1.5rem"}),b9=bt("div",{position:"absolute",inset:"0px",display:"flex",alignItems:"center"}),w9=bt("div",{width:"100%",borderTopWidth:"1px",borderColor:"$gray500"}),k9=bt("div",{position:"relative",display:"flex",justifyContent:"center",fontSize:"$sm"}),C9=bt("span",{backgroundColor:"white",paddingLeft:"0.5rem",paddingRight:"0.5rem"}),S9=bt("div",{marginTop:"1.5rem"}),A9=bt("div",{fontWeight:"500",fontSize:"$sm"}),j9=bt("div",{marginTop:"0.5rem",display:"flex",variants:{direction:{horizontal:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(48px, 1fr))"},vertical:{flexDirection:"column",margin:"8px 0"}},gap:{small:{gap:"4px"},medium:{gap:"8px"},large:{gap:"16px"}}}}),N9=`${r1.apiUrl}/auth/google/login`,E9=({state:e,socialButtonsDirection:t="horizontal",additionalSignupFields:r})=>{const{isLoading:s,setErrorMessage:o,setSuccessMessage:c,setIsLoading:p}=G.useContext(cb),v=e==="login",C=v?"Log in":"Sign up",A=Mr(),E=W=>{var V,_;o({title:W.message,description:(_=(V=W.data)===null||V===void 0?void 0:V.data)===null||_===void 0?void 0:_.message})},P=Oy(),{register:B,formState:{errors:M},handleSubmit:H}=P,{handleSubmit:D}=v9({isLogin:v,onError:E,onSuccess(){A.push("/chat")}});async function Z(W){p(!0),o(null),c(null);try{await D(W)}finally{p(!1)}}return f.jsxs(f.Fragment,{children:[f.jsxs(S9,{children:[f.jsxs(A9,{children:[C," with"]}),f.jsx(j9,{gap:"large",direction:t,children:f.jsx(z7,{href:N9,children:f.jsx(I7,{})})})]}),f.jsxs(y9,{children:[f.jsx(b9,{children:f.jsx(w9,{})}),f.jsx(k9,{children:f.jsx(C9,{children:"Or continue with"})})]}),f.jsxs(R7,{onSubmit:H(Z),children:[f.jsxs(Wl,{children:[f.jsx(ef,{children:"Username"}),f.jsx(tf,{...B("username",{required:"Username is required"}),type:"text",disabled:s}),M.username&&f.jsx(rf,{children:M.username.message})]}),f.jsxs(Wl,{children:[f.jsx(ef,{children:"Password"}),f.jsx(tf,{...B("password",{required:"Password is required"}),type:"password",disabled:s}),M.password&&f.jsx(rf,{children:M.password.message})]}),f.jsx(L9,{hookForm:P,formState:{isLoading:s},additionalSignupFields:r}),f.jsx(Wl,{children:f.jsx(M7,{type:"submit",disabled:s,children:C})})]})]})};function L9({hookForm:e,formState:{isLoading:t},additionalSignupFields:r}){const{register:s,formState:{errors:o}}=e;function c(p,v,C){return f.jsxs(Wl,{children:[f.jsx(ef,{children:p.label}),f.jsx(v,{...s(p.name,p.validations),...C,disabled:t}),o[p.name]&&f.jsx(rf,{children:o[p.name].message})]},p.name)}return T9(r)?r(e,{isLoading:t}):r&&r.map(p=>{if(P9(p))return p(e,{isLoading:t});switch(p.type){case"input":return c(p,tf,{type:"text"});case"textarea":return c(p,_7);default:throw new Error(`Unsupported additional signup field type: ${p.type}`)}})}function P9(e){return typeof e=="function"}function T9(e){return typeof e=="function"}const lb=bt("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),R9=bt(lb,{background:"$errorBackground",color:"$errorText"}),_9=bt(lb,{background:"$successBackground",color:"$successText"}),M9={height:"3rem"},O9=bt("div",{display:"flex",flexDirection:"column"}),I9=bt("h2",{fontSize:"1.875rem !important",fontWeight:"700 !important",marginTop:"1.5rem !important"}),cb=G.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}});function z9({state:e,appearance:t,logo:r,socialLayout:s="horizontal",additionalSignupFields:o}){const[c,p]=G.useState(null),[v,C]=G.useState(null),[A,E]=G.useState(!1),P=jy(t??{}),M={login:"Log in to your account",signup:"Create a new account"}[e],H=s==="vertical"?"vertical":"horizontal";return f.jsxs(O9,{className:P,children:[f.jsxs("div",{children:[r&&f.jsx("img",{style:M9,src:r,alt:"Your Company"}),f.jsx(I9,{children:M})]}),c&&f.jsxs(R9,{children:[c.title,c.description&&": ",c.description]}),v&&f.jsx(_9,{children:v}),f.jsx(cb.Provider,{value:{isLoading:A,setIsLoading:E,setErrorMessage:p,setSuccessMessage:C},children:(e==="login"||e==="signup")&&f.jsx(E9,{state:e,socialButtonsDirection:H,additionalSignupFields:o})})]})}var df;(function(e){e.Login="login",e.Signup="signup"})(df||(df={}));function F9({appearance:e,logo:t,socialLayout:r,additionalFields:s}){return f.jsx(z9,{appearance:e,logo:t,socialLayout:r,state:df.Signup,additionalSignupFields:s})}var D9=function(){function e(){this.keyToValue=new Map,this.valueToKey=new Map}return e.prototype.set=function(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)},e.prototype.getByKey=function(t){return this.keyToValue.get(t)},e.prototype.getByValue=function(t){return this.valueToKey.get(t)},e.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},e}(),db=function(){function e(t){this.generateIdentifier=t,this.kv=new D9}return e.prototype.register=function(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))},e.prototype.clear=function(){this.kv.clear()},e.prototype.getIdentifier=function(t){return this.kv.getByValue(t)},e.prototype.getValue=function(t){return this.kv.getByKey(t)},e}(),H9=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,o){s.__proto__=o}||function(s,o){for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(s[c]=o[c])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function s(){this.constructor=t}t.prototype=r===null?Object.create(r):(s.prototype=r.prototype,new s)}}(),B9=function(e){H9(t,e);function t(){var r=e.call(this,function(s){return s.name})||this;return r.classToAllowedProps=new Map,r}return t.prototype.register=function(r,s){typeof s=="object"?(s.allowProps&&this.classToAllowedProps.set(r,s.allowProps),e.prototype.register.call(this,r,s.identifier)):e.prototype.register.call(this,r,s)},t.prototype.getAllowedProps=function(r){return this.classToAllowedProps.get(r)},t}(db),V9=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s=r.call(e),o,c=[],p;try{for(;(t===void 0||t-- >0)&&!(o=s.next()).done;)c.push(o.value)}catch(v){p={error:v}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(p)throw p.error}}return c};function W9(e){if("values"in Object)return Object.values(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function $9(e,t){var r=W9(e);if("find"in r)return r.find(t);for(var s=r,o=0;o"u"},U9=function(e){return e===null},mo=function(e){return typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype},uf=function(e){return mo(e)&&Object.keys(e).length===0},yn=function(e){return Array.isArray(e)},G9=function(e){return typeof e=="string"},Z9=function(e){return typeof e=="number"&&!isNaN(e)},q9=function(e){return typeof e=="boolean"},Q9=function(e){return e instanceof RegExp},xo=function(e){return e instanceof Map},vo=function(e){return e instanceof Set},hb=function(e){return Y9(e)==="Symbol"},K9=function(e){return e instanceof Date&&!isNaN(e.valueOf())},J9=function(e){return e instanceof Error},qm=function(e){return typeof e=="number"&&isNaN(e)},ek=function(e){return q9(e)||U9(e)||ub(e)||Z9(e)||G9(e)||hb(e)},tk=function(e){return typeof e=="bigint"},rk=function(e){return e===1/0||e===-1/0},ik=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},nk=function(e){return e instanceof URL},fb=function(e){return e.replace(/\./g,"\\.")},zu=function(e){return e.map(String).map(fb).join(".")},Za=function(e){for(var t=[],r="",s=0;s0)&&!(o=s.next()).done;)c.push(o.value)}catch(v){p={error:v}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(p)throw p.error}}return c},pf=function(e,t){for(var r=0,s=t.length,o=e.length;r0?"Infinity":"-Infinity"},Number),Jr(function(e){return e===0&&1/e===-1/0},"number",function(){return"-0"},Number),Jr(nk,"URL",function(e){return e.toString()},function(e){return new URL(e)})];function Od(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}var gb=Od(function(e,t){if(hb(e)){var r=!!t.symbolRegistry.getIdentifier(e);return r}return!1},function(e,t){var r=t.symbolRegistry.getIdentifier(e);return["symbol",r]},function(e){return e.description},function(e,t,r){var s=r.symbolRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown symbol");return s}),sk=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),mb=Od(ik,function(e){return["typed-array",e.constructor.name]},function(e){return pf([],ff(e))},function(e,t){var r=sk[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function xb(e,t){if(e!=null&&e.constructor){var r=!!t.classRegistry.getIdentifier(e.constructor);return r}return!1}var vb=Od(xb,function(e,t){var r=t.classRegistry.getIdentifier(e.constructor);return["class",r]},function(e,t){var r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return hf({},e);var s={};return r.forEach(function(o){s[o]=e[o]}),s},function(e,t,r){var s=r.classRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(s.prototype),e)}),yb=Od(function(e,t){return!!t.customTransformerRegistry.findApplicable(e)},function(e,t){var r=t.customTransformerRegistry.findApplicable(e);return["custom",r.name]},function(e,t){var r=t.customTransformerRegistry.findApplicable(e);return r.serialize(e)},function(e,t,r){var s=r.customTransformerRegistry.findByName(t[1]);if(!s)throw new Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),ak=[vb,gb,yb,mb],Qm=function(e,t){var r=Zm(ak,function(o){return o.isApplicable(e,t)});if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};var s=Zm(pb,function(o){return o.isApplicable(e,t)});if(s)return{value:s.transform(e,t),type:s.annotation}},bb={};pb.forEach(function(e){bb[e.annotation]=e});var ok=function(e,t,r){if(yn(t))switch(t[0]){case"symbol":return gb.untransform(e,t,r);case"class":return vb.untransform(e,t,r);case"custom":return yb.untransform(e,t,r);case"typed-array":return mb.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{var s=bb[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,r)}},Rs=function(e,t){for(var r=e.keys();t>0;)r.next(),t--;return r.next().value};function wb(e){if(Ul(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Ul(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Ul(e,"constructor"))throw new Error("constructor is not allowed as a property")}var lk=function(e,t){wb(t);for(var r=0;r0)&&!(o=s.next()).done;)c.push(o.value)}catch(v){p={error:v}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(p)throw p.error}}return c},an=function(e,t){for(var r=0,s=t.length,o=e.length;rxf(o,t));if(!pk(e))return e;const r=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...r,...s].reduce((o,c)=>{if(Km(t.props)&&!t.props.includes(c))return o;const p=e[c],v=xf(p,t);return gk(o,c,v,e,t.nonenumerable),o},{})}var On=function(){return On=Object.assign||function(e){for(var t,r=1,s=arguments.length;r0)&&!(o=s.next()).done;)c.push(o.value)}catch(v){p={error:v}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(p)throw p.error}}return c},xk=function(e,t){for(var r=0,s=t.length,o=e.length;rs(c,[]);return o.internal=s,o}const Eb=hi("operations/stripe-payment",["User"]),Lb=hi("operations/update-current-user",["User"]);hi("operations/update-user-by-id",["User"]);const Pb=hi("operations/create-new-chat",["Chat","Conversation"]),yk=hi("operations/create-new-daily-analysis-chat",["Chat","Conversation"]),bi=hi("operations/update-current-chat",["Chat"]),Jm=hi("operations/update-current-conversation",["Conversation"]),bk=hi("operations/create-new-and-return-all-conversations",["Conversation"]),wk=hi("operations/create-new-and-return-last-conversation",["Conversation"]),kk=hi("operations/get-agent-response",["Chat","Conversation"]);function oa(e,t){const r=Nb(e);async function s(o,c){const p=await jb(r,c);return f9(o).reduce((v,C)=>C(v),p)}return Tb(s,{relativeQueryPath:e,queryRoute:r,entitiesUsed:t}),s}function Tb(e,{relativeQueryPath:t,queryRoute:r,entitiesUsed:s}){e.queryCacheKey=[t],e.route=r,d9(e.queryCacheKey,s)}const Ck=oa("operations/get-daily-stats",["User","DailyStats"]),Sk=oa("operations/get-paginated-users",["User"]),Ak=oa("operations/get-chat",["Chat"]),jk=oa("operations/get-chats",["Chat"]),Nk=oa("operations/get-conversations",["Conversation"]),Ek=oa("operations/get-chat-from-uuid",["Chat"]);function Un(e,t,r){if(typeof e!="function")throw new TypeError("useQuery requires queryFn to be a function.");if(!e.queryCacheKey)throw new TypeError("queryFn needs to have queryCacheKey property defined.");const s=t!==void 0?[...e.queryCacheKey,t]:e.queryCacheKey;return _w(Object.assign({queryKey:s,queryFn:()=>e(s,t)},r))}const Lk=Pk();function Qr(e,t){return Un(Lk,e,t)}function Pk(){const e="auth/me",t={method:Mc.Get,path:`/${e}`};async function r(){var s;try{const o=await En.get(t.path);return Ab(o.data)}catch(o){if(((s=o.response)===null||s===void 0?void 0:s.status)===401)return null;Md(o)}}return Tb(r,{relativeQueryPath:e,queryRoute:t,entitiesUsed:["User"]}),r}async function Rb(){try{await En.post("/auth/logout")}finally{n9(),await ab()}}function kt(e,t,r,s){const o=t?Tk(e,t):e,c=r?`?${new URLSearchParams(r).toString()}`:"",p=s?`#${s}`:"";return o+c+p}function Tk(e,t){function r(o){if(o.startsWith(":")){const c=_k(o);return t[c]}return o}const s=e.split("/").map(r).filter(Rk).join("/");return e.startsWith("/")?`/${s}`:s}function Rk(e){return!!e}function _k(e){return e.endsWith("?")?e.slice(1,-1):e.slice(1)}var Mk=function(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(e);okt(t,r,s,o),[t,r]);return f.jsx(rt,{to:p,...c})}const Ok={LandingPageRoute:{to:"/",build:e=>kt("/",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},LoginRoute:{to:"/login",build:e=>kt("/login",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},SignupRoute:{to:"/signup",build:e=>kt("/signup",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},TocPageRoute:{to:"/toc",build:e=>kt("/toc",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},PrivacyRoute:{to:"/privacy",build:e=>kt("/privacy",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},ChatPageRoute:{to:"/chat/:id?",build:e=>kt("/chat/:id?",e.params,e==null?void 0:e.search,e==null?void 0:e.hash)},PricingPageRoute:{to:"/pricing",build:e=>kt("/pricing",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AccountRoute:{to:"/account",build:e=>kt("/account",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},CheckoutRoute:{to:"/checkout",build:e=>kt("/checkout",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminRoute:{to:"/admin",build:e=>kt("/admin",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminUsersRoute:{to:"/admin/users",build:e=>kt("/admin/users",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminSettingsRoute:{to:"/admin/settings",build:e=>kt("/admin/settings",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminChartsRoute:{to:"/admin/chart",build:e=>kt("/admin/chart",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminMessagesRoute:{to:"/admin/messages",build:e=>kt("/admin/messages",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminFormElementsRoute:{to:"/admin/forms/form-elements",build:e=>kt("/admin/forms/form-elements",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminFormLayoutsRoute:{to:"/admin/forms/form-layouts",build:e=>kt("/admin/forms/form-layouts",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminCalendarRoute:{to:"/admin/calendar",build:e=>kt("/admin/calendar",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminUIAlertsRoute:{to:"/admin/ui/alerts",build:e=>kt("/admin/ui/alerts",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)},AdminUIButtonsRoute:{to:"/admin/ui/buttons",build:e=>kt("/admin/ui/buttons",void 0,e==null?void 0:e.search,e==null?void 0:e.hash)}};var Ik=Object.defineProperty,zk=(e,t,r)=>t in e?Ik(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fu=(e,t,r)=>(zk(e,typeof t!="symbol"?t+"":t,r),r);let Fk=class{constructor(){Fu(this,"current",this.detect()),Fu(this,"handoffState","pending"),Fu(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Li=new Fk,Ln=(e,t)=>{Li.isServer?G.useEffect(e,t):G.useLayoutEffect(e,t)};function Id(e){let t=G.useRef(e);return Ln(()=>{t.current=e},[e]),t}function Wo(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function u1(){let e=[],t={addEventListener(r,s,o,c){return r.addEventListener(s,o,c),t.add(()=>r.removeEventListener(s,o,c))},requestAnimationFrame(...r){let s=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(s))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let s=setTimeout(...r);return t.add(()=>clearTimeout(s))},microTask(...r){let s={current:!0};return Wo(()=>{s.current&&r[0]()}),t.add(()=>{s.current=!1})},style(r,s,o){let c=r.style.getPropertyValue(s);return Object.assign(r.style,{[s]:o}),this.add(()=>{Object.assign(r.style,{[s]:c})})},group(r){let s=u1();return r(s),this.add(()=>s.dispose())},add(r){return e.push(r),()=>{let s=e.indexOf(r);if(s>=0)for(let o of e.splice(s,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function Dk(){let[e]=G.useState(u1);return G.useEffect(()=>()=>e.dispose(),[e]),e}let Lr=function(e){let t=Id(e);return ge.useCallback((...r)=>t.current(...r),[t])};function zd(){let[e,t]=G.useState(Li.isHandoffComplete);return e&&Li.isHandoffComplete===!1&&t(!1),G.useEffect(()=>{e!==!0&&t(!0)},[e]),G.useEffect(()=>Li.handoff(),[]),e}var e0;let la=(e0=ge.useId)!=null?e0:function(){let e=zd(),[t,r]=ge.useState(e?()=>Li.nextId():null);return Ln(()=>{t===null&&r(Li.nextId())},[t]),t!=null?""+t:void 0};function bn(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let s=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,bn),s}function _b(e){return Li.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let vf=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var In=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(In||{}),Mb=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Mb||{}),Hk=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Hk||{});function Bk(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(vf)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ob=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ob||{});function Vk(e,t=0){var r;return e===((r=_b(e))==null?void 0:r.body)?!1:bn(t,{0(){return e.matches(vf)},1(){let s=e;for(;s!==null;){if(s.matches(vf))return!0;s=s.parentElement}return!1}})}function Gn(e){e==null||e.focus({preventScroll:!0})}let Wk=["textarea","input"].join(",");function $k(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Wk))!=null?r:!1}function Xk(e,t=r=>r){return e.slice().sort((r,s)=>{let o=t(r),c=t(s);if(o===null||c===null)return 0;let p=o.compareDocumentPosition(c);return p&Node.DOCUMENT_POSITION_FOLLOWING?-1:p&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Gl(e,t,{sorted:r=!0,relativeTo:s=null,skipElements:o=[]}={}){let c=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,p=Array.isArray(e)?r?Xk(e):e:Bk(e);o.length>0&&p.length>1&&(p=p.filter(M=>!o.includes(M))),s=s??c.activeElement;let v=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),C=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,p.indexOf(s))-1;if(t&4)return Math.max(0,p.indexOf(s))+1;if(t&8)return p.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),A=t&32?{preventScroll:!0}:{},E=0,P=p.length,B;do{if(E>=P||E+P<=0)return 0;let M=C+E;if(t&16)M=(M+P)%P;else{if(M<0)return 3;if(M>=P)return 1}B=p[M],B==null||B.focus(A),E+=v}while(B!==c.activeElement);return t&6&&$k(B)&&B.select(),B.hasAttribute("tabindex")||B.setAttribute("tabindex","0"),2}function Du(e,t,r){let s=Id(t);G.useEffect(()=>{function o(c){s.current(c)}return document.addEventListener(e,o,r),()=>document.removeEventListener(e,o,r)},[e,r])}function Yk(e,t,r=!0){let s=G.useRef(!1);G.useEffect(()=>{requestAnimationFrame(()=>{s.current=r})},[r]);function o(p,v){if(!s.current||p.defaultPrevented)return;let C=function E(P){return typeof P=="function"?E(P()):Array.isArray(P)||P instanceof Set?P:[P]}(e),A=v(p);if(A!==null&&A.getRootNode().contains(A)){for(let E of C){if(E===null)continue;let P=E instanceof HTMLElement?E:E.current;if(P!=null&&P.contains(A)||p.composed&&p.composedPath().includes(P))return}return!Vk(A,Ob.Loose)&&A.tabIndex!==-1&&p.preventDefault(),t(p,A)}}let c=G.useRef(null);Du("mousedown",p=>{var v,C;s.current&&(c.current=((C=(v=p.composedPath)==null?void 0:v.call(p))==null?void 0:C[0])||p.target)},!0),Du("click",p=>{c.current&&(o(p,()=>c.current),c.current=null)},!0),Du("blur",p=>o(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let Ib=Symbol();function Uk(e,t=!0){return Object.assign(e,{[Ib]:t})}function Di(...e){let t=G.useRef(e);G.useEffect(()=>{t.current=e},[e]);let r=Lr(s=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(s):o.current=s)});return e.every(s=>s==null||(s==null?void 0:s[Ib]))?void 0:r}function Gk(...e){return e.filter(Boolean).join(" ")}var yf=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(yf||{}),Zk=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Zk||{});function fi({ourProps:e,theirProps:t,slot:r,defaultTag:s,features:o,visible:c=!0,name:p}){let v=zb(t,e);if(c)return wl(v,r,s,p);let C=o??0;if(C&2){let{static:A=!1,...E}=v;if(A)return wl(E,r,s,p)}if(C&1){let{unmount:A=!0,...E}=v;return bn(A?0:1,{0(){return null},1(){return wl({...E,hidden:!0,style:{display:"none"}},r,s,p)}})}return wl(v,r,s,p)}function wl(e,t={},r,s){var o;let{as:c=r,children:p,refName:v="ref",...C}=Hu(e,["unmount","static"]),A=e.ref!==void 0?{[v]:e.ref}:{},E=typeof p=="function"?p(t):p;"className"in C&&C.className&&typeof C.className=="function"&&(C.className=C.className(t));let P={};if(t){let B=!1,M=[];for(let[H,D]of Object.entries(t))typeof D=="boolean"&&(B=!0),D===!0&&M.push(H);B&&(P["data-headlessui-state"]=M.join(" "))}if(c===G.Fragment&&Object.keys(t0(C)).length>0){if(!G.isValidElement(E)||Array.isArray(E)&&E.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${s} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(C).map(H=>` - ${H}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(H=>` - ${H}`).join(` `)].join(` -`));let B=Uk((o=L.props)==null?void 0:o.className,C.className),M=B?{className:B}:{};return G.cloneElement(L,Object.assign({},zb(L.props,t0(Hu(C,["ref"]))),P,A,Zk(L.ref,A.ref),M))}return G.createElement(c,Object.assign({},Hu(C,["ref"]),c!==G.Fragment&&A,c!==G.Fragment&&P),L)}function Zk(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}}function zb(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let s of e)for(let o in s)o.startsWith("on")&&typeof s[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(s[o])):t[o]=s[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(s=>[s,void 0])));for(let s in r)Object.assign(t,{[s](o,...c){let p=r[s];for(let v of p){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;v(o,...c)}}});return t}function pi(e){var t;return Object.assign(G.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function t0(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Hu(e,t=[]){let r=Object.assign({},e);for(let s of t)s in r&&delete r[s];return r}function qk(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let s=(t==null?void 0:t.getAttribute("disabled"))==="";return s&&Qk(r)?!1:s}function Qk(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Kk="div";var Ic=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ic||{});function Jk(e,t){let{features:r=1,...s}=e,o={ref:t,"aria-hidden":(r&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return fi({ourProps:o,theirProps:s,slot:{},defaultTag:Kk,name:"Hidden"})}let bf=pi(Jk),Fb=G.createContext(null);Fb.displayName="OpenClosedContext";var Ma=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ma||{});function eC(){return G.useContext(Fb)}var Db=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Db||{});function h1(e,t){let r=G.useRef([]),s=Lr(e);G.useEffect(()=>{let o=[...r.current];for(let[c,p]of t.entries())if(r.current[c]!==p){let v=s(t,o);return r.current=t,v}},[s,...t])}function tC(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function rC(e,t,r){let s=Id(t);G.useEffect(()=>{function o(c){s.current(c)}return window.addEventListener(e,o,r),()=>window.removeEventListener(e,o,r)},[e,r])}var Oa=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Oa||{});function iC(){let e=G.useRef(0);return rC("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Hb(){let e=G.useRef(!1);return Ln(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Fd(...e){return G.useMemo(()=>_b(...e),[...e])}function Bb(e,t,r,s){let o=Id(r);G.useEffect(()=>{e=e??window;function c(p){o.current(p)}return e.addEventListener(t,c,s),()=>e.removeEventListener(t,c,s)},[e,t,s])}function Vb(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let r of e.current)r.current instanceof HTMLElement&&t.add(r.current);return t}let nC="div";var Wb=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Wb||{});function sC(e,t){let r=G.useRef(null),s=Di(r,t),{initialFocus:o,containers:c,features:p=30,...v}=e;zd()||(p=1);let C=Fd(r);lC({ownerDocument:C},!!(p&16));let A=cC({ownerDocument:C,container:r,initialFocus:o},!!(p&2));dC({ownerDocument:C,container:r,containers:c,previousActiveElement:A},!!(p&8));let L=iC(),P=Lr(D=>{let Z=r.current;Z&&(W=>W())(()=>{bn(L.current,{[Oa.Forwards]:()=>{Gl(Z,In.First,{skipElements:[D.relatedTarget]})},[Oa.Backwards]:()=>{Gl(Z,In.Last,{skipElements:[D.relatedTarget]})}})})}),B=Fk(),M=G.useRef(!1),H={ref:s,onKeyDown(D){D.key=="Tab"&&(M.current=!0,B.requestAnimationFrame(()=>{M.current=!1}))},onBlur(D){let Z=Vb(c);r.current instanceof HTMLElement&&Z.add(r.current);let W=D.relatedTarget;W instanceof HTMLElement&&W.dataset.headlessuiFocusGuard!=="true"&&($b(Z,W)||(M.current?Gl(r.current,bn(L.current,{[Oa.Forwards]:()=>In.Next,[Oa.Backwards]:()=>In.Previous})|In.WrapAround,{relativeTo:D.target}):D.target instanceof HTMLElement&&Un(D.target)))}};return pe.createElement(pe.Fragment,null,!!(p&4)&&pe.createElement(bf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:Ic.Focusable}),fi({ourProps:H,theirProps:v,defaultTag:nC,name:"FocusTrap"}),!!(p&4)&&pe.createElement(bf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:Ic.Focusable}))}let aC=pi(sC),Ca=Object.assign(aC,{features:Wb}),Ki=[];if(typeof window<"u"&&typeof document<"u"){let e=function(t){t.target instanceof HTMLElement&&t.target!==document.body&&Ki[0]!==t.target&&(Ki.unshift(t.target),Ki=Ki.filter(r=>r!=null&&r.isConnected),Ki.splice(10))};window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})}function oC(e=!0){let t=G.useRef(Ki.slice());return h1(([r],[s])=>{s===!0&&r===!1&&Wo(()=>{t.current.splice(0)}),s===!1&&r===!0&&(t.current=Ki.slice())},[e,Ki,t]),Lr(()=>{var r;return(r=t.current.find(s=>s!=null&&s.isConnected))!=null?r:null})}function lC({ownerDocument:e},t){let r=oC(t);h1(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Un(r())},[t]);let s=G.useRef(!1);G.useEffect(()=>(s.current=!1,()=>{s.current=!0,Wo(()=>{s.current&&Un(r())})}),[])}function cC({ownerDocument:e,container:t,initialFocus:r},s){let o=G.useRef(null),c=Hb();return h1(()=>{if(!s)return;let p=t.current;p&&Wo(()=>{if(!c.current)return;let v=e==null?void 0:e.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===v){o.current=v;return}}else if(p.contains(v)){o.current=v;return}r!=null&&r.current?Un(r.current):Gl(p,In.First)===Mb.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[s]),o}function dC({ownerDocument:e,container:t,containers:r,previousActiveElement:s},o){let c=Hb();Bb(e==null?void 0:e.defaultView,"focus",p=>{if(!o||!c.current)return;let v=Vb(r);t.current instanceof HTMLElement&&v.add(t.current);let C=s.current;if(!C)return;let A=p.target;A&&A instanceof HTMLElement?$b(v,A)?(s.current=A,Un(A)):(p.preventDefault(),p.stopPropagation(),Un(C)):Un(s.current)},!0)}function $b(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let Xb=G.createContext(!1);function uC(){return G.useContext(Xb)}function wf(e){return pe.createElement(Xb.Provider,{value:e.force},e.children)}function hC(e){let t=uC(),r=G.useContext(Yb),s=Fd(e),[o,c]=G.useState(()=>{if(!t&&r!==null||Li.isServer)return null;let p=s==null?void 0:s.getElementById("headlessui-portal-root");if(p)return p;if(s===null)return null;let v=s.createElement("div");return v.setAttribute("id","headlessui-portal-root"),s.body.appendChild(v)});return G.useEffect(()=>{o!==null&&(s!=null&&s.body.contains(o)||s==null||s.body.appendChild(o))},[o,s]),G.useEffect(()=>{t||r!==null&&c(r.current)},[r,c,t]),o}let fC=G.Fragment;function pC(e,t){let r=e,s=G.useRef(null),o=Di(Yk(L=>{s.current=L}),t),c=Fd(s),p=hC(s),[v]=G.useState(()=>{var L;return Li.isServer?null:(L=c==null?void 0:c.createElement("div"))!=null?L:null}),C=zd(),A=G.useRef(!1);return Ln(()=>{if(A.current=!1,!(!p||!v))return p.contains(v)||(v.setAttribute("data-headlessui-portal",""),p.appendChild(v)),()=>{A.current=!0,Wo(()=>{var L;A.current&&(!p||!v||(v instanceof Node&&p.contains(v)&&p.removeChild(v),p.childNodes.length<=0&&((L=p.parentElement)==null||L.removeChild(p))))})}},[p,v]),C?!p||!v?null:Xv.createPortal(fi({ourProps:{ref:o},theirProps:r,defaultTag:fC,name:"Portal"}),v):null}let gC=G.Fragment,Yb=G.createContext(null);function mC(e,t){let{target:r,...s}=e,o={ref:Di(t)};return pe.createElement(Yb.Provider,{value:r},fi({ourProps:o,theirProps:s,defaultTag:gC,name:"Popover.Group"}))}let xC=pi(pC),vC=pi(mC),kf=Object.assign(xC,{Group:vC}),Ub=G.createContext(null);function Gb(){let e=G.useContext(Ub);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Gb),t}return e}function yC(){let[e,t]=G.useState([]);return[e.length>0?e.join(" "):void 0,G.useMemo(()=>function(r){let s=Lr(c=>(t(p=>[...p,c]),()=>t(p=>{let v=p.slice(),C=v.indexOf(c);return C!==-1&&v.splice(C,1),v}))),o=G.useMemo(()=>({register:s,slot:r.slot,name:r.name,props:r.props}),[s,r.slot,r.name,r.props]);return pe.createElement(Ub.Provider,{value:o},r.children)},[t])]}let bC="p";function wC(e,t){let r=oa(),{id:s=`headlessui-description-${r}`,...o}=e,c=Gb(),p=Di(t);Ln(()=>c.register(s),[s,c.register]);let v={ref:p,...c.props,id:s};return fi({ourProps:v,theirProps:o,slot:c.slot||{},defaultTag:bC,name:c.name||"Description"})}let kC=pi(wC),CC=Object.assign(kC,{}),f1=G.createContext(()=>{});f1.displayName="StackContext";var Cf=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Cf||{});function SC(){return G.useContext(f1)}function AC({children:e,onUpdate:t,type:r,element:s,enabled:o}){let c=SC(),p=Lr((...v)=>{t==null||t(...v),c(...v)});return Ln(()=>{let v=o===void 0||o===!0;return v&&p(0,r,s),()=>{v&&p(1,r,s)}},[p,r,s,o]),pe.createElement(f1.Provider,{value:p},e)}function jC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const NC=typeof Object.is=="function"?Object.is:jC,{useState:EC,useEffect:LC,useLayoutEffect:PC,useDebugValue:TC}=Qu;function RC(e,t,r){const s=t(),[{inst:o},c]=EC({inst:{value:s,getSnapshot:t}});return PC(()=>{o.value=s,o.getSnapshot=t,Bu(o)&&c({inst:o})},[e,s,t]),LC(()=>(Bu(o)&&c({inst:o}),e(()=>{Bu(o)&&c({inst:o})})),[e]),TC(s),s}function Bu(e){const t=e.getSnapshot,r=e.value;try{const s=t();return!NC(r,s)}catch{return!0}}function _C(e,t,r){return t()}const MC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",OC=!MC,IC=OC?_C:RC,zC="useSyncExternalStore"in Qu?(e=>e.useSyncExternalStore)(Qu):IC;function FC(e){return zC(e.subscribe,e.getSnapshot,e.getSnapshot)}function DC(e,t){let r=e(),s=new Set;return{getSnapshot(){return r},subscribe(o){return s.add(o),()=>s.delete(o)},dispatch(o,...c){let p=t[o].call(r,...c);p&&(r=p,s.forEach(v=>v()))}}}function HC(){let e;return{before({doc:t}){var r;let s=t.documentElement;e=((r=t.defaultView)!=null?r:window).innerWidth-s.clientWidth},after({doc:t,d:r}){let s=t.documentElement,o=s.clientWidth-s.offsetWidth,c=e-o;r.style(s,"paddingRight",`${c}px`)}}}function BC(){if(!tC())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:r,meta:s}){function o(p){return s.containers.flatMap(v=>v()).some(v=>v.contains(p))}r.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let c=null;r.addEventListener(t,"click",p=>{if(p.target instanceof HTMLElement)try{let v=p.target.closest("a");if(!v)return;let{hash:C}=new URL(v.href),A=t.querySelector(C);A&&!o(A)&&(c=A)}catch{}},!0),r.addEventListener(t,"touchmove",p=>{p.target instanceof HTMLElement&&!o(p.target)&&p.preventDefault()},{passive:!1}),r.add(()=>{window.scrollTo(0,window.pageYOffset+e),c&&c.isConnected&&(c.scrollIntoView({block:"nearest"}),c=null)})}}}function VC(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function WC(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Vn=DC(()=>new Map,{PUSH(e,t){var r;let s=(r=this.get(e))!=null?r:{doc:e,count:0,d:u1(),meta:new Set};return s.count++,s.meta.add(t),this.set(e,s),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let s={doc:e,d:t,meta:WC(r)},o=[BC(),HC(),VC()];o.forEach(({before:c})=>c==null?void 0:c(s)),o.forEach(({after:c})=>c==null?void 0:c(s))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Vn.subscribe(()=>{let e=Vn.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let s=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!s||!o&&s)&&Vn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Vn.dispatch("TEARDOWN",r)}});function $C(e,t,r){let s=FC(Vn),o=e?s.get(e):void 0,c=o?o.count>0:!1;return Ln(()=>{if(!(!e||!t))return Vn.dispatch("PUSH",e,r),()=>Vn.dispatch("POP",e,r)},[t,e]),c}let Vu=new Map,Sa=new Map;function r0(e,t=!0){Ln(()=>{var r;if(!t)return;let s=typeof e=="function"?e():e.current;if(!s)return;function o(){var p;if(!s)return;let v=(p=Sa.get(s))!=null?p:1;if(v===1?Sa.delete(s):Sa.set(s,v-1),v!==1)return;let C=Vu.get(s);C&&(C["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",C["aria-hidden"]),s.inert=C.inert,Vu.delete(s))}let c=(r=Sa.get(s))!=null?r:0;return Sa.set(s,c+1),c!==0||(Vu.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),o},[e,t])}var XC=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(XC||{}),YC=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(YC||{});let UC={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},zc=G.createContext(null);zc.displayName="DialogContext";function $o(e){let t=G.useContext(zc);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,$o),r}return t}function GC(e,t,r=()=>[document.body]){$C(e,t,s=>{var o;return{containers:[...(o=s.containers)!=null?o:[],r]}})}function ZC(e,t){return bn(t.type,UC,e,t)}let qC="div",QC=yf.RenderStrategy|yf.Static;function KC(e,t){let r=oa(),{id:s=`headlessui-dialog-${r}`,open:o,onClose:c,initialFocus:p,__demoMode:v=!1,...C}=e,[A,L]=G.useState(0),P=eC();o===void 0&&P!==null&&(o=(P&Ma.Open)===Ma.Open);let B=G.useRef(null),M=Di(B,t),H=G.useRef(null),D=Fd(B),Z=e.hasOwnProperty("open")||P!==null,W=e.hasOwnProperty("onClose");if(!Z&&!W)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!Z)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!W)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof c!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${c}`);let V=o?0:1,[_,K]=G.useReducer(ZC,{titleId:null,descriptionId:null,panelRef:G.createRef()}),ee=Lr(()=>c(!1)),X=Lr(He=>K({type:0,id:He})),q=zd()?v?!1:V===0:!1,J=A>1,me=G.useContext(zc)!==null,ce=J?"parent":"leaf",Te=P!==null?(P&Ma.Closing)===Ma.Closing:!1,we=me||Te?!1:q,Ee=G.useCallback(()=>{var He,Be;return(Be=Array.from((He=D==null?void 0:D.querySelectorAll("body > *"))!=null?He:[]).find(Me=>Me.id==="headlessui-portal-root"?!1:Me.contains(H.current)&&Me instanceof HTMLElement))!=null?Be:null},[H]);r0(Ee,we);let Fe=J?!0:q,Re=G.useCallback(()=>{var He,Be;return(Be=Array.from((He=D==null?void 0:D.querySelectorAll("[data-headlessui-portal]"))!=null?He:[]).find(Me=>Me.contains(H.current)&&Me instanceof HTMLElement))!=null?Be:null},[H]);r0(Re,Fe);let qe=Lr(()=>{var He,Be;return[...Array.from((He=D==null?void 0:D.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))!=null?He:[]).filter(Me=>!(Me===document.body||Me===document.head||!(Me instanceof HTMLElement)||Me.contains(H.current)||_.panelRef.current&&Me.contains(_.panelRef.current))),(Be=_.panelRef.current)!=null?Be:B.current]});Xk(()=>qe(),ee,!(!q||J));let de=!(J||V!==0);Bb(D==null?void 0:D.defaultView,"keydown",He=>{de&&(He.defaultPrevented||He.key===Db.Escape&&(He.preventDefault(),He.stopPropagation(),ee()))}),GC(D,!(Te||V!==0||me),qe),G.useEffect(()=>{if(V!==0||!B.current)return;let He=new ResizeObserver(Be=>{for(let Me of Be){let Nt=Me.target.getBoundingClientRect();Nt.x===0&&Nt.y===0&&Nt.width===0&&Nt.height===0&&ee()}});return He.observe(B.current),()=>He.disconnect()},[V,B,ee]);let[oe,Ae]=yC(),je=G.useMemo(()=>[{dialogState:V,close:ee,setTitleId:X},_],[V,_,ee,X]),ze=G.useMemo(()=>({open:V===0}),[V]),Ue={ref:M,id:s,role:"dialog","aria-modal":V===0?!0:void 0,"aria-labelledby":_.titleId,"aria-describedby":oe};return pe.createElement(AC,{type:"Dialog",enabled:V===0,element:B,onUpdate:Lr((He,Be)=>{Be==="Dialog"&&bn(He,{[Cf.Add]:()=>L(Me=>Me+1),[Cf.Remove]:()=>L(Me=>Me-1)})})},pe.createElement(wf,{force:!0},pe.createElement(kf,null,pe.createElement(zc.Provider,{value:je},pe.createElement(kf.Group,{target:B},pe.createElement(wf,{force:!1},pe.createElement(Ae,{slot:ze,name:"Dialog.Description"},pe.createElement(Ca,{initialFocus:p,containers:qe,features:q?bn(ce,{parent:Ca.features.RestoreFocus,leaf:Ca.features.All&~Ca.features.FocusLock}):Ca.features.None},fi({ourProps:Ue,theirProps:C,slot:ze,defaultTag:qC,features:QC,visible:V===0,name:"Dialog"})))))))),pe.createElement(bf,{features:Ic.Hidden,ref:H}))}let JC="div";function eS(e,t){let r=oa(),{id:s=`headlessui-dialog-overlay-${r}`,...o}=e,[{dialogState:c,close:p}]=$o("Dialog.Overlay"),v=Di(t),C=Lr(L=>{if(L.target===L.currentTarget){if(qk(L.currentTarget))return L.preventDefault();L.preventDefault(),L.stopPropagation(),p()}}),A=G.useMemo(()=>({open:c===0}),[c]);return fi({ourProps:{ref:v,id:s,"aria-hidden":!0,onClick:C},theirProps:o,slot:A,defaultTag:JC,name:"Dialog.Overlay"})}let tS="div";function rS(e,t){let r=oa(),{id:s=`headlessui-dialog-backdrop-${r}`,...o}=e,[{dialogState:c},p]=$o("Dialog.Backdrop"),v=Di(t);G.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[p.panelRef]);let C=G.useMemo(()=>({open:c===0}),[c]);return pe.createElement(wf,{force:!0},pe.createElement(kf,null,fi({ourProps:{ref:v,id:s,"aria-hidden":!0},theirProps:o,slot:C,defaultTag:tS,name:"Dialog.Backdrop"})))}let iS="div";function nS(e,t){let r=oa(),{id:s=`headlessui-dialog-panel-${r}`,...o}=e,[{dialogState:c},p]=$o("Dialog.Panel"),v=Di(t,p.panelRef),C=G.useMemo(()=>({open:c===0}),[c]),A=Lr(L=>{L.stopPropagation()});return fi({ourProps:{ref:v,id:s,onClick:A},theirProps:o,slot:C,defaultTag:iS,name:"Dialog.Panel"})}let sS="h2";function aS(e,t){let r=oa(),{id:s=`headlessui-dialog-title-${r}`,...o}=e,[{dialogState:c,setTitleId:p}]=$o("Dialog.Title"),v=Di(t);G.useEffect(()=>(p(s),()=>p(null)),[s,p]);let C=G.useMemo(()=>({open:c===0}),[c]);return fi({ourProps:{ref:v,id:s},theirProps:o,slot:C,defaultTag:sS,name:"Dialog.Title"})}let oS=pi(KC),lS=pi(rS),cS=pi(nS),dS=pi(eS),uS=pi(aS),Fc=Object.assign(oS,{Backdrop:lS,Panel:cS,Overlay:dS,Title:uS,Description:CC});var Zb={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i0=pe.createContext&&pe.createContext(Zb),gn=function(){return gn=Object.assign||function(e){for(var t,r=1,s=arguments.length;r{const r=window.location.pathname,s=()=>{t&&t(!1)};return f.jsxs(f.Fragment,{children:[f.jsx("ul",{className:`flex flex-col gap-5 border-b border-stroke py-4 dark:border-strokedark ${r==="/admin"?"px-6":"sm:px-6"}`,children:f.jsx("li",{children:f.jsxs(vo,{to:"/account",onClick:s,className:"no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out text-captn-light-cream hover:text-captn-light-blue",children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M20.8656 8.86874C20.5219 8.49062 20.0406 8.28437 19.525 8.28437H19.4219C19.25 8.28437 19.1125 8.18124 19.0781 8.04374C19.0437 7.90624 18.975 7.80312 18.9406 7.66562C18.8719 7.52812 18.9406 7.39062 19.0437 7.28749L19.1125 7.21874C19.4906 6.87499 19.6969 6.39374 19.6969 5.87812C19.6969 5.36249 19.525 4.88124 19.1469 4.50312L17.8062 3.12812C17.0844 2.37187 15.8469 2.33749 15.0906 3.09374L14.9875 3.16249C14.8844 3.26562 14.7125 3.29999 14.5406 3.23124C14.4031 3.16249 14.2656 3.09374 14.0937 3.05937C13.9219 2.99062 13.8187 2.85312 13.8187 2.71562V2.54374C13.8187 1.47812 12.9594 0.618744 11.8937 0.618744H9.96875C9.45312 0.618744 8.97187 0.824994 8.62812 1.16874C8.25 1.54687 8.07812 2.02812 8.07812 2.50937V2.64687C8.07812 2.78437 7.975 2.92187 7.8375 2.99062C7.76875 3.02499 7.73437 3.02499 7.66562 3.05937C7.52812 3.12812 7.35625 3.09374 7.25312 2.99062L7.18437 2.88749C6.84062 2.50937 6.35937 2.30312 5.84375 2.30312C5.32812 2.30312 4.84687 2.47499 4.46875 2.85312L3.09375 4.19374C2.3375 4.91562 2.30312 6.15312 3.05937 6.90937L3.12812 7.01249C3.23125 7.11562 3.26562 7.28749 3.19687 7.39062C3.12812 7.52812 3.09375 7.63124 3.025 7.76874C2.95625 7.90624 2.85312 7.97499 2.68125 7.97499H2.57812C2.0625 7.97499 1.58125 8.14687 1.20312 8.52499C0.824996 8.86874 0.618746 9.34999 0.618746 9.86562L0.584371 11.7906C0.549996 12.8562 1.40937 13.7156 2.475 13.75H2.57812C2.75 13.75 2.8875 13.8531 2.92187 13.9906C2.99062 14.0937 3.05937 14.1969 3.09375 14.3344C3.12812 14.4719 3.09375 14.6094 2.99062 14.7125L2.92187 14.7812C2.54375 15.125 2.3375 15.6062 2.3375 16.1219C2.3375 16.6375 2.50937 17.1187 2.8875 17.4969L4.22812 18.8719C4.95 19.6281 6.1875 19.6625 6.94375 18.9062L7.04687 18.8375C7.15 18.7344 7.32187 18.7 7.49375 18.7687C7.63125 18.8375 7.76875 18.9062 7.94062 18.9406C8.1125 19.0094 8.21562 19.1469 8.21562 19.2844V19.4219C8.21562 20.4875 9.075 21.3469 10.1406 21.3469H12.0656C13.1312 21.3469 13.9906 20.4875 13.9906 19.4219V19.2844C13.9906 19.1469 14.0937 19.0094 14.2312 18.9406C14.3 18.9062 14.3344 18.9062 14.4031 18.8719C14.575 18.8031 14.7125 18.8375 14.8156 18.9406L14.8844 19.0437C15.2281 19.4219 15.7094 19.6281 16.225 19.6281C16.7406 19.6281 17.2219 19.4562 17.6 19.0781L18.975 17.7375C19.7312 17.0156 19.7656 15.7781 19.0094 15.0219L18.9406 14.9187C18.8375 14.8156 18.8031 14.6437 18.8719 14.5406C18.9406 14.4031 18.975 14.3 19.0437 14.1625C19.1125 14.025 19.25 13.9562 19.3875 13.9562H19.4906H19.525C20.5562 13.9562 21.4156 13.1312 21.45 12.0656L21.4844 10.1406C21.4156 9.72812 21.2094 9.21249 20.8656 8.86874ZM19.8344 12.1C19.8344 12.3062 19.6625 12.4781 19.4562 12.4781H19.3531H19.3187C18.5281 12.4781 17.8062 12.9594 17.5312 13.6469C17.4969 13.75 17.4281 13.8531 17.3937 13.9562C17.0844 14.6437 17.2219 15.5031 17.7719 16.0531L17.8406 16.1562C17.9781 16.2937 17.9781 16.5344 17.8406 16.6719L16.4656 18.0125C16.3625 18.1156 16.2594 18.1156 16.1906 18.1156C16.1219 18.1156 16.0187 18.1156 15.9156 18.0125L15.8469 17.9094C15.2969 17.325 14.4719 17.1531 13.7156 17.4969L13.5781 17.5656C12.8219 17.875 12.3406 18.5625 12.3406 19.3531V19.4906C12.3406 19.6969 12.1687 19.8687 11.9625 19.8687H10.0375C9.83125 19.8687 9.65937 19.6969 9.65937 19.4906V19.3531C9.65937 18.5625 9.17812 17.8406 8.42187 17.5656C8.31875 17.5312 8.18125 17.4625 8.07812 17.4281C7.80312 17.2906 7.52812 17.2562 7.25312 17.2562C6.77187 17.2562 6.29062 17.4281 5.9125 17.8062L5.84375 17.8406C5.70625 17.9781 5.46562 17.9781 5.32812 17.8406L3.9875 16.4656C3.88437 16.3625 3.88437 16.2594 3.88437 16.1906C3.88437 16.1219 3.88437 16.0187 3.9875 15.9156L4.05625 15.8469C4.64062 15.2969 4.8125 14.4375 4.50312 13.75C4.46875 13.6469 4.43437 13.5437 4.36562 13.4406C4.09062 12.7187 3.40312 12.2031 2.6125 12.2031H2.50937C2.30312 12.2031 2.13125 12.0312 2.13125 11.825L2.16562 9.89999C2.16562 9.76249 2.23437 9.69374 2.26875 9.62499C2.30312 9.59062 2.40625 9.52187 2.54375 9.52187H2.64687C3.4375 9.55624 4.15937 9.07499 4.46875 8.35312C4.50312 8.24999 4.57187 8.14687 4.60625 8.04374C4.91562 7.35624 4.77812 6.49687 4.22812 5.94687L4.15937 5.84374C4.02187 5.70624 4.02187 5.46562 4.15937 5.32812L5.53437 3.98749C5.6375 3.88437 5.74062 3.88437 5.80937 3.88437C5.87812 3.88437 5.98125 3.88437 6.08437 3.98749L6.15312 4.09062C6.70312 4.67499 7.52812 4.84687 8.28437 4.53749L8.42187 4.46874C9.17812 4.15937 9.65937 3.47187 9.65937 2.68124V2.54374C9.65937 2.40624 9.72812 2.33749 9.7625 2.26874C9.79687 2.19999 9.9 2.16562 10.0375 2.16562H11.9625C12.1687 2.16562 12.3406 2.33749 12.3406 2.54374V2.68124C12.3406 3.47187 12.8219 4.19374 13.5781 4.46874C13.6812 4.50312 13.8187 4.57187 13.9219 4.60624C14.6437 4.94999 15.5031 4.81249 16.0875 4.26249L16.1906 4.19374C16.3281 4.05624 16.5687 4.05624 16.7062 4.19374L18.0469 5.56874C18.15 5.67187 18.15 5.77499 18.15 5.84374C18.15 5.91249 18.1156 6.01562 18.0469 6.11874L17.9781 6.18749C17.3594 6.70312 17.1875 7.56249 17.4625 8.24999C17.4969 8.35312 17.5312 8.45624 17.6 8.55937C17.875 9.28124 18.5625 9.79687 19.3531 9.79687H19.4562C19.5937 9.79687 19.6625 9.86562 19.7312 9.89999C19.8 9.93437 19.8344 10.0375 19.8344 10.175V12.1Z",fill:""}),f.jsx("path",{d:"M11 6.32498C8.42189 6.32498 6.32501 8.42186 6.32501 11C6.32501 13.5781 8.42189 15.675 11 15.675C13.5781 15.675 15.675 13.5781 15.675 11C15.675 8.42186 13.5781 6.32498 11 6.32498ZM11 14.1281C9.28126 14.1281 7.87189 12.7187 7.87189 11C7.87189 9.28123 9.28126 7.87186 11 7.87186C12.7188 7.87186 14.1281 9.28123 14.1281 11C14.1281 12.7187 12.7188 14.1281 11 14.1281Z",fill:""})]}),"Account settings"]})})}),!!e&&e.isAdmin&&f.jsx("ul",{className:`flex flex-col gap-5 border-b border-stroke py-4 dark:border-strokedark ${r==="/admin"?"px-6":"sm:px-6"}`,children:f.jsx("li",{className:"flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out hover:text-captn-light-blue",children:f.jsxs(vo,{to:"/admin",onClick:s,className:"no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out text-captn-light-cream hover:text-captn-light-blue",children:[f.jsx(mS,{size:"1.1rem"}),"Admin dashboard"]})})}),f.jsxs("button",{onClick:()=>Rb(),className:`flex items-center gap-3.5 py-4 text-sm font-medium duration-300 ease-in-out hover:text-captn-light-blue ${r==="/admin"?"px-6":"sm:px-6"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M15.5375 0.618744H11.6531C10.7594 0.618744 10.0031 1.37499 10.0031 2.26874V4.64062C10.0031 5.05312 10.3469 5.39687 10.7594 5.39687C11.1719 5.39687 11.55 5.05312 11.55 4.64062V2.23437C11.55 2.16562 11.5844 2.13124 11.6531 2.13124H15.5375C16.3625 2.13124 17.0156 2.78437 17.0156 3.60937V18.3562C17.0156 19.1812 16.3625 19.8344 15.5375 19.8344H11.6531C11.5844 19.8344 11.55 19.8 11.55 19.7312V17.3594C11.55 16.9469 11.2062 16.6031 10.7594 16.6031C10.3125 16.6031 10.0031 16.9469 10.0031 17.3594V19.7312C10.0031 20.625 10.7594 21.3812 11.6531 21.3812H15.5375C17.2219 21.3812 18.5625 20.0062 18.5625 18.3562V3.64374C18.5625 1.95937 17.1875 0.618744 15.5375 0.618744Z",fill:""}),f.jsx("path",{d:"M6.05001 11.7563H12.2031C12.6156 11.7563 12.9594 11.4125 12.9594 11C12.9594 10.5875 12.6156 10.2438 12.2031 10.2438H6.08439L8.21564 8.07813C8.52501 7.76875 8.52501 7.2875 8.21564 6.97812C7.90626 6.66875 7.42501 6.66875 7.11564 6.97812L3.67814 10.4844C3.36876 10.7938 3.36876 11.275 3.67814 11.5844L7.11564 15.0906C7.25314 15.2281 7.45939 15.3312 7.66564 15.3312C7.87189 15.3312 8.04376 15.2625 8.21564 15.125C8.52501 14.8156 8.52501 14.3344 8.21564 14.025L6.05001 11.7563Z",fill:""})]}),"Log out"]})]})},m1=({user:e})=>{const[t,r]=G.useState(!1),s=G.useRef(null),o=G.useRef(null),c=()=>r(p=>!p);return G.useEffect(()=>{const p=({target:v})=>{o.current&&(!t||o.current.contains(v)||s.current.contains(v)||r(!1))};return document.addEventListener("click",p),()=>document.removeEventListener("click",p)}),G.useEffect(()=>{const p=({keyCode:v})=>{!t||v!==27||r(!1)};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}),f.jsxs("div",{className:"relative",children:[f.jsxs("button",{ref:s,onClick:c,className:"flex items-center gap-4 duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue",children:[f.jsx("span",{className:"hidden text-right lg:block",children:f.jsx("span",{className:"block text-sm font-medium dark:text-captn-light-cream",children:e.username})}),f.jsx(gS,{size:"1.1rem",className:"ml-1 mt-[0.1rem] dark:text-captn-light-cream"}),f.jsx("svg",{className:`hidden fill-current dark:fill-white sm:block ${t?"rotate-180":""}`,width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.410765 0.910734C0.736202 0.585297 1.26384 0.585297 1.58928 0.910734L6.00002 5.32148L10.4108 0.910734C10.7362 0.585297 11.2638 0.585297 11.5893 0.910734C11.9147 1.23617 11.9147 1.76381 11.5893 2.08924L6.58928 7.08924C6.26384 7.41468 5.7362 7.41468 5.41077 7.08924L0.410765 2.08924C0.0853277 1.76381 0.0853277 1.23617 0.410765 0.910734Z",fill:""})})]}),f.jsx("div",{ref:o,className:`absolute right-0 mt-4 flex w-62.5 flex-col rounded-sm border border-stroke bg-captn-dark-blue shadow-default dark:border-strokedark dark:bg-boxdark text-captn-light-cream ${t===!0?"block":"hidden"}`,children:f.jsx(g1,{user:e,setMobileMenuOpen:c})})]})};var Je;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{const c={};for(const p of o)c[p]=p;return c},e.getValidEnumValues=o=>{const c=e.objectKeys(o).filter(v=>typeof o[o[v]]!="number"),p={};for(const v of c)p[v]=o[v];return e.objectValues(p)},e.objectValues=o=>e.objectKeys(o).map(function(c){return o[c]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const c=[];for(const p in o)Object.prototype.hasOwnProperty.call(o,p)&&c.push(p);return c},e.find=(o,c)=>{for(const p of o)if(c(p))return p},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function s(o,c=" | "){return o.map(p=>typeof p=="string"?`'${p}'`:p).join(c)}e.joinValues=s,e.jsonStringifyReplacer=(o,c)=>typeof c=="bigint"?c.toString():c})(Je||(Je={}));var Sf;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Sf||(Sf={}));const ve=Je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ji=e=>{switch(typeof e){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return isNaN(e)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(e)?ve.array:e===null?ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ve.promise:typeof Map<"u"&&e instanceof Map?ve.map:typeof Set<"u"&&e instanceof Set?ve.set:typeof Date<"u"&&e instanceof Date?ve.date:ve.object;default:return ve.unknown}},he=Je.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),xS=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ur extends Error{constructor(t){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(c){return c.message},s={_errors:[]},o=c=>{for(const p of c.issues)if(p.code==="invalid_union")p.unionErrors.map(o);else if(p.code==="invalid_return_type")o(p.returnTypeError);else if(p.code==="invalid_arguments")o(p.argumentsError);else if(p.path.length===0)s._errors.push(r(p));else{let v=s,C=0;for(;Cr.message){const r={},s=[];for(const o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):s.push(t(o));return{formErrors:s,fieldErrors:r}}get formErrors(){return this.flatten()}}Ur.create=e=>new Ur(e);const yo=(e,t)=>{let r;switch(e.code){case he.invalid_type:e.received===ve.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case he.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Je.jsonStringifyReplacer)}`;break;case he.unrecognized_keys:r=`Unrecognized key(s) in object: ${Je.joinValues(e.keys,", ")}`;break;case he.invalid_union:r="Invalid input";break;case he.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Je.joinValues(e.options)}`;break;case he.invalid_enum_value:r=`Invalid enum value. Expected ${Je.joinValues(e.options)}, received '${e.received}'`;break;case he.invalid_arguments:r="Invalid function arguments";break;case he.invalid_return_type:r="Invalid function return type";break;case he.invalid_date:r="Invalid date";break;case he.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Je.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case he.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case he.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case he.custom:r="Invalid input";break;case he.invalid_intersection_types:r="Intersection results could not be merged";break;case he.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case he.not_finite:r="Number must be finite";break;default:r=t.defaultError,Je.assertNever(e)}return{message:r}};let Jb=yo;function vS(e){Jb=e}function Hc(){return Jb}const Bc=e=>{const{data:t,path:r,errorMaps:s,issueData:o}=e,c=[...r,...o.path||[]],p={...o,path:c};let v="";const C=s.filter(A=>!!A).slice().reverse();for(const A of C)v=A(p,{data:t,defaultError:v}).message;return{...o,path:c,message:o.message||v}},yS=[];function ke(e,t){const r=Bc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Hc(),yo].filter(s=>!!s)});e.common.issues.push(r)}class Gt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const s=[];for(const o of r){if(o.status==="aborted")return De;o.status==="dirty"&&t.dirty(),s.push(o.value)}return{status:t.value,value:s}}static async mergeObjectAsync(t,r){const s=[];for(const o of r)s.push({key:await o.key,value:await o.value});return Gt.mergeObjectSync(t,s)}static mergeObjectSync(t,r){const s={};for(const o of r){const{key:c,value:p}=o;if(c.status==="aborted"||p.status==="aborted")return De;c.status==="dirty"&&t.dirty(),p.status==="dirty"&&t.dirty(),c.value!=="__proto__"&&(typeof p.value<"u"||o.alwaysSet)&&(s[c.value]=p.value)}return{status:t.value,value:s}}}const De=Object.freeze({status:"aborted"}),e2=e=>({status:"dirty",value:e}),rr=e=>({status:"valid",value:e}),Af=e=>e.status==="aborted",jf=e=>e.status==="dirty",bo=e=>e.status==="valid",Vc=e=>typeof Promise<"u"&&e instanceof Promise;var _e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_e||(_e={}));class li{constructor(t,r,s,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=s,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const n0=(e,t)=>{if(bo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Ur(e.common.issues);return this._error=r,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:s,description:o}=e;if(t&&(r||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(p,v)=>p.code!=="invalid_type"?{message:v.defaultError}:typeof v.data>"u"?{message:s??v.defaultError}:{message:r??v.defaultError},description:o}}class Xe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Ji(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ji(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Gt,ctx:{common:t.parent.common,data:t.data,parsedType:Ji(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Vc(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const s=this.safeParse(t,r);if(s.success)return s.data;throw s.error}safeParse(t,r){var s;const o={common:{issues:[],async:(s=r==null?void 0:r.async)!==null&&s!==void 0?s:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ji(t)},c=this._parseSync({data:t,path:o.path,parent:o});return n0(o,c)}async parseAsync(t,r){const s=await this.safeParseAsync(t,r);if(s.success)return s.data;throw s.error}async safeParseAsync(t,r){const s={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ji(t)},o=this._parse({data:t,path:s.path,parent:s}),c=await(Vc(o)?o:Promise.resolve(o));return n0(s,c)}refine(t,r){const s=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,c)=>{const p=t(o),v=()=>c.addIssue({code:he.custom,...s(o)});return typeof Promise<"u"&&p instanceof Promise?p.then(C=>C?!0:(v(),!1)):p?!0:(v(),!1)})}refinement(t,r){return this._refinement((s,o)=>t(s)?!0:(o.addIssue(typeof r=="function"?r(s,o):r),!1))}_refinement(t){return new qr({schema:this,typeName:Ie.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Pi.create(this,this._def)}nullable(){return is.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Gr.create(this,this._def)}promise(){return Js.create(this,this._def)}or(t){return So.create([this,t],this._def)}and(t){return Ao.create(this,t,this._def)}transform(t){return new qr({...$e(this._def),schema:this,typeName:Ie.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Po({...$e(this._def),innerType:this,defaultValue:r,typeName:Ie.ZodDefault})}brand(){return new r2({typeName:Ie.ZodBranded,type:this,...$e(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Yc({...$e(this._def),innerType:this,catchValue:r,typeName:Ie.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Xo.create(this,t)}readonly(){return Gc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const bS=/^c[^\s-]{8,}$/i,wS=/^[a-z][a-z0-9]*$/,kS=/^[0-9A-HJKMNP-TV-Z]{26}$/,CS=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,SS=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,AS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wu;const jS=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,NS=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ES=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function LS(e,t){return!!((t==="v4"||!t)&&jS.test(e)||(t==="v6"||!t)&&NS.test(e))}class Wr extends Xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ve.string){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ve.string,received:c.parsedType}),De}const s=new Gt;let o;for(const c of this._def.checks)if(c.kind==="min")t.data.lengthc.value&&(o=this._getOrReturnCtx(t,o),ke(o,{code:he.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),s.dirty());else if(c.kind==="length"){const p=t.data.length>c.value,v=t.data.lengtht.test(o),{validation:r,code:he.invalid_string,..._e.errToObj(s)})}_addCheck(t){return new Wr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._e.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._e.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._e.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._e.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._e.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._e.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._e.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._e.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,..._e.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._e.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._e.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._e.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._e.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._e.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._e.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._e.errToObj(r)})}nonempty(t){return this.min(1,_e.errToObj(t))}trim(){return new Wr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Wr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Wr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new Wr({checks:[],typeName:Ie.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};function PS(e,t){const r=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,o=r>s?r:s,c=parseInt(e.toFixed(o).replace(".","")),p=parseInt(t.toFixed(o).replace(".",""));return c%p/Math.pow(10,o)}class wn extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ve.number){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ve.number,received:c.parsedType}),De}let s;const o=new Gt;for(const c of this._def.checks)c.kind==="int"?Je.isInteger(t.data)||(s=this._getOrReturnCtx(t,s),ke(s,{code:he.invalid_type,expected:"integer",received:"float",message:c.message}),o.dirty()):c.kind==="min"?(c.inclusive?t.datac.value:t.data>=c.value)&&(s=this._getOrReturnCtx(t,s),ke(s,{code:he.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),o.dirty()):c.kind==="multipleOf"?PS(t.data,c.value)!==0&&(s=this._getOrReturnCtx(t,s),ke(s,{code:he.not_multiple_of,multipleOf:c.value,message:c.message}),o.dirty()):c.kind==="finite"?Number.isFinite(t.data)||(s=this._getOrReturnCtx(t,s),ke(s,{code:he.not_finite,message:c.message}),o.dirty()):Je.assertNever(c);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_e.toString(r))}setLimit(t,r,s,o){return new wn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:_e.toString(o)}]})}_addCheck(t){return new wn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_e.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_e.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&Je.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(r===null||s.value>r)&&(r=s.value):s.kind==="max"&&(t===null||s.valuenew wn({checks:[],typeName:Ie.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class kn extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ve.bigint){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ve.bigint,received:c.parsedType}),De}let s;const o=new Gt;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?t.datac.value:t.data>=c.value)&&(s=this._getOrReturnCtx(t,s),ke(s,{code:he.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),o.dirty()):c.kind==="multipleOf"?t.data%c.value!==BigInt(0)&&(s=this._getOrReturnCtx(t,s),ke(s,{code:he.not_multiple_of,multipleOf:c.value,message:c.message}),o.dirty()):Je.assertNever(c);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_e.toString(r))}setLimit(t,r,s,o){return new kn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:_e.toString(o)}]})}_addCheck(t){return new kn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_e.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new kn({checks:[],typeName:Ie.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};class wo extends Xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ve.boolean){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ve.boolean,received:s.parsedType}),De}return rr(t.data)}}wo.create=e=>new wo({typeName:Ie.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class ts extends Xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ve.date){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ve.date,received:c.parsedType}),De}if(isNaN(t.data.getTime())){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_date}),De}const s=new Gt;let o;for(const c of this._def.checks)c.kind==="min"?t.data.getTime()c.value&&(o=this._getOrReturnCtx(t,o),ke(o,{code:he.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),s.dirty()):Je.assertNever(c);return{status:s.value,value:new Date(t.data.getTime())}}_addCheck(t){return new ts({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_e.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_e.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew ts({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ie.ZodDate,...$e(e)});class Wc extends Xe{_parse(t){if(this._getType(t)!==ve.symbol){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ve.symbol,received:s.parsedType}),De}return rr(t.data)}}Wc.create=e=>new Wc({typeName:Ie.ZodSymbol,...$e(e)});class ko extends Xe{_parse(t){if(this._getType(t)!==ve.undefined){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ve.undefined,received:s.parsedType}),De}return rr(t.data)}}ko.create=e=>new ko({typeName:Ie.ZodUndefined,...$e(e)});class Co extends Xe{_parse(t){if(this._getType(t)!==ve.null){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ve.null,received:s.parsedType}),De}return rr(t.data)}}Co.create=e=>new Co({typeName:Ie.ZodNull,...$e(e)});class Ks extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return rr(t.data)}}Ks.create=e=>new Ks({typeName:Ie.ZodAny,...$e(e)});class Gn extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return rr(t.data)}}Gn.create=e=>new Gn({typeName:Ie.ZodUnknown,...$e(e)});class Ii extends Xe{_parse(t){const r=this._getOrReturnCtx(t);return ke(r,{code:he.invalid_type,expected:ve.never,received:r.parsedType}),De}}Ii.create=e=>new Ii({typeName:Ie.ZodNever,...$e(e)});class $c extends Xe{_parse(t){if(this._getType(t)!==ve.undefined){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ve.void,received:s.parsedType}),De}return rr(t.data)}}$c.create=e=>new $c({typeName:Ie.ZodVoid,...$e(e)});class Gr extends Xe{_parse(t){const{ctx:r,status:s}=this._processInputParams(t),o=this._def;if(r.parsedType!==ve.array)return ke(r,{code:he.invalid_type,expected:ve.array,received:r.parsedType}),De;if(o.exactLength!==null){const p=r.data.length>o.exactLength.value,v=r.data.lengtho.maxLength.value&&(ke(r,{code:he.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),s.dirty()),r.common.async)return Promise.all([...r.data].map((p,v)=>o.type._parseAsync(new li(r,p,r.path,v)))).then(p=>Gt.mergeArray(s,p));const c=[...r.data].map((p,v)=>o.type._parseSync(new li(r,p,r.path,v)));return Gt.mergeArray(s,c)}get element(){return this._def.type}min(t,r){return new Gr({...this._def,minLength:{value:t,message:_e.toString(r)}})}max(t,r){return new Gr({...this._def,maxLength:{value:t,message:_e.toString(r)}})}length(t,r){return new Gr({...this._def,exactLength:{value:t,message:_e.toString(r)}})}nonempty(t){return this.min(1,t)}}Gr.create=(e,t)=>new Gr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ie.ZodArray,...$e(t)});function gs(e){if(e instanceof ft){const t={};for(const r in e.shape){const s=e.shape[r];t[r]=Pi.create(gs(s))}return new ft({...e._def,shape:()=>t})}else return e instanceof Gr?new Gr({...e._def,type:gs(e.element)}):e instanceof Pi?Pi.create(gs(e.unwrap())):e instanceof is?is.create(gs(e.unwrap())):e instanceof ci?ci.create(e.items.map(t=>gs(t))):e}class ft extends Xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Je.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==ve.object){const A=this._getOrReturnCtx(t);return ke(A,{code:he.invalid_type,expected:ve.object,received:A.parsedType}),De}const{status:s,ctx:o}=this._processInputParams(t),{shape:c,keys:p}=this._getCached(),v=[];if(!(this._def.catchall instanceof Ii&&this._def.unknownKeys==="strip"))for(const A in o.data)p.includes(A)||v.push(A);const C=[];for(const A of p){const L=c[A],P=o.data[A];C.push({key:{status:"valid",value:A},value:L._parse(new li(o,P,o.path,A)),alwaysSet:A in o.data})}if(this._def.catchall instanceof Ii){const A=this._def.unknownKeys;if(A==="passthrough")for(const L of v)C.push({key:{status:"valid",value:L},value:{status:"valid",value:o.data[L]}});else if(A==="strict")v.length>0&&(ke(o,{code:he.unrecognized_keys,keys:v}),s.dirty());else if(A!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const A=this._def.catchall;for(const L of v){const P=o.data[L];C.push({key:{status:"valid",value:L},value:A._parse(new li(o,P,o.path,L)),alwaysSet:L in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const A=[];for(const L of C){const P=await L.key;A.push({key:P,value:await L.value,alwaysSet:L.alwaysSet})}return A}).then(A=>Gt.mergeObjectSync(s,A)):Gt.mergeObjectSync(s,C)}get shape(){return this._def.shape()}strict(t){return _e.errToObj,new ft({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,s)=>{var o,c,p,v;const C=(p=(c=(o=this._def).errorMap)===null||c===void 0?void 0:c.call(o,r,s).message)!==null&&p!==void 0?p:s.defaultError;return r.code==="unrecognized_keys"?{message:(v=_e.errToObj(t).message)!==null&&v!==void 0?v:C}:{message:C}}}:{}})}strip(){return new ft({...this._def,unknownKeys:"strip"})}passthrough(){return new ft({...this._def,unknownKeys:"passthrough"})}extend(t){return new ft({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ft({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ie.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new ft({...this._def,catchall:t})}pick(t){const r={};return Je.objectKeys(t).forEach(s=>{t[s]&&this.shape[s]&&(r[s]=this.shape[s])}),new ft({...this._def,shape:()=>r})}omit(t){const r={};return Je.objectKeys(this.shape).forEach(s=>{t[s]||(r[s]=this.shape[s])}),new ft({...this._def,shape:()=>r})}deepPartial(){return gs(this)}partial(t){const r={};return Je.objectKeys(this.shape).forEach(s=>{const o=this.shape[s];t&&!t[s]?r[s]=o:r[s]=o.optional()}),new ft({...this._def,shape:()=>r})}required(t){const r={};return Je.objectKeys(this.shape).forEach(s=>{if(t&&!t[s])r[s]=this.shape[s];else{let c=this.shape[s];for(;c instanceof Pi;)c=c._def.innerType;r[s]=c}}),new ft({...this._def,shape:()=>r})}keyof(){return t2(Je.objectKeys(this.shape))}}ft.create=(e,t)=>new ft({shape:()=>e,unknownKeys:"strip",catchall:Ii.create(),typeName:Ie.ZodObject,...$e(t)});ft.strictCreate=(e,t)=>new ft({shape:()=>e,unknownKeys:"strict",catchall:Ii.create(),typeName:Ie.ZodObject,...$e(t)});ft.lazycreate=(e,t)=>new ft({shape:e,unknownKeys:"strip",catchall:Ii.create(),typeName:Ie.ZodObject,...$e(t)});class So extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t),s=this._def.options;function o(c){for(const v of c)if(v.result.status==="valid")return v.result;for(const v of c)if(v.result.status==="dirty")return r.common.issues.push(...v.ctx.common.issues),v.result;const p=c.map(v=>new Ur(v.ctx.common.issues));return ke(r,{code:he.invalid_union,unionErrors:p}),De}if(r.common.async)return Promise.all(s.map(async c=>{const p={...r,common:{...r.common,issues:[]},parent:null};return{result:await c._parseAsync({data:r.data,path:r.path,parent:p}),ctx:p}})).then(o);{let c;const p=[];for(const C of s){const A={...r,common:{...r.common,issues:[]},parent:null},L=C._parseSync({data:r.data,path:r.path,parent:A});if(L.status==="valid")return L;L.status==="dirty"&&!c&&(c={result:L,ctx:A}),A.common.issues.length&&p.push(A.common.issues)}if(c)return r.common.issues.push(...c.ctx.common.issues),c.result;const v=p.map(C=>new Ur(C));return ke(r,{code:he.invalid_union,unionErrors:v}),De}}get options(){return this._def.options}}So.create=(e,t)=>new So({options:e,typeName:Ie.ZodUnion,...$e(t)});const Zl=e=>e instanceof No?Zl(e.schema):e instanceof qr?Zl(e.innerType()):e instanceof Eo?[e.value]:e instanceof Cn?e.options:e instanceof Lo?Object.keys(e.enum):e instanceof Po?Zl(e._def.innerType):e instanceof ko?[void 0]:e instanceof Co?[null]:null;class Dd extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.object)return ke(r,{code:he.invalid_type,expected:ve.object,received:r.parsedType}),De;const s=this.discriminator,o=r.data[s],c=this.optionsMap.get(o);return c?r.common.async?c._parseAsync({data:r.data,path:r.path,parent:r}):c._parseSync({data:r.data,path:r.path,parent:r}):(ke(r,{code:he.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),De)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,s){const o=new Map;for(const c of r){const p=Zl(c.shape[t]);if(!p)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const v of p){if(o.has(v))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(v)}`);o.set(v,c)}}return new Dd({typeName:Ie.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...$e(s)})}}function Nf(e,t){const r=Ji(e),s=Ji(t);if(e===t)return{valid:!0,data:e};if(r===ve.object&&s===ve.object){const o=Je.objectKeys(t),c=Je.objectKeys(e).filter(v=>o.indexOf(v)!==-1),p={...e,...t};for(const v of c){const C=Nf(e[v],t[v]);if(!C.valid)return{valid:!1};p[v]=C.data}return{valid:!0,data:p}}else if(r===ve.array&&s===ve.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let c=0;c{if(Af(c)||Af(p))return De;const v=Nf(c.value,p.value);return v.valid?((jf(c)||jf(p))&&r.dirty(),{status:r.value,value:v.data}):(ke(s,{code:he.invalid_intersection_types}),De)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([c,p])=>o(c,p)):o(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}Ao.create=(e,t,r)=>new Ao({left:e,right:t,typeName:Ie.ZodIntersection,...$e(r)});class ci extends Xe{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ve.array)return ke(s,{code:he.invalid_type,expected:ve.array,received:s.parsedType}),De;if(s.data.lengththis._def.items.length&&(ke(s,{code:he.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const c=[...s.data].map((p,v)=>{const C=this._def.items[v]||this._def.rest;return C?C._parse(new li(s,p,s.path,v)):null}).filter(p=>!!p);return s.common.async?Promise.all(c).then(p=>Gt.mergeArray(r,p)):Gt.mergeArray(r,c)}get items(){return this._def.items}rest(t){return new ci({...this._def,rest:t})}}ci.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ci({items:e,typeName:Ie.ZodTuple,rest:null,...$e(t)})};class jo extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ve.object)return ke(s,{code:he.invalid_type,expected:ve.object,received:s.parsedType}),De;const o=[],c=this._def.keyType,p=this._def.valueType;for(const v in s.data)o.push({key:c._parse(new li(s,v,s.path,v)),value:p._parse(new li(s,s.data[v],s.path,v))});return s.common.async?Gt.mergeObjectAsync(r,o):Gt.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,s){return r instanceof Xe?new jo({keyType:t,valueType:r,typeName:Ie.ZodRecord,...$e(s)}):new jo({keyType:Wr.create(),valueType:t,typeName:Ie.ZodRecord,...$e(r)})}}class Xc extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ve.map)return ke(s,{code:he.invalid_type,expected:ve.map,received:s.parsedType}),De;const o=this._def.keyType,c=this._def.valueType,p=[...s.data.entries()].map(([v,C],A)=>({key:o._parse(new li(s,v,s.path,[A,"key"])),value:c._parse(new li(s,C,s.path,[A,"value"]))}));if(s.common.async){const v=new Map;return Promise.resolve().then(async()=>{for(const C of p){const A=await C.key,L=await C.value;if(A.status==="aborted"||L.status==="aborted")return De;(A.status==="dirty"||L.status==="dirty")&&r.dirty(),v.set(A.value,L.value)}return{status:r.value,value:v}})}else{const v=new Map;for(const C of p){const A=C.key,L=C.value;if(A.status==="aborted"||L.status==="aborted")return De;(A.status==="dirty"||L.status==="dirty")&&r.dirty(),v.set(A.value,L.value)}return{status:r.value,value:v}}}}Xc.create=(e,t,r)=>new Xc({valueType:t,keyType:e,typeName:Ie.ZodMap,...$e(r)});class rs extends Xe{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ve.set)return ke(s,{code:he.invalid_type,expected:ve.set,received:s.parsedType}),De;const o=this._def;o.minSize!==null&&s.data.sizeo.maxSize.value&&(ke(s,{code:he.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const c=this._def.valueType;function p(C){const A=new Set;for(const L of C){if(L.status==="aborted")return De;L.status==="dirty"&&r.dirty(),A.add(L.value)}return{status:r.value,value:A}}const v=[...s.data.values()].map((C,A)=>c._parse(new li(s,C,s.path,A)));return s.common.async?Promise.all(v).then(C=>p(C)):p(v)}min(t,r){return new rs({...this._def,minSize:{value:t,message:_e.toString(r)}})}max(t,r){return new rs({...this._def,maxSize:{value:t,message:_e.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}rs.create=(e,t)=>new rs({valueType:e,minSize:null,maxSize:null,typeName:Ie.ZodSet,...$e(t)});class Fs extends Xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.function)return ke(r,{code:he.invalid_type,expected:ve.function,received:r.parsedType}),De;function s(v,C){return Bc({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Hc(),yo].filter(A=>!!A),issueData:{code:he.invalid_arguments,argumentsError:C}})}function o(v,C){return Bc({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Hc(),yo].filter(A=>!!A),issueData:{code:he.invalid_return_type,returnTypeError:C}})}const c={errorMap:r.common.contextualErrorMap},p=r.data;if(this._def.returns instanceof Js){const v=this;return rr(async function(...C){const A=new Ur([]),L=await v._def.args.parseAsync(C,c).catch(M=>{throw A.addIssue(s(C,M)),A}),P=await Reflect.apply(p,this,L);return await v._def.returns._def.type.parseAsync(P,c).catch(M=>{throw A.addIssue(o(P,M)),A})})}else{const v=this;return rr(function(...C){const A=v._def.args.safeParse(C,c);if(!A.success)throw new Ur([s(C,A.error)]);const L=Reflect.apply(p,this,A.data),P=v._def.returns.safeParse(L,c);if(!P.success)throw new Ur([o(L,P.error)]);return P.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Fs({...this._def,args:ci.create(t).rest(Gn.create())})}returns(t){return new Fs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,s){return new Fs({args:t||ci.create([]).rest(Gn.create()),returns:r||Gn.create(),typeName:Ie.ZodFunction,...$e(s)})}}class No extends Xe{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}No.create=(e,t)=>new No({getter:e,typeName:Ie.ZodLazy,...$e(t)});class Eo extends Xe{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ke(r,{received:r.data,code:he.invalid_literal,expected:this._def.value}),De}return{status:"valid",value:t.data}}get value(){return this._def.value}}Eo.create=(e,t)=>new Eo({value:e,typeName:Ie.ZodLiteral,...$e(t)});function t2(e,t){return new Cn({values:e,typeName:Ie.ZodEnum,...$e(t)})}class Cn extends Xe{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),s=this._def.values;return ke(r,{expected:Je.joinValues(s),received:r.parsedType,code:he.invalid_type}),De}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),s=this._def.values;return ke(r,{received:r.data,code:he.invalid_enum_value,options:s}),De}return rr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t){return Cn.create(t)}exclude(t){return Cn.create(this.options.filter(r=>!t.includes(r)))}}Cn.create=t2;class Lo extends Xe{_parse(t){const r=Je.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==ve.string&&s.parsedType!==ve.number){const o=Je.objectValues(r);return ke(s,{expected:Je.joinValues(o),received:s.parsedType,code:he.invalid_type}),De}if(r.indexOf(t.data)===-1){const o=Je.objectValues(r);return ke(s,{received:s.data,code:he.invalid_enum_value,options:o}),De}return rr(t.data)}get enum(){return this._def.values}}Lo.create=(e,t)=>new Lo({values:e,typeName:Ie.ZodNativeEnum,...$e(t)});class Js extends Xe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.promise&&r.common.async===!1)return ke(r,{code:he.invalid_type,expected:ve.promise,received:r.parsedType}),De;const s=r.parsedType===ve.promise?r.data:Promise.resolve(r.data);return rr(s.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Js.create=(e,t)=>new Js({type:e,typeName:Ie.ZodPromise,...$e(t)});class qr extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ie.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:s}=this._processInputParams(t),o=this._def.effect||null,c={addIssue:p=>{ke(s,p),p.fatal?r.abort():r.dirty()},get path(){return s.path}};if(c.addIssue=c.addIssue.bind(c),o.type==="preprocess"){const p=o.transform(s.data,c);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(p).then(v=>this._def.schema._parseAsync({data:v,path:s.path,parent:s})):this._def.schema._parseSync({data:p,path:s.path,parent:s})}if(o.type==="refinement"){const p=v=>{const C=o.refinement(v,c);if(s.common.async)return Promise.resolve(C);if(C instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return v};if(s.common.async===!1){const v=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return v.status==="aborted"?De:(v.status==="dirty"&&r.dirty(),p(v.value),{status:r.value,value:v.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(v=>v.status==="aborted"?De:(v.status==="dirty"&&r.dirty(),p(v.value).then(()=>({status:r.value,value:v.value}))))}if(o.type==="transform")if(s.common.async===!1){const p=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!bo(p))return p;const v=o.transform(p.value,c);if(v instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:v}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(p=>bo(p)?Promise.resolve(o.transform(p.value,c)).then(v=>({status:r.value,value:v})):p);Je.assertNever(o)}}qr.create=(e,t,r)=>new qr({schema:e,typeName:Ie.ZodEffects,effect:t,...$e(r)});qr.createWithPreprocess=(e,t,r)=>new qr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ie.ZodEffects,...$e(r)});class Pi extends Xe{_parse(t){return this._getType(t)===ve.undefined?rr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Pi.create=(e,t)=>new Pi({innerType:e,typeName:Ie.ZodOptional,...$e(t)});class is extends Xe{_parse(t){return this._getType(t)===ve.null?rr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}is.create=(e,t)=>new is({innerType:e,typeName:Ie.ZodNullable,...$e(t)});class Po extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t);let s=r.data;return r.parsedType===ve.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Po.create=(e,t)=>new Po({innerType:e,typeName:Ie.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class Yc extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t),s={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Vc(o)?o.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Ur(s.common.issues)},input:s.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ur(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Yc.create=(e,t)=>new Yc({innerType:e,typeName:Ie.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class Uc extends Xe{_parse(t){if(this._getType(t)!==ve.nan){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ve.nan,received:s.parsedType}),De}return{status:"valid",value:t.data}}}Uc.create=e=>new Uc({typeName:Ie.ZodNaN,...$e(e)});const TS=Symbol("zod_brand");class r2 extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t),s=r.data;return this._def.type._parse({data:s,path:r.path,parent:r})}unwrap(){return this._def.type}}class Xo extends Xe{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return c.status==="aborted"?De:c.status==="dirty"?(r.dirty(),e2(c.value)):this._def.out._parseAsync({data:c.value,path:s.path,parent:s})})();{const o=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?De:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:s.path,parent:s})}}static create(t,r){return new Xo({in:t,out:r,typeName:Ie.ZodPipeline})}}class Gc extends Xe{_parse(t){const r=this._def.innerType._parse(t);return bo(r)&&(r.value=Object.freeze(r.value)),r}}Gc.create=(e,t)=>new Gc({innerType:e,typeName:Ie.ZodReadonly,...$e(t)});const i2=(e,t={},r)=>e?Ks.create().superRefine((s,o)=>{var c,p;if(!e(s)){const v=typeof t=="function"?t(s):typeof t=="string"?{message:t}:t,C=(p=(c=v.fatal)!==null&&c!==void 0?c:r)!==null&&p!==void 0?p:!0,A=typeof v=="string"?{message:v}:v;o.addIssue({code:"custom",...A,fatal:C})}}):Ks.create(),RS={object:ft.lazycreate};var Ie;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ie||(Ie={}));const _S=(e,t={message:`Input not instance of ${e.name}`})=>i2(r=>r instanceof e,t),n2=Wr.create,s2=wn.create,MS=Uc.create,OS=kn.create,a2=wo.create,IS=ts.create,zS=Wc.create,FS=ko.create,DS=Co.create,HS=Ks.create,BS=Gn.create,VS=Ii.create,WS=$c.create,$S=Gr.create,XS=ft.create,YS=ft.strictCreate,US=So.create,GS=Dd.create,ZS=Ao.create,qS=ci.create,QS=jo.create,KS=Xc.create,JS=rs.create,eA=Fs.create,tA=No.create,rA=Eo.create,iA=Cn.create,nA=Lo.create,sA=Js.create,s0=qr.create,aA=Pi.create,oA=is.create,lA=qr.createWithPreprocess,cA=Xo.create,dA=()=>n2().optional(),uA=()=>s2().optional(),hA=()=>a2().optional(),fA={string:e=>Wr.create({...e,coerce:!0}),number:e=>wn.create({...e,coerce:!0}),boolean:e=>wo.create({...e,coerce:!0}),bigint:e=>kn.create({...e,coerce:!0}),date:e=>ts.create({...e,coerce:!0})},pA=De;var gA=Object.freeze({__proto__:null,defaultErrorMap:yo,setErrorMap:vS,getErrorMap:Hc,makeIssue:Bc,EMPTY_PATH:yS,addIssueToContext:ke,ParseStatus:Gt,INVALID:De,DIRTY:e2,OK:rr,isAborted:Af,isDirty:jf,isValid:bo,isAsync:Vc,get util(){return Je},get objectUtil(){return Sf},ZodParsedType:ve,getParsedType:Ji,ZodType:Xe,ZodString:Wr,ZodNumber:wn,ZodBigInt:kn,ZodBoolean:wo,ZodDate:ts,ZodSymbol:Wc,ZodUndefined:ko,ZodNull:Co,ZodAny:Ks,ZodUnknown:Gn,ZodNever:Ii,ZodVoid:$c,ZodArray:Gr,ZodObject:ft,ZodUnion:So,ZodDiscriminatedUnion:Dd,ZodIntersection:Ao,ZodTuple:ci,ZodRecord:jo,ZodMap:Xc,ZodSet:rs,ZodFunction:Fs,ZodLazy:No,ZodLiteral:Eo,ZodEnum:Cn,ZodNativeEnum:Lo,ZodPromise:Js,ZodEffects:qr,ZodTransformer:qr,ZodOptional:Pi,ZodNullable:is,ZodDefault:Po,ZodCatch:Yc,ZodNaN:Uc,BRAND:TS,ZodBranded:r2,ZodPipeline:Xo,ZodReadonly:Gc,custom:i2,Schema:Xe,ZodSchema:Xe,late:RS,get ZodFirstPartyTypeKind(){return Ie},coerce:fA,any:HS,array:$S,bigint:OS,boolean:a2,date:IS,discriminatedUnion:GS,effect:s0,enum:iA,function:eA,instanceof:_S,intersection:ZS,lazy:tA,literal:rA,map:KS,nan:MS,nativeEnum:nA,never:VS,null:DS,nullable:oA,number:s2,object:XS,oboolean:hA,onumber:uA,optional:aA,ostring:dA,pipeline:cA,preprocess:lA,promise:sA,record:QS,set:JS,strictObject:YS,string:n2,symbol:zS,transformer:s0,tuple:qS,undefined:FS,union:US,unknown:BS,void:WS,NEVER:pA,ZodIssueCode:he,quotelessJson:xS,ZodError:Ur}),x1=(e=>(e.HOBBY="hobby-tier",e.PRO="pro-tier",e.ENTERPRISE="enterprise-tier",e))(x1||{});const mA="https://docs.opensaas.sh",xA="https://docs.opensaas.sh/blog",vA="https://billing.stripe.com/p/login/test_aEU17i3Iz0XT5mUfYY",o2="https://billing.stripe.com/p/login/14kaGs1cL3FX1PidQQ",l2=o2;yA({customerPortalTestUrl:vA,customerPortalProdUrl:o2});function yA(e){const t=gA.string().url(),r=t.safeParse(e.customerPortalTestUrl),s=t.safeParse(e.customerPortalProdUrl);let o={color:"\x1B[33m%s\x1B[0m",msg:""};r.success&&s.success?(o.color="\x1B[32m%s\x1B[0m",o.msg="✅ Both STRIPE_CUSTOMER_PORTAL_LINK links defined"):!r.success&&!s.success?o.msg="⛔️ STRIPE_CUSTOMER_PORTAL_LINK is not defined":r.success?o.msg="⛔️ STRIPE_CUSTOMER_PORTAL_LINK is not defined for prod env":o.msg="⛔️ STRIPE_CUSTOMER_PORTAL_LINK is not defined for test env",console.log(o.color,o.msg)}function Zc(){const e=Mr(),[t,r]=G.useState(!1),{data:s}=Qr();async function o(c){if(!s)e.push("/login");else try{r(!0);let p=await Eb(c);p!=null&&p.sessionUrl&&window.open(p.sessionUrl,"_self")}catch(p){console.error((p==null?void 0:p.message)??"Something went wrong.")}finally{r(!1)}}return f.jsx("a",{onClick:c=>{c.preventDefault(),o(x1.PRO)},href:"/chat",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream ring-1 ring-inset ring-gray-200 hover:bg-captn-cta-green-hover shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:text-captn-light-cream bg-captn-cta-green",children:t?"Loading...":"Free Trial"})}const a0=[{name:"Home",href:"/"},{name:"Chat",href:"/chat"}],bA=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:p1,alt:"Capt’n.ai"});function wA(){const[e,t]=G.useState(!1),{data:r,isLoading:s}=Qr();return f.jsxs("header",{className:"absolute inset-x-0 top-0 z-50 shadow sticky bg-captn-light-cream bg-opacity-50 backdrop-blur-lg backdrop-filter dark:border-strokedark dark:bg-boxdark-2",children:[f.jsxs("nav",{className:"flex items-center justify-between p-6 lg:px-8","aria-label":"Global",children:[f.jsxs("div",{className:"flex lg:flex-1",children:[f.jsx("a",{href:"/",className:"-m-1.5 p-1.5",children:f.jsx("img",{className:"h-10 w-auto -ml-2",style:{width:"178px"},src:p1,alt:"Capt’n.ai"})}),f.jsx("span",{className:"mt-2 text-sm font-semibold leading-6 dark:text-captn-light-cream",children:f.jsx("sup",{className:"text-base text-captn-dark-blue",children:"βeta"})})]}),f.jsx("div",{className:"flex lg:hidden",children:f.jsxs("button",{type:"button",className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 dark:text-captn-light-cream",onClick:()=>t(!0),children:[f.jsx("span",{className:"sr-only",children:"Open main menu"}),f.jsx(Kb,{className:"h-6 w-6","aria-hidden":"true"})]})}),f.jsx("div",{className:"hidden lg:flex lg:gap-x-12",children:a0.map(o=>f.jsx("a",{href:o.href,className:"no-underline text-sm leading-6 text-captn-dark-blue duration-300 ease-in-out hover:text-captn-light-blue dark:text-captn-light-cream",children:o.name},o.name))}),f.jsxs("div",{className:"hidden lg:flex lg:flex-1 gap-3 justify-end items-center",children:[f.jsx("ul",{className:"flex justify-center items-center gap-2 sm:gap-4",children:!(r!=null&&r.hasPaid)&&f.jsx(Zc,{})}),s?null:r?f.jsx("div",{className:"ml-4",children:f.jsx(m1,{user:r})}):f.jsx("a",{href:r?"/account":"/login",className:"text-sm font-semibold leading-6 ml-4",children:f.jsxs("div",{className:"flex items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",children:["Log in ",f.jsx(Dc,{size:"1.1rem",className:"ml-1 mt-[0.1rem]"})]})})]})]}),f.jsxs(Fc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Fc.Panel,{className:"fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white dark:text-captn-light-cream dark:bg-boxdark px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("a",{href:"/",className:"-m-1.5 p-1.5",children:[f.jsx("span",{className:"sr-only",children:"Your SaaS"}),f.jsx(bA,{})]}),f.jsxs("button",{type:"button",className:"-m-2.5 rounded-md p-2.5 text-gray-700 dark:text-gray-50",onClick:()=>t(!1),children:[f.jsx("span",{className:"sr-only",children:"Close menu"}),f.jsx(Qb,{className:"h-6 w-6","aria-hidden":"true"})]})]}),f.jsx("div",{className:"mt-6 flow-root",children:f.jsxs("div",{className:"-my-6 divide-y divide-gray-500/10",children:[f.jsx("div",{className:"space-y-2 py-6",children:a0.map(o=>f.jsx("a",{href:o.href,onClick:()=>t(!1),className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-captn-dark-blue hover:bg-gray-50 dark:text-captn-light-cream hover:dark:bg-boxdark-2",children:o.name},o.name))}),f.jsx("div",{className:"py-6",children:s?null:r?f.jsx(g1,{user:r,setMobileMenuOpen:t}):f.jsx(vo,{to:"/login",children:f.jsxs("div",{className:"flex justify-end items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",children:["Log in ",f.jsx(Dc,{size:"1.1rem",className:"ml-1"})]})})})]})})]})]})]})}function kA({children:e}){const t=na(),{data:r}=Qr(),s=G.useMemo(()=>t.pathname!=="/"&&t.pathname!=="/login"&&t.pathname!=="/signup",[t]),o=G.useMemo(()=>t.pathname.startsWith("/admin"),[t]),c=G.useMemo(()=>t.pathname.startsWith("/chat"),[t]);return G.useEffect(()=>{if(r){const p=new Date(r.lastActiveTimestamp),v=new Date;v.getTime()-p.getTime()>5*60*1e3&&Lb({lastActiveTimestamp:v})}},[r]),G.useEffect(()=>{if(t.hash){const p=t.hash.replace("#",""),v=document.getElementById(p);v&&v.scrollIntoView()}},[t]),f.jsx(f.Fragment,{children:f.jsx("div",{className:"min-h-screen dark:text-captn-light-cream dark:bg-boxdark-2 bg-captn-light-cream text-captn-dark-blue",children:o||c?f.jsx(f.Fragment,{children:e}):f.jsxs(f.Fragment,{children:[s&&f.jsx(wA,{}),f.jsx("div",{className:"mx-auto max-w-7xl sm:px-6 lg:px-8",children:e})]})})})}const wr=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Qr();return o?r?f.jsx(e,{...t,user:r}):f.jsx(Yp,{to:"/login"}):c?f.jsx("span",{children:"Loading..."}):s?f.jsx("span",{children:"An error ocurred. Please refresh the page."}):f.jsx("span",{children:"An unknown error ocurred. Please refresh the page."})},CA="/assets/agent-chat-BGsqR59C.png",o0=[{name:"Home",href:"/"},{name:"Chat",href:"/chat"}],SA=[{name:"Intelligent Strategy Customization",description:"Capt’n, your AI marketing agent, learns your business goals to craft campaigns that speak directly to your audience.",icon:"🤖",href:""},{name:"360° Campaign Management",description:"From keyword selection to budget optimization, our specialized AI agents handle it all, ensuring your campaigns are always on the forefront of efficiency.",icon:"👍",href:""},{name:"Data Privacy First",description:"Your data stays yours. With on-the-fly processing and optional chat history storage, we guarantee the utmost privacy and security for your business information.",icon:"🔐",href:""},{name:"Seamless Integration",description:"Capt’n.ai ensures smooth integration with your existing workflows, starting with Google Ads and rapidly expanding to accommodate more platforms.",icon:"🤝",href:""}],AA=[{id:1,question:"What is Capt’n.ai?",answer:"Capt’n.ai is a digital marketing platform that functions like a full-service agency, accessible directly from your device. It features Capt’n, an AI-powered agent who interacts with you to grasp the specifics of your business and advertising goals. Based on this understanding, Capt’n orchestrates a team of specialized AI agents responsible for various tasks, including the development of new marketing campaigns, optimization of ad content, selection of keywords, adjustment of budgets, and continuous monitoring of campaign performance. You receive daily updates and recommendations for enhancing your campaigns directly in your inbox, ensuring your advertising efforts are as effective as possible.",href:""},{id:2,question:"What platforms does Capt’n.ai work with?",answer:"Capt’n.ai, in its beta version, initially supports only Google Ads. However, the platform is set to expand its capabilities regularly, adding new features and compatibility with additional advertising networks at a frequent pace, even every few days.",href:""},{id:3,question:"How much does Capt’n.ai cost?",answer:"During its beta phase, Capt’n.ai is offered free for an entire month, allowing you to explore its features without any cost. This period is intended for gathering your feedback, so all associated costs are covered by us during this time. While creating an account requires a subscription to facilitate connection with your Google Ads account, providing credit card details is not necessary. The basic monthly subscription fee is currently set at $29, however, we are still evaluating the pricing model to determine if adjustments are needed, either to increase or even possibly decrease the fee. In any case, you will enjoy a 30-day free trial, after which we will have refined our pricing strategy and will inform you before the trial ends. This gives you the opportunity to assess the value of Capt’n.ai and decide if you wish to continue using the service.",href:""},{id:4,question:"Is my data secure?",answer:"We process data on the fly and do not store any data in databases, except for chat history (if you chat directly on our website) to enhance your user experience. You can delete this chat history at any time. This ensures your data stays where it belongs—with you. When you use the chat directly on our website, your data is shared only with our privately deployed OpenAI models hosted on Microsoft Azure or our in-house AI algorithms, meaning that we don’t share your data with OpenAI directly. You can find more information in our Privacy Policy section.",href:""},{id:5,question:"I run an agency, is Capt’n.ai for me as well?",answer:"Not quite yet, but it will be! Stay tuned for our updates.",href:""},{id:6,question:"I have more questions, and even some suggestions, How can I get in contact with you?",answer:"Yes, please, do let us know if you have any questions, comments, feedback, suggestions… just ping us at support@captain.ai.",href:""}],jA={app:[{name:"Documentation",href:mA},{name:"Blog",href:xA}],company:[{name:"About",href:"https://airt.ai/"},{name:"Privacy",href:"https://captn.ai/privacy"},{name:"Terms of Service",href:"https://captn.ai/toc"}]};function NA(){const[e,t]=G.useState(!1),{data:r,isLoading:s}=Qr(),o=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:p1,alt:"Capt’n.ai"});return Mr(),f.jsxs("div",{className:"",children:[f.jsxs("header",{className:"absolute inset-x-0 top-0 z-50 dark:bg-boxdark-2",children:[f.jsxs("nav",{className:"flex items-center justify-between p-6 lg:px-8","aria-label":"Global",children:[f.jsx("div",{className:"flex items-center lg:flex-1",children:f.jsxs("a",{href:"/",className:"no-underline flex items-center -m-1.5 p-1.5 text-captn-dark-blue duration-300 ease-in-out hover:text-captn-light-blue",children:[f.jsx(o,{}),f.jsx("span",{className:"ml-2 text-sm font-semibold leading-6 dark:text-captn-light-cream",children:f.jsx("sup",{className:"text-base text-captn-dark-blue",children:"βeta"})})]})}),f.jsx("div",{className:"flex lg:hidden",children:f.jsxs("button",{type:"button",className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 dark:text-captn-light-cream",onClick:()=>t(!0),children:[f.jsx("span",{className:"sr-only",children:"Open main menu"}),f.jsx(Kb,{className:"h-6 w-6","aria-hidden":"true"})]})}),f.jsx("div",{className:"hidden lg:flex lg:gap-x-12",children:o0.map(c=>f.jsx("a",{href:c.href,className:"no-underline text-sm leading-6 text-captn-dark-blue duration-300 ease-in-out hover:text-captn-light-blue dark:text-captn-light-cream",children:c.name},c.name))}),f.jsx("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end lg:align-end",children:f.jsxs("div",{className:"flex items-center gap-3 2xsm:gap-7",children:[!(r!=null&&r.hasPaid)&&f.jsx("div",{className:"flex items-center justify-center",children:f.jsx(Zc,{})}),s?null:r?f.jsx(m1,{user:r}):f.jsx(vo,{to:"/login",children:f.jsxs("div",{className:"flex justify-end items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",children:["Log in ",f.jsx(Dc,{size:"1.1rem",className:"ml-1"})]})})]})})]}),f.jsxs(Fc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Fc.Panel,{className:"fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10 dark:bg-boxdark dark:text-captn-light-cream",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("a",{href:"/",className:"-m-1.5 p-1.5",children:[f.jsx("span",{className:"sr-only",children:"Capt’n.ai"}),f.jsx(o,{})]}),f.jsxs("button",{type:"button",className:"-m-2.5 rounded-md p-2.5 text-gray-700 dark:text-gray-50",onClick:()=>t(!1),children:[f.jsx("span",{className:"sr-only",children:"Close menu"}),f.jsx(Qb,{className:"h-6 w-6","aria-hidden":"true"})]})]}),f.jsx("div",{className:"mt-6 flow-root",children:f.jsxs("div",{className:"-my-6 divide-y divide-gray-500/10",children:[f.jsx("div",{className:"space-y-2 py-6",children:o0.map(c=>f.jsx("a",{href:c.href,onClick:()=>t(!1),className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-captn-dark-blue hover:bg-gray-50 dark:text-captn-light-cream dark:hover:bg-boxdark-2",children:c.name},c.name))}),f.jsx("div",{className:"py-6",children:s?null:r?f.jsx(g1,{user:r}):f.jsx(vo,{to:"/login",children:f.jsxs("div",{className:"flex justify-end items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",children:["Log in ",f.jsx(Dc,{size:"1.1rem",className:"ml-1"})]})})})]})})]})]})]}),f.jsxs("main",{className:"isolate dark:bg-boxdark-2",children:[f.jsxs("div",{className:"relative pt-14 w-full ",children:[f.jsx("div",{className:"absolute inset-x-0 top-[calc(100%-40rem)] sm:top-[calc(100%-65rem)] -z-10 transform-gpu overflow-hidden blur-3xl","aria-hidden":"true"}),f.jsx("div",{className:"py-24 sm:py-32",children:f.jsxs("div",{className:"mx-auto max-w-8xl px-6 lg:px-8",children:[f.jsxs("div",{className:"lg:mb-18 mx-auto max-w-4xl text-center",children:[f.jsxs("h1",{className:"text-4xl font-bold text-captn-dark-blue sm:text-6xl dark:text-captn-light-cream",children:["Meet Capt’n.ai: Your"," ",f.jsx("span",{className:"italic",children:"AI-Powered"})," Digital Marketing Crew"]}),f.jsx("p",{className:"mt-6 mx-auto max-w-2xl text-lg leading-8 text-captn-dark-blue dark:text-captn-light-cream",children:"Unleash the full potential of your advertising efforts with personalized, AI-driven strategies that evolve with your business. 30 days free trial, no credit card required!"}),f.jsx("div",{className:"mt-10 flex items-center justify-center gap-x-6",children:r!=null&&r.hasPaid?f.jsxs("a",{href:"/chat",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream ring-1 ring-inset ring-gray-200 hover:ring-2 hover:ring-captn-light-blue shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:text-captn-light-cream bg-captn-cta-green",children:["Go to chat ",f.jsx("span",{"aria-hidden":"true",children:"→"})]}):f.jsx(Zc,{})})]}),f.jsx("div",{className:"mt-14 flow-root sm:mt-14 ",children:f.jsx("div",{className:"-m-2 rounded-xl lg:-m-4 lg:rounded-2xl lg:p-4",children:f.jsx("img",{src:CA,alt:"App screenshot",width:2432,height:1442,className:"rounded-md shadow-2xl ring-1 ring-gray-900/10"})})})]})})]}),f.jsxs("div",{id:"features",className:"mx-auto mt-5 max-w-7xl px-6 lg:px-8",children:[f.jsx("div",{className:"mx-auto max-w-2xl text-center",children:f.jsx("p",{className:"mt-2 text-4xl font-bold tracking-tight text-captn-dark-blue sm:text-5xl dark:text-captn-light-cream",children:f.jsx("span",{className:"text-captn-dark-blue",children:"Features"})})}),f.jsx("div",{className:"mx-auto mt-16 max-w-2xl sm:mt-20 lg:mt-24 lg:max-w-4xl",children:f.jsx("dl",{className:"grid max-w-xl grid-cols-1 gap-x-8 gap-y-10 lg:max-w-none lg:grid-cols-2 lg:gap-y-16",children:SA.map(c=>f.jsxs("div",{className:"relative pl-16",children:[f.jsxs("dt",{className:"text-base font-semibold leading-7 text-captn-dark-blue dark:text-captn-light-cream",children:[f.jsx("div",{className:"absolute left-0 top-0 flex h-10 w-10 items-center justify-center border border-captn-dark-blue bg-captn-dark-blue-100/50 dark:bg-boxdark rounded-lg",children:f.jsx("div",{className:"text-2xl",children:c.icon})}),c.name]}),f.jsx("dd",{className:"mt-2 text-base leading-7 text-captn-dark-blue dark:text-captn-light-cream",children:c.description})]},c.name))})})]}),f.jsxs("div",{className:"mt-5 mx-auto max-w-2xl divide-y divide-gray-900/10 dark:divide-gray-200/10 px-6 pb-8 sm:pb-24 sm:pt-12 lg:max-w-7xl lg:px-8 lg:py-32",children:[f.jsx("h2",{className:"text-2xl font-bold leading-10 tracking-tight text-captn-dark-blue dark:text-captn-light-cream",children:"Frequently asked questions"}),f.jsx("dl",{className:"mt-10 space-y-8 divide-y divide-gray-900/10",children:AA.map(c=>f.jsxs("div",{className:"pt-8 lg:grid lg:grid-cols-12 lg:gap-8",children:[f.jsx("dt",{className:"text-base font-semibold leading-7 text-captn-dark-blue lg:col-span-5 dark:text-captn-light-cream",children:c.question}),f.jsxs("dd",{className:"flex items-center justify-start gap-2 mt-4 lg:col-span-7 lg:mt-0",children:[f.jsx("p",{className:"lg:pl-5 pr-5 text-base leading-7 text-captn-dark-blue dark:text-captn-light-cream",children:c.answer}),c.href&&f.jsx("a",{href:c.href,className:"text-base leading-7 text-yellow-500 hover:text-yellow-600",children:"Learn more →"})]})]},c.id))})]})]}),f.jsx("div",{className:"mx-auto mt-6 max-w-7xl px-6 lg:px-8 dark:bg-boxdark-2",children:f.jsxs("footer",{"aria-labelledby":"footer-heading",className:"relative border-t border-gray-900/10 dark:border-gray-200/10 py-5 sm:mt-5",children:[f.jsx("h2",{id:"footer-heading",className:"sr-only",children:"Footer"}),f.jsx("div",{className:"flex items-start justify-end mt-10 gap-20",children:f.jsxs("div",{children:[f.jsx("h3",{className:"text-sm font-semibold leading-6 text-captn-dark-blue dark:text-captn-light-cream",children:"Company"}),f.jsx("ul",{role:"list",className:"mt-6 space-y-4",children:jA.company.map(c=>f.jsx("li",{children:f.jsx("a",{href:c.href,className:"text-sm leading-6 text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",target:`${c.name==="About"?"_blank":"_self"}`,children:c.name})},c.name))})]})})]})})]})}function c2({children:e}){return f.jsx("div",{className:"custom-auth-wrapper flex min-h-full flex-col justify-center pt-10 sm:px-6 lg:px-8",children:f.jsx("div",{className:"sm:mx-auto sm:w-full sm:max-w-md",children:f.jsx("div",{className:"bg-captn-dark-blue py-8 px-4 shadow-xl ring-1 ring-gray-900/10 sm:rounded-lg sm:px-10 dark:bg-white text-captn-light-cream",children:f.jsx("div",{className:"-mt-8",children:e})})})})}const{styled:br,css:JL}=Qp({theme:{colors:{waspYellow:"#ffcc00",gray700:"#a1a5ab",gray600:"#d1d5db",gray500:"gainsboro",gray400:"#f0f0f0",red:"#FED7D7",darkRed:"#fa3838",green:"#C6F6D5",brand:"$waspYellow",brandAccent:"#ffdb46",errorBackground:"$red",errorText:"#2D3748",successBackground:"$green",successText:"#2D3748",submitButtonText:"black",formErrorText:"$darkRed"},fontSizes:{sm:"0.875rem"}}});function EA(e){return e==null?void 0:e.replace(/\/$/,"")}const LA=EA("https://backend.captn.ai")||"http://localhost:3001",PA={apiUrl:LA},TA=br("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),RA=br(TA,{background:"#eae4d9",color:"#003851"});br("div",{position:"relative",marginTop:"1.5rem"});br("div",{position:"absolute",inset:"0px",display:"flex",alignItems:"center"});br("div",{width:"100%",borderTopWidth:"1px",borderColor:"$gray500"});br("div",{position:"relative",display:"flex",justifyContent:"center",fontSize:"$sm"});br("span",{backgroundColor:"white",paddingLeft:"0.5rem",paddingRight:"0.5rem"});const _A=br("div",{marginTop:"1.5rem",marginBottom:"1.5rem"});br("div",{fontWeight:"500",fontSize:"$sm"});const MA=br("div",{marginTop:"0.5rem",display:"flex",variants:{direction:{horizontal:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(48px, 1fr))"},vertical:{flexDirection:"column",margin:"8px 0"}},gap:{small:{gap:"4px"},medium:{gap:"8px"},large:{gap:"16px"}}}}),OA=`${PA.apiUrl}/auth/google/login`,IA=({state:e,socialButtonsDirection:t="horizontal",additionalSignupFields:r,errorMessage:s})=>{const{isLoading:o,setErrorMessage:c,setSuccessMessage:p,setIsLoading:v}=G.useContext(d2);Mr();const[C,A]=G.useState(!1),[L,P]=G.useState(!1);Oy(),G.useEffect(()=>{C&&L&&c(null)},[C,L]);const B=D=>{A(D.target.checked)},M=D=>{P(D.target.checked)},H=(D,Z)=>{D.preventDefault(),C&&L?window.location.href=Z:c({title:"To proceed, please ensure you have accepted the Terms & Conditions, Privacy Policy, and opted to receive marketing emails.",description:""})};return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mt-3",children:[f.jsx("input",{type:"checkbox",id:"toc",checked:C,onChange:B}),f.jsxs("label",{className:"text-sm ml-2",htmlFor:"toc",children:["I agree to the"," ",f.jsx(rt,{to:"/toc",className:"no-underline hover:underline",target:"_blank",children:"Terms & Conditions"})," ","and"," ",f.jsx(rt,{to:"/privacy",className:"no-underline hover:underline",target:"_blank",children:"Privacy Policy"})]})]}),f.jsxs("div",{children:[f.jsx("input",{type:"checkbox",id:"marketingEmails",checked:L,onChange:M}),f.jsx("label",{className:"text-sm ml-2",htmlFor:"marketingEmails",children:"I agree to receiving marketing emails"})]}),s&&f.jsx("div",{className:"text-sm",children:f.jsxs(RA,{style:{border:"1px solid #c22828"},children:[s.title,s.description&&": ",s.description]})}),f.jsx(_A,{children:f.jsx(MA,{gap:"large",direction:t,children:f.jsxs("button",{className:"gsi-material-button",onClick:D=>H(D,OA),children:[f.jsx("div",{className:"gsi-material-button-state"}),f.jsxs("div",{className:"gsi-material-button-content-wrapper",children:[f.jsx("div",{className:"gsi-material-button-icon",children:f.jsxs("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",xmlnsXlink:"http://www.w3.org/1999/xlink",style:{display:"block"},children:[f.jsx("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),f.jsx("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),f.jsx("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),f.jsx("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"}),f.jsx("path",{fill:"none",d:"M0 0h48v48H0z"})]})}),f.jsx("span",{className:"gsi-material-button-contents",children:"Sign in with Google"}),f.jsx("span",{style:{display:"none"},children:"Sign in with Google"})]})]})})})]})},zA=br("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),FA=br(zA,{background:"$successBackground",color:"$successText"}),DA={height:"6rem"};br("div",{display:"flex",flexDirection:"column"});const d2=G.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}});function HA({state:e,appearance:t,logo:r,socialLayout:s="horizontal",additionalSignupFields:o}){const[c,p]=G.useState(null),[v,C]=G.useState(null),[A,L]=G.useState(!1),P=jy(t??{}),M={login:"Log in to your account",signup:"Create a new account"}[e],H=s==="vertical"?"vertical":"horizontal";return f.jsxs("div",{className:P,children:[f.jsxs("div",{children:[r&&f.jsx("img",{className:"mt-10 mx-auto",style:DA,src:r,alt:"Capt’n.ai"}),f.jsx("p",{className:"mt-7 text-2xl",children:M})]}),v&&f.jsx(FA,{children:v}),f.jsx(d2.Provider,{value:{isLoading:A,setIsLoading:L,setErrorMessage:p,setSuccessMessage:C},children:(e==="login"||e==="signup")&&f.jsx(IA,{state:e,socialButtonsDirection:H,additionalSignupFields:o,errorMessage:c})})]})}const BA="/assets/captn-logo-large-Soxu_L3b.png";function VA(){const e=Mr(),{data:t}=Qr();return G.useEffect(()=>{t&&e.push("/")},[t,e]),f.jsx(c2,{children:f.jsx(WA,{logo:BA})})}function WA({appearance:e,logo:t,socialLayout:r}){return f.jsx(HA,{appearance:e,logo:t,socialLayout:r,state:"login"})}function $A(){return f.jsxs(c2,{children:[f.jsx(F9,{}),f.jsx("br",{}),f.jsxs("span",{className:"text-sm font-medium text-captn-dark-blue",children:["I already have an account (",f.jsx(rt,{to:"/login",className:"underline",children:"go to login"}),")."]}),f.jsx("br",{})]})}function XA(){return f.jsx("div",{children:f.jsx("div",{className:"mx-auto max-w-2xl pl-10 pr-10 pt-10 pb-24 sm:pb-32 lg:gap-x-8 lg:py-5 lg:px-8",children:f.jsxs("div",{className:"container mx-auto py-8",children:[f.jsx("h1",{className:"text-3xl font-semibold mb-4",children:"Terms & Conditions"}),f.jsx("p",{className:"text-captn-dark-blue mb-4",children:"Last updated January 29, 2024"}),f.jsx("section",{className:"mb-8",children:f.jsx("p",{children:'These terms and conditions ("Terms") govern your access to and use of Capt’n.ai, a Software-as-a-Service tool ("Service") provided by airt technologies, Inc. ("we" or "us"). By accessing or using the Service, you agree to be bound by these Terms. If you do not agree to these Terms, you may not access or use the Service.'})}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Use Terms for Capt’n.ai"}),f.jsx("p",{children:"Subject to these Terms, we grant you a limited, non-exclusive, non-transferable, revocable license to use the Service for your internal business purposes during the term of these Terms."}),f.jsx("br",{}),f.jsx("p",{children:"You may not use the Service in any way that could damage, disable, overburden, or impair the Service or interfere with any other party's use and enjoyment of the Service. You may not attempt to gain unauthorized access to the Service or any part of it, other accounts, computer systems, or networks connected to the Service, through hacking, password mining, or any other means."}),f.jsx("br",{}),f.jsx("p",{children:"You are solely responsible for all data, information, and content uploaded, stored, or processed using the Service. You represent and warrant that you have the necessary rights to upload, store, and process such data, information, and content using the Service and that your use of the Service complies with all applicable laws, regulations, and industry standards."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Payment and Subscription"}),f.jsx("p",{children:"By subscribing to Capt’n.ai, you agree to the following terms and conditions:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-decimal pl-6",children:[f.jsxs("li",{children:[f.jsx("b",{children:"Subscription:"}),' Capt’n.ai is offered on a subscription basis. You will be billed in advance on a recurring and periodic basis (each period is referred to as a "billing cycle"). Billing cycles are set either on a monthly or annual basis, depending on the type of subscription plan you select when purchasing.']}),f.jsxs("li",{children:[f.jsx("b",{children:"Payments:"})," All payments are processed by our payment partner, Stripe. By providing a payment method, you expressly authorize us and Stripe to charge the subscription fees at the start of every billing cycle."]}),f.jsxs("li",{children:[f.jsx("b",{children:"No Refunds:"})," Payments are non-refundable and there are no refunds or credits for partially used periods. Following any cancellation, however, you will continue to have access to your subscription through the end of your current billing cycle."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Cancellation:"})," You can cancel your subscription at any time. Please note that you must cancel your subscription before it renews for a subsequent billing cycle in order to avoid being charged for the next billing cycle."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Changes:"})," We reserve the right to change our subscription plans or adjust pricing for our service in any manner and at any time as we may determine in our sole and absolute discretion."]})]}),f.jsx("br",{}),f.jsxs("p",{className:"mb-4",children:["If you have any questions about your Capt’n.ai subscription or these terms, please reach out to us at"," ",f.jsx("a",{href:"mailto:support@captn.ai",className:"no-underline hover:underline text-captn-light-blue",children:"support@captn.ai"}),"."]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Marketing Emails"}),f.jsx("p",{children:"By signing up or creating an account on this website, you agree to receive marketing emails from us, unless you choose to unsubscribe. These emails may include promotional offers, product updates, newsletters, or other information related to our services. We value your privacy and assure you that your email address and personal information will be handled in accordance with our Privacy Policy."}),f.jsx("br",{}),f.jsx("p",{children:'If you wish to unsubscribe from our marketing emails, you can do so by clicking the "unsubscribe" link provided at the bottom of each email. Please note that even if you unsubscribe from marketing emails, you may still receive transactional or account-related communications regarding your use of our services.'})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Confidentiality"}),f.jsx("p",{children:'"Confidential Information" means any information disclosed by either party to the other party that is marked as confidential or should reasonably be considered confidential given the nature of the information and the circumstances of its disclosure.'}),f.jsx("br",{}),f.jsx("p",{children:"The recipient of Confidential Information will maintain the confidentiality of the Confidential Information and will not disclose it to any third party, except as necessary to provide the Service or as required by law."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Termination"}),f.jsx("p",{children:"Either party may terminate these Terms upon written notice to the other party if the other party breaches any material term of these Terms and fails to cure such breach within thirty (30) days of receiving written notice of the breach."}),f.jsx("br",{}),f.jsx("p",{children:"Upon termination of these Terms, you must immediately cease all use of the Service and destroy all copies of the Service in your possession."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"User Data"}),f.jsx("p",{children:"We will maintain certain data that you transmit to the Site for the purpose of managing the performance of the Site, as well as data relating to your use of the Site. Although we perform regular routine backups of data, you are solely responsible for all data that you transmit or that relates to any activity you have undertaken using the Site. You agree that we shall have no liability to you for any loss or corruption of any such data, and you hereby waive any right of action against us arising from any such loss or corruption of such data."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Disclaimer of Warranties"}),f.jsx("p",{children:'The Service is provided "as is" and "as available" without any warranties of any kind, whether express or implied.'}),f.jsx("br",{}),f.jsx("p",{children:"We do not warrant that the Service will be uninterrupted or error-free, or that the Service will meet your requirements or expectations."}),f.jsx("br",{}),f.jsx("p",{children:"We expressly disclaim any and all warranties of merchantability, fitness for a particular purpose, non-infringement, and any warranties arising out of course of dealing or usage of trade."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Third-Party Website and Content"}),f.jsx("p",{children:'The Site may contain (or you may be sent via the Site) links to other websites ("Third-Party Websites") as well as articles, photographs, text, graphics, pictures, designs, music, sound, video, information, applications, software, and other content or items belonging to or originating from third parties ("Third-Party Content"). Such Third-Party Websites and Third-Party Content are not investigated, monitored, or checked for accuracy, appropriateness, or completeness by us, and we are not responsible for any Third-Party Websites accessed through the Site or any Third-Party Content posted on, available through, or installed from the Site, including the content, accuracy, offensiveness, opinions, reliability, privacy practices, or other policies of or contained in the Third-Party Websites or the Third-Party Content. Inclusion of, linking to, or permitting the use or installation of any Third-Party Websites or any Third-Party Content does not imply approval or endorsement thereof by us. If you decide to leave the Site and access the Third-Party Websites or to use or install any Third-Party Content, you do so at your own risk, and you should be aware these Terms of Use no longer govern. You should review the applicable terms and policies, including privacy and data gathering practices, of any website to which you navigate from the Site or relating to any applications you use or install from the Site. Any purchases you make through Third-Party Websites will be through other websites and from other companies, and we take no responsibility whatsoever in relation to such purchases which are exclusively between you and the applicable third party. You agree and acknowledge that we do not endorse the products or services offered on Third-Party Websites and you shall hold us harmless from any harm caused by your purchase of such products or services. Additionally, you shall hold us harmless from any losses sustained by you or harm caused to you relating to or resulting in any way from any Third-Party Content or any contact with Third-Party Websites.'})]}),f.jsxs("section",{children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Contact Us"}),f.jsxs("p",{className:"mb-4",children:["In order to receive further information regarding use of the Site, please contact us at:"," ",f.jsx("a",{href:"mailto:support@captn.ai",className:"no-underline hover:underline text-captn-light-blue",children:"support@captn.ai"}),"."]})]})]})})})}function YA(){return f.jsx("div",{children:f.jsx("div",{className:"mx-auto max-w-2xl pl-10 pr-10 pt-10 pb-24 sm:pb-32 lg:gap-x-8 lg:py-5 lg:px-8",children:f.jsxs("div",{className:"container mx-auto py-8",children:[f.jsx("h1",{className:"text-3xl font-semibold mb-4",children:"Privacy Policy"}),f.jsx("p",{className:"text-captn-dark-blue mb-4",children:"Last updated January 29, 2024"}),f.jsx("section",{className:"mb-8",children:f.jsxs("p",{children:['Airt technologies, Inc. ("we", "us", or "our") is committed to protecting the privacy of our users. This Privacy Policy explains how we collect, use, and disclose information through our SaaS tool, ',f.jsx("b",{children:"Capt’n.ai"}),' (the "Service").']})}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Information We Collect"}),f.jsx("p",{children:"At Capt’n.ai, we value your privacy and are committed to ensuring the highest level of confidentiality and security for your information. Here's what you need to know about the information we collect when you use our Service:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-decimal pl-6",children:[f.jsxs("li",{children:[f.jsx("b",{children:"Account Information:"})," When you create a Capt’n.ai account, we collect your name and email address. This information is essential to personalize your experience and enable various features of the Service."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Integrations:"})," As you integrate your various marketing platforms with our Service, we collect information that you input, including the details about the platforms you're connecting and any associated data. This data is necessary to provide you with accurate analytics, reports, and insights. For data collected from Google APIs, we adhere to Google's API Services User Data Policy, including the Limited Use requirements. Continue reading for further information."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Chat Interactions and AI Data Sharing:"}),' Your chat interactions and data from connected third-party services may be shared with our privately deployed OpenAI models hosted on Microsoft Azure. This sharing is essential for the service and is detailed in the section below: "Third-Party and Proprietary AI Tools."']}),f.jsxs("li",{children:[f.jsx("b",{children:"Usage Information:"})," To help us understand how you interact with our Service and enable us to improve your user experience, we collect information about your usage. This may include log data, device information, and other data related to your activities within our Service."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Data Processing:"}),` At Capt’n.ai, your data's privacy is a top priority. We process data on-the-fly and do not store any data in databases, except for chat history as detailed in the "Third-Party and Proprietary AI Tools" section. This ensures your data stays where it belongs—with you.`]})]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("p",{children:"We use the information we collect to:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-disc pl-6",children:[f.jsxs("li",{children:[f.jsx("b",{children:"Provide, Maintain, and Improve the Service:"})," We use your information to deliver the services you request, maintain your account, and enhance your experience with Capt’n.ai."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Respond to Your Requests and Inquiries:"})," Your information helps us respond to your customer service requests, support needs, and other inquiries."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Communicate with You:"})," We use your information to communicate with you about the Service, updates, and other informational or promotional content."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Analyze and Monitor Usage:"})," We use analytics tools to track how users interact with the Service, which helps us make data-driven decisions for improvements."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Detect, Investigate, and Prevent Fraud and Other Illegal Activities:"})," ","We use your information to protect the security and integrity of the Service by detecting and preventing fraudulent or illegal activities."]})]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Authentication And Authorized Data Access"}),f.jsx("p",{children:"User authenticates with the 3rd party provider such as Google account. Upon authentication, user allows the application:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-decimal pl-6",children:[f.jsx("li",{children:"Associate user with personal info on Google"}),f.jsx("li",{children:"See user's personal info, including any personal info user made publicly available"}),f.jsx("li",{children:"View user's email address"})]}),f.jsx("br",{}),f.jsxs("p",{children:["Email address is stored in the database of the application while the other credentials of authenticated users are encrypted and stored within the infrastructure of Google. This can be used to restrict or fully block the service for a particular user in case of the breach of the ",f.jsx("b",{children:"terms of use"}),". User's email address can be deleted upon the request."]}),f.jsx("br",{}),f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Revoke Access to Your Google Account"}),f.jsxs("p",{children:["To remove access of the application to your account, you can do it directly in your Google account by following this link:"," ",f.jsx("a",{href:"https://myaccount.google.com/connections",target:"_black",className:"no-underline hover:underline text-captn-light-blue",children:"https://myaccount.google.com/permissions‍"})]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Google API Services User Data Policy"}),f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Google API Services Disclosure"}),f.jsxs("p",{children:["Capt’n.ai's use and transfer of information received from Google APIs adhere to"," ",f.jsx("a",{href:"https://developers.google.com/terms/api-services-user-data-policy",target:"_blank",className:"no-underline hover:underline text-captn-light-blue",children:"Google API Services User Data Policy"}),", including the Limited Use requirements. We recommend reviewing Google API Services User Data Policy to better understand their practices."]}),f.jsx("br",{}),f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Use of Google API Services Data"}),f.jsx("p",{children:"When you choose to connect various Google services to Capt’n.ai, we require specific permissions to fetch and display data for your interactive queries. Below are the permissions required for each Google service:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-disc pl-6",children:[f.jsxs("li",{children:["Google Analytics:"," ",f.jsx("a",{href:"https://developers.google.com/analytics/devguides/config/admin/v1",target:"_blank",className:"no-underline hover:underline text-captn-light-blue",children:"https://developers.google.com/analytics/devguides/config/admin/v1"})," ","- Enables you to interact with your Google Analytics data through Capt’n.ai."]}),f.jsxs("li",{children:["Google Ad:"," ",f.jsx("a",{href:"https://developers.google.com/google-ads/api/docs/oauth/internals",target:"_blank",className:"no-underline hover:underline text-captn-light-blue",children:"https://developers.google.com/google-ads/api/docs/oauth/internals"})," ","- Allows Capt’n.ai to fetch and display your Google Ads data for interactive queries."]}),f.jsxs("li",{children:["Google Search Console:"," ",f.jsx("a",{href:"https://developers.google.com/webmaster-tools/v1/sites/get",target:"_blank",className:"no-underline hover:underline text-captn-light-blue",children:"https://developers.google.com/webmaster-tools/v1/sites/get"})," ","- Permits Capt’n.ai to access and display your Google Search Console data, making it available for interactive chat."]})]}),f.jsx("br",{}),f.jsx("p",{children:"You may choose to connect one, multiple, or none of these services as per your preference."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Third-Party and Proprietary AI Tools"}),f.jsx("p",{children:"Our chatbot service utilizes advanced AI technology by employing privately deployed OpenAI models on Microsoft Azure. This approach allows us to generate contextually relevant and accurate responses based on your interactions and queries, ensuring a high-quality user experience."}),f.jsx("br",{}),f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Data Sharing in Different Use Cases"}),f.jsx("p",{children:"Your chat interactions are processed using our privately deployed OpenAI models on Microsoft Azure. This ensures that your data, including chat history, user metrics, and dimensions from integrated services like Google Analytics, Google Ads, and Facebook Ads, is not shared with OpenAI directly."}),f.jsx("br",{}),f.jsx("p",{children:"Here's a breakdown of the specific data shared from each source:"}),f.jsx("br",{}),f.jsxs("p",{children:[f.jsx("b",{children:"Google Analytics:"})," Your Google Analytics data includes website traffic information, user behavior, and engagement metrics from your connected websites. Metrics like page views, session duration, bounce rate, and user demographics. By incorporating these insights, the chatbot can tailor its responses to align with the user's website-related inquiries."]}),f.jsx("br",{}),f.jsxs("p",{children:[f.jsx("b",{children:"Google Ads:"})," Data from your Google Ads campaigns offers insights into your advertising efforts, ad performance, and user interactions with your advertisements. Key metrics such as ad clicks, impressions, click-through rates (CTR), and conversion rates are integrated into the chatbot's learning process. This integration enables the chatbot to provide more informed and relevant responses regarding your advertising strategies."]}),f.jsx("br",{}),f.jsxs("p",{children:[f.jsx("b",{children:"Google Search Console:"})," Information gathered from Google Search Console sheds light on your website's visibility in Google search results. Details about search queries, click-through rates (CTR), and average position help the chatbot understand user intent and prevalent search trends. By leveraging this data, the chatbot can offer insights and answers that align with current search behaviors."]}),f.jsx("br",{}),f.jsxs("p",{children:[f.jsx("b",{children:"Chat Interactions:"})," This refers to the text-based interactions you have with the chatbot within the Capt’n.ai platform. The content of these conversations, including your questions and responses. This data aids in refining the AI's ability to comprehend inputs and generate contextually accurate responses."]}),f.jsx("br",{}),f.jsx("p",{children:"All of the data sources mentioned above are crucial for enhancing the chatbot's ability to provide accurate and contextually relevant responses. When chatting directly on our website, certain data points from your interactions and connected platforms are processed using our privately deployed OpenAI models on Microsoft Azure. We ensure that only relevant and necessary data are shared to maintain the effectiveness of the chatbot's functionality."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Data Storage on Azure Database"}),f.jsxs("p",{children:["While we do not directly store raw data from third-party sources such as Google Ads, Google Analytics, or Facebook Ads, it's crucial to understand that your chat history may contain references to or summaries of data from these services. Retaining this chat history is not just for record-keeping; it's a fundamental component for the seamless functionality of our chatbot service. This chat data is securely stored in Azure Database service, a cloud-based database, in compliance with Azure privacy policy (",f.jsx("a",{href:"https://learn.microsoft.com/en-us/azure/compliance/",target:"_blank",className:"no-underline hover:underline text-captn-light-blue",children:"https://learn.microsoft.com/en-us/azure/compliance/"}),"). Your chat history is retained indefinitely, but you have the option to delete it at any time through the settings in our application."]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h3",{className:"text-l font-semibold mb-2",children:"User Consent Process"}),f.jsx("p",{children:"During your registration with Capt’n.ai, we require your explicit consent regarding our privacy practices. As part of the sign-up process, you will encounter a checkbox indicating that you have read and agree to our Terms and Conditions and Privacy Policy. By checking this box, you acknowledge your understanding and agreement to how we handle your data as detailed in these documents. Only upon agreeing to these terms will the chatbot service proceed with using your data. You have the option to withdraw your consent at any point, read more below."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Opt-Out Options"}),f.jsx("p",{children:"If you choose to withdraw your consent and opt-out of data sharing with third-party tools, you will no longer be able to use the Capt’n.ai service. The nature of our tool requires data sharing for its basic functionality. Therefore, opting out effectively means discontinuing use of the service."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Agreement"}),f.jsx("p",{children:"By using our chatbot service, you explicitly consent to your chat data being processed as described above. We ensure that your data is handled securely and in accordance with this privacy policy, as well as Azure privacy policy."}),f.jsx("br",{}),f.jsx("p",{children:f.jsx("b",{children:"If you do not agree with this policy, please refrain from signing up and using Capt’n.ai."})})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Google Analytics"}),f.jsx("p",{children:"Google Analytics is used across captn.ai domain in order to collect information about the users' interactions with the site as well as to identify returning visits, location, device data and engagement signals. Collected data helps to understand the relevancy and general usage of the tool hence, to provide better experience and solutions towards the needs of the users, fix errors and bugs. No data is shared with the 3rd party organizations or individuals."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Information Sharing and Disclosure"}),f.jsx("p",{children:"We may share your information with third parties in the following circumstances:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-disc pl-6",children:[f.jsx("li",{children:"Service Providers: We may share your information with third-party service providers who perform services on our behalf, such as hosting, analytics, and customer support."}),f.jsx("li",{children:'AI Data Sharing: Your chat interactions and data from connected third-party services may be shared with our in-house AI algorithms. This sharing is essential for the service and is detailed in the section above "Third-Party and Proprietary AI Tools".'}),f.jsx("li",{children:"Compliance with Laws: We may disclose your information as required by law or in response to legal process, including subpoenas, court orders, and requests from law enforcement."}),f.jsx("li",{children:"Business Transfers: If we are involved in a merger, acquisition, or sale of all or a portion of our assets, your information may be transferred as part of that transaction."}),f.jsx("li",{children:"Your Consent: We may disclose your information with your consent."})]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Your Choices"}),f.jsx("p",{children:"You can access and update your account information through the Service. You can also unsubscribe from our promotional emails by following the instructions in the email."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Data Retention"}),f.jsx("p",{children:"We retain the information we collect for as long as necessary to provide the Service and fulfill the purposes described in this Privacy Policy. When we no longer need the information, we will securely delete it or de-identify it. Your chat history is retained indefinitely, but you have the option to delete it at any time through the settings in our application."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Security"}),f.jsx("p",{children:"We take reasonable measures to protect your information from unauthorized access, use, disclosure, and destruction. However, no method of transmission over the internet or method of electronic storage is completely secure."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Changes to this Privacy Policy"}),f.jsx("p",{children:"We may update this Privacy Policy from time to time. If we make any material changes, we will notify you by email or by posting a notice on our website prior to the change becoming effective."})]}),f.jsxs("section",{children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Contact Us"}),f.jsxs("p",{className:"mb-4",children:["In order to receive further information regarding use of the Site, please contact us at:"," ",f.jsx("a",{href:"mailto:support@captn.ai",className:"no-underline hover:underline text-captn-light-blue",children:"support@captn.ai"}),"."]})]})]})})})}const di=Object.create(null);di.open="0";di.close="1";di.ping="2";di.pong="3";di.message="4";di.upgrade="5";di.noop="6";const ql=Object.create(null);Object.keys(di).forEach(e=>{ql[di[e]]=e});const Ef={type:"error",data:"parser error"},u2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",h2=typeof ArrayBuffer=="function",f2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,v1=({type:e,data:t},r,s)=>u2&&t instanceof Blob?r?s(t):l0(t,s):h2&&(t instanceof ArrayBuffer||f2(t))?r?s(t):l0(new Blob([t]),s):s(di[e]+(t||"")),l0=(e,t)=>{const r=new FileReader;return r.onload=function(){const s=r.result.split(",")[1];t("b"+(s||""))},r.readAsDataURL(e)};function c0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let $u;function UA(e,t){if(u2&&e.data instanceof Blob)return e.data.arrayBuffer().then(c0).then(t);if(h2&&(e.data instanceof ArrayBuffer||f2(e.data)))return t(c0(e.data));v1(e,!1,r=>{$u||($u=new TextEncoder),t($u.encode(r))})}const d0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ia=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,r=e.length,s,o=0,c,p,v,C;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const A=new ArrayBuffer(t),L=new Uint8Array(A);for(s=0;s>4,L[o++]=(p&15)<<4|v>>2,L[o++]=(v&3)<<6|C&63;return A},ZA=typeof ArrayBuffer=="function",y1=(e,t)=>{if(typeof e!="string")return{type:"message",data:p2(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:qA(e.substring(1),t)}:ql[r]?e.length>1?{type:ql[r],data:e.substring(1)}:{type:ql[r]}:Ef},qA=(e,t)=>{if(ZA){const r=GA(e);return p2(r,t)}else return{base64:!0,data:e}},p2=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},g2="",QA=(e,t)=>{const r=e.length,s=new Array(r);let o=0;e.forEach((c,p)=>{v1(c,!1,v=>{s[p]=v,++o===r&&t(s.join(g2))})})},KA=(e,t)=>{const r=e.split(g2),s=[];for(let o=0;o{const s=r.length;let o;if(s<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,s);else if(s<65536){o=new Uint8Array(3);const c=new DataView(o.buffer);c.setUint8(0,126),c.setUint16(1,s)}else{o=new Uint8Array(9);const c=new DataView(o.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(s))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(r)})}})}let Xu;function kl(e){return e.reduce((t,r)=>t+r.length,0)}function Cl(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let s=0;for(let o=0;oMath.pow(2,21)-1){v.enqueue(Ef);break}o=L*Math.pow(2,32)+A.getUint32(4),s=3}else{if(kl(r)e){v.enqueue(Ef);break}}}})}const m2=4;function Ft(e){if(e)return tj(e)}function tj(e){for(var t in Ft.prototype)e[t]=Ft.prototype[t];return e}Ft.prototype.on=Ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ft.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s,o=0;o(e.hasOwnProperty(s)&&(r[s]=e[s]),r),{})}const rj=Nr.setTimeout,ij=Nr.clearTimeout;function Hd(e,t){t.useNativeTimers?(e.setTimeoutFn=rj.bind(Nr),e.clearTimeoutFn=ij.bind(Nr)):(e.setTimeoutFn=Nr.setTimeout.bind(Nr),e.clearTimeoutFn=Nr.clearTimeout.bind(Nr))}const nj=1.33;function sj(e){return typeof e=="string"?aj(e):Math.ceil((e.byteLength||e.size)*nj)}function aj(e){let t=0,r=0;for(let s=0,o=e.length;s=57344?r+=3:(s++,r+=4);return r}function oj(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function lj(e){let t={},r=e.split("&");for(let s=0,o=r.length;s0);return t}function y2(){const e=f0(+new Date);return e!==h0?(u0=0,h0=e):e+"."+f0(u0++)}for(;Sl{this.readyState="paused",t()};if(this.polling||!this.writable){let s=0;this.polling&&(s++,this.once("pollComplete",function(){--s||r()})),this.writable||(s++,this.once("drain",function(){--s||r()}))}else r()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};KA(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,QA(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=y2()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ai(this.uri(),t)}doWrite(t,r){const s=this.request({method:"POST",data:t});s.on("success",r),s.on("error",(o,c)=>{this.onError("xhr post error",o,c)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,s)=>{this.onError("xhr poll error",r,s)}),this.pollXhr=t}}class ai extends Ft{constructor(t,r){super(),Hd(this,r),this.opts=r,this.method=r.method||"GET",this.uri=t,this.data=r.data!==void 0?r.data:null,this.create()}create(){var t;const r=x2(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const s=this.xhr=new w2(r);try{s.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(s.timeout=this.opts.requestTimeout),s.onreadystatechange=()=>{var o;s.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(s)),s.readyState===4&&(s.status===200||s.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof s.status=="number"?s.status:0)},0))},s.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=ai.requestsCount++,ai.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=hj,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ai.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ai.requestsCount=0;ai.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",p0);else if(typeof addEventListener=="function"){const e="onpagehide"in Nr?"pagehide":"unload";addEventListener(e,p0,!1)}}function p0(){for(let e in ai.requests)ai.requests.hasOwnProperty(e)&&ai.requests[e].abort()}const w1=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),Al=Nr.WebSocket||Nr.MozWebSocket,g0=!0,gj="arraybuffer",m0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class mj extends b1{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),r=this.opts.protocols,s=m0?{}:x2(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=g0&&!m0?r?new Al(t,r):new Al(t):new Al(t,r,s)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r{const p={};try{g0&&this.ws.send(c)}catch{}o&&w1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=y2()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!Al}}class xj extends b1{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const r=ej(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(r).getReader(),o=JA();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const c=()=>{s.read().then(({done:v,value:C})=>{v||(this.onPacket(C),c())}).catch(v=>{})};c();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this.writer.write(p).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let r=0;r{o&&w1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const vj={websocket:mj,webtransport:xj,polling:pj},yj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,bj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Pf(e){if(e.length>2e3)throw"URI too long";const t=e,r=e.indexOf("["),s=e.indexOf("]");r!=-1&&s!=-1&&(e=e.substring(0,r)+e.substring(r,s).replace(/:/g,";")+e.substring(s,e.length));let o=yj.exec(e||""),c={},p=14;for(;p--;)c[bj[p]]=o[p]||"";return r!=-1&&s!=-1&&(c.source=t,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=wj(c,c.path),c.queryKey=kj(c,c.query),c}function wj(e,t){const r=/\/{2,9}/g,s=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&s.splice(0,1),t.slice(-1)=="/"&&s.splice(s.length-1,1),s}function kj(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,c){o&&(r[o]=c)}),r}let k2=class ms extends Ft{constructor(t,r={}){super(),this.binaryType=gj,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=Pf(t),r.hostname=t.host,r.secure=t.protocol==="https"||t.protocol==="wss",r.port=t.port,t.query&&(r.query=t.query)):r.host&&(r.hostname=Pf(r.host).host),Hd(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=lj(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=m2,r.transport=t,this.id&&(r.sid=this.id);const s=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new vj[t](s)}open(){let t;if(this.opts.rememberUpgrade&&ms.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",r=>this.onClose("transport close",r))}probe(t){let r=this.createTransport(t),s=!1;ms.priorWebsocketSuccess=!1;const o=()=>{s||(r.send([{type:"ping",data:"probe"}]),r.once("packet",P=>{if(!s)if(P.type==="pong"&&P.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;ms.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(L(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const B=new Error("probe error");B.transport=r.name,this.emitReserved("upgradeError",B)}}))};function c(){s||(s=!0,L(),r.close(),r=null)}const p=P=>{const B=new Error("probe error: "+P);B.transport=r.name,c(),this.emitReserved("upgradeError",B)};function v(){p("transport closed")}function C(){p("socket closed")}function A(P){r&&P.name!==r.name&&c()}const L=()=>{r.removeListener("open",o),r.removeListener("error",p),r.removeListener("close",v),this.off("close",C),this.off("upgrading",A)};r.once("open",o),r.once("error",p),r.once("close",v),this.once("close",C),this.once("upgrading",A),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||r.open()},200):r.open()}onOpen(){if(this.readyState="open",ms.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const r=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let s=0;s0&&r>this.maxPayload)return this.writeBuffer.slice(0,s);r+=2}return this.writeBuffer}write(t,r,s){return this.sendPacket("message",t,r,s),this}send(t,r,s){return this.sendPacket("message",t,r,s),this}sendPacket(t,r,s,o){if(typeof r=="function"&&(o=r,r=void 0),typeof s=="function"&&(o=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const c={type:t,data:r,options:s};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},s=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}onError(t){ms.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,r){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const r=[];let s=0;const o=t.length;for(;stypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,C2=Object.prototype.toString,Nj=typeof Blob=="function"||typeof Blob<"u"&&C2.call(Blob)==="[object BlobConstructor]",Ej=typeof File=="function"||typeof File<"u"&&C2.call(File)==="[object FileConstructor]";function k1(e){return Aj&&(e instanceof ArrayBuffer||jj(e))||Nj&&e instanceof Blob||Ej&&e instanceof File}function Ql(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,s=e.length;r=0&&e.num{delete this.acks[t];for(let p=0;p{this.io.clearTimeoutFn(c),r.apply(this,[null,...p])}}emitWithAck(t,...r){const s=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,c)=>{r.push((p,v)=>s?p?c(p):o(v):o(p)),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...c)=>s!==this._queue[0]?void 0:(o!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(o)):(this._queue.shift(),r&&r(null,...c)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ze.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ze.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ze.EVENT:case Ze.BINARY_EVENT:this.onevent(t);break;case Ze.ACK:case Ze.BINARY_ACK:this.onack(t);break;case Ze.DISCONNECT:this.ondisconnect();break;case Ze.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const s of r)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let s=!1;return function(...o){s||(s=!0,r.packet({type:Ze.ACK,id:t,data:o}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(r.apply(this,t.data),delete this.acks[t.id])}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ze.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let s=0;s0&&e.jitter<=1?e.jitter:0,this.attempts=0}la.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0};la.prototype.reset=function(){this.attempts=0};la.prototype.setMin=function(e){this.ms=e};la.prototype.setMax=function(e){this.max=e};la.prototype.setJitter=function(e){this.jitter=e};class _f extends Yt{constructor(t,r){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Hd(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((s=r.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new la({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const o=r.parser||Oj;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new k2(this.uri,this.opts);const r=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=Dr(r,"open",function(){s.onopen(),t&&t()}),c=v=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",v),t?t(v):this.maybeReconnectOnOpen()},p=Dr(r,"error",c);if(this._timeout!==!1){const v=this._timeout,C=this.setTimeoutFn(()=>{o(),c(new Error("timeout")),r.close()},v);this.opts.autoUnref&&C.unref(),this.subs.push(()=>{this.clearTimeoutFn(C)})}return this.subs.push(o),this.subs.push(p),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Dr(t,"ping",this.onping.bind(this)),Dr(t,"data",this.ondata.bind(this)),Dr(t,"error",this.onerror.bind(this)),Dr(t,"close",this.onclose.bind(this)),Dr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){w1(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new S2(this,t,r),this.nsps[t]=s),s}_destroy(t){const r=Object.keys(this.nsps);for(const s of r)if(this.nsps[s].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let s=0;st()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,r){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},r);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Aa={};function Kl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=Cj(e,t.path||"/socket.io"),s=r.source,o=r.id,c=r.path,p=Aa[o]&&c in Aa[o].nsps,v=t.forceNew||t["force new connection"]||t.multiplex===!1||p;let C;return v?C=new _f(s,t):(Aa[o]||(Aa[o]=new _f(s,t)),C=Aa[o]),r.query&&!t.query&&(t.query=r.queryKey),C.socket(r.path,t)}Object.assign(Kl,{Manager:_f,Socket:S2,io:Kl,connect:Kl});const Br=Kl(r1.apiUrl,{autoConnect:!0});function S1(){Br.auth={sessionId:nb()},Br.connected&&(Br.disconnect(),Br.connect())}S1();es.on("sessionId.set",S1);es.on("sessionId.clear",S1);const A1=G.createContext({socket:Br,isConnected:!1});function Fj({children:e}){const[t,r]=G.useState(Br.connected);return G.useEffect(()=>{function s(){r(!0)}function o(){r(!1)}return Br.on("connect",s),Br.on("disconnect",o),()=>{Br.off("connect",s),Br.off("disconnect",o)}},[]),f.jsx(A1.Provider,{value:{socket:Br,isConnected:t},children:e})}function Dj(){return G.useContext(A1)}function qc(e,t){const{socket:r}=G.useContext(A1);G.useEffect(()=>(r.on(e,t),()=>{r.off(e,t)}),[e,t])}const A2=e=>f.jsx("header",{className:"sticky top-0 z-999 flex w-full bg-captn-light-cream dark:bg-boxdark dark:drop-shadow-none",children:f.jsxs("div",{className:"flex flex-grow items-center justify-between sm:justify-end sm:gap-5 px-8 py-5 shadow ",children:[f.jsx("div",{className:"flex items-center gap-2 sm:gap-4 lg:hidden",children:f.jsx("button",{"aria-controls":"sidebar",onClick:t=>{t.stopPropagation(),e.setSidebarOpen(!e.sidebarOpen)},className:"z-99999 block rounded-sm border border-stroke bg-captn-light-cream p-1.5 shadow-sm dark:border-strokedark dark:bg-boxdark lg:hidden",children:f.jsxs("span",{className:"relative block h-5.5 w-5.5 cursor-pointer",children:[f.jsxs("span",{className:"du-block absolute right-0 h-full w-full",children:[f.jsx("span",{className:`relative top-0 left-0 my-1 block h-0.5 w-0 rounded-sm bg-black delay-[0] duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!w-full delay-300"}`}),f.jsx("span",{className:`relative top-0 left-0 my-1 block h-0.5 w-0 rounded-sm bg-black delay-150 duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"delay-400 !w-full"}`}),f.jsx("span",{className:`relative top-0 left-0 my-1 block h-0.5 w-0 rounded-sm bg-black delay-200 duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!w-full delay-500"}`})]}),f.jsxs("span",{className:"absolute right-0 h-full w-full rotate-45",children:[f.jsx("span",{className:`absolute left-2.5 top-0 block h-full w-0.5 rounded-sm bg-black delay-300 duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!h-0 !delay-[0]"}`}),f.jsx("span",{className:`delay-400 absolute left-0 top-2.5 block h-0.5 w-full rounded-sm bg-black duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!h-0 !delay-200"}`})]})]})})}),f.jsx("ul",{className:"flex items-center gap-2 2xsm:gap-4"}),f.jsx("div",{className:"flex items-center gap-3 2xsm:gap-7",children:!!e.user&&f.jsx(m1,{user:e.user})})]})}),j2="/assets/logo-for-dark-bg-B0Sa7V_h.png";function Hj(e){return as({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"}}]})(e)}const Bj=({chatId:e,chatName:t,onValueChange:r})=>{const[s,o]=G.useState(!1),[c,p]=G.useState(t),v=G.useRef(null);G.useEffect(()=>{var B;s&&((B=v.current)==null||B.focus())},[s]);const C=B=>{B.preventDefault(),o(!0)},A=B=>{p(B.target.value)},L=B=>{B.preventDefault(),r(e,c),o(!1)},P=()=>{r(e,c),o(!1)};return f.jsxs("div",{className:"editable-chat-name",style:{width:"170px"},children:[!s&&f.jsx("span",{className:"chat-name overflow-ellipsis overflow-hidden whitespace-nowrap",style:{display:"inherit"},children:c}),s&&f.jsx("form",{onSubmit:L,"data-testid":"edit-form",children:f.jsx("input",{ref:v,type:"text",onChange:A,onBlur:P,value:c,className:"w-5/6 focus:outline-none focus:ring-0 focus:border-captn-light-blue bg-captn-light-cream text-captn-dark-blue",style:{height:"23px",paddingLeft:"5px",marginLeft:"-5px"}})}),!s&&f.jsx("button",{className:"edit-button absolute right-3 top-3 text-xs",onClick:C,"data-testid":"edit-button",children:f.jsx(Hj,{})})]})},Vj=({sidebarOpen:e,setSidebarOpen:t})=>{const r=Mr(),s=na(),{pathname:o}=s,c=Number(o.split("/").pop()),p=G.useRef(null),v=G.useRef(null),C=localStorage.getItem("sidebar-expanded"),[A,L]=G.useState(C===null?!1:C==="true"),P=async(D,Z)=>{try{await bi({id:D,data:{name:Z}})}catch{console.log("Unable to update the chat name. Please try again later.")}},{data:B,isLoading:M}=Qs(jk);G.useEffect(()=>{const D=({target:Z})=>{!v.current||!p.current||!e||v.current.contains(Z)||p.current.contains(Z)||t(!1)};return document.addEventListener("click",D),()=>document.removeEventListener("click",D)}),G.useEffect(()=>{const D=({keyCode:Z})=>{!e||Z!==27||t(!1)};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)}),G.useEffect(()=>{var D,Z;localStorage.setItem("sidebar-expanded",A.toString()),A?(D=document.querySelector("body"))==null||D.classList.add("sidebar-expanded"):(Z=document.querySelector("body"))==null||Z.classList.remove("sidebar-expanded")},[A]);const H=async D=>{try{const Z=await Pb();r.push(`/chat/${Z.id}`)}catch(Z){console.log("Error: "+Z.message),Z.message==="No Subscription Found"?r.push("/pricing"):window.alert("Error: Something went wrong. Please try again later.")}};return f.jsxs("aside",{ref:v,className:`border-r-2 absolute left-0 top-0 z-9999 flex h-screen w-72.5 flex-col overflow-y-hidden bg-captn-dark-blue duration-300 ease-linear dark:bg-captn-dark-blue lg:static lg:translate-x-0 ${e?"translate-x-0":"-translate-x-full"}`,children:[f.jsxs("div",{className:"flex items-center gap-2 px-6 py-5.5 lg:py-3.5",children:[f.jsxs(f.Fragment,{children:[f.jsx(sr,{to:"/",children:f.jsx("img",{src:j2,alt:"Logo",className:"h-10 w-auto mt-2"})}),f.jsx("span",{className:"mt-2 text-sm font-semibold leading-6 dark:text-captn-light-cream",children:f.jsx("sup",{className:"text-base text-captn-light-blue",children:"βeta"})})]}),f.jsx("button",{ref:p,onClick:()=>t(!e),"aria-controls":"sidebar","aria-expanded":e,className:"block lg:hidden text-captn-light-cream",children:f.jsx("svg",{className:"fill-current",width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M19 8.175H2.98748L9.36248 1.6875C9.69998 1.35 9.69998 0.825 9.36248 0.4875C9.02498 0.15 8.49998 0.15 8.16248 0.4875L0.399976 8.3625C0.0624756 8.7 0.0624756 9.225 0.399976 9.5625L8.16248 17.4375C8.31248 17.5875 8.53748 17.7 8.76248 17.7C8.98748 17.7 9.17498 17.625 9.36248 17.475C9.69998 17.1375 9.69998 16.6125 9.36248 16.275L3.02498 9.8625H19C19.45 9.8625 19.825 9.4875 19.825 9.0375C19.825 8.55 19.45 8.175 19 8.175Z",fill:""})})})]}),f.jsx("div",{children:f.jsxs(rt,{to:"#",className:"no-underline mt-7 my-1 mx-4 mb-10 flex items-center justify-left gap-2.5 rounded-md bg-captn-cta-green py-4 px-4 text-center font-medium text-captn-light-cream hover:bg-opacity-90",onClick:H,children:[f.jsx("span",{children:f.jsxs("svg",{stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",className:"icon-sm shrink-0",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),"New chat"]})}),f.jsx("div",{className:"no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear",children:f.jsx("nav",{className:"mt-1 py-1 px-4 ",children:f.jsxs("div",{children:[f.jsx("h3",{className:"mb-4 ml-4 text-sm font-semibold text-bodydark2",children:"CHATS"}),f.jsx("ul",{className:"mb-6 flex flex-col gap-1.5",children:f.jsx("li",{children:B&&B.map((D,Z)=>f.jsxs(sr,{to:`/chat/${D.id}?`,className:`chat-link relative no-underline group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out ${o==="/"&&"bg-gray-700 dark:bg-meta-4"} ${D.id===c?"bg-captn-light-cream text-captn-dark-blue hover:bg-captn-light-blue hover:text-captn-dark-blue":"text-captn-light-cream hover:bg-captn-light-blue hover:text-captn-dark-blue"}`,children:[f.jsx("svg",{stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",className:"icon-sm",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),f.jsx("span",{className:"ml-3",children:f.jsx(Bj,{chatId:D.id,chatName:D.name?D.name:"",onValueChange:P})})]},D.id))})})]})})})]})};function Wj({handleFormSubmit:e,currentChatDetails:t,googleRedirectLoginMsg:r}){const[s,o]=G.useState(""),c=G.useCallback(async v=>{v!==null&&r&&await e(r,!0)},[r]),p=async v=>{if(v.preventDefault(),!t.showLoader){const A=v.target.userQuery.value;o(""),e(A)}};return f.jsx("div",{"data-testid":"chat-form",className:"mt-2 mb-2",children:f.jsxs("form",{onSubmit:p,className:"",children:[f.jsx("label",{htmlFor:"search",className:"mb-2 text-sm font-medium text-captn-dark-blue sr-only dark:text-captn-light-cream",children:"Search"}),f.jsxs("div",{className:"relative bottom-0 left-0 right-0 flex items-center justify-between m-1",children:[f.jsx("input",{type:"search",id:"userQuery",name:"search",className:"block rounded-lg w-full h-12 text-sm text-captn-light-cream bg-captn-dark-blue focus:outline-none focus:ring-0 focus:border-captn-light-blue",placeholder:"Message Capt’n...",required:!0,ref:c,value:s,onChange:v=>o(v.target.value)}),f.jsx("button",{type:"submit",className:"text-captn-light-cream bg-captn-cta-green hover:bg-captn-cta-green-hover absolute right-2 font-medium rounded-lg text-sm px-1.5 py-1.5",children:f.jsx("span",{className:"",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-captn-light-cream",children:f.jsx("path",{d:"M7 11L12 6L17 11M12 18V7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]})})}const $j=({children:e,handleFormSubmit:t,currentChatDetails:r,googleRedirectLoginMsg:s})=>{const[o,c]=G.useState(!1),{data:p}=Qr(),v=G.useRef(null),C=Mr();return G.useEffect(()=>{p!=null&&p.hasPaid||C.push("/pricing")},[p,C]),G.useEffect(()=>{const A=new MutationObserver(()=>{v.current&&v.current.scrollTo({top:v.current.scrollHeight,behavior:"smooth"})});return v.current&&A.observe(v.current,{childList:!0,subtree:!0}),()=>A.disconnect()},[]),f.jsx("div",{className:"dark:bg-boxdark-2 dark:text-bodydark bg-captn-light-blue",children:f.jsxs("div",{className:"flex h-screen overflow-hidden",children:[f.jsx(Vj,{sidebarOpen:o,setSidebarOpen:c}),f.jsxs("div",{className:"relative flex flex-1 flex-col overflow-y-auto overflow-x-hidden",children:[f.jsx(A2,{sidebarOpen:o,setSidebarOpen:c,user:p}),f.jsx("main",{className:"flex-auto overflow-y-auto",ref:v,children:f.jsx("div",{children:e})}),r?f.jsx(Wj,{handleFormSubmit:t,currentChatDetails:r,googleRedirectLoginMsg:s}):f.jsx(f.Fragment,{})]})]})})};function zn(){return zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),y0={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Yj=["style","script"],Uj=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Gj=/mailto:/i,Zj=/\n{2,}$/,N2=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,qj=/^ *> ?/gm,Qj=/^ {2,}\n/,Kj=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,E2=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,L2=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Jj=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,eN=/^(?:\n *)*\n/,tN=/\r\n?/g,rN=/^\[\^([^\]]+)](:.*)\n/,iN=/^\[\^([^\]]+)]/,nN=/\f/g,sN=/^\s*?\[(x|\s)\]/,P2=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,T2=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,R2=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Mf=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,aN=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,_2=/^)/,oN=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Of=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,lN=/^\{.*\}$/,cN=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,dN=/^<([^ >]+@[^ >]+)>/,uN=/^<([^ >]+:\/[^ >]+)>/,hN=/-([a-z])?/gi,M2=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,fN=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,pN=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,gN=/^\[([^\]]*)\] ?\[([^\]]*)\]/,mN=/(\[|\])/g,xN=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,vN=/\t/g,yN=/^ *\| */,bN=/(^ *\||\| *$)/g,wN=/ *$/,kN=/^ *:-+: *$/,CN=/^ *:-+ *$/,SN=/^ *-+: *$/,AN=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,jN=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,NN=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,EN=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,LN=/^\\([^0-9A-Za-z\s])/,PN=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,TN=/^\n+/,RN=/^([ \t]*)/,_N=/\\([^\\])/g,b0=/ *\n+$/,MN=/(?:^|\n)( *)$/,j1="(?:\\d+\\.)",N1="(?:[*+-])";function O2(e){return"( *)("+(e===1?j1:N1)+") +"}const I2=O2(1),z2=O2(2);function F2(e){return new RegExp("^"+(e===1?I2:z2))}const ON=F2(1),IN=F2(2);function D2(e){return new RegExp("^"+(e===1?I2:z2)+"[^\\n]*(?:\\n(?!\\1"+(e===1?j1:N1)+" )[^\\n]*)*(\\n|$)","gm")}const H2=D2(1),B2=D2(2);function V2(e){const t=e===1?j1:N1;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const W2=V2(1),$2=V2(2);function w0(e,t){const r=t===1,s=r?W2:$2,o=r?H2:B2,c=r?ON:IN;return{t(p,v,C){const A=MN.exec(C);return A&&(v.o||!v._&&!v.u)?s.exec(p=A[1]+p):null},i:Ge.HIGH,l(p,v,C){const A=r?+p[2]:void 0,L=p[0].replace(Zj,` -`).match(o);let P=!1;return{p:L.map(function(B,M){const H=c.exec(B)[0].length,D=new RegExp("^ {1,"+H+"}","gm"),Z=B.replace(D,"").replace(c,""),W=M===L.length-1,V=Z.indexOf(` +`));let B=Gk((o=E.props)==null?void 0:o.className,C.className),M=B?{className:B}:{};return G.cloneElement(E,Object.assign({},zb(E.props,t0(Hu(C,["ref"]))),P,A,qk(E.ref,A.ref),M))}return G.createElement(c,Object.assign({},Hu(C,["ref"]),c!==G.Fragment&&A,c!==G.Fragment&&P),E)}function qk(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}}function zb(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let s of e)for(let o in s)o.startsWith("on")&&typeof s[o]=="function"?(r[o]!=null||(r[o]=[]),r[o].push(s[o])):t[o]=s[o];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(s=>[s,void 0])));for(let s in r)Object.assign(t,{[s](o,...c){let p=r[s];for(let v of p){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;v(o,...c)}}});return t}function pi(e){var t;return Object.assign(G.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function t0(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Hu(e,t=[]){let r=Object.assign({},e);for(let s of t)s in r&&delete r[s];return r}function Qk(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let s=(t==null?void 0:t.getAttribute("disabled"))==="";return s&&Kk(r)?!1:s}function Kk(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Jk="div";var Ic=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ic||{});function eC(e,t){let{features:r=1,...s}=e,o={ref:t,"aria-hidden":(r&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return fi({ourProps:o,theirProps:s,slot:{},defaultTag:Jk,name:"Hidden"})}let bf=pi(eC),Fb=G.createContext(null);Fb.displayName="OpenClosedContext";var Oa=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Oa||{});function tC(){return G.useContext(Fb)}var Db=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Db||{});function h1(e,t){let r=G.useRef([]),s=Lr(e);G.useEffect(()=>{let o=[...r.current];for(let[c,p]of t.entries())if(r.current[c]!==p){let v=s(t,o);return r.current=t,v}},[s,...t])}function rC(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function iC(e,t,r){let s=Id(t);G.useEffect(()=>{function o(c){s.current(c)}return window.addEventListener(e,o,r),()=>window.removeEventListener(e,o,r)},[e,r])}var Ia=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ia||{});function nC(){let e=G.useRef(0);return iC("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Hb(){let e=G.useRef(!1);return Ln(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Fd(...e){return G.useMemo(()=>_b(...e),[...e])}function Bb(e,t,r,s){let o=Id(r);G.useEffect(()=>{e=e??window;function c(p){o.current(p)}return e.addEventListener(t,c,s),()=>e.removeEventListener(t,c,s)},[e,t,s])}function Vb(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let r of e.current)r.current instanceof HTMLElement&&t.add(r.current);return t}let sC="div";var Wb=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Wb||{});function aC(e,t){let r=G.useRef(null),s=Di(r,t),{initialFocus:o,containers:c,features:p=30,...v}=e;zd()||(p=1);let C=Fd(r);cC({ownerDocument:C},!!(p&16));let A=dC({ownerDocument:C,container:r,initialFocus:o},!!(p&2));uC({ownerDocument:C,container:r,containers:c,previousActiveElement:A},!!(p&8));let E=nC(),P=Lr(D=>{let Z=r.current;Z&&(W=>W())(()=>{bn(E.current,{[Ia.Forwards]:()=>{Gl(Z,In.First,{skipElements:[D.relatedTarget]})},[Ia.Backwards]:()=>{Gl(Z,In.Last,{skipElements:[D.relatedTarget]})}})})}),B=Dk(),M=G.useRef(!1),H={ref:s,onKeyDown(D){D.key=="Tab"&&(M.current=!0,B.requestAnimationFrame(()=>{M.current=!1}))},onBlur(D){let Z=Vb(c);r.current instanceof HTMLElement&&Z.add(r.current);let W=D.relatedTarget;W instanceof HTMLElement&&W.dataset.headlessuiFocusGuard!=="true"&&($b(Z,W)||(M.current?Gl(r.current,bn(E.current,{[Ia.Forwards]:()=>In.Next,[Ia.Backwards]:()=>In.Previous})|In.WrapAround,{relativeTo:D.target}):D.target instanceof HTMLElement&&Gn(D.target)))}};return ge.createElement(ge.Fragment,null,!!(p&4)&&ge.createElement(bf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:Ic.Focusable}),fi({ourProps:H,theirProps:v,defaultTag:sC,name:"FocusTrap"}),!!(p&4)&&ge.createElement(bf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:Ic.Focusable}))}let oC=pi(aC),Sa=Object.assign(oC,{features:Wb}),Ki=[];if(typeof window<"u"&&typeof document<"u"){let e=function(t){t.target instanceof HTMLElement&&t.target!==document.body&&Ki[0]!==t.target&&(Ki.unshift(t.target),Ki=Ki.filter(r=>r!=null&&r.isConnected),Ki.splice(10))};window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})}function lC(e=!0){let t=G.useRef(Ki.slice());return h1(([r],[s])=>{s===!0&&r===!1&&Wo(()=>{t.current.splice(0)}),s===!1&&r===!0&&(t.current=Ki.slice())},[e,Ki,t]),Lr(()=>{var r;return(r=t.current.find(s=>s!=null&&s.isConnected))!=null?r:null})}function cC({ownerDocument:e},t){let r=lC(t);h1(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Gn(r())},[t]);let s=G.useRef(!1);G.useEffect(()=>(s.current=!1,()=>{s.current=!0,Wo(()=>{s.current&&Gn(r())})}),[])}function dC({ownerDocument:e,container:t,initialFocus:r},s){let o=G.useRef(null),c=Hb();return h1(()=>{if(!s)return;let p=t.current;p&&Wo(()=>{if(!c.current)return;let v=e==null?void 0:e.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===v){o.current=v;return}}else if(p.contains(v)){o.current=v;return}r!=null&&r.current?Gn(r.current):Gl(p,In.First)===Mb.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[s]),o}function uC({ownerDocument:e,container:t,containers:r,previousActiveElement:s},o){let c=Hb();Bb(e==null?void 0:e.defaultView,"focus",p=>{if(!o||!c.current)return;let v=Vb(r);t.current instanceof HTMLElement&&v.add(t.current);let C=s.current;if(!C)return;let A=p.target;A&&A instanceof HTMLElement?$b(v,A)?(s.current=A,Gn(A)):(p.preventDefault(),p.stopPropagation(),Gn(C)):Gn(s.current)},!0)}function $b(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let Xb=G.createContext(!1);function hC(){return G.useContext(Xb)}function wf(e){return ge.createElement(Xb.Provider,{value:e.force},e.children)}function fC(e){let t=hC(),r=G.useContext(Yb),s=Fd(e),[o,c]=G.useState(()=>{if(!t&&r!==null||Li.isServer)return null;let p=s==null?void 0:s.getElementById("headlessui-portal-root");if(p)return p;if(s===null)return null;let v=s.createElement("div");return v.setAttribute("id","headlessui-portal-root"),s.body.appendChild(v)});return G.useEffect(()=>{o!==null&&(s!=null&&s.body.contains(o)||s==null||s.body.appendChild(o))},[o,s]),G.useEffect(()=>{t||r!==null&&c(r.current)},[r,c,t]),o}let pC=G.Fragment;function gC(e,t){let r=e,s=G.useRef(null),o=Di(Uk(E=>{s.current=E}),t),c=Fd(s),p=fC(s),[v]=G.useState(()=>{var E;return Li.isServer?null:(E=c==null?void 0:c.createElement("div"))!=null?E:null}),C=zd(),A=G.useRef(!1);return Ln(()=>{if(A.current=!1,!(!p||!v))return p.contains(v)||(v.setAttribute("data-headlessui-portal",""),p.appendChild(v)),()=>{A.current=!0,Wo(()=>{var E;A.current&&(!p||!v||(v instanceof Node&&p.contains(v)&&p.removeChild(v),p.childNodes.length<=0&&((E=p.parentElement)==null||E.removeChild(p))))})}},[p,v]),C?!p||!v?null:Xv.createPortal(fi({ourProps:{ref:o},theirProps:r,defaultTag:pC,name:"Portal"}),v):null}let mC=G.Fragment,Yb=G.createContext(null);function xC(e,t){let{target:r,...s}=e,o={ref:Di(t)};return ge.createElement(Yb.Provider,{value:r},fi({ourProps:o,theirProps:s,defaultTag:mC,name:"Popover.Group"}))}let vC=pi(gC),yC=pi(xC),kf=Object.assign(vC,{Group:yC}),Ub=G.createContext(null);function Gb(){let e=G.useContext(Ub);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Gb),t}return e}function bC(){let[e,t]=G.useState([]);return[e.length>0?e.join(" "):void 0,G.useMemo(()=>function(r){let s=Lr(c=>(t(p=>[...p,c]),()=>t(p=>{let v=p.slice(),C=v.indexOf(c);return C!==-1&&v.splice(C,1),v}))),o=G.useMemo(()=>({register:s,slot:r.slot,name:r.name,props:r.props}),[s,r.slot,r.name,r.props]);return ge.createElement(Ub.Provider,{value:o},r.children)},[t])]}let wC="p";function kC(e,t){let r=la(),{id:s=`headlessui-description-${r}`,...o}=e,c=Gb(),p=Di(t);Ln(()=>c.register(s),[s,c.register]);let v={ref:p,...c.props,id:s};return fi({ourProps:v,theirProps:o,slot:c.slot||{},defaultTag:wC,name:c.name||"Description"})}let CC=pi(kC),SC=Object.assign(CC,{}),f1=G.createContext(()=>{});f1.displayName="StackContext";var Cf=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Cf||{});function AC(){return G.useContext(f1)}function jC({children:e,onUpdate:t,type:r,element:s,enabled:o}){let c=AC(),p=Lr((...v)=>{t==null||t(...v),c(...v)});return Ln(()=>{let v=o===void 0||o===!0;return v&&p(0,r,s),()=>{v&&p(1,r,s)}},[p,r,s,o]),ge.createElement(f1.Provider,{value:p},e)}function NC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const EC=typeof Object.is=="function"?Object.is:NC,{useState:LC,useEffect:PC,useLayoutEffect:TC,useDebugValue:RC}=Qu;function _C(e,t,r){const s=t(),[{inst:o},c]=LC({inst:{value:s,getSnapshot:t}});return TC(()=>{o.value=s,o.getSnapshot=t,Bu(o)&&c({inst:o})},[e,s,t]),PC(()=>(Bu(o)&&c({inst:o}),e(()=>{Bu(o)&&c({inst:o})})),[e]),RC(s),s}function Bu(e){const t=e.getSnapshot,r=e.value;try{const s=t();return!EC(r,s)}catch{return!0}}function MC(e,t,r){return t()}const OC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",IC=!OC,zC=IC?MC:_C,FC="useSyncExternalStore"in Qu?(e=>e.useSyncExternalStore)(Qu):zC;function DC(e){return FC(e.subscribe,e.getSnapshot,e.getSnapshot)}function HC(e,t){let r=e(),s=new Set;return{getSnapshot(){return r},subscribe(o){return s.add(o),()=>s.delete(o)},dispatch(o,...c){let p=t[o].call(r,...c);p&&(r=p,s.forEach(v=>v()))}}}function BC(){let e;return{before({doc:t}){var r;let s=t.documentElement;e=((r=t.defaultView)!=null?r:window).innerWidth-s.clientWidth},after({doc:t,d:r}){let s=t.documentElement,o=s.clientWidth-s.offsetWidth,c=e-o;r.style(s,"paddingRight",`${c}px`)}}}function VC(){if(!rC())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:r,meta:s}){function o(p){return s.containers.flatMap(v=>v()).some(v=>v.contains(p))}r.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let c=null;r.addEventListener(t,"click",p=>{if(p.target instanceof HTMLElement)try{let v=p.target.closest("a");if(!v)return;let{hash:C}=new URL(v.href),A=t.querySelector(C);A&&!o(A)&&(c=A)}catch{}},!0),r.addEventListener(t,"touchmove",p=>{p.target instanceof HTMLElement&&!o(p.target)&&p.preventDefault()},{passive:!1}),r.add(()=>{window.scrollTo(0,window.pageYOffset+e),c&&c.isConnected&&(c.scrollIntoView({block:"nearest"}),c=null)})}}}function WC(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function $C(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Vn=HC(()=>new Map,{PUSH(e,t){var r;let s=(r=this.get(e))!=null?r:{doc:e,count:0,d:u1(),meta:new Set};return s.count++,s.meta.add(t),this.set(e,s),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let s={doc:e,d:t,meta:$C(r)},o=[VC(),BC(),WC()];o.forEach(({before:c})=>c==null?void 0:c(s)),o.forEach(({after:c})=>c==null?void 0:c(s))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Vn.subscribe(()=>{let e=Vn.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let s=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!s||!o&&s)&&Vn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Vn.dispatch("TEARDOWN",r)}});function XC(e,t,r){let s=DC(Vn),o=e?s.get(e):void 0,c=o?o.count>0:!1;return Ln(()=>{if(!(!e||!t))return Vn.dispatch("PUSH",e,r),()=>Vn.dispatch("POP",e,r)},[t,e]),c}let Vu=new Map,Aa=new Map;function r0(e,t=!0){Ln(()=>{var r;if(!t)return;let s=typeof e=="function"?e():e.current;if(!s)return;function o(){var p;if(!s)return;let v=(p=Aa.get(s))!=null?p:1;if(v===1?Aa.delete(s):Aa.set(s,v-1),v!==1)return;let C=Vu.get(s);C&&(C["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",C["aria-hidden"]),s.inert=C.inert,Vu.delete(s))}let c=(r=Aa.get(s))!=null?r:0;return Aa.set(s,c+1),c!==0||(Vu.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),o},[e,t])}var YC=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(YC||{}),UC=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(UC||{});let GC={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},zc=G.createContext(null);zc.displayName="DialogContext";function $o(e){let t=G.useContext(zc);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,$o),r}return t}function ZC(e,t,r=()=>[document.body]){XC(e,t,s=>{var o;return{containers:[...(o=s.containers)!=null?o:[],r]}})}function qC(e,t){return bn(t.type,GC,e,t)}let QC="div",KC=yf.RenderStrategy|yf.Static;function JC(e,t){let r=la(),{id:s=`headlessui-dialog-${r}`,open:o,onClose:c,initialFocus:p,__demoMode:v=!1,...C}=e,[A,E]=G.useState(0),P=tC();o===void 0&&P!==null&&(o=(P&Oa.Open)===Oa.Open);let B=G.useRef(null),M=Di(B,t),H=G.useRef(null),D=Fd(B),Z=e.hasOwnProperty("open")||P!==null,W=e.hasOwnProperty("onClose");if(!Z&&!W)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!Z)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!W)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof c!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${c}`);let V=o?0:1,[_,K]=G.useReducer(qC,{titleId:null,descriptionId:null,panelRef:G.createRef()}),ee=Lr(()=>c(!1)),X=Lr(He=>K({type:0,id:He})),Q=zd()?v?!1:V===0:!1,J=A>1,he=G.useContext(zc)!==null,oe=J?"parent":"leaf",Te=P!==null?(P&Oa.Closing)===Oa.Closing:!1,we=he||Te?!1:Q,Ee=G.useCallback(()=>{var He,Be;return(Be=Array.from((He=D==null?void 0:D.querySelectorAll("body > *"))!=null?He:[]).find(Me=>Me.id==="headlessui-portal-root"?!1:Me.contains(H.current)&&Me instanceof HTMLElement))!=null?Be:null},[H]);r0(Ee,we);let Fe=J?!0:Q,Re=G.useCallback(()=>{var He,Be;return(Be=Array.from((He=D==null?void 0:D.querySelectorAll("[data-headlessui-portal]"))!=null?He:[]).find(Me=>Me.contains(H.current)&&Me instanceof HTMLElement))!=null?Be:null},[H]);r0(Re,Fe);let qe=Lr(()=>{var He,Be;return[...Array.from((He=D==null?void 0:D.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))!=null?He:[]).filter(Me=>!(Me===document.body||Me===document.head||!(Me instanceof HTMLElement)||Me.contains(H.current)||_.panelRef.current&&Me.contains(_.panelRef.current))),(Be=_.panelRef.current)!=null?Be:B.current]});Yk(()=>qe(),ee,!(!Q||J));let de=!(J||V!==0);Bb(D==null?void 0:D.defaultView,"keydown",He=>{de&&(He.defaultPrevented||He.key===Db.Escape&&(He.preventDefault(),He.stopPropagation(),ee()))}),ZC(D,!(Te||V!==0||he),qe),G.useEffect(()=>{if(V!==0||!B.current)return;let He=new ResizeObserver(Be=>{for(let Me of Be){let Nt=Me.target.getBoundingClientRect();Nt.x===0&&Nt.y===0&&Nt.width===0&&Nt.height===0&&ee()}});return He.observe(B.current),()=>He.disconnect()},[V,B,ee]);let[le,Ae]=bC(),je=G.useMemo(()=>[{dialogState:V,close:ee,setTitleId:X},_],[V,_,ee,X]),ze=G.useMemo(()=>({open:V===0}),[V]),Ue={ref:M,id:s,role:"dialog","aria-modal":V===0?!0:void 0,"aria-labelledby":_.titleId,"aria-describedby":le};return ge.createElement(jC,{type:"Dialog",enabled:V===0,element:B,onUpdate:Lr((He,Be)=>{Be==="Dialog"&&bn(He,{[Cf.Add]:()=>E(Me=>Me+1),[Cf.Remove]:()=>E(Me=>Me-1)})})},ge.createElement(wf,{force:!0},ge.createElement(kf,null,ge.createElement(zc.Provider,{value:je},ge.createElement(kf.Group,{target:B},ge.createElement(wf,{force:!1},ge.createElement(Ae,{slot:ze,name:"Dialog.Description"},ge.createElement(Sa,{initialFocus:p,containers:qe,features:Q?bn(oe,{parent:Sa.features.RestoreFocus,leaf:Sa.features.All&~Sa.features.FocusLock}):Sa.features.None},fi({ourProps:Ue,theirProps:C,slot:ze,defaultTag:QC,features:KC,visible:V===0,name:"Dialog"})))))))),ge.createElement(bf,{features:Ic.Hidden,ref:H}))}let eS="div";function tS(e,t){let r=la(),{id:s=`headlessui-dialog-overlay-${r}`,...o}=e,[{dialogState:c,close:p}]=$o("Dialog.Overlay"),v=Di(t),C=Lr(E=>{if(E.target===E.currentTarget){if(Qk(E.currentTarget))return E.preventDefault();E.preventDefault(),E.stopPropagation(),p()}}),A=G.useMemo(()=>({open:c===0}),[c]);return fi({ourProps:{ref:v,id:s,"aria-hidden":!0,onClick:C},theirProps:o,slot:A,defaultTag:eS,name:"Dialog.Overlay"})}let rS="div";function iS(e,t){let r=la(),{id:s=`headlessui-dialog-backdrop-${r}`,...o}=e,[{dialogState:c},p]=$o("Dialog.Backdrop"),v=Di(t);G.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[p.panelRef]);let C=G.useMemo(()=>({open:c===0}),[c]);return ge.createElement(wf,{force:!0},ge.createElement(kf,null,fi({ourProps:{ref:v,id:s,"aria-hidden":!0},theirProps:o,slot:C,defaultTag:rS,name:"Dialog.Backdrop"})))}let nS="div";function sS(e,t){let r=la(),{id:s=`headlessui-dialog-panel-${r}`,...o}=e,[{dialogState:c},p]=$o("Dialog.Panel"),v=Di(t,p.panelRef),C=G.useMemo(()=>({open:c===0}),[c]),A=Lr(E=>{E.stopPropagation()});return fi({ourProps:{ref:v,id:s,onClick:A},theirProps:o,slot:C,defaultTag:nS,name:"Dialog.Panel"})}let aS="h2";function oS(e,t){let r=la(),{id:s=`headlessui-dialog-title-${r}`,...o}=e,[{dialogState:c,setTitleId:p}]=$o("Dialog.Title"),v=Di(t);G.useEffect(()=>(p(s),()=>p(null)),[s,p]);let C=G.useMemo(()=>({open:c===0}),[c]);return fi({ourProps:{ref:v,id:s},theirProps:o,slot:C,defaultTag:aS,name:"Dialog.Title"})}let lS=pi(JC),cS=pi(iS),dS=pi(sS),uS=pi(tS),hS=pi(oS),Fc=Object.assign(lS,{Backdrop:cS,Panel:dS,Overlay:uS,Title:hS,Description:SC});var Zb={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i0=ge.createContext&&ge.createContext(Zb),gn=function(){return gn=Object.assign||function(e){for(var t,r=1,s=arguments.length;r{const r=window.location.pathname,s=()=>{t&&t(!1)};return f.jsxs(f.Fragment,{children:[f.jsx("ul",{className:`flex flex-col gap-5 border-b border-stroke py-4 dark:border-strokedark ${r==="/admin"?"px-6":"sm:px-6"}`,children:f.jsx("li",{children:f.jsxs(yo,{to:"/account",onClick:s,className:"no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out text-captn-light-cream hover:text-captn-light-blue",children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M20.8656 8.86874C20.5219 8.49062 20.0406 8.28437 19.525 8.28437H19.4219C19.25 8.28437 19.1125 8.18124 19.0781 8.04374C19.0437 7.90624 18.975 7.80312 18.9406 7.66562C18.8719 7.52812 18.9406 7.39062 19.0437 7.28749L19.1125 7.21874C19.4906 6.87499 19.6969 6.39374 19.6969 5.87812C19.6969 5.36249 19.525 4.88124 19.1469 4.50312L17.8062 3.12812C17.0844 2.37187 15.8469 2.33749 15.0906 3.09374L14.9875 3.16249C14.8844 3.26562 14.7125 3.29999 14.5406 3.23124C14.4031 3.16249 14.2656 3.09374 14.0937 3.05937C13.9219 2.99062 13.8187 2.85312 13.8187 2.71562V2.54374C13.8187 1.47812 12.9594 0.618744 11.8937 0.618744H9.96875C9.45312 0.618744 8.97187 0.824994 8.62812 1.16874C8.25 1.54687 8.07812 2.02812 8.07812 2.50937V2.64687C8.07812 2.78437 7.975 2.92187 7.8375 2.99062C7.76875 3.02499 7.73437 3.02499 7.66562 3.05937C7.52812 3.12812 7.35625 3.09374 7.25312 2.99062L7.18437 2.88749C6.84062 2.50937 6.35937 2.30312 5.84375 2.30312C5.32812 2.30312 4.84687 2.47499 4.46875 2.85312L3.09375 4.19374C2.3375 4.91562 2.30312 6.15312 3.05937 6.90937L3.12812 7.01249C3.23125 7.11562 3.26562 7.28749 3.19687 7.39062C3.12812 7.52812 3.09375 7.63124 3.025 7.76874C2.95625 7.90624 2.85312 7.97499 2.68125 7.97499H2.57812C2.0625 7.97499 1.58125 8.14687 1.20312 8.52499C0.824996 8.86874 0.618746 9.34999 0.618746 9.86562L0.584371 11.7906C0.549996 12.8562 1.40937 13.7156 2.475 13.75H2.57812C2.75 13.75 2.8875 13.8531 2.92187 13.9906C2.99062 14.0937 3.05937 14.1969 3.09375 14.3344C3.12812 14.4719 3.09375 14.6094 2.99062 14.7125L2.92187 14.7812C2.54375 15.125 2.3375 15.6062 2.3375 16.1219C2.3375 16.6375 2.50937 17.1187 2.8875 17.4969L4.22812 18.8719C4.95 19.6281 6.1875 19.6625 6.94375 18.9062L7.04687 18.8375C7.15 18.7344 7.32187 18.7 7.49375 18.7687C7.63125 18.8375 7.76875 18.9062 7.94062 18.9406C8.1125 19.0094 8.21562 19.1469 8.21562 19.2844V19.4219C8.21562 20.4875 9.075 21.3469 10.1406 21.3469H12.0656C13.1312 21.3469 13.9906 20.4875 13.9906 19.4219V19.2844C13.9906 19.1469 14.0937 19.0094 14.2312 18.9406C14.3 18.9062 14.3344 18.9062 14.4031 18.8719C14.575 18.8031 14.7125 18.8375 14.8156 18.9406L14.8844 19.0437C15.2281 19.4219 15.7094 19.6281 16.225 19.6281C16.7406 19.6281 17.2219 19.4562 17.6 19.0781L18.975 17.7375C19.7312 17.0156 19.7656 15.7781 19.0094 15.0219L18.9406 14.9187C18.8375 14.8156 18.8031 14.6437 18.8719 14.5406C18.9406 14.4031 18.975 14.3 19.0437 14.1625C19.1125 14.025 19.25 13.9562 19.3875 13.9562H19.4906H19.525C20.5562 13.9562 21.4156 13.1312 21.45 12.0656L21.4844 10.1406C21.4156 9.72812 21.2094 9.21249 20.8656 8.86874ZM19.8344 12.1C19.8344 12.3062 19.6625 12.4781 19.4562 12.4781H19.3531H19.3187C18.5281 12.4781 17.8062 12.9594 17.5312 13.6469C17.4969 13.75 17.4281 13.8531 17.3937 13.9562C17.0844 14.6437 17.2219 15.5031 17.7719 16.0531L17.8406 16.1562C17.9781 16.2937 17.9781 16.5344 17.8406 16.6719L16.4656 18.0125C16.3625 18.1156 16.2594 18.1156 16.1906 18.1156C16.1219 18.1156 16.0187 18.1156 15.9156 18.0125L15.8469 17.9094C15.2969 17.325 14.4719 17.1531 13.7156 17.4969L13.5781 17.5656C12.8219 17.875 12.3406 18.5625 12.3406 19.3531V19.4906C12.3406 19.6969 12.1687 19.8687 11.9625 19.8687H10.0375C9.83125 19.8687 9.65937 19.6969 9.65937 19.4906V19.3531C9.65937 18.5625 9.17812 17.8406 8.42187 17.5656C8.31875 17.5312 8.18125 17.4625 8.07812 17.4281C7.80312 17.2906 7.52812 17.2562 7.25312 17.2562C6.77187 17.2562 6.29062 17.4281 5.9125 17.8062L5.84375 17.8406C5.70625 17.9781 5.46562 17.9781 5.32812 17.8406L3.9875 16.4656C3.88437 16.3625 3.88437 16.2594 3.88437 16.1906C3.88437 16.1219 3.88437 16.0187 3.9875 15.9156L4.05625 15.8469C4.64062 15.2969 4.8125 14.4375 4.50312 13.75C4.46875 13.6469 4.43437 13.5437 4.36562 13.4406C4.09062 12.7187 3.40312 12.2031 2.6125 12.2031H2.50937C2.30312 12.2031 2.13125 12.0312 2.13125 11.825L2.16562 9.89999C2.16562 9.76249 2.23437 9.69374 2.26875 9.62499C2.30312 9.59062 2.40625 9.52187 2.54375 9.52187H2.64687C3.4375 9.55624 4.15937 9.07499 4.46875 8.35312C4.50312 8.24999 4.57187 8.14687 4.60625 8.04374C4.91562 7.35624 4.77812 6.49687 4.22812 5.94687L4.15937 5.84374C4.02187 5.70624 4.02187 5.46562 4.15937 5.32812L5.53437 3.98749C5.6375 3.88437 5.74062 3.88437 5.80937 3.88437C5.87812 3.88437 5.98125 3.88437 6.08437 3.98749L6.15312 4.09062C6.70312 4.67499 7.52812 4.84687 8.28437 4.53749L8.42187 4.46874C9.17812 4.15937 9.65937 3.47187 9.65937 2.68124V2.54374C9.65937 2.40624 9.72812 2.33749 9.7625 2.26874C9.79687 2.19999 9.9 2.16562 10.0375 2.16562H11.9625C12.1687 2.16562 12.3406 2.33749 12.3406 2.54374V2.68124C12.3406 3.47187 12.8219 4.19374 13.5781 4.46874C13.6812 4.50312 13.8187 4.57187 13.9219 4.60624C14.6437 4.94999 15.5031 4.81249 16.0875 4.26249L16.1906 4.19374C16.3281 4.05624 16.5687 4.05624 16.7062 4.19374L18.0469 5.56874C18.15 5.67187 18.15 5.77499 18.15 5.84374C18.15 5.91249 18.1156 6.01562 18.0469 6.11874L17.9781 6.18749C17.3594 6.70312 17.1875 7.56249 17.4625 8.24999C17.4969 8.35312 17.5312 8.45624 17.6 8.55937C17.875 9.28124 18.5625 9.79687 19.3531 9.79687H19.4562C19.5937 9.79687 19.6625 9.86562 19.7312 9.89999C19.8 9.93437 19.8344 10.0375 19.8344 10.175V12.1Z",fill:""}),f.jsx("path",{d:"M11 6.32498C8.42189 6.32498 6.32501 8.42186 6.32501 11C6.32501 13.5781 8.42189 15.675 11 15.675C13.5781 15.675 15.675 13.5781 15.675 11C15.675 8.42186 13.5781 6.32498 11 6.32498ZM11 14.1281C9.28126 14.1281 7.87189 12.7187 7.87189 11C7.87189 9.28123 9.28126 7.87186 11 7.87186C12.7188 7.87186 14.1281 9.28123 14.1281 11C14.1281 12.7187 12.7188 14.1281 11 14.1281Z",fill:""})]}),"Account settings"]})})}),!!e&&e.isAdmin&&f.jsx("ul",{className:`flex flex-col gap-5 border-b border-stroke py-4 dark:border-strokedark ${r==="/admin"?"px-6":"sm:px-6"}`,children:f.jsx("li",{className:"flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out hover:text-captn-light-blue",children:f.jsxs(yo,{to:"/admin",onClick:s,className:"no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out text-captn-light-cream hover:text-captn-light-blue",children:[f.jsx(xS,{size:"1.1rem"}),"Admin dashboard"]})})}),f.jsxs("button",{onClick:()=>Rb(),className:`flex items-center gap-3.5 py-4 text-sm font-medium duration-300 ease-in-out hover:text-captn-light-blue ${r==="/admin"?"px-6":"sm:px-6"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M15.5375 0.618744H11.6531C10.7594 0.618744 10.0031 1.37499 10.0031 2.26874V4.64062C10.0031 5.05312 10.3469 5.39687 10.7594 5.39687C11.1719 5.39687 11.55 5.05312 11.55 4.64062V2.23437C11.55 2.16562 11.5844 2.13124 11.6531 2.13124H15.5375C16.3625 2.13124 17.0156 2.78437 17.0156 3.60937V18.3562C17.0156 19.1812 16.3625 19.8344 15.5375 19.8344H11.6531C11.5844 19.8344 11.55 19.8 11.55 19.7312V17.3594C11.55 16.9469 11.2062 16.6031 10.7594 16.6031C10.3125 16.6031 10.0031 16.9469 10.0031 17.3594V19.7312C10.0031 20.625 10.7594 21.3812 11.6531 21.3812H15.5375C17.2219 21.3812 18.5625 20.0062 18.5625 18.3562V3.64374C18.5625 1.95937 17.1875 0.618744 15.5375 0.618744Z",fill:""}),f.jsx("path",{d:"M6.05001 11.7563H12.2031C12.6156 11.7563 12.9594 11.4125 12.9594 11C12.9594 10.5875 12.6156 10.2438 12.2031 10.2438H6.08439L8.21564 8.07813C8.52501 7.76875 8.52501 7.2875 8.21564 6.97812C7.90626 6.66875 7.42501 6.66875 7.11564 6.97812L3.67814 10.4844C3.36876 10.7938 3.36876 11.275 3.67814 11.5844L7.11564 15.0906C7.25314 15.2281 7.45939 15.3312 7.66564 15.3312C7.87189 15.3312 8.04376 15.2625 8.21564 15.125C8.52501 14.8156 8.52501 14.3344 8.21564 14.025L6.05001 11.7563Z",fill:""})]}),"Log out"]})]})},m1=({user:e})=>{const[t,r]=G.useState(!1),s=G.useRef(null),o=G.useRef(null),c=()=>r(p=>!p);return G.useEffect(()=>{const p=({target:v})=>{o.current&&(!t||o.current.contains(v)||s.current.contains(v)||r(!1))};return document.addEventListener("click",p),()=>document.removeEventListener("click",p)}),G.useEffect(()=>{const p=({keyCode:v})=>{!t||v!==27||r(!1)};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}),f.jsxs("div",{className:"relative",children:[f.jsxs("button",{ref:s,onClick:c,className:"flex items-center gap-4 duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue",children:[f.jsx("span",{className:"hidden text-right lg:block",children:f.jsx("span",{className:"block text-sm font-medium dark:text-captn-light-cream",children:e.username})}),f.jsx(mS,{size:"1.1rem",className:"ml-1 mt-[0.1rem] dark:text-captn-light-cream"}),f.jsx("svg",{className:`hidden fill-current dark:fill-white sm:block ${t?"rotate-180":""}`,width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.410765 0.910734C0.736202 0.585297 1.26384 0.585297 1.58928 0.910734L6.00002 5.32148L10.4108 0.910734C10.7362 0.585297 11.2638 0.585297 11.5893 0.910734C11.9147 1.23617 11.9147 1.76381 11.5893 2.08924L6.58928 7.08924C6.26384 7.41468 5.7362 7.41468 5.41077 7.08924L0.410765 2.08924C0.0853277 1.76381 0.0853277 1.23617 0.410765 0.910734Z",fill:""})})]}),f.jsx("div",{ref:o,className:`absolute right-0 mt-4 flex w-62.5 flex-col rounded-sm border border-stroke bg-captn-dark-blue shadow-default dark:border-strokedark dark:bg-boxdark text-captn-light-cream ${t===!0?"block":"hidden"}`,children:f.jsx(g1,{user:e,setMobileMenuOpen:c})})]})};var Je;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{const c={};for(const p of o)c[p]=p;return c},e.getValidEnumValues=o=>{const c=e.objectKeys(o).filter(v=>typeof o[o[v]]!="number"),p={};for(const v of c)p[v]=o[v];return e.objectValues(p)},e.objectValues=o=>e.objectKeys(o).map(function(c){return o[c]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const c=[];for(const p in o)Object.prototype.hasOwnProperty.call(o,p)&&c.push(p);return c},e.find=(o,c)=>{for(const p of o)if(c(p))return p},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function s(o,c=" | "){return o.map(p=>typeof p=="string"?`'${p}'`:p).join(c)}e.joinValues=s,e.jsonStringifyReplacer=(o,c)=>typeof c=="bigint"?c.toString():c})(Je||(Je={}));var Sf;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Sf||(Sf={}));const ve=Je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ji=e=>{switch(typeof e){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return isNaN(e)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(e)?ve.array:e===null?ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ve.promise:typeof Map<"u"&&e instanceof Map?ve.map:typeof Set<"u"&&e instanceof Set?ve.set:typeof Date<"u"&&e instanceof Date?ve.date:ve.object;default:return ve.unknown}},fe=Je.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),vS=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ur extends Error{constructor(t){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(c){return c.message},s={_errors:[]},o=c=>{for(const p of c.issues)if(p.code==="invalid_union")p.unionErrors.map(o);else if(p.code==="invalid_return_type")o(p.returnTypeError);else if(p.code==="invalid_arguments")o(p.argumentsError);else if(p.path.length===0)s._errors.push(r(p));else{let v=s,C=0;for(;Cr.message){const r={},s=[];for(const o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):s.push(t(o));return{formErrors:s,fieldErrors:r}}get formErrors(){return this.flatten()}}Ur.create=e=>new Ur(e);const bo=(e,t)=>{let r;switch(e.code){case fe.invalid_type:e.received===ve.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case fe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Je.jsonStringifyReplacer)}`;break;case fe.unrecognized_keys:r=`Unrecognized key(s) in object: ${Je.joinValues(e.keys,", ")}`;break;case fe.invalid_union:r="Invalid input";break;case fe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Je.joinValues(e.options)}`;break;case fe.invalid_enum_value:r=`Invalid enum value. Expected ${Je.joinValues(e.options)}, received '${e.received}'`;break;case fe.invalid_arguments:r="Invalid function arguments";break;case fe.invalid_return_type:r="Invalid function return type";break;case fe.invalid_date:r="Invalid date";break;case fe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Je.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case fe.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case fe.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case fe.custom:r="Invalid input";break;case fe.invalid_intersection_types:r="Intersection results could not be merged";break;case fe.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case fe.not_finite:r="Number must be finite";break;default:r=t.defaultError,Je.assertNever(e)}return{message:r}};let Jb=bo;function yS(e){Jb=e}function Hc(){return Jb}const Bc=e=>{const{data:t,path:r,errorMaps:s,issueData:o}=e,c=[...r,...o.path||[]],p={...o,path:c};let v="";const C=s.filter(A=>!!A).slice().reverse();for(const A of C)v=A(p,{data:t,defaultError:v}).message;return{...o,path:c,message:o.message||v}},bS=[];function ke(e,t){const r=Bc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Hc(),bo].filter(s=>!!s)});e.common.issues.push(r)}class Gt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const s=[];for(const o of r){if(o.status==="aborted")return De;o.status==="dirty"&&t.dirty(),s.push(o.value)}return{status:t.value,value:s}}static async mergeObjectAsync(t,r){const s=[];for(const o of r)s.push({key:await o.key,value:await o.value});return Gt.mergeObjectSync(t,s)}static mergeObjectSync(t,r){const s={};for(const o of r){const{key:c,value:p}=o;if(c.status==="aborted"||p.status==="aborted")return De;c.status==="dirty"&&t.dirty(),p.status==="dirty"&&t.dirty(),c.value!=="__proto__"&&(typeof p.value<"u"||o.alwaysSet)&&(s[c.value]=p.value)}return{status:t.value,value:s}}}const De=Object.freeze({status:"aborted"}),e2=e=>({status:"dirty",value:e}),rr=e=>({status:"valid",value:e}),Af=e=>e.status==="aborted",jf=e=>e.status==="dirty",wo=e=>e.status==="valid",Vc=e=>typeof Promise<"u"&&e instanceof Promise;var _e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_e||(_e={}));class li{constructor(t,r,s,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=s,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const n0=(e,t)=>{if(wo(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Ur(e.common.issues);return this._error=r,this._error}}};function $e(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:s,description:o}=e;if(t&&(r||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(p,v)=>p.code!=="invalid_type"?{message:v.defaultError}:typeof v.data>"u"?{message:s??v.defaultError}:{message:r??v.defaultError},description:o}}class Xe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Ji(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ji(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Gt,ctx:{common:t.parent.common,data:t.data,parsedType:Ji(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Vc(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const s=this.safeParse(t,r);if(s.success)return s.data;throw s.error}safeParse(t,r){var s;const o={common:{issues:[],async:(s=r==null?void 0:r.async)!==null&&s!==void 0?s:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ji(t)},c=this._parseSync({data:t,path:o.path,parent:o});return n0(o,c)}async parseAsync(t,r){const s=await this.safeParseAsync(t,r);if(s.success)return s.data;throw s.error}async safeParseAsync(t,r){const s={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ji(t)},o=this._parse({data:t,path:s.path,parent:s}),c=await(Vc(o)?o:Promise.resolve(o));return n0(s,c)}refine(t,r){const s=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,c)=>{const p=t(o),v=()=>c.addIssue({code:fe.custom,...s(o)});return typeof Promise<"u"&&p instanceof Promise?p.then(C=>C?!0:(v(),!1)):p?!0:(v(),!1)})}refinement(t,r){return this._refinement((s,o)=>t(s)?!0:(o.addIssue(typeof r=="function"?r(s,o):r),!1))}_refinement(t){return new qr({schema:this,typeName:Ie.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Pi.create(this,this._def)}nullable(){return ns.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Gr.create(this,this._def)}promise(){return Js.create(this,this._def)}or(t){return Ao.create([this,t],this._def)}and(t){return jo.create(this,t,this._def)}transform(t){return new qr({...$e(this._def),schema:this,typeName:Ie.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new To({...$e(this._def),innerType:this,defaultValue:r,typeName:Ie.ZodDefault})}brand(){return new r2({typeName:Ie.ZodBranded,type:this,...$e(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Yc({...$e(this._def),innerType:this,catchValue:r,typeName:Ie.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Xo.create(this,t)}readonly(){return Gc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const wS=/^c[^\s-]{8,}$/i,kS=/^[a-z][a-z0-9]*$/,CS=/^[0-9A-HJKMNP-TV-Z]{26}$/,SS=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,AS=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,jS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wu;const NS=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,ES=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,LS=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function PS(e,t){return!!((t==="v4"||!t)&&NS.test(e)||(t==="v6"||!t)&&ES.test(e))}class Wr extends Xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ve.string){const c=this._getOrReturnCtx(t);return ke(c,{code:fe.invalid_type,expected:ve.string,received:c.parsedType}),De}const s=new Gt;let o;for(const c of this._def.checks)if(c.kind==="min")t.data.lengthc.value&&(o=this._getOrReturnCtx(t,o),ke(o,{code:fe.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),s.dirty());else if(c.kind==="length"){const p=t.data.length>c.value,v=t.data.lengtht.test(o),{validation:r,code:fe.invalid_string,..._e.errToObj(s)})}_addCheck(t){return new Wr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._e.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._e.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._e.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._e.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._e.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._e.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._e.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._e.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,..._e.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._e.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._e.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._e.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._e.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._e.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._e.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._e.errToObj(r)})}nonempty(t){return this.min(1,_e.errToObj(t))}trim(){return new Wr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Wr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Wr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new Wr({checks:[],typeName:Ie.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};function TS(e,t){const r=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,o=r>s?r:s,c=parseInt(e.toFixed(o).replace(".","")),p=parseInt(t.toFixed(o).replace(".",""));return c%p/Math.pow(10,o)}class wn extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ve.number){const c=this._getOrReturnCtx(t);return ke(c,{code:fe.invalid_type,expected:ve.number,received:c.parsedType}),De}let s;const o=new Gt;for(const c of this._def.checks)c.kind==="int"?Je.isInteger(t.data)||(s=this._getOrReturnCtx(t,s),ke(s,{code:fe.invalid_type,expected:"integer",received:"float",message:c.message}),o.dirty()):c.kind==="min"?(c.inclusive?t.datac.value:t.data>=c.value)&&(s=this._getOrReturnCtx(t,s),ke(s,{code:fe.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),o.dirty()):c.kind==="multipleOf"?TS(t.data,c.value)!==0&&(s=this._getOrReturnCtx(t,s),ke(s,{code:fe.not_multiple_of,multipleOf:c.value,message:c.message}),o.dirty()):c.kind==="finite"?Number.isFinite(t.data)||(s=this._getOrReturnCtx(t,s),ke(s,{code:fe.not_finite,message:c.message}),o.dirty()):Je.assertNever(c);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_e.toString(r))}setLimit(t,r,s,o){return new wn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:_e.toString(o)}]})}_addCheck(t){return new wn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_e.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_e.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&Je.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(r===null||s.value>r)&&(r=s.value):s.kind==="max"&&(t===null||s.valuenew wn({checks:[],typeName:Ie.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class kn extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ve.bigint){const c=this._getOrReturnCtx(t);return ke(c,{code:fe.invalid_type,expected:ve.bigint,received:c.parsedType}),De}let s;const o=new Gt;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?t.datac.value:t.data>=c.value)&&(s=this._getOrReturnCtx(t,s),ke(s,{code:fe.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),o.dirty()):c.kind==="multipleOf"?t.data%c.value!==BigInt(0)&&(s=this._getOrReturnCtx(t,s),ke(s,{code:fe.not_multiple_of,multipleOf:c.value,message:c.message}),o.dirty()):Je.assertNever(c);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_e.toString(r))}setLimit(t,r,s,o){return new kn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:_e.toString(o)}]})}_addCheck(t){return new kn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_e.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new kn({checks:[],typeName:Ie.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};class ko extends Xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ve.boolean){const s=this._getOrReturnCtx(t);return ke(s,{code:fe.invalid_type,expected:ve.boolean,received:s.parsedType}),De}return rr(t.data)}}ko.create=e=>new ko({typeName:Ie.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class rs extends Xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ve.date){const c=this._getOrReturnCtx(t);return ke(c,{code:fe.invalid_type,expected:ve.date,received:c.parsedType}),De}if(isNaN(t.data.getTime())){const c=this._getOrReturnCtx(t);return ke(c,{code:fe.invalid_date}),De}const s=new Gt;let o;for(const c of this._def.checks)c.kind==="min"?t.data.getTime()c.value&&(o=this._getOrReturnCtx(t,o),ke(o,{code:fe.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),s.dirty()):Je.assertNever(c);return{status:s.value,value:new Date(t.data.getTime())}}_addCheck(t){return new rs({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_e.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_e.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew rs({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ie.ZodDate,...$e(e)});class Wc extends Xe{_parse(t){if(this._getType(t)!==ve.symbol){const s=this._getOrReturnCtx(t);return ke(s,{code:fe.invalid_type,expected:ve.symbol,received:s.parsedType}),De}return rr(t.data)}}Wc.create=e=>new Wc({typeName:Ie.ZodSymbol,...$e(e)});class Co extends Xe{_parse(t){if(this._getType(t)!==ve.undefined){const s=this._getOrReturnCtx(t);return ke(s,{code:fe.invalid_type,expected:ve.undefined,received:s.parsedType}),De}return rr(t.data)}}Co.create=e=>new Co({typeName:Ie.ZodUndefined,...$e(e)});class So extends Xe{_parse(t){if(this._getType(t)!==ve.null){const s=this._getOrReturnCtx(t);return ke(s,{code:fe.invalid_type,expected:ve.null,received:s.parsedType}),De}return rr(t.data)}}So.create=e=>new So({typeName:Ie.ZodNull,...$e(e)});class Ks extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return rr(t.data)}}Ks.create=e=>new Ks({typeName:Ie.ZodAny,...$e(e)});class Zn extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return rr(t.data)}}Zn.create=e=>new Zn({typeName:Ie.ZodUnknown,...$e(e)});class Ii extends Xe{_parse(t){const r=this._getOrReturnCtx(t);return ke(r,{code:fe.invalid_type,expected:ve.never,received:r.parsedType}),De}}Ii.create=e=>new Ii({typeName:Ie.ZodNever,...$e(e)});class $c extends Xe{_parse(t){if(this._getType(t)!==ve.undefined){const s=this._getOrReturnCtx(t);return ke(s,{code:fe.invalid_type,expected:ve.void,received:s.parsedType}),De}return rr(t.data)}}$c.create=e=>new $c({typeName:Ie.ZodVoid,...$e(e)});class Gr extends Xe{_parse(t){const{ctx:r,status:s}=this._processInputParams(t),o=this._def;if(r.parsedType!==ve.array)return ke(r,{code:fe.invalid_type,expected:ve.array,received:r.parsedType}),De;if(o.exactLength!==null){const p=r.data.length>o.exactLength.value,v=r.data.lengtho.maxLength.value&&(ke(r,{code:fe.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),s.dirty()),r.common.async)return Promise.all([...r.data].map((p,v)=>o.type._parseAsync(new li(r,p,r.path,v)))).then(p=>Gt.mergeArray(s,p));const c=[...r.data].map((p,v)=>o.type._parseSync(new li(r,p,r.path,v)));return Gt.mergeArray(s,c)}get element(){return this._def.type}min(t,r){return new Gr({...this._def,minLength:{value:t,message:_e.toString(r)}})}max(t,r){return new Gr({...this._def,maxLength:{value:t,message:_e.toString(r)}})}length(t,r){return new Gr({...this._def,exactLength:{value:t,message:_e.toString(r)}})}nonempty(t){return this.min(1,t)}}Gr.create=(e,t)=>new Gr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ie.ZodArray,...$e(t)});function ms(e){if(e instanceof ft){const t={};for(const r in e.shape){const s=e.shape[r];t[r]=Pi.create(ms(s))}return new ft({...e._def,shape:()=>t})}else return e instanceof Gr?new Gr({...e._def,type:ms(e.element)}):e instanceof Pi?Pi.create(ms(e.unwrap())):e instanceof ns?ns.create(ms(e.unwrap())):e instanceof ci?ci.create(e.items.map(t=>ms(t))):e}class ft extends Xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Je.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==ve.object){const A=this._getOrReturnCtx(t);return ke(A,{code:fe.invalid_type,expected:ve.object,received:A.parsedType}),De}const{status:s,ctx:o}=this._processInputParams(t),{shape:c,keys:p}=this._getCached(),v=[];if(!(this._def.catchall instanceof Ii&&this._def.unknownKeys==="strip"))for(const A in o.data)p.includes(A)||v.push(A);const C=[];for(const A of p){const E=c[A],P=o.data[A];C.push({key:{status:"valid",value:A},value:E._parse(new li(o,P,o.path,A)),alwaysSet:A in o.data})}if(this._def.catchall instanceof Ii){const A=this._def.unknownKeys;if(A==="passthrough")for(const E of v)C.push({key:{status:"valid",value:E},value:{status:"valid",value:o.data[E]}});else if(A==="strict")v.length>0&&(ke(o,{code:fe.unrecognized_keys,keys:v}),s.dirty());else if(A!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const A=this._def.catchall;for(const E of v){const P=o.data[E];C.push({key:{status:"valid",value:E},value:A._parse(new li(o,P,o.path,E)),alwaysSet:E in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const A=[];for(const E of C){const P=await E.key;A.push({key:P,value:await E.value,alwaysSet:E.alwaysSet})}return A}).then(A=>Gt.mergeObjectSync(s,A)):Gt.mergeObjectSync(s,C)}get shape(){return this._def.shape()}strict(t){return _e.errToObj,new ft({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,s)=>{var o,c,p,v;const C=(p=(c=(o=this._def).errorMap)===null||c===void 0?void 0:c.call(o,r,s).message)!==null&&p!==void 0?p:s.defaultError;return r.code==="unrecognized_keys"?{message:(v=_e.errToObj(t).message)!==null&&v!==void 0?v:C}:{message:C}}}:{}})}strip(){return new ft({...this._def,unknownKeys:"strip"})}passthrough(){return new ft({...this._def,unknownKeys:"passthrough"})}extend(t){return new ft({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ft({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ie.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new ft({...this._def,catchall:t})}pick(t){const r={};return Je.objectKeys(t).forEach(s=>{t[s]&&this.shape[s]&&(r[s]=this.shape[s])}),new ft({...this._def,shape:()=>r})}omit(t){const r={};return Je.objectKeys(this.shape).forEach(s=>{t[s]||(r[s]=this.shape[s])}),new ft({...this._def,shape:()=>r})}deepPartial(){return ms(this)}partial(t){const r={};return Je.objectKeys(this.shape).forEach(s=>{const o=this.shape[s];t&&!t[s]?r[s]=o:r[s]=o.optional()}),new ft({...this._def,shape:()=>r})}required(t){const r={};return Je.objectKeys(this.shape).forEach(s=>{if(t&&!t[s])r[s]=this.shape[s];else{let c=this.shape[s];for(;c instanceof Pi;)c=c._def.innerType;r[s]=c}}),new ft({...this._def,shape:()=>r})}keyof(){return t2(Je.objectKeys(this.shape))}}ft.create=(e,t)=>new ft({shape:()=>e,unknownKeys:"strip",catchall:Ii.create(),typeName:Ie.ZodObject,...$e(t)});ft.strictCreate=(e,t)=>new ft({shape:()=>e,unknownKeys:"strict",catchall:Ii.create(),typeName:Ie.ZodObject,...$e(t)});ft.lazycreate=(e,t)=>new ft({shape:e,unknownKeys:"strip",catchall:Ii.create(),typeName:Ie.ZodObject,...$e(t)});class Ao extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t),s=this._def.options;function o(c){for(const v of c)if(v.result.status==="valid")return v.result;for(const v of c)if(v.result.status==="dirty")return r.common.issues.push(...v.ctx.common.issues),v.result;const p=c.map(v=>new Ur(v.ctx.common.issues));return ke(r,{code:fe.invalid_union,unionErrors:p}),De}if(r.common.async)return Promise.all(s.map(async c=>{const p={...r,common:{...r.common,issues:[]},parent:null};return{result:await c._parseAsync({data:r.data,path:r.path,parent:p}),ctx:p}})).then(o);{let c;const p=[];for(const C of s){const A={...r,common:{...r.common,issues:[]},parent:null},E=C._parseSync({data:r.data,path:r.path,parent:A});if(E.status==="valid")return E;E.status==="dirty"&&!c&&(c={result:E,ctx:A}),A.common.issues.length&&p.push(A.common.issues)}if(c)return r.common.issues.push(...c.ctx.common.issues),c.result;const v=p.map(C=>new Ur(C));return ke(r,{code:fe.invalid_union,unionErrors:v}),De}}get options(){return this._def.options}}Ao.create=(e,t)=>new Ao({options:e,typeName:Ie.ZodUnion,...$e(t)});const Zl=e=>e instanceof Eo?Zl(e.schema):e instanceof qr?Zl(e.innerType()):e instanceof Lo?[e.value]:e instanceof Cn?e.options:e instanceof Po?Object.keys(e.enum):e instanceof To?Zl(e._def.innerType):e instanceof Co?[void 0]:e instanceof So?[null]:null;class Dd extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.object)return ke(r,{code:fe.invalid_type,expected:ve.object,received:r.parsedType}),De;const s=this.discriminator,o=r.data[s],c=this.optionsMap.get(o);return c?r.common.async?c._parseAsync({data:r.data,path:r.path,parent:r}):c._parseSync({data:r.data,path:r.path,parent:r}):(ke(r,{code:fe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),De)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,s){const o=new Map;for(const c of r){const p=Zl(c.shape[t]);if(!p)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const v of p){if(o.has(v))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(v)}`);o.set(v,c)}}return new Dd({typeName:Ie.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...$e(s)})}}function Nf(e,t){const r=Ji(e),s=Ji(t);if(e===t)return{valid:!0,data:e};if(r===ve.object&&s===ve.object){const o=Je.objectKeys(t),c=Je.objectKeys(e).filter(v=>o.indexOf(v)!==-1),p={...e,...t};for(const v of c){const C=Nf(e[v],t[v]);if(!C.valid)return{valid:!1};p[v]=C.data}return{valid:!0,data:p}}else if(r===ve.array&&s===ve.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let c=0;c{if(Af(c)||Af(p))return De;const v=Nf(c.value,p.value);return v.valid?((jf(c)||jf(p))&&r.dirty(),{status:r.value,value:v.data}):(ke(s,{code:fe.invalid_intersection_types}),De)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([c,p])=>o(c,p)):o(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}jo.create=(e,t,r)=>new jo({left:e,right:t,typeName:Ie.ZodIntersection,...$e(r)});class ci extends Xe{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ve.array)return ke(s,{code:fe.invalid_type,expected:ve.array,received:s.parsedType}),De;if(s.data.lengththis._def.items.length&&(ke(s,{code:fe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const c=[...s.data].map((p,v)=>{const C=this._def.items[v]||this._def.rest;return C?C._parse(new li(s,p,s.path,v)):null}).filter(p=>!!p);return s.common.async?Promise.all(c).then(p=>Gt.mergeArray(r,p)):Gt.mergeArray(r,c)}get items(){return this._def.items}rest(t){return new ci({...this._def,rest:t})}}ci.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ci({items:e,typeName:Ie.ZodTuple,rest:null,...$e(t)})};class No extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ve.object)return ke(s,{code:fe.invalid_type,expected:ve.object,received:s.parsedType}),De;const o=[],c=this._def.keyType,p=this._def.valueType;for(const v in s.data)o.push({key:c._parse(new li(s,v,s.path,v)),value:p._parse(new li(s,s.data[v],s.path,v))});return s.common.async?Gt.mergeObjectAsync(r,o):Gt.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,s){return r instanceof Xe?new No({keyType:t,valueType:r,typeName:Ie.ZodRecord,...$e(s)}):new No({keyType:Wr.create(),valueType:t,typeName:Ie.ZodRecord,...$e(r)})}}class Xc extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ve.map)return ke(s,{code:fe.invalid_type,expected:ve.map,received:s.parsedType}),De;const o=this._def.keyType,c=this._def.valueType,p=[...s.data.entries()].map(([v,C],A)=>({key:o._parse(new li(s,v,s.path,[A,"key"])),value:c._parse(new li(s,C,s.path,[A,"value"]))}));if(s.common.async){const v=new Map;return Promise.resolve().then(async()=>{for(const C of p){const A=await C.key,E=await C.value;if(A.status==="aborted"||E.status==="aborted")return De;(A.status==="dirty"||E.status==="dirty")&&r.dirty(),v.set(A.value,E.value)}return{status:r.value,value:v}})}else{const v=new Map;for(const C of p){const A=C.key,E=C.value;if(A.status==="aborted"||E.status==="aborted")return De;(A.status==="dirty"||E.status==="dirty")&&r.dirty(),v.set(A.value,E.value)}return{status:r.value,value:v}}}}Xc.create=(e,t,r)=>new Xc({valueType:t,keyType:e,typeName:Ie.ZodMap,...$e(r)});class is extends Xe{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ve.set)return ke(s,{code:fe.invalid_type,expected:ve.set,received:s.parsedType}),De;const o=this._def;o.minSize!==null&&s.data.sizeo.maxSize.value&&(ke(s,{code:fe.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const c=this._def.valueType;function p(C){const A=new Set;for(const E of C){if(E.status==="aborted")return De;E.status==="dirty"&&r.dirty(),A.add(E.value)}return{status:r.value,value:A}}const v=[...s.data.values()].map((C,A)=>c._parse(new li(s,C,s.path,A)));return s.common.async?Promise.all(v).then(C=>p(C)):p(v)}min(t,r){return new is({...this._def,minSize:{value:t,message:_e.toString(r)}})}max(t,r){return new is({...this._def,maxSize:{value:t,message:_e.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}is.create=(e,t)=>new is({valueType:e,minSize:null,maxSize:null,typeName:Ie.ZodSet,...$e(t)});class Ds extends Xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.function)return ke(r,{code:fe.invalid_type,expected:ve.function,received:r.parsedType}),De;function s(v,C){return Bc({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Hc(),bo].filter(A=>!!A),issueData:{code:fe.invalid_arguments,argumentsError:C}})}function o(v,C){return Bc({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Hc(),bo].filter(A=>!!A),issueData:{code:fe.invalid_return_type,returnTypeError:C}})}const c={errorMap:r.common.contextualErrorMap},p=r.data;if(this._def.returns instanceof Js){const v=this;return rr(async function(...C){const A=new Ur([]),E=await v._def.args.parseAsync(C,c).catch(M=>{throw A.addIssue(s(C,M)),A}),P=await Reflect.apply(p,this,E);return await v._def.returns._def.type.parseAsync(P,c).catch(M=>{throw A.addIssue(o(P,M)),A})})}else{const v=this;return rr(function(...C){const A=v._def.args.safeParse(C,c);if(!A.success)throw new Ur([s(C,A.error)]);const E=Reflect.apply(p,this,A.data),P=v._def.returns.safeParse(E,c);if(!P.success)throw new Ur([o(E,P.error)]);return P.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ds({...this._def,args:ci.create(t).rest(Zn.create())})}returns(t){return new Ds({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,s){return new Ds({args:t||ci.create([]).rest(Zn.create()),returns:r||Zn.create(),typeName:Ie.ZodFunction,...$e(s)})}}class Eo extends Xe{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Eo.create=(e,t)=>new Eo({getter:e,typeName:Ie.ZodLazy,...$e(t)});class Lo extends Xe{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return ke(r,{received:r.data,code:fe.invalid_literal,expected:this._def.value}),De}return{status:"valid",value:t.data}}get value(){return this._def.value}}Lo.create=(e,t)=>new Lo({value:e,typeName:Ie.ZodLiteral,...$e(t)});function t2(e,t){return new Cn({values:e,typeName:Ie.ZodEnum,...$e(t)})}class Cn extends Xe{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),s=this._def.values;return ke(r,{expected:Je.joinValues(s),received:r.parsedType,code:fe.invalid_type}),De}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),s=this._def.values;return ke(r,{received:r.data,code:fe.invalid_enum_value,options:s}),De}return rr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t){return Cn.create(t)}exclude(t){return Cn.create(this.options.filter(r=>!t.includes(r)))}}Cn.create=t2;class Po extends Xe{_parse(t){const r=Je.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==ve.string&&s.parsedType!==ve.number){const o=Je.objectValues(r);return ke(s,{expected:Je.joinValues(o),received:s.parsedType,code:fe.invalid_type}),De}if(r.indexOf(t.data)===-1){const o=Je.objectValues(r);return ke(s,{received:s.data,code:fe.invalid_enum_value,options:o}),De}return rr(t.data)}get enum(){return this._def.values}}Po.create=(e,t)=>new Po({values:e,typeName:Ie.ZodNativeEnum,...$e(t)});class Js extends Xe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.promise&&r.common.async===!1)return ke(r,{code:fe.invalid_type,expected:ve.promise,received:r.parsedType}),De;const s=r.parsedType===ve.promise?r.data:Promise.resolve(r.data);return rr(s.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Js.create=(e,t)=>new Js({type:e,typeName:Ie.ZodPromise,...$e(t)});class qr extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ie.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:s}=this._processInputParams(t),o=this._def.effect||null,c={addIssue:p=>{ke(s,p),p.fatal?r.abort():r.dirty()},get path(){return s.path}};if(c.addIssue=c.addIssue.bind(c),o.type==="preprocess"){const p=o.transform(s.data,c);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(p).then(v=>this._def.schema._parseAsync({data:v,path:s.path,parent:s})):this._def.schema._parseSync({data:p,path:s.path,parent:s})}if(o.type==="refinement"){const p=v=>{const C=o.refinement(v,c);if(s.common.async)return Promise.resolve(C);if(C instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return v};if(s.common.async===!1){const v=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return v.status==="aborted"?De:(v.status==="dirty"&&r.dirty(),p(v.value),{status:r.value,value:v.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(v=>v.status==="aborted"?De:(v.status==="dirty"&&r.dirty(),p(v.value).then(()=>({status:r.value,value:v.value}))))}if(o.type==="transform")if(s.common.async===!1){const p=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!wo(p))return p;const v=o.transform(p.value,c);if(v instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:v}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(p=>wo(p)?Promise.resolve(o.transform(p.value,c)).then(v=>({status:r.value,value:v})):p);Je.assertNever(o)}}qr.create=(e,t,r)=>new qr({schema:e,typeName:Ie.ZodEffects,effect:t,...$e(r)});qr.createWithPreprocess=(e,t,r)=>new qr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ie.ZodEffects,...$e(r)});class Pi extends Xe{_parse(t){return this._getType(t)===ve.undefined?rr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Pi.create=(e,t)=>new Pi({innerType:e,typeName:Ie.ZodOptional,...$e(t)});class ns extends Xe{_parse(t){return this._getType(t)===ve.null?rr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ns.create=(e,t)=>new ns({innerType:e,typeName:Ie.ZodNullable,...$e(t)});class To extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t);let s=r.data;return r.parsedType===ve.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}To.create=(e,t)=>new To({innerType:e,typeName:Ie.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class Yc extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t),s={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Vc(o)?o.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Ur(s.common.issues)},input:s.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ur(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Yc.create=(e,t)=>new Yc({innerType:e,typeName:Ie.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class Uc extends Xe{_parse(t){if(this._getType(t)!==ve.nan){const s=this._getOrReturnCtx(t);return ke(s,{code:fe.invalid_type,expected:ve.nan,received:s.parsedType}),De}return{status:"valid",value:t.data}}}Uc.create=e=>new Uc({typeName:Ie.ZodNaN,...$e(e)});const RS=Symbol("zod_brand");class r2 extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t),s=r.data;return this._def.type._parse({data:s,path:r.path,parent:r})}unwrap(){return this._def.type}}class Xo extends Xe{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return c.status==="aborted"?De:c.status==="dirty"?(r.dirty(),e2(c.value)):this._def.out._parseAsync({data:c.value,path:s.path,parent:s})})();{const o=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?De:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:s.path,parent:s})}}static create(t,r){return new Xo({in:t,out:r,typeName:Ie.ZodPipeline})}}class Gc extends Xe{_parse(t){const r=this._def.innerType._parse(t);return wo(r)&&(r.value=Object.freeze(r.value)),r}}Gc.create=(e,t)=>new Gc({innerType:e,typeName:Ie.ZodReadonly,...$e(t)});const i2=(e,t={},r)=>e?Ks.create().superRefine((s,o)=>{var c,p;if(!e(s)){const v=typeof t=="function"?t(s):typeof t=="string"?{message:t}:t,C=(p=(c=v.fatal)!==null&&c!==void 0?c:r)!==null&&p!==void 0?p:!0,A=typeof v=="string"?{message:v}:v;o.addIssue({code:"custom",...A,fatal:C})}}):Ks.create(),_S={object:ft.lazycreate};var Ie;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ie||(Ie={}));const MS=(e,t={message:`Input not instance of ${e.name}`})=>i2(r=>r instanceof e,t),n2=Wr.create,s2=wn.create,OS=Uc.create,IS=kn.create,a2=ko.create,zS=rs.create,FS=Wc.create,DS=Co.create,HS=So.create,BS=Ks.create,VS=Zn.create,WS=Ii.create,$S=$c.create,XS=Gr.create,YS=ft.create,US=ft.strictCreate,GS=Ao.create,ZS=Dd.create,qS=jo.create,QS=ci.create,KS=No.create,JS=Xc.create,eA=is.create,tA=Ds.create,rA=Eo.create,iA=Lo.create,nA=Cn.create,sA=Po.create,aA=Js.create,s0=qr.create,oA=Pi.create,lA=ns.create,cA=qr.createWithPreprocess,dA=Xo.create,uA=()=>n2().optional(),hA=()=>s2().optional(),fA=()=>a2().optional(),pA={string:e=>Wr.create({...e,coerce:!0}),number:e=>wn.create({...e,coerce:!0}),boolean:e=>ko.create({...e,coerce:!0}),bigint:e=>kn.create({...e,coerce:!0}),date:e=>rs.create({...e,coerce:!0})},gA=De;var mA=Object.freeze({__proto__:null,defaultErrorMap:bo,setErrorMap:yS,getErrorMap:Hc,makeIssue:Bc,EMPTY_PATH:bS,addIssueToContext:ke,ParseStatus:Gt,INVALID:De,DIRTY:e2,OK:rr,isAborted:Af,isDirty:jf,isValid:wo,isAsync:Vc,get util(){return Je},get objectUtil(){return Sf},ZodParsedType:ve,getParsedType:Ji,ZodType:Xe,ZodString:Wr,ZodNumber:wn,ZodBigInt:kn,ZodBoolean:ko,ZodDate:rs,ZodSymbol:Wc,ZodUndefined:Co,ZodNull:So,ZodAny:Ks,ZodUnknown:Zn,ZodNever:Ii,ZodVoid:$c,ZodArray:Gr,ZodObject:ft,ZodUnion:Ao,ZodDiscriminatedUnion:Dd,ZodIntersection:jo,ZodTuple:ci,ZodRecord:No,ZodMap:Xc,ZodSet:is,ZodFunction:Ds,ZodLazy:Eo,ZodLiteral:Lo,ZodEnum:Cn,ZodNativeEnum:Po,ZodPromise:Js,ZodEffects:qr,ZodTransformer:qr,ZodOptional:Pi,ZodNullable:ns,ZodDefault:To,ZodCatch:Yc,ZodNaN:Uc,BRAND:RS,ZodBranded:r2,ZodPipeline:Xo,ZodReadonly:Gc,custom:i2,Schema:Xe,ZodSchema:Xe,late:_S,get ZodFirstPartyTypeKind(){return Ie},coerce:pA,any:BS,array:XS,bigint:IS,boolean:a2,date:zS,discriminatedUnion:ZS,effect:s0,enum:nA,function:tA,instanceof:MS,intersection:qS,lazy:rA,literal:iA,map:JS,nan:OS,nativeEnum:sA,never:WS,null:HS,nullable:lA,number:s2,object:YS,oboolean:fA,onumber:hA,optional:oA,ostring:uA,pipeline:dA,preprocess:cA,promise:aA,record:KS,set:eA,strictObject:US,string:n2,symbol:FS,transformer:s0,tuple:QS,undefined:DS,union:GS,unknown:VS,void:$S,NEVER:gA,ZodIssueCode:fe,quotelessJson:vS,ZodError:Ur}),x1=(e=>(e.HOBBY="hobby-tier",e.PRO="pro-tier",e.ENTERPRISE="enterprise-tier",e))(x1||{});const xA="https://docs.opensaas.sh",vA="https://docs.opensaas.sh/blog",yA="https://billing.stripe.com/p/login/test_aEU17i3Iz0XT5mUfYY",o2="https://billing.stripe.com/p/login/14kaGs1cL3FX1PidQQ",l2=o2;bA({customerPortalTestUrl:yA,customerPortalProdUrl:o2});function bA(e){const t=mA.string().url(),r=t.safeParse(e.customerPortalTestUrl),s=t.safeParse(e.customerPortalProdUrl);let o={color:"\x1B[33m%s\x1B[0m",msg:""};r.success&&s.success?(o.color="\x1B[32m%s\x1B[0m",o.msg="✅ Both STRIPE_CUSTOMER_PORTAL_LINK links defined"):!r.success&&!s.success?o.msg="⛔️ STRIPE_CUSTOMER_PORTAL_LINK is not defined":r.success?o.msg="⛔️ STRIPE_CUSTOMER_PORTAL_LINK is not defined for prod env":o.msg="⛔️ STRIPE_CUSTOMER_PORTAL_LINK is not defined for test env",console.log(o.color,o.msg)}function Zc(){const e=Mr(),[t,r]=G.useState(!1),{data:s}=Qr();async function o(c){if(!s)e.push("/login");else try{r(!0);let p=await Eb(c);p!=null&&p.sessionUrl&&window.open(p.sessionUrl,"_self")}catch(p){console.error((p==null?void 0:p.message)??"Something went wrong.")}finally{r(!1)}}return f.jsx("a",{onClick:c=>{c.preventDefault(),o(x1.PRO)},href:"/chat",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream ring-1 ring-inset ring-gray-200 hover:bg-captn-cta-green-hover shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:text-captn-light-cream bg-captn-cta-green",children:t?"Loading...":"Free Trial"})}const a0=[{name:"Home",href:"/"},{name:"Chat",href:"/chat"}],wA=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:p1,alt:"Capt’n.ai"});function kA(){const[e,t]=G.useState(!1),{data:r,isLoading:s}=Qr();return f.jsxs("header",{className:"absolute inset-x-0 top-0 z-50 shadow sticky bg-captn-light-cream bg-opacity-50 backdrop-blur-lg backdrop-filter dark:border-strokedark dark:bg-boxdark-2",children:[f.jsxs("nav",{className:"flex items-center justify-between p-6 lg:px-8","aria-label":"Global",children:[f.jsxs("div",{className:"flex lg:flex-1",children:[f.jsx("a",{href:"/",className:"-m-1.5 p-1.5",children:f.jsx("img",{className:"h-10 w-auto -ml-2",style:{width:"178px"},src:p1,alt:"Capt’n.ai"})}),f.jsx("span",{className:"mt-2 text-sm font-semibold leading-6 dark:text-captn-light-cream",children:f.jsx("sup",{className:"text-base text-captn-dark-blue",children:"βeta"})})]}),f.jsx("div",{className:"flex lg:hidden",children:f.jsxs("button",{type:"button",className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 dark:text-captn-light-cream",onClick:()=>t(!0),children:[f.jsx("span",{className:"sr-only",children:"Open main menu"}),f.jsx(Kb,{className:"h-6 w-6","aria-hidden":"true"})]})}),f.jsx("div",{className:"hidden lg:flex lg:gap-x-12",children:a0.map(o=>f.jsx("a",{href:o.href,className:"no-underline text-sm leading-6 text-captn-dark-blue duration-300 ease-in-out hover:text-captn-light-blue dark:text-captn-light-cream",children:o.name},o.name))}),f.jsxs("div",{className:"hidden lg:flex lg:flex-1 gap-3 justify-end items-center",children:[f.jsx("ul",{className:"flex justify-center items-center gap-2 sm:gap-4",children:!(r!=null&&r.hasPaid)&&f.jsx(Zc,{})}),s?null:r?f.jsx("div",{className:"ml-4",children:f.jsx(m1,{user:r})}):f.jsx("a",{href:r?"/account":"/login",className:"text-sm font-semibold leading-6 ml-4",children:f.jsxs("div",{className:"flex items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",children:["Log in ",f.jsx(Dc,{size:"1.1rem",className:"ml-1 mt-[0.1rem]"})]})})]})]}),f.jsxs(Fc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Fc.Panel,{className:"fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white dark:text-captn-light-cream dark:bg-boxdark px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("a",{href:"/",className:"-m-1.5 p-1.5",children:[f.jsx("span",{className:"sr-only",children:"Your SaaS"}),f.jsx(wA,{})]}),f.jsxs("button",{type:"button",className:"-m-2.5 rounded-md p-2.5 text-gray-700 dark:text-gray-50",onClick:()=>t(!1),children:[f.jsx("span",{className:"sr-only",children:"Close menu"}),f.jsx(Qb,{className:"h-6 w-6","aria-hidden":"true"})]})]}),f.jsx("div",{className:"mt-6 flow-root",children:f.jsxs("div",{className:"-my-6 divide-y divide-gray-500/10",children:[f.jsx("div",{className:"space-y-2 py-6",children:a0.map(o=>f.jsx("a",{href:o.href,onClick:()=>t(!1),className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-captn-dark-blue hover:bg-gray-50 dark:text-captn-light-cream hover:dark:bg-boxdark-2",children:o.name},o.name))}),f.jsx("div",{className:"py-6",children:s?null:r?f.jsx(g1,{user:r,setMobileMenuOpen:t}):f.jsx(yo,{to:"/login",children:f.jsxs("div",{className:"flex justify-end items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",children:["Log in ",f.jsx(Dc,{size:"1.1rem",className:"ml-1"})]})})})]})})]})]})]})}function CA({children:e}){const t=na(),{data:r}=Qr(),s=G.useMemo(()=>t.pathname!=="/"&&t.pathname!=="/login"&&t.pathname!=="/signup",[t]),o=G.useMemo(()=>t.pathname.startsWith("/admin"),[t]),c=G.useMemo(()=>t.pathname.startsWith("/chat"),[t]);return G.useEffect(()=>{if(r){const p=new Date(r.lastActiveTimestamp),v=new Date;v.getTime()-p.getTime()>5*60*1e3&&Lb({lastActiveTimestamp:v})}},[r]),G.useEffect(()=>{if(t.hash){const p=t.hash.replace("#",""),v=document.getElementById(p);v&&v.scrollIntoView()}},[t]),f.jsx(f.Fragment,{children:f.jsx("div",{className:"min-h-screen dark:text-captn-light-cream dark:bg-boxdark-2 bg-captn-light-cream text-captn-dark-blue",children:o||c?f.jsx(f.Fragment,{children:e}):f.jsxs(f.Fragment,{children:[s&&f.jsx(kA,{}),f.jsx("div",{className:"mx-auto max-w-7xl sm:px-6 lg:px-8",children:e})]})})})}const wr=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Qr();return o?r?f.jsx(e,{...t,user:r}):f.jsx(Yp,{to:"/login"}):c?f.jsx("span",{children:"Loading..."}):s?f.jsx("span",{children:"An error ocurred. Please refresh the page."}):f.jsx("span",{children:"An unknown error ocurred. Please refresh the page."})},SA="/assets/agent-chat-BGsqR59C.png",o0=[{name:"Home",href:"/"},{name:"Chat",href:"/chat"}],AA=[{name:"Intelligent Strategy Customization",description:"Capt’n, your AI marketing agent, learns your business goals to craft campaigns that speak directly to your audience.",icon:"🤖",href:""},{name:"360° Campaign Management",description:"From keyword selection to budget optimization, our specialized AI agents handle it all, ensuring your campaigns are always on the forefront of efficiency.",icon:"👍",href:""},{name:"Data Privacy First",description:"Your data stays yours. With on-the-fly processing and optional chat history storage, we guarantee the utmost privacy and security for your business information.",icon:"🔐",href:""},{name:"Seamless Integration",description:"Capt’n.ai ensures smooth integration with your existing workflows, starting with Google Ads and rapidly expanding to accommodate more platforms.",icon:"🤝",href:""}],jA=[{id:1,question:"What is Capt’n.ai?",answer:"Capt’n.ai is a digital marketing platform that functions like a full-service agency, accessible directly from your device. It features Capt’n, an AI-powered agent who interacts with you to grasp the specifics of your business and advertising goals. Based on this understanding, Capt’n orchestrates a team of specialized AI agents responsible for various tasks, including the development of new marketing campaigns, optimization of ad content, selection of keywords, adjustment of budgets, and continuous monitoring of campaign performance. You receive daily updates and recommendations for enhancing your campaigns directly in your inbox, ensuring your advertising efforts are as effective as possible.",href:""},{id:2,question:"What platforms does Capt’n.ai work with?",answer:"Capt’n.ai, in its beta version, initially supports only Google Ads. However, the platform is set to expand its capabilities regularly, adding new features and compatibility with additional advertising networks at a frequent pace, even every few days.",href:""},{id:3,question:"How much does Capt’n.ai cost?",answer:"During its beta phase, Capt’n.ai is offered free for an entire month, allowing you to explore its features without any cost. This period is intended for gathering your feedback, so all associated costs are covered by us during this time. While creating an account requires a subscription to facilitate connection with your Google Ads account, providing credit card details is not necessary. The basic monthly subscription fee is currently set at $29, however, we are still evaluating the pricing model to determine if adjustments are needed, either to increase or even possibly decrease the fee. In any case, you will enjoy a 30-day free trial, after which we will have refined our pricing strategy and will inform you before the trial ends. This gives you the opportunity to assess the value of Capt’n.ai and decide if you wish to continue using the service.",href:""},{id:4,question:"Is my data secure?",answer:"We process data on the fly and do not store any data in databases, except for chat history (if you chat directly on our website) to enhance your user experience. You can delete this chat history at any time. This ensures your data stays where it belongs—with you. When you use the chat directly on our website, your data is shared only with our privately deployed OpenAI models hosted on Microsoft Azure or our in-house AI algorithms, meaning that we don’t share your data with OpenAI directly. You can find more information in our Privacy Policy section.",href:""},{id:5,question:"I run an agency, is Capt’n.ai for me as well?",answer:"Not quite yet, but it will be! Stay tuned for our updates.",href:""},{id:6,question:"I have more questions, and even some suggestions, How can I get in contact with you?",answer:"Yes, please, do let us know if you have any questions, comments, feedback, suggestions… just ping us at support@captain.ai.",href:""}],NA={app:[{name:"Documentation",href:xA},{name:"Blog",href:vA}],company:[{name:"About",href:"https://airt.ai/"},{name:"Privacy",href:"https://captn.ai/privacy"},{name:"Terms of Service",href:"https://captn.ai/toc"}]};function EA(){const[e,t]=G.useState(!1),{data:r,isLoading:s}=Qr(),o=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:p1,alt:"Capt’n.ai"});return Mr(),f.jsxs("div",{className:"",children:[f.jsxs("header",{className:"absolute inset-x-0 top-0 z-50 dark:bg-boxdark-2",children:[f.jsxs("nav",{className:"flex items-center justify-between p-6 lg:px-8","aria-label":"Global",children:[f.jsx("div",{className:"flex items-center lg:flex-1",children:f.jsxs("a",{href:"/",className:"no-underline flex items-center -m-1.5 p-1.5 text-captn-dark-blue duration-300 ease-in-out hover:text-captn-light-blue",children:[f.jsx(o,{}),f.jsx("span",{className:"ml-2 text-sm font-semibold leading-6 dark:text-captn-light-cream",children:f.jsx("sup",{className:"text-base text-captn-dark-blue",children:"βeta"})})]})}),f.jsx("div",{className:"flex lg:hidden",children:f.jsxs("button",{type:"button",className:"-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 dark:text-captn-light-cream",onClick:()=>t(!0),children:[f.jsx("span",{className:"sr-only",children:"Open main menu"}),f.jsx(Kb,{className:"h-6 w-6","aria-hidden":"true"})]})}),f.jsx("div",{className:"hidden lg:flex lg:gap-x-12",children:o0.map(c=>f.jsx("a",{href:c.href,className:"no-underline text-sm leading-6 text-captn-dark-blue duration-300 ease-in-out hover:text-captn-light-blue dark:text-captn-light-cream",children:c.name},c.name))}),f.jsx("div",{className:"hidden lg:flex lg:flex-1 lg:justify-end lg:align-end",children:f.jsxs("div",{className:"flex items-center gap-3 2xsm:gap-7",children:[!(r!=null&&r.hasPaid)&&f.jsx("div",{className:"flex items-center justify-center",children:f.jsx(Zc,{})}),s?null:r?f.jsx(m1,{user:r}):f.jsx(yo,{to:"/login",children:f.jsxs("div",{className:"flex justify-end items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",children:["Log in ",f.jsx(Dc,{size:"1.1rem",className:"ml-1"})]})})]})})]}),f.jsxs(Fc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Fc.Panel,{className:"fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10 dark:bg-boxdark dark:text-captn-light-cream",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("a",{href:"/",className:"-m-1.5 p-1.5",children:[f.jsx("span",{className:"sr-only",children:"Capt’n.ai"}),f.jsx(o,{})]}),f.jsxs("button",{type:"button",className:"-m-2.5 rounded-md p-2.5 text-gray-700 dark:text-gray-50",onClick:()=>t(!1),children:[f.jsx("span",{className:"sr-only",children:"Close menu"}),f.jsx(Qb,{className:"h-6 w-6","aria-hidden":"true"})]})]}),f.jsx("div",{className:"mt-6 flow-root",children:f.jsxs("div",{className:"-my-6 divide-y divide-gray-500/10",children:[f.jsx("div",{className:"space-y-2 py-6",children:o0.map(c=>f.jsx("a",{href:c.href,onClick:()=>t(!1),className:"-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-captn-dark-blue hover:bg-gray-50 dark:text-captn-light-cream dark:hover:bg-boxdark-2",children:c.name},c.name))}),f.jsx("div",{className:"py-6",children:s?null:r?f.jsx(g1,{user:r}):f.jsx(yo,{to:"/login",children:f.jsxs("div",{className:"flex justify-end items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",children:["Log in ",f.jsx(Dc,{size:"1.1rem",className:"ml-1"})]})})})]})})]})]})]}),f.jsxs("main",{className:"isolate dark:bg-boxdark-2",children:[f.jsxs("div",{className:"relative pt-14 w-full ",children:[f.jsx("div",{className:"absolute inset-x-0 top-[calc(100%-40rem)] sm:top-[calc(100%-65rem)] -z-10 transform-gpu overflow-hidden blur-3xl","aria-hidden":"true"}),f.jsx("div",{className:"py-24 sm:py-32",children:f.jsxs("div",{className:"mx-auto max-w-8xl px-6 lg:px-8",children:[f.jsxs("div",{className:"lg:mb-18 mx-auto max-w-4xl text-center",children:[f.jsxs("h1",{className:"text-4xl font-bold text-captn-dark-blue sm:text-6xl dark:text-captn-light-cream",children:["Meet Capt’n.ai: Your"," ",f.jsx("span",{className:"italic",children:"AI-Powered"})," Digital Marketing Crew"]}),f.jsx("p",{className:"mt-6 mx-auto max-w-2xl text-lg leading-8 text-captn-dark-blue dark:text-captn-light-cream",children:"Unleash the full potential of your advertising efforts with personalized, AI-driven strategies that evolve with your business. 30 days free trial, no credit card required!"}),f.jsx("div",{className:"mt-10 flex items-center justify-center gap-x-6",children:r!=null&&r.hasPaid?f.jsxs("a",{href:"/chat",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream ring-1 ring-inset ring-gray-200 hover:ring-2 hover:ring-captn-light-blue shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:text-captn-light-cream bg-captn-cta-green",children:["Go to chat ",f.jsx("span",{"aria-hidden":"true",children:"→"})]}):f.jsx(Zc,{})})]}),f.jsx("div",{className:"mt-14 flow-root sm:mt-14 ",children:f.jsx("div",{className:"-m-2 rounded-xl lg:-m-4 lg:rounded-2xl lg:p-4",children:f.jsx("img",{src:SA,alt:"App screenshot",width:2432,height:1442,className:"rounded-md shadow-2xl ring-1 ring-gray-900/10"})})})]})})]}),f.jsxs("div",{id:"features",className:"mx-auto mt-5 max-w-7xl px-6 lg:px-8",children:[f.jsx("div",{className:"mx-auto max-w-2xl text-center",children:f.jsx("p",{className:"mt-2 text-4xl font-bold tracking-tight text-captn-dark-blue sm:text-5xl dark:text-captn-light-cream",children:f.jsx("span",{className:"text-captn-dark-blue",children:"Features"})})}),f.jsx("div",{className:"mx-auto mt-16 max-w-2xl sm:mt-20 lg:mt-24 lg:max-w-4xl",children:f.jsx("dl",{className:"grid max-w-xl grid-cols-1 gap-x-8 gap-y-10 lg:max-w-none lg:grid-cols-2 lg:gap-y-16",children:AA.map(c=>f.jsxs("div",{className:"relative pl-16",children:[f.jsxs("dt",{className:"text-base font-semibold leading-7 text-captn-dark-blue dark:text-captn-light-cream",children:[f.jsx("div",{className:"absolute left-0 top-0 flex h-10 w-10 items-center justify-center border border-captn-dark-blue bg-captn-dark-blue-100/50 dark:bg-boxdark rounded-lg",children:f.jsx("div",{className:"text-2xl",children:c.icon})}),c.name]}),f.jsx("dd",{className:"mt-2 text-base leading-7 text-captn-dark-blue dark:text-captn-light-cream",children:c.description})]},c.name))})})]}),f.jsxs("div",{className:"mt-5 mx-auto max-w-2xl divide-y divide-gray-900/10 dark:divide-gray-200/10 px-6 pb-8 sm:pb-24 sm:pt-12 lg:max-w-7xl lg:px-8 lg:py-32",children:[f.jsx("h2",{className:"text-2xl font-bold leading-10 tracking-tight text-captn-dark-blue dark:text-captn-light-cream",children:"Frequently asked questions"}),f.jsx("dl",{className:"mt-10 space-y-8 divide-y divide-gray-900/10",children:jA.map(c=>f.jsxs("div",{className:"pt-8 lg:grid lg:grid-cols-12 lg:gap-8",children:[f.jsx("dt",{className:"text-base font-semibold leading-7 text-captn-dark-blue lg:col-span-5 dark:text-captn-light-cream",children:c.question}),f.jsxs("dd",{className:"flex items-center justify-start gap-2 mt-4 lg:col-span-7 lg:mt-0",children:[f.jsx("p",{className:"lg:pl-5 pr-5 text-base leading-7 text-captn-dark-blue dark:text-captn-light-cream",children:c.answer}),c.href&&f.jsx("a",{href:c.href,className:"text-base leading-7 text-yellow-500 hover:text-yellow-600",children:"Learn more →"})]})]},c.id))})]})]}),f.jsx("div",{className:"mx-auto mt-6 max-w-7xl px-6 lg:px-8 dark:bg-boxdark-2",children:f.jsxs("footer",{"aria-labelledby":"footer-heading",className:"relative border-t border-gray-900/10 dark:border-gray-200/10 py-5 sm:mt-5",children:[f.jsx("h2",{id:"footer-heading",className:"sr-only",children:"Footer"}),f.jsx("div",{className:"flex items-start justify-end mt-10 gap-20",children:f.jsxs("div",{children:[f.jsx("h3",{className:"text-sm font-semibold leading-6 text-captn-dark-blue dark:text-captn-light-cream",children:"Company"}),f.jsx("ul",{role:"list",className:"mt-6 space-y-4",children:NA.company.map(c=>f.jsx("li",{children:f.jsx("a",{href:c.href,className:"text-sm leading-6 text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",target:`${c.name==="About"?"_blank":"_self"}`,children:c.name})},c.name))})]})})]})})]})}function c2({children:e}){return f.jsx("div",{className:"custom-auth-wrapper flex min-h-full flex-col justify-center pt-10 sm:px-6 lg:px-8",children:f.jsx("div",{className:"sm:mx-auto sm:w-full sm:max-w-md",children:f.jsx("div",{className:"bg-captn-dark-blue py-8 px-4 shadow-xl ring-1 ring-gray-900/10 sm:rounded-lg sm:px-10 dark:bg-white text-captn-light-cream",children:f.jsx("div",{className:"-mt-8",children:e})})})})}const{styled:br,css:eP}=Qp({theme:{colors:{waspYellow:"#ffcc00",gray700:"#a1a5ab",gray600:"#d1d5db",gray500:"gainsboro",gray400:"#f0f0f0",red:"#FED7D7",darkRed:"#fa3838",green:"#C6F6D5",brand:"$waspYellow",brandAccent:"#ffdb46",errorBackground:"$red",errorText:"#2D3748",successBackground:"$green",successText:"#2D3748",submitButtonText:"black",formErrorText:"$darkRed"},fontSizes:{sm:"0.875rem"}}});function LA(e){return e==null?void 0:e.replace(/\/$/,"")}const PA=LA("https://backend.captn.ai")||"http://localhost:3001",TA={apiUrl:PA},RA=br("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),_A=br(RA,{background:"#eae4d9",color:"#003851"});br("div",{position:"relative",marginTop:"1.5rem"});br("div",{position:"absolute",inset:"0px",display:"flex",alignItems:"center"});br("div",{width:"100%",borderTopWidth:"1px",borderColor:"$gray500"});br("div",{position:"relative",display:"flex",justifyContent:"center",fontSize:"$sm"});br("span",{backgroundColor:"white",paddingLeft:"0.5rem",paddingRight:"0.5rem"});const MA=br("div",{marginTop:"1.5rem",marginBottom:"1.5rem"});br("div",{fontWeight:"500",fontSize:"$sm"});const OA=br("div",{marginTop:"0.5rem",display:"flex",variants:{direction:{horizontal:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(48px, 1fr))"},vertical:{flexDirection:"column",margin:"8px 0"}},gap:{small:{gap:"4px"},medium:{gap:"8px"},large:{gap:"16px"}}}}),IA=`${TA.apiUrl}/auth/google/login`,zA=({state:e,socialButtonsDirection:t="horizontal",additionalSignupFields:r,errorMessage:s})=>{const{isLoading:o,setErrorMessage:c,setSuccessMessage:p,setIsLoading:v}=G.useContext(d2);Mr();const[C,A]=G.useState(!1),[E,P]=G.useState(!1);Oy(),G.useEffect(()=>{C&&E&&c(null)},[C,E]);const B=D=>{A(D.target.checked)},M=D=>{P(D.target.checked)},H=(D,Z)=>{D.preventDefault(),C&&E?window.location.href=Z:c({title:"To proceed, please ensure you have accepted the Terms & Conditions, Privacy Policy, and opted to receive marketing emails.",description:""})};return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"mt-3",children:[f.jsx("input",{type:"checkbox",id:"toc",checked:C,onChange:B}),f.jsxs("label",{className:"text-sm ml-2",htmlFor:"toc",children:["I agree to the"," ",f.jsx(rt,{to:"/toc",className:"no-underline hover:underline",target:"_blank",children:"Terms & Conditions"})," ","and"," ",f.jsx(rt,{to:"/privacy",className:"no-underline hover:underline",target:"_blank",children:"Privacy Policy"})]})]}),f.jsxs("div",{children:[f.jsx("input",{type:"checkbox",id:"marketingEmails",checked:E,onChange:M}),f.jsx("label",{className:"text-sm ml-2",htmlFor:"marketingEmails",children:"I agree to receiving marketing emails"})]}),s&&f.jsx("div",{className:"text-sm",children:f.jsxs(_A,{style:{border:"1px solid #c22828"},children:[s.title,s.description&&": ",s.description]})}),f.jsx(MA,{children:f.jsx(OA,{gap:"large",direction:t,children:f.jsxs("button",{className:"gsi-material-button",onClick:D=>H(D,IA),children:[f.jsx("div",{className:"gsi-material-button-state"}),f.jsxs("div",{className:"gsi-material-button-content-wrapper",children:[f.jsx("div",{className:"gsi-material-button-icon",children:f.jsxs("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",xmlnsXlink:"http://www.w3.org/1999/xlink",style:{display:"block"},children:[f.jsx("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),f.jsx("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),f.jsx("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),f.jsx("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"}),f.jsx("path",{fill:"none",d:"M0 0h48v48H0z"})]})}),f.jsx("span",{className:"gsi-material-button-contents",children:"Sign in with Google"}),f.jsx("span",{style:{display:"none"},children:"Sign in with Google"})]})]})})})]})},FA=br("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),DA=br(FA,{background:"$successBackground",color:"$successText"}),HA={height:"6rem"};br("div",{display:"flex",flexDirection:"column"});const d2=G.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}});function BA({state:e,appearance:t,logo:r,socialLayout:s="horizontal",additionalSignupFields:o}){const[c,p]=G.useState(null),[v,C]=G.useState(null),[A,E]=G.useState(!1),P=jy(t??{}),M={login:"Log in to your account",signup:"Create a new account"}[e],H=s==="vertical"?"vertical":"horizontal";return f.jsxs("div",{className:P,children:[f.jsxs("div",{children:[r&&f.jsx("img",{className:"mt-10 mx-auto",style:HA,src:r,alt:"Capt’n.ai"}),f.jsx("p",{className:"mt-7 text-2xl",children:M})]}),v&&f.jsx(DA,{children:v}),f.jsx(d2.Provider,{value:{isLoading:A,setIsLoading:E,setErrorMessage:p,setSuccessMessage:C},children:(e==="login"||e==="signup")&&f.jsx(zA,{state:e,socialButtonsDirection:H,additionalSignupFields:o,errorMessage:c})})]})}const VA="/assets/captn-logo-large-Soxu_L3b.png";function WA(){const e=Mr(),{data:t}=Qr();return G.useEffect(()=>{t&&e.push("/")},[t,e]),f.jsx(c2,{children:f.jsx($A,{logo:VA})})}function $A({appearance:e,logo:t,socialLayout:r}){return f.jsx(BA,{appearance:e,logo:t,socialLayout:r,state:"login"})}function XA(){return f.jsxs(c2,{children:[f.jsx(F9,{}),f.jsx("br",{}),f.jsxs("span",{className:"text-sm font-medium text-captn-dark-blue",children:["I already have an account (",f.jsx(rt,{to:"/login",className:"underline",children:"go to login"}),")."]}),f.jsx("br",{})]})}function YA(){return f.jsx("div",{children:f.jsx("div",{className:"mx-auto max-w-2xl pl-10 pr-10 pt-10 pb-24 sm:pb-32 lg:gap-x-8 lg:py-5 lg:px-8",children:f.jsxs("div",{className:"container mx-auto py-8",children:[f.jsx("h1",{className:"text-3xl font-semibold mb-4",children:"Terms & Conditions"}),f.jsx("p",{className:"text-captn-dark-blue mb-4",children:"Last updated January 29, 2024"}),f.jsx("section",{className:"mb-8",children:f.jsx("p",{children:'These terms and conditions ("Terms") govern your access to and use of Capt’n.ai, a Software-as-a-Service tool ("Service") provided by airt technologies, Inc. ("we" or "us"). By accessing or using the Service, you agree to be bound by these Terms. If you do not agree to these Terms, you may not access or use the Service.'})}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Use Terms for Capt’n.ai"}),f.jsx("p",{children:"Subject to these Terms, we grant you a limited, non-exclusive, non-transferable, revocable license to use the Service for your internal business purposes during the term of these Terms."}),f.jsx("br",{}),f.jsx("p",{children:"You may not use the Service in any way that could damage, disable, overburden, or impair the Service or interfere with any other party's use and enjoyment of the Service. You may not attempt to gain unauthorized access to the Service or any part of it, other accounts, computer systems, or networks connected to the Service, through hacking, password mining, or any other means."}),f.jsx("br",{}),f.jsx("p",{children:"You are solely responsible for all data, information, and content uploaded, stored, or processed using the Service. You represent and warrant that you have the necessary rights to upload, store, and process such data, information, and content using the Service and that your use of the Service complies with all applicable laws, regulations, and industry standards."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Payment and Subscription"}),f.jsx("p",{children:"By subscribing to Capt’n.ai, you agree to the following terms and conditions:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-decimal pl-6",children:[f.jsxs("li",{children:[f.jsx("b",{children:"Subscription:"}),' Capt’n.ai is offered on a subscription basis. You will be billed in advance on a recurring and periodic basis (each period is referred to as a "billing cycle"). Billing cycles are set either on a monthly or annual basis, depending on the type of subscription plan you select when purchasing.']}),f.jsxs("li",{children:[f.jsx("b",{children:"Payments:"})," All payments are processed by our payment partner, Stripe. By providing a payment method, you expressly authorize us and Stripe to charge the subscription fees at the start of every billing cycle."]}),f.jsxs("li",{children:[f.jsx("b",{children:"No Refunds:"})," Payments are non-refundable and there are no refunds or credits for partially used periods. Following any cancellation, however, you will continue to have access to your subscription through the end of your current billing cycle."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Cancellation:"})," You can cancel your subscription at any time. Please note that you must cancel your subscription before it renews for a subsequent billing cycle in order to avoid being charged for the next billing cycle."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Changes:"})," We reserve the right to change our subscription plans or adjust pricing for our service in any manner and at any time as we may determine in our sole and absolute discretion."]})]}),f.jsx("br",{}),f.jsxs("p",{className:"mb-4",children:["If you have any questions about your Capt’n.ai subscription or these terms, please reach out to us at"," ",f.jsx("a",{href:"mailto:support@captn.ai",className:"no-underline hover:underline text-captn-light-blue",children:"support@captn.ai"}),"."]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Marketing Emails"}),f.jsx("p",{children:"By signing up or creating an account on this website, you agree to receive marketing emails from us, unless you choose to unsubscribe. These emails may include promotional offers, product updates, newsletters, or other information related to our services. We value your privacy and assure you that your email address and personal information will be handled in accordance with our Privacy Policy."}),f.jsx("br",{}),f.jsx("p",{children:'If you wish to unsubscribe from our marketing emails, you can do so by clicking the "unsubscribe" link provided at the bottom of each email. Please note that even if you unsubscribe from marketing emails, you may still receive transactional or account-related communications regarding your use of our services.'})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Confidentiality"}),f.jsx("p",{children:'"Confidential Information" means any information disclosed by either party to the other party that is marked as confidential or should reasonably be considered confidential given the nature of the information and the circumstances of its disclosure.'}),f.jsx("br",{}),f.jsx("p",{children:"The recipient of Confidential Information will maintain the confidentiality of the Confidential Information and will not disclose it to any third party, except as necessary to provide the Service or as required by law."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Termination"}),f.jsx("p",{children:"Either party may terminate these Terms upon written notice to the other party if the other party breaches any material term of these Terms and fails to cure such breach within thirty (30) days of receiving written notice of the breach."}),f.jsx("br",{}),f.jsx("p",{children:"Upon termination of these Terms, you must immediately cease all use of the Service and destroy all copies of the Service in your possession."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"User Data"}),f.jsx("p",{children:"We will maintain certain data that you transmit to the Site for the purpose of managing the performance of the Site, as well as data relating to your use of the Site. Although we perform regular routine backups of data, you are solely responsible for all data that you transmit or that relates to any activity you have undertaken using the Site. You agree that we shall have no liability to you for any loss or corruption of any such data, and you hereby waive any right of action against us arising from any such loss or corruption of such data."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Disclaimer of Warranties"}),f.jsx("p",{children:'The Service is provided "as is" and "as available" without any warranties of any kind, whether express or implied.'}),f.jsx("br",{}),f.jsx("p",{children:"We do not warrant that the Service will be uninterrupted or error-free, or that the Service will meet your requirements or expectations."}),f.jsx("br",{}),f.jsx("p",{children:"We expressly disclaim any and all warranties of merchantability, fitness for a particular purpose, non-infringement, and any warranties arising out of course of dealing or usage of trade."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Third-Party Website and Content"}),f.jsx("p",{children:'The Site may contain (or you may be sent via the Site) links to other websites ("Third-Party Websites") as well as articles, photographs, text, graphics, pictures, designs, music, sound, video, information, applications, software, and other content or items belonging to or originating from third parties ("Third-Party Content"). Such Third-Party Websites and Third-Party Content are not investigated, monitored, or checked for accuracy, appropriateness, or completeness by us, and we are not responsible for any Third-Party Websites accessed through the Site or any Third-Party Content posted on, available through, or installed from the Site, including the content, accuracy, offensiveness, opinions, reliability, privacy practices, or other policies of or contained in the Third-Party Websites or the Third-Party Content. Inclusion of, linking to, or permitting the use or installation of any Third-Party Websites or any Third-Party Content does not imply approval or endorsement thereof by us. If you decide to leave the Site and access the Third-Party Websites or to use or install any Third-Party Content, you do so at your own risk, and you should be aware these Terms of Use no longer govern. You should review the applicable terms and policies, including privacy and data gathering practices, of any website to which you navigate from the Site or relating to any applications you use or install from the Site. Any purchases you make through Third-Party Websites will be through other websites and from other companies, and we take no responsibility whatsoever in relation to such purchases which are exclusively between you and the applicable third party. You agree and acknowledge that we do not endorse the products or services offered on Third-Party Websites and you shall hold us harmless from any harm caused by your purchase of such products or services. Additionally, you shall hold us harmless from any losses sustained by you or harm caused to you relating to or resulting in any way from any Third-Party Content or any contact with Third-Party Websites.'})]}),f.jsxs("section",{children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Contact Us"}),f.jsxs("p",{className:"mb-4",children:["In order to receive further information regarding use of the Site, please contact us at:"," ",f.jsx("a",{href:"mailto:support@captn.ai",className:"no-underline hover:underline text-captn-light-blue",children:"support@captn.ai"}),"."]})]})]})})})}function UA(){return f.jsx("div",{children:f.jsx("div",{className:"mx-auto max-w-2xl pl-10 pr-10 pt-10 pb-24 sm:pb-32 lg:gap-x-8 lg:py-5 lg:px-8",children:f.jsxs("div",{className:"container mx-auto py-8",children:[f.jsx("h1",{className:"text-3xl font-semibold mb-4",children:"Privacy Policy"}),f.jsx("p",{className:"text-captn-dark-blue mb-4",children:"Last updated January 29, 2024"}),f.jsx("section",{className:"mb-8",children:f.jsxs("p",{children:['Airt technologies, Inc. ("we", "us", or "our") is committed to protecting the privacy of our users. This Privacy Policy explains how we collect, use, and disclose information through our SaaS tool, ',f.jsx("b",{children:"Capt’n.ai"}),' (the "Service").']})}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Information We Collect"}),f.jsx("p",{children:"At Capt’n.ai, we value your privacy and are committed to ensuring the highest level of confidentiality and security for your information. Here's what you need to know about the information we collect when you use our Service:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-decimal pl-6",children:[f.jsxs("li",{children:[f.jsx("b",{children:"Account Information:"})," When you create a Capt’n.ai account, we collect your name and email address. This information is essential to personalize your experience and enable various features of the Service."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Integrations:"})," As you integrate your various marketing platforms with our Service, we collect information that you input, including the details about the platforms you're connecting and any associated data. This data is necessary to provide you with accurate analytics, reports, and insights. For data collected from Google APIs, we adhere to Google's API Services User Data Policy, including the Limited Use requirements. Continue reading for further information."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Chat Interactions and AI Data Sharing:"}),' Your chat interactions and data from connected third-party services may be shared with our privately deployed OpenAI models hosted on Microsoft Azure. This sharing is essential for the service and is detailed in the section below: "Third-Party and Proprietary AI Tools."']}),f.jsxs("li",{children:[f.jsx("b",{children:"Usage Information:"})," To help us understand how you interact with our Service and enable us to improve your user experience, we collect information about your usage. This may include log data, device information, and other data related to your activities within our Service."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Data Processing:"}),` At Capt’n.ai, your data's privacy is a top priority. We process data on-the-fly and do not store any data in databases, except for chat history as detailed in the "Third-Party and Proprietary AI Tools" section. This ensures your data stays where it belongs—with you.`]})]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("p",{children:"We use the information we collect to:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-disc pl-6",children:[f.jsxs("li",{children:[f.jsx("b",{children:"Provide, Maintain, and Improve the Service:"})," We use your information to deliver the services you request, maintain your account, and enhance your experience with Capt’n.ai."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Respond to Your Requests and Inquiries:"})," Your information helps us respond to your customer service requests, support needs, and other inquiries."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Communicate with You:"})," We use your information to communicate with you about the Service, updates, and other informational or promotional content."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Analyze and Monitor Usage:"})," We use analytics tools to track how users interact with the Service, which helps us make data-driven decisions for improvements."]}),f.jsxs("li",{children:[f.jsx("b",{children:"Detect, Investigate, and Prevent Fraud and Other Illegal Activities:"})," ","We use your information to protect the security and integrity of the Service by detecting and preventing fraudulent or illegal activities."]})]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Authentication And Authorized Data Access"}),f.jsx("p",{children:"User authenticates with the 3rd party provider such as Google account. Upon authentication, user allows the application:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-decimal pl-6",children:[f.jsx("li",{children:"Associate user with personal info on Google"}),f.jsx("li",{children:"See user's personal info, including any personal info user made publicly available"}),f.jsx("li",{children:"View user's email address"})]}),f.jsx("br",{}),f.jsxs("p",{children:["Email address is stored in the database of the application while the other credentials of authenticated users are encrypted and stored within the infrastructure of Google. This can be used to restrict or fully block the service for a particular user in case of the breach of the ",f.jsx("b",{children:"terms of use"}),". User's email address can be deleted upon the request."]}),f.jsx("br",{}),f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Revoke Access to Your Google Account"}),f.jsxs("p",{children:["To remove access of the application to your account, you can do it directly in your Google account by following this link:"," ",f.jsx("a",{href:"https://myaccount.google.com/connections",target:"_black",className:"no-underline hover:underline text-captn-light-blue",children:"https://myaccount.google.com/permissions‍"})]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Google API Services User Data Policy"}),f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Google API Services Disclosure"}),f.jsxs("p",{children:["Capt’n.ai's use and transfer of information received from Google APIs adhere to"," ",f.jsx("a",{href:"https://developers.google.com/terms/api-services-user-data-policy",target:"_blank",className:"no-underline hover:underline text-captn-light-blue",children:"Google API Services User Data Policy"}),", including the Limited Use requirements. We recommend reviewing Google API Services User Data Policy to better understand their practices."]}),f.jsx("br",{}),f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Use of Google API Services Data"}),f.jsx("p",{children:"When you choose to connect various Google services to Capt’n.ai, we require specific permissions to fetch and display data for your interactive queries. Below are the permissions required for each Google service:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-disc pl-6",children:[f.jsxs("li",{children:["Google Analytics:"," ",f.jsx("a",{href:"https://developers.google.com/analytics/devguides/config/admin/v1",target:"_blank",className:"no-underline hover:underline text-captn-light-blue",children:"https://developers.google.com/analytics/devguides/config/admin/v1"})," ","- Enables you to interact with your Google Analytics data through Capt’n.ai."]}),f.jsxs("li",{children:["Google Ad:"," ",f.jsx("a",{href:"https://developers.google.com/google-ads/api/docs/oauth/internals",target:"_blank",className:"no-underline hover:underline text-captn-light-blue",children:"https://developers.google.com/google-ads/api/docs/oauth/internals"})," ","- Allows Capt’n.ai to fetch and display your Google Ads data for interactive queries."]}),f.jsxs("li",{children:["Google Search Console:"," ",f.jsx("a",{href:"https://developers.google.com/webmaster-tools/v1/sites/get",target:"_blank",className:"no-underline hover:underline text-captn-light-blue",children:"https://developers.google.com/webmaster-tools/v1/sites/get"})," ","- Permits Capt’n.ai to access and display your Google Search Console data, making it available for interactive chat."]})]}),f.jsx("br",{}),f.jsx("p",{children:"You may choose to connect one, multiple, or none of these services as per your preference."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Third-Party and Proprietary AI Tools"}),f.jsx("p",{children:"Our chatbot service utilizes advanced AI technology by employing privately deployed OpenAI models on Microsoft Azure. This approach allows us to generate contextually relevant and accurate responses based on your interactions and queries, ensuring a high-quality user experience."}),f.jsx("br",{}),f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Data Sharing in Different Use Cases"}),f.jsx("p",{children:"Your chat interactions are processed using our privately deployed OpenAI models on Microsoft Azure. This ensures that your data, including chat history, user metrics, and dimensions from integrated services like Google Analytics, Google Ads, and Facebook Ads, is not shared with OpenAI directly."}),f.jsx("br",{}),f.jsx("p",{children:"Here's a breakdown of the specific data shared from each source:"}),f.jsx("br",{}),f.jsxs("p",{children:[f.jsx("b",{children:"Google Analytics:"})," Your Google Analytics data includes website traffic information, user behavior, and engagement metrics from your connected websites. Metrics like page views, session duration, bounce rate, and user demographics. By incorporating these insights, the chatbot can tailor its responses to align with the user's website-related inquiries."]}),f.jsx("br",{}),f.jsxs("p",{children:[f.jsx("b",{children:"Google Ads:"})," Data from your Google Ads campaigns offers insights into your advertising efforts, ad performance, and user interactions with your advertisements. Key metrics such as ad clicks, impressions, click-through rates (CTR), and conversion rates are integrated into the chatbot's learning process. This integration enables the chatbot to provide more informed and relevant responses regarding your advertising strategies."]}),f.jsx("br",{}),f.jsxs("p",{children:[f.jsx("b",{children:"Google Search Console:"})," Information gathered from Google Search Console sheds light on your website's visibility in Google search results. Details about search queries, click-through rates (CTR), and average position help the chatbot understand user intent and prevalent search trends. By leveraging this data, the chatbot can offer insights and answers that align with current search behaviors."]}),f.jsx("br",{}),f.jsxs("p",{children:[f.jsx("b",{children:"Chat Interactions:"})," This refers to the text-based interactions you have with the chatbot within the Capt’n.ai platform. The content of these conversations, including your questions and responses. This data aids in refining the AI's ability to comprehend inputs and generate contextually accurate responses."]}),f.jsx("br",{}),f.jsx("p",{children:"All of the data sources mentioned above are crucial for enhancing the chatbot's ability to provide accurate and contextually relevant responses. When chatting directly on our website, certain data points from your interactions and connected platforms are processed using our privately deployed OpenAI models on Microsoft Azure. We ensure that only relevant and necessary data are shared to maintain the effectiveness of the chatbot's functionality."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Data Storage on Azure Database"}),f.jsxs("p",{children:["While we do not directly store raw data from third-party sources such as Google Ads, Google Analytics, or Facebook Ads, it's crucial to understand that your chat history may contain references to or summaries of data from these services. Retaining this chat history is not just for record-keeping; it's a fundamental component for the seamless functionality of our chatbot service. This chat data is securely stored in Azure Database service, a cloud-based database, in compliance with Azure privacy policy (",f.jsx("a",{href:"https://learn.microsoft.com/en-us/azure/compliance/",target:"_blank",className:"no-underline hover:underline text-captn-light-blue",children:"https://learn.microsoft.com/en-us/azure/compliance/"}),"). Your chat history is retained indefinitely, but you have the option to delete it at any time through the settings in our application."]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h3",{className:"text-l font-semibold mb-2",children:"User Consent Process"}),f.jsx("p",{children:"During your registration with Capt’n.ai, we require your explicit consent regarding our privacy practices. As part of the sign-up process, you will encounter a checkbox indicating that you have read and agree to our Terms and Conditions and Privacy Policy. By checking this box, you acknowledge your understanding and agreement to how we handle your data as detailed in these documents. Only upon agreeing to these terms will the chatbot service proceed with using your data. You have the option to withdraw your consent at any point, read more below."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Opt-Out Options"}),f.jsx("p",{children:"If you choose to withdraw your consent and opt-out of data sharing with third-party tools, you will no longer be able to use the Capt’n.ai service. The nature of our tool requires data sharing for its basic functionality. Therefore, opting out effectively means discontinuing use of the service."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h3",{className:"text-l font-semibold mb-2",children:"Agreement"}),f.jsx("p",{children:"By using our chatbot service, you explicitly consent to your chat data being processed as described above. We ensure that your data is handled securely and in accordance with this privacy policy, as well as Azure privacy policy."}),f.jsx("br",{}),f.jsx("p",{children:f.jsx("b",{children:"If you do not agree with this policy, please refrain from signing up and using Capt’n.ai."})})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Google Analytics"}),f.jsx("p",{children:"Google Analytics is used across captn.ai domain in order to collect information about the users' interactions with the site as well as to identify returning visits, location, device data and engagement signals. Collected data helps to understand the relevancy and general usage of the tool hence, to provide better experience and solutions towards the needs of the users, fix errors and bugs. No data is shared with the 3rd party organizations or individuals."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Information Sharing and Disclosure"}),f.jsx("p",{children:"We may share your information with third parties in the following circumstances:"}),f.jsx("br",{}),f.jsxs("ul",{className:"list-disc pl-6",children:[f.jsx("li",{children:"Service Providers: We may share your information with third-party service providers who perform services on our behalf, such as hosting, analytics, and customer support."}),f.jsx("li",{children:'AI Data Sharing: Your chat interactions and data from connected third-party services may be shared with our in-house AI algorithms. This sharing is essential for the service and is detailed in the section above "Third-Party and Proprietary AI Tools".'}),f.jsx("li",{children:"Compliance with Laws: We may disclose your information as required by law or in response to legal process, including subpoenas, court orders, and requests from law enforcement."}),f.jsx("li",{children:"Business Transfers: If we are involved in a merger, acquisition, or sale of all or a portion of our assets, your information may be transferred as part of that transaction."}),f.jsx("li",{children:"Your Consent: We may disclose your information with your consent."})]})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Your Choices"}),f.jsx("p",{children:"You can access and update your account information through the Service. You can also unsubscribe from our promotional emails by following the instructions in the email."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Data Retention"}),f.jsx("p",{children:"We retain the information we collect for as long as necessary to provide the Service and fulfill the purposes described in this Privacy Policy. When we no longer need the information, we will securely delete it or de-identify it. Your chat history is retained indefinitely, but you have the option to delete it at any time through the settings in our application."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Security"}),f.jsx("p",{children:"We take reasonable measures to protect your information from unauthorized access, use, disclosure, and destruction. However, no method of transmission over the internet or method of electronic storage is completely secure."})]}),f.jsxs("section",{className:"mb-8",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Changes to this Privacy Policy"}),f.jsx("p",{children:"We may update this Privacy Policy from time to time. If we make any material changes, we will notify you by email or by posting a notice on our website prior to the change becoming effective."})]}),f.jsxs("section",{children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Contact Us"}),f.jsxs("p",{className:"mb-4",children:["In order to receive further information regarding use of the Site, please contact us at:"," ",f.jsx("a",{href:"mailto:support@captn.ai",className:"no-underline hover:underline text-captn-light-blue",children:"support@captn.ai"}),"."]})]})]})})})}const di=Object.create(null);di.open="0";di.close="1";di.ping="2";di.pong="3";di.message="4";di.upgrade="5";di.noop="6";const ql=Object.create(null);Object.keys(di).forEach(e=>{ql[di[e]]=e});const Ef={type:"error",data:"parser error"},u2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",h2=typeof ArrayBuffer=="function",f2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,v1=({type:e,data:t},r,s)=>u2&&t instanceof Blob?r?s(t):l0(t,s):h2&&(t instanceof ArrayBuffer||f2(t))?r?s(t):l0(new Blob([t]),s):s(di[e]+(t||"")),l0=(e,t)=>{const r=new FileReader;return r.onload=function(){const s=r.result.split(",")[1];t("b"+(s||""))},r.readAsDataURL(e)};function c0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let $u;function GA(e,t){if(u2&&e.data instanceof Blob)return e.data.arrayBuffer().then(c0).then(t);if(h2&&(e.data instanceof ArrayBuffer||f2(e.data)))return t(c0(e.data));v1(e,!1,r=>{$u||($u=new TextEncoder),t($u.encode(r))})}const d0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",za=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,r=e.length,s,o=0,c,p,v,C;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const A=new ArrayBuffer(t),E=new Uint8Array(A);for(s=0;s>4,E[o++]=(p&15)<<4|v>>2,E[o++]=(v&3)<<6|C&63;return A},qA=typeof ArrayBuffer=="function",y1=(e,t)=>{if(typeof e!="string")return{type:"message",data:p2(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:QA(e.substring(1),t)}:ql[r]?e.length>1?{type:ql[r],data:e.substring(1)}:{type:ql[r]}:Ef},QA=(e,t)=>{if(qA){const r=ZA(e);return p2(r,t)}else return{base64:!0,data:e}},p2=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},g2="",KA=(e,t)=>{const r=e.length,s=new Array(r);let o=0;e.forEach((c,p)=>{v1(c,!1,v=>{s[p]=v,++o===r&&t(s.join(g2))})})},JA=(e,t)=>{const r=e.split(g2),s=[];for(let o=0;o{const s=r.length;let o;if(s<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,s);else if(s<65536){o=new Uint8Array(3);const c=new DataView(o.buffer);c.setUint8(0,126),c.setUint16(1,s)}else{o=new Uint8Array(9);const c=new DataView(o.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(s))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(r)})}})}let Xu;function kl(e){return e.reduce((t,r)=>t+r.length,0)}function Cl(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let s=0;for(let o=0;oMath.pow(2,21)-1){v.enqueue(Ef);break}o=E*Math.pow(2,32)+A.getUint32(4),s=3}else{if(kl(r)e){v.enqueue(Ef);break}}}})}const m2=4;function Ft(e){if(e)return rj(e)}function rj(e){for(var t in Ft.prototype)e[t]=Ft.prototype[t];return e}Ft.prototype.on=Ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ft.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s,o=0;o(e.hasOwnProperty(s)&&(r[s]=e[s]),r),{})}const ij=Nr.setTimeout,nj=Nr.clearTimeout;function Hd(e,t){t.useNativeTimers?(e.setTimeoutFn=ij.bind(Nr),e.clearTimeoutFn=nj.bind(Nr)):(e.setTimeoutFn=Nr.setTimeout.bind(Nr),e.clearTimeoutFn=Nr.clearTimeout.bind(Nr))}const sj=1.33;function aj(e){return typeof e=="string"?oj(e):Math.ceil((e.byteLength||e.size)*sj)}function oj(e){let t=0,r=0;for(let s=0,o=e.length;s=57344?r+=3:(s++,r+=4);return r}function lj(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function cj(e){let t={},r=e.split("&");for(let s=0,o=r.length;s0);return t}function y2(){const e=f0(+new Date);return e!==h0?(u0=0,h0=e):e+"."+f0(u0++)}for(;Sl{this.readyState="paused",t()};if(this.polling||!this.writable){let s=0;this.polling&&(s++,this.once("pollComplete",function(){--s||r()})),this.writable||(s++,this.once("drain",function(){--s||r()}))}else r()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};JA(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,KA(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=y2()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ai(this.uri(),t)}doWrite(t,r){const s=this.request({method:"POST",data:t});s.on("success",r),s.on("error",(o,c)=>{this.onError("xhr post error",o,c)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,s)=>{this.onError("xhr poll error",r,s)}),this.pollXhr=t}}class ai extends Ft{constructor(t,r){super(),Hd(this,r),this.opts=r,this.method=r.method||"GET",this.uri=t,this.data=r.data!==void 0?r.data:null,this.create()}create(){var t;const r=x2(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const s=this.xhr=new w2(r);try{s.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(s.timeout=this.opts.requestTimeout),s.onreadystatechange=()=>{var o;s.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(s)),s.readyState===4&&(s.status===200||s.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof s.status=="number"?s.status:0)},0))},s.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=ai.requestsCount++,ai.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=fj,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ai.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ai.requestsCount=0;ai.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",p0);else if(typeof addEventListener=="function"){const e="onpagehide"in Nr?"pagehide":"unload";addEventListener(e,p0,!1)}}function p0(){for(let e in ai.requests)ai.requests.hasOwnProperty(e)&&ai.requests[e].abort()}const w1=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),Al=Nr.WebSocket||Nr.MozWebSocket,g0=!0,mj="arraybuffer",m0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class xj extends b1{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),r=this.opts.protocols,s=m0?{}:x2(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=g0&&!m0?r?new Al(t,r):new Al(t):new Al(t,r,s)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r{const p={};try{g0&&this.ws.send(c)}catch{}o&&w1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=y2()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!Al}}class vj extends b1{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const r=tj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(r).getReader(),o=ej();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const c=()=>{s.read().then(({done:v,value:C})=>{v||(this.onPacket(C),c())}).catch(v=>{})};c();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this.writer.write(p).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let r=0;r{o&&w1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const yj={websocket:xj,webtransport:vj,polling:gj},bj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,wj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Pf(e){if(e.length>2e3)throw"URI too long";const t=e,r=e.indexOf("["),s=e.indexOf("]");r!=-1&&s!=-1&&(e=e.substring(0,r)+e.substring(r,s).replace(/:/g,";")+e.substring(s,e.length));let o=bj.exec(e||""),c={},p=14;for(;p--;)c[wj[p]]=o[p]||"";return r!=-1&&s!=-1&&(c.source=t,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=kj(c,c.path),c.queryKey=Cj(c,c.query),c}function kj(e,t){const r=/\/{2,9}/g,s=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&s.splice(0,1),t.slice(-1)=="/"&&s.splice(s.length-1,1),s}function Cj(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,c){o&&(r[o]=c)}),r}let k2=class xs extends Ft{constructor(t,r={}){super(),this.binaryType=mj,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=Pf(t),r.hostname=t.host,r.secure=t.protocol==="https"||t.protocol==="wss",r.port=t.port,t.query&&(r.query=t.query)):r.host&&(r.hostname=Pf(r.host).host),Hd(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=cj(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=m2,r.transport=t,this.id&&(r.sid=this.id);const s=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new yj[t](s)}open(){let t;if(this.opts.rememberUpgrade&&xs.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",r=>this.onClose("transport close",r))}probe(t){let r=this.createTransport(t),s=!1;xs.priorWebsocketSuccess=!1;const o=()=>{s||(r.send([{type:"ping",data:"probe"}]),r.once("packet",P=>{if(!s)if(P.type==="pong"&&P.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;xs.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(E(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const B=new Error("probe error");B.transport=r.name,this.emitReserved("upgradeError",B)}}))};function c(){s||(s=!0,E(),r.close(),r=null)}const p=P=>{const B=new Error("probe error: "+P);B.transport=r.name,c(),this.emitReserved("upgradeError",B)};function v(){p("transport closed")}function C(){p("socket closed")}function A(P){r&&P.name!==r.name&&c()}const E=()=>{r.removeListener("open",o),r.removeListener("error",p),r.removeListener("close",v),this.off("close",C),this.off("upgrading",A)};r.once("open",o),r.once("error",p),r.once("close",v),this.once("close",C),this.once("upgrading",A),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||r.open()},200):r.open()}onOpen(){if(this.readyState="open",xs.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const r=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let s=0;s0&&r>this.maxPayload)return this.writeBuffer.slice(0,s);r+=2}return this.writeBuffer}write(t,r,s){return this.sendPacket("message",t,r,s),this}send(t,r,s){return this.sendPacket("message",t,r,s),this}sendPacket(t,r,s,o){if(typeof r=="function"&&(o=r,r=void 0),typeof s=="function"&&(o=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const c={type:t,data:r,options:s};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},s=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}onError(t){xs.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,r){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const r=[];let s=0;const o=t.length;for(;stypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,C2=Object.prototype.toString,Ej=typeof Blob=="function"||typeof Blob<"u"&&C2.call(Blob)==="[object BlobConstructor]",Lj=typeof File=="function"||typeof File<"u"&&C2.call(File)==="[object FileConstructor]";function k1(e){return jj&&(e instanceof ArrayBuffer||Nj(e))||Ej&&e instanceof Blob||Lj&&e instanceof File}function Ql(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,s=e.length;r=0&&e.num{delete this.acks[t];for(let p=0;p{this.io.clearTimeoutFn(c),r.apply(this,[null,...p])}}emitWithAck(t,...r){const s=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,c)=>{r.push((p,v)=>s?p?c(p):o(v):o(p)),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...c)=>s!==this._queue[0]?void 0:(o!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(o)):(this._queue.shift(),r&&r(null,...c)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ze.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ze.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ze.EVENT:case Ze.BINARY_EVENT:this.onevent(t);break;case Ze.ACK:case Ze.BINARY_ACK:this.onack(t);break;case Ze.DISCONNECT:this.ondisconnect();break;case Ze.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const s of r)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let s=!1;return function(...o){s||(s=!0,r.packet({type:Ze.ACK,id:t,data:o}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(r.apply(this,t.data),delete this.acks[t.id])}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ze.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let s=0;s0&&e.jitter<=1?e.jitter:0,this.attempts=0}ca.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0};ca.prototype.reset=function(){this.attempts=0};ca.prototype.setMin=function(e){this.ms=e};ca.prototype.setMax=function(e){this.max=e};ca.prototype.setJitter=function(e){this.jitter=e};class _f extends Yt{constructor(t,r){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Hd(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((s=r.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new ca({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const o=r.parser||Ij;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new k2(this.uri,this.opts);const r=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=Dr(r,"open",function(){s.onopen(),t&&t()}),c=v=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",v),t?t(v):this.maybeReconnectOnOpen()},p=Dr(r,"error",c);if(this._timeout!==!1){const v=this._timeout,C=this.setTimeoutFn(()=>{o(),c(new Error("timeout")),r.close()},v);this.opts.autoUnref&&C.unref(),this.subs.push(()=>{this.clearTimeoutFn(C)})}return this.subs.push(o),this.subs.push(p),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Dr(t,"ping",this.onping.bind(this)),Dr(t,"data",this.ondata.bind(this)),Dr(t,"error",this.onerror.bind(this)),Dr(t,"close",this.onclose.bind(this)),Dr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){w1(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new S2(this,t,r),this.nsps[t]=s),s}_destroy(t){const r=Object.keys(this.nsps);for(const s of r)if(this.nsps[s].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let s=0;st()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,r){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},r);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ja={};function Kl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=Sj(e,t.path||"/socket.io"),s=r.source,o=r.id,c=r.path,p=ja[o]&&c in ja[o].nsps,v=t.forceNew||t["force new connection"]||t.multiplex===!1||p;let C;return v?C=new _f(s,t):(ja[o]||(ja[o]=new _f(s,t)),C=ja[o]),r.query&&!t.query&&(t.query=r.queryKey),C.socket(r.path,t)}Object.assign(Kl,{Manager:_f,Socket:S2,io:Kl,connect:Kl});const Br=Kl(r1.apiUrl,{autoConnect:!0});function S1(){Br.auth={sessionId:nb()},Br.connected&&(Br.disconnect(),Br.connect())}S1();ts.on("sessionId.set",S1);ts.on("sessionId.clear",S1);const A1=G.createContext({socket:Br,isConnected:!1});function Dj({children:e}){const[t,r]=G.useState(Br.connected);return G.useEffect(()=>{function s(){r(!0)}function o(){r(!1)}return Br.on("connect",s),Br.on("disconnect",o),()=>{Br.off("connect",s),Br.off("disconnect",o)}},[]),f.jsx(A1.Provider,{value:{socket:Br,isConnected:t},children:e})}function Hj(){return G.useContext(A1)}function qc(e,t){const{socket:r}=G.useContext(A1);G.useEffect(()=>(r.on(e,t),()=>{r.off(e,t)}),[e,t])}const A2=e=>f.jsx("header",{className:"sticky top-0 z-999 flex w-full bg-captn-light-cream dark:bg-boxdark dark:drop-shadow-none",children:f.jsxs("div",{className:"flex flex-grow items-center justify-between sm:justify-end sm:gap-5 px-8 py-5 shadow ",children:[f.jsx("div",{className:"flex items-center gap-2 sm:gap-4 lg:hidden",children:f.jsx("button",{"aria-controls":"sidebar",onClick:t=>{t.stopPropagation(),e.setSidebarOpen(!e.sidebarOpen)},className:"z-99999 block rounded-sm border border-stroke bg-captn-light-cream p-1.5 shadow-sm dark:border-strokedark dark:bg-boxdark lg:hidden",children:f.jsxs("span",{className:"relative block h-5.5 w-5.5 cursor-pointer",children:[f.jsxs("span",{className:"du-block absolute right-0 h-full w-full",children:[f.jsx("span",{className:`relative top-0 left-0 my-1 block h-0.5 w-0 rounded-sm bg-black delay-[0] duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!w-full delay-300"}`}),f.jsx("span",{className:`relative top-0 left-0 my-1 block h-0.5 w-0 rounded-sm bg-black delay-150 duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"delay-400 !w-full"}`}),f.jsx("span",{className:`relative top-0 left-0 my-1 block h-0.5 w-0 rounded-sm bg-black delay-200 duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!w-full delay-500"}`})]}),f.jsxs("span",{className:"absolute right-0 h-full w-full rotate-45",children:[f.jsx("span",{className:`absolute left-2.5 top-0 block h-full w-0.5 rounded-sm bg-black delay-300 duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!h-0 !delay-[0]"}`}),f.jsx("span",{className:`delay-400 absolute left-0 top-2.5 block h-0.5 w-full rounded-sm bg-black duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!h-0 !delay-200"}`})]})]})})}),f.jsx("ul",{className:"flex items-center gap-2 2xsm:gap-4"}),f.jsx("div",{className:"flex items-center gap-3 2xsm:gap-7",children:!!e.user&&f.jsx(m1,{user:e.user})})]})}),j2="/assets/logo-for-dark-bg-B0Sa7V_h.png";function Bj(e){return os({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"}}]})(e)}const Vj=({chatId:e,chatName:t,onValueChange:r})=>{const[s,o]=G.useState(!1),[c,p]=G.useState(t),v=G.useRef(null);G.useEffect(()=>{var B;s&&((B=v.current)==null||B.focus())},[s]);const C=B=>{B.preventDefault(),o(!0)},A=B=>{p(B.target.value)},E=B=>{B.preventDefault(),r(e,c),o(!1)},P=()=>{r(e,c),o(!1)};return f.jsxs("div",{className:"editable-chat-name",style:{width:"170px"},children:[!s&&f.jsx("span",{className:"chat-name overflow-ellipsis overflow-hidden whitespace-nowrap",style:{display:"inherit"},children:c}),s&&f.jsx("form",{onSubmit:E,"data-testid":"edit-form",children:f.jsx("input",{ref:v,type:"text",onChange:A,onBlur:P,value:c,className:"w-5/6 focus:outline-none focus:ring-0 focus:border-captn-light-blue bg-captn-light-cream text-captn-dark-blue",style:{height:"23px",paddingLeft:"5px",marginLeft:"-5px"}})}),!s&&f.jsx("button",{className:"edit-button absolute right-3 top-3 text-xs",onClick:C,"data-testid":"edit-button",children:f.jsx(Bj,{})})]})},Wj=({sidebarOpen:e,setSidebarOpen:t})=>{const r=Mr(),s=na(),{pathname:o}=s,c=o.split("/").pop(),p=G.useRef(null),v=G.useRef(null),C=localStorage.getItem("sidebar-expanded"),[A,E]=G.useState(C===null?!1:C==="true"),P=async(D,Z)=>{try{await bi({id:D,data:{name:Z}})}catch{console.log("Unable to update the chat name. Please try again later.")}},{data:B,isLoading:M}=Un(jk);G.useEffect(()=>{const D=({target:Z})=>{!v.current||!p.current||!e||v.current.contains(Z)||p.current.contains(Z)||t(!1)};return document.addEventListener("click",D),()=>document.removeEventListener("click",D)}),G.useEffect(()=>{const D=({keyCode:Z})=>{!e||Z!==27||t(!1)};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)}),G.useEffect(()=>{var D,Z;localStorage.setItem("sidebar-expanded",A.toString()),A?(D=document.querySelector("body"))==null||D.classList.add("sidebar-expanded"):(Z=document.querySelector("body"))==null||Z.classList.remove("sidebar-expanded")},[A]);const H=async D=>{try{const Z=await Pb();r.push(`/chat/${Z.uuid}`)}catch(Z){console.log("Error: "+Z.message),Z.message==="No Subscription Found"?r.push("/pricing"):window.alert("Error: Something went wrong. Please try again later.")}};return f.jsxs("aside",{ref:v,className:`border-r-2 absolute left-0 top-0 z-9999 flex h-screen w-72.5 flex-col overflow-y-hidden bg-captn-dark-blue duration-300 ease-linear dark:bg-captn-dark-blue lg:static lg:translate-x-0 ${e?"translate-x-0":"-translate-x-full"}`,children:[f.jsxs("div",{className:"flex items-center gap-2 px-6 py-5.5 lg:py-3.5",children:[f.jsxs(f.Fragment,{children:[f.jsx(sr,{to:"/",children:f.jsx("img",{src:j2,alt:"Logo",className:"h-10 w-auto mt-2"})}),f.jsx("span",{className:"mt-2 text-sm font-semibold leading-6 dark:text-captn-light-cream",children:f.jsx("sup",{className:"text-base text-captn-light-blue",children:"βeta"})})]}),f.jsx("button",{ref:p,onClick:()=>t(!e),"aria-controls":"sidebar","aria-expanded":e,className:"block lg:hidden text-captn-light-cream",children:f.jsx("svg",{className:"fill-current",width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M19 8.175H2.98748L9.36248 1.6875C9.69998 1.35 9.69998 0.825 9.36248 0.4875C9.02498 0.15 8.49998 0.15 8.16248 0.4875L0.399976 8.3625C0.0624756 8.7 0.0624756 9.225 0.399976 9.5625L8.16248 17.4375C8.31248 17.5875 8.53748 17.7 8.76248 17.7C8.98748 17.7 9.17498 17.625 9.36248 17.475C9.69998 17.1375 9.69998 16.6125 9.36248 16.275L3.02498 9.8625H19C19.45 9.8625 19.825 9.4875 19.825 9.0375C19.825 8.55 19.45 8.175 19 8.175Z",fill:""})})})]}),f.jsx("div",{children:f.jsxs(rt,{to:"#",className:"no-underline mt-7 my-1 mx-4 mb-10 flex items-center justify-left gap-2.5 rounded-md bg-captn-cta-green py-4 px-4 text-center font-medium text-captn-light-cream hover:bg-opacity-90",onClick:H,children:[f.jsx("span",{children:f.jsxs("svg",{stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",className:"icon-sm shrink-0",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),"New chat"]})}),f.jsx("div",{className:"no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear",children:f.jsx("nav",{className:"mt-1 py-1 px-4 ",children:f.jsxs("div",{children:[f.jsx("h3",{className:"mb-4 ml-4 text-sm font-semibold text-bodydark2",children:"CHATS"}),f.jsx("ul",{className:"mb-6 flex flex-col gap-1.5",children:f.jsx("li",{children:B&&B.map((D,Z)=>f.jsxs(sr,{to:`/chat/${D.uuid}?`,className:`chat-link relative no-underline group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out ${o==="/"&&"bg-gray-700 dark:bg-meta-4"} ${D.uuid===c?"bg-captn-light-cream text-captn-dark-blue hover:bg-captn-light-blue hover:text-captn-dark-blue":"text-captn-light-cream hover:bg-captn-light-blue hover:text-captn-dark-blue"}`,children:[f.jsx("svg",{stroke:"currentColor",fill:"none",strokeWidth:"2",viewBox:"0 0 24 24",strokeLinecap:"round",strokeLinejoin:"round",className:"icon-sm",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),f.jsx("span",{className:"ml-3",children:f.jsx(Vj,{chatId:D.id,chatName:D.name?D.name:"",onValueChange:P})})]},D.id))})})]})})})]})};function $j({handleFormSubmit:e,currentChatDetails:t,googleRedirectLoginMsg:r}){const[s,o]=G.useState(""),c=G.useCallback(async v=>{v!==null&&r&&await e(r,!0)},[r]),p=async v=>{if(v.preventDefault(),!t.showLoader){const A=v.target.userQuery.value;o(""),e(A)}};return f.jsx("div",{"data-testid":"chat-form",className:"mt-2 mb-2",children:f.jsxs("form",{onSubmit:p,className:"",children:[f.jsx("label",{htmlFor:"search",className:"mb-2 text-sm font-medium text-captn-dark-blue sr-only dark:text-captn-light-cream",children:"Search"}),f.jsxs("div",{className:"relative bottom-0 left-0 right-0 flex items-center justify-between m-1",children:[f.jsx("input",{type:"search",id:"userQuery",name:"search",className:"block rounded-lg w-full h-12 text-sm text-captn-light-cream bg-captn-dark-blue focus:outline-none focus:ring-0 focus:border-captn-light-blue",placeholder:"Message Capt’n...",required:!0,ref:c,value:s,onChange:v=>o(v.target.value)}),f.jsx("button",{type:"submit",className:"text-captn-light-cream bg-captn-cta-green hover:bg-captn-cta-green-hover absolute right-2 font-medium rounded-lg text-sm px-1.5 py-1.5",children:f.jsx("span",{className:"",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-captn-light-cream",children:f.jsx("path",{d:"M7 11L12 6L17 11M12 18V7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]})})}const Xj=({children:e,handleFormSubmit:t,currentChatDetails:r,googleRedirectLoginMsg:s})=>{const[o,c]=G.useState(!1),{data:p}=Qr(),v=G.useRef(null),C=Mr();return G.useEffect(()=>{p!=null&&p.hasPaid||C.push("/pricing")},[p,C]),G.useEffect(()=>{const A=new MutationObserver(()=>{v.current&&v.current.scrollTo({top:v.current.scrollHeight,behavior:"smooth"})});return v.current&&A.observe(v.current,{childList:!0,subtree:!0}),()=>A.disconnect()},[]),f.jsx("div",{className:"dark:bg-boxdark-2 dark:text-bodydark bg-captn-light-blue",children:f.jsxs("div",{className:"flex h-screen overflow-hidden",children:[f.jsx(Wj,{sidebarOpen:o,setSidebarOpen:c}),f.jsxs("div",{className:"relative flex flex-1 flex-col overflow-y-auto overflow-x-hidden",children:[f.jsx(A2,{sidebarOpen:o,setSidebarOpen:c,user:p}),f.jsx("main",{className:"flex-auto overflow-y-auto",ref:v,children:f.jsx("div",{children:e})}),r?f.jsx($j,{handleFormSubmit:t,currentChatDetails:r,googleRedirectLoginMsg:s}):f.jsx(f.Fragment,{})]})]})})};function zn(){return zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),y0={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Uj=["style","script"],Gj=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Zj=/mailto:/i,qj=/\n{2,}$/,N2=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,Qj=/^ *> ?/gm,Kj=/^ {2,}\n/,Jj=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,E2=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,L2=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,eN=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,tN=/^(?:\n *)*\n/,rN=/\r\n?/g,iN=/^\[\^([^\]]+)](:.*)\n/,nN=/^\[\^([^\]]+)]/,sN=/\f/g,aN=/^\s*?\[(x|\s)\]/,P2=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,T2=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,R2=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Mf=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,oN=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,_2=/^)/,lN=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Of=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,cN=/^\{.*\}$/,dN=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,uN=/^<([^ >]+@[^ >]+)>/,hN=/^<([^ >]+:\/[^ >]+)>/,fN=/-([a-z])?/gi,M2=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,pN=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,gN=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,mN=/^\[([^\]]*)\] ?\[([^\]]*)\]/,xN=/(\[|\])/g,vN=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,yN=/\t/g,bN=/^ *\| */,wN=/(^ *\||\| *$)/g,kN=/ *$/,CN=/^ *:-+: *$/,SN=/^ *:-+ *$/,AN=/^ *-+: *$/,jN=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,NN=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,EN=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,LN=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,PN=/^\\([^0-9A-Za-z\s])/,TN=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,RN=/^\n+/,_N=/^([ \t]*)/,MN=/\\([^\\])/g,b0=/ *\n+$/,ON=/(?:^|\n)( *)$/,j1="(?:\\d+\\.)",N1="(?:[*+-])";function O2(e){return"( *)("+(e===1?j1:N1)+") +"}const I2=O2(1),z2=O2(2);function F2(e){return new RegExp("^"+(e===1?I2:z2))}const IN=F2(1),zN=F2(2);function D2(e){return new RegExp("^"+(e===1?I2:z2)+"[^\\n]*(?:\\n(?!\\1"+(e===1?j1:N1)+" )[^\\n]*)*(\\n|$)","gm")}const H2=D2(1),B2=D2(2);function V2(e){const t=e===1?j1:N1;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const W2=V2(1),$2=V2(2);function w0(e,t){const r=t===1,s=r?W2:$2,o=r?H2:B2,c=r?IN:zN;return{t(p,v,C){const A=ON.exec(C);return A&&(v.o||!v._&&!v.u)?s.exec(p=A[1]+p):null},i:Ge.HIGH,l(p,v,C){const A=r?+p[2]:void 0,E=p[0].replace(qj,` +`).match(o);let P=!1;return{p:E.map(function(B,M){const H=c.exec(B)[0].length,D=new RegExp("^ {1,"+H+"}","gm"),Z=B.replace(D,"").replace(c,""),W=M===E.length-1,V=Z.indexOf(` `)!==-1||W&&P;P=V;const _=C._,K=C.o;let ee;C.o=!0,V?(C._=!1,ee=Z.replace(b0,` -`)):(C._=!0,ee=Z.replace(b0,""));const X=v(ee,C);return C._=_,C.o=K,X}),m:r,g:A}},h:(p,v,C)=>e(p.m?"ol":"ul",{key:C.k,start:p.g},p.p.map(function(A,L){return e("li",{key:L},v(A,C))}))}}const zN=/^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,FN=/^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,X2=[N2,E2,L2,P2,R2,T2,_2,M2,H2,W2,B2,$2],DN=[...X2,/^[^\n]+(?: \n|\n{2,})/,Mf,Of];function HN(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function BN(e){return SN.test(e)?"right":kN.test(e)?"center":CN.test(e)?"left":null}function k0(e,t,r){const s=r.$;r.$=!0;const o=t(e.trim(),r);r.$=s;let c=[[]];return o.forEach(function(p,v){p.type==="tableSeparator"?v!==0&&v!==o.length-1&&c.push([]):(p.type!=="text"||o[v+1]!=null&&o[v+1].type!=="tableSeparator"||(p.v=p.v.replace(wN,"")),c[c.length-1].push(p))}),c}function VN(e,t,r){r._=!0;const s=k0(e[1],t,r),o=e[2].replace(bN,"").split("|").map(BN),c=function(p,v,C){return p.trim().split(` -`).map(function(A){return k0(A,v,C)})}(e[3],t,r);return r._=!1,{S:o,A:c,L:s,type:"table"}}function C0(e,t){return e.S[t]==null?{}:{textAlign:e.S[t]}}function Xi(e){return function(t,r){return r._?e.exec(t):null}}function Yi(e){return function(t,r){return r._||r.u?e.exec(t):null}}function xi(e){return function(t,r){return r._||r.u?null:e.exec(t)}}function ja(e){return function(t){return e.exec(t)}}function WN(e,t,r){if(t._||t.u||r&&!r.endsWith(` +`)):(C._=!0,ee=Z.replace(b0,""));const X=v(ee,C);return C._=_,C.o=K,X}),m:r,g:A}},h:(p,v,C)=>e(p.m?"ol":"ul",{key:C.k,start:p.g},p.p.map(function(A,E){return e("li",{key:E},v(A,C))}))}}const FN=/^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,DN=/^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,X2=[N2,E2,L2,P2,R2,T2,_2,M2,H2,W2,B2,$2],HN=[...X2,/^[^\n]+(?: \n|\n{2,})/,Mf,Of];function BN(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function VN(e){return AN.test(e)?"right":CN.test(e)?"center":SN.test(e)?"left":null}function k0(e,t,r){const s=r.$;r.$=!0;const o=t(e.trim(),r);r.$=s;let c=[[]];return o.forEach(function(p,v){p.type==="tableSeparator"?v!==0&&v!==o.length-1&&c.push([]):(p.type!=="text"||o[v+1]!=null&&o[v+1].type!=="tableSeparator"||(p.v=p.v.replace(kN,"")),c[c.length-1].push(p))}),c}function WN(e,t,r){r._=!0;const s=k0(e[1],t,r),o=e[2].replace(wN,"").split("|").map(VN),c=function(p,v,C){return p.trim().split(` +`).map(function(A){return k0(A,v,C)})}(e[3],t,r);return r._=!1,{S:o,A:c,L:s,type:"table"}}function C0(e,t){return e.S[t]==null?{}:{textAlign:e.S[t]}}function Xi(e){return function(t,r){return r._?e.exec(t):null}}function Yi(e){return function(t,r){return r._||r.u?e.exec(t):null}}function xi(e){return function(t,r){return r._||r.u?null:e.exec(t)}}function Na(e){return function(t){return e.exec(t)}}function $N(e,t,r){if(t._||t.u||r&&!r.endsWith(` `))return null;let s="";e.split(` `).every(c=>!X2.some(p=>p.test(c))&&(s+=c+` -`,c.trim()));const o=s.trimEnd();return o==""?null:[s,o]}function ps(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch{return null}return e}function S0(e){return e.replace(_N,"$1")}function Jl(e,t,r){const s=r._||!1,o=r.u||!1;r._=!0,r.u=!0;const c=e(t,r);return r._=s,r.u=o,c}function $N(e,t,r){const s=r._||!1,o=r.u||!1;r._=!1,r.u=!0;const c=e(t,r);return r._=s,r.u=o,c}function XN(e,t,r){return r._=!1,e(t,r)}const Yu=(e,t,r)=>({v:Jl(t,e[1],r)});function Uu(){return{}}function Gu(){return null}function YN(...e){return e.filter(Boolean).join(" ")}function Zu(e,t,r){let s=e;const o=t.split(".");for(;o.length&&(s=s[o[0]],s!==void 0);)o.shift();return s||r}var Ge;function UN(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||HN,t.namedCodesToUnicode=t.namedCodesToUnicode?zn({},y0,t.namedCodesToUnicode):y0;const r=t.createElement||G.createElement;function s(M,H,...D){const Z=Zu(t.overrides,`${M}.props`,{});return r(function(W,V){const _=Zu(V,W);return _?typeof _=="function"||typeof _=="object"&&"render"in _?_:Zu(V,`${W}.component`,W):W}(M,t.overrides),zn({},H,Z,{className:YN(H==null?void 0:H.className,Z.className)||void 0}),...D)}function o(M){let H=!1;t.forceInline?H=!0:t.forceBlock||(H=xN.test(M)===!1);const D=L(A(H?M:`${M.trimEnd().replace(TN,"")} +`,c.trim()));const o=s.trimEnd();return o==""?null:[s,o]}function gs(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch{return null}return e}function S0(e){return e.replace(MN,"$1")}function Jl(e,t,r){const s=r._||!1,o=r.u||!1;r._=!0,r.u=!0;const c=e(t,r);return r._=s,r.u=o,c}function XN(e,t,r){const s=r._||!1,o=r.u||!1;r._=!1,r.u=!0;const c=e(t,r);return r._=s,r.u=o,c}function YN(e,t,r){return r._=!1,e(t,r)}const Yu=(e,t,r)=>({v:Jl(t,e[1],r)});function Uu(){return{}}function Gu(){return null}function UN(...e){return e.filter(Boolean).join(" ")}function Zu(e,t,r){let s=e;const o=t.split(".");for(;o.length&&(s=s[o[0]],s!==void 0);)o.shift();return s||r}var Ge;function GN(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||BN,t.namedCodesToUnicode=t.namedCodesToUnicode?zn({},y0,t.namedCodesToUnicode):y0;const r=t.createElement||G.createElement;function s(M,H,...D){const Z=Zu(t.overrides,`${M}.props`,{});return r(function(W,V){const _=Zu(V,W);return _?typeof _=="function"||typeof _=="object"&&"render"in _?_:Zu(V,`${W}.component`,W):W}(M,t.overrides),zn({},H,Z,{className:UN(H==null?void 0:H.className,Z.className)||void 0}),...D)}function o(M){let H=!1;t.forceInline?H=!0:t.forceBlock||(H=vN.test(M)===!1);const D=E(A(H?M:`${M.trimEnd().replace(RN,"")} -`,{_:H}));for(;typeof D[D.length-1]=="string"&&!D[D.length-1].trim();)D.pop();if(t.wrapper===null)return D;const Z=t.wrapper||(H?"span":"div");let W;if(D.length>1||t.forceWrapper)W=D;else{if(D.length===1)return W=D[0],typeof W=="string"?s("span",{key:"outer"},W):W;W=null}return G.createElement(Z,{key:"outer"},W)}function c(M){const H=M.match(Uj);return H?H.reduce(function(D,Z,W){const V=Z.indexOf("=");if(V!==-1){const _=function(q){return q.indexOf("-")!==-1&&q.match(oN)===null&&(q=q.replace(hN,function(J,me){return me.toUpperCase()})),q}(Z.slice(0,V)).trim(),K=function(q){const J=q[0];return(J==='"'||J==="'")&&q.length>=2&&q[q.length-1]===J?q.slice(1,-1):q}(Z.slice(V+1).trim()),ee=v0[_]||_,X=D[ee]=function(q,J){return q==="style"?J.split(/;\s?/).reduce(function(me,ce){const Te=ce.slice(0,ce.indexOf(":"));return me[Te.replace(/(-[a-z])/g,we=>we[1].toUpperCase())]=ce.slice(Te.length+1).trim(),me},{}):q==="href"?ps(J):(J.match(lN)&&(J=J.slice(1,J.length-1)),J==="true"||J!=="false"&&J)}(_,K);typeof X=="string"&&(Mf.test(X)||Of.test(X))&&(D[ee]=G.cloneElement(o(X.trim()),{key:W}))}else Z!=="style"&&(D[v0[Z]||Z]=!0);return D},{}):null}const p=[],v={},C={blockQuote:{t:xi(N2),i:Ge.HIGH,l:(M,H,D)=>({v:H(M[0].replace(qj,""),D)}),h:(M,H,D)=>s("blockquote",{key:D.k},H(M.v,D))},breakLine:{t:ja(Qj),i:Ge.HIGH,l:Uu,h:(M,H,D)=>s("br",{key:D.k})},breakThematic:{t:xi(Kj),i:Ge.HIGH,l:Uu,h:(M,H,D)=>s("hr",{key:D.k})},codeBlock:{t:xi(L2),i:Ge.MAX,l:M=>({v:M[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(M,H,D)=>s("pre",{key:D.k},s("code",zn({},M.O,{className:M.M?`lang-${M.M}`:""}),M.v))},codeFenced:{t:xi(E2),i:Ge.MAX,l:M=>({O:c(M[3]||""),v:M[4],M:M[2]||void 0,type:"codeBlock"})},codeInline:{t:Yi(Jj),i:Ge.LOW,l:M=>({v:M[2]}),h:(M,H,D)=>s("code",{key:D.k},M.v)},footnote:{t:xi(rN),i:Ge.MAX,l:M=>(p.push({I:M[2],j:M[1]}),{}),h:Gu},footnoteReference:{t:Xi(iN),i:Ge.HIGH,l:M=>({v:M[1],B:`#${t.slugify(M[1])}`}),h:(M,H,D)=>s("a",{key:D.k,href:ps(M.B)},s("sup",{key:D.k},M.v))},gfmTask:{t:Xi(sN),i:Ge.HIGH,l:M=>({R:M[1].toLowerCase()==="x"}),h:(M,H,D)=>s("input",{checked:M.R,key:D.k,readOnly:!0,type:"checkbox"})},heading:{t:xi(t.enforceAtxHeadings?T2:P2),i:Ge.HIGH,l:(M,H,D)=>({v:Jl(H,M[2],D),T:t.slugify(M[2]),C:M[1].length}),h:(M,H,D)=>s(`h${M.C}`,{id:M.T,key:D.k},H(M.v,D))},headingSetext:{t:xi(R2),i:Ge.MAX,l:(M,H,D)=>({v:Jl(H,M[1],D),C:M[2]==="="?1:2,type:"heading"})},htmlComment:{t:ja(_2),i:Ge.HIGH,l:()=>({}),h:Gu},image:{t:Yi(FN),i:Ge.HIGH,l:M=>({D:M[1],B:S0(M[2]),F:M[3]}),h:(M,H,D)=>s("img",{key:D.k,alt:M.D||void 0,title:M.F||void 0,src:ps(M.B)})},link:{t:Xi(zN),i:Ge.LOW,l:(M,H,D)=>({v:$N(H,M[1],D),B:S0(M[2]),F:M[3]}),h:(M,H,D)=>s("a",{key:D.k,href:ps(M.B),title:M.F},H(M.v,D))},linkAngleBraceStyleDetector:{t:Xi(uN),i:Ge.MAX,l:M=>({v:[{v:M[1],type:"text"}],B:M[1],type:"link"})},linkBareUrlDetector:{t:(M,H)=>H.N?null:Xi(cN)(M,H),i:Ge.MAX,l:M=>({v:[{v:M[1],type:"text"}],B:M[1],F:void 0,type:"link"})},linkMailtoDetector:{t:Xi(dN),i:Ge.MAX,l(M){let H=M[1],D=M[1];return Gj.test(D)||(D="mailto:"+D),{v:[{v:H.replace("mailto:",""),type:"text"}],B:D,type:"link"}}},orderedList:w0(s,1),unorderedList:w0(s,2),newlineCoalescer:{t:xi(eN),i:Ge.LOW,l:Uu,h:()=>` -`},paragraph:{t:WN,i:Ge.LOW,l:Yu,h:(M,H,D)=>s("p",{key:D.k},H(M.v,D))},ref:{t:Xi(fN),i:Ge.MAX,l:M=>(v[M[1]]={B:M[2],F:M[4]},{}),h:Gu},refImage:{t:Yi(pN),i:Ge.MAX,l:M=>({D:M[1]||void 0,P:M[2]}),h:(M,H,D)=>s("img",{key:D.k,alt:M.D,src:ps(v[M.P].B),title:v[M.P].F})},refLink:{t:Xi(gN),i:Ge.MAX,l:(M,H,D)=>({v:H(M[1],D),Z:H(M[0].replace(mN,"\\$1"),D),P:M[2]}),h:(M,H,D)=>v[M.P]?s("a",{key:D.k,href:ps(v[M.P].B),title:v[M.P].F},H(M.v,D)):s("span",{key:D.k},H(M.Z,D))},table:{t:xi(M2),i:Ge.HIGH,l:VN,h:(M,H,D)=>s("table",{key:D.k},s("thead",null,s("tr",null,M.L.map(function(Z,W){return s("th",{key:W,style:C0(M,W)},H(Z,D))}))),s("tbody",null,M.A.map(function(Z,W){return s("tr",{key:W},Z.map(function(V,_){return s("td",{key:_,style:C0(M,_)},H(V,D))}))})))},tableSeparator:{t:function(M,H){return H.$?(H._=!0,yN.exec(M)):null},i:Ge.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:ja(PN),i:Ge.MIN,l:M=>({v:M[0].replace(aN,(H,D)=>t.namedCodesToUnicode[D]?t.namedCodesToUnicode[D]:H)}),h:M=>M.v},textBolded:{t:Yi(AN),i:Ge.MED,l:(M,H,D)=>({v:H(M[2],D)}),h:(M,H,D)=>s("strong",{key:D.k},H(M.v,D))},textEmphasized:{t:Yi(jN),i:Ge.LOW,l:(M,H,D)=>({v:H(M[2],D)}),h:(M,H,D)=>s("em",{key:D.k},H(M.v,D))},textEscaped:{t:Yi(LN),i:Ge.HIGH,l:M=>({v:M[1],type:"text"})},textMarked:{t:Yi(NN),i:Ge.LOW,l:Yu,h:(M,H,D)=>s("mark",{key:D.k},H(M.v,D))},textStrikethroughed:{t:Yi(EN),i:Ge.LOW,l:Yu,h:(M,H,D)=>s("del",{key:D.k},H(M.v,D))}};t.disableParsingRawHTML!==!0&&(C.htmlBlock={t:ja(Mf),i:Ge.HIGH,l(M,H,D){const[,Z]=M[3].match(RN),W=new RegExp(`^${Z}`,"gm"),V=M[3].replace(W,""),_=(K=V,DN.some(J=>J.test(K))?XN:Jl);var K;const ee=M[1].toLowerCase(),X=Yj.indexOf(ee)!==-1;D.N=D.N||ee==="a";const q=X?M[3]:_(H,V,D);return D.N=!1,{O:c(M[2]),v:q,G:X,H:X?ee:M[1]}},h:(M,H,D)=>s(M.H,zn({key:D.k},M.O),M.G?M.v:H(M.v,D))},C.htmlSelfClosing={t:ja(Of),i:Ge.HIGH,l:M=>({O:c(M[2]||""),H:M[1]}),h:(M,H,D)=>s(M.H,zn({},M.O,{key:D.k}))});const A=function(M){let H=Object.keys(M);function D(Z,W){let V=[],_="";for(;Z;){let K=0;for(;K{let{children:t,options:r}=e,s=function(o,c){if(o==null)return{};var p,v,C={},A=Object.keys(o);for(v=0;v=0||(C[p]=o[p]);return C}(e,Xj);return G.cloneElement(UN(t,r),s)};function GN({currentChatDetails:e,smartSuggestionOnClick:t}){const[r,s]=G.useState(!0),o=Mr(),c=e.smartSuggestions.suggestions;async function p(v,C){if(e.isExceptionOccured)if(e.chatType==="daily_analysis"){const A=await yk(e);o.push(`/chat/${A.id}`)}else{const A=await Pb();o.push(`/chat/${A.id}`)}else C(v),s(!1)}return f.jsx("div",{children:f.jsx("div",{className:" pb-4 flex items-center group bg-captn-dark-blue",children:f.jsxs("div",{style:{maxWidth:"800px",margin:"auto"},className:`fade-in relative ml-3 block w-full px-4 rounded-lg bg-captn-light-green ${r?"opacity-100":"opacity-0"}}`,children:[f.jsx("div",{className:"ml-5 chat-conversations text-base flex flex-wrap",children:c.map((v,C)=>f.jsx("button",{className:" bg-captn-cta-green hover:bg-captn-cta-green-hover font-medium rounded-lg text-sm px-3 py-2 m-1 text-captn-light-cream",onClick:()=>p(v,t),children:f.jsx(Qc,{children:v})},C))}),!e.isExceptionOccured&&f.jsx("p",{className:"my-2 ml-6 pt-2 text-captn-light-cream",children:"You can choose from the listed options above or type your own answers in the input field below."})]})})})}const ZN=(e,t)=>{if(e.length>0&&e.length>0){const r=`Let's proceed with the following ${e.length>1?"choices":"choice"}: +`,{_:H}));for(;typeof D[D.length-1]=="string"&&!D[D.length-1].trim();)D.pop();if(t.wrapper===null)return D;const Z=t.wrapper||(H?"span":"div");let W;if(D.length>1||t.forceWrapper)W=D;else{if(D.length===1)return W=D[0],typeof W=="string"?s("span",{key:"outer"},W):W;W=null}return G.createElement(Z,{key:"outer"},W)}function c(M){const H=M.match(Gj);return H?H.reduce(function(D,Z,W){const V=Z.indexOf("=");if(V!==-1){const _=function(Q){return Q.indexOf("-")!==-1&&Q.match(lN)===null&&(Q=Q.replace(fN,function(J,he){return he.toUpperCase()})),Q}(Z.slice(0,V)).trim(),K=function(Q){const J=Q[0];return(J==='"'||J==="'")&&Q.length>=2&&Q[Q.length-1]===J?Q.slice(1,-1):Q}(Z.slice(V+1).trim()),ee=v0[_]||_,X=D[ee]=function(Q,J){return Q==="style"?J.split(/;\s?/).reduce(function(he,oe){const Te=oe.slice(0,oe.indexOf(":"));return he[Te.replace(/(-[a-z])/g,we=>we[1].toUpperCase())]=oe.slice(Te.length+1).trim(),he},{}):Q==="href"?gs(J):(J.match(cN)&&(J=J.slice(1,J.length-1)),J==="true"||J!=="false"&&J)}(_,K);typeof X=="string"&&(Mf.test(X)||Of.test(X))&&(D[ee]=G.cloneElement(o(X.trim()),{key:W}))}else Z!=="style"&&(D[v0[Z]||Z]=!0);return D},{}):null}const p=[],v={},C={blockQuote:{t:xi(N2),i:Ge.HIGH,l:(M,H,D)=>({v:H(M[0].replace(Qj,""),D)}),h:(M,H,D)=>s("blockquote",{key:D.k},H(M.v,D))},breakLine:{t:Na(Kj),i:Ge.HIGH,l:Uu,h:(M,H,D)=>s("br",{key:D.k})},breakThematic:{t:xi(Jj),i:Ge.HIGH,l:Uu,h:(M,H,D)=>s("hr",{key:D.k})},codeBlock:{t:xi(L2),i:Ge.MAX,l:M=>({v:M[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(M,H,D)=>s("pre",{key:D.k},s("code",zn({},M.O,{className:M.M?`lang-${M.M}`:""}),M.v))},codeFenced:{t:xi(E2),i:Ge.MAX,l:M=>({O:c(M[3]||""),v:M[4],M:M[2]||void 0,type:"codeBlock"})},codeInline:{t:Yi(eN),i:Ge.LOW,l:M=>({v:M[2]}),h:(M,H,D)=>s("code",{key:D.k},M.v)},footnote:{t:xi(iN),i:Ge.MAX,l:M=>(p.push({I:M[2],j:M[1]}),{}),h:Gu},footnoteReference:{t:Xi(nN),i:Ge.HIGH,l:M=>({v:M[1],B:`#${t.slugify(M[1])}`}),h:(M,H,D)=>s("a",{key:D.k,href:gs(M.B)},s("sup",{key:D.k},M.v))},gfmTask:{t:Xi(aN),i:Ge.HIGH,l:M=>({R:M[1].toLowerCase()==="x"}),h:(M,H,D)=>s("input",{checked:M.R,key:D.k,readOnly:!0,type:"checkbox"})},heading:{t:xi(t.enforceAtxHeadings?T2:P2),i:Ge.HIGH,l:(M,H,D)=>({v:Jl(H,M[2],D),T:t.slugify(M[2]),C:M[1].length}),h:(M,H,D)=>s(`h${M.C}`,{id:M.T,key:D.k},H(M.v,D))},headingSetext:{t:xi(R2),i:Ge.MAX,l:(M,H,D)=>({v:Jl(H,M[1],D),C:M[2]==="="?1:2,type:"heading"})},htmlComment:{t:Na(_2),i:Ge.HIGH,l:()=>({}),h:Gu},image:{t:Yi(DN),i:Ge.HIGH,l:M=>({D:M[1],B:S0(M[2]),F:M[3]}),h:(M,H,D)=>s("img",{key:D.k,alt:M.D||void 0,title:M.F||void 0,src:gs(M.B)})},link:{t:Xi(FN),i:Ge.LOW,l:(M,H,D)=>({v:XN(H,M[1],D),B:S0(M[2]),F:M[3]}),h:(M,H,D)=>s("a",{key:D.k,href:gs(M.B),title:M.F},H(M.v,D))},linkAngleBraceStyleDetector:{t:Xi(hN),i:Ge.MAX,l:M=>({v:[{v:M[1],type:"text"}],B:M[1],type:"link"})},linkBareUrlDetector:{t:(M,H)=>H.N?null:Xi(dN)(M,H),i:Ge.MAX,l:M=>({v:[{v:M[1],type:"text"}],B:M[1],F:void 0,type:"link"})},linkMailtoDetector:{t:Xi(uN),i:Ge.MAX,l(M){let H=M[1],D=M[1];return Zj.test(D)||(D="mailto:"+D),{v:[{v:H.replace("mailto:",""),type:"text"}],B:D,type:"link"}}},orderedList:w0(s,1),unorderedList:w0(s,2),newlineCoalescer:{t:xi(tN),i:Ge.LOW,l:Uu,h:()=>` +`},paragraph:{t:$N,i:Ge.LOW,l:Yu,h:(M,H,D)=>s("p",{key:D.k},H(M.v,D))},ref:{t:Xi(pN),i:Ge.MAX,l:M=>(v[M[1]]={B:M[2],F:M[4]},{}),h:Gu},refImage:{t:Yi(gN),i:Ge.MAX,l:M=>({D:M[1]||void 0,P:M[2]}),h:(M,H,D)=>s("img",{key:D.k,alt:M.D,src:gs(v[M.P].B),title:v[M.P].F})},refLink:{t:Xi(mN),i:Ge.MAX,l:(M,H,D)=>({v:H(M[1],D),Z:H(M[0].replace(xN,"\\$1"),D),P:M[2]}),h:(M,H,D)=>v[M.P]?s("a",{key:D.k,href:gs(v[M.P].B),title:v[M.P].F},H(M.v,D)):s("span",{key:D.k},H(M.Z,D))},table:{t:xi(M2),i:Ge.HIGH,l:WN,h:(M,H,D)=>s("table",{key:D.k},s("thead",null,s("tr",null,M.L.map(function(Z,W){return s("th",{key:W,style:C0(M,W)},H(Z,D))}))),s("tbody",null,M.A.map(function(Z,W){return s("tr",{key:W},Z.map(function(V,_){return s("td",{key:_,style:C0(M,_)},H(V,D))}))})))},tableSeparator:{t:function(M,H){return H.$?(H._=!0,bN.exec(M)):null},i:Ge.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Na(TN),i:Ge.MIN,l:M=>({v:M[0].replace(oN,(H,D)=>t.namedCodesToUnicode[D]?t.namedCodesToUnicode[D]:H)}),h:M=>M.v},textBolded:{t:Yi(jN),i:Ge.MED,l:(M,H,D)=>({v:H(M[2],D)}),h:(M,H,D)=>s("strong",{key:D.k},H(M.v,D))},textEmphasized:{t:Yi(NN),i:Ge.LOW,l:(M,H,D)=>({v:H(M[2],D)}),h:(M,H,D)=>s("em",{key:D.k},H(M.v,D))},textEscaped:{t:Yi(PN),i:Ge.HIGH,l:M=>({v:M[1],type:"text"})},textMarked:{t:Yi(EN),i:Ge.LOW,l:Yu,h:(M,H,D)=>s("mark",{key:D.k},H(M.v,D))},textStrikethroughed:{t:Yi(LN),i:Ge.LOW,l:Yu,h:(M,H,D)=>s("del",{key:D.k},H(M.v,D))}};t.disableParsingRawHTML!==!0&&(C.htmlBlock={t:Na(Mf),i:Ge.HIGH,l(M,H,D){const[,Z]=M[3].match(_N),W=new RegExp(`^${Z}`,"gm"),V=M[3].replace(W,""),_=(K=V,HN.some(J=>J.test(K))?YN:Jl);var K;const ee=M[1].toLowerCase(),X=Uj.indexOf(ee)!==-1;D.N=D.N||ee==="a";const Q=X?M[3]:_(H,V,D);return D.N=!1,{O:c(M[2]),v:Q,G:X,H:X?ee:M[1]}},h:(M,H,D)=>s(M.H,zn({key:D.k},M.O),M.G?M.v:H(M.v,D))},C.htmlSelfClosing={t:Na(Of),i:Ge.HIGH,l:M=>({O:c(M[2]||""),H:M[1]}),h:(M,H,D)=>s(M.H,zn({},M.O,{key:D.k}))});const A=function(M){let H=Object.keys(M);function D(Z,W){let V=[],_="";for(;Z;){let K=0;for(;K{let{children:t,options:r}=e,s=function(o,c){if(o==null)return{};var p,v,C={},A=Object.keys(o);for(v=0;v=0||(C[p]=o[p]);return C}(e,Yj);return G.cloneElement(GN(t,r),s)};function ZN({currentChatDetails:e,smartSuggestionOnClick:t}){const[r,s]=G.useState(!0),o=Mr(),c=e.smartSuggestions.suggestions;async function p(v,C){if(e.isExceptionOccured)if(e.chatType==="daily_analysis"){const A=await yk(e);o.push(`/chat/${A.id}`)}else{const A=await Pb();o.push(`/chat/${A.id}`)}else C(v),s(!1)}return f.jsx("div",{children:f.jsx("div",{className:" pb-4 flex items-center group bg-captn-dark-blue",children:f.jsxs("div",{style:{maxWidth:"800px",margin:"auto"},className:`fade-in relative ml-3 block w-full px-4 rounded-lg bg-captn-light-green ${r?"opacity-100":"opacity-0"}}`,children:[f.jsx("div",{className:"ml-5 chat-conversations text-base flex flex-wrap",children:c.map((v,C)=>f.jsx("button",{className:" bg-captn-cta-green hover:bg-captn-cta-green-hover font-medium rounded-lg text-sm px-3 py-2 m-1 text-captn-light-cream",onClick:()=>p(v,t),children:f.jsx(Qc,{children:v})},C))}),!e.isExceptionOccured&&f.jsx("p",{className:"my-2 ml-6 pt-2 text-captn-light-cream",children:"You can choose from the listed options above or type your own answers in the input field below."})]})})})}const qN=(e,t)=>{if(e.length>0&&e.length>0){const r=`Let's proceed with the following ${e.length>1?"choices":"choice"}: - ${e.join(` -- `)}`;t(r)}};function qN({suggestions:e,smartSuggestionOnClick:t,chatType:r,userSelectedActionMessage:s}){const[o,c]=G.useState([]),p=v=>{const C=v.target.value;v.target.checked?c([...o,C]):c(o.filter(A=>A!==C))};return G.useEffect(()=>{s&&c([...o,s])},[s]),f.jsx("div",{className:"pb-4 flex items-center group bg-captn-dark-blue",children:f.jsxs("div",{style:{maxWidth:"800px",margin:"auto"},className:"fade-in relative ml-3 block w-full px-4 rounded-lg bg-captn-light-green ",children:[r==="daily_analysis"&&f.jsx("hr",{className:" bg-gray-200 border-1"}),r==="daily_analysis"&&f.jsx("p",{className:"block text-bold text-captn-light-cream",style:{margin:"20px 0"},children:f.jsx("b",{children:"If you've made a selection through email, the option is pre-selected but can be changed. You can opt for all or just a few options as desired, and then click the send button. Alternatively, you can type your own responses in the input field below."})}),f.jsx("div",{className:"ml-6 chat-conversations text-base flex flex-col",children:e.map((v,C)=>f.jsxs("label",{className:"flex items-center me-4",children:[f.jsx("input",{type:"checkbox",value:v,onChange:p,checked:o.includes(v),className:"accent-pink-300 rounded-sm accent-captn-cta-green"}),f.jsx("span",{className:"ml-2 mt-1 text-captn-light-cream",children:v})]},C))}),f.jsx("button",{onClick:v=>{v.preventDefault(),ZN(o,t)},className:`${o.length>0?"":"bg-gray-400 cursor-not-allowed hover:bg-gray-500"} ml-6 mt-3 bg-captn-cta-green hover:bg-captn-cta-green-hover font-medium rounded-lg text-sm px-3 py-2 m-1 text-captn-light-cream`,children:"Send"}),r!=="daily_analysis"&&f.jsx("p",{className:"my-2 ml-6 pt-2 text-captn-light-cream",children:"You can select an option from the list above and click the send button, or type your own responses in the input field below."})]})})}const QN=({sentence:e,speed:t=100,onStreamAnimationComplete:r})=>{const[s,o]=G.useState("");return G.useEffect(()=>{if(s.length{o(p=>e.substring(0,p.length+1))},t);return()=>clearTimeout(c)}else r&&r()},[s,e,t]),f.jsx(Qc,{children:s})},KN=({messages:e,maxHeight:t,isOpenOnLoad:r})=>{const[s,o]=G.useState(!r),c=G.useRef(null),[p,v]=G.useState(!0),C=L=>(L=L.replace(/\[0m/g,"").replace(/\[1m/g,'').replace(/\[4m/g,'').replace(/\[30m/g,'').replace(/\[31m/g,'').replace(/\[32m/g,'').replace(/\[33m/g,'').replace(/\[34m/g,'').replace(/\[35m/g,'').replace(/\[36m/g,'').replace(/\[37m/g,'').replace(/\n/g,"
"),L),A=L=>{const P=L.currentTarget,B=P.scrollHeight-P.scrollTop===P.clientHeight;v(B)};return G.useEffect(()=>{p&&c.current&&(c.current.scrollTop=c.current.scrollHeight)},[e,p]),f.jsxs("div",{className:`accordion-wrapper terminal ${s?"minimized":""}`,children:[f.jsxs("div",{className:`relative terminal-header ${s?"rounded-lg":"rounded-t-lg"} text-captn-light-cream p-1 text-right bg-captn-light-blue `,onClick:()=>o(!s),children:[f.jsx("p",{className:"accordion-title text-sm text-left text-captn-dark-blue",children:"Agent conversations"}),f.jsx("button",{className:`absolute right-4 top-4 ${s?"":"open"} text-sm text-captn-dark-blue `,children:s?f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-chevron-up",viewBox:"0 0 16 16",height:"16",children:f.jsx("path",{fillRule:"evenodd",d:"M1.646 11.854a.5.5 0 0 0 .708 0L8 6.207l5.646 5.647a.5.5 0 0 0 .708-.708l-6-6a.5.5 0 0 0-.708 0l-6 6a.5.5 0 0 0 0 .708z"})}):f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-chevron-down",viewBox:"0 0 16 16",height:"16",children:f.jsx("path",{fillRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.793l5.646-5.647a.5.5 0 0 1 .708 .708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"})})})]}),f.jsx("div",{className:`accordion-item rounded-b-lg ${s?"":"collapsed"}`,children:f.jsx("div",{ref:c,onScroll:A,className:`accordion-content scroll-container bg-captn-light-cream p-4 text-captn-dark-blue font-mono text-xs overflow-y-auto overflow-x-hidden ${s?"hidden":""}`,style:{maxHeight:`${t}px`,wordWrap:"break-word"},dangerouslySetInnerHTML:{__html:C(e)}})})]})},A0=({agentConversationHistory:e,initialState:t=!1,isAgentWindow:r=!1})=>(G.useState(t),f.jsx("div",{"data-testid":"agent-loader",className:"flex items-center group flex-col bg-captn-dark-blue",children:f.jsx("div",{style:{maxWidth:`${r?"745px":"800px"}`,left:`${r?"15px":"0px"}`,margin:"0 auto 20"},className:"relative block w-full",children:f.jsx(KN,{messages:e,maxHeight:400,isOpenOnLoad:r})})})),Y2="/assets/captn-logo-BNDZAGdh.png",JN=({loadingMessage:e="Loading..."})=>{const[t,r]=G.useState(0),s=["—","\\","|","/"];return G.useEffect(()=>{const o=setInterval(()=>{r(c=>(c+1)%s.length)},250);return()=>clearInterval(o)},[s.length]),f.jsx("div",{style:{minHeight:"85px"},className:"flex items-center px-5 group bg-captn-dark-blue flex-col agent-conversation-container",children:f.jsxs("div",{style:{maxWidth:"800px",margin:"auto"},className:"relative ml-3 block w-full p-4 pl-10 text-sm text-captn-light-cream border-captn-dark-blue rounded-lg bg-captn-dark-blue ",children:[f.jsx("span",{className:"absolute inline-block",style:{left:"-15px",top:"6px",height:" 45px",width:"45px"},children:f.jsx("img",{alt:"Capt’n.ai logo",src:Y2,className:"w-full h-full",style:{borderRadius:"50%"}})}),f.jsxs("div",{className:"chat-conversations text-base flex flex-col gap-2",children:[e," ",s[t]]})]})})};function eE({conversations:e,currentChatDetails:t,handleFormSubmit:r,userSelectedActionMessage:s,onStreamAnimationComplete:o}){var P,B;const[c,p]=G.useState(""),v=(P=t==null?void 0:t.smartSuggestions)==null?void 0:P.suggestions,C=v==null?void 0:v.length,A=C>0&&!(C===1&&(t==null?void 0:t.smartSuggestions.suggestions[0])===""),L=e.length-1;return qc("newMessageFromTeam",M=>p(M)),qc("streamFromTeamFinished",()=>p("")),f.jsxs("div",{"data-testid":"conversations-wrapper",className:"w-full",children:[e.map((M,H)=>{const D=M.role==="user",Z=D?"captn-light-blue":"captn-dark-blue",W=D?"captn-dark-blue":"captn-light-cream",V=D?f.jsx("div",{style:{alignItems:"center",background:"#eae4d9",borderRadius:"50%",color:"#444654",display:"flex",flexBasis:"40px",flexGrow:"0",flexShrink:"0",fontSize:"14px",height:"40px",justifyContent:"center",padding:"5px",position:"relative",width:"40px"},className:"flex",children:f.jsx("div",{children:"You"})}):f.jsx("img",{alt:"Capt’n.ai logo",src:Y2,className:"w-full h-full",style:{borderRadius:"50%"}});return f.jsx("div",{children:M.isLoading?f.jsx(JN,{loadingMessage:`${t.customerBrief||t.chatType==="daily_analysis"?"The team is currently working on the task. You can monitor their discussions in the window below as they progress...":"Loading..."}`}):f.jsx("div",{style:{minHeight:"85px"},className:`flex items-center px-5 group bg-${Z} flex-col ${D?"user-conversation-container":"agent-conversation-container"}`,children:f.jsxs("div",{style:{maxWidth:"800px",margin:"auto"},className:`relative ml-3 block w-full p-4 pl-10 text-sm text-${W} border-${Z} rounded-lg bg-${Z} `,children:[f.jsx("span",{className:"absolute inline-block",style:{left:"-15px",top:"6px",height:" 45px",width:"45px"},children:V}),H===L&&!D&&f.jsx("div",{className:"chat-conversations text-base flex flex-col gap-2",children:t!=null&&t.streamAgentResponse&&!(t!=null&&t.team_id)?f.jsx(QN,{sentence:M.message,speed:5,onStreamAnimationComplete:o}):f.jsx(Qc,{children:M.message})}),(H!==L||H===L&&D)&&f.jsx("div",{className:"chat-conversations text-base flex flex-col gap-2",children:f.jsx(Qc,{children:M.message})}),M.agentConversationHistory&&f.jsx(A0,{agentConversationHistory:M.agentConversationHistory})]})})},H)}),(t==null?void 0:t.team_status)==="inprogress"&&c&&f.jsx(A0,{agentConversationHistory:c,initialState:!0,isAgentWindow:!0}),A&&!(t!=null&&t.streamAgentResponse)&&f.jsx("div",{"data-testid":"smart-suggestions",className:"fadeIn",children:((B=t.smartSuggestions)==null?void 0:B.type)=="oneOf"?f.jsx(GN,{currentChatDetails:t,smartSuggestionOnClick:r}):f.jsx(qN,{suggestions:t.smartSuggestions.suggestions,smartSuggestionOnClick:r,chatType:t.chatType,userSelectedActionMessage:s})})]})}const tE=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Qr();if(o)if(r){const p=localStorage.getItem("captn:redirectUrl");if(p)localStorage.removeItem("captn:redirectUrl"),window.location.href=p;else return f.jsx(e,{...t,user:r})}else return localStorage.setItem("captn:redirectUrl",window.location.pathname+window.location.search),f.jsx(Yp,{to:"/login"});else return c?f.jsx("span",{children:"Loading..."}):s?f.jsx("span",{children:"An error ocurred. Please refresh the page."}):f.jsx("span",{children:"An unknown error ocurred. Please refresh the page."})},rE="Ahoy, mate! It seems our voyage hit an unexpected squall. Let's trim the sails and set a new course. Cast off once more by clicking the button below.";function iE(e){return e.map(r=>({role:r.role,content:r.message}))}const nE=({user:e})=>{const{socket:t}=Dj(),r=na(),{pathname:s}=r,o=Mr(),c=new URLSearchParams(r.search),p=Number(s.split("/").pop()),{data:v,refetch:C}=Qs(Ak,{chatId:p},{enabled:!!p}),{data:A,refetch:L}=Qs(Nk,{chatId:p},{enabled:!!p});qc("smartSuggestionsAddedToDB",P),qc("streamFromTeamFinished",P);function P(){L(),C()}const B=()=>{o.push({search:""})},M=async(V,_=!1)=>{if(v.userId!==e.id)window.alert("Error: This chat does not belong to you.");else{let K;try{_&&B(),await bi({id:p,data:{smartSuggestions:{suggestions:[""],type:""},userRespondedWithNextAction:_}});const ee=await bk({chatId:p,userQuery:V,role:"user"}),X=iE(ee);if(await bi({id:p,data:{showLoader:!0}}),K=await wk({chatId:p,userQuery:V,role:"assistant",isLoading:!0}),v.customerBrief||v.chatType==="daily_analysis")t.emit("sendMessageToTeam",v,K.id,V,X),await bi({id:p,data:{showLoader:!1,team_status:"inprogress"}});else{const q=await kk({chatId:p,messages:X});q.customer_brief&&t.emit("sendMessageToTeam",v,K.id,q.customer_brief,X,q.team_name),q.content&&!q.is_exception_occured&&(t.emit("checkSmartSuggestionStatus",p),await bi({id:p,data:{streamAgentResponse:!0,showLoader:!1,smartSuggestions:q.smart_suggestions}})),q.content&&await Jm({id:K.id,data:{isLoading:!1,message:q.content}}),await bi({id:p,data:{showLoader:!1,team_id:q.team_id,team_name:q.team_name,team_status:q.team_status,smartSuggestions:q.smart_suggestions,isExceptionOccured:q.is_exception_occured||!1,customerBrief:q.customer_brief}})}}catch(ee){await bi({id:p,data:{showLoader:!1}}),console.log("Error: "+ee.message),ee.message==="No Subscription Found"?o.push("/pricing"):(await Jm({id:K.id,data:{isLoading:!1,message:rE}}),await bi({id:p,data:{showLoader:!1,smartSuggestions:{suggestions:["Let's try again"],type:"oneOf"},isExceptionOccured:!0}}))}}},H=()=>{bi({id:p,data:{streamAgentResponse:!1}})};let D=c.get("msg");D&&(v!=null&&v.userRespondedWithNextAction)&&(D=null);const Z=c.get("selected_user_action");let W=null;return Z&&(v!=null&&v.userRespondedWithNextAction||v!=null&&v.proposedUserAction&&(W=v.proposedUserAction[Number(Z)-1])),f.jsx($j,{handleFormSubmit:M,currentChatDetails:v,googleRedirectLoginMsg:D,children:f.jsx("div",{className:"flex h-full flex-col",children:v?f.jsx("div",{className:"flex-1 overflow-hidden",children:A&&f.jsx(eE,{conversations:A,currentChatDetails:v,handleFormSubmit:M,userSelectedActionMessage:W,onStreamAnimationComplete:H})}):f.jsx(aE,{})})})},sE=tE(nE);function aE(){return f.jsx("p",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-xl md:text-6xl text-captn-light-cream opacity-70",style:{lineHeight:"normal"},children:"Please initiate a new chat or select existing chats to resume your conversation."})}const oE=[{name:"Monthly Subscription",id:x1.PRO,priceMonthly:"$29",description:"Purchase a monthly subscription and enjoy 30 days on us, followed by a low monthly fee of just",features:["30-day free trial","No credit card required for trial subscription","Cancel any time"],bestDeal:!0}],lE=()=>{const[e,t]=G.useState(!1),{data:r,isLoading:s}=Qr(),o=Mr();async function c(p){if(!r){o.push("/login");return}try{t(p);let v=await Eb(p);v!=null&&v.sessionUrl&&window.open(v.sessionUrl,"_self")}catch(v){console.error((v==null?void 0:v.message)??"Something went wrong.")}finally{t(!1)}}return f.jsx("div",{className:"py-10 lg:mt-10",children:f.jsxs("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:[f.jsx("div",{id:"pricing",className:"mx-auto max-w-4xl text-center",children:f.jsxs("h2",{className:"mt-2 text-4xl font-bold tracking-tight text-captn-dark-blue sm:text-5xl dark:text-captn-light-cream",children:["Try Capt’n.ai free for a month."," ",f.jsx("span",{className:"text-captn-light-blue",children:"No credit card required!"})]})}),f.jsx("p",{className:"mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-captn-dark-blue dark:text-captn-light-cream",children:"To set sail and fully explore Capt’n.ai's offerings, you'll need an active subscription as your compass. Navigate the complete range of features with our smooth subscription, charting a course with a 30-day free trial and no credit card required."}),f.jsx("div",{className:"justify-center isolate mx-auto mt-16 max-w-none gap-y-8 lg:gap-x-8 sm:mt-20 lg:mx-0 lg:max-w-none",children:oE.map(p=>f.jsxs("div",{className:`relative flex flex-col ${p.bestDeal?"ring-2":"ring-1 lg:mt-8"} mx-auto grow justify-center max-w-md rounded-3xl ring-gray-200 overflow-hidden p-8 xl:p-10`,children:[p.bestDeal&&f.jsx("div",{className:"absolute top-0 right-0 -z-10 w-full h-full ","aria-hidden":"true",children:f.jsx("div",{className:"absolute w-full h-full bg-captn-dark-blue",style:{clipPath:"circle(670% at 50% 50%)"}})}),f.jsxs("div",{className:"mb-8",children:[f.jsx("div",{className:"flex items-center justify-between gap-x-4",children:f.jsx("h3",{id:p.id,className:"text-captn-light-cream text-lg font-semibold leading-8 dark:text-captn-light-cream",children:p.name})}),f.jsx("p",{className:"mt-4 text-sm leading-6 text-captn-light-cream dark:text-captn-light-cream",children:p.description}),f.jsxs("p",{className:"mt-6 flex items-baseline gap-x-1 dark:text-captn-light-cream",children:[f.jsx("span",{className:"text-4xl font-bold tracking-tight text-captn-light-cream dark:text-captn-light-cream",children:p.priceMonthly}),f.jsx("span",{className:"text-sm font-semibold leading-6 text-captn-light-cream dark:text-captn-light-cream",children:"/month"})]}),f.jsx("ul",{role:"list",className:"mt-8 space-y-3 text-sm leading-6 text-captn-light-cream dark:text-captn-light-cream",children:p.features.map(v=>f.jsxs("li",{className:"flex gap-x-3",children:[f.jsx(pS,{className:"h-6 w-5 flex-none text-captn-cta-green","aria-hidden":"true"}),v]},v))})]}),r&&r.hasPaid?f.jsx("a",{href:l2,"aria-describedby":"manage-subscription",className:` +- `)}`;t(r)}};function QN({suggestions:e,smartSuggestionOnClick:t,chatType:r,userSelectedActionMessage:s}){const[o,c]=G.useState([]),p=v=>{const C=v.target.value;v.target.checked?c([...o,C]):c(o.filter(A=>A!==C))};return G.useEffect(()=>{s&&c([...o,s])},[s]),f.jsx("div",{className:"pb-4 flex items-center group bg-captn-dark-blue",children:f.jsxs("div",{style:{maxWidth:"800px",margin:"auto"},className:"fade-in relative ml-3 block w-full px-4 rounded-lg bg-captn-light-green ",children:[r==="daily_analysis"&&f.jsx("hr",{className:" bg-gray-200 border-1"}),r==="daily_analysis"&&f.jsx("p",{className:"block text-bold text-captn-light-cream",style:{margin:"20px 0"},children:f.jsx("b",{children:"If you've made a selection through email, the option is pre-selected but can be changed. You can opt for all or just a few options as desired, and then click the send button. Alternatively, you can type your own responses in the input field below."})}),f.jsx("div",{className:"ml-6 chat-conversations text-base flex flex-col",children:e.map((v,C)=>f.jsxs("label",{className:"flex items-center me-4",children:[f.jsx("input",{type:"checkbox",value:v,onChange:p,checked:o.includes(v),className:"accent-pink-300 rounded-sm accent-captn-cta-green"}),f.jsx("span",{className:"ml-2 mt-1 text-captn-light-cream",children:v})]},C))}),f.jsx("button",{onClick:v=>{v.preventDefault(),qN(o,t)},className:`${o.length>0?"":"bg-gray-400 cursor-not-allowed hover:bg-gray-500"} ml-6 mt-3 bg-captn-cta-green hover:bg-captn-cta-green-hover font-medium rounded-lg text-sm px-3 py-2 m-1 text-captn-light-cream`,children:"Send"}),r!=="daily_analysis"&&f.jsx("p",{className:"my-2 ml-6 pt-2 text-captn-light-cream",children:"You can select an option from the list above and click the send button, or type your own responses in the input field below."})]})})}const KN=({sentence:e,speed:t=100,onStreamAnimationComplete:r})=>{const[s,o]=G.useState("");return G.useEffect(()=>{if(s.length{o(p=>e.substring(0,p.length+1))},t);return()=>clearTimeout(c)}else r&&r()},[s,e,t]),f.jsx(Qc,{children:s})},JN=({messages:e,maxHeight:t,isOpenOnLoad:r})=>{const[s,o]=G.useState(!r),c=G.useRef(null),[p,v]=G.useState(!0),C=E=>(E=E.replace(/\[0m/g,"
").replace(/\[1m/g,'').replace(/\[4m/g,'').replace(/\[30m/g,'').replace(/\[31m/g,'').replace(/\[32m/g,'').replace(/\[33m/g,'').replace(/\[34m/g,'').replace(/\[35m/g,'').replace(/\[36m/g,'').replace(/\[37m/g,'').replace(/\n/g,"
"),E),A=E=>{const P=E.currentTarget,B=P.scrollHeight-P.scrollTop===P.clientHeight;v(B)};return G.useEffect(()=>{p&&c.current&&(c.current.scrollTop=c.current.scrollHeight)},[e,p]),f.jsxs("div",{className:`accordion-wrapper terminal ${s?"minimized":""}`,children:[f.jsxs("div",{className:`relative terminal-header ${s?"rounded-lg":"rounded-t-lg"} text-captn-light-cream p-1 text-right bg-captn-light-blue `,onClick:()=>o(!s),children:[f.jsx("p",{className:"accordion-title text-sm text-left text-captn-dark-blue",children:"Agent conversations"}),f.jsx("button",{className:`absolute right-4 top-4 ${s?"":"open"} text-sm text-captn-dark-blue `,children:s?f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-chevron-up",viewBox:"0 0 16 16",height:"16",children:f.jsx("path",{fillRule:"evenodd",d:"M1.646 11.854a.5.5 0 0 0 .708 0L8 6.207l5.646 5.647a.5.5 0 0 0 .708-.708l-6-6a.5.5 0 0 0-.708 0l-6 6a.5.5 0 0 0 0 .708z"})}):f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-chevron-down",viewBox:"0 0 16 16",height:"16",children:f.jsx("path",{fillRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.793l5.646-5.647a.5.5 0 0 1 .708 .708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"})})})]}),f.jsx("div",{className:`accordion-item rounded-b-lg ${s?"":"collapsed"}`,children:f.jsx("div",{ref:c,onScroll:A,className:`accordion-content scroll-container bg-captn-light-cream p-4 text-captn-dark-blue font-mono text-xs overflow-y-auto overflow-x-hidden ${s?"hidden":""}`,style:{maxHeight:`${t}px`,wordWrap:"break-word"},dangerouslySetInnerHTML:{__html:C(e)}})})]})},A0=({agentConversationHistory:e,initialState:t=!1,isAgentWindow:r=!1})=>(G.useState(t),f.jsx("div",{"data-testid":"agent-loader",className:"flex items-center group flex-col bg-captn-dark-blue",children:f.jsx("div",{style:{maxWidth:`${r?"745px":"800px"}`,left:`${r?"15px":"0px"}`,margin:"0 auto 20"},className:"relative block w-full",children:f.jsx(JN,{messages:e,maxHeight:400,isOpenOnLoad:r})})})),Y2="/assets/captn-logo-BNDZAGdh.png",eE=({loadingMessage:e="Loading..."})=>{const[t,r]=G.useState(0),s=["—","\\","|","/"];return G.useEffect(()=>{const o=setInterval(()=>{r(c=>(c+1)%s.length)},250);return()=>clearInterval(o)},[s.length]),f.jsx("div",{style:{minHeight:"85px"},className:"flex items-center px-5 group bg-captn-dark-blue flex-col agent-conversation-container",children:f.jsxs("div",{style:{maxWidth:"800px",margin:"auto"},className:"relative ml-3 block w-full p-4 pl-10 text-sm text-captn-light-cream border-captn-dark-blue rounded-lg bg-captn-dark-blue ",children:[f.jsx("span",{className:"absolute inline-block",style:{left:"-15px",top:"6px",height:" 45px",width:"45px"},children:f.jsx("img",{alt:"Capt’n.ai logo",src:Y2,className:"w-full h-full",style:{borderRadius:"50%"}})}),f.jsxs("div",{className:"chat-conversations text-base flex flex-col gap-2",children:[e," ",s[t]]})]})})};function tE({conversations:e,currentChatDetails:t,handleFormSubmit:r,userSelectedActionMessage:s,onStreamAnimationComplete:o}){var P,B;const[c,p]=G.useState(""),v=(P=t==null?void 0:t.smartSuggestions)==null?void 0:P.suggestions,C=v==null?void 0:v.length,A=C>0&&!(C===1&&(t==null?void 0:t.smartSuggestions.suggestions[0])===""),E=e.length-1;return qc("newMessageFromTeam",M=>p(M)),qc("streamFromTeamFinished",()=>p("")),f.jsxs("div",{"data-testid":"conversations-wrapper",className:"w-full",children:[e.map((M,H)=>{const D=M.role==="user",Z=D?"captn-light-blue":"captn-dark-blue",W=D?"captn-dark-blue":"captn-light-cream",V=D?f.jsx("div",{style:{alignItems:"center",background:"#eae4d9",borderRadius:"50%",color:"#444654",display:"flex",flexBasis:"40px",flexGrow:"0",flexShrink:"0",fontSize:"14px",height:"40px",justifyContent:"center",padding:"5px",position:"relative",width:"40px"},className:"flex",children:f.jsx("div",{children:"You"})}):f.jsx("img",{alt:"Capt’n.ai logo",src:Y2,className:"w-full h-full",style:{borderRadius:"50%"}});return f.jsx("div",{children:M.isLoading?f.jsx(eE,{loadingMessage:`${t.customerBrief||t.chatType==="daily_analysis"?"The team is currently working on the task. You can monitor their discussions in the window below as they progress...":"Loading..."}`}):f.jsx("div",{style:{minHeight:"85px"},className:`flex items-center px-5 group bg-${Z} flex-col ${D?"user-conversation-container":"agent-conversation-container"}`,children:f.jsxs("div",{style:{maxWidth:"800px",margin:"auto"},className:`relative ml-3 block w-full p-4 pl-10 text-sm text-${W} border-${Z} rounded-lg bg-${Z} `,children:[f.jsx("span",{className:"absolute inline-block",style:{left:"-15px",top:"6px",height:" 45px",width:"45px"},children:V}),H===E&&!D&&f.jsx("div",{className:"chat-conversations text-base flex flex-col gap-2",children:t!=null&&t.streamAgentResponse&&!(t!=null&&t.team_id)?f.jsx(KN,{sentence:M.message,speed:5,onStreamAnimationComplete:o}):f.jsx(Qc,{children:M.message})}),(H!==E||H===E&&D)&&f.jsx("div",{className:"chat-conversations text-base flex flex-col gap-2",children:f.jsx(Qc,{children:M.message})}),M.agentConversationHistory&&f.jsx(A0,{agentConversationHistory:M.agentConversationHistory})]})})},H)}),(t==null?void 0:t.team_status)==="inprogress"&&c&&f.jsx(A0,{agentConversationHistory:c,initialState:!0,isAgentWindow:!0}),A&&!(t!=null&&t.streamAgentResponse)&&f.jsx("div",{"data-testid":"smart-suggestions",className:"fadeIn",children:((B=t.smartSuggestions)==null?void 0:B.type)=="oneOf"?f.jsx(ZN,{currentChatDetails:t,smartSuggestionOnClick:r}):f.jsx(QN,{suggestions:t.smartSuggestions.suggestions,smartSuggestionOnClick:r,chatType:t.chatType,userSelectedActionMessage:s})})]})}const rE=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Qr();if(o)if(r){const p=localStorage.getItem("captn:redirectUrl");if(p)localStorage.removeItem("captn:redirectUrl"),window.location.href=p;else return f.jsx(e,{...t,user:r})}else return localStorage.setItem("captn:redirectUrl",window.location.pathname+window.location.search),f.jsx(Yp,{to:"/login"});else return c?f.jsx("span",{children:"Loading..."}):s?f.jsx("span",{children:"An error ocurred. Please refresh the page."}):f.jsx("span",{children:"An unknown error ocurred. Please refresh the page."})},iE="Ahoy, mate! It seems our voyage hit an unexpected squall. Let's trim the sails and set a new course. Cast off once more by clicking the button below.";function nE(e){return e.map(r=>({role:r.role,content:r.message}))}const sE=({user:e})=>{const{socket:t}=Hj(),r=na(),{pathname:s}=r,o=Mr(),c=new URLSearchParams(r.search),p=s.split("/").pop(),v=p==="chat"?null:p,{data:C}=Un(Ek,{chatUUID:v}),A=Number(C==null?void 0:C.id),{data:E,refetch:P}=Un(Ak,{chatId:A},{enabled:!!A}),{data:B,refetch:M}=Un(Nk,{chatId:A},{enabled:!!A});qc("smartSuggestionsAddedToDB",H),qc("streamFromTeamFinished",H);function H(){M(),P()}const D=()=>{o.push({search:""})},Z=async(ee,X=!1)=>{if(E.userId!==e.id)window.alert("Error: This chat does not belong to you.");else{let Q;try{X&&D(),await bi({id:A,data:{smartSuggestions:{suggestions:[""],type:""},userRespondedWithNextAction:X}});const J=await bk({chatId:A,userQuery:ee,role:"user"}),he=nE(J);if(await bi({id:A,data:{showLoader:!0}}),Q=await wk({chatId:A,userQuery:ee,role:"assistant",isLoading:!0}),E.customerBrief||E.chatType==="daily_analysis")t.emit("sendMessageToTeam",E,Q.id,ee,he),await bi({id:A,data:{showLoader:!1,team_status:"inprogress"}});else{const oe=await kk({chatId:A,messages:he});oe.customer_brief&&t.emit("sendMessageToTeam",E,Q.id,oe.customer_brief,he,oe.team_name),oe.content&&!oe.is_exception_occured&&(t.emit("checkSmartSuggestionStatus",A),await bi({id:A,data:{streamAgentResponse:!0,showLoader:!1,smartSuggestions:oe.smart_suggestions}})),oe.content&&await Jm({id:Q.id,data:{isLoading:!1,message:oe.content}}),await bi({id:A,data:{showLoader:!1,team_id:oe.team_id,team_name:oe.team_name,team_status:oe.team_status,smartSuggestions:oe.smart_suggestions,isExceptionOccured:oe.is_exception_occured||!1,customerBrief:oe.customer_brief}})}}catch(J){await bi({id:A,data:{showLoader:!1}}),console.log("Error: "+J.message),J.message==="No Subscription Found"?o.push("/pricing"):(await Jm({id:Q.id,data:{isLoading:!1,message:iE}}),await bi({id:A,data:{showLoader:!1,smartSuggestions:{suggestions:["Let's try again"],type:"oneOf"},isExceptionOccured:!0}}))}}},W=()=>{bi({id:A,data:{streamAgentResponse:!1}})};let V=c.get("msg");V&&(E!=null&&E.userRespondedWithNextAction)&&(V=null);const _=c.get("selected_user_action");let K=null;return _&&(E!=null&&E.userRespondedWithNextAction||E!=null&&E.proposedUserAction&&(K=E.proposedUserAction[Number(_)-1])),f.jsx(Xj,{handleFormSubmit:Z,currentChatDetails:E,googleRedirectLoginMsg:V,children:f.jsx("div",{className:"flex h-full flex-col",children:E?f.jsx("div",{className:"flex-1 overflow-hidden",children:B&&f.jsx(tE,{conversations:B,currentChatDetails:E,handleFormSubmit:Z,userSelectedActionMessage:K,onStreamAnimationComplete:W})}):f.jsx(oE,{})})})},aE=rE(sE);function oE(){return f.jsx("p",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-xl md:text-6xl text-captn-light-cream opacity-70",style:{lineHeight:"normal"},children:"Please initiate a new chat or select existing chats to resume your conversation."})}const lE=[{name:"Monthly Subscription",id:x1.PRO,priceMonthly:"$29",description:"Purchase a monthly subscription and enjoy 30 days on us, followed by a low monthly fee of just",features:["30-day free trial","No credit card required for trial subscription","Cancel any time"],bestDeal:!0}],cE=()=>{const[e,t]=G.useState(!1),{data:r,isLoading:s}=Qr(),o=Mr();async function c(p){if(!r){o.push("/login");return}try{t(p);let v=await Eb(p);v!=null&&v.sessionUrl&&window.open(v.sessionUrl,"_self")}catch(v){console.error((v==null?void 0:v.message)??"Something went wrong.")}finally{t(!1)}}return f.jsx("div",{className:"py-10 lg:mt-10",children:f.jsxs("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:[f.jsx("div",{id:"pricing",className:"mx-auto max-w-4xl text-center",children:f.jsxs("h2",{className:"mt-2 text-4xl font-bold tracking-tight text-captn-dark-blue sm:text-5xl dark:text-captn-light-cream",children:["Try Capt’n.ai free for a month."," ",f.jsx("span",{className:"text-captn-light-blue",children:"No credit card required!"})]})}),f.jsx("p",{className:"mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-captn-dark-blue dark:text-captn-light-cream",children:"To set sail and fully explore Capt’n.ai's offerings, you'll need an active subscription as your compass. Navigate the complete range of features with our smooth subscription, charting a course with a 30-day free trial and no credit card required."}),f.jsx("div",{className:"justify-center isolate mx-auto mt-16 max-w-none gap-y-8 lg:gap-x-8 sm:mt-20 lg:mx-0 lg:max-w-none",children:lE.map(p=>f.jsxs("div",{className:`relative flex flex-col ${p.bestDeal?"ring-2":"ring-1 lg:mt-8"} mx-auto grow justify-center max-w-md rounded-3xl ring-gray-200 overflow-hidden p-8 xl:p-10`,children:[p.bestDeal&&f.jsx("div",{className:"absolute top-0 right-0 -z-10 w-full h-full ","aria-hidden":"true",children:f.jsx("div",{className:"absolute w-full h-full bg-captn-dark-blue",style:{clipPath:"circle(670% at 50% 50%)"}})}),f.jsxs("div",{className:"mb-8",children:[f.jsx("div",{className:"flex items-center justify-between gap-x-4",children:f.jsx("h3",{id:p.id,className:"text-captn-light-cream text-lg font-semibold leading-8 dark:text-captn-light-cream",children:p.name})}),f.jsx("p",{className:"mt-4 text-sm leading-6 text-captn-light-cream dark:text-captn-light-cream",children:p.description}),f.jsxs("p",{className:"mt-6 flex items-baseline gap-x-1 dark:text-captn-light-cream",children:[f.jsx("span",{className:"text-4xl font-bold tracking-tight text-captn-light-cream dark:text-captn-light-cream",children:p.priceMonthly}),f.jsx("span",{className:"text-sm font-semibold leading-6 text-captn-light-cream dark:text-captn-light-cream",children:"/month"})]}),f.jsx("ul",{role:"list",className:"mt-8 space-y-3 text-sm leading-6 text-captn-light-cream dark:text-captn-light-cream",children:p.features.map(v=>f.jsxs("li",{className:"flex gap-x-3",children:[f.jsx(gS,{className:"h-6 w-5 flex-none text-captn-cta-green","aria-hidden":"true"}),v]},v))})]}),r&&r.hasPaid?f.jsx("a",{href:l2,"aria-describedby":"manage-subscription",className:` ${p.id==="enterprise-tier"?"opacity-50 cursor-not-allowed":"opacity-100 cursor-pointer"} ${p.bestDeal?"no-underline bg-captn-cta-green text-captn-light-cream hover:text-captn-light-cream shadow-sm hover:bg-captn-cta-green-hover":"text-captn-dark-blue ring-1 ring-inset ring-purple-200 hover:ring-purple-400"} 'mt-8 block rounded-md py-2 px-3 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-captn-light-blue' @@ -84,21 +84,21 @@ Error generating stack: `+c.message+` ${p.bestDeal?"bg-captn-cta-green text-captn-light-cream hover:text-captn-light-cream shadow-sm hover:bg-captn-cta-green-hover":"text-captn-dark-blue ring-1 ring-inset ring-purple-200 hover:ring-purple-400"} ${e===p.id?"cursor-wait":null} 'mt-8 block rounded-md py-2 px-3 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-yellow-400 ' - `,children:p.id==="enterprise-tier"?"Contact us":r?"Start free trial":"Log in to buy plan"})]},p.id))})]})})},cE=({type:e,message:t,onClick:r})=>{const s=e==="success";return f.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 p-16 bg-black bg-opacity-50 backdrop-blur-md",children:f.jsxs("div",{className:"bg-captn-light-cream rounded-lg shadow-lg p-8 m-4 max-w-sm mx-auto",children:[f.jsx("h2",{className:"text-xl font-bold mb-4 text-captn-dark-blue",children:s?"Success":"Error"}),f.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:t}),f.jsx("div",{className:"mt-4 text-right",children:f.jsx("button",{onClick:r,className:`py-2 px-4 rounded text-captn-light-cream focus:outline-none ${s?"bg-captn-cta-green":"bg-captn-cta-red"}`,children:"OK"})})]})})};function dE({hasSubscribedToMarketingEmails:e}){const[t,r]=G.useState(e),[s,o]=G.useState(!1),[c,p]=G.useState(null),v=P=>{r(P.target.value==="Yes"),o(!0)},C=()=>{p(null)},A=async P=>{try{await Lb({hasSubscribedToMarketingEmails:P}),p("success")}catch{p("error")}o(!1)},L=c==="success"?"Your changes are saved successfully.":"Something went wrong. Please try again later.";return f.jsxs(f.Fragment,{children:[c&&f.jsx(cE,{type:c,onClick:C,message:L}),f.jsxs("div",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:[f.jsxs("label",{className:"mr-4",children:[f.jsx("input",{type:"radio",value:"Yes",checked:t,onChange:v,className:"form-radio text-captn-light-blue mr-2 focus:ring-1 outline-none"}),"Yes"]}),f.jsxs("label",{children:[f.jsx("input",{type:"radio",value:"No",checked:!t,onChange:v,className:"form-radio text-captn-light-blue mr-2 focus:ring-1 outline-none"}),"No"]})]}),f.jsx("div",{className:"ml-0 md:ml-4 flex-shrink-0 sm:col-span-1 sm:mt-0",style:{height:"24px"},children:f.jsx("button",{onClick:()=>A(t),disabled:!s,className:`mt-4 md:-mt-10 no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream ring-1 ring-inset ring-gray-200 hover:bg-captn-cta-green-hover shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:text-captn-light-cream bg-captn-cta-green ${s?"":"opacity-40 cursor-not-allowed"}`,children:"Save"})})]})}function uE({user:e}){return f.jsxs("div",{className:"mt-10 px-6",children:[f.jsxs("div",{className:"overflow-hidden bg-captn-light-cream ring-1 ring-gray-900/10 shadow-lg sm:rounded-lg lg:m-8 ",children:[f.jsx("div",{className:"px-4 py-5 sm:px-6 lg:px-8",children:f.jsx("h3",{className:"text-base font-semibold leading-6 text-captn-dark-blue",children:"Account Information"})}),f.jsx("div",{className:"border-t border-gray-200 px-4 py-5 sm:p-0",children:f.jsxs("dl",{className:"sm:divide-y sm:divide-gray-200",children:[!!e.email&&f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue dark:text-captn-light-cream",children:"Email address"}),f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue dark:text-gray-400 sm:col-span-2 sm:mt-0",children:e.email})]}),!!e.username&&f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue dark:text-captn-light-cream",children:"Username"}),f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue dark:text-gray-400 sm:col-span-2 sm:mt-0",children:e.username})]}),f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue",children:"Subscription status"}),e.hasPaid?f.jsxs(f.Fragment,{children:[e.subscriptionStatus!=="past_due"?f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"Active"}):f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"Your Account is Past Due! Please Update your Payment Information"}),f.jsx(hE,{})]}):f.jsxs(f.Fragment,{children:[f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"N/A"}),f.jsx("div",{className:"flex items-center justify-left -mt-2",children:f.jsx(Zc,{})})]})]}),f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue",children:"I agree to receiving marketing emails"}),f.jsx(f.Fragment,{children:f.jsx(dE,{hasSubscribedToMarketingEmails:e.hasSubscribedToMarketingEmails})})]})]})})]}),f.jsx("div",{className:"inline-flex w-full justify-end",children:f.jsx("button",{onClick:Rb,className:"inline-flex justify-center mx-8 py-2 px-4 border border-transparent shadow-md text-sm font-medium rounded-md text-captn-light-cream bg-captn-cta-green hover:bg-captn-cta-green-hover focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Log out"})})]})}function hE(){const e=()=>{window.open(l2,"_blank")};return f.jsx("div",{className:"ml-0 md:ml-4 flex-shrink-0 sm:col-span-1 sm:mt-0",children:f.jsx("button",{onClick:e,className:"font-medium text-sm text-captn-light-blue hover:underline",children:"Manage Subscription"})})}function fE(){const[e,t]=G.useState("loading"),r=Mr(),s=na();return G.useEffect(()=>{function o(){return setTimeout(()=>{r.push("/chat")},4e3)}const c=new URLSearchParams(s.search),p=c.get("success");return c.get("canceled")?t("canceled"):p?t("paid"):r.push("/chat"),o(),()=>{clearTimeout(o())}},[s]),f.jsx("div",{className:"flex min-h-full flex-col justify-center mt-10 sm:px-6 lg:px-8",children:f.jsx("div",{className:"sm:mx-auto sm:w-full sm:max-w-md",children:f.jsxs("div",{className:"bg-white py-8 px-4 shadow-xl ring-1 ring-gray-900/10 sm:rounded-lg sm:px-10",children:[f.jsx("h1",{children:e==="paid"?"🥳 Payment Successful!":e==="canceled"?"😢 Payment Canceled":e==="error"&&"🙄 Payment Error"}),e!=="loading"&&f.jsxs("span",{className:"text-center",children:["You are being redirected to your chat page... ",f.jsx("br",{})]})]})})})}function Bd(){return f.jsx("svg",{className:"fill-meta-3",width:"10",height:"11",viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M4.35716 2.47737L0.908974 5.82987L5.0443e-07 4.94612L5 0.0848689L10 4.94612L9.09103 5.82987L5.64284 2.47737L5.64284 10.0849L4.35716 10.0849L4.35716 2.47737Z",fill:""})})}function E1(){return f.jsx("svg",{className:"fill-meta-5",width:"10",height:"11",viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M5.64284 7.69237L9.09102 4.33987L10 5.22362L5 10.0849L-8.98488e-07 5.22362L0.908973 4.33987L4.35716 7.69237L4.35716 0.0848701L5.64284 0.0848704L5.64284 7.69237Z",fill:""})})}const pE=({dailyStats:e,isLoading:t})=>{const r=G.useMemo(()=>!!(e!=null&&e.userDelta)&&e.userDelta>0,[e]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"18",viewBox:"0 0 22 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M7.18418 8.03751C9.31543 8.03751 11.0686 6.35313 11.0686 4.25626C11.0686 2.15938 9.31543 0.475006 7.18418 0.475006C5.05293 0.475006 3.2998 2.15938 3.2998 4.25626C3.2998 6.35313 5.05293 8.03751 7.18418 8.03751ZM7.18418 2.05626C8.45605 2.05626 9.52168 3.05313 9.52168 4.29063C9.52168 5.52813 8.49043 6.52501 7.18418 6.52501C5.87793 6.52501 4.84668 5.52813 4.84668 4.29063C4.84668 3.05313 5.9123 2.05626 7.18418 2.05626Z",fill:""}),f.jsx("path",{d:"M15.8124 9.6875C17.6687 9.6875 19.1468 8.24375 19.1468 6.42188C19.1468 4.6 17.6343 3.15625 15.8124 3.15625C13.9905 3.15625 12.478 4.6 12.478 6.42188C12.478 8.24375 13.9905 9.6875 15.8124 9.6875ZM15.8124 4.7375C16.8093 4.7375 17.5999 5.49375 17.5999 6.45625C17.5999 7.41875 16.8093 8.175 15.8124 8.175C14.8155 8.175 14.0249 7.41875 14.0249 6.45625C14.0249 5.49375 14.8155 4.7375 15.8124 4.7375Z",fill:""}),f.jsx("path",{d:"M15.9843 10.0313H15.6749C14.6437 10.0313 13.6468 10.3406 12.7874 10.8563C11.8593 9.61876 10.3812 8.79376 8.73115 8.79376H5.67178C2.85303 8.82814 0.618652 11.0625 0.618652 13.8469V16.3219C0.618652 16.975 1.13428 17.4906 1.7874 17.4906H20.2468C20.8999 17.4906 21.4499 16.9406 21.4499 16.2875V15.4625C21.4155 12.4719 18.9749 10.0313 15.9843 10.0313ZM2.16553 15.9438V13.8469C2.16553 11.9219 3.74678 10.3406 5.67178 10.3406H8.73115C10.6562 10.3406 12.2374 11.9219 12.2374 13.8469V15.9438H2.16553V15.9438ZM19.8687 15.9438H13.7499V13.8469C13.7499 13.2969 13.6468 12.7469 13.4749 12.2313C14.0937 11.7844 14.8499 11.5781 15.6405 11.5781H15.9499C18.0812 11.5781 19.8343 13.3313 19.8343 15.4625V15.9438H19.8687Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e==null?void 0:e.userCount}),f.jsx("span",{className:"text-sm font-medium",children:"Total Signups"})]}),f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t?"...":r?e==null?void 0:e.userDelta:"-",!!e&&r&&f.jsx(Bd,{})]})]})]})},gE=({totalPageViews:e,prevDayViewsChangePercent:t})=>{const r=parseInt(t||"")>0;return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"16",viewBox:"0 0 22 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M11 15.1156C4.19376 15.1156 0.825012 8.61876 0.687512 8.34376C0.584387 8.13751 0.584387 7.86251 0.687512 7.65626C0.825012 7.38126 4.19376 0.918762 11 0.918762C17.8063 0.918762 21.175 7.38126 21.3125 7.65626C21.4156 7.86251 21.4156 8.13751 21.3125 8.34376C21.175 8.61876 17.8063 15.1156 11 15.1156ZM2.26876 8.00001C3.02501 9.27189 5.98126 13.5688 11 13.5688C16.0188 13.5688 18.975 9.27189 19.7313 8.00001C18.975 6.72814 16.0188 2.43126 11 2.43126C5.98126 2.43126 3.02501 6.72814 2.26876 8.00001Z",fill:""}),f.jsx("path",{d:"M11 10.9219C9.38438 10.9219 8.07812 9.61562 8.07812 8C8.07812 6.38438 9.38438 5.07812 11 5.07812C12.6156 5.07812 13.9219 6.38438 13.9219 8C13.9219 9.61562 12.6156 10.9219 11 10.9219ZM11 6.625C10.2437 6.625 9.625 7.24375 9.625 8C9.625 8.75625 10.2437 9.375 11 9.375C11.7563 9.375 12.375 8.75625 12.375 8C12.375 7.24375 11.7563 6.625 11 6.625Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e}),f.jsx("span",{className:"text-sm font-medium",children:"Total page views"})]}),t&&parseInt(t)!==0&&f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t,"%",parseInt(t)>0?f.jsx(Bd,{}):f.jsx(E1,{})]})]})]})},mE=({dailyStats:e,isLoading:t})=>{const r=G.useMemo(()=>!!(e!=null&&e.paidUserDelta)&&(e==null?void 0:e.paidUserDelta)>0,[e]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M21.1063 18.0469L19.3875 3.23126C19.2157 1.71876 17.9438 0.584381 16.3969 0.584381H5.56878C4.05628 0.584381 2.78441 1.71876 2.57816 3.23126L0.859406 18.0469C0.756281 18.9063 1.03128 19.7313 1.61566 20.3844C2.20003 21.0375 2.99066 21.3813 3.85003 21.3813H18.1157C18.975 21.3813 19.8 21.0031 20.35 20.3844C20.9 19.7656 21.2094 18.9063 21.1063 18.0469ZM19.2157 19.3531C18.9407 19.6625 18.5625 19.8344 18.15 19.8344H3.85003C3.43753 19.8344 3.05941 19.6625 2.78441 19.3531C2.50941 19.0438 2.37191 18.6313 2.44066 18.2188L4.12503 3.43751C4.19378 2.71563 4.81253 2.16563 5.56878 2.16563H16.4313C17.1532 2.16563 17.7719 2.71563 17.875 3.43751L19.5938 18.2531C19.6282 18.6656 19.4907 19.0438 19.2157 19.3531Z",fill:""}),f.jsx("path",{d:"M14.3345 5.29375C13.922 5.39688 13.647 5.80938 13.7501 6.22188C13.7845 6.42813 13.8189 6.63438 13.8189 6.80625C13.8189 8.35313 12.547 9.625 11.0001 9.625C9.45327 9.625 8.1814 8.35313 8.1814 6.80625C8.1814 6.6 8.21577 6.42813 8.25015 6.22188C8.35327 5.80938 8.07827 5.39688 7.66577 5.29375C7.25327 5.19063 6.84077 5.46563 6.73765 5.87813C6.6689 6.1875 6.63452 6.49688 6.63452 6.80625C6.63452 9.2125 8.5939 11.1719 11.0001 11.1719C13.4064 11.1719 15.3658 9.2125 15.3658 6.80625C15.3658 6.49688 15.3314 6.1875 15.2626 5.87813C15.1595 5.46563 14.747 5.225 14.3345 5.29375Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e==null?void 0:e.paidUserCount}),f.jsx("span",{className:"text-sm font-medium",children:"Total Paying Users"})]}),f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t?"...":(e==null?void 0:e.paidUserDelta)!==0?e==null?void 0:e.paidUserDelta:"-",(e==null?void 0:e.paidUserDelta)!==0?r?f.jsx(Bd,{}):f.jsx(E1,{}):null]})]})]})},xE=({dailyStats:e,weeklyStats:t,isLoading:r})=>{const s=G.useMemo(()=>{var c;return t?t[0].totalRevenue-((c=t[1])==null?void 0:c.totalRevenue)>0:!1},[t]),o=G.useMemo(()=>{var p,v,C,A;if(!t||t.length<2||r)return;if(((p=t[1])==null?void 0:p.totalRevenue)===0||((v=t[0])==null?void 0:v.totalRevenue)===0)return 0;t.sort((L,P)=>P.id-L.id);const c=(t[0].totalRevenue-((C=t[1])==null?void 0:C.totalRevenue))/((A=t[1])==null?void 0:A.totalRevenue)*100;return Math.floor(c)},[t]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"20",height:"22",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M11.7531 16.4312C10.3781 16.4312 9.27808 17.5312 9.27808 18.9062C9.27808 20.2812 10.3781 21.3812 11.7531 21.3812C13.1281 21.3812 14.2281 20.2812 14.2281 18.9062C14.2281 17.5656 13.0937 16.4312 11.7531 16.4312ZM11.7531 19.8687C11.2375 19.8687 10.825 19.4562 10.825 18.9406C10.825 18.425 11.2375 18.0125 11.7531 18.0125C12.2687 18.0125 12.6812 18.425 12.6812 18.9406C12.6812 19.4219 12.2343 19.8687 11.7531 19.8687Z",fill:""}),f.jsx("path",{d:"M5.22183 16.4312C3.84683 16.4312 2.74683 17.5312 2.74683 18.9062C2.74683 20.2812 3.84683 21.3812 5.22183 21.3812C6.59683 21.3812 7.69683 20.2812 7.69683 18.9062C7.69683 17.5656 6.56245 16.4312 5.22183 16.4312ZM5.22183 19.8687C4.7062 19.8687 4.2937 19.4562 4.2937 18.9406C4.2937 18.425 4.7062 18.0125 5.22183 18.0125C5.73745 18.0125 6.14995 18.425 6.14995 18.9406C6.14995 19.4219 5.73745 19.8687 5.22183 19.8687Z",fill:""}),f.jsx("path",{d:"M19.0062 0.618744H17.15C16.325 0.618744 15.6031 1.23749 15.5 2.06249L14.95 6.01562H1.37185C1.0281 6.01562 0.684353 6.18749 0.443728 6.46249C0.237478 6.73749 0.134353 7.11562 0.237478 7.45937C0.237478 7.49374 0.237478 7.49374 0.237478 7.52812L2.36873 13.9562C2.50623 14.4375 2.9531 14.7812 3.46873 14.7812H12.9562C14.2281 14.7812 15.3281 13.8187 15.5 12.5469L16.9437 2.26874C16.9437 2.19999 17.0125 2.16562 17.0812 2.16562H18.9375C19.35 2.16562 19.7281 1.82187 19.7281 1.37499C19.7281 0.928119 19.4187 0.618744 19.0062 0.618744ZM14.0219 12.3062C13.9531 12.8219 13.5062 13.2 12.9906 13.2H3.7781L1.92185 7.56249H14.7094L14.0219 12.3062Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsxs("h4",{className:"text-title-md font-bold text-black dark:text-white",children:["$",e==null?void 0:e.totalRevenue]}),f.jsx("span",{className:"text-sm font-medium",children:"Total Revenue"})]}),f.jsxs("span",{className:"flex items-center gap-1 text-sm font-medium text-meta-3",children:[r?"...":o?o+"%":"-",o?s?f.jsx(Bd,{}):f.jsx(E1,{}):null]})]})]})};var U2={},If={exports:{}};/*! + `,children:p.id==="enterprise-tier"?"Contact us":r?"Start free trial":"Log in to buy plan"})]},p.id))})]})})},dE=({type:e,message:t,onClick:r})=>{const s=e==="success";return f.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 p-16 bg-black bg-opacity-50 backdrop-blur-md",children:f.jsxs("div",{className:"bg-captn-light-cream rounded-lg shadow-lg p-8 m-4 max-w-sm mx-auto",children:[f.jsx("h2",{className:"text-xl font-bold mb-4 text-captn-dark-blue",children:s?"Success":"Error"}),f.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:t}),f.jsx("div",{className:"mt-4 text-right",children:f.jsx("button",{onClick:r,className:`py-2 px-4 rounded text-captn-light-cream focus:outline-none ${s?"bg-captn-cta-green":"bg-captn-cta-red"}`,children:"OK"})})]})})};function uE({hasSubscribedToMarketingEmails:e}){const[t,r]=G.useState(e),[s,o]=G.useState(!1),[c,p]=G.useState(null),v=P=>{r(P.target.value==="Yes"),o(!0)},C=()=>{p(null)},A=async P=>{try{await Lb({hasSubscribedToMarketingEmails:P}),p("success")}catch{p("error")}o(!1)},E=c==="success"?"Your changes are saved successfully.":"Something went wrong. Please try again later.";return f.jsxs(f.Fragment,{children:[c&&f.jsx(dE,{type:c,onClick:C,message:E}),f.jsxs("div",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:[f.jsxs("label",{className:"mr-4",children:[f.jsx("input",{type:"radio",value:"Yes",checked:t,onChange:v,className:"form-radio text-captn-light-blue mr-2 focus:ring-1 outline-none"}),"Yes"]}),f.jsxs("label",{children:[f.jsx("input",{type:"radio",value:"No",checked:!t,onChange:v,className:"form-radio text-captn-light-blue mr-2 focus:ring-1 outline-none"}),"No"]})]}),f.jsx("div",{className:"ml-0 md:ml-4 flex-shrink-0 sm:col-span-1 sm:mt-0",style:{height:"24px"},children:f.jsx("button",{onClick:()=>A(t),disabled:!s,className:`mt-4 md:-mt-10 no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream ring-1 ring-inset ring-gray-200 hover:bg-captn-cta-green-hover shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:text-captn-light-cream bg-captn-cta-green ${s?"":"opacity-40 cursor-not-allowed"}`,children:"Save"})})]})}function hE({user:e}){return f.jsxs("div",{className:"mt-10 px-6",children:[f.jsxs("div",{className:"overflow-hidden bg-captn-light-cream ring-1 ring-gray-900/10 shadow-lg sm:rounded-lg lg:m-8 ",children:[f.jsx("div",{className:"px-4 py-5 sm:px-6 lg:px-8",children:f.jsx("h3",{className:"text-base font-semibold leading-6 text-captn-dark-blue",children:"Account Information"})}),f.jsx("div",{className:"border-t border-gray-200 px-4 py-5 sm:p-0",children:f.jsxs("dl",{className:"sm:divide-y sm:divide-gray-200",children:[!!e.email&&f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue dark:text-captn-light-cream",children:"Email address"}),f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue dark:text-gray-400 sm:col-span-2 sm:mt-0",children:e.email})]}),!!e.username&&f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue dark:text-captn-light-cream",children:"Username"}),f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue dark:text-gray-400 sm:col-span-2 sm:mt-0",children:e.username})]}),f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue",children:"Subscription status"}),e.hasPaid?f.jsxs(f.Fragment,{children:[e.subscriptionStatus!=="past_due"?f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"Active"}):f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"Your Account is Past Due! Please Update your Payment Information"}),f.jsx(fE,{})]}):f.jsxs(f.Fragment,{children:[f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"N/A"}),f.jsx("div",{className:"flex items-center justify-left -mt-2",children:f.jsx(Zc,{})})]})]}),f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue",children:"I agree to receiving marketing emails"}),f.jsx(f.Fragment,{children:f.jsx(uE,{hasSubscribedToMarketingEmails:e.hasSubscribedToMarketingEmails})})]})]})})]}),f.jsx("div",{className:"inline-flex w-full justify-end",children:f.jsx("button",{onClick:Rb,className:"inline-flex justify-center mx-8 py-2 px-4 border border-transparent shadow-md text-sm font-medium rounded-md text-captn-light-cream bg-captn-cta-green hover:bg-captn-cta-green-hover focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Log out"})})]})}function fE(){const e=()=>{window.open(l2,"_blank")};return f.jsx("div",{className:"ml-0 md:ml-4 flex-shrink-0 sm:col-span-1 sm:mt-0",children:f.jsx("button",{onClick:e,className:"font-medium text-sm text-captn-light-blue hover:underline",children:"Manage Subscription"})})}function pE(){const[e,t]=G.useState("loading"),r=Mr(),s=na();return G.useEffect(()=>{function o(){return setTimeout(()=>{r.push("/chat")},4e3)}const c=new URLSearchParams(s.search),p=c.get("success");return c.get("canceled")?t("canceled"):p?t("paid"):r.push("/chat"),o(),()=>{clearTimeout(o())}},[s]),f.jsx("div",{className:"flex min-h-full flex-col justify-center mt-10 sm:px-6 lg:px-8",children:f.jsx("div",{className:"sm:mx-auto sm:w-full sm:max-w-md",children:f.jsxs("div",{className:"bg-white py-8 px-4 shadow-xl ring-1 ring-gray-900/10 sm:rounded-lg sm:px-10",children:[f.jsx("h1",{children:e==="paid"?"🥳 Payment Successful!":e==="canceled"?"😢 Payment Canceled":e==="error"&&"🙄 Payment Error"}),e!=="loading"&&f.jsxs("span",{className:"text-center",children:["You are being redirected to your chat page... ",f.jsx("br",{})]})]})})})}function Bd(){return f.jsx("svg",{className:"fill-meta-3",width:"10",height:"11",viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M4.35716 2.47737L0.908974 5.82987L5.0443e-07 4.94612L5 0.0848689L10 4.94612L9.09103 5.82987L5.64284 2.47737L5.64284 10.0849L4.35716 10.0849L4.35716 2.47737Z",fill:""})})}function E1(){return f.jsx("svg",{className:"fill-meta-5",width:"10",height:"11",viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M5.64284 7.69237L9.09102 4.33987L10 5.22362L5 10.0849L-8.98488e-07 5.22362L0.908973 4.33987L4.35716 7.69237L4.35716 0.0848701L5.64284 0.0848704L5.64284 7.69237Z",fill:""})})}const gE=({dailyStats:e,isLoading:t})=>{const r=G.useMemo(()=>!!(e!=null&&e.userDelta)&&e.userDelta>0,[e]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"18",viewBox:"0 0 22 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M7.18418 8.03751C9.31543 8.03751 11.0686 6.35313 11.0686 4.25626C11.0686 2.15938 9.31543 0.475006 7.18418 0.475006C5.05293 0.475006 3.2998 2.15938 3.2998 4.25626C3.2998 6.35313 5.05293 8.03751 7.18418 8.03751ZM7.18418 2.05626C8.45605 2.05626 9.52168 3.05313 9.52168 4.29063C9.52168 5.52813 8.49043 6.52501 7.18418 6.52501C5.87793 6.52501 4.84668 5.52813 4.84668 4.29063C4.84668 3.05313 5.9123 2.05626 7.18418 2.05626Z",fill:""}),f.jsx("path",{d:"M15.8124 9.6875C17.6687 9.6875 19.1468 8.24375 19.1468 6.42188C19.1468 4.6 17.6343 3.15625 15.8124 3.15625C13.9905 3.15625 12.478 4.6 12.478 6.42188C12.478 8.24375 13.9905 9.6875 15.8124 9.6875ZM15.8124 4.7375C16.8093 4.7375 17.5999 5.49375 17.5999 6.45625C17.5999 7.41875 16.8093 8.175 15.8124 8.175C14.8155 8.175 14.0249 7.41875 14.0249 6.45625C14.0249 5.49375 14.8155 4.7375 15.8124 4.7375Z",fill:""}),f.jsx("path",{d:"M15.9843 10.0313H15.6749C14.6437 10.0313 13.6468 10.3406 12.7874 10.8563C11.8593 9.61876 10.3812 8.79376 8.73115 8.79376H5.67178C2.85303 8.82814 0.618652 11.0625 0.618652 13.8469V16.3219C0.618652 16.975 1.13428 17.4906 1.7874 17.4906H20.2468C20.8999 17.4906 21.4499 16.9406 21.4499 16.2875V15.4625C21.4155 12.4719 18.9749 10.0313 15.9843 10.0313ZM2.16553 15.9438V13.8469C2.16553 11.9219 3.74678 10.3406 5.67178 10.3406H8.73115C10.6562 10.3406 12.2374 11.9219 12.2374 13.8469V15.9438H2.16553V15.9438ZM19.8687 15.9438H13.7499V13.8469C13.7499 13.2969 13.6468 12.7469 13.4749 12.2313C14.0937 11.7844 14.8499 11.5781 15.6405 11.5781H15.9499C18.0812 11.5781 19.8343 13.3313 19.8343 15.4625V15.9438H19.8687Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e==null?void 0:e.userCount}),f.jsx("span",{className:"text-sm font-medium",children:"Total Signups"})]}),f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t?"...":r?e==null?void 0:e.userDelta:"-",!!e&&r&&f.jsx(Bd,{})]})]})]})},mE=({totalPageViews:e,prevDayViewsChangePercent:t})=>{const r=parseInt(t||"")>0;return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"16",viewBox:"0 0 22 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M11 15.1156C4.19376 15.1156 0.825012 8.61876 0.687512 8.34376C0.584387 8.13751 0.584387 7.86251 0.687512 7.65626C0.825012 7.38126 4.19376 0.918762 11 0.918762C17.8063 0.918762 21.175 7.38126 21.3125 7.65626C21.4156 7.86251 21.4156 8.13751 21.3125 8.34376C21.175 8.61876 17.8063 15.1156 11 15.1156ZM2.26876 8.00001C3.02501 9.27189 5.98126 13.5688 11 13.5688C16.0188 13.5688 18.975 9.27189 19.7313 8.00001C18.975 6.72814 16.0188 2.43126 11 2.43126C5.98126 2.43126 3.02501 6.72814 2.26876 8.00001Z",fill:""}),f.jsx("path",{d:"M11 10.9219C9.38438 10.9219 8.07812 9.61562 8.07812 8C8.07812 6.38438 9.38438 5.07812 11 5.07812C12.6156 5.07812 13.9219 6.38438 13.9219 8C13.9219 9.61562 12.6156 10.9219 11 10.9219ZM11 6.625C10.2437 6.625 9.625 7.24375 9.625 8C9.625 8.75625 10.2437 9.375 11 9.375C11.7563 9.375 12.375 8.75625 12.375 8C12.375 7.24375 11.7563 6.625 11 6.625Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e}),f.jsx("span",{className:"text-sm font-medium",children:"Total page views"})]}),t&&parseInt(t)!==0&&f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t,"%",parseInt(t)>0?f.jsx(Bd,{}):f.jsx(E1,{})]})]})]})},xE=({dailyStats:e,isLoading:t})=>{const r=G.useMemo(()=>!!(e!=null&&e.paidUserDelta)&&(e==null?void 0:e.paidUserDelta)>0,[e]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M21.1063 18.0469L19.3875 3.23126C19.2157 1.71876 17.9438 0.584381 16.3969 0.584381H5.56878C4.05628 0.584381 2.78441 1.71876 2.57816 3.23126L0.859406 18.0469C0.756281 18.9063 1.03128 19.7313 1.61566 20.3844C2.20003 21.0375 2.99066 21.3813 3.85003 21.3813H18.1157C18.975 21.3813 19.8 21.0031 20.35 20.3844C20.9 19.7656 21.2094 18.9063 21.1063 18.0469ZM19.2157 19.3531C18.9407 19.6625 18.5625 19.8344 18.15 19.8344H3.85003C3.43753 19.8344 3.05941 19.6625 2.78441 19.3531C2.50941 19.0438 2.37191 18.6313 2.44066 18.2188L4.12503 3.43751C4.19378 2.71563 4.81253 2.16563 5.56878 2.16563H16.4313C17.1532 2.16563 17.7719 2.71563 17.875 3.43751L19.5938 18.2531C19.6282 18.6656 19.4907 19.0438 19.2157 19.3531Z",fill:""}),f.jsx("path",{d:"M14.3345 5.29375C13.922 5.39688 13.647 5.80938 13.7501 6.22188C13.7845 6.42813 13.8189 6.63438 13.8189 6.80625C13.8189 8.35313 12.547 9.625 11.0001 9.625C9.45327 9.625 8.1814 8.35313 8.1814 6.80625C8.1814 6.6 8.21577 6.42813 8.25015 6.22188C8.35327 5.80938 8.07827 5.39688 7.66577 5.29375C7.25327 5.19063 6.84077 5.46563 6.73765 5.87813C6.6689 6.1875 6.63452 6.49688 6.63452 6.80625C6.63452 9.2125 8.5939 11.1719 11.0001 11.1719C13.4064 11.1719 15.3658 9.2125 15.3658 6.80625C15.3658 6.49688 15.3314 6.1875 15.2626 5.87813C15.1595 5.46563 14.747 5.225 14.3345 5.29375Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e==null?void 0:e.paidUserCount}),f.jsx("span",{className:"text-sm font-medium",children:"Total Paying Users"})]}),f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t?"...":(e==null?void 0:e.paidUserDelta)!==0?e==null?void 0:e.paidUserDelta:"-",(e==null?void 0:e.paidUserDelta)!==0?r?f.jsx(Bd,{}):f.jsx(E1,{}):null]})]})]})},vE=({dailyStats:e,weeklyStats:t,isLoading:r})=>{const s=G.useMemo(()=>{var c;return t?t[0].totalRevenue-((c=t[1])==null?void 0:c.totalRevenue)>0:!1},[t]),o=G.useMemo(()=>{var p,v,C,A;if(!t||t.length<2||r)return;if(((p=t[1])==null?void 0:p.totalRevenue)===0||((v=t[0])==null?void 0:v.totalRevenue)===0)return 0;t.sort((E,P)=>P.id-E.id);const c=(t[0].totalRevenue-((C=t[1])==null?void 0:C.totalRevenue))/((A=t[1])==null?void 0:A.totalRevenue)*100;return Math.floor(c)},[t]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"20",height:"22",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M11.7531 16.4312C10.3781 16.4312 9.27808 17.5312 9.27808 18.9062C9.27808 20.2812 10.3781 21.3812 11.7531 21.3812C13.1281 21.3812 14.2281 20.2812 14.2281 18.9062C14.2281 17.5656 13.0937 16.4312 11.7531 16.4312ZM11.7531 19.8687C11.2375 19.8687 10.825 19.4562 10.825 18.9406C10.825 18.425 11.2375 18.0125 11.7531 18.0125C12.2687 18.0125 12.6812 18.425 12.6812 18.9406C12.6812 19.4219 12.2343 19.8687 11.7531 19.8687Z",fill:""}),f.jsx("path",{d:"M5.22183 16.4312C3.84683 16.4312 2.74683 17.5312 2.74683 18.9062C2.74683 20.2812 3.84683 21.3812 5.22183 21.3812C6.59683 21.3812 7.69683 20.2812 7.69683 18.9062C7.69683 17.5656 6.56245 16.4312 5.22183 16.4312ZM5.22183 19.8687C4.7062 19.8687 4.2937 19.4562 4.2937 18.9406C4.2937 18.425 4.7062 18.0125 5.22183 18.0125C5.73745 18.0125 6.14995 18.425 6.14995 18.9406C6.14995 19.4219 5.73745 19.8687 5.22183 19.8687Z",fill:""}),f.jsx("path",{d:"M19.0062 0.618744H17.15C16.325 0.618744 15.6031 1.23749 15.5 2.06249L14.95 6.01562H1.37185C1.0281 6.01562 0.684353 6.18749 0.443728 6.46249C0.237478 6.73749 0.134353 7.11562 0.237478 7.45937C0.237478 7.49374 0.237478 7.49374 0.237478 7.52812L2.36873 13.9562C2.50623 14.4375 2.9531 14.7812 3.46873 14.7812H12.9562C14.2281 14.7812 15.3281 13.8187 15.5 12.5469L16.9437 2.26874C16.9437 2.19999 17.0125 2.16562 17.0812 2.16562H18.9375C19.35 2.16562 19.7281 1.82187 19.7281 1.37499C19.7281 0.928119 19.4187 0.618744 19.0062 0.618744ZM14.0219 12.3062C13.9531 12.8219 13.5062 13.2 12.9906 13.2H3.7781L1.92185 7.56249H14.7094L14.0219 12.3062Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsxs("h4",{className:"text-title-md font-bold text-black dark:text-white",children:["$",e==null?void 0:e.totalRevenue]}),f.jsx("span",{className:"text-sm font-medium",children:"Total Revenue"})]}),f.jsxs("span",{className:"flex items-center gap-1 text-sm font-medium text-meta-3",children:[r?"...":o?o+"%":"-",o?s?f.jsx(Bd,{}):f.jsx(E1,{}):null]})]})]})};var U2={},If={exports:{}};/*! * ApexCharts v3.47.0 * (c) 2018-2024 ApexCharts * Released under the MIT License. - */(function(e,t){function r(O,i){var n=Object.keys(O);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(O);i&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(O,l).enumerable})),n.push.apply(n,a)}return n}function s(O){for(var i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,a=L(O);if(i){var l=L(this).constructor;n=Reflect.construct(a,arguments,l)}else n=a.apply(this,arguments);return function(d,u){if(u&&(typeof u=="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return B(d)}(this,n)}}function H(O,i){return function(n){if(Array.isArray(n))return n}(O)||function(n,a){var l=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l!=null){var d,u,h=[],g=!0,x=!1;try{for(l=l.call(n);!(g=(d=l.next()).done)&&(h.push(d.value),!a||h.length!==a);g=!0);}catch(y){x=!0,u=y}finally{try{g||l.return==null||l.return()}finally{if(x)throw u}}return h}}(O,i)||Z(O,i)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. + */(function(e,t){function r(O,i){var n=Object.keys(O);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(O);i&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(O,l).enumerable})),n.push.apply(n,a)}return n}function s(O){for(var i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,a=E(O);if(i){var l=E(this).constructor;n=Reflect.construct(a,arguments,l)}else n=a.apply(this,arguments);return function(d,u){if(u&&(typeof u=="object"||typeof u=="function"))return u;if(u!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return B(d)}(this,n)}}function H(O,i){return function(n){if(Array.isArray(n))return n}(O)||function(n,a){var l=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l!=null){var d,u,h=[],g=!0,x=!1;try{for(l=l.call(n);!(g=(d=l.next()).done)&&(h.push(d.value),!a||h.length!==a);g=!0);}catch(y){x=!0,u=y}finally{try{g||l.return==null||l.return()}finally{if(x)throw u}}return h}}(O,i)||Z(O,i)||function(){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 D(O){return function(i){if(Array.isArray(i))return W(i)}(O)||function(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}(O)||Z(O)||function(){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 Z(O,i){if(O){if(typeof O=="string")return W(O,i);var n=Object.prototype.toString.call(O).slice(8,-1);return n==="Object"&&O.constructor&&(n=O.constructor.name),n==="Map"||n==="Set"?Array.from(O):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(O,i):void 0}}function W(O,i){(i==null||i>O.length)&&(i=O.length);for(var n=0,a=new Array(i);n=O.length?{done:!0}:{done:!1,value:O[a++]}},e:function(g){throw g},f:l}}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 d,u=!0,h=!1;return{s:function(){n=n.call(O)},n:function(){var g=n.next();return u=g.done,g},e:function(g){h=!0,d=g},f:function(){try{u||n.return==null||n.return()}finally{if(h)throw d}}}}var _=function(){function O(){c(this,O)}return v(O,[{key:"shadeRGBColor",value:function(i,n){var a=n.split(","),l=i<0?0:255,d=i<0?-1*i:i,u=parseInt(a[0].slice(4),10),h=parseInt(a[1],10),g=parseInt(a[2],10);return"rgb("+(Math.round((l-u)*d)+u)+","+(Math.round((l-h)*d)+h)+","+(Math.round((l-g)*d)+g)+")"}},{key:"shadeHexColor",value:function(i,n){var a=parseInt(n.slice(1),16),l=i<0?0:255,d=i<0?-1*i:i,u=a>>16,h=a>>8&255,g=255&a;return"#"+(16777216+65536*(Math.round((l-u)*d)+u)+256*(Math.round((l-h)*d)+h)+(Math.round((l-g)*d)+g)).toString(16).slice(1)}},{key:"shadeColor",value:function(i,n){return O.isColorHex(n)?this.shadeHexColor(i,n):this.shadeRGBColor(i,n)}}],[{key:"bind",value:function(i,n){return function(){return i.apply(n,arguments)}}},{key:"isObject",value:function(i){return i&&o(i)==="object"&&!Array.isArray(i)&&i!=null}},{key:"is",value:function(i,n){return Object.prototype.toString.call(n)==="[object "+i+"]"}},{key:"listToArray",value:function(i){var n,a=[];for(n=0;n1&&arguments[1]!==void 0?arguments[1]:2;return Number.isInteger(i)?i:parseFloat(i.toPrecision(n))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(i){var n=String(i).split(/[eE]/);if(n.length===1)return n[0];var a="",l=i<0?"-":"",d=n[0].replace(".",""),u=Number(n[1])+1;if(u<0){for(a=l+"0.";u++;)a+="0";return a+d.replace(/^-/,"")}for(u-=d.length;u--;)a+="0";return d+a}},{key:"getDimensions",value:function(i){var n=getComputedStyle(i,null),a=i.clientHeight,l=i.clientWidth;return a-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),[l-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),a]}},{key:"getBoundingClientRect",value:function(i){var n=i.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:i.clientWidth,height:i.clientHeight,x:n.left,y:n.top}}},{key:"getLargestStringFromArr",value:function(i){return i.reduce(function(n,a){return Array.isArray(a)&&(a=a.reduce(function(l,d){return l.length>d.length?l:d})),n.length>a.length?n:a},0)}},{key:"hexToRgba",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"#999999",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.6;i.substring(0,1)!=="#"&&(i="#999999");var a=i.replace("#","");a=a.match(new RegExp("(.{"+a.length/3+"})","g"));for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:"x",a=i.toString().slice();return a=a.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,n)}},{key:"negToZero",value:function(i){return i<0?0:i}},{key:"moveIndexInArray",value:function(i,n,a){if(a>=i.length)for(var l=a-i.length+1;l--;)i.push(void 0);return i.splice(a,0,i.splice(n,1)[0]),i}},{key:"extractNumber",value:function(i){return parseFloat(i.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(i,n){for(;(i=i.parentElement)&&!i.classList.contains(n););return i}},{key:"setELstyles",value:function(i,n){for(var a in n)n.hasOwnProperty(a)&&(i.style.key=n[a])}},{key:"isNumber",value:function(i){return!isNaN(i)&&parseFloat(Number(i))===i&&!isNaN(parseInt(i,10))}},{key:"isFloat",value:function(i){return Number(i)===i&&i%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(window.navigator.userAgent.indexOf("MSIE")!==-1||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var i=window.navigator.userAgent,n=i.indexOf("MSIE ");if(n>0)return parseInt(i.substring(n+5,i.indexOf(".",n)),10);if(i.indexOf("Trident/")>0){var a=i.indexOf("rv:");return parseInt(i.substring(a+3,i.indexOf(".",a)),10)}var l=i.indexOf("Edge/");return l>0&&parseInt(i.substring(l+5,i.indexOf(".",l)),10)}},{key:"getGCD",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,l=Math.pow(10,a-Math.floor(Math.log10(Math.max(i,n))));for(i=Math.round(Math.abs(i)*l),n=Math.round(Math.abs(n)*l);n;){var d=n;n=i%n,i=d}return i/l}},{key:"getPrimeFactors",value:function(i){for(var n=[],a=2;i>=2;)i%a==0?(n.push(a),i/=a):a++;return n}},{key:"mod",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,l=Math.pow(10,a-Math.floor(Math.log10(Math.max(i,n))));return(i=Math.round(Math.abs(i)*l))%(n=Math.round(Math.abs(n)*l))/l}}]),O}(),K=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.setEasingFunctions()}return v(O,[{key:"setEasingFunctions",value:function(){var i;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":i="-";break;case"easein":i="<";break;case"easeout":i=">";break;case"easeinout":default:i="<>";break;case"swing":i=function(n){var a=1.70158;return(n-=1)*n*((a+1)*n+a)+1};break;case"bounce":i=function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375};break;case"elastic":i=function(n){return n===!!n?n:Math.pow(2,-10*n)*Math.sin((n-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=i}}},{key:"animateLine",value:function(i,n,a,l){i.attr(n).animate(l).attr(a)}},{key:"animateMarker",value:function(i,n,a,l,d,u){n||(n=0),i.attr({r:n,width:n,height:n}).animate(l,d).attr({r:a,width:a.width,height:a.height}).afterAll(function(){u()})}},{key:"animateCircle",value:function(i,n,a,l,d){i.attr({r:n.r,cx:n.cx,cy:n.cy}).animate(l,d).attr({r:a.r,cx:a.cx,cy:a.cy})}},{key:"animateRect",value:function(i,n,a,l,d){i.attr(n).animate(l).attr(a).afterAll(function(){return d()})}},{key:"animatePathsGradually",value:function(i){var n=i.el,a=i.realIndex,l=i.j,d=i.fill,u=i.pathFrom,h=i.pathTo,g=i.speed,x=i.delay,y=this.w,b=0;y.config.chart.animations.animateGradually.enabled&&(b=y.config.chart.animations.animateGradually.delay),y.config.chart.animations.dynamicAnimation.enabled&&y.globals.dataChanged&&y.config.chart.type!=="bar"&&(b=0),this.morphSVG(n,a,l,y.config.chart.type!=="line"||y.globals.comboCharts?d:"stroke",u,h,g,x*b)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(i){var n=i.el;n.classList.remove("apexcharts-element-hidden"),n.classList.add("apexcharts-hidden-element-shown")})}},{key:"animationCompleted",value:function(i){var n=this.w;n.globals.animationEnded||(n.globals.animationEnded=!0,this.showDelayedElements(),typeof n.config.chart.events.animationEnd=="function"&&n.config.chart.events.animationEnd(this.ctx,{el:i,w:n}))}},{key:"morphSVG",value:function(i,n,a,l,d,u,h,g){var x=this,y=this.w;d||(d=i.attr("pathFrom")),u||(u=i.attr("pathTo"));var b=function(w){return y.config.chart.type==="radar"&&(h=1),"M 0 ".concat(y.globals.gridHeight)};(!d||d.indexOf("undefined")>-1||d.indexOf("NaN")>-1)&&(d=b()),(!u||u.indexOf("undefined")>-1||u.indexOf("NaN")>-1)&&(u=b()),y.globals.shouldAnimate||(h=1),i.plot(d).animate(1,y.globals.easing,g).plot(d).animate(h,y.globals.easing,g).plot(u).afterAll(function(){_.isNumber(a)?a===y.globals.series[y.globals.maxValsInArrayIndex].length-2&&y.globals.shouldAnimate&&x.animationCompleted(i):l!=="none"&&y.globals.shouldAnimate&&(!y.globals.comboCharts&&n===y.globals.series.length-1||y.globals.comboCharts)&&x.animationCompleted(i),x.showDelayedElements()})}}]),O}(),ee=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"getDefaultFilter",value:function(i,n){var a=this.w;i.unfilter(!0),new window.SVG.Filter().size("120%","180%","-5%","-40%"),a.config.states.normal.filter!=="none"?this.applyFilter(i,n,a.config.states.normal.filter.type,a.config.states.normal.filter.value):a.config.chart.dropShadow.enabled&&this.dropShadow(i,a.config.chart.dropShadow,n)}},{key:"addNormalFilter",value:function(i,n){var a=this.w;a.config.chart.dropShadow.enabled&&!i.node.classList.contains("apexcharts-marker")&&this.dropShadow(i,a.config.chart.dropShadow,n)}},{key:"addLightenFilter",value:function(i,n,a){var l=this,d=this.w,u=a.intensity;i.unfilter(!0),new window.SVG.Filter,i.filter(function(h){var g=d.config.chart.dropShadow;(g.enabled?l.addShadow(h,n,g):h).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:u}})}),i.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(i.filterer.node)}},{key:"addDarkenFilter",value:function(i,n,a){var l=this,d=this.w,u=a.intensity;i.unfilter(!0),new window.SVG.Filter,i.filter(function(h){var g=d.config.chart.dropShadow;(g.enabled?l.addShadow(h,n,g):h).componentTransfer({rgb:{type:"linear",slope:u}})}),i.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(i.filterer.node)}},{key:"applyFilter",value:function(i,n,a){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.5;switch(a){case"none":this.addNormalFilter(i,n);break;case"lighten":this.addLightenFilter(i,n,{intensity:l});break;case"darken":this.addDarkenFilter(i,n,{intensity:l})}}},{key:"addShadow",value:function(i,n,a){var l,d=this.w,u=a.blur,h=a.top,g=a.left,x=a.color,y=a.opacity;if(((l=d.config.chart.dropShadow.enabledOnSeries)===null||l===void 0?void 0:l.length)>0&&d.config.chart.dropShadow.enabledOnSeries.indexOf(n)===-1)return i;var b=i.flood(Array.isArray(x)?x[n]:x,y).composite(i.sourceAlpha,"in").offset(g,h).gaussianBlur(u).merge(i.source);return i.blend(i.source,b)}},{key:"dropShadow",value:function(i,n){var a,l,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,u=n.top,h=n.left,g=n.blur,x=n.color,y=n.opacity,b=n.noUserSpaceOnUse,w=this.w;return i.unfilter(!0),_.isIE()&&w.config.chart.type==="radialBar"||((a=w.config.chart.dropShadow.enabledOnSeries)===null||a===void 0?void 0:a.length)>0&&((l=w.config.chart.dropShadow.enabledOnSeries)===null||l===void 0?void 0:l.indexOf(d))===-1||(x=Array.isArray(x)?x[d]:x,i.filter(function(S){var j=null;j=_.isSafari()||_.isFirefox()||_.isIE()?S.flood(x,y).composite(S.sourceAlpha,"in").offset(h,u).gaussianBlur(g):S.flood(x,y).composite(S.sourceAlpha,"in").offset(h,u).gaussianBlur(g).merge(S.source),S.blend(S.source,j)}),b||i.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(i.filterer.node)),i}},{key:"setSelectionFilter",value:function(i,n,a){var l=this.w;if(l.globals.selectedDataPoints[n]!==void 0&&l.globals.selectedDataPoints[n].indexOf(a)>-1){i.node.setAttribute("selected",!0);var d=l.config.states.active.filter;d!=="none"&&this.applyFilter(i,n,d.type,d.value)}}},{key:"_scaleFilterSize",value:function(i){(function(n){for(var a in n)n.hasOwnProperty(a)&&i.setAttribute(a,n[a])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),O}(),X=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"roundPathCorners",value:function(i,n){function a($,Y,U){var te=Y.x-$.x,ne=Y.y-$.y,ie=Math.sqrt(te*te+ne*ne);return l($,Y,Math.min(1,U/ie))}function l($,Y,U){return{x:$.x+(Y.x-$.x)*U,y:$.y+(Y.y-$.y)*U}}function d($,Y){$.length>2&&($[$.length-2]=Y.x,$[$.length-1]=Y.y)}function u($){return{x:parseFloat($[$.length-2]),y:parseFloat($[$.length-1])}}i.indexOf("NaN")>-1&&(i="");var h=i.split(/[,\s]/).reduce(function($,Y){var U=Y.match("([a-zA-Z])(.+)");return U?($.push(U[1]),$.push(U[2])):$.push(Y),$},[]).reduce(function($,Y){return parseFloat(Y)==Y&&$.length?$[$.length-1].push(Y):$.push([Y]),$},[]),g=[];if(h.length>1){var x=u(h[0]),y=null;h[h.length-1][0]=="Z"&&h[0].length>2&&(y=["L",x.x,x.y],h[h.length-1]=y),g.push(h[0]);for(var b=1;b2&&S[0]=="L"&&j.length>2&&j[0]=="L"){var E,T,I=u(w),F=u(S),m=u(j);E=a(F,I,n),T=a(F,m,n),d(S,E),S.origPoint=F,g.push(S);var k=l(E,F,.5),N=l(F,T,.5),R=["C",k.x,k.y,N.x,N.y,T.x,T.y];R.origPoint=F,g.push(R)}else g.push(S)}if(y){var z=u(g[g.length-1]);g.push(["Z"]),d(g[0],z)}}else g=h;return g.reduce(function($,Y){return $+Y.join(" ")+" "},"")}},{key:"drawLine",value:function(i,n,a,l){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"#a8a8a8",u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,g=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:i,y1:n,x2:a,y2:l,stroke:d,"stroke-dasharray":u,"stroke-width":h,"stroke-linecap":g})}},{key:"drawRect",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"#fefefe",h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,g=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,x=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null,y=arguments.length>9&&arguments[9]!==void 0?arguments[9]:0,b=this.w.globals.dom.Paper.rect();return b.attr({x:i,y:n,width:a>0?a:0,height:l>0?l:0,rx:d,ry:d,opacity:h,"stroke-width":g!==null?g:0,stroke:x!==null?x:"none","stroke-dasharray":y}),b.node.setAttribute("fill",u),b}},{key:"drawPolygon",value:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#e1e1e1",a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(i).attr({fill:l,stroke:n,"stroke-width":a})}},{key:"drawCircle",value:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;i<0&&(i=0);var a=this.w.globals.dom.Paper.circle(2*i);return n!==null&&a.attr(n),a}},{key:"drawPath",value:function(i){var n=i.d,a=n===void 0?"":n,l=i.stroke,d=l===void 0?"#a8a8a8":l,u=i.strokeWidth,h=u===void 0?1:u,g=i.fill,x=i.fillOpacity,y=x===void 0?1:x,b=i.strokeOpacity,w=b===void 0?1:b,S=i.classes,j=i.strokeLinecap,E=j===void 0?null:j,T=i.strokeDashArray,I=T===void 0?0:T,F=this.w;return E===null&&(E=F.config.stroke.lineCap),(a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a="M 0 ".concat(F.globals.gridHeight)),F.globals.dom.Paper.path(a).attr({fill:g,"fill-opacity":y,stroke:d,"stroke-opacity":w,"stroke-linecap":E,"stroke-width":h,"stroke-dasharray":I,class:S})}},{key:"group",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w.globals.dom.Paper.group();return i!==null&&n.attr(i),n}},{key:"move",value:function(i,n){var a=["M",i,n].join(" ");return a}},{key:"line",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,l=null;return a===null?l=[" L",i,n].join(" "):a==="H"?l=[" H",i].join(" "):a==="V"&&(l=[" V",n].join(" ")),l}},{key:"curve",value:function(i,n,a,l,d,u){var h=["C",i,n,a,l,d,u].join(" ");return h}},{key:"quadraticCurve",value:function(i,n,a,l){return["Q",i,n,a,l].join(" ")}},{key:"arc",value:function(i,n,a,l,d,u,h){var g="A";arguments.length>7&&arguments[7]!==void 0&&arguments[7]&&(g="a");var x=[g,i,n,a,l,d,u,h].join(" ");return x}},{key:"renderPaths",value:function(i){var n,a=i.j,l=i.realIndex,d=i.pathFrom,u=i.pathTo,h=i.stroke,g=i.strokeWidth,x=i.strokeLinecap,y=i.fill,b=i.animationDelay,w=i.initialSpeed,S=i.dataChangeSpeed,j=i.className,E=i.shouldClipToGrid,T=E===void 0||E,I=i.bindEventsOnPaths,F=I===void 0||I,m=i.drawShadow,k=m===void 0||m,N=this.w,R=new ee(this.ctx),z=new K(this.ctx),$=this.w.config.chart.animations.enabled,Y=$&&this.w.config.chart.animations.dynamicAnimation.enabled,U=!!($&&!N.globals.resized||Y&&N.globals.dataChanged&&N.globals.shouldAnimate);U?n=d:(n=u,N.globals.animationEnded=!0);var te=N.config.stroke.dashArray,ne=0;ne=Array.isArray(te)?te[l]:N.config.stroke.dashArray;var ie=this.drawPath({d:n,stroke:h,strokeWidth:g,fill:y,fillOpacity:1,classes:j,strokeLinecap:x,strokeDashArray:ne});if(ie.attr("index",l),T&&ie.attr({"clip-path":"url(#gridRectMask".concat(N.globals.cuid,")")}),N.config.states.normal.filter.type!=="none")R.getDefaultFilter(ie,l);else if(N.config.chart.dropShadow.enabled&&k){var ge=N.config.chart.dropShadow;R.dropShadow(ie,ge,l)}F&&(ie.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,ie)),ie.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,ie)),ie.node.addEventListener("mousedown",this.pathMouseDown.bind(this,ie))),ie.attr({pathTo:u,pathFrom:d});var be={el:ie,j:a,realIndex:l,pathFrom:d,pathTo:u,fill:y,strokeWidth:g,delay:b};return!$||N.globals.resized||N.globals.dataChanged?!N.globals.resized&&N.globals.dataChanged||z.showDelayedElements():z.animatePathsGradually(s(s({},be),{},{speed:w})),N.globals.dataChanged&&Y&&U&&z.animatePathsGradually(s(s({},be),{},{speed:S})),ie}},{key:"drawPattern",value:function(i,n,a){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"#a8a8a8",d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;return this.w.globals.dom.Paper.pattern(n,a,function(u){i==="horizontalLines"?u.line(0,0,a,0).stroke({color:l,width:d+1}):i==="verticalLines"?u.line(0,0,0,n).stroke({color:l,width:d+1}):i==="slantedLines"?u.line(0,0,n,a).stroke({color:l,width:d}):i==="squares"?u.rect(n,a).fill("none").stroke({color:l,width:d}):i==="circles"&&u.circle(n).fill("none").stroke({color:l,width:d})})}},{key:"drawGradient",value:function(i,n,a,l,d){var u,h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,g=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,x=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,y=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0,b=this.w;n.length<9&&n.indexOf("#")===0&&(n=_.hexToRgba(n,l)),a.length<9&&a.indexOf("#")===0&&(a=_.hexToRgba(a,d));var w=0,S=1,j=1,E=null;g!==null&&(w=g[0]!==void 0?g[0]/100:0,S=g[1]!==void 0?g[1]/100:1,j=g[2]!==void 0?g[2]/100:1,E=g[3]!==void 0?g[3]/100:null);var T=!(b.config.chart.type!=="donut"&&b.config.chart.type!=="pie"&&b.config.chart.type!=="polarArea"&&b.config.chart.type!=="bubble");if(u=x===null||x.length===0?b.globals.dom.Paper.gradient(T?"radial":"linear",function(m){m.at(w,n,l),m.at(S,a,d),m.at(j,a,d),E!==null&&m.at(E,n,l)}):b.globals.dom.Paper.gradient(T?"radial":"linear",function(m){(Array.isArray(x[y])?x[y]:x).forEach(function(k){m.at(k.offset/100,k.color,k.opacity)})}),T){var I=b.globals.gridWidth/2,F=b.globals.gridHeight/2;b.config.chart.type!=="bubble"?u.attr({gradientUnits:"userSpaceOnUse",cx:I,cy:F,r:h}):u.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else i==="vertical"?u.from(0,0).to(0,1):i==="diagonal"?u.from(0,0).to(1,1):i==="horizontal"?u.from(0,1).to(1,1):i==="diagonal2"&&u.from(1,0).to(0,1);return u}},{key:"getTextBasedOnMaxWidth",value:function(i){var n=i.text,a=i.maxWidth,l=i.fontSize,d=i.fontFamily,u=this.getTextRects(n,l,d),h=u.width/n.length,g=Math.floor(a/h);return a-1){var g=a.globals.selectedDataPoints[d].indexOf(u);a.globals.selectedDataPoints[d].splice(g,1)}}else{if(!a.config.states.active.allowMultipleDataPointsSelection&&a.globals.selectedDataPoints.length>0){a.globals.selectedDataPoints=[];var x=a.globals.dom.Paper.select(".apexcharts-series path").members,y=a.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,b=function(j){Array.prototype.forEach.call(j,function(E){E.node.setAttribute("selected","false"),l.getDefaultFilter(E,d)})};b(x),b(y)}i.node.setAttribute("selected","true"),h="true",a.globals.selectedDataPoints[d]===void 0&&(a.globals.selectedDataPoints[d]=[]),a.globals.selectedDataPoints[d].push(u)}if(h==="true"){var w=a.config.states.active.filter;if(w!=="none")l.applyFilter(i,d,w.type,w.value);else if(a.config.states.hover.filter!=="none"&&!a.globals.isTouchDevice){var S=a.config.states.hover.filter;l.applyFilter(i,d,S.type,S.value)}}else a.config.states.active.filter.type!=="none"&&(a.config.states.hover.filter.type==="none"||a.globals.isTouchDevice?l.getDefaultFilter(i,d):(S=a.config.states.hover.filter,l.applyFilter(i,d,S.type,S.value)));typeof a.config.chart.events.dataPointSelection=="function"&&a.config.chart.events.dataPointSelection(n,this.ctx,{selectedDataPoints:a.globals.selectedDataPoints,seriesIndex:d,dataPointIndex:u,w:a}),n&&this.ctx.events.fireEvent("dataPointSelection",[n,this.ctx,{selectedDataPoints:a.globals.selectedDataPoints,seriesIndex:d,dataPointIndex:u,w:a}])}},{key:"rotateAroundCenter",value:function(i){var n={};return i&&typeof i.getBBox=="function"&&(n=i.getBBox()),{x:n.x+n.width/2,y:n.y+n.height/2}}},{key:"getTextRects",value:function(i,n,a,l){var d=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],u=this.w,h=this.drawText({x:-200,y:-200,text:i,textAnchor:"start",fontSize:n,fontFamily:a,foreColor:"#fff",opacity:0});l&&h.attr("transform",l),u.globals.dom.Paper.add(h);var g=h.bbox();return d||(g=h.node.getBoundingClientRect()),h.remove(),{width:g.width,height:g.height}}},{key:"placeTextWithEllipsis",value:function(i,n,a){if(typeof i.getComputedTextLength=="function"&&(i.textContent=n,n.length>0&&i.getComputedTextLength()>=a/1.1)){for(var l=n.length-3;l>0;l-=3)if(i.getSubStringLength(0,l)<=a/1.1)return void(i.textContent=n.substring(0,l)+"...");i.textContent="."}}}],[{key:"setAttrs",value:function(i,n){for(var a in n)n.hasOwnProperty(a)&&i.setAttribute(a,n[a])}}]),O}(),q=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"getStackedSeriesTotals",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=this.w,a=[];if(n.globals.series.length===0)return a;for(var l=0;l0&&arguments[0]!==void 0?arguments[0]:null;return i===null?this.w.config.series.reduce(function(n,a){return n+a},0):this.w.globals.series[i].reduce(function(n,a){return n+a},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var i=this,n=this.w,a=[];return n.globals.seriesGroups.forEach(function(l){var d=[];n.config.series.forEach(function(h,g){l.indexOf(h.name)>-1&&d.push(g)});var u=n.globals.series.map(function(h,g){return d.indexOf(g)===-1?g:-1}).filter(function(h){return h!==-1});a.push(i.getStackedSeriesTotals(u))}),a}},{key:"isSeriesNull",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return(i===null?this.w.config.series.filter(function(n){return n!==null}):this.w.config.series[i].data.filter(function(n){return n!==null})).length===0}},{key:"seriesHaveSameValues",value:function(i){return this.w.globals.series[i].every(function(n,a,l){return n===l[0]})}},{key:"getCategoryLabels",value:function(i){var n=this.w,a=i.slice();return n.config.xaxis.convertedCatToNumeric&&(a=i.map(function(l,d){return n.config.xaxis.labels.formatter(l-n.globals.minX+1)})),a}},{key:"getLargestSeries",value:function(){var i=this.w;i.globals.maxValsInArrayIndex=i.globals.series.map(function(n){return n.length}).indexOf(Math.max.apply(Math,i.globals.series.map(function(n){return n.length})))}},{key:"getLargestMarkerSize",value:function(){var i=this.w,n=0;return i.globals.markers.size.forEach(function(a){n=Math.max(n,a)}),i.config.markers.discrete&&i.config.markers.discrete.length&&i.config.markers.discrete.forEach(function(a){n=Math.max(n,a.size)}),n>0&&(n+=i.config.markers.hover.sizeOffset+1),i.globals.markers.largestSize=n,n}},{key:"getSeriesTotals",value:function(){var i=this.w;i.globals.seriesTotals=i.globals.series.map(function(n,a){var l=0;if(Array.isArray(n))for(var d=0;di&&a.globals.seriesX[d][h]0&&(n=!0),{comboBarCount:a,comboCharts:n}}},{key:"extendArrayProps",value:function(i,n,a){var l,d,u,h,g,x;return(l=n)!==null&&l!==void 0&&l.yaxis&&(n=i.extendYAxis(n,a)),(d=n)!==null&&d!==void 0&&d.annotations&&(n.annotations.yaxis&&(n=i.extendYAxisAnnotations(n)),(u=n)!==null&&u!==void 0&&(h=u.annotations)!==null&&h!==void 0&&h.xaxis&&(n=i.extendXAxisAnnotations(n)),(g=n)!==null&&g!==void 0&&(x=g.annotations)!==null&&x!==void 0&&x.points&&(n=i.extendPointAnnotations(n))),n}}]),O}(),J=function(){function O(i){c(this,O),this.w=i.w,this.annoCtx=i}return v(O,[{key:"setOrientations",value:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=this.w;if(i.label.orientation==="vertical"){var l=n!==null?n:0,d=a.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(l,"']"));if(d!==null){var u=d.getBoundingClientRect();d.setAttribute("x",parseFloat(d.getAttribute("x"))-u.height+4),i.label.position==="top"?d.setAttribute("y",parseFloat(d.getAttribute("y"))+u.width):d.setAttribute("y",parseFloat(d.getAttribute("y"))-u.width);var h=this.annoCtx.graphics.rotateAroundCenter(d),g=h.x,x=h.y;d.setAttribute("transform","rotate(-90 ".concat(g," ").concat(x,")"))}}}},{key:"addBackgroundToAnno",value:function(i,n){var a=this.w;if(!i||n.label.text===void 0||n.label.text!==void 0&&!String(n.label.text).trim())return null;var l=a.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),d=i.getBoundingClientRect(),u=n.label.style.padding.left,h=n.label.style.padding.right,g=n.label.style.padding.top,x=n.label.style.padding.bottom;n.label.orientation==="vertical"&&(g=n.label.style.padding.left,x=n.label.style.padding.right,u=n.label.style.padding.top,h=n.label.style.padding.bottom);var y=d.left-l.left-u,b=d.top-l.top-g,w=this.annoCtx.graphics.drawRect(y-a.globals.barPadForNumericAxis,b,d.width+u+h,d.height+g+x,n.label.borderRadius,n.label.style.background,1,n.label.borderWidth,n.label.borderColor,0);return n.id&&w.node.classList.add(n.id),w}},{key:"annotationsBackground",value:function(){var i=this,n=this.w,a=function(l,d,u){var h=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(u,"-annotations .apexcharts-").concat(u,"-annotation-label[rel='").concat(d,"']"));if(h){var g=h.parentNode,x=i.addBackgroundToAnno(h,l);x&&(g.insertBefore(x.node,h),l.label.mouseEnter&&x.node.addEventListener("mouseenter",l.label.mouseEnter.bind(i,l)),l.label.mouseLeave&&x.node.addEventListener("mouseleave",l.label.mouseLeave.bind(i,l)),l.label.click&&x.node.addEventListener("click",l.label.click.bind(i,l)))}};n.config.annotations.xaxis.map(function(l,d){a(l,d,"xaxis")}),n.config.annotations.yaxis.map(function(l,d){a(l,d,"yaxis")}),n.config.annotations.points.map(function(l,d){a(l,d,"point")})}},{key:"getY1Y2",value:function(i,n){var a,l=i==="y1"?n.y:n.y2,d=this.w;if(this.annoCtx.invertAxis){var u=d.globals.labels;d.config.xaxis.convertedCatToNumeric&&(u=d.globals.categoryLabels);var h=u.indexOf(l),g=d.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(h+1)+")");a=g?parseFloat(g.getAttribute("y")):(d.globals.gridHeight/u.length-1)*(h+1)-d.globals.barHeight,n.seriesIndex!==void 0&&d.globals.barHeight&&(a=a-d.globals.barHeight/2*(d.globals.series.length-1)+d.globals.barHeight*n.seriesIndex)}else{var x;d.config.yaxis[n.yAxisIndex].logarithmic?x=(l=new q(this.annoCtx.ctx).getLogVal(l,n.yAxisIndex))/d.globals.yLogRatio[n.yAxisIndex]:x=(l-d.globals.minYArr[n.yAxisIndex])/(d.globals.yRange[n.yAxisIndex]/d.globals.gridHeight),a=d.globals.gridHeight-x,!n.marker||n.y!==void 0&&n.y!==null||(a=0),d.config.yaxis[n.yAxisIndex]&&d.config.yaxis[n.yAxisIndex].reversed&&(a=x)}return typeof l=="string"&&l.indexOf("px")>-1&&(a=parseFloat(l)),a}},{key:"getX1X2",value:function(i,n){var a=this.w,l=this.annoCtx.invertAxis?a.globals.minY:a.globals.minX,d=this.annoCtx.invertAxis?a.globals.maxY:a.globals.maxX,u=this.annoCtx.invertAxis?a.globals.yRange[0]:a.globals.xRange,h=(n.x-l)/(u/a.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(h=(d-n.x)/(u/a.globals.gridWidth)),a.config.xaxis.type!=="category"&&!a.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||a.globals.dataFormatXNumeric||(h=this.getStringX(n.x));var g=(n.x2-l)/(u/a.globals.gridWidth);return this.annoCtx.inversedReversedAxis&&(g=(d-n.x2)/(u/a.globals.gridWidth)),a.config.xaxis.type!=="category"&&!a.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||a.globals.dataFormatXNumeric||(g=this.getStringX(n.x2)),n.x!==void 0&&n.x!==null||!n.marker||(h=a.globals.gridWidth),i==="x1"&&typeof n.x=="string"&&n.x.indexOf("px")>-1&&(h=parseFloat(n.x)),i==="x2"&&typeof n.x2=="string"&&n.x2.indexOf("px")>-1&&(g=parseFloat(n.x2)),n.seriesIndex!==void 0&&a.globals.barWidth&&!this.annoCtx.invertAxis&&(h=h-a.globals.barWidth/2*(a.globals.series.length-1)+a.globals.barWidth*n.seriesIndex),i==="x1"?h:g}},{key:"getStringX",value:function(i){var n=this.w,a=i;n.config.xaxis.convertedCatToNumeric&&n.globals.categoryLabels.length&&(i=n.globals.categoryLabels.indexOf(i)+1);var l=n.globals.labels.indexOf(i),d=n.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(l+1)+")");return d&&(a=parseFloat(d.getAttribute("x"))),a}}]),O}(),me=function(){function O(i){c(this,O),this.w=i.w,this.annoCtx=i,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new J(this.annoCtx)}return v(O,[{key:"addXaxisAnnotation",value:function(i,n,a){var l,d=this.w,u=this.helpers.getX1X2("x1",i),h=i.label.text,g=i.strokeDashArray;if(_.isNumber(u)){if(i.x2===null||i.x2===void 0){var x=this.annoCtx.graphics.drawLine(u+i.offsetX,0+i.offsetY,u+i.offsetX,d.globals.gridHeight+i.offsetY,i.borderColor,g,i.borderWidth);n.appendChild(x.node),i.id&&x.node.classList.add(i.id)}else{if((l=this.helpers.getX1X2("x2",i))h){var y=h;h=l,l=y}var b=this.annoCtx.graphics.drawRect(0+i.offsetX,l+i.offsetY,this._getYAxisAnnotationWidth(i),h-l,0,i.fillColor,i.opacity,1,i.borderColor,u);b.node.classList.add("apexcharts-annotation-rect"),b.attr("clip-path","url(#gridRectMask".concat(d.globals.cuid,")")),n.appendChild(b.node),i.id&&b.node.classList.add(i.id)}var w=i.label.position==="right"?d.globals.gridWidth:i.label.position==="center"?d.globals.gridWidth/2:0,S=this.annoCtx.graphics.drawText({x:w+i.label.offsetX,y:(l??h)+i.label.offsetY-3,text:g,textAnchor:i.label.textAnchor,fontSize:i.label.style.fontSize,fontFamily:i.label.style.fontFamily,fontWeight:i.label.style.fontWeight,foreColor:i.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(i.label.style.cssClass," ").concat(i.id?i.id:"")});S.attr({rel:a}),n.appendChild(S.node)}},{key:"_getYAxisAnnotationWidth",value:function(i){var n=this.w;return n.globals.gridWidth,(i.width.indexOf("%")>-1?n.globals.gridWidth*parseInt(i.width,10)/100:parseInt(i.width,10))+i.offsetX}},{key:"drawYAxisAnnotations",value:function(){var i=this,n=this.w,a=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return n.config.annotations.yaxis.map(function(l,d){i.addYaxisAnnotation(l,a.node,d)}),a}}]),O}(),Te=function(){function O(i){c(this,O),this.w=i.w,this.annoCtx=i,this.helpers=new J(this.annoCtx)}return v(O,[{key:"addPointAnnotation",value:function(i,n,a){this.w;var l=this.helpers.getX1X2("x1",i),d=this.helpers.getY1Y2("y1",i);if(_.isNumber(l)){var u={pSize:i.marker.size,pointStrokeWidth:i.marker.strokeWidth,pointFillColor:i.marker.fillColor,pointStrokeColor:i.marker.strokeColor,shape:i.marker.shape,pRadius:i.marker.radius,class:"apexcharts-point-annotation-marker ".concat(i.marker.cssClass," ").concat(i.id?i.id:"")},h=this.annoCtx.graphics.drawMarker(l+i.marker.offsetX,d+i.marker.offsetY,u);n.appendChild(h.node);var g=i.label.text?i.label.text:"",x=this.annoCtx.graphics.drawText({x:l+i.label.offsetX,y:d+i.label.offsetY-i.marker.size-parseFloat(i.label.style.fontSize)/1.6,text:g,textAnchor:i.label.textAnchor,fontSize:i.label.style.fontSize,fontFamily:i.label.style.fontFamily,fontWeight:i.label.style.fontWeight,foreColor:i.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(i.label.style.cssClass," ").concat(i.id?i.id:"")});if(x.attr({rel:a}),n.appendChild(x.node),i.customSVG.SVG){var y=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+i.customSVG.cssClass});y.attr({transform:"translate(".concat(l+i.customSVG.offsetX,", ").concat(d+i.customSVG.offsetY,")")}),y.node.innerHTML=i.customSVG.SVG,n.appendChild(y.node)}if(i.image.path){var b=i.image.width?i.image.width:20,w=i.image.height?i.image.height:20;h=this.annoCtx.addImage({x:l+i.image.offsetX-b/2,y:d+i.image.offsetY-w/2,width:b,height:w,path:i.image.path,appendTo:".apexcharts-point-annotations"})}i.mouseEnter&&h.node.addEventListener("mouseenter",i.mouseEnter.bind(this,i)),i.mouseLeave&&h.node.addEventListener("mouseleave",i.mouseLeave.bind(this,i)),i.click&&h.node.addEventListener("click",i.click.bind(this,i))}}},{key:"drawPointAnnotations",value:function(){var i=this,n=this.w,a=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return n.config.annotations.points.map(function(l,d){i.addPointAnnotation(l,a.node,d)}),a}}]),O}(),we={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Ee=function(){function O(){c(this,O),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return v(O,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[we],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(i){return new Date(i).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(i){return i}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(i){return i+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(i){return i.globals.seriesTotals.reduce(function(n,a){return n+a},0)/i.globals.series.length+"%"}}},barLabels:{enabled:!1,margin:5,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(i){return i},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(i){return i}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(i){return i}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(i){return i.globals.seriesTotals.reduce(function(n,a){return n+a},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(i){return i!==null?i:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(i){return i?i+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),O}(),Fe=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.graphics=new X(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new J(this),this.xAxisAnnotations=new me(this),this.yAxisAnnotations=new ce(this),this.pointsAnnotations=new Te(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return v(O,[{key:"drawAxesAnnotations",value:function(){var i=this.w;if(i.globals.axisCharts){for(var n=this.yAxisAnnotations.drawYAxisAnnotations(),a=this.xAxisAnnotations.drawXAxisAnnotations(),l=this.pointsAnnotations.drawPointAnnotations(),d=i.config.chart.animations.enabled,u=[n,a,l],h=[a.node,n.node,l.node],g=0;g<3;g++)i.globals.dom.elGraphical.add(u[g]),!d||i.globals.resized||i.globals.dataChanged||i.config.chart.type!=="scatter"&&i.config.chart.type!=="bubble"&&i.globals.dataPoints>1&&h[g].classList.add("apexcharts-element-hidden"),i.globals.delayedElements.push({el:h[g],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var i=this;this.w.config.annotations.images.map(function(n,a){i.addImage(n,a)})}},{key:"drawTextAnnos",value:function(){var i=this;this.w.config.annotations.texts.map(function(n,a){i.addText(n,a)})}},{key:"addXaxisAnnotation",value:function(i,n,a){this.xAxisAnnotations.addXaxisAnnotation(i,n,a)}},{key:"addYaxisAnnotation",value:function(i,n,a){this.yAxisAnnotations.addYaxisAnnotation(i,n,a)}},{key:"addPointAnnotation",value:function(i,n,a){this.pointsAnnotations.addPointAnnotation(i,n,a)}},{key:"addText",value:function(i,n){var a=i.x,l=i.y,d=i.text,u=i.textAnchor,h=i.foreColor,g=i.fontSize,x=i.fontFamily,y=i.fontWeight,b=i.cssClass,w=i.backgroundColor,S=i.borderWidth,j=i.strokeDashArray,E=i.borderRadius,T=i.borderColor,I=i.appendTo,F=I===void 0?".apexcharts-svg":I,m=i.paddingLeft,k=m===void 0?4:m,N=i.paddingRight,R=N===void 0?4:N,z=i.paddingBottom,$=z===void 0?2:z,Y=i.paddingTop,U=Y===void 0?2:Y,te=this.w,ne=this.graphics.drawText({x:a,y:l,text:d,textAnchor:u||"start",fontSize:g||"12px",fontWeight:y||"regular",fontFamily:x||te.config.chart.fontFamily,foreColor:h||te.config.chart.foreColor,cssClass:b}),ie=te.globals.dom.baseEl.querySelector(F);ie&&ie.appendChild(ne.node);var ge=ne.bbox();if(d){var be=this.graphics.drawRect(ge.x-k,ge.y-U,ge.width+k+R,ge.height+$+U,E,w||"transparent",1,S,T,j);ie.insertBefore(be.node,ne.node)}}},{key:"addImage",value:function(i,n){var a=this.w,l=i.path,d=i.x,u=d===void 0?0:d,h=i.y,g=h===void 0?0:h,x=i.width,y=x===void 0?20:x,b=i.height,w=b===void 0?20:b,S=i.appendTo,j=S===void 0?".apexcharts-svg":S,E=a.globals.dom.Paper.image(l);E.size(y,w).move(u,g);var T=a.globals.dom.baseEl.querySelector(j);return T&&T.appendChild(E.node),E}},{key:"addXaxisAnnotationExternal",value:function(i,n,a){return this.addAnnotationExternal({params:i,pushToMemory:n,context:a,type:"xaxis",contextMethod:a.addXaxisAnnotation}),a}},{key:"addYaxisAnnotationExternal",value:function(i,n,a){return this.addAnnotationExternal({params:i,pushToMemory:n,context:a,type:"yaxis",contextMethod:a.addYaxisAnnotation}),a}},{key:"addPointAnnotationExternal",value:function(i,n,a){return this.invertAxis===void 0&&(this.invertAxis=a.w.globals.isBarHorizontal),this.addAnnotationExternal({params:i,pushToMemory:n,context:a,type:"point",contextMethod:a.addPointAnnotation}),a}},{key:"addAnnotationExternal",value:function(i){var n=i.params,a=i.pushToMemory,l=i.context,d=i.type,u=i.contextMethod,h=l,g=h.w,x=g.globals.dom.baseEl.querySelector(".apexcharts-".concat(d,"-annotations")),y=x.childNodes.length+1,b=new Ee,w=Object.assign({},d==="xaxis"?b.xAxisAnnotation:d==="yaxis"?b.yAxisAnnotation:b.pointAnnotation),S=_.extend(w,n);switch(d){case"xaxis":this.addXaxisAnnotation(S,x,y);break;case"yaxis":this.addYaxisAnnotation(S,x,y);break;case"point":this.addPointAnnotation(S,x,y)}var j=g.globals.dom.baseEl.querySelector(".apexcharts-".concat(d,"-annotations .apexcharts-").concat(d,"-annotation-label[rel='").concat(y,"']")),E=this.helpers.addBackgroundToAnno(j,S);return E&&x.insertBefore(E.node,j),a&&g.globals.memory.methodsToExec.push({context:h,id:S.id?S.id:_.randomId(),method:u,label:"addAnnotation",params:n}),l}},{key:"clearAnnotations",value:function(i){var n=i.w,a=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");n.globals.memory.methodsToExec.map(function(l,d){l.label!=="addText"&&l.label!=="addAnnotation"||n.globals.memory.methodsToExec.splice(d,1)}),a=_.listToArray(a),Array.prototype.forEach.call(a,function(l){for(;l.firstChild;)l.removeChild(l.firstChild)})}},{key:"removeAnnotation",value:function(i,n){var a=i.w,l=a.globals.dom.baseEl.querySelectorAll(".".concat(n));l&&(a.globals.memory.methodsToExec.map(function(d,u){d.id===n&&a.globals.memory.methodsToExec.splice(u,1)}),Array.prototype.forEach.call(l,function(d){d.parentElement.removeChild(d)}))}}]),O}(),Re=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return v(O,[{key:"isValidDate",value:function(i){return typeof i!="number"&&!isNaN(this.parseDate(i))}},{key:"getTimeStamp",value:function(i){return Date.parse(i)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(i).toISOString().substr(0,25)).getTime():new Date(i).getTime():i}},{key:"getDate",value:function(i){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(i).toUTCString()):new Date(i)}},{key:"parseDate",value:function(i){var n=Date.parse(i);if(!isNaN(n))return this.getTimeStamp(i);var a=Date.parse(i.replace(/-/g,"/").replace(/[a-z]+/gi," "));return a=this.getTimeStamp(a)}},{key:"parseDateWithTimezone",value:function(i){return Date.parse(i.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(i,n){var a=this.w.globals.locale,l=this.w.config.xaxis.labels.datetimeUTC,d=["\0"].concat(D(a.months)),u=[""].concat(D(a.shortMonths)),h=[""].concat(D(a.days)),g=[""].concat(D(a.shortDays));function x($,Y){var U=$+"";for(Y=Y||2;U.length12?S-12:S===0?12:S;n=(n=(n=(n=n.replace(/(^|[^\\])HH+/g,"$1"+x(S))).replace(/(^|[^\\])H/g,"$1"+S)).replace(/(^|[^\\])hh+/g,"$1"+x(j))).replace(/(^|[^\\])h/g,"$1"+j);var E=l?i.getUTCMinutes():i.getMinutes();n=(n=n.replace(/(^|[^\\])mm+/g,"$1"+x(E))).replace(/(^|[^\\])m/g,"$1"+E);var T=l?i.getUTCSeconds():i.getSeconds();n=(n=n.replace(/(^|[^\\])ss+/g,"$1"+x(T))).replace(/(^|[^\\])s/g,"$1"+T);var I=l?i.getUTCMilliseconds():i.getMilliseconds();n=n.replace(/(^|[^\\])fff+/g,"$1"+x(I,3)),I=Math.round(I/10),n=n.replace(/(^|[^\\])ff/g,"$1"+x(I)),I=Math.round(I/10);var F=S<12?"AM":"PM";n=(n=(n=n.replace(/(^|[^\\])f/g,"$1"+I)).replace(/(^|[^\\])TT+/g,"$1"+F)).replace(/(^|[^\\])T/g,"$1"+F.charAt(0));var m=F.toLowerCase();n=(n=n.replace(/(^|[^\\])tt+/g,"$1"+m)).replace(/(^|[^\\])t/g,"$1"+m.charAt(0));var k=-i.getTimezoneOffset(),N=l||!k?"Z":k>0?"+":"-";if(!l){var R=(k=Math.abs(k))%60;N+=x(Math.floor(k/60))+":"+x(R)}n=n.replace(/(^|[^\\])K/g,"$1"+N);var z=(l?i.getUTCDay():i.getDay())+1;return n=(n=(n=(n=(n=n.replace(new RegExp(h[0],"g"),h[z])).replace(new RegExp(g[0],"g"),g[z])).replace(new RegExp(d[0],"g"),d[b])).replace(new RegExp(u[0],"g"),u[b])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(i,n,a){var l=this.w;l.config.xaxis.min!==void 0&&(i=l.config.xaxis.min),l.config.xaxis.max!==void 0&&(n=l.config.xaxis.max);var d=this.getDate(i),u=this.getDate(n),h=this.formatDate(d,"yyyy MM dd HH mm ss fff").split(" "),g=this.formatDate(u,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(h[6],10),maxMillisecond:parseInt(g[6],10),minSecond:parseInt(h[5],10),maxSecond:parseInt(g[5],10),minMinute:parseInt(h[4],10),maxMinute:parseInt(g[4],10),minHour:parseInt(h[3],10),maxHour:parseInt(g[3],10),minDate:parseInt(h[2],10),maxDate:parseInt(g[2],10),minMonth:parseInt(h[1],10)-1,maxMonth:parseInt(g[1],10)-1,minYear:parseInt(h[0],10),maxYear:parseInt(g[0],10)}}},{key:"isLeapYear",value:function(i){return i%4==0&&i%100!=0||i%400==0}},{key:"calculcateLastDaysOfMonth",value:function(i,n,a){return this.determineDaysOfMonths(i,n)-a}},{key:"determineDaysOfYear",value:function(i){var n=365;return this.isLeapYear(i)&&(n=366),n}},{key:"determineRemainingDaysOfYear",value:function(i,n,a){var l=this.daysCntOfYear[n]+a;return n>1&&this.isLeapYear()&&l++,l}},{key:"determineDaysOfMonths",value:function(i,n){var a=30;switch(i=_.monthMod(i),!0){case this.months30.indexOf(i)>-1:i===2&&(a=this.isLeapYear(n)?29:28);break;case this.months31.indexOf(i)>-1:default:a=31}return a}}]),O}(),qe=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.tooltipKeyFormat="dd MMM"}return v(O,[{key:"xLabelFormat",value:function(i,n,a,l){var d=this.w;if(d.config.xaxis.type==="datetime"&&d.config.xaxis.labels.formatter===void 0&&d.config.tooltip.x.formatter===void 0){var u=new Re(this.ctx);return u.formatDate(u.getDate(n),d.config.tooltip.x.format)}return i(n,a,l)}},{key:"defaultGeneralFormatter",value:function(i){return Array.isArray(i)?i.map(function(n){return n}):i}},{key:"defaultYFormatter",value:function(i,n,a){var l=this.w;return _.isNumber(i)&&(i=l.globals.yValueDecimal!==0?i.toFixed(n.decimalsInFloat!==void 0?n.decimalsInFloat:l.globals.yValueDecimal):l.globals.maxYArr[a]-l.globals.minYArr[a]<5?i.toFixed(1):i.toFixed(0)),i}},{key:"setLabelFormatters",value:function(){var i=this,n=this.w;return n.globals.xaxisTooltipFormatter=function(a){return i.defaultGeneralFormatter(a)},n.globals.ttKeyFormatter=function(a){return i.defaultGeneralFormatter(a)},n.globals.ttZFormatter=function(a){return a},n.globals.legendFormatter=function(a){return i.defaultGeneralFormatter(a)},n.config.xaxis.labels.formatter!==void 0?n.globals.xLabelFormatter=n.config.xaxis.labels.formatter:n.globals.xLabelFormatter=function(a){if(_.isNumber(a)){if(!n.config.xaxis.convertedCatToNumeric&&n.config.xaxis.type==="numeric"){if(_.isNumber(n.config.xaxis.decimalsInFloat))return a.toFixed(n.config.xaxis.decimalsInFloat);var l=n.globals.maxX-n.globals.minX;return l>0&&l<100?a.toFixed(1):a.toFixed(0)}return n.globals.isBarHorizontal&&n.globals.maxY-n.globals.minYArr<4?a.toFixed(1):a.toFixed(0)}return a},typeof n.config.tooltip.x.formatter=="function"?n.globals.ttKeyFormatter=n.config.tooltip.x.formatter:n.globals.ttKeyFormatter=n.globals.xLabelFormatter,typeof n.config.xaxis.tooltip.formatter=="function"&&(n.globals.xaxisTooltipFormatter=n.config.xaxis.tooltip.formatter),(Array.isArray(n.config.tooltip.y)||n.config.tooltip.y.formatter!==void 0)&&(n.globals.ttVal=n.config.tooltip.y),n.config.tooltip.z.formatter!==void 0&&(n.globals.ttZFormatter=n.config.tooltip.z.formatter),n.config.legend.formatter!==void 0&&(n.globals.legendFormatter=n.config.legend.formatter),n.config.yaxis.forEach(function(a,l){a.labels.formatter!==void 0?n.globals.yLabelFormatters[l]=a.labels.formatter:n.globals.yLabelFormatters[l]=function(d){return n.globals.xyCharts?Array.isArray(d)?d.map(function(u){return i.defaultYFormatter(u,a,l)}):i.defaultYFormatter(d,a,l):d}}),n.globals}},{key:"heatmapLabelFormatters",value:function(){var i=this.w;if(i.config.chart.type==="heatmap"){i.globals.yAxisScale[0].result=i.globals.seriesNames.slice();var n=i.globals.seriesNames.reduce(function(a,l){return a.length>l.length?a:l},0);i.globals.yAxisScale[0].niceMax=n,i.globals.yAxisScale[0].niceMin=n}}}]),O}(),it=function(O){var i,n=O.isTimeline,a=O.ctx,l=O.seriesIndex,d=O.dataPointIndex,u=O.y1,h=O.y2,g=O.w,x=g.globals.seriesRangeStart[l][d],y=g.globals.seriesRangeEnd[l][d],b=g.globals.labels[d],w=g.config.series[l].name?g.config.series[l].name:"",S=g.globals.ttKeyFormatter,j=g.config.tooltip.y.title.formatter,E={w:g,seriesIndex:l,dataPointIndex:d,start:x,end:y};typeof j=="function"&&(w=j(w,E)),(i=g.config.series[l].data[d])!==null&&i!==void 0&&i.x&&(b=g.config.series[l].data[d].x),n||g.config.xaxis.type==="datetime"&&(b=new qe(a).xLabelFormat(g.globals.ttKeyFormatter,b,b,{i:void 0,dateFormatter:new Re(a).formatDate,w:g})),typeof S=="function"&&(b=S(b,E)),Number.isFinite(u)&&Number.isFinite(h)&&(x=u,y=h);var T="",I="",F=g.globals.colors[l];if(g.config.tooltip.x.formatter===void 0)if(g.config.xaxis.type==="datetime"){var m=new Re(a);T=m.formatDate(m.getDate(x),g.config.tooltip.x.format),I=m.formatDate(m.getDate(y),g.config.tooltip.x.format)}else T=x,I=y;else T=g.config.tooltip.x.formatter(x),I=g.config.tooltip.x.formatter(y);return{start:x,end:y,startVal:T,endVal:I,ylabel:b,color:F,seriesName:w}},de=function(O){var i=O.color,n=O.seriesName,a=O.ylabel,l=O.start,d=O.end,u=O.seriesIndex,h=O.dataPointIndex,g=O.ctx.tooltip.tooltipLabels.getFormatters(u);l=g.yLbFormatter(l),d=g.yLbFormatter(d);var x=g.yLbFormatter(O.w.globals.series[u][h]),y=` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var d,u=!0,h=!1;return{s:function(){n=n.call(O)},n:function(){var g=n.next();return u=g.done,g},e:function(g){h=!0,d=g},f:function(){try{u||n.return==null||n.return()}finally{if(h)throw d}}}}var _=function(){function O(){c(this,O)}return v(O,[{key:"shadeRGBColor",value:function(i,n){var a=n.split(","),l=i<0?0:255,d=i<0?-1*i:i,u=parseInt(a[0].slice(4),10),h=parseInt(a[1],10),g=parseInt(a[2],10);return"rgb("+(Math.round((l-u)*d)+u)+","+(Math.round((l-h)*d)+h)+","+(Math.round((l-g)*d)+g)+")"}},{key:"shadeHexColor",value:function(i,n){var a=parseInt(n.slice(1),16),l=i<0?0:255,d=i<0?-1*i:i,u=a>>16,h=a>>8&255,g=255&a;return"#"+(16777216+65536*(Math.round((l-u)*d)+u)+256*(Math.round((l-h)*d)+h)+(Math.round((l-g)*d)+g)).toString(16).slice(1)}},{key:"shadeColor",value:function(i,n){return O.isColorHex(n)?this.shadeHexColor(i,n):this.shadeRGBColor(i,n)}}],[{key:"bind",value:function(i,n){return function(){return i.apply(n,arguments)}}},{key:"isObject",value:function(i){return i&&o(i)==="object"&&!Array.isArray(i)&&i!=null}},{key:"is",value:function(i,n){return Object.prototype.toString.call(n)==="[object "+i+"]"}},{key:"listToArray",value:function(i){var n,a=[];for(n=0;n1&&arguments[1]!==void 0?arguments[1]:2;return Number.isInteger(i)?i:parseFloat(i.toPrecision(n))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(i){var n=String(i).split(/[eE]/);if(n.length===1)return n[0];var a="",l=i<0?"-":"",d=n[0].replace(".",""),u=Number(n[1])+1;if(u<0){for(a=l+"0.";u++;)a+="0";return a+d.replace(/^-/,"")}for(u-=d.length;u--;)a+="0";return d+a}},{key:"getDimensions",value:function(i){var n=getComputedStyle(i,null),a=i.clientHeight,l=i.clientWidth;return a-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),[l-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),a]}},{key:"getBoundingClientRect",value:function(i){var n=i.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:i.clientWidth,height:i.clientHeight,x:n.left,y:n.top}}},{key:"getLargestStringFromArr",value:function(i){return i.reduce(function(n,a){return Array.isArray(a)&&(a=a.reduce(function(l,d){return l.length>d.length?l:d})),n.length>a.length?n:a},0)}},{key:"hexToRgba",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"#999999",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.6;i.substring(0,1)!=="#"&&(i="#999999");var a=i.replace("#","");a=a.match(new RegExp("(.{"+a.length/3+"})","g"));for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:"x",a=i.toString().slice();return a=a.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,n)}},{key:"negToZero",value:function(i){return i<0?0:i}},{key:"moveIndexInArray",value:function(i,n,a){if(a>=i.length)for(var l=a-i.length+1;l--;)i.push(void 0);return i.splice(a,0,i.splice(n,1)[0]),i}},{key:"extractNumber",value:function(i){return parseFloat(i.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(i,n){for(;(i=i.parentElement)&&!i.classList.contains(n););return i}},{key:"setELstyles",value:function(i,n){for(var a in n)n.hasOwnProperty(a)&&(i.style.key=n[a])}},{key:"isNumber",value:function(i){return!isNaN(i)&&parseFloat(Number(i))===i&&!isNaN(parseInt(i,10))}},{key:"isFloat",value:function(i){return Number(i)===i&&i%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(window.navigator.userAgent.indexOf("MSIE")!==-1||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var i=window.navigator.userAgent,n=i.indexOf("MSIE ");if(n>0)return parseInt(i.substring(n+5,i.indexOf(".",n)),10);if(i.indexOf("Trident/")>0){var a=i.indexOf("rv:");return parseInt(i.substring(a+3,i.indexOf(".",a)),10)}var l=i.indexOf("Edge/");return l>0&&parseInt(i.substring(l+5,i.indexOf(".",l)),10)}},{key:"getGCD",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,l=Math.pow(10,a-Math.floor(Math.log10(Math.max(i,n))));for(i=Math.round(Math.abs(i)*l),n=Math.round(Math.abs(n)*l);n;){var d=n;n=i%n,i=d}return i/l}},{key:"getPrimeFactors",value:function(i){for(var n=[],a=2;i>=2;)i%a==0?(n.push(a),i/=a):a++;return n}},{key:"mod",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,l=Math.pow(10,a-Math.floor(Math.log10(Math.max(i,n))));return(i=Math.round(Math.abs(i)*l))%(n=Math.round(Math.abs(n)*l))/l}}]),O}(),K=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.setEasingFunctions()}return v(O,[{key:"setEasingFunctions",value:function(){var i;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":i="-";break;case"easein":i="<";break;case"easeout":i=">";break;case"easeinout":default:i="<>";break;case"swing":i=function(n){var a=1.70158;return(n-=1)*n*((a+1)*n+a)+1};break;case"bounce":i=function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375};break;case"elastic":i=function(n){return n===!!n?n:Math.pow(2,-10*n)*Math.sin((n-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=i}}},{key:"animateLine",value:function(i,n,a,l){i.attr(n).animate(l).attr(a)}},{key:"animateMarker",value:function(i,n,a,l,d,u){n||(n=0),i.attr({r:n,width:n,height:n}).animate(l,d).attr({r:a,width:a.width,height:a.height}).afterAll(function(){u()})}},{key:"animateCircle",value:function(i,n,a,l,d){i.attr({r:n.r,cx:n.cx,cy:n.cy}).animate(l,d).attr({r:a.r,cx:a.cx,cy:a.cy})}},{key:"animateRect",value:function(i,n,a,l,d){i.attr(n).animate(l).attr(a).afterAll(function(){return d()})}},{key:"animatePathsGradually",value:function(i){var n=i.el,a=i.realIndex,l=i.j,d=i.fill,u=i.pathFrom,h=i.pathTo,g=i.speed,x=i.delay,y=this.w,b=0;y.config.chart.animations.animateGradually.enabled&&(b=y.config.chart.animations.animateGradually.delay),y.config.chart.animations.dynamicAnimation.enabled&&y.globals.dataChanged&&y.config.chart.type!=="bar"&&(b=0),this.morphSVG(n,a,l,y.config.chart.type!=="line"||y.globals.comboCharts?d:"stroke",u,h,g,x*b)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(i){var n=i.el;n.classList.remove("apexcharts-element-hidden"),n.classList.add("apexcharts-hidden-element-shown")})}},{key:"animationCompleted",value:function(i){var n=this.w;n.globals.animationEnded||(n.globals.animationEnded=!0,this.showDelayedElements(),typeof n.config.chart.events.animationEnd=="function"&&n.config.chart.events.animationEnd(this.ctx,{el:i,w:n}))}},{key:"morphSVG",value:function(i,n,a,l,d,u,h,g){var x=this,y=this.w;d||(d=i.attr("pathFrom")),u||(u=i.attr("pathTo"));var b=function(w){return y.config.chart.type==="radar"&&(h=1),"M 0 ".concat(y.globals.gridHeight)};(!d||d.indexOf("undefined")>-1||d.indexOf("NaN")>-1)&&(d=b()),(!u||u.indexOf("undefined")>-1||u.indexOf("NaN")>-1)&&(u=b()),y.globals.shouldAnimate||(h=1),i.plot(d).animate(1,y.globals.easing,g).plot(d).animate(h,y.globals.easing,g).plot(u).afterAll(function(){_.isNumber(a)?a===y.globals.series[y.globals.maxValsInArrayIndex].length-2&&y.globals.shouldAnimate&&x.animationCompleted(i):l!=="none"&&y.globals.shouldAnimate&&(!y.globals.comboCharts&&n===y.globals.series.length-1||y.globals.comboCharts)&&x.animationCompleted(i),x.showDelayedElements()})}}]),O}(),ee=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"getDefaultFilter",value:function(i,n){var a=this.w;i.unfilter(!0),new window.SVG.Filter().size("120%","180%","-5%","-40%"),a.config.states.normal.filter!=="none"?this.applyFilter(i,n,a.config.states.normal.filter.type,a.config.states.normal.filter.value):a.config.chart.dropShadow.enabled&&this.dropShadow(i,a.config.chart.dropShadow,n)}},{key:"addNormalFilter",value:function(i,n){var a=this.w;a.config.chart.dropShadow.enabled&&!i.node.classList.contains("apexcharts-marker")&&this.dropShadow(i,a.config.chart.dropShadow,n)}},{key:"addLightenFilter",value:function(i,n,a){var l=this,d=this.w,u=a.intensity;i.unfilter(!0),new window.SVG.Filter,i.filter(function(h){var g=d.config.chart.dropShadow;(g.enabled?l.addShadow(h,n,g):h).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:u}})}),i.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(i.filterer.node)}},{key:"addDarkenFilter",value:function(i,n,a){var l=this,d=this.w,u=a.intensity;i.unfilter(!0),new window.SVG.Filter,i.filter(function(h){var g=d.config.chart.dropShadow;(g.enabled?l.addShadow(h,n,g):h).componentTransfer({rgb:{type:"linear",slope:u}})}),i.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(i.filterer.node)}},{key:"applyFilter",value:function(i,n,a){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.5;switch(a){case"none":this.addNormalFilter(i,n);break;case"lighten":this.addLightenFilter(i,n,{intensity:l});break;case"darken":this.addDarkenFilter(i,n,{intensity:l})}}},{key:"addShadow",value:function(i,n,a){var l,d=this.w,u=a.blur,h=a.top,g=a.left,x=a.color,y=a.opacity;if(((l=d.config.chart.dropShadow.enabledOnSeries)===null||l===void 0?void 0:l.length)>0&&d.config.chart.dropShadow.enabledOnSeries.indexOf(n)===-1)return i;var b=i.flood(Array.isArray(x)?x[n]:x,y).composite(i.sourceAlpha,"in").offset(g,h).gaussianBlur(u).merge(i.source);return i.blend(i.source,b)}},{key:"dropShadow",value:function(i,n){var a,l,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,u=n.top,h=n.left,g=n.blur,x=n.color,y=n.opacity,b=n.noUserSpaceOnUse,w=this.w;return i.unfilter(!0),_.isIE()&&w.config.chart.type==="radialBar"||((a=w.config.chart.dropShadow.enabledOnSeries)===null||a===void 0?void 0:a.length)>0&&((l=w.config.chart.dropShadow.enabledOnSeries)===null||l===void 0?void 0:l.indexOf(d))===-1||(x=Array.isArray(x)?x[d]:x,i.filter(function(S){var j=null;j=_.isSafari()||_.isFirefox()||_.isIE()?S.flood(x,y).composite(S.sourceAlpha,"in").offset(h,u).gaussianBlur(g):S.flood(x,y).composite(S.sourceAlpha,"in").offset(h,u).gaussianBlur(g).merge(S.source),S.blend(S.source,j)}),b||i.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(i.filterer.node)),i}},{key:"setSelectionFilter",value:function(i,n,a){var l=this.w;if(l.globals.selectedDataPoints[n]!==void 0&&l.globals.selectedDataPoints[n].indexOf(a)>-1){i.node.setAttribute("selected",!0);var d=l.config.states.active.filter;d!=="none"&&this.applyFilter(i,n,d.type,d.value)}}},{key:"_scaleFilterSize",value:function(i){(function(n){for(var a in n)n.hasOwnProperty(a)&&i.setAttribute(a,n[a])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),O}(),X=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"roundPathCorners",value:function(i,n){function a($,Y,U){var te=Y.x-$.x,ne=Y.y-$.y,ie=Math.sqrt(te*te+ne*ne);return l($,Y,Math.min(1,U/ie))}function l($,Y,U){return{x:$.x+(Y.x-$.x)*U,y:$.y+(Y.y-$.y)*U}}function d($,Y){$.length>2&&($[$.length-2]=Y.x,$[$.length-1]=Y.y)}function u($){return{x:parseFloat($[$.length-2]),y:parseFloat($[$.length-1])}}i.indexOf("NaN")>-1&&(i="");var h=i.split(/[,\s]/).reduce(function($,Y){var U=Y.match("([a-zA-Z])(.+)");return U?($.push(U[1]),$.push(U[2])):$.push(Y),$},[]).reduce(function($,Y){return parseFloat(Y)==Y&&$.length?$[$.length-1].push(Y):$.push([Y]),$},[]),g=[];if(h.length>1){var x=u(h[0]),y=null;h[h.length-1][0]=="Z"&&h[0].length>2&&(y=["L",x.x,x.y],h[h.length-1]=y),g.push(h[0]);for(var b=1;b2&&S[0]=="L"&&j.length>2&&j[0]=="L"){var L,T,I=u(w),F=u(S),m=u(j);L=a(F,I,n),T=a(F,m,n),d(S,L),S.origPoint=F,g.push(S);var k=l(L,F,.5),N=l(F,T,.5),R=["C",k.x,k.y,N.x,N.y,T.x,T.y];R.origPoint=F,g.push(R)}else g.push(S)}if(y){var z=u(g[g.length-1]);g.push(["Z"]),d(g[0],z)}}else g=h;return g.reduce(function($,Y){return $+Y.join(" ")+" "},"")}},{key:"drawLine",value:function(i,n,a,l){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"#a8a8a8",u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,g=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:i,y1:n,x2:a,y2:l,stroke:d,"stroke-dasharray":u,"stroke-width":h,"stroke-linecap":g})}},{key:"drawRect",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"#fefefe",h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,g=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,x=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null,y=arguments.length>9&&arguments[9]!==void 0?arguments[9]:0,b=this.w.globals.dom.Paper.rect();return b.attr({x:i,y:n,width:a>0?a:0,height:l>0?l:0,rx:d,ry:d,opacity:h,"stroke-width":g!==null?g:0,stroke:x!==null?x:"none","stroke-dasharray":y}),b.node.setAttribute("fill",u),b}},{key:"drawPolygon",value:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#e1e1e1",a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(i).attr({fill:l,stroke:n,"stroke-width":a})}},{key:"drawCircle",value:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;i<0&&(i=0);var a=this.w.globals.dom.Paper.circle(2*i);return n!==null&&a.attr(n),a}},{key:"drawPath",value:function(i){var n=i.d,a=n===void 0?"":n,l=i.stroke,d=l===void 0?"#a8a8a8":l,u=i.strokeWidth,h=u===void 0?1:u,g=i.fill,x=i.fillOpacity,y=x===void 0?1:x,b=i.strokeOpacity,w=b===void 0?1:b,S=i.classes,j=i.strokeLinecap,L=j===void 0?null:j,T=i.strokeDashArray,I=T===void 0?0:T,F=this.w;return L===null&&(L=F.config.stroke.lineCap),(a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a="M 0 ".concat(F.globals.gridHeight)),F.globals.dom.Paper.path(a).attr({fill:g,"fill-opacity":y,stroke:d,"stroke-opacity":w,"stroke-linecap":L,"stroke-width":h,"stroke-dasharray":I,class:S})}},{key:"group",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w.globals.dom.Paper.group();return i!==null&&n.attr(i),n}},{key:"move",value:function(i,n){var a=["M",i,n].join(" ");return a}},{key:"line",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,l=null;return a===null?l=[" L",i,n].join(" "):a==="H"?l=[" H",i].join(" "):a==="V"&&(l=[" V",n].join(" ")),l}},{key:"curve",value:function(i,n,a,l,d,u){var h=["C",i,n,a,l,d,u].join(" ");return h}},{key:"quadraticCurve",value:function(i,n,a,l){return["Q",i,n,a,l].join(" ")}},{key:"arc",value:function(i,n,a,l,d,u,h){var g="A";arguments.length>7&&arguments[7]!==void 0&&arguments[7]&&(g="a");var x=[g,i,n,a,l,d,u,h].join(" ");return x}},{key:"renderPaths",value:function(i){var n,a=i.j,l=i.realIndex,d=i.pathFrom,u=i.pathTo,h=i.stroke,g=i.strokeWidth,x=i.strokeLinecap,y=i.fill,b=i.animationDelay,w=i.initialSpeed,S=i.dataChangeSpeed,j=i.className,L=i.shouldClipToGrid,T=L===void 0||L,I=i.bindEventsOnPaths,F=I===void 0||I,m=i.drawShadow,k=m===void 0||m,N=this.w,R=new ee(this.ctx),z=new K(this.ctx),$=this.w.config.chart.animations.enabled,Y=$&&this.w.config.chart.animations.dynamicAnimation.enabled,U=!!($&&!N.globals.resized||Y&&N.globals.dataChanged&&N.globals.shouldAnimate);U?n=d:(n=u,N.globals.animationEnded=!0);var te=N.config.stroke.dashArray,ne=0;ne=Array.isArray(te)?te[l]:N.config.stroke.dashArray;var ie=this.drawPath({d:n,stroke:h,strokeWidth:g,fill:y,fillOpacity:1,classes:j,strokeLinecap:x,strokeDashArray:ne});if(ie.attr("index",l),T&&ie.attr({"clip-path":"url(#gridRectMask".concat(N.globals.cuid,")")}),N.config.states.normal.filter.type!=="none")R.getDefaultFilter(ie,l);else if(N.config.chart.dropShadow.enabled&&k){var me=N.config.chart.dropShadow;R.dropShadow(ie,me,l)}F&&(ie.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,ie)),ie.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,ie)),ie.node.addEventListener("mousedown",this.pathMouseDown.bind(this,ie))),ie.attr({pathTo:u,pathFrom:d});var be={el:ie,j:a,realIndex:l,pathFrom:d,pathTo:u,fill:y,strokeWidth:g,delay:b};return!$||N.globals.resized||N.globals.dataChanged?!N.globals.resized&&N.globals.dataChanged||z.showDelayedElements():z.animatePathsGradually(s(s({},be),{},{speed:w})),N.globals.dataChanged&&Y&&U&&z.animatePathsGradually(s(s({},be),{},{speed:S})),ie}},{key:"drawPattern",value:function(i,n,a){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"#a8a8a8",d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;return this.w.globals.dom.Paper.pattern(n,a,function(u){i==="horizontalLines"?u.line(0,0,a,0).stroke({color:l,width:d+1}):i==="verticalLines"?u.line(0,0,0,n).stroke({color:l,width:d+1}):i==="slantedLines"?u.line(0,0,n,a).stroke({color:l,width:d}):i==="squares"?u.rect(n,a).fill("none").stroke({color:l,width:d}):i==="circles"&&u.circle(n).fill("none").stroke({color:l,width:d})})}},{key:"drawGradient",value:function(i,n,a,l,d){var u,h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,g=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,x=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,y=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0,b=this.w;n.length<9&&n.indexOf("#")===0&&(n=_.hexToRgba(n,l)),a.length<9&&a.indexOf("#")===0&&(a=_.hexToRgba(a,d));var w=0,S=1,j=1,L=null;g!==null&&(w=g[0]!==void 0?g[0]/100:0,S=g[1]!==void 0?g[1]/100:1,j=g[2]!==void 0?g[2]/100:1,L=g[3]!==void 0?g[3]/100:null);var T=!(b.config.chart.type!=="donut"&&b.config.chart.type!=="pie"&&b.config.chart.type!=="polarArea"&&b.config.chart.type!=="bubble");if(u=x===null||x.length===0?b.globals.dom.Paper.gradient(T?"radial":"linear",function(m){m.at(w,n,l),m.at(S,a,d),m.at(j,a,d),L!==null&&m.at(L,n,l)}):b.globals.dom.Paper.gradient(T?"radial":"linear",function(m){(Array.isArray(x[y])?x[y]:x).forEach(function(k){m.at(k.offset/100,k.color,k.opacity)})}),T){var I=b.globals.gridWidth/2,F=b.globals.gridHeight/2;b.config.chart.type!=="bubble"?u.attr({gradientUnits:"userSpaceOnUse",cx:I,cy:F,r:h}):u.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else i==="vertical"?u.from(0,0).to(0,1):i==="diagonal"?u.from(0,0).to(1,1):i==="horizontal"?u.from(0,1).to(1,1):i==="diagonal2"&&u.from(1,0).to(0,1);return u}},{key:"getTextBasedOnMaxWidth",value:function(i){var n=i.text,a=i.maxWidth,l=i.fontSize,d=i.fontFamily,u=this.getTextRects(n,l,d),h=u.width/n.length,g=Math.floor(a/h);return a-1){var g=a.globals.selectedDataPoints[d].indexOf(u);a.globals.selectedDataPoints[d].splice(g,1)}}else{if(!a.config.states.active.allowMultipleDataPointsSelection&&a.globals.selectedDataPoints.length>0){a.globals.selectedDataPoints=[];var x=a.globals.dom.Paper.select(".apexcharts-series path").members,y=a.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,b=function(j){Array.prototype.forEach.call(j,function(L){L.node.setAttribute("selected","false"),l.getDefaultFilter(L,d)})};b(x),b(y)}i.node.setAttribute("selected","true"),h="true",a.globals.selectedDataPoints[d]===void 0&&(a.globals.selectedDataPoints[d]=[]),a.globals.selectedDataPoints[d].push(u)}if(h==="true"){var w=a.config.states.active.filter;if(w!=="none")l.applyFilter(i,d,w.type,w.value);else if(a.config.states.hover.filter!=="none"&&!a.globals.isTouchDevice){var S=a.config.states.hover.filter;l.applyFilter(i,d,S.type,S.value)}}else a.config.states.active.filter.type!=="none"&&(a.config.states.hover.filter.type==="none"||a.globals.isTouchDevice?l.getDefaultFilter(i,d):(S=a.config.states.hover.filter,l.applyFilter(i,d,S.type,S.value)));typeof a.config.chart.events.dataPointSelection=="function"&&a.config.chart.events.dataPointSelection(n,this.ctx,{selectedDataPoints:a.globals.selectedDataPoints,seriesIndex:d,dataPointIndex:u,w:a}),n&&this.ctx.events.fireEvent("dataPointSelection",[n,this.ctx,{selectedDataPoints:a.globals.selectedDataPoints,seriesIndex:d,dataPointIndex:u,w:a}])}},{key:"rotateAroundCenter",value:function(i){var n={};return i&&typeof i.getBBox=="function"&&(n=i.getBBox()),{x:n.x+n.width/2,y:n.y+n.height/2}}},{key:"getTextRects",value:function(i,n,a,l){var d=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],u=this.w,h=this.drawText({x:-200,y:-200,text:i,textAnchor:"start",fontSize:n,fontFamily:a,foreColor:"#fff",opacity:0});l&&h.attr("transform",l),u.globals.dom.Paper.add(h);var g=h.bbox();return d||(g=h.node.getBoundingClientRect()),h.remove(),{width:g.width,height:g.height}}},{key:"placeTextWithEllipsis",value:function(i,n,a){if(typeof i.getComputedTextLength=="function"&&(i.textContent=n,n.length>0&&i.getComputedTextLength()>=a/1.1)){for(var l=n.length-3;l>0;l-=3)if(i.getSubStringLength(0,l)<=a/1.1)return void(i.textContent=n.substring(0,l)+"...");i.textContent="."}}}],[{key:"setAttrs",value:function(i,n){for(var a in n)n.hasOwnProperty(a)&&i.setAttribute(a,n[a])}}]),O}(),Q=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"getStackedSeriesTotals",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=this.w,a=[];if(n.globals.series.length===0)return a;for(var l=0;l0&&arguments[0]!==void 0?arguments[0]:null;return i===null?this.w.config.series.reduce(function(n,a){return n+a},0):this.w.globals.series[i].reduce(function(n,a){return n+a},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var i=this,n=this.w,a=[];return n.globals.seriesGroups.forEach(function(l){var d=[];n.config.series.forEach(function(h,g){l.indexOf(h.name)>-1&&d.push(g)});var u=n.globals.series.map(function(h,g){return d.indexOf(g)===-1?g:-1}).filter(function(h){return h!==-1});a.push(i.getStackedSeriesTotals(u))}),a}},{key:"isSeriesNull",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return(i===null?this.w.config.series.filter(function(n){return n!==null}):this.w.config.series[i].data.filter(function(n){return n!==null})).length===0}},{key:"seriesHaveSameValues",value:function(i){return this.w.globals.series[i].every(function(n,a,l){return n===l[0]})}},{key:"getCategoryLabels",value:function(i){var n=this.w,a=i.slice();return n.config.xaxis.convertedCatToNumeric&&(a=i.map(function(l,d){return n.config.xaxis.labels.formatter(l-n.globals.minX+1)})),a}},{key:"getLargestSeries",value:function(){var i=this.w;i.globals.maxValsInArrayIndex=i.globals.series.map(function(n){return n.length}).indexOf(Math.max.apply(Math,i.globals.series.map(function(n){return n.length})))}},{key:"getLargestMarkerSize",value:function(){var i=this.w,n=0;return i.globals.markers.size.forEach(function(a){n=Math.max(n,a)}),i.config.markers.discrete&&i.config.markers.discrete.length&&i.config.markers.discrete.forEach(function(a){n=Math.max(n,a.size)}),n>0&&(n+=i.config.markers.hover.sizeOffset+1),i.globals.markers.largestSize=n,n}},{key:"getSeriesTotals",value:function(){var i=this.w;i.globals.seriesTotals=i.globals.series.map(function(n,a){var l=0;if(Array.isArray(n))for(var d=0;di&&a.globals.seriesX[d][h]0&&(n=!0),{comboBarCount:a,comboCharts:n}}},{key:"extendArrayProps",value:function(i,n,a){var l,d,u,h,g,x;return(l=n)!==null&&l!==void 0&&l.yaxis&&(n=i.extendYAxis(n,a)),(d=n)!==null&&d!==void 0&&d.annotations&&(n.annotations.yaxis&&(n=i.extendYAxisAnnotations(n)),(u=n)!==null&&u!==void 0&&(h=u.annotations)!==null&&h!==void 0&&h.xaxis&&(n=i.extendXAxisAnnotations(n)),(g=n)!==null&&g!==void 0&&(x=g.annotations)!==null&&x!==void 0&&x.points&&(n=i.extendPointAnnotations(n))),n}}]),O}(),J=function(){function O(i){c(this,O),this.w=i.w,this.annoCtx=i}return v(O,[{key:"setOrientations",value:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=this.w;if(i.label.orientation==="vertical"){var l=n!==null?n:0,d=a.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(l,"']"));if(d!==null){var u=d.getBoundingClientRect();d.setAttribute("x",parseFloat(d.getAttribute("x"))-u.height+4),i.label.position==="top"?d.setAttribute("y",parseFloat(d.getAttribute("y"))+u.width):d.setAttribute("y",parseFloat(d.getAttribute("y"))-u.width);var h=this.annoCtx.graphics.rotateAroundCenter(d),g=h.x,x=h.y;d.setAttribute("transform","rotate(-90 ".concat(g," ").concat(x,")"))}}}},{key:"addBackgroundToAnno",value:function(i,n){var a=this.w;if(!i||n.label.text===void 0||n.label.text!==void 0&&!String(n.label.text).trim())return null;var l=a.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),d=i.getBoundingClientRect(),u=n.label.style.padding.left,h=n.label.style.padding.right,g=n.label.style.padding.top,x=n.label.style.padding.bottom;n.label.orientation==="vertical"&&(g=n.label.style.padding.left,x=n.label.style.padding.right,u=n.label.style.padding.top,h=n.label.style.padding.bottom);var y=d.left-l.left-u,b=d.top-l.top-g,w=this.annoCtx.graphics.drawRect(y-a.globals.barPadForNumericAxis,b,d.width+u+h,d.height+g+x,n.label.borderRadius,n.label.style.background,1,n.label.borderWidth,n.label.borderColor,0);return n.id&&w.node.classList.add(n.id),w}},{key:"annotationsBackground",value:function(){var i=this,n=this.w,a=function(l,d,u){var h=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(u,"-annotations .apexcharts-").concat(u,"-annotation-label[rel='").concat(d,"']"));if(h){var g=h.parentNode,x=i.addBackgroundToAnno(h,l);x&&(g.insertBefore(x.node,h),l.label.mouseEnter&&x.node.addEventListener("mouseenter",l.label.mouseEnter.bind(i,l)),l.label.mouseLeave&&x.node.addEventListener("mouseleave",l.label.mouseLeave.bind(i,l)),l.label.click&&x.node.addEventListener("click",l.label.click.bind(i,l)))}};n.config.annotations.xaxis.map(function(l,d){a(l,d,"xaxis")}),n.config.annotations.yaxis.map(function(l,d){a(l,d,"yaxis")}),n.config.annotations.points.map(function(l,d){a(l,d,"point")})}},{key:"getY1Y2",value:function(i,n){var a,l=i==="y1"?n.y:n.y2,d=this.w;if(this.annoCtx.invertAxis){var u=d.globals.labels;d.config.xaxis.convertedCatToNumeric&&(u=d.globals.categoryLabels);var h=u.indexOf(l),g=d.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(h+1)+")");a=g?parseFloat(g.getAttribute("y")):(d.globals.gridHeight/u.length-1)*(h+1)-d.globals.barHeight,n.seriesIndex!==void 0&&d.globals.barHeight&&(a=a-d.globals.barHeight/2*(d.globals.series.length-1)+d.globals.barHeight*n.seriesIndex)}else{var x;d.config.yaxis[n.yAxisIndex].logarithmic?x=(l=new Q(this.annoCtx.ctx).getLogVal(l,n.yAxisIndex))/d.globals.yLogRatio[n.yAxisIndex]:x=(l-d.globals.minYArr[n.yAxisIndex])/(d.globals.yRange[n.yAxisIndex]/d.globals.gridHeight),a=d.globals.gridHeight-x,!n.marker||n.y!==void 0&&n.y!==null||(a=0),d.config.yaxis[n.yAxisIndex]&&d.config.yaxis[n.yAxisIndex].reversed&&(a=x)}return typeof l=="string"&&l.indexOf("px")>-1&&(a=parseFloat(l)),a}},{key:"getX1X2",value:function(i,n){var a=this.w,l=this.annoCtx.invertAxis?a.globals.minY:a.globals.minX,d=this.annoCtx.invertAxis?a.globals.maxY:a.globals.maxX,u=this.annoCtx.invertAxis?a.globals.yRange[0]:a.globals.xRange,h=(n.x-l)/(u/a.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(h=(d-n.x)/(u/a.globals.gridWidth)),a.config.xaxis.type!=="category"&&!a.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||a.globals.dataFormatXNumeric||(h=this.getStringX(n.x));var g=(n.x2-l)/(u/a.globals.gridWidth);return this.annoCtx.inversedReversedAxis&&(g=(d-n.x2)/(u/a.globals.gridWidth)),a.config.xaxis.type!=="category"&&!a.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||a.globals.dataFormatXNumeric||(g=this.getStringX(n.x2)),n.x!==void 0&&n.x!==null||!n.marker||(h=a.globals.gridWidth),i==="x1"&&typeof n.x=="string"&&n.x.indexOf("px")>-1&&(h=parseFloat(n.x)),i==="x2"&&typeof n.x2=="string"&&n.x2.indexOf("px")>-1&&(g=parseFloat(n.x2)),n.seriesIndex!==void 0&&a.globals.barWidth&&!this.annoCtx.invertAxis&&(h=h-a.globals.barWidth/2*(a.globals.series.length-1)+a.globals.barWidth*n.seriesIndex),i==="x1"?h:g}},{key:"getStringX",value:function(i){var n=this.w,a=i;n.config.xaxis.convertedCatToNumeric&&n.globals.categoryLabels.length&&(i=n.globals.categoryLabels.indexOf(i)+1);var l=n.globals.labels.indexOf(i),d=n.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(l+1)+")");return d&&(a=parseFloat(d.getAttribute("x"))),a}}]),O}(),he=function(){function O(i){c(this,O),this.w=i.w,this.annoCtx=i,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new J(this.annoCtx)}return v(O,[{key:"addXaxisAnnotation",value:function(i,n,a){var l,d=this.w,u=this.helpers.getX1X2("x1",i),h=i.label.text,g=i.strokeDashArray;if(_.isNumber(u)){if(i.x2===null||i.x2===void 0){var x=this.annoCtx.graphics.drawLine(u+i.offsetX,0+i.offsetY,u+i.offsetX,d.globals.gridHeight+i.offsetY,i.borderColor,g,i.borderWidth);n.appendChild(x.node),i.id&&x.node.classList.add(i.id)}else{if((l=this.helpers.getX1X2("x2",i))h){var y=h;h=l,l=y}var b=this.annoCtx.graphics.drawRect(0+i.offsetX,l+i.offsetY,this._getYAxisAnnotationWidth(i),h-l,0,i.fillColor,i.opacity,1,i.borderColor,u);b.node.classList.add("apexcharts-annotation-rect"),b.attr("clip-path","url(#gridRectMask".concat(d.globals.cuid,")")),n.appendChild(b.node),i.id&&b.node.classList.add(i.id)}var w=i.label.position==="right"?d.globals.gridWidth:i.label.position==="center"?d.globals.gridWidth/2:0,S=this.annoCtx.graphics.drawText({x:w+i.label.offsetX,y:(l??h)+i.label.offsetY-3,text:g,textAnchor:i.label.textAnchor,fontSize:i.label.style.fontSize,fontFamily:i.label.style.fontFamily,fontWeight:i.label.style.fontWeight,foreColor:i.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(i.label.style.cssClass," ").concat(i.id?i.id:"")});S.attr({rel:a}),n.appendChild(S.node)}},{key:"_getYAxisAnnotationWidth",value:function(i){var n=this.w;return n.globals.gridWidth,(i.width.indexOf("%")>-1?n.globals.gridWidth*parseInt(i.width,10)/100:parseInt(i.width,10))+i.offsetX}},{key:"drawYAxisAnnotations",value:function(){var i=this,n=this.w,a=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return n.config.annotations.yaxis.map(function(l,d){i.addYaxisAnnotation(l,a.node,d)}),a}}]),O}(),Te=function(){function O(i){c(this,O),this.w=i.w,this.annoCtx=i,this.helpers=new J(this.annoCtx)}return v(O,[{key:"addPointAnnotation",value:function(i,n,a){this.w;var l=this.helpers.getX1X2("x1",i),d=this.helpers.getY1Y2("y1",i);if(_.isNumber(l)){var u={pSize:i.marker.size,pointStrokeWidth:i.marker.strokeWidth,pointFillColor:i.marker.fillColor,pointStrokeColor:i.marker.strokeColor,shape:i.marker.shape,pRadius:i.marker.radius,class:"apexcharts-point-annotation-marker ".concat(i.marker.cssClass," ").concat(i.id?i.id:"")},h=this.annoCtx.graphics.drawMarker(l+i.marker.offsetX,d+i.marker.offsetY,u);n.appendChild(h.node);var g=i.label.text?i.label.text:"",x=this.annoCtx.graphics.drawText({x:l+i.label.offsetX,y:d+i.label.offsetY-i.marker.size-parseFloat(i.label.style.fontSize)/1.6,text:g,textAnchor:i.label.textAnchor,fontSize:i.label.style.fontSize,fontFamily:i.label.style.fontFamily,fontWeight:i.label.style.fontWeight,foreColor:i.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(i.label.style.cssClass," ").concat(i.id?i.id:"")});if(x.attr({rel:a}),n.appendChild(x.node),i.customSVG.SVG){var y=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+i.customSVG.cssClass});y.attr({transform:"translate(".concat(l+i.customSVG.offsetX,", ").concat(d+i.customSVG.offsetY,")")}),y.node.innerHTML=i.customSVG.SVG,n.appendChild(y.node)}if(i.image.path){var b=i.image.width?i.image.width:20,w=i.image.height?i.image.height:20;h=this.annoCtx.addImage({x:l+i.image.offsetX-b/2,y:d+i.image.offsetY-w/2,width:b,height:w,path:i.image.path,appendTo:".apexcharts-point-annotations"})}i.mouseEnter&&h.node.addEventListener("mouseenter",i.mouseEnter.bind(this,i)),i.mouseLeave&&h.node.addEventListener("mouseleave",i.mouseLeave.bind(this,i)),i.click&&h.node.addEventListener("click",i.click.bind(this,i))}}},{key:"drawPointAnnotations",value:function(){var i=this,n=this.w,a=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return n.config.annotations.points.map(function(l,d){i.addPointAnnotation(l,a.node,d)}),a}}]),O}(),we={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Ee=function(){function O(){c(this,O),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return v(O,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[we],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(i){return new Date(i).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(i){return i}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(i){return i+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(i){return i.globals.seriesTotals.reduce(function(n,a){return n+a},0)/i.globals.series.length+"%"}}},barLabels:{enabled:!1,margin:5,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(i){return i},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(i){return i}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(i){return i}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(i){return i.globals.seriesTotals.reduce(function(n,a){return n+a},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(i){return i!==null?i:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(i){return i?i+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),O}(),Fe=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.graphics=new X(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new J(this),this.xAxisAnnotations=new he(this),this.yAxisAnnotations=new oe(this),this.pointsAnnotations=new Te(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return v(O,[{key:"drawAxesAnnotations",value:function(){var i=this.w;if(i.globals.axisCharts){for(var n=this.yAxisAnnotations.drawYAxisAnnotations(),a=this.xAxisAnnotations.drawXAxisAnnotations(),l=this.pointsAnnotations.drawPointAnnotations(),d=i.config.chart.animations.enabled,u=[n,a,l],h=[a.node,n.node,l.node],g=0;g<3;g++)i.globals.dom.elGraphical.add(u[g]),!d||i.globals.resized||i.globals.dataChanged||i.config.chart.type!=="scatter"&&i.config.chart.type!=="bubble"&&i.globals.dataPoints>1&&h[g].classList.add("apexcharts-element-hidden"),i.globals.delayedElements.push({el:h[g],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var i=this;this.w.config.annotations.images.map(function(n,a){i.addImage(n,a)})}},{key:"drawTextAnnos",value:function(){var i=this;this.w.config.annotations.texts.map(function(n,a){i.addText(n,a)})}},{key:"addXaxisAnnotation",value:function(i,n,a){this.xAxisAnnotations.addXaxisAnnotation(i,n,a)}},{key:"addYaxisAnnotation",value:function(i,n,a){this.yAxisAnnotations.addYaxisAnnotation(i,n,a)}},{key:"addPointAnnotation",value:function(i,n,a){this.pointsAnnotations.addPointAnnotation(i,n,a)}},{key:"addText",value:function(i,n){var a=i.x,l=i.y,d=i.text,u=i.textAnchor,h=i.foreColor,g=i.fontSize,x=i.fontFamily,y=i.fontWeight,b=i.cssClass,w=i.backgroundColor,S=i.borderWidth,j=i.strokeDashArray,L=i.borderRadius,T=i.borderColor,I=i.appendTo,F=I===void 0?".apexcharts-svg":I,m=i.paddingLeft,k=m===void 0?4:m,N=i.paddingRight,R=N===void 0?4:N,z=i.paddingBottom,$=z===void 0?2:z,Y=i.paddingTop,U=Y===void 0?2:Y,te=this.w,ne=this.graphics.drawText({x:a,y:l,text:d,textAnchor:u||"start",fontSize:g||"12px",fontWeight:y||"regular",fontFamily:x||te.config.chart.fontFamily,foreColor:h||te.config.chart.foreColor,cssClass:b}),ie=te.globals.dom.baseEl.querySelector(F);ie&&ie.appendChild(ne.node);var me=ne.bbox();if(d){var be=this.graphics.drawRect(me.x-k,me.y-U,me.width+k+R,me.height+$+U,L,w||"transparent",1,S,T,j);ie.insertBefore(be.node,ne.node)}}},{key:"addImage",value:function(i,n){var a=this.w,l=i.path,d=i.x,u=d===void 0?0:d,h=i.y,g=h===void 0?0:h,x=i.width,y=x===void 0?20:x,b=i.height,w=b===void 0?20:b,S=i.appendTo,j=S===void 0?".apexcharts-svg":S,L=a.globals.dom.Paper.image(l);L.size(y,w).move(u,g);var T=a.globals.dom.baseEl.querySelector(j);return T&&T.appendChild(L.node),L}},{key:"addXaxisAnnotationExternal",value:function(i,n,a){return this.addAnnotationExternal({params:i,pushToMemory:n,context:a,type:"xaxis",contextMethod:a.addXaxisAnnotation}),a}},{key:"addYaxisAnnotationExternal",value:function(i,n,a){return this.addAnnotationExternal({params:i,pushToMemory:n,context:a,type:"yaxis",contextMethod:a.addYaxisAnnotation}),a}},{key:"addPointAnnotationExternal",value:function(i,n,a){return this.invertAxis===void 0&&(this.invertAxis=a.w.globals.isBarHorizontal),this.addAnnotationExternal({params:i,pushToMemory:n,context:a,type:"point",contextMethod:a.addPointAnnotation}),a}},{key:"addAnnotationExternal",value:function(i){var n=i.params,a=i.pushToMemory,l=i.context,d=i.type,u=i.contextMethod,h=l,g=h.w,x=g.globals.dom.baseEl.querySelector(".apexcharts-".concat(d,"-annotations")),y=x.childNodes.length+1,b=new Ee,w=Object.assign({},d==="xaxis"?b.xAxisAnnotation:d==="yaxis"?b.yAxisAnnotation:b.pointAnnotation),S=_.extend(w,n);switch(d){case"xaxis":this.addXaxisAnnotation(S,x,y);break;case"yaxis":this.addYaxisAnnotation(S,x,y);break;case"point":this.addPointAnnotation(S,x,y)}var j=g.globals.dom.baseEl.querySelector(".apexcharts-".concat(d,"-annotations .apexcharts-").concat(d,"-annotation-label[rel='").concat(y,"']")),L=this.helpers.addBackgroundToAnno(j,S);return L&&x.insertBefore(L.node,j),a&&g.globals.memory.methodsToExec.push({context:h,id:S.id?S.id:_.randomId(),method:u,label:"addAnnotation",params:n}),l}},{key:"clearAnnotations",value:function(i){var n=i.w,a=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");n.globals.memory.methodsToExec.map(function(l,d){l.label!=="addText"&&l.label!=="addAnnotation"||n.globals.memory.methodsToExec.splice(d,1)}),a=_.listToArray(a),Array.prototype.forEach.call(a,function(l){for(;l.firstChild;)l.removeChild(l.firstChild)})}},{key:"removeAnnotation",value:function(i,n){var a=i.w,l=a.globals.dom.baseEl.querySelectorAll(".".concat(n));l&&(a.globals.memory.methodsToExec.map(function(d,u){d.id===n&&a.globals.memory.methodsToExec.splice(u,1)}),Array.prototype.forEach.call(l,function(d){d.parentElement.removeChild(d)}))}}]),O}(),Re=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return v(O,[{key:"isValidDate",value:function(i){return typeof i!="number"&&!isNaN(this.parseDate(i))}},{key:"getTimeStamp",value:function(i){return Date.parse(i)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(i).toISOString().substr(0,25)).getTime():new Date(i).getTime():i}},{key:"getDate",value:function(i){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(i).toUTCString()):new Date(i)}},{key:"parseDate",value:function(i){var n=Date.parse(i);if(!isNaN(n))return this.getTimeStamp(i);var a=Date.parse(i.replace(/-/g,"/").replace(/[a-z]+/gi," "));return a=this.getTimeStamp(a)}},{key:"parseDateWithTimezone",value:function(i){return Date.parse(i.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(i,n){var a=this.w.globals.locale,l=this.w.config.xaxis.labels.datetimeUTC,d=["\0"].concat(D(a.months)),u=[""].concat(D(a.shortMonths)),h=[""].concat(D(a.days)),g=[""].concat(D(a.shortDays));function x($,Y){var U=$+"";for(Y=Y||2;U.length12?S-12:S===0?12:S;n=(n=(n=(n=n.replace(/(^|[^\\])HH+/g,"$1"+x(S))).replace(/(^|[^\\])H/g,"$1"+S)).replace(/(^|[^\\])hh+/g,"$1"+x(j))).replace(/(^|[^\\])h/g,"$1"+j);var L=l?i.getUTCMinutes():i.getMinutes();n=(n=n.replace(/(^|[^\\])mm+/g,"$1"+x(L))).replace(/(^|[^\\])m/g,"$1"+L);var T=l?i.getUTCSeconds():i.getSeconds();n=(n=n.replace(/(^|[^\\])ss+/g,"$1"+x(T))).replace(/(^|[^\\])s/g,"$1"+T);var I=l?i.getUTCMilliseconds():i.getMilliseconds();n=n.replace(/(^|[^\\])fff+/g,"$1"+x(I,3)),I=Math.round(I/10),n=n.replace(/(^|[^\\])ff/g,"$1"+x(I)),I=Math.round(I/10);var F=S<12?"AM":"PM";n=(n=(n=n.replace(/(^|[^\\])f/g,"$1"+I)).replace(/(^|[^\\])TT+/g,"$1"+F)).replace(/(^|[^\\])T/g,"$1"+F.charAt(0));var m=F.toLowerCase();n=(n=n.replace(/(^|[^\\])tt+/g,"$1"+m)).replace(/(^|[^\\])t/g,"$1"+m.charAt(0));var k=-i.getTimezoneOffset(),N=l||!k?"Z":k>0?"+":"-";if(!l){var R=(k=Math.abs(k))%60;N+=x(Math.floor(k/60))+":"+x(R)}n=n.replace(/(^|[^\\])K/g,"$1"+N);var z=(l?i.getUTCDay():i.getDay())+1;return n=(n=(n=(n=(n=n.replace(new RegExp(h[0],"g"),h[z])).replace(new RegExp(g[0],"g"),g[z])).replace(new RegExp(d[0],"g"),d[b])).replace(new RegExp(u[0],"g"),u[b])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(i,n,a){var l=this.w;l.config.xaxis.min!==void 0&&(i=l.config.xaxis.min),l.config.xaxis.max!==void 0&&(n=l.config.xaxis.max);var d=this.getDate(i),u=this.getDate(n),h=this.formatDate(d,"yyyy MM dd HH mm ss fff").split(" "),g=this.formatDate(u,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(h[6],10),maxMillisecond:parseInt(g[6],10),minSecond:parseInt(h[5],10),maxSecond:parseInt(g[5],10),minMinute:parseInt(h[4],10),maxMinute:parseInt(g[4],10),minHour:parseInt(h[3],10),maxHour:parseInt(g[3],10),minDate:parseInt(h[2],10),maxDate:parseInt(g[2],10),minMonth:parseInt(h[1],10)-1,maxMonth:parseInt(g[1],10)-1,minYear:parseInt(h[0],10),maxYear:parseInt(g[0],10)}}},{key:"isLeapYear",value:function(i){return i%4==0&&i%100!=0||i%400==0}},{key:"calculcateLastDaysOfMonth",value:function(i,n,a){return this.determineDaysOfMonths(i,n)-a}},{key:"determineDaysOfYear",value:function(i){var n=365;return this.isLeapYear(i)&&(n=366),n}},{key:"determineRemainingDaysOfYear",value:function(i,n,a){var l=this.daysCntOfYear[n]+a;return n>1&&this.isLeapYear()&&l++,l}},{key:"determineDaysOfMonths",value:function(i,n){var a=30;switch(i=_.monthMod(i),!0){case this.months30.indexOf(i)>-1:i===2&&(a=this.isLeapYear(n)?29:28);break;case this.months31.indexOf(i)>-1:default:a=31}return a}}]),O}(),qe=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.tooltipKeyFormat="dd MMM"}return v(O,[{key:"xLabelFormat",value:function(i,n,a,l){var d=this.w;if(d.config.xaxis.type==="datetime"&&d.config.xaxis.labels.formatter===void 0&&d.config.tooltip.x.formatter===void 0){var u=new Re(this.ctx);return u.formatDate(u.getDate(n),d.config.tooltip.x.format)}return i(n,a,l)}},{key:"defaultGeneralFormatter",value:function(i){return Array.isArray(i)?i.map(function(n){return n}):i}},{key:"defaultYFormatter",value:function(i,n,a){var l=this.w;return _.isNumber(i)&&(i=l.globals.yValueDecimal!==0?i.toFixed(n.decimalsInFloat!==void 0?n.decimalsInFloat:l.globals.yValueDecimal):l.globals.maxYArr[a]-l.globals.minYArr[a]<5?i.toFixed(1):i.toFixed(0)),i}},{key:"setLabelFormatters",value:function(){var i=this,n=this.w;return n.globals.xaxisTooltipFormatter=function(a){return i.defaultGeneralFormatter(a)},n.globals.ttKeyFormatter=function(a){return i.defaultGeneralFormatter(a)},n.globals.ttZFormatter=function(a){return a},n.globals.legendFormatter=function(a){return i.defaultGeneralFormatter(a)},n.config.xaxis.labels.formatter!==void 0?n.globals.xLabelFormatter=n.config.xaxis.labels.formatter:n.globals.xLabelFormatter=function(a){if(_.isNumber(a)){if(!n.config.xaxis.convertedCatToNumeric&&n.config.xaxis.type==="numeric"){if(_.isNumber(n.config.xaxis.decimalsInFloat))return a.toFixed(n.config.xaxis.decimalsInFloat);var l=n.globals.maxX-n.globals.minX;return l>0&&l<100?a.toFixed(1):a.toFixed(0)}return n.globals.isBarHorizontal&&n.globals.maxY-n.globals.minYArr<4?a.toFixed(1):a.toFixed(0)}return a},typeof n.config.tooltip.x.formatter=="function"?n.globals.ttKeyFormatter=n.config.tooltip.x.formatter:n.globals.ttKeyFormatter=n.globals.xLabelFormatter,typeof n.config.xaxis.tooltip.formatter=="function"&&(n.globals.xaxisTooltipFormatter=n.config.xaxis.tooltip.formatter),(Array.isArray(n.config.tooltip.y)||n.config.tooltip.y.formatter!==void 0)&&(n.globals.ttVal=n.config.tooltip.y),n.config.tooltip.z.formatter!==void 0&&(n.globals.ttZFormatter=n.config.tooltip.z.formatter),n.config.legend.formatter!==void 0&&(n.globals.legendFormatter=n.config.legend.formatter),n.config.yaxis.forEach(function(a,l){a.labels.formatter!==void 0?n.globals.yLabelFormatters[l]=a.labels.formatter:n.globals.yLabelFormatters[l]=function(d){return n.globals.xyCharts?Array.isArray(d)?d.map(function(u){return i.defaultYFormatter(u,a,l)}):i.defaultYFormatter(d,a,l):d}}),n.globals}},{key:"heatmapLabelFormatters",value:function(){var i=this.w;if(i.config.chart.type==="heatmap"){i.globals.yAxisScale[0].result=i.globals.seriesNames.slice();var n=i.globals.seriesNames.reduce(function(a,l){return a.length>l.length?a:l},0);i.globals.yAxisScale[0].niceMax=n,i.globals.yAxisScale[0].niceMin=n}}}]),O}(),it=function(O){var i,n=O.isTimeline,a=O.ctx,l=O.seriesIndex,d=O.dataPointIndex,u=O.y1,h=O.y2,g=O.w,x=g.globals.seriesRangeStart[l][d],y=g.globals.seriesRangeEnd[l][d],b=g.globals.labels[d],w=g.config.series[l].name?g.config.series[l].name:"",S=g.globals.ttKeyFormatter,j=g.config.tooltip.y.title.formatter,L={w:g,seriesIndex:l,dataPointIndex:d,start:x,end:y};typeof j=="function"&&(w=j(w,L)),(i=g.config.series[l].data[d])!==null&&i!==void 0&&i.x&&(b=g.config.series[l].data[d].x),n||g.config.xaxis.type==="datetime"&&(b=new qe(a).xLabelFormat(g.globals.ttKeyFormatter,b,b,{i:void 0,dateFormatter:new Re(a).formatDate,w:g})),typeof S=="function"&&(b=S(b,L)),Number.isFinite(u)&&Number.isFinite(h)&&(x=u,y=h);var T="",I="",F=g.globals.colors[l];if(g.config.tooltip.x.formatter===void 0)if(g.config.xaxis.type==="datetime"){var m=new Re(a);T=m.formatDate(m.getDate(x),g.config.tooltip.x.format),I=m.formatDate(m.getDate(y),g.config.tooltip.x.format)}else T=x,I=y;else T=g.config.tooltip.x.formatter(x),I=g.config.tooltip.x.formatter(y);return{start:x,end:y,startVal:T,endVal:I,ylabel:b,color:F,seriesName:w}},de=function(O){var i=O.color,n=O.seriesName,a=O.ylabel,l=O.start,d=O.end,u=O.seriesIndex,h=O.dataPointIndex,g=O.ctx.tooltip.tooltipLabels.getFormatters(u);l=g.yLbFormatter(l),d=g.yLbFormatter(d);var x=g.yLbFormatter(O.w.globals.series[u][h]),y=` `.concat(l,` - `).concat(d,` - `);return'
'+(n||"")+'
'+a+": "+(O.w.globals.comboCharts?O.w.config.series[u].type==="rangeArea"||O.w.config.series[u].type==="rangeBar"?y:"".concat(x,""):y)+"
"},le=function(){function O(i){c(this,O),this.opts=i}return v(O,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(i){return this.hideYAxis(),_.extend(i,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),s(s({},this.bar()),{},{chart:{animations:{easing:"linear",speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var i=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(n){var a=n.seriesIndex,l=n.dataPointIndex,d=n.w;return i._getBoxTooltip(d,a,l,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var i=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(n){var a=n.seriesIndex,l=n.dataPointIndex,d=n.w;return i._getBoxTooltip(d,a,l,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(i,n){n.ctx;var a=n.seriesIndex,l=n.dataPointIndex,d=n.w,u=function(){var h=d.globals.seriesRangeStart[a][l];return d.globals.seriesRangeEnd[a][l]-h};return d.globals.comboCharts?d.config.series[a].type==="rangeBar"||d.config.series[a].type==="rangeArea"?u():i:u()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(i){return i.w.config.plotOptions&&i.w.config.plotOptions.bar&&i.w.config.plotOptions.bar.horizontal?function(n){var a=it(s(s({},n),{},{isTimeline:!0})),l=a.color,d=a.seriesName,u=a.ylabel,h=a.startVal,g=a.endVal;return de(s(s({},n),{},{color:l,seriesName:d,ylabel:u,start:h,end:g}))}(i):function(n){var a=it(n),l=a.color,d=a.seriesName,u=a.ylabel,h=a.start,g=a.end;return de(s(s({},n),{},{color:l,seriesName:d,ylabel:u,start:h,end:g}))}(i)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(i){var n,a;return(n=i.plotOptions.bar)!==null&&n!==void 0&&n.barHeight||(i.plotOptions.bar.barHeight=2),(a=i.plotOptions.bar)!==null&&a!==void 0&&a.columnWidth||(i.plotOptions.bar.columnWidth=2),i}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(i){return function(n){var a=it(n),l=a.color,d=a.seriesName,u=a.ylabel,h=a.start,g=a.end;return de(s(s({},n),{},{color:l,seriesName:d,ylabel:u,start:h,end:g}))}(i)}}}}},{key:"brush",value:function(i){return _.extend(i,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(i){i.dataLabels=i.dataLabels||{},i.dataLabels.formatter=i.dataLabels.formatter||void 0;var n=i.dataLabels.formatter;return i.yaxis.forEach(function(a,l){i.yaxis[l].min=0,i.yaxis[l].max=100}),i.chart.type==="bar"&&(i.dataLabels.formatter=n||function(a){return typeof a=="number"&&a?a.toFixed(0)+"%":a}),i}},{key:"stackedBars",value:function(){var i=this.bar();return s(s({},i),{},{plotOptions:s(s({},i.plotOptions),{},{bar:s(s({},i.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(i){return i.xaxis.convertedCatToNumeric=!0,i}},{key:"convertCatToNumericXaxis",value:function(i,n,a){i.xaxis.type="numeric",i.xaxis.labels=i.xaxis.labels||{},i.xaxis.labels.formatter=i.xaxis.labels.formatter||function(u){return _.isNumber(u)?Math.floor(u):u};var l=i.xaxis.labels.formatter,d=i.xaxis.categories&&i.xaxis.categories.length?i.xaxis.categories:i.labels;return a&&a.length&&(d=a.map(function(u){return Array.isArray(u)?u:String(u)})),d&&d.length&&(i.xaxis.labels.formatter=function(u){return _.isNumber(u)?l(d[Math.floor(u)-1]):l(u)}),i.xaxis.categories=[],i.labels=[],i.xaxis.tickAmount=i.xaxis.tickAmount||"dataPoints",i}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(i){return i.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(i){return i.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(i){return i.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(i){return i},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(i,n,a,l,d){var u=i.globals.seriesCandleO[n][a],h=i.globals.seriesCandleH[n][a],g=i.globals.seriesCandleM[n][a],x=i.globals.seriesCandleL[n][a],y=i.globals.seriesCandleC[n][a];return i.config.series[n].type&&i.config.series[n].type!==d?`
+ `);return'
'+(n||"")+'
'+a+": "+(O.w.globals.comboCharts?O.w.config.series[u].type==="rangeArea"||O.w.config.series[u].type==="rangeBar"?y:"".concat(x,""):y)+"
"},ce=function(){function O(i){c(this,O),this.opts=i}return v(O,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(i){return this.hideYAxis(),_.extend(i,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),s(s({},this.bar()),{},{chart:{animations:{easing:"linear",speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var i=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(n){var a=n.seriesIndex,l=n.dataPointIndex,d=n.w;return i._getBoxTooltip(d,a,l,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var i=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(n){var a=n.seriesIndex,l=n.dataPointIndex,d=n.w;return i._getBoxTooltip(d,a,l,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(i,n){n.ctx;var a=n.seriesIndex,l=n.dataPointIndex,d=n.w,u=function(){var h=d.globals.seriesRangeStart[a][l];return d.globals.seriesRangeEnd[a][l]-h};return d.globals.comboCharts?d.config.series[a].type==="rangeBar"||d.config.series[a].type==="rangeArea"?u():i:u()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(i){return i.w.config.plotOptions&&i.w.config.plotOptions.bar&&i.w.config.plotOptions.bar.horizontal?function(n){var a=it(s(s({},n),{},{isTimeline:!0})),l=a.color,d=a.seriesName,u=a.ylabel,h=a.startVal,g=a.endVal;return de(s(s({},n),{},{color:l,seriesName:d,ylabel:u,start:h,end:g}))}(i):function(n){var a=it(n),l=a.color,d=a.seriesName,u=a.ylabel,h=a.start,g=a.end;return de(s(s({},n),{},{color:l,seriesName:d,ylabel:u,start:h,end:g}))}(i)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(i){var n,a;return(n=i.plotOptions.bar)!==null&&n!==void 0&&n.barHeight||(i.plotOptions.bar.barHeight=2),(a=i.plotOptions.bar)!==null&&a!==void 0&&a.columnWidth||(i.plotOptions.bar.columnWidth=2),i}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(i){return function(n){var a=it(n),l=a.color,d=a.seriesName,u=a.ylabel,h=a.start,g=a.end;return de(s(s({},n),{},{color:l,seriesName:d,ylabel:u,start:h,end:g}))}(i)}}}}},{key:"brush",value:function(i){return _.extend(i,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(i){i.dataLabels=i.dataLabels||{},i.dataLabels.formatter=i.dataLabels.formatter||void 0;var n=i.dataLabels.formatter;return i.yaxis.forEach(function(a,l){i.yaxis[l].min=0,i.yaxis[l].max=100}),i.chart.type==="bar"&&(i.dataLabels.formatter=n||function(a){return typeof a=="number"&&a?a.toFixed(0)+"%":a}),i}},{key:"stackedBars",value:function(){var i=this.bar();return s(s({},i),{},{plotOptions:s(s({},i.plotOptions),{},{bar:s(s({},i.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(i){return i.xaxis.convertedCatToNumeric=!0,i}},{key:"convertCatToNumericXaxis",value:function(i,n,a){i.xaxis.type="numeric",i.xaxis.labels=i.xaxis.labels||{},i.xaxis.labels.formatter=i.xaxis.labels.formatter||function(u){return _.isNumber(u)?Math.floor(u):u};var l=i.xaxis.labels.formatter,d=i.xaxis.categories&&i.xaxis.categories.length?i.xaxis.categories:i.labels;return a&&a.length&&(d=a.map(function(u){return Array.isArray(u)?u:String(u)})),d&&d.length&&(i.xaxis.labels.formatter=function(u){return _.isNumber(u)?l(d[Math.floor(u)-1]):l(u)}),i.xaxis.categories=[],i.labels=[],i.xaxis.tickAmount=i.xaxis.tickAmount||"dataPoints",i}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(i){return i.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(i){return i.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(i){return i.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(i){return i},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(i,n,a,l,d){var u=i.globals.seriesCandleO[n][a],h=i.globals.seriesCandleH[n][a],g=i.globals.seriesCandleM[n][a],x=i.globals.seriesCandleL[n][a],y=i.globals.seriesCandleC[n][a];return i.config.series[n].type&&i.config.series[n].type!==d?`
`.concat(i.config.series[n].name?i.config.series[n].name:"series-"+(n+1),": ").concat(i.globals.series[n][a],` -
`):'
')+"
".concat(l[0],': ')+u+"
"+"
".concat(l[1],': ')+h+"
"+(g?"
".concat(l[2],': ')+g+"
":"")+"
".concat(l[3],': ')+x+"
"+"
".concat(l[4],': ')+y+"
"}}]),O}(),oe=function(){function O(i){c(this,O),this.opts=i}return v(O,[{key:"init",value:function(i){var n=i.responsiveOverride,a=this.opts,l=new Ee,d=new le(a);this.chartType=a.chart.type,a=this.extendYAxis(a),a=this.extendAnnotations(a);var u=l.init(),h={};if(a&&o(a)==="object"){var g,x,y,b,w,S,j,E,T={};T=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(a.chart.type)!==-1?d[a.chart.type]():d.line(),(g=a.plotOptions)!==null&&g!==void 0&&(x=g.bar)!==null&&x!==void 0&&x.isFunnel&&(T=d.funnel()),a.chart.stacked&&a.chart.type==="bar"&&(T=d.stackedBars()),(y=a.chart.brush)!==null&&y!==void 0&&y.enabled&&(T=d.brush(T)),a.chart.stacked&&a.chart.stackType==="100%"&&(a=d.stacked100(a)),(b=a.plotOptions)!==null&&b!==void 0&&(w=b.bar)!==null&&w!==void 0&&w.isDumbbell&&(a=d.dumbbell(a)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(a),a.xaxis=a.xaxis||window.Apex.xaxis||{},n||(a.xaxis.convertedCatToNumeric=!1),((S=(a=this.checkForCatToNumericXAxis(this.chartType,T,a)).chart.sparkline)!==null&&S!==void 0&&S.enabled||(j=window.Apex.chart)!==null&&j!==void 0&&(E=j.sparkline)!==null&&E!==void 0&&E.enabled)&&(T=d.sparkline(T)),h=_.extend(u,T)}var I=_.extend(h,window.Apex);return u=_.extend(I,a),u=this.handleUserInputErrors(u)}},{key:"checkForCatToNumericXAxis",value:function(i,n,a){var l,d,u=new le(a),h=(i==="bar"||i==="boxPlot")&&((l=a.plotOptions)===null||l===void 0||(d=l.bar)===null||d===void 0?void 0:d.horizontal),g=i==="pie"||i==="polarArea"||i==="donut"||i==="radar"||i==="radialBar"||i==="heatmap",x=a.xaxis.type!=="datetime"&&a.xaxis.type!=="numeric",y=a.xaxis.tickPlacement?a.xaxis.tickPlacement:n.xaxis&&n.xaxis.tickPlacement;return h||g||!x||y==="between"||(a=u.convertCatToNumeric(a)),a}},{key:"extendYAxis",value:function(i,n){var a=new Ee;(i.yaxis===void 0||!i.yaxis||Array.isArray(i.yaxis)&&i.yaxis.length===0)&&(i.yaxis={}),i.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(i.yaxis=_.extend(i.yaxis,window.Apex.yaxis)),i.yaxis.constructor!==Array?i.yaxis=[_.extend(a.yAxis,i.yaxis)]:i.yaxis=_.extendArray(i.yaxis,a.yAxis);var l=!1;i.yaxis.forEach(function(u){u.logarithmic&&(l=!0)});var d=i.series;return n&&!d&&(d=n.config.series),l&&d.length!==i.yaxis.length&&d.length&&(i.yaxis=d.map(function(u,h){if(u.name||(d[h].name="series-".concat(h+1)),i.yaxis[h])return i.yaxis[h].seriesName=d[h].name,i.yaxis[h];var g=_.extend(a.yAxis,i.yaxis[0]);return g.show=!1,g})),l&&d.length>1&&d.length!==i.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),i}},{key:"extendAnnotations",value:function(i){return i.annotations===void 0&&(i.annotations={},i.annotations.yaxis=[],i.annotations.xaxis=[],i.annotations.points=[]),i=this.extendYAxisAnnotations(i),i=this.extendXAxisAnnotations(i),i=this.extendPointAnnotations(i)}},{key:"extendYAxisAnnotations",value:function(i){var n=new Ee;return i.annotations.yaxis=_.extendArray(i.annotations.yaxis!==void 0?i.annotations.yaxis:[],n.yAxisAnnotation),i}},{key:"extendXAxisAnnotations",value:function(i){var n=new Ee;return i.annotations.xaxis=_.extendArray(i.annotations.xaxis!==void 0?i.annotations.xaxis:[],n.xAxisAnnotation),i}},{key:"extendPointAnnotations",value:function(i){var n=new Ee;return i.annotations.points=_.extendArray(i.annotations.points!==void 0?i.annotations.points:[],n.pointAnnotation),i}},{key:"checkForDarkTheme",value:function(i){i.theme&&i.theme.mode==="dark"&&(i.tooltip||(i.tooltip={}),i.tooltip.theme!=="light"&&(i.tooltip.theme="dark"),i.chart.foreColor||(i.chart.foreColor="#f6f7f8"),i.chart.background||(i.chart.background="#424242"),i.theme.palette||(i.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(i){var n=i;if(n.tooltip.shared&&n.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(n.chart.type==="bar"&&n.plotOptions.bar.horizontal){if(n.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");n.yaxis[0].reversed&&(n.yaxis[0].opposite=!0),n.xaxis.tooltip.enabled=!1,n.yaxis[0].tooltip.enabled=!1,n.chart.zoom.enabled=!1}return n.chart.type!=="bar"&&n.chart.type!=="rangeBar"||n.tooltip.shared&&n.xaxis.crosshairs.width==="barWidth"&&n.series.length>1&&(n.xaxis.crosshairs.width="tickWidth"),n.chart.type!=="candlestick"&&n.chart.type!=="boxPlot"||n.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(n.chart.type," chart is not supported.")),n.yaxis[0].reversed=!1),n}}]),O}(),Ae=function(){function O(){c(this,O)}return v(O,[{key:"initGlobalVars",value:function(i){i.series=[],i.seriesCandleO=[],i.seriesCandleH=[],i.seriesCandleM=[],i.seriesCandleL=[],i.seriesCandleC=[],i.seriesRangeStart=[],i.seriesRangeEnd=[],i.seriesRange=[],i.seriesPercent=[],i.seriesGoals=[],i.seriesX=[],i.seriesZ=[],i.seriesNames=[],i.seriesTotals=[],i.seriesLog=[],i.seriesColors=[],i.stackedSeriesTotals=[],i.seriesXvalues=[],i.seriesYvalues=[],i.labels=[],i.hasXaxisGroups=!1,i.groups=[],i.hasSeriesGroups=!1,i.seriesGroups=[],i.categoryLabels=[],i.timescaleLabels=[],i.noLabelsProvided=!1,i.resizeTimer=null,i.selectionResizeTimer=null,i.delayedElements=[],i.pointsArray=[],i.dataLabelsRects=[],i.isXNumeric=!1,i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1,i.isDataXYZ=!1,i.isMultiLineX=!1,i.isMultipleYAxis=!1,i.maxY=-Number.MAX_VALUE,i.minY=Number.MIN_VALUE,i.minYArr=[],i.maxYArr=[],i.maxX=-Number.MAX_VALUE,i.minX=Number.MAX_VALUE,i.initialMaxX=-Number.MAX_VALUE,i.initialMinX=Number.MAX_VALUE,i.maxDate=0,i.minDate=Number.MAX_VALUE,i.minZ=Number.MAX_VALUE,i.maxZ=-Number.MAX_VALUE,i.minXDiff=Number.MAX_VALUE,i.yAxisScale=[],i.xAxisScale=null,i.xAxisTicksPositions=[],i.yLabelsCoords=[],i.yTitleCoords=[],i.barPadForNumericAxis=0,i.padHorizontal=0,i.xRange=0,i.yRange=[],i.zRange=0,i.dataPoints=0,i.xTickAmount=0,i.multiAxisTickAmount=0}},{key:"globalVars",value:function(i){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:i.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:i.chart.toolbar.autoSelected==="zoom"&&i.chart.toolbar.tools.zoom&&i.chart.zoom.enabled,panEnabled:i.chart.toolbar.autoSelected==="pan"&&i.chart.toolbar.tools.pan,selectionEnabled:i.chart.toolbar.autoSelected==="selection"&&i.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(i){var n=this.globalVars(i);return this.initGlobalVars(n),n.initialConfig=_.extend({},i),n.initialSeries=_.clone(i.series),n.lastXAxis=_.clone(n.initialConfig.xaxis),n.lastYAxis=_.clone(n.initialConfig.yaxis),n}}]),O}(),je=function(){function O(i){c(this,O),this.opts=i}return v(O,[{key:"init",value:function(){var i=new oe(this.opts).init({responsiveOverride:!1});return{config:i,globals:new Ae().init(i)}}}]),O}(),ze=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.opts=null,this.seriesIndex=0}return v(O,[{key:"clippedImgArea",value:function(i){var n=this.w,a=n.config,l=parseInt(n.globals.gridWidth,10),d=parseInt(n.globals.gridHeight,10),u=l>d?l:d,h=i.image,g=0,x=0;i.width===void 0&&i.height===void 0?a.fill.image.width!==void 0&&a.fill.image.height!==void 0?(g=a.fill.image.width+1,x=a.fill.image.height):(g=u+1,x=u):(g=i.width,x=i.height);var y=document.createElementNS(n.globals.SVGNS,"pattern");X.setAttrs(y,{id:i.patternID,patternUnits:i.patternUnits?i.patternUnits:"userSpaceOnUse",width:g+"px",height:x+"px"});var b=document.createElementNS(n.globals.SVGNS,"image");y.appendChild(b),b.setAttributeNS(window.SVG.xlink,"href",h),X.setAttrs(b,{x:0,y:0,preserveAspectRatio:"none",width:g+"px",height:x+"px"}),b.style.opacity=i.opacity,n.globals.dom.elDefs.node.appendChild(y)}},{key:"getSeriesIndex",value:function(i){var n=this.w,a=n.config.chart.type;return(a==="bar"||a==="rangeBar")&&n.config.plotOptions.bar.distributed||a==="heatmap"||a==="treemap"?this.seriesIndex=i.seriesNumber:this.seriesIndex=i.seriesNumber%n.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(i){var n=this.w;this.opts=i;var a,l,d,u=this.w.config;this.seriesIndex=this.getSeriesIndex(i);var h=this.getFillColors()[this.seriesIndex];n.globals.seriesColors[this.seriesIndex]!==void 0&&(h=n.globals.seriesColors[this.seriesIndex]),typeof h=="function"&&(h=h({seriesIndex:this.seriesIndex,dataPointIndex:i.dataPointIndex,value:i.value,w:n}));var g=i.fillType?i.fillType:this.getFillType(this.seriesIndex),x=Array.isArray(u.fill.opacity)?u.fill.opacity[this.seriesIndex]:u.fill.opacity;i.color&&(h=i.color),h||(h="#fff",console.warn("undefined color - ApexCharts"));var y=h;if(h.indexOf("rgb")===-1?h.length<9&&(y=_.hexToRgba(h,x)):h.indexOf("rgba")>-1&&(x=_.getOpacityFromRGBA(h)),i.opacity&&(x=i.opacity),g==="pattern"&&(l=this.handlePatternFill({fillConfig:i.fillConfig,patternFill:l,fillColor:h,fillOpacity:x,defaultColor:y})),g==="gradient"&&(d=this.handleGradientFill({fillConfig:i.fillConfig,fillColor:h,fillOpacity:x,i:this.seriesIndex})),g==="image"){var b=u.fill.image.src,w=i.patternID?i.patternID:"";this.clippedImgArea({opacity:x,image:Array.isArray(b)?i.seriesNumber-1&&(S=_.getOpacityFromRGBA(w));var j=u.gradient.opacityTo===void 0?a:Array.isArray(u.gradient.opacityTo)?u.gradient.opacityTo[d]:u.gradient.opacityTo;if(u.gradient.gradientToColors===void 0||u.gradient.gradientToColors.length===0)h=u.gradient.shade==="dark"?y.shadeColor(-1*parseFloat(u.gradient.shadeIntensity),n.indexOf("rgb")>-1?_.rgb2hex(n):n):y.shadeColor(parseFloat(u.gradient.shadeIntensity),n.indexOf("rgb")>-1?_.rgb2hex(n):n);else if(u.gradient.gradientToColors[g.seriesNumber]){var E=u.gradient.gradientToColors[g.seriesNumber];h=E,E.indexOf("rgba")>-1&&(j=_.getOpacityFromRGBA(E))}else h=n;if(u.gradient.gradientFrom&&(w=u.gradient.gradientFrom),u.gradient.gradientTo&&(h=u.gradient.gradientTo),u.gradient.inverseColors){var T=w;w=h,h=T}return w.indexOf("rgb")>-1&&(w=_.rgb2hex(w)),h.indexOf("rgb")>-1&&(h=_.rgb2hex(h)),x.drawGradient(b,w,h,S,j,g.size,u.gradient.stops,u.gradient.colorStops,d)}}]),O}(),Ue=function(){function O(i,n){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"setGlobalMarkerSize",value:function(){var i=this.w;if(i.globals.markers.size=Array.isArray(i.config.markers.size)?i.config.markers.size:[i.config.markers.size],i.globals.markers.size.length>0){if(i.globals.markers.size.length4&&arguments[4]!==void 0&&arguments[4],h=this.w,g=n,x=i,y=null,b=new X(this.ctx),w=h.config.markers.discrete&&h.config.markers.discrete.length;if((h.globals.markers.size[n]>0||u||w)&&(y=b.group({class:u||w?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(h.globals.cuid,")")),Array.isArray(x.x))for(var S=0;S0:h.config.markers.size>0)||u||w){_.isNumber(x.y[S])?E+=" w".concat(_.randomId()):E="apexcharts-nullpoint";var T=this.getMarkerConfig({cssClass:E,seriesIndex:n,dataPointIndex:j});h.config.series[g].data[j]&&(h.config.series[g].data[j].fillColor&&(T.pointFillColor=h.config.series[g].data[j].fillColor),h.config.series[g].data[j].strokeColor&&(T.pointStrokeColor=h.config.series[g].data[j].strokeColor)),l&&(T.pSize=l),(x.x[S]<0||x.x[S]>h.globals.gridWidth||x.y[S]<-h.globals.markers.largestSize||x.y[S]>h.globals.gridHeight+h.globals.markers.largestSize)&&(T.pSize=0),(d=b.drawMarker(x.x[S],x.y[S],T)).attr("rel",j),d.attr("j",j),d.attr("index",n),d.node.setAttribute("default-marker-size",T.pSize),new ee(this.ctx).setSelectionFilter(d,n,j),this.addEvents(d),y&&y.add(d)}else h.globals.pointsArray[n]===void 0&&(h.globals.pointsArray[n]=[]),h.globals.pointsArray[n].push([x.x[S],x.y[S]])}return y}},{key:"getMarkerConfig",value:function(i){var n=i.cssClass,a=i.seriesIndex,l=i.dataPointIndex,d=l===void 0?null:l,u=i.finishRadius,h=u===void 0?null:u,g=this.w,x=this.getMarkerStyle(a),y=g.globals.markers.size[a],b=g.config.markers;return d!==null&&b.discrete.length&&b.discrete.map(function(w){w.seriesIndex===a&&w.dataPointIndex===d&&(x.pointStrokeColor=w.strokeColor,x.pointFillColor=w.fillColor,y=w.size,x.pointShape=w.shape)}),{pSize:h===null?y:h,pRadius:b.radius,width:Array.isArray(b.width)?b.width[a]:b.width,height:Array.isArray(b.height)?b.height[a]:b.height,pointStrokeWidth:Array.isArray(b.strokeWidth)?b.strokeWidth[a]:b.strokeWidth,pointStrokeColor:x.pointStrokeColor,pointFillColor:x.pointFillColor,shape:x.pointShape||(Array.isArray(b.shape)?b.shape[a]:b.shape),class:n,pointStrokeOpacity:Array.isArray(b.strokeOpacity)?b.strokeOpacity[a]:b.strokeOpacity,pointStrokeDashArray:Array.isArray(b.strokeDashArray)?b.strokeDashArray[a]:b.strokeDashArray,pointFillOpacity:Array.isArray(b.fillOpacity)?b.fillOpacity[a]:b.fillOpacity,seriesIndex:a}}},{key:"addEvents",value:function(i){var n=this.w,a=new X(this.ctx);i.node.addEventListener("mouseenter",a.pathMouseEnter.bind(this.ctx,i)),i.node.addEventListener("mouseleave",a.pathMouseLeave.bind(this.ctx,i)),i.node.addEventListener("mousedown",a.pathMouseDown.bind(this.ctx,i)),i.node.addEventListener("click",n.config.markers.onClick),i.node.addEventListener("dblclick",n.config.markers.onDblClick),i.node.addEventListener("touchstart",a.pathMouseDown.bind(this.ctx,i),{passive:!0})}},{key:"getMarkerStyle",value:function(i){var n=this.w,a=n.globals.markers.colors,l=n.config.markers.strokeColor||n.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(l)?l[i]:l,pointFillColor:Array.isArray(a)?a[i]:a}}}]),O}(),He=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return v(O,[{key:"draw",value:function(i,n,a){var l=this.w,d=new X(this.ctx),u=a.realIndex,h=a.pointsPos,g=a.zRatio,x=a.elParent,y=d.group({class:"apexcharts-series-markers apexcharts-series-".concat(l.config.chart.type)});if(y.attr("clip-path","url(#gridRectMarkerMask".concat(l.globals.cuid,")")),Array.isArray(h.x))for(var b=0;bT.maxBubbleRadius&&(E=T.maxBubbleRadius)}l.config.chart.animations.enabled||(j=E);var I=h.x[b],F=h.y[b];if(j=j||0,F!==null&&l.globals.series[u][w]!==void 0||(S=!1),S){var m=this.drawPoint(I,F,j,E,u,w,n);y.add(m)}x.add(y)}}},{key:"drawPoint",value:function(i,n,a,l,d,u,h){var g=this.w,x=d,y=new K(this.ctx),b=new ee(this.ctx),w=new ze(this.ctx),S=new Ue(this.ctx),j=new X(this.ctx),E=S.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:x,dataPointIndex:u,finishRadius:g.config.chart.type==="bubble"||g.globals.comboCharts&&g.config.series[d]&&g.config.series[d].type==="bubble"?l:null});l=E.pSize;var T,I=w.fillPath({seriesNumber:d,dataPointIndex:u,color:E.pointFillColor,patternUnits:"objectBoundingBox",value:g.globals.series[d][h]});if(E.shape==="circle"?T=j.drawCircle(a):E.shape!=="square"&&E.shape!=="rect"||(T=j.drawRect(0,0,E.width-E.pointStrokeWidth/2,E.height-E.pointStrokeWidth/2,E.pRadius)),g.config.series[x].data[u]&&g.config.series[x].data[u].fillColor&&(I=g.config.series[x].data[u].fillColor),T.attr({x:i-E.width/2-E.pointStrokeWidth/2,y:n-E.height/2-E.pointStrokeWidth/2,cx:i,cy:n,fill:I,"fill-opacity":E.pointFillOpacity,stroke:E.pointStrokeColor,r:l,"stroke-width":E.pointStrokeWidth,"stroke-dasharray":E.pointStrokeDashArray,"stroke-opacity":E.pointStrokeOpacity}),g.config.chart.dropShadow.enabled){var F=g.config.chart.dropShadow;b.dropShadow(T,F,d)}if(!this.initialAnim||g.globals.dataChanged||g.globals.resized)g.globals.animationEnded=!0;else{var m=g.config.chart.animations.speed;y.animateMarker(T,0,E.shape==="circle"?l:{width:E.width,height:E.height},m,g.globals.easing,function(){window.setTimeout(function(){y.animationCompleted(T)},100)})}if(g.globals.dataChanged&&E.shape==="circle")if(this.dynamicAnim){var k,N,R,z,$=g.config.chart.animations.dynamicAnimation.speed;(z=g.globals.previousPaths[d]&&g.globals.previousPaths[d][h])!=null&&(k=z.x,N=z.y,R=z.r!==void 0?z.r:l);for(var Y=0;Yg.globals.gridHeight+w&&(n=g.globals.gridHeight+w/2),g.globals.dataLabelsRects[l]===void 0&&(g.globals.dataLabelsRects[l]=[]),g.globals.dataLabelsRects[l].push({x:i,y:n,width:b,height:w});var S=g.globals.dataLabelsRects[l].length-2,j=g.globals.lastDrawnDataLabelsIndexes[l]!==void 0?g.globals.lastDrawnDataLabelsIndexes[l][g.globals.lastDrawnDataLabelsIndexes[l].length-1]:0;if(g.globals.dataLabelsRects[l][S]!==void 0){var E=g.globals.dataLabelsRects[l][j];(i>E.x+E.width||n>E.y+E.height||n+wn.globals.gridWidth+T.textRects.width+30)&&(g="");var I=n.globals.dataLabels.style.colors[u];((n.config.chart.type==="bar"||n.config.chart.type==="rangeBar")&&n.config.plotOptions.bar.distributed||n.config.dataLabels.distributed)&&(I=n.globals.dataLabels.style.colors[h]),typeof I=="function"&&(I=I({series:n.globals.series,seriesIndex:u,dataPointIndex:h,w:n})),S&&(I=S);var F=w.offsetX,m=w.offsetY;if(n.config.chart.type!=="bar"&&n.config.chart.type!=="rangeBar"||(F=0,m=0),T.drawnextLabel){var k=a.drawText({width:100,height:parseInt(w.style.fontSize,10),x:l+F,y:d+m,foreColor:I,textAnchor:x||w.textAnchor,text:g,fontSize:y||w.style.fontSize,fontFamily:w.style.fontFamily,fontWeight:w.style.fontWeight||"normal"});if(k.attr({class:"apexcharts-datalabel",cx:l,cy:d}),w.dropShadow.enabled){var N=w.dropShadow;new ee(this.ctx).dropShadow(k,N)}b.add(k),n.globals.lastDrawnDataLabelsIndexes[u]===void 0&&(n.globals.lastDrawnDataLabelsIndexes[u]=[]),n.globals.lastDrawnDataLabelsIndexes[u].push(h)}}}},{key:"addBackgroundToDataLabel",value:function(i,n){var a=this.w,l=a.config.dataLabels.background,d=l.padding,u=l.padding/2,h=n.width,g=n.height,x=new X(this.ctx).drawRect(n.x-d,n.y-u/2,h+2*d,g+u,l.borderRadius,a.config.chart.background==="transparent"?"#fff":a.config.chart.background,l.opacity,l.borderWidth,l.borderColor);return l.dropShadow.enabled&&new ee(this.ctx).dropShadow(x,l.dropShadow),x}},{key:"dataLabelsBackground",value:function(){var i=this.w;if(i.config.chart.type!=="bubble")for(var n=i.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),a=0;a0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],l=this.w,d=_.clone(l.globals.initialSeries);l.globals.previousPaths=[],a?(l.globals.collapsedSeries=[],l.globals.ancillaryCollapsedSeries=[],l.globals.collapsedSeriesIndices=[],l.globals.ancillaryCollapsedSeriesIndices=[]):d=this.emptyCollapsedSeries(d),l.config.series=d,i&&(n&&(l.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(d,l.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(i){for(var n=this.w,a=0;a-1&&(i[a].data=[]);return i}},{key:"toggleSeriesOnHover",value:function(i,n){var a=this.w;n||(n=i.target);var l=a.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if(i.type==="mousemove"){var d=parseInt(n.getAttribute("rel"),10)-1,u=null,h=null;a.globals.axisCharts||a.config.chart.type==="radialBar"?a.globals.axisCharts?(u=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(d,"']")),h=a.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(d,"']"))):u=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(d+1,"']")):u=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(d+1,"'] path"));for(var g=0;g=g.from&&y<=g.to&&d[x].classList.remove(a.legendInactiveClass)}}(l.config.plotOptions.heatmap.colorScale.ranges[h])}else i.type==="mouseout"&&u("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"asc",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=this.w,l=0;if(a.config.series.length>1){for(var d=a.config.series.map(function(h,g){return h.data&&h.data.length>0&&a.globals.collapsedSeriesIndices.indexOf(g)===-1&&(!a.globals.comboCharts||n.length===0||n.length&&n.indexOf(a.config.series[g].type)>-1)?g:-1}),u=i==="asc"?0:d.length-1;i==="asc"?u=0;i==="asc"?u++:u--)if(d[u]!==-1){l=d[u];break}}return l}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(i,n){return i.type==="bar"||i.type==="column"?n:-1}).filter(function(i){return i!==-1}):this.w.config.series.map(function(i,n){return n})}},{key:"getPreviousPaths",value:function(){var i=this.w;function n(u,h,g){for(var x=u[h].childNodes,y={type:g,paths:[],realIndex:u[h].getAttribute("data:realIndex")},b=0;b0)for(var l=function(u){for(var h=i.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(i.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(u,"'] rect")),g=[],x=function(b){var w=function(j){return h[b].getAttribute(j)},S={x:parseFloat(w("x")),y:parseFloat(w("y")),width:parseFloat(w("width")),height:parseFloat(w("height"))};g.push({rect:S,color:h[b].getAttribute("color")})},y=0;y0)for(var l=0;l0?n:[]});return i}}]),O}(),Nt=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new q(this.ctx)}return v(O,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var i=this.w.config.series.slice(),n=new Me(this.ctx);if(this.activeSeriesIndex=n.getActiveConfigSeriesIndex(),i[this.activeSeriesIndex].data!==void 0&&i[this.activeSeriesIndex].data.length>0&&i[this.activeSeriesIndex].data[0]!==null&&i[this.activeSeriesIndex].data[0].x!==void 0&&i[this.activeSeriesIndex].data[0]!==null)return!0}},{key:"isFormat2DArray",value:function(){var i=this.w.config.series.slice(),n=new Me(this.ctx);if(this.activeSeriesIndex=n.getActiveConfigSeriesIndex(),i[this.activeSeriesIndex].data!==void 0&&i[this.activeSeriesIndex].data.length>0&&i[this.activeSeriesIndex].data[0]!==void 0&&i[this.activeSeriesIndex].data[0]!==null&&i[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(i,n){for(var a=this.w.config,l=this.w.globals,d=a.chart.type==="boxPlot"||a.series[n].type==="boxPlot",u=0;u=5?this.twoDSeries.push(_.parseNumber(i[n].data[u][4])):this.twoDSeries.push(_.parseNumber(i[n].data[u][1])),l.dataFormatXNumeric=!0),a.xaxis.type==="datetime"){var h=new Date(i[n].data[u][0]);h=new Date(h).getTime(),this.twoDSeriesX.push(h)}else this.twoDSeriesX.push(i[n].data[u][0]);for(var g=0;g-1&&(u=this.activeSeriesIndex);for(var h=0;h1&&arguments[1]!==void 0?arguments[1]:this.ctx,d=this.w.config,u=this.w.globals,h=new Re(l),g=d.labels.length>0?d.labels.slice():d.xaxis.categories.slice();if(u.isRangeBar=d.chart.type==="rangeBar"&&u.isBarHorizontal,u.hasXaxisGroups=d.xaxis.type==="category"&&d.xaxis.group.groups.length>0,u.hasXaxisGroups&&(u.groups=d.xaxis.group.groups),u.hasSeriesGroups=(n=i[0])===null||n===void 0?void 0:n.group,u.hasSeriesGroups){var x=[],y=D(new Set(i.map(function(j){return j.group})));i.forEach(function(j,E){var T=y.indexOf(j.group);x[T]||(x[T]=[]),x[T].push(j.name)}),u.seriesGroups=x}for(var b=function(){for(var j=0;j0&&(this.twoDSeriesX=g,u.seriesX.push(this.twoDSeriesX))),u.labels.push(this.twoDSeriesX);var S=i[w].data.map(function(j){return _.parseNumber(j)});u.series.push(S)}u.seriesZ.push(this.threeDSeries),i[w].name!==void 0?u.seriesNames.push(i[w].name):u.seriesNames.push("series-"+parseInt(w+1,10)),i[w].color!==void 0?u.seriesColors.push(i[w].color):u.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(i){var n=this.w.globals,a=this.w.config;n.series=i.slice(),n.seriesNames=a.labels.slice();for(var l=0;l0?a.labels=n.xaxis.categories:n.labels.length>0?a.labels=n.labels.slice():this.fallbackToCategory?(a.labels=a.labels[0],a.seriesRange.length&&(a.seriesRange.map(function(l){l.forEach(function(d){a.labels.indexOf(d.x)<0&&d.x&&a.labels.push(d.x)})}),a.labels=Array.from(new Set(a.labels.map(JSON.stringify)),JSON.parse)),n.xaxis.convertedCatToNumeric&&(new le(n).convertCatToNumericXaxis(n,this.ctx,a.seriesX[0]),this._generateExternalLabels(i))):this._generateExternalLabels(i)}},{key:"_generateExternalLabels",value:function(i){var n=this.w.globals,a=this.w.config,l=[];if(n.axisCharts){if(n.series.length>0)if(this.isFormatXY())for(var d=a.series.map(function(b,w){return b.data.filter(function(S,j,E){return E.findIndex(function(T){return T.x===S.x})===j})}),u=d.reduce(function(b,w,S,j){return j[b].length>w.length?b:S},0),h=0;h0&&d==a.length&&n.push(l)}),i.globals.ignoreYAxisIndexes=n.map(function(a){return a})}}]),O}(),hr=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"getLabel",value:function(i,n,a,l){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"12px",h=!(arguments.length>6&&arguments[6]!==void 0)||arguments[6],g=this.w,x=i[l]===void 0?"":i[l],y=x,b=g.globals.xLabelFormatter,w=g.config.xaxis.labels.formatter,S=!1,j=new qe(this.ctx),E=x;h&&(y=j.xLabelFormat(b,x,E,{i:l,dateFormatter:new Re(this.ctx).formatDate,w:g}),w!==void 0&&(y=w(x,i[l],{i:l,dateFormatter:new Re(this.ctx).formatDate,w:g})));var T,I;n.length>0?(T=n[l].unit,I=null,n.forEach(function(N){N.unit==="month"?I="year":N.unit==="day"?I="month":N.unit==="hour"?I="day":N.unit==="minute"&&(I="hour")}),S=I===T,a=n[l].position,y=n[l].value):g.config.xaxis.type==="datetime"&&w===void 0&&(y=""),y===void 0&&(y=""),y=Array.isArray(y)?y:y.toString();var F=new X(this.ctx),m={};m=g.globals.rotateXLabels&&h?F.getTextRects(y,parseInt(u,10),null,"rotate(".concat(g.config.xaxis.labels.rotate," 0 0)"),!1):F.getTextRects(y,parseInt(u,10));var k=!g.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(y)&&(String(y)==="NaN"||d.indexOf(y)>=0&&k)&&(y=""),{x:a,text:y,textRect:m,isBold:S}}},{key:"checkLabelBasedOnTickamount",value:function(i,n,a){var l=this.w,d=l.config.xaxis.tickAmount;return d==="dataPoints"&&(d=Math.round(l.globals.gridWidth/120)),d>a||i%Math.round(a/(d+1))==0||(n.text=""),n}},{key:"checkForOverflowingLabels",value:function(i,n,a,l,d){var u=this.w;if(i===0&&u.globals.skipFirstTimelinelabel&&(n.text=""),i===a-1&&u.globals.skipLastTimelinelabel&&(n.text=""),u.config.xaxis.labels.hideOverlappingLabels&&l.length>0){var h=d[d.length-1];n.x0){g.config.yaxis[d].opposite===!0&&(i+=l.width);for(var b=n;b>=0;b--){var w=y+n/10+g.config.yaxis[d].labels.offsetY-1;g.globals.isBarHorizontal&&(w=u*b),g.config.chart.type==="heatmap"&&(w+=u/2);var S=x.drawLine(i+a.offsetX-l.width+l.offsetX,w+l.offsetY,i+a.offsetX+l.offsetX,w+l.offsetY,l.color);h.add(S),y+=u}}}}]),O}(),os=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"scaleSvgNode",value:function(i,n){var a=parseFloat(i.getAttributeNS(null,"width")),l=parseFloat(i.getAttributeNS(null,"height"));i.setAttributeNS(null,"width",a*n),i.setAttributeNS(null,"height",l*n),i.setAttributeNS(null,"viewBox","0 0 "+a+" "+l)}},{key:"fixSvgStringForIe11",value:function(i){if(!_.isIE11())return i.replace(/ /g," ");var n=0,a=i.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,function(l){return++n===2?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':l});return a=(a=a.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(i){i==null&&(i=1);var n=this.w.globals.dom.Paper.svg();if(i!==1){var a=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(a,i),n=new XMLSerializer().serializeToString(a)}return this.fixSvgStringForIe11(n)}},{key:"cleanup",value:function(){var i=this.w,n=i.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),a=i.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),l=i.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(l,function(d){d.setAttribute("width",0)}),n&&n[0]&&(n[0].setAttribute("x",-500),n[0].setAttribute("x1",-500),n[0].setAttribute("x2",-500)),a&&a[0]&&(a[0].setAttribute("y",-100),a[0].setAttribute("y1",-100),a[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var i=this.getSvgString(),n=new Blob([i],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(n)}},{key:"dataURI",value:function(i){var n=this;return new Promise(function(a){var l=n.w,d=i?i.scale||i.width/l.globals.svgWidth:1;n.cleanup();var u=document.createElement("canvas");u.width=l.globals.svgWidth*d,u.height=parseInt(l.globals.dom.elWrap.style.height,10)*d;var h=l.config.chart.background==="transparent"?"#fff":l.config.chart.background,g=u.getContext("2d");g.fillStyle=h,g.fillRect(0,0,u.width*d,u.height*d);var x=n.getSvgString(d);if(window.canvg&&_.isIE11()){var y=window.canvg.Canvg.fromString(g,x,{ignoreClear:!0,ignoreDimensions:!0});y.start();var b=u.msToBlob();y.stop(),a({blob:b})}else{var w="data:image/svg+xml,"+encodeURIComponent(x),S=new Image;S.crossOrigin="anonymous",S.onload=function(){if(g.drawImage(S,0,0),u.msToBlob){var j=u.msToBlob();a({blob:j})}else{var E=u.toDataURL("image/png");a({imgURI:E})}},S.src=w}})}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var i=this;this.dataURI().then(function(n){var a=n.imgURI,l=n.blob;l?navigator.msSaveOrOpenBlob(l,i.w.globals.chartID+".png"):i.triggerDownload(a,i.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(i){var n=this,a=i.series,l=i.fileName,d=i.columnDelimiter,u=d===void 0?",":d,h=i.lineDelimiter,g=h===void 0?` -`:h,x=this.w;a||(a=x.config.series);var y,b,w=[],S=[],j="",E=x.globals.series.map(function(R,z){return x.globals.collapsedSeriesIndices.indexOf(z)===-1?R:[]}),T=function(R){return x.config.xaxis.type==="datetime"&&String(R).length>=10},I=Math.max.apply(Math,D(a.map(function(R){return R.data?R.data.length:0}))),F=new Nt(this.ctx),m=new hr(this.ctx),k=function(R){var z="";if(x.globals.axisCharts){if(x.config.xaxis.type==="category"||x.config.xaxis.convertedCatToNumeric)if(x.globals.isBarHorizontal){var $=x.globals.yLabelFormatters[0],Y=new Me(n.ctx).getActiveConfigSeriesIndex();z=$(x.globals.labels[R],{seriesIndex:Y,dataPointIndex:R,w:x})}else z=m.getLabel(x.globals.labels,x.globals.timescaleLabels,0,R).text;x.config.xaxis.type==="datetime"&&(x.config.xaxis.categories.length?z=x.config.xaxis.categories[R]:x.config.labels.length&&(z=x.config.labels[R]))}else z=x.config.labels[R];return Array.isArray(z)&&(z=z.join(" ")),_.isNumber(z)?z:z.split(u).join("")},N=function(R,z){if(w.length&&z===0&&S.push(w.join(u)),R.data){R.data=R.data.length&&R.data||D(Array(I)).map(function(){return""});for(var $=0;$0&&!a.globals.isBarHorizontal&&(this.xaxisLabels=a.globals.timescaleLabels.slice()),a.config.xaxis.overwriteCategories&&(this.xaxisLabels=a.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],a.config.xaxis.position==="top"?this.offY=0:this.offY=a.globals.gridHeight+1,this.offY=this.offY+a.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=a.config.chart.type==="bar"&&a.config.plotOptions.bar.horizontal,this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.xaxisBorderWidth=a.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=a.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=a.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=a.config.xaxis.axisBorder.height,this.yaxis=a.config.yaxis[0]}return v(O,[{key:"drawXaxis",value:function(){var i=this.w,n=new X(this.ctx),a=n.group({class:"apexcharts-xaxis",transform:"translate(".concat(i.config.xaxis.offsetX,", ").concat(i.config.xaxis.offsetY,")")}),l=n.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(i.globals.translateXAxisX,", ").concat(i.globals.translateXAxisY,")")});a.add(l);for(var d=[],u=0;u6&&arguments[6]!==void 0?arguments[6]:{},y=[],b=[],w=this.w,S=x.xaxisFontSize||this.xaxisFontSize,j=x.xaxisFontFamily||this.xaxisFontFamily,E=x.xaxisForeColors||this.xaxisForeColors,T=x.fontWeight||w.config.xaxis.labels.style.fontWeight,I=x.cssClass||w.config.xaxis.labels.style.cssClass,F=w.globals.padHorizontal,m=l.length,k=w.config.xaxis.type==="category"?w.globals.dataPoints:m;if(k===0&&m>k&&(k=m),d){var N=k>1?k-1:k;h=w.globals.gridWidth/Math.min(N,m-1),F=F+u(0,h)/2+w.config.xaxis.labels.offsetX}else h=w.globals.gridWidth/k,F=F+u(0,h)+w.config.xaxis.labels.offsetX;for(var R=function($){var Y=F-u($,h)/2+w.config.xaxis.labels.offsetX;$===0&&m===1&&h/2===F&&k===1&&(Y=w.globals.gridWidth/2);var U=g.axesUtils.getLabel(l,w.globals.timescaleLabels,Y,$,y,S,i),te=28;if(w.globals.rotateXLabels&&i&&(te=22),w.config.xaxis.title.text&&w.config.xaxis.position==="top"&&(te+=parseFloat(w.config.xaxis.title.style.fontSize)+2),i||(te=te+parseFloat(S)+(w.globals.xAxisLabelsHeight-w.globals.xAxisGroupLabelsHeight)+(w.globals.rotateXLabels?10:0)),U=w.config.xaxis.tickAmount!==void 0&&w.config.xaxis.tickAmount!=="dataPoints"&&w.config.xaxis.type!=="datetime"?g.axesUtils.checkLabelBasedOnTickamount($,U,m):g.axesUtils.checkForOverflowingLabels($,U,m,y,b),w.config.xaxis.labels.show){var ne=n.drawText({x:U.x,y:g.offY+w.config.xaxis.labels.offsetY+te-(w.config.xaxis.position==="top"?w.globals.xAxisHeight+w.config.xaxis.axisTicks.height-2:0),text:U.text,textAnchor:"middle",fontWeight:U.isBold?600:T,fontSize:S,fontFamily:j,foreColor:Array.isArray(E)?i&&w.config.xaxis.convertedCatToNumeric?E[w.globals.minX+$-1]:E[$]:E,isPlainText:!1,cssClass:(i?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+I});if(a.add(ne),ne.on("click",function(ge){if(typeof w.config.chart.events.xAxisLabelClick=="function"){var be=Object.assign({},w,{labelIndex:$});w.config.chart.events.xAxisLabelClick(ge,g.ctx,be)}}),i){var ie=document.createElementNS(w.globals.SVGNS,"title");ie.textContent=Array.isArray(U.text)?U.text.join(" "):U.text,ne.node.appendChild(ie),U.text!==""&&(y.push(U.text),b.push(U))}}$l.globals.gridWidth)){var u=this.offY+l.config.xaxis.axisTicks.offsetY;if(n=n+u+l.config.xaxis.axisTicks.height,l.config.xaxis.position==="top"&&(n=u-l.config.xaxis.axisTicks.height),l.config.xaxis.axisTicks.show){var h=new X(this.ctx).drawLine(i+l.config.xaxis.axisTicks.offsetX,u+l.config.xaxis.offsetY,d+l.config.xaxis.axisTicks.offsetX,n+l.config.xaxis.offsetY,l.config.xaxis.axisTicks.color);a.add(h),h.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var i=this.w,n=[],a=this.xaxisLabels.length,l=i.globals.padHorizontal;if(i.globals.timescaleLabels.length>0)for(var d=0;d0){var y=d[d.length-1].getBBox(),b=d[0].getBBox();y.x<-20&&d[d.length-1].parentNode.removeChild(d[d.length-1]),b.x+b.width>i.globals.gridWidth&&!i.globals.isBarHorizontal&&d[0].parentNode.removeChild(d[0]);for(var w=0;w0&&(this.xaxisLabels=n.globals.timescaleLabels.slice())}return v(O,[{key:"drawGridArea",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w,a=new X(this.ctx);i===null&&(i=a.group({class:"apexcharts-grid"}));var l=a.drawLine(n.globals.padHorizontal,1,n.globals.padHorizontal,n.globals.gridHeight,"transparent"),d=a.drawLine(n.globals.padHorizontal,n.globals.gridHeight,n.globals.gridWidth,n.globals.gridHeight,"transparent");return i.add(d),i.add(l),i}},{key:"drawGrid",value:function(){var i=null;return this.w.globals.axisCharts&&(i=this.renderGrid(),this.drawGridArea(i.el)),i}},{key:"createGridMask",value:function(){var i=this.w,n=i.globals,a=new X(this.ctx),l=Array.isArray(i.config.stroke.width)?0:i.config.stroke.width;if(Array.isArray(i.config.stroke.width)){var d=0;i.config.stroke.width.forEach(function(b){d=Math.max(d,b)}),l=d}n.dom.elGridRectMask=document.createElementNS(n.SVGNS,"clipPath"),n.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(n.cuid)),n.dom.elGridRectMarkerMask=document.createElementNS(n.SVGNS,"clipPath"),n.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(n.cuid)),n.dom.elForecastMask=document.createElementNS(n.SVGNS,"clipPath"),n.dom.elForecastMask.setAttribute("id","forecastMask".concat(n.cuid)),n.dom.elNonForecastMask=document.createElementNS(n.SVGNS,"clipPath"),n.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(n.cuid));var u=i.config.chart.type,h=0,g=0;(u==="bar"||u==="rangeBar"||u==="candlestick"||u==="boxPlot"||i.globals.comboBarCount>0)&&i.globals.isXNumeric&&!i.globals.isBarHorizontal&&(h=i.config.grid.padding.left,g=i.config.grid.padding.right,n.barPadForNumericAxis>h&&(h=n.barPadForNumericAxis,g=n.barPadForNumericAxis)),n.dom.elGridRect=a.drawRect(-l-h-2,2*-l-2,n.gridWidth+l+g+h+4,n.gridHeight+4*l+4,0,"#fff");var x=i.globals.markers.largestSize+1;n.dom.elGridRectMarker=a.drawRect(2*-x,2*-x,n.gridWidth+4*x,n.gridHeight+4*x,0,"#fff"),n.dom.elGridRectMask.appendChild(n.dom.elGridRect.node),n.dom.elGridRectMarkerMask.appendChild(n.dom.elGridRectMarker.node);var y=n.dom.baseEl.querySelector("defs");y.appendChild(n.dom.elGridRectMask),y.appendChild(n.dom.elForecastMask),y.appendChild(n.dom.elNonForecastMask),y.appendChild(n.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(i){var n=i.i,a=i.x1,l=i.y1,d=i.x2,u=i.y2,h=i.xCount,g=i.parent,x=this.w;if(!(n===0&&x.globals.skipFirstTimelinelabel||n===h-1&&x.globals.skipLastTimelinelabel&&!x.config.xaxis.labels.formatter||x.config.chart.type==="radar")){x.config.grid.xaxis.lines.show&&this._drawGridLine({i:n,x1:a,y1:l,x2:d,y2:u,xCount:h,parent:g});var y=0;if(x.globals.hasXaxisGroups&&x.config.xaxis.tickPlacement==="between"){var b=x.globals.groups;if(b){for(var w=0,S=0;w0&&i.config.xaxis.type!=="datetime"&&(l=i.globals.yAxisScale[a].result.length-1)),this._drawXYLines({xCount:l,tickAmount:d})}else l=d,d=i.globals.xTickAmount,this._drawInvertedXYLines({xCount:l,tickAmount:d});return this.drawGridBands(l,d),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.globals.gridWidth/l}}},{key:"drawGridBands",value:function(i,n){var a=this.w;if(a.config.grid.row.colors!==void 0&&a.config.grid.row.colors.length>0)for(var l=0,d=a.globals.gridHeight/n,u=a.globals.gridWidth,h=0,g=0;h=a.config.grid.row.colors.length&&(g=0),this._drawGridBandRect({c:g,x1:0,y1:l,x2:u,y2:d,type:"row"}),l+=a.globals.gridHeight/n;if(a.config.grid.column.colors!==void 0&&a.config.grid.column.colors.length>0)for(var x=a.globals.isBarHorizontal||a.config.xaxis.tickPlacement!=="on"||a.config.xaxis.type!=="category"&&!a.config.xaxis.convertedCatToNumeric?i:i-1,y=a.globals.padHorizontal,b=a.globals.padHorizontal+a.globals.gridWidth/x,w=a.globals.gridHeight,S=0,j=0;S=a.config.grid.column.colors.length&&(j=0),this._drawGridBandRect({c:j,x1:y,y1:0,x2:b,y2:w,type:"column"}),y+=a.globals.gridWidth/x}}]),O}(),ca=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"niceScale",value:function(i,n){var a,l,d,u,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,g=1e-11,x=this.w,y=x.globals;y.isBarHorizontal?(a=x.config.xaxis,l=Math.max((y.svgWidth-100)/25,2)):(a=x.config.yaxis[h],l=Math.max((y.svgHeight-100)/15,2)),d=a.min!==void 0&&a.min!==null,u=a.max!==void 0&&a.min!==null;var b=a.stepSize!==void 0&&a.stepSize!==null,w=a.tickAmount!==void 0&&a.tickAmount!==null,S=w?a.tickAmount:a.forceNiceScale?y.niceScaleDefaultTicks[Math.min(Math.round(l/2),y.niceScaleDefaultTicks.length-1)]:10;if(y.isMultipleYAxis&&!w&&y.multiAxisTickAmount>0&&(S=y.multiAxisTickAmount,w=!0),S=S==="dataPoints"?y.dataPoints-1:Math.abs(Math.round(S)),(i===Number.MIN_VALUE&&n===0||!_.isNumber(i)&&!_.isNumber(n)||i===Number.MIN_VALUE&&n===-Number.MAX_VALUE)&&(i=0,n=S,y.allSeriesCollapsed=!1),i>n){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var j=n;n=i,i=j}else i===n&&(i=i===0?0:i-1,n=n===0?2:n+1);var E=[];S<1&&(S=1);var T=S,I=Math.abs(n-i);a.forceNiceScale&&(!d&&i>0&&i/I<.15&&(i=0,d=!0),!u&&n<0&&-n/I<.15&&(n=0,u=!0),I=Math.abs(n-i));var F=I/T,m=F,k=Math.floor(Math.log10(m)),N=Math.pow(10,k),R=Math.ceil(m/N);if(F=m=(R=y.niceScaleAllowedMagMsd[y.yValueDecimal===0?0:1][R])*N,y.isBarHorizontal&&a.stepSize&&a.type!=="datetime"?(F=a.stepSize,b=!0):b&&(F=a.stepSize),b&&a.forceNiceScale){var z=Math.floor(Math.log10(F));F*=Math.pow(10,k-z)}if(d&&u){var $=I/T;if(w)if(b)if(_.mod(I,F)!=0){var Y=_.getGCD(F,$);F=$/Y<10?Y:$}else _.mod(F,$)==0?F=$:($=F,w=!1);else F=$;else if(b)_.mod(I,F)==0?$=F:F=$;else if(_.mod(I,F)==0)$=F;else{$=I/(T=Math.ceil(I/F));var U=_.getGCD(I,F);I/Ul&&(i=n-F*S,i+=F*Math.floor((te-i)/F))}else d&&(n=w?i+F*T:F*Math.ceil(n/F));else if(w){var ne=F/(n-i>n?1:2),ie=ne*Math.floor(i/ne);Math.abs(ie-i)<=ne/2?n=(i=ie)+F*T:i=(n=ne*Math.ceil(n/ne))-F*T}else i=F*Math.floor(i/F),n=F*Math.ceil(n/F);I=Math.abs(n-i),F=_.getGCD(I,F),T=Math.round(I/F)}if(w||d||u||(T=Math.ceil((I-g)/(F+g)))>16&&_.getPrimeFactors(T).length<2&&T++,y.isMultipleYAxis&&y.multiAxisTickAmount==0&&(y.multiAxisTickAmount=T),T>l&&(!w&&!b||a.forceNiceScale)){var ge=_.getPrimeFactors(T),be=ge.length-1,Le=T;e:for(var Oe=0;OeOr);return{result:E,niceMin:E[0],niceMax:E[E.length-1]}}},{key:"linearScale",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,u=Math.abs(n-i);(a=this._adjustTicksForSmallRange(a,l,u))==="dataPoints"&&(a=this.w.globals.dataPoints-1),d||(d=u/a),a===Number.MAX_VALUE&&(a=5,d=1);for(var h=[],g=i;a>=0;)h.push(g),g+=d,a-=1;return{result:h,niceMin:h[0],niceMax:h[h.length-1]}}},{key:"logarithmicScaleNice",value:function(i,n,a){n<=0&&(n=Math.max(i,a)),i<=0&&(i=Math.min(n,a));for(var l=[],d=Math.ceil(Math.log(n)/Math.log(a)+1),u=Math.floor(Math.log(i)/Math.log(a));u5?(l.allSeriesCollapsed=!1,l.yAxisScale[i]=u.forceNiceScale?this.logarithmicScaleNice(n,a,u.logBase):this.logarithmicScale(n,a,u.logBase)):a!==-Number.MAX_VALUE&&_.isNumber(a)?(l.allSeriesCollapsed=!1,l.yAxisScale[i]=this.niceScale(n,a,i)):l.yAxisScale[i]=this.linearScale(0,10,10,i,d.yaxis[i].stepSize)}},{key:"setXScale",value:function(i,n){var a=this.w,l=a.globals,d=Math.abs(n-i);return n!==-Number.MAX_VALUE&&_.isNumber(n)?l.xAxisScale=this.linearScale(i,n,a.config.xaxis.tickAmount?a.config.xaxis.tickAmount:d<10&&d>1?d+1:10,0,a.config.xaxis.stepSize):l.xAxisScale=this.linearScale(0,10,10),l.xAxisScale}},{key:"setMultipleYScales",value:function(){var i=this.w.globals,n=this.w.config,a=i.minYArr,l=i.maxYArr,d=[],u=[],h=[];n.series.forEach(function(w,S){h.push(S),u.push(null)});var g,x=[];n.yaxis.forEach(function(w,S){if(w.seriesName){var j=[];Array.isArray(w.seriesName)?j=w.seriesName:j.push(w.seriesName),d[S]=[],j.forEach(function(E){n.series.forEach(function(T,I){if(T.name===E){d[S].push(I),u[I]=S;var F=h.indexOf(I);h.splice(F,1)}})})}else x.push(S)});for(var y=0;y=0;g--)a.splice(h[g],1);a.forEach(function(x,y){var b=Number.MAX_VALUE,w=-Number.MAX_VALUE;if(d.chart.stacked){for(var S=u.seriesX[x[0]].map(function(z){return Number.MIN_VALUE}),j=u.seriesX[x[0]].map(function(z){return Number.MIN_VALUE}),E=u.seriesX[x[0]].map(function(z){return Number.MIN_VALUE}),T=d.series[x[0]].type,I=0;I=0?j[m]+=k:E[m]+=k,S[m]+=k}}T==="bar"?(b=Math.min.apply(null,E),w=Math.max.apply(null,j)):(b=Math.min.apply(null,S),w=Math.max.apply(null,S))}else{for(var N=0;N1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-Number.MAX_VALUE,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,d=this.w.config,u=this.w.globals,h=-Number.MAX_VALUE,g=Number.MIN_VALUE;l===null&&(l=i+1);var x=0,y=0,b=void 0;if(u.seriesX.length>=l){var w,S;x=0,y=(b=D(new Set((w=[]).concat.apply(w,D(u.seriesX.slice(i,l)))))).length-1;var j=(S=u.brushSource)===null||S===void 0?void 0:S.w.config.chart.brush;if(d.chart.zoom.enabled&&d.chart.zoom.autoScaleYaxis||j!=null&&j.enabled&&j!=null&&j.autoScaleYaxis){if(d.xaxis.min)for(x=0;xx&&b[y]>=d.xaxis.max;y--);}}var E=u.series,T=E,I=E;d.chart.type==="candlestick"?(T=u.seriesCandleL,I=u.seriesCandleH):d.chart.type==="boxPlot"?(T=u.seriesCandleO,I=u.seriesCandleC):u.isRangeData&&(T=u.seriesRangeStart,I=u.seriesRangeEnd);for(var F=i;FT[F][k]&&T[F][k]<0&&(g=T[F][k])}else u.hasNullValues=!0}m!=="bar"&&m!=="column"||(g<0&&h<0&&(h=0,a=Math.max(a,0)),g===Number.MIN_VALUE&&(g=0,n=Math.min(n,0)))}return d.chart.type==="rangeBar"&&u.seriesRangeStart.length&&u.isBarHorizontal&&(g=n),d.chart.type==="bar"&&(g<0&&h<0&&(h=0),g===Number.MIN_VALUE&&(g=0)),{minY:g,maxY:h,lowestY:n,highestY:a}}},{key:"setYRange",value:function(){var i=this.w.globals,n=this.w.config;i.maxY=-Number.MAX_VALUE,i.minY=Number.MIN_VALUE;var a,l=Number.MAX_VALUE;if(i.isMultipleYAxis){l=Number.MAX_VALUE;for(var d=0;di.dataPoints&&i.dataPoints!==0&&(l=i.dataPoints-1)):n.xaxis.tickAmount==="dataPoints"?(i.series.length>1&&(l=i.series[i.maxValsInArrayIndex].length-1),i.isXNumeric&&(l=i.maxX-i.minX-1)):l=n.xaxis.tickAmount,i.xTickAmount=l,n.xaxis.max!==void 0&&typeof n.xaxis.max=="number"&&(i.maxX=n.xaxis.max),n.xaxis.min!==void 0&&typeof n.xaxis.min=="number"&&(i.minX=n.xaxis.min),n.xaxis.range!==void 0&&(i.minX=i.maxX-n.xaxis.range),i.minX!==Number.MAX_VALUE&&i.maxX!==-Number.MAX_VALUE)if(n.xaxis.convertedCatToNumeric&&!i.dataFormatXNumeric){for(var d=[],u=i.minX-1;u0&&(i.xAxisScale=this.scales.linearScale(1,i.labels.length,l-1,0,n.xaxis.stepSize),i.seriesX=i.labels.slice());a&&(i.labels=i.xAxisScale.result.slice())}return i.isBarHorizontal&&i.labels.length&&(i.xTickAmount=i.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:i.minX,maxX:i.maxX}}},{key:"setZRange",value:function(){var i=this.w.globals;if(i.isDataXYZ){for(var n=0;n0){var h=d-l[u-1];h>0&&(i.minXDiff=Math.min(h,i.minXDiff))}}),i.dataPoints!==1&&i.minXDiff!==Number.MAX_VALUE||(i.minXDiff=.5)})}},{key:"_setStackedMinMax",value:function(){var i=this,n=this.w.globals;if(n.series.length){var a=n.seriesGroups;a.length||(a=[this.w.config.series.map(function(u){return u.name})]);var l={},d={};a.forEach(function(u){l[u]=[],d[u]=[],i.w.config.series.map(function(h,g){return u.indexOf(h.name)>-1?g:null}).filter(function(h){return h!==null}).forEach(function(h){for(var g=0;g0?l[u][g]+=parseFloat(n.series[h][g])+1e-4:d[u][g]+=parseFloat(n.series[h][g]))}})}),Object.entries(l).forEach(function(u){var h=H(u,1)[0];l[h].forEach(function(g,x){n.maxY=Math.max(n.maxY,l[h][x]),n.minY=Math.min(n.minY,d[h][x])})})}}}]),O}(),Go=function(){function O(i,n){c(this,O),this.ctx=i,this.elgrid=n,this.w=i.w;var a=this.w;this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.axisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=a.config.chart.type==="bar"&&a.config.plotOptions.bar.horizontal,this.xAxisoffX=0,a.config.xaxis.position==="bottom"&&(this.xAxisoffX=a.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new hr(i)}return v(O,[{key:"drawYaxis",value:function(i){var n=this,a=this.w,l=new X(this.ctx),d=a.config.yaxis[i].labels.style,u=d.fontSize,h=d.fontFamily,g=d.fontWeight,x=l.group({class:"apexcharts-yaxis",rel:i,transform:"translate("+a.globals.translateYAxisX[i]+", 0)"});if(this.axesUtils.isYAxisHidden(i))return x;var y=l.group({class:"apexcharts-yaxis-texts-g"});x.add(y);var b=a.globals.yAxisScale[i].result.length-1,w=a.globals.gridHeight/b,S=a.globals.translateY,j=a.globals.yLabelFormatters[i],E=a.globals.yAxisScale[i].result.slice();E=this.axesUtils.checkForReversedLabels(i,E);var T="";if(a.config.yaxis[i].labels.show)for(var I=function(Y){var U=E[Y];U=j(U,Y,a);var te=a.config.yaxis[i].labels.padding;a.config.yaxis[i].opposite&&a.config.yaxis.length!==0&&(te*=-1);var ne="end";a.config.yaxis[i].opposite&&(ne="start"),a.config.yaxis[i].labels.align==="left"?ne="start":a.config.yaxis[i].labels.align==="center"?ne="middle":a.config.yaxis[i].labels.align==="right"&&(ne="end");var ie=n.axesUtils.getYAxisForeColor(d.colors,i),ge=a.config.yaxis[i].labels.offsetY;a.config.chart.type==="heatmap"&&(ge-=(a.globals.gridHeight/a.globals.series.length-1)/2);var be=l.drawText({x:te,y:S+b/10+ge+1,text:U,textAnchor:ne,fontSize:u,fontFamily:h,fontWeight:g,maxWidth:a.config.yaxis[i].labels.maxWidth,foreColor:Array.isArray(ie)?ie[Y]:ie,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+d.cssClass});Y===b&&(T=be),y.add(be);var Le=document.createElementNS(a.globals.SVGNS,"title");if(Le.textContent=Array.isArray(U)?U.join(" "):U,be.node.appendChild(Le),a.config.yaxis[i].labels.rotate!==0){var Oe=l.rotateAroundCenter(T.node),Ve=l.rotateAroundCenter(be.node);be.node.setAttribute("transform","rotate(".concat(a.config.yaxis[i].labels.rotate," ").concat(Oe.x," ").concat(Ve.y,")"))}S+=w},F=b;F>=0;F--)I(F);if(a.config.yaxis[i].title.text!==void 0){var m=l.group({class:"apexcharts-yaxis-title"}),k=0;a.config.yaxis[i].opposite&&(k=a.globals.translateYAxisX[i]);var N=l.drawText({x:k,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+a.config.yaxis[i].title.style.cssClass});m.add(N),x.add(m)}var R=a.config.yaxis[i].axisBorder,z=31+R.offsetX;if(a.config.yaxis[i].opposite&&(z=-31-R.offsetX),R.show){var $=l.drawLine(z,a.globals.translateY+R.offsetY-2,z,a.globals.gridHeight+a.globals.translateY+R.offsetY+2,R.color,0,R.width);x.add($)}return a.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(z,b,R,a.config.yaxis[i].axisTicks,i,w,x),x}},{key:"drawYaxisInversed",value:function(i){var n=this.w,a=new X(this.ctx),l=a.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),d=a.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(n.globals.translateXAxisX,", ").concat(n.globals.translateXAxisY,")")});l.add(d);var u=n.globals.yAxisScale[i].result.length-1,h=n.globals.gridWidth/u+.1,g=h+n.config.xaxis.labels.offsetX,x=n.globals.xLabelFormatter,y=n.globals.yAxisScale[i].result.slice(),b=n.globals.timescaleLabels;b.length>0&&(this.xaxisLabels=b.slice(),u=(y=b.slice()).length),y=this.axesUtils.checkForReversedLabels(i,y);var w=b.length;if(n.config.xaxis.labels.show)for(var S=w?0:u;w?S=0;w?S++:S--){var j=y[S];j=x(j,S,n);var E=n.globals.gridWidth+n.globals.padHorizontal-(g-h+n.config.xaxis.labels.offsetX);if(b.length){var T=this.axesUtils.getLabel(y,b,E,S,this.drawnLabels,this.xaxisFontSize);E=T.x,j=T.text,this.drawnLabels.push(T.text),S===0&&n.globals.skipFirstTimelinelabel&&(j=""),S===y.length-1&&n.globals.skipLastTimelinelabel&&(j="")}var I=a.drawText({x:E,y:this.xAxisoffX+n.config.xaxis.labels.offsetY+30-(n.config.xaxis.position==="top"?n.globals.xAxisHeight+n.config.xaxis.axisTicks.height-2:0),text:j,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[i]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:n.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+n.config.xaxis.labels.style.cssClass});d.add(I),I.tspan(j);var F=document.createElementNS(n.globals.SVGNS,"title");F.textContent=j,I.node.appendChild(F),g+=h}return this.inversedYAxisTitleText(l),this.inversedYAxisBorder(l),l}},{key:"inversedYAxisBorder",value:function(i){var n=this.w,a=new X(this.ctx),l=n.config.xaxis.axisBorder;if(l.show){var d=0;n.config.chart.type==="bar"&&n.globals.isXNumeric&&(d-=15);var u=a.drawLine(n.globals.padHorizontal+d+l.offsetX,this.xAxisoffX,n.globals.gridWidth,this.xAxisoffX,l.color,0,l.height);this.elgrid&&this.elgrid.elGridBorders&&n.config.grid.show?this.elgrid.elGridBorders.add(u):i.add(u)}}},{key:"inversedYAxisTitleText",value:function(i){var n=this.w,a=new X(this.ctx);if(n.config.xaxis.title.text!==void 0){var l=a.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),d=a.drawText({x:n.globals.gridWidth/2+n.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(n.config.xaxis.title.style.fontSize)+n.config.xaxis.title.offsetY+20,text:n.config.xaxis.title.text,textAnchor:"middle",fontSize:n.config.xaxis.title.style.fontSize,fontFamily:n.config.xaxis.title.style.fontFamily,fontWeight:n.config.xaxis.title.style.fontWeight,foreColor:n.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+n.config.xaxis.title.style.cssClass});l.add(d),i.add(l)}}},{key:"yAxisTitleRotate",value:function(i,n){var a=this.w,l=new X(this.ctx),d={width:0,height:0},u={width:0,height:0},h=a.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g"));h!==null&&(d=h.getBoundingClientRect());var g=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-title text"));if(g!==null&&(u=g.getBoundingClientRect()),g!==null){var x=this.xPaddingForYAxisTitle(i,d,u,n);g.setAttribute("x",x.xPos-(n?10:0))}if(g!==null){var y=l.rotateAroundCenter(g);g.setAttribute("transform","rotate(".concat(n?-1*a.config.yaxis[i].title.rotate:a.config.yaxis[i].title.rotate," ").concat(y.x," ").concat(y.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(i,n,a,l){var d=this.w,u=0,h=0,g=10;return d.config.yaxis[i].title.text===void 0||i<0?{xPos:h,padd:0}:(l?(h=n.width+d.config.yaxis[i].title.offsetX+a.width/2+g/2,(u+=1)===0&&(h-=g/2)):(h=-1*n.width+d.config.yaxis[i].title.offsetX+g/2+a.width/2,d.globals.isBarHorizontal&&(g=25,h=-1*n.width-d.config.yaxis[i].title.offsetX-g)),{xPos:h,padd:g})}},{key:"setYAxisXPosition",value:function(i,n){var a=this.w,l=0,d=0,u=18,h=1;a.config.yaxis.length>1&&(this.multipleYs=!0),a.config.yaxis.map(function(g,x){var y=a.globals.ignoreYAxisIndexes.indexOf(x)>-1||!g.show||g.floating||i[x].width===0,b=i[x].width+n[x].width;g.opposite?a.globals.isBarHorizontal?(d=a.globals.gridWidth+a.globals.translateX-1,a.globals.translateYAxisX[x]=d-g.labels.offsetX):(d=a.globals.gridWidth+a.globals.translateX+h,y||(h=h+b+20),a.globals.translateYAxisX[x]=d-g.labels.offsetX+20):(l=a.globals.translateX-u,y||(u=u+b+20),a.globals.translateYAxisX[x]=l+g.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var i=this.w,n=i.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(n=_.listToArray(n)).forEach(function(a,l){var d=i.config.yaxis[l];if(d&&!d.floating&&d.labels.align!==void 0){var u=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"'] .apexcharts-yaxis-texts-g")),h=i.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(l,"'] .apexcharts-yaxis-label"));h=_.listToArray(h);var g=u.getBoundingClientRect();d.labels.align==="left"?(h.forEach(function(x,y){x.setAttribute("text-anchor","start")}),d.opposite||u.setAttribute("transform","translate(-".concat(g.width,", 0)"))):d.labels.align==="center"?(h.forEach(function(x,y){x.setAttribute("text-anchor","middle")}),u.setAttribute("transform","translate(".concat(g.width/2*(d.opposite?1:-1),", 0)"))):d.labels.align==="right"&&(h.forEach(function(x,y){x.setAttribute("text-anchor","end")}),d.opposite&&u.setAttribute("transform","translate(".concat(g.width,", 0)")))}})}}]),O}(),P1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.documentEvent=_.bind(this.documentEvent,this)}return v(O,[{key:"addEventListener",value:function(i,n){var a=this.w;a.globals.events.hasOwnProperty(i)?a.globals.events[i].push(n):a.globals.events[i]=[n]}},{key:"removeEventListener",value:function(i,n){var a=this.w;if(a.globals.events.hasOwnProperty(i)){var l=a.globals.events[i].indexOf(n);l!==-1&&a.globals.events[i].splice(l,1)}}},{key:"fireEvent",value:function(i,n){var a=this.w;if(a.globals.events.hasOwnProperty(i)){n&&n.length||(n=[]);for(var l=a.globals.events[i],d=l.length,u=0;u0&&(n=this.w.config.chart.locales.concat(window.Apex.chart.locales));var a=n.filter(function(d){return d.name===i})[0];if(!a)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var l=_.extend(we,a);this.w.globals.locale=l.options}}]),O}(),Q=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"drawAxis",value:function(i,n){var a,l,d=this,u=this.w.globals,h=this.w.config,g=new Bi(this.ctx,n),x=new Go(this.ctx,n);u.axisCharts&&i!=="radar"&&(u.isBarHorizontal?(l=x.drawYaxisInversed(0),a=g.drawXaxisInversed(0),u.dom.elGraphical.add(a),u.dom.elGraphical.add(l)):(a=g.drawXaxis(),u.dom.elGraphical.add(a),h.yaxis.map(function(y,b){if(u.ignoreYAxisIndexes.indexOf(b)===-1&&(l=x.drawYaxis(b),u.dom.Paper.add(l),d.w.config.grid.position==="back")){var w=u.dom.Paper.children()[1];w.remove(),u.dom.Paper.add(w)}})))}}]),O}(),re=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"drawXCrosshairs",value:function(){var i=this.w,n=new X(this.ctx),a=new ee(this.ctx),l=i.config.xaxis.crosshairs.fill.gradient,d=i.config.xaxis.crosshairs.dropShadow,u=i.config.xaxis.crosshairs.fill.type,h=l.colorFrom,g=l.colorTo,x=l.opacityFrom,y=l.opacityTo,b=l.stops,w=d.enabled,S=d.left,j=d.top,E=d.blur,T=d.color,I=d.opacity,F=i.config.xaxis.crosshairs.fill.color;if(i.config.xaxis.crosshairs.show){u==="gradient"&&(F=n.drawGradient("vertical",h,g,x,y,null,b,null));var m=n.drawRect();i.config.xaxis.crosshairs.width===1&&(m=n.drawLine());var k=i.globals.gridHeight;(!_.isNumber(k)||k<0)&&(k=0);var N=i.config.xaxis.crosshairs.width;(!_.isNumber(N)||N<0)&&(N=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:k,width:N,height:k,fill:F,filter:"none","fill-opacity":i.config.xaxis.crosshairs.opacity,stroke:i.config.xaxis.crosshairs.stroke.color,"stroke-width":i.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":i.config.xaxis.crosshairs.stroke.dashArray}),w&&(m=a.dropShadow(m,{left:S,top:j,blur:E,color:T,opacity:I})),i.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var i=this.w,n=new X(this.ctx),a=i.config.yaxis[0].crosshairs,l=i.globals.barPadForNumericAxis;if(i.config.yaxis[0].crosshairs.show){var d=n.drawLine(-l,0,i.globals.gridWidth+l,0,a.stroke.color,a.stroke.dashArray,a.stroke.width);d.attr({class:"apexcharts-ycrosshairs"}),i.globals.dom.elGraphical.add(d)}var u=n.drawLine(-l,0,i.globals.gridWidth+l,0,a.stroke.color,0,0);u.attr({class:"apexcharts-ycrosshairs-hidden"}),i.globals.dom.elGraphical.add(u)}}]),O}(),se=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"checkResponsiveConfig",value:function(i){var n=this,a=this.w,l=a.config;if(l.responsive.length!==0){var d=l.responsive.slice();d.sort(function(x,y){return x.breakpoint>y.breakpoint?1:y.breakpoint>x.breakpoint?-1:0}).reverse();var u=new oe({}),h=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=d[0].breakpoint,b=window.innerWidth>0?window.innerWidth:screen.width;if(b>y){var w=q.extendArrayProps(u,a.globals.initialConfig,a);x=_.extend(w,x),x=_.extend(a.config,x),n.overrideResponsiveOptions(x)}else for(var S=0;S0&&typeof a.config.colors[0]=="function"&&(a.globals.colors=a.config.series.map(function(j,E){var T=a.config.colors[E];return T||(T=a.config.colors[0]),typeof T=="function"?(n.isColorFn=!0,T({value:a.globals.axisCharts?a.globals.series[E][0]?a.globals.series[E][0]:0:a.globals.series[E],seriesIndex:E,dataPointIndex:E,w:a})):T}))),a.globals.seriesColors.map(function(j,E){j&&(a.globals.colors[E]=j)}),a.config.theme.monochrome.enabled){var d=[],u=a.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(u=a.globals.series[0].length*a.globals.series.length);for(var h=a.config.theme.monochrome.color,g=1/(u/a.config.theme.monochrome.shadeIntensity),x=a.config.theme.monochrome.shadeTo,y=0,b=0;b2&&arguments[2]!==void 0?arguments[2]:null,l=this.w,d=n||l.globals.series.length;if(a===null&&(a=this.isBarDistributed||this.isHeatmapDistributed||l.config.chart.type==="heatmap"&&l.config.plotOptions.heatmap.colorScale.inverse),a&&l.globals.series.length&&(d=l.globals.series[l.globals.maxValsInArrayIndex].length*l.globals.series.length),i.lengthi.globals.svgWidth&&(this.dCtx.lgRect.width=i.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(i,n){var a=i;if(this.w.globals.isMultiLineX){var l=n.map(function(u,h){return Array.isArray(u)?u.length:1}),d=Math.max.apply(Math,D(l));a=n[l.indexOf(d)]}return a}}]),O}(),Pe=function(){function O(i){c(this,O),this.w=i.w,this.dCtx=i}return v(O,[{key:"getxAxisLabelsCoords",value:function(){var i,n=this.w,a=n.globals.labels.slice();if(n.config.xaxis.convertedCatToNumeric&&a.length===0&&(a=n.globals.categoryLabels),n.globals.timescaleLabels.length>0){var l=this.getxAxisTimeScaleLabelsCoords();i={width:l.width,height:l.height},n.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=n.config.legend.position!=="left"&&n.config.legend.position!=="right"||n.config.legend.floating?0:this.dCtx.lgRect.width;var d=n.globals.xLabelFormatter,u=_.getLargestStringFromArr(a),h=this.dCtx.dimHelpers.getLargestStringFromMultiArr(u,a);n.globals.isBarHorizontal&&(h=u=n.globals.yAxisScale[0].result.reduce(function(j,E){return j.length>E.length?j:E},0));var g=new qe(this.dCtx.ctx),x=u;u=g.xLabelFormat(d,u,x,{i:void 0,dateFormatter:new Re(this.dCtx.ctx).formatDate,w:n}),h=g.xLabelFormat(d,h,x,{i:void 0,dateFormatter:new Re(this.dCtx.ctx).formatDate,w:n}),(n.config.xaxis.convertedCatToNumeric&&u===void 0||String(u).trim()==="")&&(h=u="1");var y=new X(this.dCtx.ctx),b=y.getTextRects(u,n.config.xaxis.labels.style.fontSize),w=b;if(u!==h&&(w=y.getTextRects(h,n.config.xaxis.labels.style.fontSize)),(i={width:b.width>=w.width?b.width:w.width,height:b.height>=w.height?b.height:w.height}).width*a.length>n.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&n.config.xaxis.labels.rotate!==0||n.config.xaxis.labels.rotateAlways){if(!n.globals.isBarHorizontal){n.globals.rotateXLabels=!0;var S=function(j){return y.getTextRects(j,n.config.xaxis.labels.style.fontSize,n.config.xaxis.labels.style.fontFamily,"rotate(".concat(n.config.xaxis.labels.rotate," 0 0)"),!1)};b=S(u),u!==h&&(w=S(h)),i.height=(b.height>w.height?b.height:w.height)/1.5,i.width=b.width>w.width?b.width:w.width}}else n.globals.rotateXLabels=!1}return n.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var i,n=this.w;if(!n.globals.hasXaxisGroups)return{width:0,height:0};var a,l=((i=n.config.xaxis.group.style)===null||i===void 0?void 0:i.fontSize)||n.config.xaxis.labels.style.fontSize,d=n.globals.groups.map(function(b){return b.title}),u=_.getLargestStringFromArr(d),h=this.dCtx.dimHelpers.getLargestStringFromMultiArr(u,d),g=new X(this.dCtx.ctx),x=g.getTextRects(u,l),y=x;return u!==h&&(y=g.getTextRects(h,l)),a={width:x.width>=y.width?x.width:y.width,height:x.height>=y.height?x.height:y.height},n.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}},{key:"getxAxisTitleCoords",value:function(){var i=this.w,n=0,a=0;if(i.config.xaxis.title.text!==void 0){var l=new X(this.dCtx.ctx).getTextRects(i.config.xaxis.title.text,i.config.xaxis.title.style.fontSize);n=l.width,a=l.height}return{width:n,height:a}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var i,n=this.w;this.dCtx.timescaleLabels=n.globals.timescaleLabels.slice();var a=this.dCtx.timescaleLabels.map(function(d){return d.value}),l=a.reduce(function(d,u){return d===void 0?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):d.length>u.length?d:u},0);return 1.05*(i=new X(this.dCtx.ctx).getTextRects(l,n.config.xaxis.labels.style.fontSize)).width*a.length>n.globals.gridWidth&&n.config.xaxis.labels.rotate!==0&&(n.globals.overlappingXLabels=!0),i}},{key:"additionalPaddingXLabels",value:function(i){var n=this,a=this.w,l=a.globals,d=a.config,u=d.xaxis.type,h=i.width;l.skipLastTimelinelabel=!1,l.skipFirstTimelinelabel=!1;var g=a.config.yaxis[0].opposite&&a.globals.isBarHorizontal,x=function(y,b){d.yaxis.length>1&&function(w){return l.collapsedSeriesIndices.indexOf(w)!==-1}(b)||function(w){if(n.dCtx.timescaleLabels&&n.dCtx.timescaleLabels.length){var S=n.dCtx.timescaleLabels[0],j=n.dCtx.timescaleLabels[n.dCtx.timescaleLabels.length-1].position+h/1.75-n.dCtx.yAxisWidthRight,E=S.position-h/1.75+n.dCtx.yAxisWidthLeft,T=a.config.legend.position==="right"&&n.dCtx.lgRect.width>0?n.dCtx.lgRect.width:0;j>l.svgWidth-l.translateX-T&&(l.skipLastTimelinelabel=!0),E<-(w.show&&!w.floating||d.chart.type!=="bar"&&d.chart.type!=="candlestick"&&d.chart.type!=="rangeBar"&&d.chart.type!=="boxPlot"?10:h/1.75)&&(l.skipFirstTimelinelabel=!0)}else u==="datetime"?n.dCtx.gridPad.right((z=String(b(N,g)))===null||z===void 0?void 0:z.length)?k:N},w),j=S=b(S,g);if(S!==void 0&&S.length!==0||(S=x.niceMax),n.globals.isBarHorizontal){l=0;var E=n.globals.labels.slice();S=_.getLargestStringFromArr(E),S=b(S,{seriesIndex:h,dataPointIndex:-1,w:n}),j=i.dCtx.dimHelpers.getLargestStringFromMultiArr(S,E)}var T=new X(i.dCtx.ctx),I="rotate(".concat(u.labels.rotate," 0 0)"),F=T.getTextRects(S,u.labels.style.fontSize,u.labels.style.fontFamily,I,!1),m=F;S!==j&&(m=T.getTextRects(j,u.labels.style.fontSize,u.labels.style.fontFamily,I,!1)),a.push({width:(y>m.width||y>F.width?y:m.width>F.width?m.width:F.width)+l,height:m.height>F.height?m.height:F.height})}else a.push({width:0,height:0})}),a}},{key:"getyAxisTitleCoords",value:function(){var i=this,n=this.w,a=[];return n.config.yaxis.map(function(l,d){if(l.show&&l.title.text!==void 0){var u=new X(i.dCtx.ctx),h="rotate(".concat(l.title.rotate," 0 0)"),g=u.getTextRects(l.title.text,l.title.style.fontSize,l.title.style.fontFamily,h,!1);a.push({width:g.width,height:g.height})}else a.push({width:0,height:0})}),a}},{key:"getTotalYAxisWidth",value:function(){var i=this.w,n=0,a=0,l=0,d=i.globals.yAxisScale.length>1?10:0,u=new hr(this.dCtx.ctx),h=function(g,x){var y=i.config.yaxis[x].floating,b=0;g.width>0&&!y?(b=g.width+d,function(w){return i.globals.ignoreYAxisIndexes.indexOf(w)>-1}(x)&&(b=b-g.width-d)):b=y||u.isYAxisHidden(x)?0:5,i.config.yaxis[x].opposite?l+=b:a+=b,n+=b};return i.globals.yLabelsCoords.map(function(g,x){h(g,x)}),i.globals.yTitleCoords.map(function(g,x){h(g,x)}),i.globals.isBarHorizontal&&!i.config.yaxis[0].floating&&(n=i.globals.yLabelsCoords[0].width+i.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=a,this.dCtx.yAxisWidthRight=l,n}}]),O}(),wt=function(){function O(i){c(this,O),this.w=i.w,this.dCtx=i}return v(O,[{key:"gridPadForColumnsInNumericAxis",value:function(i){var n=this.w;if(n.globals.noData||n.globals.allSeriesCollapsed)return 0;var a=function(y){return y==="bar"||y==="rangeBar"||y==="candlestick"||y==="boxPlot"},l=n.config.chart.type,d=0,u=a(l)?n.config.series.length:1;if(n.globals.comboBarCount>0&&(u=n.globals.comboBarCount),n.globals.collapsedSeries.forEach(function(y){a(y.type)&&(u-=1)}),n.config.chart.stacked&&(u=1),(a(l)||n.globals.comboBarCount>0)&&n.globals.isXNumeric&&!n.globals.isBarHorizontal&&u>0){var h,g,x=Math.abs(n.globals.initialMaxX-n.globals.initialMinX);x<=3&&(x=n.globals.dataPoints),h=x/i,n.globals.minXDiff&&n.globals.minXDiff/h>0&&(g=n.globals.minXDiff/h),g>i/2&&(g/=2),(d=g*parseInt(n.config.plotOptions.bar.columnWidth,10)/100)<1&&(d=1),n.globals.barPadForNumericAxis=d}return d}},{key:"gridPadFortitleSubtitle",value:function(){var i=this,n=this.w,a=n.globals,l=this.dCtx.isSparkline||!n.globals.axisCharts?0:10;["title","subtitle"].forEach(function(h){n.config[h].text!==void 0?l+=n.config[h].margin:l+=i.dCtx.isSparkline||!n.globals.axisCharts?0:5}),!n.config.legend.show||n.config.legend.position!=="bottom"||n.config.legend.floating||n.globals.axisCharts||(l+=10);var d=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),u=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");a.gridHeight=a.gridHeight-d.height-u.height-l,a.translateY=a.translateY+d.height+u.height+l}},{key:"setGridXPosForDualYAxis",value:function(i,n){var a=this.w,l=new hr(this.dCtx.ctx);a.config.yaxis.map(function(d,u){a.globals.ignoreYAxisIndexes.indexOf(u)!==-1||d.floating||l.isYAxisHidden(u)||(d.opposite&&(a.globals.translateX=a.globals.translateX-(n[u].width+i[u].width)-parseInt(a.config.yaxis[u].labels.style.fontSize,10)/1.2-12),a.globals.translateX<2&&(a.globals.translateX=2))})}}]),O}(),Pt=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new fe(this),this.dimYAxis=new et(this),this.dimXAxis=new Pe(this),this.dimGrid=new wt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return v(O,[{key:"plotCoords",value:function(){var i=this,n=this.w,a=n.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&((n.config.markers.discrete.length>0||n.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(d){var u=H(d,2),h=u[0],g=u[1];i.gridPad[h]=Math.max(g,i.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(n.config.stroke.width/2,this.gridPad.top),this.gridPad.bottom=Math.max(n.config.stroke.width/2,this.gridPad.bottom)),a.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),a.gridHeight=a.gridHeight-this.gridPad.top-this.gridPad.bottom,a.gridWidth=a.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var l=this.dimGrid.gridPadForColumnsInNumericAxis(a.gridWidth);a.gridWidth=a.gridWidth-2*l,a.translateX=a.translateX+this.gridPad.left+this.xPadLeft+(l>0?l+4:0),a.translateY=a.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var i=this,n=this.w,a=n.globals,l=this.dimYAxis.getyAxisLabelsCoords(),d=this.dimYAxis.getyAxisTitleCoords();n.globals.yLabelsCoords=[],n.globals.yTitleCoords=[],n.config.yaxis.map(function(S,j){n.globals.yLabelsCoords.push({width:l[j].width,index:j}),n.globals.yTitleCoords.push({width:d[j].width,index:j})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var u=this.dimXAxis.getxAxisLabelsCoords(),h=this.dimXAxis.getxAxisGroupLabelsCoords(),g=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(u,g,h),a.translateXAxisY=n.globals.rotateXLabels?this.xAxisHeight/8:-4,a.translateXAxisX=n.globals.rotateXLabels&&n.globals.isXNumeric&&n.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,n.globals.isBarHorizontal&&(a.rotateXLabels=!1,a.translateXAxisY=parseInt(n.config.xaxis.labels.style.fontSize,10)/1.5*-1),a.translateXAxisY=a.translateXAxisY+n.config.xaxis.labels.offsetY,a.translateXAxisX=a.translateXAxisX+n.config.xaxis.labels.offsetX;var x=this.yAxisWidth,y=this.xAxisHeight;a.xAxisLabelsHeight=this.xAxisHeight-g.height,a.xAxisGroupLabelsHeight=a.xAxisLabelsHeight-u.height,a.xAxisLabelsWidth=this.xAxisWidth,a.xAxisHeight=this.xAxisHeight;var b=10;(n.config.chart.type==="radar"||this.isSparkline)&&(x=0,y=a.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||n.config.chart.type==="treemap")&&(x=0,y=0,b=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(u);var w=function(){a.translateX=x,a.gridHeight=a.svgHeight-i.lgRect.height-y-(i.isSparkline||n.config.chart.type==="treemap"?0:n.globals.rotateXLabels?10:15),a.gridWidth=a.svgWidth-x};switch(n.config.xaxis.position==="top"&&(b=a.xAxisHeight-n.config.xaxis.axisTicks.height-5),n.config.legend.position){case"bottom":a.translateY=b,w();break;case"top":a.translateY=this.lgRect.height+b,w();break;case"left":a.translateY=b,a.translateX=this.lgRect.width+x,a.gridHeight=a.svgHeight-y-12,a.gridWidth=a.svgWidth-this.lgRect.width-x;break;case"right":a.translateY=b,a.translateX=x,a.gridHeight=a.svgHeight-y-12,a.gridWidth=a.svgWidth-this.lgRect.width-x-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(d,l),new Go(this.ctx).setYAxisXPosition(l,d)}},{key:"setDimensionsForNonAxisCharts",value:function(){var i=this.w,n=i.globals,a=i.config,l=0;i.config.legend.show&&!i.config.legend.floating&&(l=20);var d=a.chart.type==="pie"||a.chart.type==="polarArea"||a.chart.type==="donut"?"pie":"radialBar",u=a.plotOptions[d].offsetY,h=a.plotOptions[d].offsetX;if(!a.legend.show||a.legend.floating)return n.gridHeight=n.svgHeight-a.grid.padding.left+a.grid.padding.right,n.gridWidth=n.gridHeight,n.translateY=u,void(n.translateX=h+(n.svgWidth-n.gridWidth)/2);switch(a.legend.position){case"bottom":n.gridHeight=n.svgHeight-this.lgRect.height-n.goldenPadding,n.gridWidth=n.svgWidth,n.translateY=u-10,n.translateX=h+(n.svgWidth-n.gridWidth)/2;break;case"top":n.gridHeight=n.svgHeight-this.lgRect.height-n.goldenPadding,n.gridWidth=n.svgWidth,n.translateY=this.lgRect.height+u+10,n.translateX=h+(n.svgWidth-n.gridWidth)/2;break;case"left":n.gridWidth=n.svgWidth-this.lgRect.width-l,n.gridHeight=a.chart.height!=="auto"?n.svgHeight:n.gridWidth,n.translateY=u,n.translateX=h+this.lgRect.width+l;break;case"right":n.gridWidth=n.svgWidth-this.lgRect.width-l-5,n.gridHeight=a.chart.height!=="auto"?n.svgHeight:n.gridWidth,n.translateY=u,n.translateX=h+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(i,n,a){var l=this.w,d=l.globals.hasXaxisGroups?2:1,u=a.height+i.height+n.height,h=l.globals.isMultiLineX?1.2:l.globals.LINE_HEIGHT_RATIO,g=l.globals.rotateXLabels?22:10,x=l.globals.rotateXLabels&&l.config.legend.position==="bottom"?10:0;this.xAxisHeight=u*h+d*g+x,this.xAxisWidth=i.width,this.xAxisHeight-n.height>l.config.xaxis.labels.maxHeight&&(this.xAxisHeight=l.config.xaxis.labels.maxHeight),l.config.xaxis.labels.minHeight&&this.xAxisHeightb&&(this.yAxisWidth=b)}}]),O}(),Vi=function(){function O(i){c(this,O),this.w=i.w,this.lgCtx=i}return v(O,[{key:"getLegendStyles",value:function(){var i,n,a,l=document.createElement("style");l.setAttribute("type","text/css");var d=((i=this.lgCtx.ctx)===null||i===void 0||(n=i.opts)===null||n===void 0||(a=n.chart)===null||a===void 0?void 0:a.nonce)||this.w.config.chart.nonce;d&&l.setAttribute("nonce",d);var u=document.createTextNode(` +
`):'
')+"
".concat(l[0],': ')+u+"
"+"
".concat(l[1],': ')+h+"
"+(g?"
".concat(l[2],': ')+g+"
":"")+"
".concat(l[3],': ')+x+"
"+"
".concat(l[4],': ')+y+"
"}}]),O}(),le=function(){function O(i){c(this,O),this.opts=i}return v(O,[{key:"init",value:function(i){var n=i.responsiveOverride,a=this.opts,l=new Ee,d=new ce(a);this.chartType=a.chart.type,a=this.extendYAxis(a),a=this.extendAnnotations(a);var u=l.init(),h={};if(a&&o(a)==="object"){var g,x,y,b,w,S,j,L,T={};T=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(a.chart.type)!==-1?d[a.chart.type]():d.line(),(g=a.plotOptions)!==null&&g!==void 0&&(x=g.bar)!==null&&x!==void 0&&x.isFunnel&&(T=d.funnel()),a.chart.stacked&&a.chart.type==="bar"&&(T=d.stackedBars()),(y=a.chart.brush)!==null&&y!==void 0&&y.enabled&&(T=d.brush(T)),a.chart.stacked&&a.chart.stackType==="100%"&&(a=d.stacked100(a)),(b=a.plotOptions)!==null&&b!==void 0&&(w=b.bar)!==null&&w!==void 0&&w.isDumbbell&&(a=d.dumbbell(a)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(a),a.xaxis=a.xaxis||window.Apex.xaxis||{},n||(a.xaxis.convertedCatToNumeric=!1),((S=(a=this.checkForCatToNumericXAxis(this.chartType,T,a)).chart.sparkline)!==null&&S!==void 0&&S.enabled||(j=window.Apex.chart)!==null&&j!==void 0&&(L=j.sparkline)!==null&&L!==void 0&&L.enabled)&&(T=d.sparkline(T)),h=_.extend(u,T)}var I=_.extend(h,window.Apex);return u=_.extend(I,a),u=this.handleUserInputErrors(u)}},{key:"checkForCatToNumericXAxis",value:function(i,n,a){var l,d,u=new ce(a),h=(i==="bar"||i==="boxPlot")&&((l=a.plotOptions)===null||l===void 0||(d=l.bar)===null||d===void 0?void 0:d.horizontal),g=i==="pie"||i==="polarArea"||i==="donut"||i==="radar"||i==="radialBar"||i==="heatmap",x=a.xaxis.type!=="datetime"&&a.xaxis.type!=="numeric",y=a.xaxis.tickPlacement?a.xaxis.tickPlacement:n.xaxis&&n.xaxis.tickPlacement;return h||g||!x||y==="between"||(a=u.convertCatToNumeric(a)),a}},{key:"extendYAxis",value:function(i,n){var a=new Ee;(i.yaxis===void 0||!i.yaxis||Array.isArray(i.yaxis)&&i.yaxis.length===0)&&(i.yaxis={}),i.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(i.yaxis=_.extend(i.yaxis,window.Apex.yaxis)),i.yaxis.constructor!==Array?i.yaxis=[_.extend(a.yAxis,i.yaxis)]:i.yaxis=_.extendArray(i.yaxis,a.yAxis);var l=!1;i.yaxis.forEach(function(u){u.logarithmic&&(l=!0)});var d=i.series;return n&&!d&&(d=n.config.series),l&&d.length!==i.yaxis.length&&d.length&&(i.yaxis=d.map(function(u,h){if(u.name||(d[h].name="series-".concat(h+1)),i.yaxis[h])return i.yaxis[h].seriesName=d[h].name,i.yaxis[h];var g=_.extend(a.yAxis,i.yaxis[0]);return g.show=!1,g})),l&&d.length>1&&d.length!==i.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),i}},{key:"extendAnnotations",value:function(i){return i.annotations===void 0&&(i.annotations={},i.annotations.yaxis=[],i.annotations.xaxis=[],i.annotations.points=[]),i=this.extendYAxisAnnotations(i),i=this.extendXAxisAnnotations(i),i=this.extendPointAnnotations(i)}},{key:"extendYAxisAnnotations",value:function(i){var n=new Ee;return i.annotations.yaxis=_.extendArray(i.annotations.yaxis!==void 0?i.annotations.yaxis:[],n.yAxisAnnotation),i}},{key:"extendXAxisAnnotations",value:function(i){var n=new Ee;return i.annotations.xaxis=_.extendArray(i.annotations.xaxis!==void 0?i.annotations.xaxis:[],n.xAxisAnnotation),i}},{key:"extendPointAnnotations",value:function(i){var n=new Ee;return i.annotations.points=_.extendArray(i.annotations.points!==void 0?i.annotations.points:[],n.pointAnnotation),i}},{key:"checkForDarkTheme",value:function(i){i.theme&&i.theme.mode==="dark"&&(i.tooltip||(i.tooltip={}),i.tooltip.theme!=="light"&&(i.tooltip.theme="dark"),i.chart.foreColor||(i.chart.foreColor="#f6f7f8"),i.chart.background||(i.chart.background="#424242"),i.theme.palette||(i.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(i){var n=i;if(n.tooltip.shared&&n.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(n.chart.type==="bar"&&n.plotOptions.bar.horizontal){if(n.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");n.yaxis[0].reversed&&(n.yaxis[0].opposite=!0),n.xaxis.tooltip.enabled=!1,n.yaxis[0].tooltip.enabled=!1,n.chart.zoom.enabled=!1}return n.chart.type!=="bar"&&n.chart.type!=="rangeBar"||n.tooltip.shared&&n.xaxis.crosshairs.width==="barWidth"&&n.series.length>1&&(n.xaxis.crosshairs.width="tickWidth"),n.chart.type!=="candlestick"&&n.chart.type!=="boxPlot"||n.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(n.chart.type," chart is not supported.")),n.yaxis[0].reversed=!1),n}}]),O}(),Ae=function(){function O(){c(this,O)}return v(O,[{key:"initGlobalVars",value:function(i){i.series=[],i.seriesCandleO=[],i.seriesCandleH=[],i.seriesCandleM=[],i.seriesCandleL=[],i.seriesCandleC=[],i.seriesRangeStart=[],i.seriesRangeEnd=[],i.seriesRange=[],i.seriesPercent=[],i.seriesGoals=[],i.seriesX=[],i.seriesZ=[],i.seriesNames=[],i.seriesTotals=[],i.seriesLog=[],i.seriesColors=[],i.stackedSeriesTotals=[],i.seriesXvalues=[],i.seriesYvalues=[],i.labels=[],i.hasXaxisGroups=!1,i.groups=[],i.hasSeriesGroups=!1,i.seriesGroups=[],i.categoryLabels=[],i.timescaleLabels=[],i.noLabelsProvided=!1,i.resizeTimer=null,i.selectionResizeTimer=null,i.delayedElements=[],i.pointsArray=[],i.dataLabelsRects=[],i.isXNumeric=!1,i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1,i.isDataXYZ=!1,i.isMultiLineX=!1,i.isMultipleYAxis=!1,i.maxY=-Number.MAX_VALUE,i.minY=Number.MIN_VALUE,i.minYArr=[],i.maxYArr=[],i.maxX=-Number.MAX_VALUE,i.minX=Number.MAX_VALUE,i.initialMaxX=-Number.MAX_VALUE,i.initialMinX=Number.MAX_VALUE,i.maxDate=0,i.minDate=Number.MAX_VALUE,i.minZ=Number.MAX_VALUE,i.maxZ=-Number.MAX_VALUE,i.minXDiff=Number.MAX_VALUE,i.yAxisScale=[],i.xAxisScale=null,i.xAxisTicksPositions=[],i.yLabelsCoords=[],i.yTitleCoords=[],i.barPadForNumericAxis=0,i.padHorizontal=0,i.xRange=0,i.yRange=[],i.zRange=0,i.dataPoints=0,i.xTickAmount=0,i.multiAxisTickAmount=0}},{key:"globalVars",value:function(i){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:i.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:i.chart.toolbar.autoSelected==="zoom"&&i.chart.toolbar.tools.zoom&&i.chart.zoom.enabled,panEnabled:i.chart.toolbar.autoSelected==="pan"&&i.chart.toolbar.tools.pan,selectionEnabled:i.chart.toolbar.autoSelected==="selection"&&i.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(i){var n=this.globalVars(i);return this.initGlobalVars(n),n.initialConfig=_.extend({},i),n.initialSeries=_.clone(i.series),n.lastXAxis=_.clone(n.initialConfig.xaxis),n.lastYAxis=_.clone(n.initialConfig.yaxis),n}}]),O}(),je=function(){function O(i){c(this,O),this.opts=i}return v(O,[{key:"init",value:function(){var i=new le(this.opts).init({responsiveOverride:!1});return{config:i,globals:new Ae().init(i)}}}]),O}(),ze=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.opts=null,this.seriesIndex=0}return v(O,[{key:"clippedImgArea",value:function(i){var n=this.w,a=n.config,l=parseInt(n.globals.gridWidth,10),d=parseInt(n.globals.gridHeight,10),u=l>d?l:d,h=i.image,g=0,x=0;i.width===void 0&&i.height===void 0?a.fill.image.width!==void 0&&a.fill.image.height!==void 0?(g=a.fill.image.width+1,x=a.fill.image.height):(g=u+1,x=u):(g=i.width,x=i.height);var y=document.createElementNS(n.globals.SVGNS,"pattern");X.setAttrs(y,{id:i.patternID,patternUnits:i.patternUnits?i.patternUnits:"userSpaceOnUse",width:g+"px",height:x+"px"});var b=document.createElementNS(n.globals.SVGNS,"image");y.appendChild(b),b.setAttributeNS(window.SVG.xlink,"href",h),X.setAttrs(b,{x:0,y:0,preserveAspectRatio:"none",width:g+"px",height:x+"px"}),b.style.opacity=i.opacity,n.globals.dom.elDefs.node.appendChild(y)}},{key:"getSeriesIndex",value:function(i){var n=this.w,a=n.config.chart.type;return(a==="bar"||a==="rangeBar")&&n.config.plotOptions.bar.distributed||a==="heatmap"||a==="treemap"?this.seriesIndex=i.seriesNumber:this.seriesIndex=i.seriesNumber%n.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(i){var n=this.w;this.opts=i;var a,l,d,u=this.w.config;this.seriesIndex=this.getSeriesIndex(i);var h=this.getFillColors()[this.seriesIndex];n.globals.seriesColors[this.seriesIndex]!==void 0&&(h=n.globals.seriesColors[this.seriesIndex]),typeof h=="function"&&(h=h({seriesIndex:this.seriesIndex,dataPointIndex:i.dataPointIndex,value:i.value,w:n}));var g=i.fillType?i.fillType:this.getFillType(this.seriesIndex),x=Array.isArray(u.fill.opacity)?u.fill.opacity[this.seriesIndex]:u.fill.opacity;i.color&&(h=i.color),h||(h="#fff",console.warn("undefined color - ApexCharts"));var y=h;if(h.indexOf("rgb")===-1?h.length<9&&(y=_.hexToRgba(h,x)):h.indexOf("rgba")>-1&&(x=_.getOpacityFromRGBA(h)),i.opacity&&(x=i.opacity),g==="pattern"&&(l=this.handlePatternFill({fillConfig:i.fillConfig,patternFill:l,fillColor:h,fillOpacity:x,defaultColor:y})),g==="gradient"&&(d=this.handleGradientFill({fillConfig:i.fillConfig,fillColor:h,fillOpacity:x,i:this.seriesIndex})),g==="image"){var b=u.fill.image.src,w=i.patternID?i.patternID:"";this.clippedImgArea({opacity:x,image:Array.isArray(b)?i.seriesNumber-1&&(S=_.getOpacityFromRGBA(w));var j=u.gradient.opacityTo===void 0?a:Array.isArray(u.gradient.opacityTo)?u.gradient.opacityTo[d]:u.gradient.opacityTo;if(u.gradient.gradientToColors===void 0||u.gradient.gradientToColors.length===0)h=u.gradient.shade==="dark"?y.shadeColor(-1*parseFloat(u.gradient.shadeIntensity),n.indexOf("rgb")>-1?_.rgb2hex(n):n):y.shadeColor(parseFloat(u.gradient.shadeIntensity),n.indexOf("rgb")>-1?_.rgb2hex(n):n);else if(u.gradient.gradientToColors[g.seriesNumber]){var L=u.gradient.gradientToColors[g.seriesNumber];h=L,L.indexOf("rgba")>-1&&(j=_.getOpacityFromRGBA(L))}else h=n;if(u.gradient.gradientFrom&&(w=u.gradient.gradientFrom),u.gradient.gradientTo&&(h=u.gradient.gradientTo),u.gradient.inverseColors){var T=w;w=h,h=T}return w.indexOf("rgb")>-1&&(w=_.rgb2hex(w)),h.indexOf("rgb")>-1&&(h=_.rgb2hex(h)),x.drawGradient(b,w,h,S,j,g.size,u.gradient.stops,u.gradient.colorStops,d)}}]),O}(),Ue=function(){function O(i,n){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"setGlobalMarkerSize",value:function(){var i=this.w;if(i.globals.markers.size=Array.isArray(i.config.markers.size)?i.config.markers.size:[i.config.markers.size],i.globals.markers.size.length>0){if(i.globals.markers.size.length4&&arguments[4]!==void 0&&arguments[4],h=this.w,g=n,x=i,y=null,b=new X(this.ctx),w=h.config.markers.discrete&&h.config.markers.discrete.length;if((h.globals.markers.size[n]>0||u||w)&&(y=b.group({class:u||w?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(h.globals.cuid,")")),Array.isArray(x.x))for(var S=0;S0:h.config.markers.size>0)||u||w){_.isNumber(x.y[S])?L+=" w".concat(_.randomId()):L="apexcharts-nullpoint";var T=this.getMarkerConfig({cssClass:L,seriesIndex:n,dataPointIndex:j});h.config.series[g].data[j]&&(h.config.series[g].data[j].fillColor&&(T.pointFillColor=h.config.series[g].data[j].fillColor),h.config.series[g].data[j].strokeColor&&(T.pointStrokeColor=h.config.series[g].data[j].strokeColor)),l&&(T.pSize=l),(x.x[S]<0||x.x[S]>h.globals.gridWidth||x.y[S]<-h.globals.markers.largestSize||x.y[S]>h.globals.gridHeight+h.globals.markers.largestSize)&&(T.pSize=0),(d=b.drawMarker(x.x[S],x.y[S],T)).attr("rel",j),d.attr("j",j),d.attr("index",n),d.node.setAttribute("default-marker-size",T.pSize),new ee(this.ctx).setSelectionFilter(d,n,j),this.addEvents(d),y&&y.add(d)}else h.globals.pointsArray[n]===void 0&&(h.globals.pointsArray[n]=[]),h.globals.pointsArray[n].push([x.x[S],x.y[S]])}return y}},{key:"getMarkerConfig",value:function(i){var n=i.cssClass,a=i.seriesIndex,l=i.dataPointIndex,d=l===void 0?null:l,u=i.finishRadius,h=u===void 0?null:u,g=this.w,x=this.getMarkerStyle(a),y=g.globals.markers.size[a],b=g.config.markers;return d!==null&&b.discrete.length&&b.discrete.map(function(w){w.seriesIndex===a&&w.dataPointIndex===d&&(x.pointStrokeColor=w.strokeColor,x.pointFillColor=w.fillColor,y=w.size,x.pointShape=w.shape)}),{pSize:h===null?y:h,pRadius:b.radius,width:Array.isArray(b.width)?b.width[a]:b.width,height:Array.isArray(b.height)?b.height[a]:b.height,pointStrokeWidth:Array.isArray(b.strokeWidth)?b.strokeWidth[a]:b.strokeWidth,pointStrokeColor:x.pointStrokeColor,pointFillColor:x.pointFillColor,shape:x.pointShape||(Array.isArray(b.shape)?b.shape[a]:b.shape),class:n,pointStrokeOpacity:Array.isArray(b.strokeOpacity)?b.strokeOpacity[a]:b.strokeOpacity,pointStrokeDashArray:Array.isArray(b.strokeDashArray)?b.strokeDashArray[a]:b.strokeDashArray,pointFillOpacity:Array.isArray(b.fillOpacity)?b.fillOpacity[a]:b.fillOpacity,seriesIndex:a}}},{key:"addEvents",value:function(i){var n=this.w,a=new X(this.ctx);i.node.addEventListener("mouseenter",a.pathMouseEnter.bind(this.ctx,i)),i.node.addEventListener("mouseleave",a.pathMouseLeave.bind(this.ctx,i)),i.node.addEventListener("mousedown",a.pathMouseDown.bind(this.ctx,i)),i.node.addEventListener("click",n.config.markers.onClick),i.node.addEventListener("dblclick",n.config.markers.onDblClick),i.node.addEventListener("touchstart",a.pathMouseDown.bind(this.ctx,i),{passive:!0})}},{key:"getMarkerStyle",value:function(i){var n=this.w,a=n.globals.markers.colors,l=n.config.markers.strokeColor||n.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(l)?l[i]:l,pointFillColor:Array.isArray(a)?a[i]:a}}}]),O}(),He=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return v(O,[{key:"draw",value:function(i,n,a){var l=this.w,d=new X(this.ctx),u=a.realIndex,h=a.pointsPos,g=a.zRatio,x=a.elParent,y=d.group({class:"apexcharts-series-markers apexcharts-series-".concat(l.config.chart.type)});if(y.attr("clip-path","url(#gridRectMarkerMask".concat(l.globals.cuid,")")),Array.isArray(h.x))for(var b=0;bT.maxBubbleRadius&&(L=T.maxBubbleRadius)}l.config.chart.animations.enabled||(j=L);var I=h.x[b],F=h.y[b];if(j=j||0,F!==null&&l.globals.series[u][w]!==void 0||(S=!1),S){var m=this.drawPoint(I,F,j,L,u,w,n);y.add(m)}x.add(y)}}},{key:"drawPoint",value:function(i,n,a,l,d,u,h){var g=this.w,x=d,y=new K(this.ctx),b=new ee(this.ctx),w=new ze(this.ctx),S=new Ue(this.ctx),j=new X(this.ctx),L=S.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:x,dataPointIndex:u,finishRadius:g.config.chart.type==="bubble"||g.globals.comboCharts&&g.config.series[d]&&g.config.series[d].type==="bubble"?l:null});l=L.pSize;var T,I=w.fillPath({seriesNumber:d,dataPointIndex:u,color:L.pointFillColor,patternUnits:"objectBoundingBox",value:g.globals.series[d][h]});if(L.shape==="circle"?T=j.drawCircle(a):L.shape!=="square"&&L.shape!=="rect"||(T=j.drawRect(0,0,L.width-L.pointStrokeWidth/2,L.height-L.pointStrokeWidth/2,L.pRadius)),g.config.series[x].data[u]&&g.config.series[x].data[u].fillColor&&(I=g.config.series[x].data[u].fillColor),T.attr({x:i-L.width/2-L.pointStrokeWidth/2,y:n-L.height/2-L.pointStrokeWidth/2,cx:i,cy:n,fill:I,"fill-opacity":L.pointFillOpacity,stroke:L.pointStrokeColor,r:l,"stroke-width":L.pointStrokeWidth,"stroke-dasharray":L.pointStrokeDashArray,"stroke-opacity":L.pointStrokeOpacity}),g.config.chart.dropShadow.enabled){var F=g.config.chart.dropShadow;b.dropShadow(T,F,d)}if(!this.initialAnim||g.globals.dataChanged||g.globals.resized)g.globals.animationEnded=!0;else{var m=g.config.chart.animations.speed;y.animateMarker(T,0,L.shape==="circle"?l:{width:L.width,height:L.height},m,g.globals.easing,function(){window.setTimeout(function(){y.animationCompleted(T)},100)})}if(g.globals.dataChanged&&L.shape==="circle")if(this.dynamicAnim){var k,N,R,z,$=g.config.chart.animations.dynamicAnimation.speed;(z=g.globals.previousPaths[d]&&g.globals.previousPaths[d][h])!=null&&(k=z.x,N=z.y,R=z.r!==void 0?z.r:l);for(var Y=0;Yg.globals.gridHeight+w&&(n=g.globals.gridHeight+w/2),g.globals.dataLabelsRects[l]===void 0&&(g.globals.dataLabelsRects[l]=[]),g.globals.dataLabelsRects[l].push({x:i,y:n,width:b,height:w});var S=g.globals.dataLabelsRects[l].length-2,j=g.globals.lastDrawnDataLabelsIndexes[l]!==void 0?g.globals.lastDrawnDataLabelsIndexes[l][g.globals.lastDrawnDataLabelsIndexes[l].length-1]:0;if(g.globals.dataLabelsRects[l][S]!==void 0){var L=g.globals.dataLabelsRects[l][j];(i>L.x+L.width||n>L.y+L.height||n+wn.globals.gridWidth+T.textRects.width+30)&&(g="");var I=n.globals.dataLabels.style.colors[u];((n.config.chart.type==="bar"||n.config.chart.type==="rangeBar")&&n.config.plotOptions.bar.distributed||n.config.dataLabels.distributed)&&(I=n.globals.dataLabels.style.colors[h]),typeof I=="function"&&(I=I({series:n.globals.series,seriesIndex:u,dataPointIndex:h,w:n})),S&&(I=S);var F=w.offsetX,m=w.offsetY;if(n.config.chart.type!=="bar"&&n.config.chart.type!=="rangeBar"||(F=0,m=0),T.drawnextLabel){var k=a.drawText({width:100,height:parseInt(w.style.fontSize,10),x:l+F,y:d+m,foreColor:I,textAnchor:x||w.textAnchor,text:g,fontSize:y||w.style.fontSize,fontFamily:w.style.fontFamily,fontWeight:w.style.fontWeight||"normal"});if(k.attr({class:"apexcharts-datalabel",cx:l,cy:d}),w.dropShadow.enabled){var N=w.dropShadow;new ee(this.ctx).dropShadow(k,N)}b.add(k),n.globals.lastDrawnDataLabelsIndexes[u]===void 0&&(n.globals.lastDrawnDataLabelsIndexes[u]=[]),n.globals.lastDrawnDataLabelsIndexes[u].push(h)}}}},{key:"addBackgroundToDataLabel",value:function(i,n){var a=this.w,l=a.config.dataLabels.background,d=l.padding,u=l.padding/2,h=n.width,g=n.height,x=new X(this.ctx).drawRect(n.x-d,n.y-u/2,h+2*d,g+u,l.borderRadius,a.config.chart.background==="transparent"?"#fff":a.config.chart.background,l.opacity,l.borderWidth,l.borderColor);return l.dropShadow.enabled&&new ee(this.ctx).dropShadow(x,l.dropShadow),x}},{key:"dataLabelsBackground",value:function(){var i=this.w;if(i.config.chart.type!=="bubble")for(var n=i.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),a=0;a0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],l=this.w,d=_.clone(l.globals.initialSeries);l.globals.previousPaths=[],a?(l.globals.collapsedSeries=[],l.globals.ancillaryCollapsedSeries=[],l.globals.collapsedSeriesIndices=[],l.globals.ancillaryCollapsedSeriesIndices=[]):d=this.emptyCollapsedSeries(d),l.config.series=d,i&&(n&&(l.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(d,l.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(i){for(var n=this.w,a=0;a-1&&(i[a].data=[]);return i}},{key:"toggleSeriesOnHover",value:function(i,n){var a=this.w;n||(n=i.target);var l=a.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if(i.type==="mousemove"){var d=parseInt(n.getAttribute("rel"),10)-1,u=null,h=null;a.globals.axisCharts||a.config.chart.type==="radialBar"?a.globals.axisCharts?(u=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(d,"']")),h=a.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(d,"']"))):u=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(d+1,"']")):u=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(d+1,"'] path"));for(var g=0;g=g.from&&y<=g.to&&d[x].classList.remove(a.legendInactiveClass)}}(l.config.plotOptions.heatmap.colorScale.ranges[h])}else i.type==="mouseout"&&u("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"asc",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=this.w,l=0;if(a.config.series.length>1){for(var d=a.config.series.map(function(h,g){return h.data&&h.data.length>0&&a.globals.collapsedSeriesIndices.indexOf(g)===-1&&(!a.globals.comboCharts||n.length===0||n.length&&n.indexOf(a.config.series[g].type)>-1)?g:-1}),u=i==="asc"?0:d.length-1;i==="asc"?u=0;i==="asc"?u++:u--)if(d[u]!==-1){l=d[u];break}}return l}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(i,n){return i.type==="bar"||i.type==="column"?n:-1}).filter(function(i){return i!==-1}):this.w.config.series.map(function(i,n){return n})}},{key:"getPreviousPaths",value:function(){var i=this.w;function n(u,h,g){for(var x=u[h].childNodes,y={type:g,paths:[],realIndex:u[h].getAttribute("data:realIndex")},b=0;b0)for(var l=function(u){for(var h=i.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(i.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(u,"'] rect")),g=[],x=function(b){var w=function(j){return h[b].getAttribute(j)},S={x:parseFloat(w("x")),y:parseFloat(w("y")),width:parseFloat(w("width")),height:parseFloat(w("height"))};g.push({rect:S,color:h[b].getAttribute("color")})},y=0;y0)for(var l=0;l0?n:[]});return i}}]),O}(),Nt=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Q(this.ctx)}return v(O,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var i=this.w.config.series.slice(),n=new Me(this.ctx);if(this.activeSeriesIndex=n.getActiveConfigSeriesIndex(),i[this.activeSeriesIndex].data!==void 0&&i[this.activeSeriesIndex].data.length>0&&i[this.activeSeriesIndex].data[0]!==null&&i[this.activeSeriesIndex].data[0].x!==void 0&&i[this.activeSeriesIndex].data[0]!==null)return!0}},{key:"isFormat2DArray",value:function(){var i=this.w.config.series.slice(),n=new Me(this.ctx);if(this.activeSeriesIndex=n.getActiveConfigSeriesIndex(),i[this.activeSeriesIndex].data!==void 0&&i[this.activeSeriesIndex].data.length>0&&i[this.activeSeriesIndex].data[0]!==void 0&&i[this.activeSeriesIndex].data[0]!==null&&i[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(i,n){for(var a=this.w.config,l=this.w.globals,d=a.chart.type==="boxPlot"||a.series[n].type==="boxPlot",u=0;u=5?this.twoDSeries.push(_.parseNumber(i[n].data[u][4])):this.twoDSeries.push(_.parseNumber(i[n].data[u][1])),l.dataFormatXNumeric=!0),a.xaxis.type==="datetime"){var h=new Date(i[n].data[u][0]);h=new Date(h).getTime(),this.twoDSeriesX.push(h)}else this.twoDSeriesX.push(i[n].data[u][0]);for(var g=0;g-1&&(u=this.activeSeriesIndex);for(var h=0;h1&&arguments[1]!==void 0?arguments[1]:this.ctx,d=this.w.config,u=this.w.globals,h=new Re(l),g=d.labels.length>0?d.labels.slice():d.xaxis.categories.slice();if(u.isRangeBar=d.chart.type==="rangeBar"&&u.isBarHorizontal,u.hasXaxisGroups=d.xaxis.type==="category"&&d.xaxis.group.groups.length>0,u.hasXaxisGroups&&(u.groups=d.xaxis.group.groups),u.hasSeriesGroups=(n=i[0])===null||n===void 0?void 0:n.group,u.hasSeriesGroups){var x=[],y=D(new Set(i.map(function(j){return j.group})));i.forEach(function(j,L){var T=y.indexOf(j.group);x[T]||(x[T]=[]),x[T].push(j.name)}),u.seriesGroups=x}for(var b=function(){for(var j=0;j0&&(this.twoDSeriesX=g,u.seriesX.push(this.twoDSeriesX))),u.labels.push(this.twoDSeriesX);var S=i[w].data.map(function(j){return _.parseNumber(j)});u.series.push(S)}u.seriesZ.push(this.threeDSeries),i[w].name!==void 0?u.seriesNames.push(i[w].name):u.seriesNames.push("series-"+parseInt(w+1,10)),i[w].color!==void 0?u.seriesColors.push(i[w].color):u.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(i){var n=this.w.globals,a=this.w.config;n.series=i.slice(),n.seriesNames=a.labels.slice();for(var l=0;l0?a.labels=n.xaxis.categories:n.labels.length>0?a.labels=n.labels.slice():this.fallbackToCategory?(a.labels=a.labels[0],a.seriesRange.length&&(a.seriesRange.map(function(l){l.forEach(function(d){a.labels.indexOf(d.x)<0&&d.x&&a.labels.push(d.x)})}),a.labels=Array.from(new Set(a.labels.map(JSON.stringify)),JSON.parse)),n.xaxis.convertedCatToNumeric&&(new ce(n).convertCatToNumericXaxis(n,this.ctx,a.seriesX[0]),this._generateExternalLabels(i))):this._generateExternalLabels(i)}},{key:"_generateExternalLabels",value:function(i){var n=this.w.globals,a=this.w.config,l=[];if(n.axisCharts){if(n.series.length>0)if(this.isFormatXY())for(var d=a.series.map(function(b,w){return b.data.filter(function(S,j,L){return L.findIndex(function(T){return T.x===S.x})===j})}),u=d.reduce(function(b,w,S,j){return j[b].length>w.length?b:S},0),h=0;h0&&d==a.length&&n.push(l)}),i.globals.ignoreYAxisIndexes=n.map(function(a){return a})}}]),O}(),hr=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"getLabel",value:function(i,n,a,l){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"12px",h=!(arguments.length>6&&arguments[6]!==void 0)||arguments[6],g=this.w,x=i[l]===void 0?"":i[l],y=x,b=g.globals.xLabelFormatter,w=g.config.xaxis.labels.formatter,S=!1,j=new qe(this.ctx),L=x;h&&(y=j.xLabelFormat(b,x,L,{i:l,dateFormatter:new Re(this.ctx).formatDate,w:g}),w!==void 0&&(y=w(x,i[l],{i:l,dateFormatter:new Re(this.ctx).formatDate,w:g})));var T,I;n.length>0?(T=n[l].unit,I=null,n.forEach(function(N){N.unit==="month"?I="year":N.unit==="day"?I="month":N.unit==="hour"?I="day":N.unit==="minute"&&(I="hour")}),S=I===T,a=n[l].position,y=n[l].value):g.config.xaxis.type==="datetime"&&w===void 0&&(y=""),y===void 0&&(y=""),y=Array.isArray(y)?y:y.toString();var F=new X(this.ctx),m={};m=g.globals.rotateXLabels&&h?F.getTextRects(y,parseInt(u,10),null,"rotate(".concat(g.config.xaxis.labels.rotate," 0 0)"),!1):F.getTextRects(y,parseInt(u,10));var k=!g.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(y)&&(String(y)==="NaN"||d.indexOf(y)>=0&&k)&&(y=""),{x:a,text:y,textRect:m,isBold:S}}},{key:"checkLabelBasedOnTickamount",value:function(i,n,a){var l=this.w,d=l.config.xaxis.tickAmount;return d==="dataPoints"&&(d=Math.round(l.globals.gridWidth/120)),d>a||i%Math.round(a/(d+1))==0||(n.text=""),n}},{key:"checkForOverflowingLabels",value:function(i,n,a,l,d){var u=this.w;if(i===0&&u.globals.skipFirstTimelinelabel&&(n.text=""),i===a-1&&u.globals.skipLastTimelinelabel&&(n.text=""),u.config.xaxis.labels.hideOverlappingLabels&&l.length>0){var h=d[d.length-1];n.x0){g.config.yaxis[d].opposite===!0&&(i+=l.width);for(var b=n;b>=0;b--){var w=y+n/10+g.config.yaxis[d].labels.offsetY-1;g.globals.isBarHorizontal&&(w=u*b),g.config.chart.type==="heatmap"&&(w+=u/2);var S=x.drawLine(i+a.offsetX-l.width+l.offsetX,w+l.offsetY,i+a.offsetX+l.offsetX,w+l.offsetY,l.color);h.add(S),y+=u}}}}]),O}(),ls=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"scaleSvgNode",value:function(i,n){var a=parseFloat(i.getAttributeNS(null,"width")),l=parseFloat(i.getAttributeNS(null,"height"));i.setAttributeNS(null,"width",a*n),i.setAttributeNS(null,"height",l*n),i.setAttributeNS(null,"viewBox","0 0 "+a+" "+l)}},{key:"fixSvgStringForIe11",value:function(i){if(!_.isIE11())return i.replace(/ /g," ");var n=0,a=i.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,function(l){return++n===2?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':l});return a=(a=a.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(i){i==null&&(i=1);var n=this.w.globals.dom.Paper.svg();if(i!==1){var a=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(a,i),n=new XMLSerializer().serializeToString(a)}return this.fixSvgStringForIe11(n)}},{key:"cleanup",value:function(){var i=this.w,n=i.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),a=i.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),l=i.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(l,function(d){d.setAttribute("width",0)}),n&&n[0]&&(n[0].setAttribute("x",-500),n[0].setAttribute("x1",-500),n[0].setAttribute("x2",-500)),a&&a[0]&&(a[0].setAttribute("y",-100),a[0].setAttribute("y1",-100),a[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var i=this.getSvgString(),n=new Blob([i],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(n)}},{key:"dataURI",value:function(i){var n=this;return new Promise(function(a){var l=n.w,d=i?i.scale||i.width/l.globals.svgWidth:1;n.cleanup();var u=document.createElement("canvas");u.width=l.globals.svgWidth*d,u.height=parseInt(l.globals.dom.elWrap.style.height,10)*d;var h=l.config.chart.background==="transparent"?"#fff":l.config.chart.background,g=u.getContext("2d");g.fillStyle=h,g.fillRect(0,0,u.width*d,u.height*d);var x=n.getSvgString(d);if(window.canvg&&_.isIE11()){var y=window.canvg.Canvg.fromString(g,x,{ignoreClear:!0,ignoreDimensions:!0});y.start();var b=u.msToBlob();y.stop(),a({blob:b})}else{var w="data:image/svg+xml,"+encodeURIComponent(x),S=new Image;S.crossOrigin="anonymous",S.onload=function(){if(g.drawImage(S,0,0),u.msToBlob){var j=u.msToBlob();a({blob:j})}else{var L=u.toDataURL("image/png");a({imgURI:L})}},S.src=w}})}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var i=this;this.dataURI().then(function(n){var a=n.imgURI,l=n.blob;l?navigator.msSaveOrOpenBlob(l,i.w.globals.chartID+".png"):i.triggerDownload(a,i.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(i){var n=this,a=i.series,l=i.fileName,d=i.columnDelimiter,u=d===void 0?",":d,h=i.lineDelimiter,g=h===void 0?` +`:h,x=this.w;a||(a=x.config.series);var y,b,w=[],S=[],j="",L=x.globals.series.map(function(R,z){return x.globals.collapsedSeriesIndices.indexOf(z)===-1?R:[]}),T=function(R){return x.config.xaxis.type==="datetime"&&String(R).length>=10},I=Math.max.apply(Math,D(a.map(function(R){return R.data?R.data.length:0}))),F=new Nt(this.ctx),m=new hr(this.ctx),k=function(R){var z="";if(x.globals.axisCharts){if(x.config.xaxis.type==="category"||x.config.xaxis.convertedCatToNumeric)if(x.globals.isBarHorizontal){var $=x.globals.yLabelFormatters[0],Y=new Me(n.ctx).getActiveConfigSeriesIndex();z=$(x.globals.labels[R],{seriesIndex:Y,dataPointIndex:R,w:x})}else z=m.getLabel(x.globals.labels,x.globals.timescaleLabels,0,R).text;x.config.xaxis.type==="datetime"&&(x.config.xaxis.categories.length?z=x.config.xaxis.categories[R]:x.config.labels.length&&(z=x.config.labels[R]))}else z=x.config.labels[R];return Array.isArray(z)&&(z=z.join(" ")),_.isNumber(z)?z:z.split(u).join("")},N=function(R,z){if(w.length&&z===0&&S.push(w.join(u)),R.data){R.data=R.data.length&&R.data||D(Array(I)).map(function(){return""});for(var $=0;$0&&!a.globals.isBarHorizontal&&(this.xaxisLabels=a.globals.timescaleLabels.slice()),a.config.xaxis.overwriteCategories&&(this.xaxisLabels=a.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],a.config.xaxis.position==="top"?this.offY=0:this.offY=a.globals.gridHeight+1,this.offY=this.offY+a.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=a.config.chart.type==="bar"&&a.config.plotOptions.bar.horizontal,this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.xaxisBorderWidth=a.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=a.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=a.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=a.config.xaxis.axisBorder.height,this.yaxis=a.config.yaxis[0]}return v(O,[{key:"drawXaxis",value:function(){var i=this.w,n=new X(this.ctx),a=n.group({class:"apexcharts-xaxis",transform:"translate(".concat(i.config.xaxis.offsetX,", ").concat(i.config.xaxis.offsetY,")")}),l=n.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(i.globals.translateXAxisX,", ").concat(i.globals.translateXAxisY,")")});a.add(l);for(var d=[],u=0;u6&&arguments[6]!==void 0?arguments[6]:{},y=[],b=[],w=this.w,S=x.xaxisFontSize||this.xaxisFontSize,j=x.xaxisFontFamily||this.xaxisFontFamily,L=x.xaxisForeColors||this.xaxisForeColors,T=x.fontWeight||w.config.xaxis.labels.style.fontWeight,I=x.cssClass||w.config.xaxis.labels.style.cssClass,F=w.globals.padHorizontal,m=l.length,k=w.config.xaxis.type==="category"?w.globals.dataPoints:m;if(k===0&&m>k&&(k=m),d){var N=k>1?k-1:k;h=w.globals.gridWidth/Math.min(N,m-1),F=F+u(0,h)/2+w.config.xaxis.labels.offsetX}else h=w.globals.gridWidth/k,F=F+u(0,h)+w.config.xaxis.labels.offsetX;for(var R=function($){var Y=F-u($,h)/2+w.config.xaxis.labels.offsetX;$===0&&m===1&&h/2===F&&k===1&&(Y=w.globals.gridWidth/2);var U=g.axesUtils.getLabel(l,w.globals.timescaleLabels,Y,$,y,S,i),te=28;if(w.globals.rotateXLabels&&i&&(te=22),w.config.xaxis.title.text&&w.config.xaxis.position==="top"&&(te+=parseFloat(w.config.xaxis.title.style.fontSize)+2),i||(te=te+parseFloat(S)+(w.globals.xAxisLabelsHeight-w.globals.xAxisGroupLabelsHeight)+(w.globals.rotateXLabels?10:0)),U=w.config.xaxis.tickAmount!==void 0&&w.config.xaxis.tickAmount!=="dataPoints"&&w.config.xaxis.type!=="datetime"?g.axesUtils.checkLabelBasedOnTickamount($,U,m):g.axesUtils.checkForOverflowingLabels($,U,m,y,b),w.config.xaxis.labels.show){var ne=n.drawText({x:U.x,y:g.offY+w.config.xaxis.labels.offsetY+te-(w.config.xaxis.position==="top"?w.globals.xAxisHeight+w.config.xaxis.axisTicks.height-2:0),text:U.text,textAnchor:"middle",fontWeight:U.isBold?600:T,fontSize:S,fontFamily:j,foreColor:Array.isArray(L)?i&&w.config.xaxis.convertedCatToNumeric?L[w.globals.minX+$-1]:L[$]:L,isPlainText:!1,cssClass:(i?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+I});if(a.add(ne),ne.on("click",function(me){if(typeof w.config.chart.events.xAxisLabelClick=="function"){var be=Object.assign({},w,{labelIndex:$});w.config.chart.events.xAxisLabelClick(me,g.ctx,be)}}),i){var ie=document.createElementNS(w.globals.SVGNS,"title");ie.textContent=Array.isArray(U.text)?U.text.join(" "):U.text,ne.node.appendChild(ie),U.text!==""&&(y.push(U.text),b.push(U))}}$l.globals.gridWidth)){var u=this.offY+l.config.xaxis.axisTicks.offsetY;if(n=n+u+l.config.xaxis.axisTicks.height,l.config.xaxis.position==="top"&&(n=u-l.config.xaxis.axisTicks.height),l.config.xaxis.axisTicks.show){var h=new X(this.ctx).drawLine(i+l.config.xaxis.axisTicks.offsetX,u+l.config.xaxis.offsetY,d+l.config.xaxis.axisTicks.offsetX,n+l.config.xaxis.offsetY,l.config.xaxis.axisTicks.color);a.add(h),h.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var i=this.w,n=[],a=this.xaxisLabels.length,l=i.globals.padHorizontal;if(i.globals.timescaleLabels.length>0)for(var d=0;d0){var y=d[d.length-1].getBBox(),b=d[0].getBBox();y.x<-20&&d[d.length-1].parentNode.removeChild(d[d.length-1]),b.x+b.width>i.globals.gridWidth&&!i.globals.isBarHorizontal&&d[0].parentNode.removeChild(d[0]);for(var w=0;w0&&(this.xaxisLabels=n.globals.timescaleLabels.slice())}return v(O,[{key:"drawGridArea",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w,a=new X(this.ctx);i===null&&(i=a.group({class:"apexcharts-grid"}));var l=a.drawLine(n.globals.padHorizontal,1,n.globals.padHorizontal,n.globals.gridHeight,"transparent"),d=a.drawLine(n.globals.padHorizontal,n.globals.gridHeight,n.globals.gridWidth,n.globals.gridHeight,"transparent");return i.add(d),i.add(l),i}},{key:"drawGrid",value:function(){var i=null;return this.w.globals.axisCharts&&(i=this.renderGrid(),this.drawGridArea(i.el)),i}},{key:"createGridMask",value:function(){var i=this.w,n=i.globals,a=new X(this.ctx),l=Array.isArray(i.config.stroke.width)?0:i.config.stroke.width;if(Array.isArray(i.config.stroke.width)){var d=0;i.config.stroke.width.forEach(function(b){d=Math.max(d,b)}),l=d}n.dom.elGridRectMask=document.createElementNS(n.SVGNS,"clipPath"),n.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(n.cuid)),n.dom.elGridRectMarkerMask=document.createElementNS(n.SVGNS,"clipPath"),n.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(n.cuid)),n.dom.elForecastMask=document.createElementNS(n.SVGNS,"clipPath"),n.dom.elForecastMask.setAttribute("id","forecastMask".concat(n.cuid)),n.dom.elNonForecastMask=document.createElementNS(n.SVGNS,"clipPath"),n.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(n.cuid));var u=i.config.chart.type,h=0,g=0;(u==="bar"||u==="rangeBar"||u==="candlestick"||u==="boxPlot"||i.globals.comboBarCount>0)&&i.globals.isXNumeric&&!i.globals.isBarHorizontal&&(h=i.config.grid.padding.left,g=i.config.grid.padding.right,n.barPadForNumericAxis>h&&(h=n.barPadForNumericAxis,g=n.barPadForNumericAxis)),n.dom.elGridRect=a.drawRect(-l-h-2,2*-l-2,n.gridWidth+l+g+h+4,n.gridHeight+4*l+4,0,"#fff");var x=i.globals.markers.largestSize+1;n.dom.elGridRectMarker=a.drawRect(2*-x,2*-x,n.gridWidth+4*x,n.gridHeight+4*x,0,"#fff"),n.dom.elGridRectMask.appendChild(n.dom.elGridRect.node),n.dom.elGridRectMarkerMask.appendChild(n.dom.elGridRectMarker.node);var y=n.dom.baseEl.querySelector("defs");y.appendChild(n.dom.elGridRectMask),y.appendChild(n.dom.elForecastMask),y.appendChild(n.dom.elNonForecastMask),y.appendChild(n.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(i){var n=i.i,a=i.x1,l=i.y1,d=i.x2,u=i.y2,h=i.xCount,g=i.parent,x=this.w;if(!(n===0&&x.globals.skipFirstTimelinelabel||n===h-1&&x.globals.skipLastTimelinelabel&&!x.config.xaxis.labels.formatter||x.config.chart.type==="radar")){x.config.grid.xaxis.lines.show&&this._drawGridLine({i:n,x1:a,y1:l,x2:d,y2:u,xCount:h,parent:g});var y=0;if(x.globals.hasXaxisGroups&&x.config.xaxis.tickPlacement==="between"){var b=x.globals.groups;if(b){for(var w=0,S=0;w0&&i.config.xaxis.type!=="datetime"&&(l=i.globals.yAxisScale[a].result.length-1)),this._drawXYLines({xCount:l,tickAmount:d})}else l=d,d=i.globals.xTickAmount,this._drawInvertedXYLines({xCount:l,tickAmount:d});return this.drawGridBands(l,d),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.globals.gridWidth/l}}},{key:"drawGridBands",value:function(i,n){var a=this.w;if(a.config.grid.row.colors!==void 0&&a.config.grid.row.colors.length>0)for(var l=0,d=a.globals.gridHeight/n,u=a.globals.gridWidth,h=0,g=0;h=a.config.grid.row.colors.length&&(g=0),this._drawGridBandRect({c:g,x1:0,y1:l,x2:u,y2:d,type:"row"}),l+=a.globals.gridHeight/n;if(a.config.grid.column.colors!==void 0&&a.config.grid.column.colors.length>0)for(var x=a.globals.isBarHorizontal||a.config.xaxis.tickPlacement!=="on"||a.config.xaxis.type!=="category"&&!a.config.xaxis.convertedCatToNumeric?i:i-1,y=a.globals.padHorizontal,b=a.globals.padHorizontal+a.globals.gridWidth/x,w=a.globals.gridHeight,S=0,j=0;S=a.config.grid.column.colors.length&&(j=0),this._drawGridBandRect({c:j,x1:y,y1:0,x2:b,y2:w,type:"column"}),y+=a.globals.gridWidth/x}}]),O}(),da=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"niceScale",value:function(i,n){var a,l,d,u,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,g=1e-11,x=this.w,y=x.globals;y.isBarHorizontal?(a=x.config.xaxis,l=Math.max((y.svgWidth-100)/25,2)):(a=x.config.yaxis[h],l=Math.max((y.svgHeight-100)/15,2)),d=a.min!==void 0&&a.min!==null,u=a.max!==void 0&&a.min!==null;var b=a.stepSize!==void 0&&a.stepSize!==null,w=a.tickAmount!==void 0&&a.tickAmount!==null,S=w?a.tickAmount:a.forceNiceScale?y.niceScaleDefaultTicks[Math.min(Math.round(l/2),y.niceScaleDefaultTicks.length-1)]:10;if(y.isMultipleYAxis&&!w&&y.multiAxisTickAmount>0&&(S=y.multiAxisTickAmount,w=!0),S=S==="dataPoints"?y.dataPoints-1:Math.abs(Math.round(S)),(i===Number.MIN_VALUE&&n===0||!_.isNumber(i)&&!_.isNumber(n)||i===Number.MIN_VALUE&&n===-Number.MAX_VALUE)&&(i=0,n=S,y.allSeriesCollapsed=!1),i>n){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var j=n;n=i,i=j}else i===n&&(i=i===0?0:i-1,n=n===0?2:n+1);var L=[];S<1&&(S=1);var T=S,I=Math.abs(n-i);a.forceNiceScale&&(!d&&i>0&&i/I<.15&&(i=0,d=!0),!u&&n<0&&-n/I<.15&&(n=0,u=!0),I=Math.abs(n-i));var F=I/T,m=F,k=Math.floor(Math.log10(m)),N=Math.pow(10,k),R=Math.ceil(m/N);if(F=m=(R=y.niceScaleAllowedMagMsd[y.yValueDecimal===0?0:1][R])*N,y.isBarHorizontal&&a.stepSize&&a.type!=="datetime"?(F=a.stepSize,b=!0):b&&(F=a.stepSize),b&&a.forceNiceScale){var z=Math.floor(Math.log10(F));F*=Math.pow(10,k-z)}if(d&&u){var $=I/T;if(w)if(b)if(_.mod(I,F)!=0){var Y=_.getGCD(F,$);F=$/Y<10?Y:$}else _.mod(F,$)==0?F=$:($=F,w=!1);else F=$;else if(b)_.mod(I,F)==0?$=F:F=$;else if(_.mod(I,F)==0)$=F;else{$=I/(T=Math.ceil(I/F));var U=_.getGCD(I,F);I/Ul&&(i=n-F*S,i+=F*Math.floor((te-i)/F))}else d&&(n=w?i+F*T:F*Math.ceil(n/F));else if(w){var ne=F/(n-i>n?1:2),ie=ne*Math.floor(i/ne);Math.abs(ie-i)<=ne/2?n=(i=ie)+F*T:i=(n=ne*Math.ceil(n/ne))-F*T}else i=F*Math.floor(i/F),n=F*Math.ceil(n/F);I=Math.abs(n-i),F=_.getGCD(I,F),T=Math.round(I/F)}if(w||d||u||(T=Math.ceil((I-g)/(F+g)))>16&&_.getPrimeFactors(T).length<2&&T++,y.isMultipleYAxis&&y.multiAxisTickAmount==0&&(y.multiAxisTickAmount=T),T>l&&(!w&&!b||a.forceNiceScale)){var me=_.getPrimeFactors(T),be=me.length-1,Le=T;e:for(var Oe=0;OeOr);return{result:L,niceMin:L[0],niceMax:L[L.length-1]}}},{key:"linearScale",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,u=Math.abs(n-i);(a=this._adjustTicksForSmallRange(a,l,u))==="dataPoints"&&(a=this.w.globals.dataPoints-1),d||(d=u/a),a===Number.MAX_VALUE&&(a=5,d=1);for(var h=[],g=i;a>=0;)h.push(g),g+=d,a-=1;return{result:h,niceMin:h[0],niceMax:h[h.length-1]}}},{key:"logarithmicScaleNice",value:function(i,n,a){n<=0&&(n=Math.max(i,a)),i<=0&&(i=Math.min(n,a));for(var l=[],d=Math.ceil(Math.log(n)/Math.log(a)+1),u=Math.floor(Math.log(i)/Math.log(a));u5?(l.allSeriesCollapsed=!1,l.yAxisScale[i]=u.forceNiceScale?this.logarithmicScaleNice(n,a,u.logBase):this.logarithmicScale(n,a,u.logBase)):a!==-Number.MAX_VALUE&&_.isNumber(a)?(l.allSeriesCollapsed=!1,l.yAxisScale[i]=this.niceScale(n,a,i)):l.yAxisScale[i]=this.linearScale(0,10,10,i,d.yaxis[i].stepSize)}},{key:"setXScale",value:function(i,n){var a=this.w,l=a.globals,d=Math.abs(n-i);return n!==-Number.MAX_VALUE&&_.isNumber(n)?l.xAxisScale=this.linearScale(i,n,a.config.xaxis.tickAmount?a.config.xaxis.tickAmount:d<10&&d>1?d+1:10,0,a.config.xaxis.stepSize):l.xAxisScale=this.linearScale(0,10,10),l.xAxisScale}},{key:"setMultipleYScales",value:function(){var i=this.w.globals,n=this.w.config,a=i.minYArr,l=i.maxYArr,d=[],u=[],h=[];n.series.forEach(function(w,S){h.push(S),u.push(null)});var g,x=[];n.yaxis.forEach(function(w,S){if(w.seriesName){var j=[];Array.isArray(w.seriesName)?j=w.seriesName:j.push(w.seriesName),d[S]=[],j.forEach(function(L){n.series.forEach(function(T,I){if(T.name===L){d[S].push(I),u[I]=S;var F=h.indexOf(I);h.splice(F,1)}})})}else x.push(S)});for(var y=0;y=0;g--)a.splice(h[g],1);a.forEach(function(x,y){var b=Number.MAX_VALUE,w=-Number.MAX_VALUE;if(d.chart.stacked){for(var S=u.seriesX[x[0]].map(function(z){return Number.MIN_VALUE}),j=u.seriesX[x[0]].map(function(z){return Number.MIN_VALUE}),L=u.seriesX[x[0]].map(function(z){return Number.MIN_VALUE}),T=d.series[x[0]].type,I=0;I=0?j[m]+=k:L[m]+=k,S[m]+=k}}T==="bar"?(b=Math.min.apply(null,L),w=Math.max.apply(null,j)):(b=Math.min.apply(null,S),w=Math.max.apply(null,S))}else{for(var N=0;N1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-Number.MAX_VALUE,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,d=this.w.config,u=this.w.globals,h=-Number.MAX_VALUE,g=Number.MIN_VALUE;l===null&&(l=i+1);var x=0,y=0,b=void 0;if(u.seriesX.length>=l){var w,S;x=0,y=(b=D(new Set((w=[]).concat.apply(w,D(u.seriesX.slice(i,l)))))).length-1;var j=(S=u.brushSource)===null||S===void 0?void 0:S.w.config.chart.brush;if(d.chart.zoom.enabled&&d.chart.zoom.autoScaleYaxis||j!=null&&j.enabled&&j!=null&&j.autoScaleYaxis){if(d.xaxis.min)for(x=0;xx&&b[y]>=d.xaxis.max;y--);}}var L=u.series,T=L,I=L;d.chart.type==="candlestick"?(T=u.seriesCandleL,I=u.seriesCandleH):d.chart.type==="boxPlot"?(T=u.seriesCandleO,I=u.seriesCandleC):u.isRangeData&&(T=u.seriesRangeStart,I=u.seriesRangeEnd);for(var F=i;FT[F][k]&&T[F][k]<0&&(g=T[F][k])}else u.hasNullValues=!0}m!=="bar"&&m!=="column"||(g<0&&h<0&&(h=0,a=Math.max(a,0)),g===Number.MIN_VALUE&&(g=0,n=Math.min(n,0)))}return d.chart.type==="rangeBar"&&u.seriesRangeStart.length&&u.isBarHorizontal&&(g=n),d.chart.type==="bar"&&(g<0&&h<0&&(h=0),g===Number.MIN_VALUE&&(g=0)),{minY:g,maxY:h,lowestY:n,highestY:a}}},{key:"setYRange",value:function(){var i=this.w.globals,n=this.w.config;i.maxY=-Number.MAX_VALUE,i.minY=Number.MIN_VALUE;var a,l=Number.MAX_VALUE;if(i.isMultipleYAxis){l=Number.MAX_VALUE;for(var d=0;di.dataPoints&&i.dataPoints!==0&&(l=i.dataPoints-1)):n.xaxis.tickAmount==="dataPoints"?(i.series.length>1&&(l=i.series[i.maxValsInArrayIndex].length-1),i.isXNumeric&&(l=i.maxX-i.minX-1)):l=n.xaxis.tickAmount,i.xTickAmount=l,n.xaxis.max!==void 0&&typeof n.xaxis.max=="number"&&(i.maxX=n.xaxis.max),n.xaxis.min!==void 0&&typeof n.xaxis.min=="number"&&(i.minX=n.xaxis.min),n.xaxis.range!==void 0&&(i.minX=i.maxX-n.xaxis.range),i.minX!==Number.MAX_VALUE&&i.maxX!==-Number.MAX_VALUE)if(n.xaxis.convertedCatToNumeric&&!i.dataFormatXNumeric){for(var d=[],u=i.minX-1;u0&&(i.xAxisScale=this.scales.linearScale(1,i.labels.length,l-1,0,n.xaxis.stepSize),i.seriesX=i.labels.slice());a&&(i.labels=i.xAxisScale.result.slice())}return i.isBarHorizontal&&i.labels.length&&(i.xTickAmount=i.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:i.minX,maxX:i.maxX}}},{key:"setZRange",value:function(){var i=this.w.globals;if(i.isDataXYZ){for(var n=0;n0){var h=d-l[u-1];h>0&&(i.minXDiff=Math.min(h,i.minXDiff))}}),i.dataPoints!==1&&i.minXDiff!==Number.MAX_VALUE||(i.minXDiff=.5)})}},{key:"_setStackedMinMax",value:function(){var i=this,n=this.w.globals;if(n.series.length){var a=n.seriesGroups;a.length||(a=[this.w.config.series.map(function(u){return u.name})]);var l={},d={};a.forEach(function(u){l[u]=[],d[u]=[],i.w.config.series.map(function(h,g){return u.indexOf(h.name)>-1?g:null}).filter(function(h){return h!==null}).forEach(function(h){for(var g=0;g0?l[u][g]+=parseFloat(n.series[h][g])+1e-4:d[u][g]+=parseFloat(n.series[h][g]))}})}),Object.entries(l).forEach(function(u){var h=H(u,1)[0];l[h].forEach(function(g,x){n.maxY=Math.max(n.maxY,l[h][x]),n.minY=Math.min(n.minY,d[h][x])})})}}}]),O}(),Go=function(){function O(i,n){c(this,O),this.ctx=i,this.elgrid=n,this.w=i.w;var a=this.w;this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.axisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=a.config.chart.type==="bar"&&a.config.plotOptions.bar.horizontal,this.xAxisoffX=0,a.config.xaxis.position==="bottom"&&(this.xAxisoffX=a.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new hr(i)}return v(O,[{key:"drawYaxis",value:function(i){var n=this,a=this.w,l=new X(this.ctx),d=a.config.yaxis[i].labels.style,u=d.fontSize,h=d.fontFamily,g=d.fontWeight,x=l.group({class:"apexcharts-yaxis",rel:i,transform:"translate("+a.globals.translateYAxisX[i]+", 0)"});if(this.axesUtils.isYAxisHidden(i))return x;var y=l.group({class:"apexcharts-yaxis-texts-g"});x.add(y);var b=a.globals.yAxisScale[i].result.length-1,w=a.globals.gridHeight/b,S=a.globals.translateY,j=a.globals.yLabelFormatters[i],L=a.globals.yAxisScale[i].result.slice();L=this.axesUtils.checkForReversedLabels(i,L);var T="";if(a.config.yaxis[i].labels.show)for(var I=function(Y){var U=L[Y];U=j(U,Y,a);var te=a.config.yaxis[i].labels.padding;a.config.yaxis[i].opposite&&a.config.yaxis.length!==0&&(te*=-1);var ne="end";a.config.yaxis[i].opposite&&(ne="start"),a.config.yaxis[i].labels.align==="left"?ne="start":a.config.yaxis[i].labels.align==="center"?ne="middle":a.config.yaxis[i].labels.align==="right"&&(ne="end");var ie=n.axesUtils.getYAxisForeColor(d.colors,i),me=a.config.yaxis[i].labels.offsetY;a.config.chart.type==="heatmap"&&(me-=(a.globals.gridHeight/a.globals.series.length-1)/2);var be=l.drawText({x:te,y:S+b/10+me+1,text:U,textAnchor:ne,fontSize:u,fontFamily:h,fontWeight:g,maxWidth:a.config.yaxis[i].labels.maxWidth,foreColor:Array.isArray(ie)?ie[Y]:ie,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+d.cssClass});Y===b&&(T=be),y.add(be);var Le=document.createElementNS(a.globals.SVGNS,"title");if(Le.textContent=Array.isArray(U)?U.join(" "):U,be.node.appendChild(Le),a.config.yaxis[i].labels.rotate!==0){var Oe=l.rotateAroundCenter(T.node),Ve=l.rotateAroundCenter(be.node);be.node.setAttribute("transform","rotate(".concat(a.config.yaxis[i].labels.rotate," ").concat(Oe.x," ").concat(Ve.y,")"))}S+=w},F=b;F>=0;F--)I(F);if(a.config.yaxis[i].title.text!==void 0){var m=l.group({class:"apexcharts-yaxis-title"}),k=0;a.config.yaxis[i].opposite&&(k=a.globals.translateYAxisX[i]);var N=l.drawText({x:k,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+a.config.yaxis[i].title.style.cssClass});m.add(N),x.add(m)}var R=a.config.yaxis[i].axisBorder,z=31+R.offsetX;if(a.config.yaxis[i].opposite&&(z=-31-R.offsetX),R.show){var $=l.drawLine(z,a.globals.translateY+R.offsetY-2,z,a.globals.gridHeight+a.globals.translateY+R.offsetY+2,R.color,0,R.width);x.add($)}return a.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(z,b,R,a.config.yaxis[i].axisTicks,i,w,x),x}},{key:"drawYaxisInversed",value:function(i){var n=this.w,a=new X(this.ctx),l=a.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),d=a.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(n.globals.translateXAxisX,", ").concat(n.globals.translateXAxisY,")")});l.add(d);var u=n.globals.yAxisScale[i].result.length-1,h=n.globals.gridWidth/u+.1,g=h+n.config.xaxis.labels.offsetX,x=n.globals.xLabelFormatter,y=n.globals.yAxisScale[i].result.slice(),b=n.globals.timescaleLabels;b.length>0&&(this.xaxisLabels=b.slice(),u=(y=b.slice()).length),y=this.axesUtils.checkForReversedLabels(i,y);var w=b.length;if(n.config.xaxis.labels.show)for(var S=w?0:u;w?S=0;w?S++:S--){var j=y[S];j=x(j,S,n);var L=n.globals.gridWidth+n.globals.padHorizontal-(g-h+n.config.xaxis.labels.offsetX);if(b.length){var T=this.axesUtils.getLabel(y,b,L,S,this.drawnLabels,this.xaxisFontSize);L=T.x,j=T.text,this.drawnLabels.push(T.text),S===0&&n.globals.skipFirstTimelinelabel&&(j=""),S===y.length-1&&n.globals.skipLastTimelinelabel&&(j="")}var I=a.drawText({x:L,y:this.xAxisoffX+n.config.xaxis.labels.offsetY+30-(n.config.xaxis.position==="top"?n.globals.xAxisHeight+n.config.xaxis.axisTicks.height-2:0),text:j,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[i]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:n.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+n.config.xaxis.labels.style.cssClass});d.add(I),I.tspan(j);var F=document.createElementNS(n.globals.SVGNS,"title");F.textContent=j,I.node.appendChild(F),g+=h}return this.inversedYAxisTitleText(l),this.inversedYAxisBorder(l),l}},{key:"inversedYAxisBorder",value:function(i){var n=this.w,a=new X(this.ctx),l=n.config.xaxis.axisBorder;if(l.show){var d=0;n.config.chart.type==="bar"&&n.globals.isXNumeric&&(d-=15);var u=a.drawLine(n.globals.padHorizontal+d+l.offsetX,this.xAxisoffX,n.globals.gridWidth,this.xAxisoffX,l.color,0,l.height);this.elgrid&&this.elgrid.elGridBorders&&n.config.grid.show?this.elgrid.elGridBorders.add(u):i.add(u)}}},{key:"inversedYAxisTitleText",value:function(i){var n=this.w,a=new X(this.ctx);if(n.config.xaxis.title.text!==void 0){var l=a.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),d=a.drawText({x:n.globals.gridWidth/2+n.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(n.config.xaxis.title.style.fontSize)+n.config.xaxis.title.offsetY+20,text:n.config.xaxis.title.text,textAnchor:"middle",fontSize:n.config.xaxis.title.style.fontSize,fontFamily:n.config.xaxis.title.style.fontFamily,fontWeight:n.config.xaxis.title.style.fontWeight,foreColor:n.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+n.config.xaxis.title.style.cssClass});l.add(d),i.add(l)}}},{key:"yAxisTitleRotate",value:function(i,n){var a=this.w,l=new X(this.ctx),d={width:0,height:0},u={width:0,height:0},h=a.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g"));h!==null&&(d=h.getBoundingClientRect());var g=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-title text"));if(g!==null&&(u=g.getBoundingClientRect()),g!==null){var x=this.xPaddingForYAxisTitle(i,d,u,n);g.setAttribute("x",x.xPos-(n?10:0))}if(g!==null){var y=l.rotateAroundCenter(g);g.setAttribute("transform","rotate(".concat(n?-1*a.config.yaxis[i].title.rotate:a.config.yaxis[i].title.rotate," ").concat(y.x," ").concat(y.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(i,n,a,l){var d=this.w,u=0,h=0,g=10;return d.config.yaxis[i].title.text===void 0||i<0?{xPos:h,padd:0}:(l?(h=n.width+d.config.yaxis[i].title.offsetX+a.width/2+g/2,(u+=1)===0&&(h-=g/2)):(h=-1*n.width+d.config.yaxis[i].title.offsetX+g/2+a.width/2,d.globals.isBarHorizontal&&(g=25,h=-1*n.width-d.config.yaxis[i].title.offsetX-g)),{xPos:h,padd:g})}},{key:"setYAxisXPosition",value:function(i,n){var a=this.w,l=0,d=0,u=18,h=1;a.config.yaxis.length>1&&(this.multipleYs=!0),a.config.yaxis.map(function(g,x){var y=a.globals.ignoreYAxisIndexes.indexOf(x)>-1||!g.show||g.floating||i[x].width===0,b=i[x].width+n[x].width;g.opposite?a.globals.isBarHorizontal?(d=a.globals.gridWidth+a.globals.translateX-1,a.globals.translateYAxisX[x]=d-g.labels.offsetX):(d=a.globals.gridWidth+a.globals.translateX+h,y||(h=h+b+20),a.globals.translateYAxisX[x]=d-g.labels.offsetX+20):(l=a.globals.translateX-u,y||(u=u+b+20),a.globals.translateYAxisX[x]=l+g.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var i=this.w,n=i.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(n=_.listToArray(n)).forEach(function(a,l){var d=i.config.yaxis[l];if(d&&!d.floating&&d.labels.align!==void 0){var u=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"'] .apexcharts-yaxis-texts-g")),h=i.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(l,"'] .apexcharts-yaxis-label"));h=_.listToArray(h);var g=u.getBoundingClientRect();d.labels.align==="left"?(h.forEach(function(x,y){x.setAttribute("text-anchor","start")}),d.opposite||u.setAttribute("transform","translate(-".concat(g.width,", 0)"))):d.labels.align==="center"?(h.forEach(function(x,y){x.setAttribute("text-anchor","middle")}),u.setAttribute("transform","translate(".concat(g.width/2*(d.opposite?1:-1),", 0)"))):d.labels.align==="right"&&(h.forEach(function(x,y){x.setAttribute("text-anchor","end")}),d.opposite&&u.setAttribute("transform","translate(".concat(g.width,", 0)")))}})}}]),O}(),P1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.documentEvent=_.bind(this.documentEvent,this)}return v(O,[{key:"addEventListener",value:function(i,n){var a=this.w;a.globals.events.hasOwnProperty(i)?a.globals.events[i].push(n):a.globals.events[i]=[n]}},{key:"removeEventListener",value:function(i,n){var a=this.w;if(a.globals.events.hasOwnProperty(i)){var l=a.globals.events[i].indexOf(n);l!==-1&&a.globals.events[i].splice(l,1)}}},{key:"fireEvent",value:function(i,n){var a=this.w;if(a.globals.events.hasOwnProperty(i)){n&&n.length||(n=[]);for(var l=a.globals.events[i],d=l.length,u=0;u0&&(n=this.w.config.chart.locales.concat(window.Apex.chart.locales));var a=n.filter(function(d){return d.name===i})[0];if(!a)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var l=_.extend(we,a);this.w.globals.locale=l.options}}]),O}(),q=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"drawAxis",value:function(i,n){var a,l,d=this,u=this.w.globals,h=this.w.config,g=new Bi(this.ctx,n),x=new Go(this.ctx,n);u.axisCharts&&i!=="radar"&&(u.isBarHorizontal?(l=x.drawYaxisInversed(0),a=g.drawXaxisInversed(0),u.dom.elGraphical.add(a),u.dom.elGraphical.add(l)):(a=g.drawXaxis(),u.dom.elGraphical.add(a),h.yaxis.map(function(y,b){if(u.ignoreYAxisIndexes.indexOf(b)===-1&&(l=x.drawYaxis(b),u.dom.Paper.add(l),d.w.config.grid.position==="back")){var w=u.dom.Paper.children()[1];w.remove(),u.dom.Paper.add(w)}})))}}]),O}(),re=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"drawXCrosshairs",value:function(){var i=this.w,n=new X(this.ctx),a=new ee(this.ctx),l=i.config.xaxis.crosshairs.fill.gradient,d=i.config.xaxis.crosshairs.dropShadow,u=i.config.xaxis.crosshairs.fill.type,h=l.colorFrom,g=l.colorTo,x=l.opacityFrom,y=l.opacityTo,b=l.stops,w=d.enabled,S=d.left,j=d.top,L=d.blur,T=d.color,I=d.opacity,F=i.config.xaxis.crosshairs.fill.color;if(i.config.xaxis.crosshairs.show){u==="gradient"&&(F=n.drawGradient("vertical",h,g,x,y,null,b,null));var m=n.drawRect();i.config.xaxis.crosshairs.width===1&&(m=n.drawLine());var k=i.globals.gridHeight;(!_.isNumber(k)||k<0)&&(k=0);var N=i.config.xaxis.crosshairs.width;(!_.isNumber(N)||N<0)&&(N=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:k,width:N,height:k,fill:F,filter:"none","fill-opacity":i.config.xaxis.crosshairs.opacity,stroke:i.config.xaxis.crosshairs.stroke.color,"stroke-width":i.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":i.config.xaxis.crosshairs.stroke.dashArray}),w&&(m=a.dropShadow(m,{left:S,top:j,blur:L,color:T,opacity:I})),i.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var i=this.w,n=new X(this.ctx),a=i.config.yaxis[0].crosshairs,l=i.globals.barPadForNumericAxis;if(i.config.yaxis[0].crosshairs.show){var d=n.drawLine(-l,0,i.globals.gridWidth+l,0,a.stroke.color,a.stroke.dashArray,a.stroke.width);d.attr({class:"apexcharts-ycrosshairs"}),i.globals.dom.elGraphical.add(d)}var u=n.drawLine(-l,0,i.globals.gridWidth+l,0,a.stroke.color,0,0);u.attr({class:"apexcharts-ycrosshairs-hidden"}),i.globals.dom.elGraphical.add(u)}}]),O}(),se=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"checkResponsiveConfig",value:function(i){var n=this,a=this.w,l=a.config;if(l.responsive.length!==0){var d=l.responsive.slice();d.sort(function(x,y){return x.breakpoint>y.breakpoint?1:y.breakpoint>x.breakpoint?-1:0}).reverse();var u=new le({}),h=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=d[0].breakpoint,b=window.innerWidth>0?window.innerWidth:screen.width;if(b>y){var w=Q.extendArrayProps(u,a.globals.initialConfig,a);x=_.extend(w,x),x=_.extend(a.config,x),n.overrideResponsiveOptions(x)}else for(var S=0;S0&&typeof a.config.colors[0]=="function"&&(a.globals.colors=a.config.series.map(function(j,L){var T=a.config.colors[L];return T||(T=a.config.colors[0]),typeof T=="function"?(n.isColorFn=!0,T({value:a.globals.axisCharts?a.globals.series[L][0]?a.globals.series[L][0]:0:a.globals.series[L],seriesIndex:L,dataPointIndex:L,w:a})):T}))),a.globals.seriesColors.map(function(j,L){j&&(a.globals.colors[L]=j)}),a.config.theme.monochrome.enabled){var d=[],u=a.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(u=a.globals.series[0].length*a.globals.series.length);for(var h=a.config.theme.monochrome.color,g=1/(u/a.config.theme.monochrome.shadeIntensity),x=a.config.theme.monochrome.shadeTo,y=0,b=0;b2&&arguments[2]!==void 0?arguments[2]:null,l=this.w,d=n||l.globals.series.length;if(a===null&&(a=this.isBarDistributed||this.isHeatmapDistributed||l.config.chart.type==="heatmap"&&l.config.plotOptions.heatmap.colorScale.inverse),a&&l.globals.series.length&&(d=l.globals.series[l.globals.maxValsInArrayIndex].length*l.globals.series.length),i.lengthi.globals.svgWidth&&(this.dCtx.lgRect.width=i.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(i,n){var a=i;if(this.w.globals.isMultiLineX){var l=n.map(function(u,h){return Array.isArray(u)?u.length:1}),d=Math.max.apply(Math,D(l));a=n[l.indexOf(d)]}return a}}]),O}(),Pe=function(){function O(i){c(this,O),this.w=i.w,this.dCtx=i}return v(O,[{key:"getxAxisLabelsCoords",value:function(){var i,n=this.w,a=n.globals.labels.slice();if(n.config.xaxis.convertedCatToNumeric&&a.length===0&&(a=n.globals.categoryLabels),n.globals.timescaleLabels.length>0){var l=this.getxAxisTimeScaleLabelsCoords();i={width:l.width,height:l.height},n.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=n.config.legend.position!=="left"&&n.config.legend.position!=="right"||n.config.legend.floating?0:this.dCtx.lgRect.width;var d=n.globals.xLabelFormatter,u=_.getLargestStringFromArr(a),h=this.dCtx.dimHelpers.getLargestStringFromMultiArr(u,a);n.globals.isBarHorizontal&&(h=u=n.globals.yAxisScale[0].result.reduce(function(j,L){return j.length>L.length?j:L},0));var g=new qe(this.dCtx.ctx),x=u;u=g.xLabelFormat(d,u,x,{i:void 0,dateFormatter:new Re(this.dCtx.ctx).formatDate,w:n}),h=g.xLabelFormat(d,h,x,{i:void 0,dateFormatter:new Re(this.dCtx.ctx).formatDate,w:n}),(n.config.xaxis.convertedCatToNumeric&&u===void 0||String(u).trim()==="")&&(h=u="1");var y=new X(this.dCtx.ctx),b=y.getTextRects(u,n.config.xaxis.labels.style.fontSize),w=b;if(u!==h&&(w=y.getTextRects(h,n.config.xaxis.labels.style.fontSize)),(i={width:b.width>=w.width?b.width:w.width,height:b.height>=w.height?b.height:w.height}).width*a.length>n.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&n.config.xaxis.labels.rotate!==0||n.config.xaxis.labels.rotateAlways){if(!n.globals.isBarHorizontal){n.globals.rotateXLabels=!0;var S=function(j){return y.getTextRects(j,n.config.xaxis.labels.style.fontSize,n.config.xaxis.labels.style.fontFamily,"rotate(".concat(n.config.xaxis.labels.rotate," 0 0)"),!1)};b=S(u),u!==h&&(w=S(h)),i.height=(b.height>w.height?b.height:w.height)/1.5,i.width=b.width>w.width?b.width:w.width}}else n.globals.rotateXLabels=!1}return n.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var i,n=this.w;if(!n.globals.hasXaxisGroups)return{width:0,height:0};var a,l=((i=n.config.xaxis.group.style)===null||i===void 0?void 0:i.fontSize)||n.config.xaxis.labels.style.fontSize,d=n.globals.groups.map(function(b){return b.title}),u=_.getLargestStringFromArr(d),h=this.dCtx.dimHelpers.getLargestStringFromMultiArr(u,d),g=new X(this.dCtx.ctx),x=g.getTextRects(u,l),y=x;return u!==h&&(y=g.getTextRects(h,l)),a={width:x.width>=y.width?x.width:y.width,height:x.height>=y.height?x.height:y.height},n.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}},{key:"getxAxisTitleCoords",value:function(){var i=this.w,n=0,a=0;if(i.config.xaxis.title.text!==void 0){var l=new X(this.dCtx.ctx).getTextRects(i.config.xaxis.title.text,i.config.xaxis.title.style.fontSize);n=l.width,a=l.height}return{width:n,height:a}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var i,n=this.w;this.dCtx.timescaleLabels=n.globals.timescaleLabels.slice();var a=this.dCtx.timescaleLabels.map(function(d){return d.value}),l=a.reduce(function(d,u){return d===void 0?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):d.length>u.length?d:u},0);return 1.05*(i=new X(this.dCtx.ctx).getTextRects(l,n.config.xaxis.labels.style.fontSize)).width*a.length>n.globals.gridWidth&&n.config.xaxis.labels.rotate!==0&&(n.globals.overlappingXLabels=!0),i}},{key:"additionalPaddingXLabels",value:function(i){var n=this,a=this.w,l=a.globals,d=a.config,u=d.xaxis.type,h=i.width;l.skipLastTimelinelabel=!1,l.skipFirstTimelinelabel=!1;var g=a.config.yaxis[0].opposite&&a.globals.isBarHorizontal,x=function(y,b){d.yaxis.length>1&&function(w){return l.collapsedSeriesIndices.indexOf(w)!==-1}(b)||function(w){if(n.dCtx.timescaleLabels&&n.dCtx.timescaleLabels.length){var S=n.dCtx.timescaleLabels[0],j=n.dCtx.timescaleLabels[n.dCtx.timescaleLabels.length-1].position+h/1.75-n.dCtx.yAxisWidthRight,L=S.position-h/1.75+n.dCtx.yAxisWidthLeft,T=a.config.legend.position==="right"&&n.dCtx.lgRect.width>0?n.dCtx.lgRect.width:0;j>l.svgWidth-l.translateX-T&&(l.skipLastTimelinelabel=!0),L<-(w.show&&!w.floating||d.chart.type!=="bar"&&d.chart.type!=="candlestick"&&d.chart.type!=="rangeBar"&&d.chart.type!=="boxPlot"?10:h/1.75)&&(l.skipFirstTimelinelabel=!0)}else u==="datetime"?n.dCtx.gridPad.right((z=String(b(N,g)))===null||z===void 0?void 0:z.length)?k:N},w),j=S=b(S,g);if(S!==void 0&&S.length!==0||(S=x.niceMax),n.globals.isBarHorizontal){l=0;var L=n.globals.labels.slice();S=_.getLargestStringFromArr(L),S=b(S,{seriesIndex:h,dataPointIndex:-1,w:n}),j=i.dCtx.dimHelpers.getLargestStringFromMultiArr(S,L)}var T=new X(i.dCtx.ctx),I="rotate(".concat(u.labels.rotate," 0 0)"),F=T.getTextRects(S,u.labels.style.fontSize,u.labels.style.fontFamily,I,!1),m=F;S!==j&&(m=T.getTextRects(j,u.labels.style.fontSize,u.labels.style.fontFamily,I,!1)),a.push({width:(y>m.width||y>F.width?y:m.width>F.width?m.width:F.width)+l,height:m.height>F.height?m.height:F.height})}else a.push({width:0,height:0})}),a}},{key:"getyAxisTitleCoords",value:function(){var i=this,n=this.w,a=[];return n.config.yaxis.map(function(l,d){if(l.show&&l.title.text!==void 0){var u=new X(i.dCtx.ctx),h="rotate(".concat(l.title.rotate," 0 0)"),g=u.getTextRects(l.title.text,l.title.style.fontSize,l.title.style.fontFamily,h,!1);a.push({width:g.width,height:g.height})}else a.push({width:0,height:0})}),a}},{key:"getTotalYAxisWidth",value:function(){var i=this.w,n=0,a=0,l=0,d=i.globals.yAxisScale.length>1?10:0,u=new hr(this.dCtx.ctx),h=function(g,x){var y=i.config.yaxis[x].floating,b=0;g.width>0&&!y?(b=g.width+d,function(w){return i.globals.ignoreYAxisIndexes.indexOf(w)>-1}(x)&&(b=b-g.width-d)):b=y||u.isYAxisHidden(x)?0:5,i.config.yaxis[x].opposite?l+=b:a+=b,n+=b};return i.globals.yLabelsCoords.map(function(g,x){h(g,x)}),i.globals.yTitleCoords.map(function(g,x){h(g,x)}),i.globals.isBarHorizontal&&!i.config.yaxis[0].floating&&(n=i.globals.yLabelsCoords[0].width+i.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=a,this.dCtx.yAxisWidthRight=l,n}}]),O}(),wt=function(){function O(i){c(this,O),this.w=i.w,this.dCtx=i}return v(O,[{key:"gridPadForColumnsInNumericAxis",value:function(i){var n=this.w;if(n.globals.noData||n.globals.allSeriesCollapsed)return 0;var a=function(y){return y==="bar"||y==="rangeBar"||y==="candlestick"||y==="boxPlot"},l=n.config.chart.type,d=0,u=a(l)?n.config.series.length:1;if(n.globals.comboBarCount>0&&(u=n.globals.comboBarCount),n.globals.collapsedSeries.forEach(function(y){a(y.type)&&(u-=1)}),n.config.chart.stacked&&(u=1),(a(l)||n.globals.comboBarCount>0)&&n.globals.isXNumeric&&!n.globals.isBarHorizontal&&u>0){var h,g,x=Math.abs(n.globals.initialMaxX-n.globals.initialMinX);x<=3&&(x=n.globals.dataPoints),h=x/i,n.globals.minXDiff&&n.globals.minXDiff/h>0&&(g=n.globals.minXDiff/h),g>i/2&&(g/=2),(d=g*parseInt(n.config.plotOptions.bar.columnWidth,10)/100)<1&&(d=1),n.globals.barPadForNumericAxis=d}return d}},{key:"gridPadFortitleSubtitle",value:function(){var i=this,n=this.w,a=n.globals,l=this.dCtx.isSparkline||!n.globals.axisCharts?0:10;["title","subtitle"].forEach(function(h){n.config[h].text!==void 0?l+=n.config[h].margin:l+=i.dCtx.isSparkline||!n.globals.axisCharts?0:5}),!n.config.legend.show||n.config.legend.position!=="bottom"||n.config.legend.floating||n.globals.axisCharts||(l+=10);var d=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),u=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");a.gridHeight=a.gridHeight-d.height-u.height-l,a.translateY=a.translateY+d.height+u.height+l}},{key:"setGridXPosForDualYAxis",value:function(i,n){var a=this.w,l=new hr(this.dCtx.ctx);a.config.yaxis.map(function(d,u){a.globals.ignoreYAxisIndexes.indexOf(u)!==-1||d.floating||l.isYAxisHidden(u)||(d.opposite&&(a.globals.translateX=a.globals.translateX-(n[u].width+i[u].width)-parseInt(a.config.yaxis[u].labels.style.fontSize,10)/1.2-12),a.globals.translateX<2&&(a.globals.translateX=2))})}}]),O}(),Pt=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new pe(this),this.dimYAxis=new et(this),this.dimXAxis=new Pe(this),this.dimGrid=new wt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return v(O,[{key:"plotCoords",value:function(){var i=this,n=this.w,a=n.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&((n.config.markers.discrete.length>0||n.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(d){var u=H(d,2),h=u[0],g=u[1];i.gridPad[h]=Math.max(g,i.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(n.config.stroke.width/2,this.gridPad.top),this.gridPad.bottom=Math.max(n.config.stroke.width/2,this.gridPad.bottom)),a.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),a.gridHeight=a.gridHeight-this.gridPad.top-this.gridPad.bottom,a.gridWidth=a.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var l=this.dimGrid.gridPadForColumnsInNumericAxis(a.gridWidth);a.gridWidth=a.gridWidth-2*l,a.translateX=a.translateX+this.gridPad.left+this.xPadLeft+(l>0?l+4:0),a.translateY=a.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var i=this,n=this.w,a=n.globals,l=this.dimYAxis.getyAxisLabelsCoords(),d=this.dimYAxis.getyAxisTitleCoords();n.globals.yLabelsCoords=[],n.globals.yTitleCoords=[],n.config.yaxis.map(function(S,j){n.globals.yLabelsCoords.push({width:l[j].width,index:j}),n.globals.yTitleCoords.push({width:d[j].width,index:j})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var u=this.dimXAxis.getxAxisLabelsCoords(),h=this.dimXAxis.getxAxisGroupLabelsCoords(),g=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(u,g,h),a.translateXAxisY=n.globals.rotateXLabels?this.xAxisHeight/8:-4,a.translateXAxisX=n.globals.rotateXLabels&&n.globals.isXNumeric&&n.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,n.globals.isBarHorizontal&&(a.rotateXLabels=!1,a.translateXAxisY=parseInt(n.config.xaxis.labels.style.fontSize,10)/1.5*-1),a.translateXAxisY=a.translateXAxisY+n.config.xaxis.labels.offsetY,a.translateXAxisX=a.translateXAxisX+n.config.xaxis.labels.offsetX;var x=this.yAxisWidth,y=this.xAxisHeight;a.xAxisLabelsHeight=this.xAxisHeight-g.height,a.xAxisGroupLabelsHeight=a.xAxisLabelsHeight-u.height,a.xAxisLabelsWidth=this.xAxisWidth,a.xAxisHeight=this.xAxisHeight;var b=10;(n.config.chart.type==="radar"||this.isSparkline)&&(x=0,y=a.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||n.config.chart.type==="treemap")&&(x=0,y=0,b=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(u);var w=function(){a.translateX=x,a.gridHeight=a.svgHeight-i.lgRect.height-y-(i.isSparkline||n.config.chart.type==="treemap"?0:n.globals.rotateXLabels?10:15),a.gridWidth=a.svgWidth-x};switch(n.config.xaxis.position==="top"&&(b=a.xAxisHeight-n.config.xaxis.axisTicks.height-5),n.config.legend.position){case"bottom":a.translateY=b,w();break;case"top":a.translateY=this.lgRect.height+b,w();break;case"left":a.translateY=b,a.translateX=this.lgRect.width+x,a.gridHeight=a.svgHeight-y-12,a.gridWidth=a.svgWidth-this.lgRect.width-x;break;case"right":a.translateY=b,a.translateX=x,a.gridHeight=a.svgHeight-y-12,a.gridWidth=a.svgWidth-this.lgRect.width-x-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(d,l),new Go(this.ctx).setYAxisXPosition(l,d)}},{key:"setDimensionsForNonAxisCharts",value:function(){var i=this.w,n=i.globals,a=i.config,l=0;i.config.legend.show&&!i.config.legend.floating&&(l=20);var d=a.chart.type==="pie"||a.chart.type==="polarArea"||a.chart.type==="donut"?"pie":"radialBar",u=a.plotOptions[d].offsetY,h=a.plotOptions[d].offsetX;if(!a.legend.show||a.legend.floating)return n.gridHeight=n.svgHeight-a.grid.padding.left+a.grid.padding.right,n.gridWidth=n.gridHeight,n.translateY=u,void(n.translateX=h+(n.svgWidth-n.gridWidth)/2);switch(a.legend.position){case"bottom":n.gridHeight=n.svgHeight-this.lgRect.height-n.goldenPadding,n.gridWidth=n.svgWidth,n.translateY=u-10,n.translateX=h+(n.svgWidth-n.gridWidth)/2;break;case"top":n.gridHeight=n.svgHeight-this.lgRect.height-n.goldenPadding,n.gridWidth=n.svgWidth,n.translateY=this.lgRect.height+u+10,n.translateX=h+(n.svgWidth-n.gridWidth)/2;break;case"left":n.gridWidth=n.svgWidth-this.lgRect.width-l,n.gridHeight=a.chart.height!=="auto"?n.svgHeight:n.gridWidth,n.translateY=u,n.translateX=h+this.lgRect.width+l;break;case"right":n.gridWidth=n.svgWidth-this.lgRect.width-l-5,n.gridHeight=a.chart.height!=="auto"?n.svgHeight:n.gridWidth,n.translateY=u,n.translateX=h+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(i,n,a){var l=this.w,d=l.globals.hasXaxisGroups?2:1,u=a.height+i.height+n.height,h=l.globals.isMultiLineX?1.2:l.globals.LINE_HEIGHT_RATIO,g=l.globals.rotateXLabels?22:10,x=l.globals.rotateXLabels&&l.config.legend.position==="bottom"?10:0;this.xAxisHeight=u*h+d*g+x,this.xAxisWidth=i.width,this.xAxisHeight-n.height>l.config.xaxis.labels.maxHeight&&(this.xAxisHeight=l.config.xaxis.labels.maxHeight),l.config.xaxis.labels.minHeight&&this.xAxisHeightb&&(this.yAxisWidth=b)}}]),O}(),Vi=function(){function O(i){c(this,O),this.w=i.w,this.lgCtx=i}return v(O,[{key:"getLegendStyles",value:function(){var i,n,a,l=document.createElement("style");l.setAttribute("type","text/css");var d=((i=this.lgCtx.ctx)===null||i===void 0||(n=i.opts)===null||n===void 0||(a=n.chart)===null||a===void 0?void 0:a.nonce)||this.w.config.chart.nonce;d&&l.setAttribute("nonce",d);var u=document.createTextNode(` .apexcharts-legend { display: flex; overflow: auto; @@ -154,7 +154,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } .apexcharts-inactive-legend { opacity: 0.45; - }`);return l.appendChild(u),l}},{key:"getLegendBBox",value:function(){var i=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),n=i.width;return{clwh:i.height,clww:n}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(i,n){var a=this,l=this.w;if(l.globals.axisCharts||l.config.chart.type==="radialBar"){l.globals.resized=!0;var d=null,u=null;l.globals.risingSeries=[],l.globals.axisCharts?(d=l.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(i,"']")),u=parseInt(d.getAttribute("data:realIndex"),10)):(d=l.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"']")),u=parseInt(d.getAttribute("rel"),10)-1),n?[{cs:l.globals.collapsedSeries,csi:l.globals.collapsedSeriesIndices},{cs:l.globals.ancillaryCollapsedSeries,csi:l.globals.ancillaryCollapsedSeriesIndices}].forEach(function(y){a.riseCollapsedSeries(y.cs,y.csi,u)}):this.hideSeries({seriesEl:d,realIndex:u})}else{var h=l.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(i+1,"'] path")),g=l.config.chart.type;if(g==="pie"||g==="polarArea"||g==="donut"){var x=l.config.plotOptions.pie.donut.labels;new X(this.lgCtx.ctx).pathMouseDown(h.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(h.members[0].node,x)}h.fire("click")}}},{key:"hideSeries",value:function(i){var n=i.seriesEl,a=i.realIndex,l=this.w,d=_.clone(l.config.series);if(l.globals.axisCharts){var u=l.config.yaxis[l.globals.seriesYAxisReverseMap[a]];if(u&&u.show&&u.showAlways)l.globals.ancillaryCollapsedSeriesIndices.indexOf(a)<0&&(l.globals.ancillaryCollapsedSeries.push({index:a,data:d[a].data.slice(),type:n.parentNode.className.baseVal.split("-")[1]}),l.globals.ancillaryCollapsedSeriesIndices.push(a));else if(l.globals.collapsedSeriesIndices.indexOf(a)<0){l.globals.collapsedSeries.push({index:a,data:d[a].data.slice(),type:n.parentNode.className.baseVal.split("-")[1]}),l.globals.collapsedSeriesIndices.push(a);var h=l.globals.risingSeries.indexOf(a);l.globals.risingSeries.splice(h,1)}}else l.globals.collapsedSeries.push({index:a,data:d[a]}),l.globals.collapsedSeriesIndices.push(a);for(var g=n.childNodes,x=0;x0){for(var u=0;u-1&&(i[l].data=[])}):i.forEach(function(a,l){n.globals.collapsedSeriesIndices.indexOf(l)>-1&&(i[l]=0)}),i}}]),O}(),Zo=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new Vi(this)}return v(O,[{key:"init",value:function(){var i=this.w,n=i.globals,a=i.config;if((a.legend.showForSingleSeries&&n.series.length===1||this.isBarsDistributed||n.series.length>1||!n.axisCharts)&&a.legend.show){for(;n.dom.elLegendWrap.firstChild;)n.dom.elLegendWrap.removeChild(n.dom.elLegendWrap.firstChild);this.drawLegends(),_.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),a.legend.position==="bottom"||a.legend.position==="top"?this.legendAlignHorizontal():a.legend.position!=="right"&&a.legend.position!=="left"||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var i=this,n=this.w,a=n.config.legend.fontFamily,l=n.globals.seriesNames,d=n.globals.colors.slice();if(n.config.chart.type==="heatmap"){var u=n.config.plotOptions.heatmap.colorScale.ranges;l=u.map(function(ie){return ie.name?ie.name:ie.from+" - "+ie.to}),d=u.map(function(ie){return ie.color})}else this.isBarsDistributed&&(l=n.globals.labels.slice());n.config.legend.customLegendItems.length&&(l=n.config.legend.customLegendItems);for(var h=n.globals.legendFormatter,g=n.config.legend.inverseOrder,x=g?l.length-1:0;g?x>=0:x<=l.length-1;g?x--:x++){var y,b=h(l[x],{seriesIndex:x,w:n}),w=!1,S=!1;if(n.globals.collapsedSeries.length>0)for(var j=0;j0)for(var E=0;E0?x-10:0)+(y>0?y-10:0)}l.style.position="absolute",u=u+i+a.config.legend.offsetX,h=h+n+a.config.legend.offsetY,l.style.left=u+"px",l.style.top=h+"px",a.config.legend.position==="bottom"?(l.style.top="auto",l.style.bottom=5-a.config.legend.offsetY+"px"):a.config.legend.position==="right"&&(l.style.left="auto",l.style.right=25+a.config.legend.offsetX+"px"),["width","height"].forEach(function(b){l.style[b]&&(l.style[b]=parseInt(a.config.legend[b],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var i=this.w;i.globals.dom.elLegendWrap.style.right=0;var n=this.legendHelpers.getLegendBBox(),a=new Pt(this.ctx),l=a.dimHelpers.getTitleSubtitleCoords("title"),d=a.dimHelpers.getTitleSubtitleCoords("subtitle"),u=0;i.config.legend.position==="bottom"?u=-n.clwh/1.8:i.config.legend.position==="top"&&(u=l.height+d.height+i.config.title.margin+i.config.subtitle.margin-10),this.setLegendWrapXY(20,u)}},{key:"legendAlignVertical",value:function(){var i=this.w,n=this.legendHelpers.getLegendBBox(),a=0;i.config.legend.position==="left"&&(a=20),i.config.legend.position==="right"&&(a=i.globals.svgWidth-n.clww-10),this.setLegendWrapXY(a,20)}},{key:"onLegendHovered",value:function(i){var n=this.w,a=i.target.classList.contains("apexcharts-legend-series")||i.target.classList.contains("apexcharts-legend-text")||i.target.classList.contains("apexcharts-legend-marker");if(n.config.chart.type==="heatmap"||this.isBarsDistributed){if(a){var l=parseInt(i.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,l,this.w]),new Me(this.ctx).highlightRangeInSeries(i,i.target)}}else!i.target.classList.contains("apexcharts-inactive-legend")&&a&&new Me(this.ctx).toggleSeriesOnHover(i,i.target)}},{key:"onLegendClick",value:function(i){var n=this.w;if(!n.config.legend.customLegendItems.length&&(i.target.classList.contains("apexcharts-legend-series")||i.target.classList.contains("apexcharts-legend-text")||i.target.classList.contains("apexcharts-legend-marker"))){var a=parseInt(i.target.getAttribute("rel"),10)-1,l=i.target.getAttribute("data:collapsed")==="true",d=this.w.config.chart.events.legendClick;typeof d=="function"&&d(this.ctx,a,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,a,this.w]);var u=this.w.config.legend.markers.onClick;typeof u=="function"&&i.target.classList.contains("apexcharts-legend-marker")&&(u(this.ctx,a,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,a,this.w])),n.config.chart.type!=="treemap"&&n.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&n.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(a,l)}}}]),O}(),cs=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w;var n=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=n.globals.minX,this.maxX=n.globals.maxX}return v(O,[{key:"createToolbar",value:function(){var i=this,n=this.w,a=function(){return document.createElement("div")},l=a();if(l.setAttribute("class","apexcharts-toolbar"),l.style.top=n.config.chart.toolbar.offsetY+"px",l.style.right=3-n.config.chart.toolbar.offsetX+"px",n.globals.dom.elWrap.appendChild(l),this.elZoom=a(),this.elZoomIn=a(),this.elZoomOut=a(),this.elPan=a(),this.elSelection=a(),this.elZoomReset=a(),this.elMenuIcon=a(),this.elMenu=a(),this.elCustomIcons=[],this.t=n.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var d=0;d + }`);return l.appendChild(u),l}},{key:"getLegendBBox",value:function(){var i=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),n=i.width;return{clwh:i.height,clww:n}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(i,n){var a=this,l=this.w;if(l.globals.axisCharts||l.config.chart.type==="radialBar"){l.globals.resized=!0;var d=null,u=null;l.globals.risingSeries=[],l.globals.axisCharts?(d=l.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(i,"']")),u=parseInt(d.getAttribute("data:realIndex"),10)):(d=l.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"']")),u=parseInt(d.getAttribute("rel"),10)-1),n?[{cs:l.globals.collapsedSeries,csi:l.globals.collapsedSeriesIndices},{cs:l.globals.ancillaryCollapsedSeries,csi:l.globals.ancillaryCollapsedSeriesIndices}].forEach(function(y){a.riseCollapsedSeries(y.cs,y.csi,u)}):this.hideSeries({seriesEl:d,realIndex:u})}else{var h=l.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(i+1,"'] path")),g=l.config.chart.type;if(g==="pie"||g==="polarArea"||g==="donut"){var x=l.config.plotOptions.pie.donut.labels;new X(this.lgCtx.ctx).pathMouseDown(h.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(h.members[0].node,x)}h.fire("click")}}},{key:"hideSeries",value:function(i){var n=i.seriesEl,a=i.realIndex,l=this.w,d=_.clone(l.config.series);if(l.globals.axisCharts){var u=l.config.yaxis[l.globals.seriesYAxisReverseMap[a]];if(u&&u.show&&u.showAlways)l.globals.ancillaryCollapsedSeriesIndices.indexOf(a)<0&&(l.globals.ancillaryCollapsedSeries.push({index:a,data:d[a].data.slice(),type:n.parentNode.className.baseVal.split("-")[1]}),l.globals.ancillaryCollapsedSeriesIndices.push(a));else if(l.globals.collapsedSeriesIndices.indexOf(a)<0){l.globals.collapsedSeries.push({index:a,data:d[a].data.slice(),type:n.parentNode.className.baseVal.split("-")[1]}),l.globals.collapsedSeriesIndices.push(a);var h=l.globals.risingSeries.indexOf(a);l.globals.risingSeries.splice(h,1)}}else l.globals.collapsedSeries.push({index:a,data:d[a]}),l.globals.collapsedSeriesIndices.push(a);for(var g=n.childNodes,x=0;x0){for(var u=0;u-1&&(i[l].data=[])}):i.forEach(function(a,l){n.globals.collapsedSeriesIndices.indexOf(l)>-1&&(i[l]=0)}),i}}]),O}(),Zo=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new Vi(this)}return v(O,[{key:"init",value:function(){var i=this.w,n=i.globals,a=i.config;if((a.legend.showForSingleSeries&&n.series.length===1||this.isBarsDistributed||n.series.length>1||!n.axisCharts)&&a.legend.show){for(;n.dom.elLegendWrap.firstChild;)n.dom.elLegendWrap.removeChild(n.dom.elLegendWrap.firstChild);this.drawLegends(),_.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),a.legend.position==="bottom"||a.legend.position==="top"?this.legendAlignHorizontal():a.legend.position!=="right"&&a.legend.position!=="left"||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var i=this,n=this.w,a=n.config.legend.fontFamily,l=n.globals.seriesNames,d=n.globals.colors.slice();if(n.config.chart.type==="heatmap"){var u=n.config.plotOptions.heatmap.colorScale.ranges;l=u.map(function(ie){return ie.name?ie.name:ie.from+" - "+ie.to}),d=u.map(function(ie){return ie.color})}else this.isBarsDistributed&&(l=n.globals.labels.slice());n.config.legend.customLegendItems.length&&(l=n.config.legend.customLegendItems);for(var h=n.globals.legendFormatter,g=n.config.legend.inverseOrder,x=g?l.length-1:0;g?x>=0:x<=l.length-1;g?x--:x++){var y,b=h(l[x],{seriesIndex:x,w:n}),w=!1,S=!1;if(n.globals.collapsedSeries.length>0)for(var j=0;j0)for(var L=0;L0?x-10:0)+(y>0?y-10:0)}l.style.position="absolute",u=u+i+a.config.legend.offsetX,h=h+n+a.config.legend.offsetY,l.style.left=u+"px",l.style.top=h+"px",a.config.legend.position==="bottom"?(l.style.top="auto",l.style.bottom=5-a.config.legend.offsetY+"px"):a.config.legend.position==="right"&&(l.style.left="auto",l.style.right=25+a.config.legend.offsetX+"px"),["width","height"].forEach(function(b){l.style[b]&&(l.style[b]=parseInt(a.config.legend[b],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var i=this.w;i.globals.dom.elLegendWrap.style.right=0;var n=this.legendHelpers.getLegendBBox(),a=new Pt(this.ctx),l=a.dimHelpers.getTitleSubtitleCoords("title"),d=a.dimHelpers.getTitleSubtitleCoords("subtitle"),u=0;i.config.legend.position==="bottom"?u=-n.clwh/1.8:i.config.legend.position==="top"&&(u=l.height+d.height+i.config.title.margin+i.config.subtitle.margin-10),this.setLegendWrapXY(20,u)}},{key:"legendAlignVertical",value:function(){var i=this.w,n=this.legendHelpers.getLegendBBox(),a=0;i.config.legend.position==="left"&&(a=20),i.config.legend.position==="right"&&(a=i.globals.svgWidth-n.clww-10),this.setLegendWrapXY(a,20)}},{key:"onLegendHovered",value:function(i){var n=this.w,a=i.target.classList.contains("apexcharts-legend-series")||i.target.classList.contains("apexcharts-legend-text")||i.target.classList.contains("apexcharts-legend-marker");if(n.config.chart.type==="heatmap"||this.isBarsDistributed){if(a){var l=parseInt(i.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,l,this.w]),new Me(this.ctx).highlightRangeInSeries(i,i.target)}}else!i.target.classList.contains("apexcharts-inactive-legend")&&a&&new Me(this.ctx).toggleSeriesOnHover(i,i.target)}},{key:"onLegendClick",value:function(i){var n=this.w;if(!n.config.legend.customLegendItems.length&&(i.target.classList.contains("apexcharts-legend-series")||i.target.classList.contains("apexcharts-legend-text")||i.target.classList.contains("apexcharts-legend-marker"))){var a=parseInt(i.target.getAttribute("rel"),10)-1,l=i.target.getAttribute("data:collapsed")==="true",d=this.w.config.chart.events.legendClick;typeof d=="function"&&d(this.ctx,a,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,a,this.w]);var u=this.w.config.legend.markers.onClick;typeof u=="function"&&i.target.classList.contains("apexcharts-legend-marker")&&(u(this.ctx,a,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,a,this.w])),n.config.chart.type!=="treemap"&&n.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&n.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(a,l)}}}]),O}(),ds=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w;var n=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=n.globals.minX,this.maxX=n.globals.maxX}return v(O,[{key:"createToolbar",value:function(){var i=this,n=this.w,a=function(){return document.createElement("div")},l=a();if(l.setAttribute("class","apexcharts-toolbar"),l.style.top=n.config.chart.toolbar.offsetY+"px",l.style.right=3-n.config.chart.toolbar.offsetX+"px",n.globals.dom.elWrap.appendChild(l),this.elZoom=a(),this.elZoomIn=a(),this.elZoomOut=a(),this.elPan=a(),this.elSelection=a(),this.elZoomReset=a(),this.elMenuIcon=a(),this.elMenu=a(),this.elCustomIcons=[],this.t=n.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var d=0;d @@ -180,14 +180,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `,title:this.localeValues.pan,class:n.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),h("reset",this.elZoomReset,` -`),this.t.download&&u.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var x=0;x0&&l.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:a.globals.gridWidth,maxY:a.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var a=this.w,l=this.xyRatios;if(!a.globals.zoomEnabled){if(a.globals.selection!==void 0&&a.globals.selection!==null)this.drawSelectionRect(a.globals.selection);else if(a.config.chart.selection.xaxis.min!==void 0&&a.config.chart.selection.xaxis.max!==void 0){var d=(a.config.chart.selection.xaxis.min-a.globals.minX)/l.xRatio,u=a.globals.gridWidth-(a.globals.maxX-a.config.chart.selection.xaxis.max)/l.xRatio-d;a.globals.isRangeBar&&(d=(a.config.chart.selection.xaxis.min-a.globals.yAxisScale[0].niceMin)/l.invertedYRatio,u=(a.config.chart.selection.xaxis.max-a.config.chart.selection.xaxis.min)/l.invertedYRatio);var h={x:d,y:0,width:u,height:a.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(h),this.makeSelectionRectDraggable(),typeof a.config.chart.events.selection=="function"&&a.config.chart.events.selection(this.ctx,{xaxis:{min:a.config.chart.selection.xaxis.min,max:a.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(a){var l=a.x,d=a.y,u=a.width,h=a.height,g=a.translateX,x=g===void 0?0:g,y=a.translateY,b=y===void 0?0:y,w=this.w,S=this.zoomRect,j=this.selectionRect;if(this.dragged||w.globals.selection!==null){var E={transform:"translate("+x+", "+b+")"};w.globals.zoomEnabled&&this.dragged&&(u<0&&(u=1),S.attr({x:l,y:d,width:u,height:h,fill:w.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":w.config.chart.zoom.zoomedArea.fill.opacity,stroke:w.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":w.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":w.config.chart.zoom.zoomedArea.stroke.opacity}),X.setAttrs(S.node,E)),w.globals.selectionEnabled&&(j.attr({x:l,y:d,width:u>0?u:0,height:h>0?h:0,fill:w.config.chart.selection.fill.color,"fill-opacity":w.config.chart.selection.fill.opacity,stroke:w.config.chart.selection.stroke.color,"stroke-width":w.config.chart.selection.stroke.width,"stroke-dasharray":w.config.chart.selection.stroke.dashArray,"stroke-opacity":w.config.chart.selection.stroke.opacity}),X.setAttrs(j.node,E))}}},{key:"hideSelectionRect",value:function(a){a&&a.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(a){var l=a.context,d=a.zoomtype,u=this.w,h=l,g=this.gridRect.getBoundingClientRect(),x=h.startX-1,y=h.startY,b=!1,w=!1,S=h.clientX-g.left-x,j=h.clientY-g.top-y,E={};return Math.abs(S+x)>u.globals.gridWidth?S=u.globals.gridWidth-x:h.clientX-g.left<0&&(S=x),x>h.clientX-g.left&&(b=!0,S=Math.abs(S)),y>h.clientY-g.top&&(w=!0,j=Math.abs(j)),E=d==="x"?{x:b?x-S:x,y:0,width:S,height:u.globals.gridHeight}:d==="y"?{x:0,y:w?y-j:y,width:u.globals.gridWidth,height:j}:{x:b?x-S:x,y:w?y-j:y,width:S,height:j},h.drawSelectionRect(E),h.selectionDragging("resizing"),E}},{key:"selectionDragging",value:function(a,l){var d=this,u=this.w,h=this.xyRatios,g=this.selectionRect,x=0;a==="resizing"&&(x=30);var y=function(w){return parseFloat(g.node.getAttribute(w))},b={x:y("x"),y:y("y"),width:y("width"),height:y("height")};u.globals.selection=b,typeof u.config.chart.events.selection=="function"&&u.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var w,S,j,E,T=d.gridRect.getBoundingClientRect(),I=g.node.getBoundingClientRect();u.globals.isRangeBar?(w=u.globals.yAxisScale[0].niceMin+(I.left-T.left)*h.invertedYRatio,S=u.globals.yAxisScale[0].niceMin+(I.right-T.left)*h.invertedYRatio,j=0,E=1):(w=u.globals.xAxisScale.niceMin+(I.left-T.left)*h.xRatio,S=u.globals.xAxisScale.niceMin+(I.right-T.left)*h.xRatio,j=u.globals.yAxisScale[0].niceMin+(T.bottom-I.bottom)*h.yRatio[0],E=u.globals.yAxisScale[0].niceMax-(I.top-T.top)*h.yRatio[0]);var F={xaxis:{min:w,max:S},yaxis:{min:j,max:E}};u.config.chart.events.selection(d.ctx,F),u.config.chart.brush.enabled&&u.config.chart.events.brushScrolled!==void 0&&u.config.chart.events.brushScrolled(d.ctx,F)},x))}},{key:"selectionDrawn",value:function(a){var l=a.context,d=a.zoomtype,u=this.w,h=l,g=this.xyRatios,x=this.ctx.toolbar;if(h.startX>h.endX){var y=h.startX;h.startX=h.endX,h.endX=y}if(h.startY>h.endY){var b=h.startY;h.startY=h.endY,h.endY=b}var w=void 0,S=void 0;u.globals.isRangeBar?(w=u.globals.yAxisScale[0].niceMin+h.startX*g.invertedYRatio,S=u.globals.yAxisScale[0].niceMin+h.endX*g.invertedYRatio):(w=u.globals.xAxisScale.niceMin+h.startX*g.xRatio,S=u.globals.xAxisScale.niceMin+h.endX*g.xRatio);var j=[],E=[];if(u.config.yaxis.forEach(function(R,z){j.push(u.globals.yAxisScale[z].niceMax-g.yRatio[z]*h.startY),E.push(u.globals.yAxisScale[z].niceMax-g.yRatio[z]*h.endY)}),h.dragged&&(h.dragX>10||h.dragY>10)&&w!==S){if(u.globals.zoomEnabled){var T=_.clone(u.globals.initialConfig.yaxis),I=_.clone(u.globals.initialConfig.xaxis);if(u.globals.zoomed=!0,u.config.xaxis.convertedCatToNumeric&&(w=Math.floor(w),S=Math.floor(S),w<1&&(w=1,S=u.globals.dataPoints),S-w<2&&(S=w+1)),d!=="xy"&&d!=="x"||(I={min:w,max:S}),d!=="xy"&&d!=="y"||T.forEach(function(R,z){T[z].min=E[z],T[z].max=j[z]}),x){var F=x.getBeforeZoomRange(I,T);F&&(I=F.xaxis?F.xaxis:I,T=F.yaxis?F.yaxis:T)}var m={xaxis:I};u.config.chart.group||(m.yaxis=T),h.ctx.updateHelpers._updateOptions(m,!1,h.w.config.chart.animations.dynamicAnimation.enabled),typeof u.config.chart.events.zoomed=="function"&&x.zoomCallback(I,T)}else if(u.globals.selectionEnabled){var k,N=null;k={min:w,max:S},d!=="xy"&&d!=="y"||(N=_.clone(u.config.yaxis)).forEach(function(R,z){N[z].min=E[z],N[z].max=j[z]}),u.globals.selection=h.selection,typeof u.config.chart.events.selection=="function"&&u.config.chart.events.selection(h.ctx,{xaxis:k,yaxis:N})}}}},{key:"panDragging",value:function(a){var l=a.context,d=this.w,u=l;if(d.globals.lastClientPosition.x!==void 0){var h=d.globals.lastClientPosition.x-u.clientX,g=d.globals.lastClientPosition.y-u.clientY;Math.abs(h)>Math.abs(g)&&h>0?this.moveDirection="left":Math.abs(h)>Math.abs(g)&&h<0?this.moveDirection="right":Math.abs(g)>Math.abs(h)&&g>0?this.moveDirection="up":Math.abs(g)>Math.abs(h)&&g<0&&(this.moveDirection="down")}d.globals.lastClientPosition={x:u.clientX,y:u.clientY};var x=d.globals.isRangeBar?d.globals.minY:d.globals.minX,y=d.globals.isRangeBar?d.globals.maxY:d.globals.maxX;d.config.xaxis.convertedCatToNumeric||u.panScrolled(x,y)}},{key:"delayedPanScrolled",value:function(){var a=this.w,l=a.globals.minX,d=a.globals.maxX,u=(a.globals.maxX-a.globals.minX)/2;this.moveDirection==="left"?(l=a.globals.minX+u,d=a.globals.maxX+u):this.moveDirection==="right"&&(l=a.globals.minX-u,d=a.globals.maxX-u),l=Math.floor(l),d=Math.floor(d),this.updateScrolledChart({xaxis:{min:l,max:d}},l,d)}},{key:"panScrolled",value:function(a,l){var d=this.w,u=this.xyRatios,h=_.clone(d.globals.initialConfig.yaxis),g=u.xRatio,x=d.globals.minX,y=d.globals.maxX;d.globals.isRangeBar&&(g=u.invertedYRatio,x=d.globals.minY,y=d.globals.maxY),this.moveDirection==="left"?(a=x+d.globals.gridWidth/15*g,l=y+d.globals.gridWidth/15*g):this.moveDirection==="right"&&(a=x-d.globals.gridWidth/15*g,l=y-d.globals.gridWidth/15*g),d.globals.isRangeBar||(ad.globals.initialMaxX)&&(a=x,l=y);var b={xaxis:{min:a,max:l}};d.config.chart.group||(b.yaxis=h),this.updateScrolledChart(b,a,l)}},{key:"updateScrolledChart",value:function(a,l,d){var u=this.w;this.ctx.updateHelpers._updateOptions(a,!1,!1),typeof u.config.chart.events.scrolled=="function"&&u.config.chart.events.scrolled(this.ctx,{xaxis:{min:l,max:d}})}}]),n}(),qo=function(){function O(i){c(this,O),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx}return v(O,[{key:"getNearestValues",value:function(i){var n=i.hoverArea,a=i.elGrid,l=i.clientX,d=i.clientY,u=this.w,h=a.getBoundingClientRect(),g=h.width,x=h.height,y=g/(u.globals.dataPoints-1),b=x/u.globals.dataPoints,w=this.hasBars();!u.globals.comboCharts&&!w||u.config.xaxis.convertedCatToNumeric||(y=g/u.globals.dataPoints);var S=l-h.left-u.globals.barPadForNumericAxis,j=d-h.top;S<0||j<0||S>g||j>x?(n.classList.remove("hovering-zoom"),n.classList.remove("hovering-pan")):u.globals.zoomEnabled?(n.classList.remove("hovering-pan"),n.classList.add("hovering-zoom")):u.globals.panEnabled&&(n.classList.remove("hovering-zoom"),n.classList.add("hovering-pan"));var E=Math.round(S/y),T=Math.floor(j/b);w&&!u.config.xaxis.convertedCatToNumeric&&(E=Math.ceil(S/y),E-=1);var I=null,F=null,m=u.globals.seriesXvalues.map(function($){return $.filter(function(Y){return _.isNumber(Y)})}),k=u.globals.seriesYvalues.map(function($){return $.filter(function(Y){return _.isNumber(Y)})});if(u.globals.isXNumeric){var N=this.ttCtx.getElGrid().getBoundingClientRect(),R=S*(N.width/g),z=j*(N.height/x);I=(F=this.closestInMultiArray(R,z,m,k)).index,E=F.j,I!==null&&(m=u.globals.seriesXvalues[I],E=(F=this.closestInArray(R,m)).index)}return u.globals.capturedSeriesIndex=I===null?-1:I,(!E||E<1)&&(E=0),u.globals.isBarHorizontal?u.globals.capturedDataPointIndex=T:u.globals.capturedDataPointIndex=E,{capturedSeries:I,j:u.globals.isBarHorizontal?T:E,hoverX:S,hoverY:j}}},{key:"closestInMultiArray",value:function(i,n,a,l){var d=this.w,u=0,h=null,g=-1;d.globals.series.length>1?u=this.getFirstActiveXArray(a):h=0;var x=a[u][0],y=Math.abs(i-x);if(a.forEach(function(S){S.forEach(function(j,E){var T=Math.abs(i-j);T<=y&&(y=T,g=E)})}),g!==-1){var b=l[u][g],w=Math.abs(n-b);h=u,l.forEach(function(S,j){var E=Math.abs(n-S[g]);E<=w&&(w=E,h=j)})}return{index:h,j:g}}},{key:"getFirstActiveXArray",value:function(i){for(var n=this.w,a=0,l=i.map(function(u,h){return u.length>0?h:-1}),d=0;d0)for(var l=0;l *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var i=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(i=D(i)).sort(function(a,l){var d=Number(a.getAttribute("data:realIndex")),u=Number(l.getAttribute("data:realIndex"));return ud?-1:0});var n=[];return i.forEach(function(a){n.push(a.querySelector(".apexcharts-marker"))}),n}},{key:"hasMarkers",value:function(i){return this.getElMarkers(i).length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(i){var n=this.w,a=n.config.markers.hover.size;return a===void 0&&(a=n.globals.markers.size[i]+n.config.markers.hover.sizeOffset),a}},{key:"toggleAllTooltipSeriesGroups",value:function(i){var n=this.w,a=this.ttCtx;a.allTooltipSeriesGroups.length===0&&(a.allTooltipSeriesGroups=n.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var l=a.allTooltipSeriesGroups,d=0;d
').concat(U.attrs.name,""),Y+="
".concat(U.val,"
")}),m.innerHTML=$+"",k.innerHTML=Y+""};h?x.globals.seriesGoals[n][a]&&Array.isArray(x.globals.seriesGoals[n][a])?N():(m.innerHTML="",k.innerHTML=""):N()}else m.innerHTML="",k.innerHTML="";if(E!==null&&(l[n].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=x.config.tooltip.z.title,l[n].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=E!==void 0?E:""),h&&T[0]){if(x.config.tooltip.hideEmptySeries){var R=l[n].querySelector(".apexcharts-tooltip-marker"),z=l[n].querySelector(".apexcharts-tooltip-text");parseFloat(b)==0?(R.style.display="none",z.style.display="none"):(R.style.display="block",z.style.display="block")}b==null||x.globals.ancillaryCollapsedSeriesIndices.indexOf(n)>-1||x.globals.collapsedSeriesIndices.indexOf(n)>-1?T[0].parentNode.style.display="none":T[0].parentNode.style.display=x.config.tooltip.items.display}}},{key:"toggleActiveInactiveSeries",value:function(i){var n=this.w;if(i)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=n.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");a&&(a.classList.add("apexcharts-active"),a.style.display=n.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(i){var n=i.i,a=i.j,l=this.w,d=this.ctx.series.filteredSeriesX(),u="",h="",g=null,x=null,y={series:l.globals.series,seriesIndex:n,dataPointIndex:a,w:l},b=l.globals.ttZFormatter;a===null?x=l.globals.series[n]:l.globals.isXNumeric&&l.config.chart.type!=="treemap"?(u=d[n][a],d[n].length===0&&(u=d[this.tooltipUtil.getFirstActiveXArray(d)][a])):u=l.globals.labels[a]!==void 0?l.globals.labels[a]:"";var w=u;return l.globals.isXNumeric&&l.config.xaxis.type==="datetime"?u=new qe(this.ctx).xLabelFormat(l.globals.ttKeyFormatter,w,w,{i:void 0,dateFormatter:new Re(this.ctx).formatDate,w:this.w}):u=l.globals.isBarHorizontal?l.globals.yLabelFormatters[0](w,y):l.globals.xLabelFormatter(w,y),l.config.tooltip.x.formatter!==void 0&&(u=l.globals.ttKeyFormatter(w,y)),l.globals.seriesZ.length>0&&l.globals.seriesZ[n].length>0&&(g=b(l.globals.seriesZ[n][a],l)),h=typeof l.config.xaxis.tooltip.formatter=="function"?l.globals.xaxisTooltipFormatter(w,y):u,{val:Array.isArray(x)?x.join(" "):x,xVal:Array.isArray(u)?u.join(" "):u,xAxisTTVal:Array.isArray(h)?h.join(" "):h,zVal:g}}},{key:"handleCustomTooltip",value:function(i){var n=i.i,a=i.j,l=i.y1,d=i.y2,u=i.w,h=this.ttCtx.getElTooltip(),g=u.config.tooltip.custom;Array.isArray(g)&&g[n]&&(g=g[n]),h.innerHTML=g({ctx:this.ctx,series:u.globals.series,seriesIndex:n,dataPointIndex:a,y1:l,y2:d,w:u})}}]),O}(),Ko=function(){function O(i){c(this,O),this.ttCtx=i,this.ctx=i.ctx,this.w=i.w}return v(O,[{key:"moveXCrosshairs",value:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=this.ttCtx,l=this.w,d=a.getElXCrosshairs(),u=i-a.xcrosshairsWidth/2,h=l.globals.labels.slice().length;if(n!==null&&(u=l.globals.gridWidth/h*n),d===null||l.globals.isBarHorizontal||(d.setAttribute("x",u),d.setAttribute("x1",u),d.setAttribute("x2",u),d.setAttribute("y2",l.globals.gridHeight),d.classList.add("apexcharts-active")),u<0&&(u=0),u>l.globals.gridWidth&&(u=l.globals.gridWidth),a.isXAxisTooltipEnabled){var g=u;l.config.xaxis.crosshairs.width!=="tickWidth"&&l.config.xaxis.crosshairs.width!=="barWidth"||(g=u+a.xcrosshairsWidth/2),this.moveXAxisTooltip(g)}}},{key:"moveYCrosshairs",value:function(i){var n=this.ttCtx;n.ycrosshairs!==null&&X.setAttrs(n.ycrosshairs,{y1:i,y2:i}),n.ycrosshairsHidden!==null&&X.setAttrs(n.ycrosshairsHidden,{y1:i,y2:i})}},{key:"moveXAxisTooltip",value:function(i){var n=this.w,a=this.ttCtx;if(a.xaxisTooltip!==null&&a.xcrosshairsWidth!==0){a.xaxisTooltip.classList.add("apexcharts-active");var l=a.xaxisOffY+n.config.xaxis.tooltip.offsetY+n.globals.translateY+1+n.config.xaxis.offsetY;if(i-=a.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(i)){i+=n.globals.translateX;var d;d=new X(this.ctx).getTextRects(a.xaxisTooltipText.innerHTML),a.xaxisTooltipText.style.minWidth=d.width+"px",a.xaxisTooltip.style.left=i+"px",a.xaxisTooltip.style.top=l+"px"}}}},{key:"moveYAxisTooltip",value:function(i){var n=this.w,a=this.ttCtx;a.yaxisTTEls===null&&(a.yaxisTTEls=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var l=parseInt(a.ycrosshairsHidden.getAttribute("y1"),10),d=n.globals.translateY+l,u=a.yaxisTTEls[i].getBoundingClientRect().height,h=n.globals.translateYAxisX[i]-2;n.config.yaxis[i].opposite&&(h-=26),d-=u/2,n.globals.ignoreYAxisIndexes.indexOf(i)===-1?(a.yaxisTTEls[i].classList.add("apexcharts-active"),a.yaxisTTEls[i].style.top=d+"px",a.yaxisTTEls[i].style.left=h+n.config.yaxis[i].tooltip.offsetX+"px"):a.yaxisTTEls[i].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,l=this.w,d=this.ttCtx,u=d.getElTooltip(),h=d.tooltipRect,g=a!==null?parseFloat(a):1,x=parseFloat(i)+g+5,y=parseFloat(n)+g/2;if(x>l.globals.gridWidth/2&&(x=x-h.ttWidth-g-10),x>l.globals.gridWidth-h.ttWidth-10&&(x=l.globals.gridWidth-h.ttWidth),x<-20&&(x=-20),l.config.tooltip.followCursor){var b=d.getElGrid().getBoundingClientRect();(x=d.e.clientX-b.left)>l.globals.gridWidth/2&&(x-=d.tooltipRect.ttWidth),(y=d.e.clientY+l.globals.translateY-b.top)>l.globals.gridHeight/2&&(y-=d.tooltipRect.ttHeight)}else l.globals.isBarHorizontal||h.ttHeight/2+y>l.globals.gridHeight&&(y=l.globals.gridHeight-h.ttHeight+l.globals.translateY);isNaN(x)||(x+=l.globals.translateX,u.style.left=x+"px",u.style.top=y+"px")}},{key:"moveMarkers",value:function(i,n){var a=this.w,l=this.ttCtx;if(a.globals.markers.size[i]>0)for(var d=a.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(i,"'] .apexcharts-marker")),u=0;u0&&(y.setAttribute("r",g),y.setAttribute("cx",a),y.setAttribute("cy",l)),this.moveXCrosshairs(a),u.fixedTooltip||this.moveTooltip(a,l,g)}}},{key:"moveDynamicPointsOnHover",value:function(i){var n,a=this.ttCtx,l=a.w,d=0,u=0,h=l.globals.pointsArray;n=new Me(this.ctx).getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var g=a.tooltipUtil.getHoverMarkerSize(n);h[n]&&(d=h[n][i][0],u=h[n][i][1]);var x=a.tooltipUtil.getAllMarkers();if(x!==null)for(var y=0;y0?(x[y]&&x[y].setAttribute("r",g),x[y]&&x[y].setAttribute("cy",w)):x[y]&&x[y].setAttribute("r",0)}}this.moveXCrosshairs(d),a.fixedTooltip||this.moveTooltip(d,u||l.globals.gridHeight,g)}},{key:"moveStickyTooltipOverBars",value:function(i,n){var a=this.w,l=this.ttCtx,d=a.globals.columnSeries?a.globals.columnSeries.length:a.globals.series.length,u=d>=2&&d%2==0?Math.floor(d/2):Math.floor(d/2)+1;a.globals.isBarHorizontal&&(u=new Me(this.ctx).getActiveConfigSeriesIndex("desc")+1);var h=a.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(u,"'] path[j='").concat(i,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(u,"'] path[j='").concat(i,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(u,"'] path[j='").concat(i,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(u,"'] path[j='").concat(i,"']"));h||typeof n!="number"||(h=a.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(n,"'] path[j='").concat(i,`'], +`),this.t.download&&u.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var x=0;x0&&l.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:a.globals.gridWidth,maxY:a.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var a=this.w,l=this.xyRatios;if(!a.globals.zoomEnabled){if(a.globals.selection!==void 0&&a.globals.selection!==null)this.drawSelectionRect(a.globals.selection);else if(a.config.chart.selection.xaxis.min!==void 0&&a.config.chart.selection.xaxis.max!==void 0){var d=(a.config.chart.selection.xaxis.min-a.globals.minX)/l.xRatio,u=a.globals.gridWidth-(a.globals.maxX-a.config.chart.selection.xaxis.max)/l.xRatio-d;a.globals.isRangeBar&&(d=(a.config.chart.selection.xaxis.min-a.globals.yAxisScale[0].niceMin)/l.invertedYRatio,u=(a.config.chart.selection.xaxis.max-a.config.chart.selection.xaxis.min)/l.invertedYRatio);var h={x:d,y:0,width:u,height:a.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(h),this.makeSelectionRectDraggable(),typeof a.config.chart.events.selection=="function"&&a.config.chart.events.selection(this.ctx,{xaxis:{min:a.config.chart.selection.xaxis.min,max:a.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(a){var l=a.x,d=a.y,u=a.width,h=a.height,g=a.translateX,x=g===void 0?0:g,y=a.translateY,b=y===void 0?0:y,w=this.w,S=this.zoomRect,j=this.selectionRect;if(this.dragged||w.globals.selection!==null){var L={transform:"translate("+x+", "+b+")"};w.globals.zoomEnabled&&this.dragged&&(u<0&&(u=1),S.attr({x:l,y:d,width:u,height:h,fill:w.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":w.config.chart.zoom.zoomedArea.fill.opacity,stroke:w.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":w.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":w.config.chart.zoom.zoomedArea.stroke.opacity}),X.setAttrs(S.node,L)),w.globals.selectionEnabled&&(j.attr({x:l,y:d,width:u>0?u:0,height:h>0?h:0,fill:w.config.chart.selection.fill.color,"fill-opacity":w.config.chart.selection.fill.opacity,stroke:w.config.chart.selection.stroke.color,"stroke-width":w.config.chart.selection.stroke.width,"stroke-dasharray":w.config.chart.selection.stroke.dashArray,"stroke-opacity":w.config.chart.selection.stroke.opacity}),X.setAttrs(j.node,L))}}},{key:"hideSelectionRect",value:function(a){a&&a.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(a){var l=a.context,d=a.zoomtype,u=this.w,h=l,g=this.gridRect.getBoundingClientRect(),x=h.startX-1,y=h.startY,b=!1,w=!1,S=h.clientX-g.left-x,j=h.clientY-g.top-y,L={};return Math.abs(S+x)>u.globals.gridWidth?S=u.globals.gridWidth-x:h.clientX-g.left<0&&(S=x),x>h.clientX-g.left&&(b=!0,S=Math.abs(S)),y>h.clientY-g.top&&(w=!0,j=Math.abs(j)),L=d==="x"?{x:b?x-S:x,y:0,width:S,height:u.globals.gridHeight}:d==="y"?{x:0,y:w?y-j:y,width:u.globals.gridWidth,height:j}:{x:b?x-S:x,y:w?y-j:y,width:S,height:j},h.drawSelectionRect(L),h.selectionDragging("resizing"),L}},{key:"selectionDragging",value:function(a,l){var d=this,u=this.w,h=this.xyRatios,g=this.selectionRect,x=0;a==="resizing"&&(x=30);var y=function(w){return parseFloat(g.node.getAttribute(w))},b={x:y("x"),y:y("y"),width:y("width"),height:y("height")};u.globals.selection=b,typeof u.config.chart.events.selection=="function"&&u.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var w,S,j,L,T=d.gridRect.getBoundingClientRect(),I=g.node.getBoundingClientRect();u.globals.isRangeBar?(w=u.globals.yAxisScale[0].niceMin+(I.left-T.left)*h.invertedYRatio,S=u.globals.yAxisScale[0].niceMin+(I.right-T.left)*h.invertedYRatio,j=0,L=1):(w=u.globals.xAxisScale.niceMin+(I.left-T.left)*h.xRatio,S=u.globals.xAxisScale.niceMin+(I.right-T.left)*h.xRatio,j=u.globals.yAxisScale[0].niceMin+(T.bottom-I.bottom)*h.yRatio[0],L=u.globals.yAxisScale[0].niceMax-(I.top-T.top)*h.yRatio[0]);var F={xaxis:{min:w,max:S},yaxis:{min:j,max:L}};u.config.chart.events.selection(d.ctx,F),u.config.chart.brush.enabled&&u.config.chart.events.brushScrolled!==void 0&&u.config.chart.events.brushScrolled(d.ctx,F)},x))}},{key:"selectionDrawn",value:function(a){var l=a.context,d=a.zoomtype,u=this.w,h=l,g=this.xyRatios,x=this.ctx.toolbar;if(h.startX>h.endX){var y=h.startX;h.startX=h.endX,h.endX=y}if(h.startY>h.endY){var b=h.startY;h.startY=h.endY,h.endY=b}var w=void 0,S=void 0;u.globals.isRangeBar?(w=u.globals.yAxisScale[0].niceMin+h.startX*g.invertedYRatio,S=u.globals.yAxisScale[0].niceMin+h.endX*g.invertedYRatio):(w=u.globals.xAxisScale.niceMin+h.startX*g.xRatio,S=u.globals.xAxisScale.niceMin+h.endX*g.xRatio);var j=[],L=[];if(u.config.yaxis.forEach(function(R,z){j.push(u.globals.yAxisScale[z].niceMax-g.yRatio[z]*h.startY),L.push(u.globals.yAxisScale[z].niceMax-g.yRatio[z]*h.endY)}),h.dragged&&(h.dragX>10||h.dragY>10)&&w!==S){if(u.globals.zoomEnabled){var T=_.clone(u.globals.initialConfig.yaxis),I=_.clone(u.globals.initialConfig.xaxis);if(u.globals.zoomed=!0,u.config.xaxis.convertedCatToNumeric&&(w=Math.floor(w),S=Math.floor(S),w<1&&(w=1,S=u.globals.dataPoints),S-w<2&&(S=w+1)),d!=="xy"&&d!=="x"||(I={min:w,max:S}),d!=="xy"&&d!=="y"||T.forEach(function(R,z){T[z].min=L[z],T[z].max=j[z]}),x){var F=x.getBeforeZoomRange(I,T);F&&(I=F.xaxis?F.xaxis:I,T=F.yaxis?F.yaxis:T)}var m={xaxis:I};u.config.chart.group||(m.yaxis=T),h.ctx.updateHelpers._updateOptions(m,!1,h.w.config.chart.animations.dynamicAnimation.enabled),typeof u.config.chart.events.zoomed=="function"&&x.zoomCallback(I,T)}else if(u.globals.selectionEnabled){var k,N=null;k={min:w,max:S},d!=="xy"&&d!=="y"||(N=_.clone(u.config.yaxis)).forEach(function(R,z){N[z].min=L[z],N[z].max=j[z]}),u.globals.selection=h.selection,typeof u.config.chart.events.selection=="function"&&u.config.chart.events.selection(h.ctx,{xaxis:k,yaxis:N})}}}},{key:"panDragging",value:function(a){var l=a.context,d=this.w,u=l;if(d.globals.lastClientPosition.x!==void 0){var h=d.globals.lastClientPosition.x-u.clientX,g=d.globals.lastClientPosition.y-u.clientY;Math.abs(h)>Math.abs(g)&&h>0?this.moveDirection="left":Math.abs(h)>Math.abs(g)&&h<0?this.moveDirection="right":Math.abs(g)>Math.abs(h)&&g>0?this.moveDirection="up":Math.abs(g)>Math.abs(h)&&g<0&&(this.moveDirection="down")}d.globals.lastClientPosition={x:u.clientX,y:u.clientY};var x=d.globals.isRangeBar?d.globals.minY:d.globals.minX,y=d.globals.isRangeBar?d.globals.maxY:d.globals.maxX;d.config.xaxis.convertedCatToNumeric||u.panScrolled(x,y)}},{key:"delayedPanScrolled",value:function(){var a=this.w,l=a.globals.minX,d=a.globals.maxX,u=(a.globals.maxX-a.globals.minX)/2;this.moveDirection==="left"?(l=a.globals.minX+u,d=a.globals.maxX+u):this.moveDirection==="right"&&(l=a.globals.minX-u,d=a.globals.maxX-u),l=Math.floor(l),d=Math.floor(d),this.updateScrolledChart({xaxis:{min:l,max:d}},l,d)}},{key:"panScrolled",value:function(a,l){var d=this.w,u=this.xyRatios,h=_.clone(d.globals.initialConfig.yaxis),g=u.xRatio,x=d.globals.minX,y=d.globals.maxX;d.globals.isRangeBar&&(g=u.invertedYRatio,x=d.globals.minY,y=d.globals.maxY),this.moveDirection==="left"?(a=x+d.globals.gridWidth/15*g,l=y+d.globals.gridWidth/15*g):this.moveDirection==="right"&&(a=x-d.globals.gridWidth/15*g,l=y-d.globals.gridWidth/15*g),d.globals.isRangeBar||(ad.globals.initialMaxX)&&(a=x,l=y);var b={xaxis:{min:a,max:l}};d.config.chart.group||(b.yaxis=h),this.updateScrolledChart(b,a,l)}},{key:"updateScrolledChart",value:function(a,l,d){var u=this.w;this.ctx.updateHelpers._updateOptions(a,!1,!1),typeof u.config.chart.events.scrolled=="function"&&u.config.chart.events.scrolled(this.ctx,{xaxis:{min:l,max:d}})}}]),n}(),qo=function(){function O(i){c(this,O),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx}return v(O,[{key:"getNearestValues",value:function(i){var n=i.hoverArea,a=i.elGrid,l=i.clientX,d=i.clientY,u=this.w,h=a.getBoundingClientRect(),g=h.width,x=h.height,y=g/(u.globals.dataPoints-1),b=x/u.globals.dataPoints,w=this.hasBars();!u.globals.comboCharts&&!w||u.config.xaxis.convertedCatToNumeric||(y=g/u.globals.dataPoints);var S=l-h.left-u.globals.barPadForNumericAxis,j=d-h.top;S<0||j<0||S>g||j>x?(n.classList.remove("hovering-zoom"),n.classList.remove("hovering-pan")):u.globals.zoomEnabled?(n.classList.remove("hovering-pan"),n.classList.add("hovering-zoom")):u.globals.panEnabled&&(n.classList.remove("hovering-zoom"),n.classList.add("hovering-pan"));var L=Math.round(S/y),T=Math.floor(j/b);w&&!u.config.xaxis.convertedCatToNumeric&&(L=Math.ceil(S/y),L-=1);var I=null,F=null,m=u.globals.seriesXvalues.map(function($){return $.filter(function(Y){return _.isNumber(Y)})}),k=u.globals.seriesYvalues.map(function($){return $.filter(function(Y){return _.isNumber(Y)})});if(u.globals.isXNumeric){var N=this.ttCtx.getElGrid().getBoundingClientRect(),R=S*(N.width/g),z=j*(N.height/x);I=(F=this.closestInMultiArray(R,z,m,k)).index,L=F.j,I!==null&&(m=u.globals.seriesXvalues[I],L=(F=this.closestInArray(R,m)).index)}return u.globals.capturedSeriesIndex=I===null?-1:I,(!L||L<1)&&(L=0),u.globals.isBarHorizontal?u.globals.capturedDataPointIndex=T:u.globals.capturedDataPointIndex=L,{capturedSeries:I,j:u.globals.isBarHorizontal?T:L,hoverX:S,hoverY:j}}},{key:"closestInMultiArray",value:function(i,n,a,l){var d=this.w,u=0,h=null,g=-1;d.globals.series.length>1?u=this.getFirstActiveXArray(a):h=0;var x=a[u][0],y=Math.abs(i-x);if(a.forEach(function(S){S.forEach(function(j,L){var T=Math.abs(i-j);T<=y&&(y=T,g=L)})}),g!==-1){var b=l[u][g],w=Math.abs(n-b);h=u,l.forEach(function(S,j){var L=Math.abs(n-S[g]);L<=w&&(w=L,h=j)})}return{index:h,j:g}}},{key:"getFirstActiveXArray",value:function(i){for(var n=this.w,a=0,l=i.map(function(u,h){return u.length>0?h:-1}),d=0;d0)for(var l=0;l *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var i=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(i=D(i)).sort(function(a,l){var d=Number(a.getAttribute("data:realIndex")),u=Number(l.getAttribute("data:realIndex"));return ud?-1:0});var n=[];return i.forEach(function(a){n.push(a.querySelector(".apexcharts-marker"))}),n}},{key:"hasMarkers",value:function(i){return this.getElMarkers(i).length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(i){var n=this.w,a=n.config.markers.hover.size;return a===void 0&&(a=n.globals.markers.size[i]+n.config.markers.hover.sizeOffset),a}},{key:"toggleAllTooltipSeriesGroups",value:function(i){var n=this.w,a=this.ttCtx;a.allTooltipSeriesGroups.length===0&&(a.allTooltipSeriesGroups=n.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var l=a.allTooltipSeriesGroups,d=0;d
').concat(U.attrs.name,""),Y+="
".concat(U.val,"
")}),m.innerHTML=$+"",k.innerHTML=Y+""};h?x.globals.seriesGoals[n][a]&&Array.isArray(x.globals.seriesGoals[n][a])?N():(m.innerHTML="",k.innerHTML=""):N()}else m.innerHTML="",k.innerHTML="";if(L!==null&&(l[n].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=x.config.tooltip.z.title,l[n].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=L!==void 0?L:""),h&&T[0]){if(x.config.tooltip.hideEmptySeries){var R=l[n].querySelector(".apexcharts-tooltip-marker"),z=l[n].querySelector(".apexcharts-tooltip-text");parseFloat(b)==0?(R.style.display="none",z.style.display="none"):(R.style.display="block",z.style.display="block")}b==null||x.globals.ancillaryCollapsedSeriesIndices.indexOf(n)>-1||x.globals.collapsedSeriesIndices.indexOf(n)>-1?T[0].parentNode.style.display="none":T[0].parentNode.style.display=x.config.tooltip.items.display}}},{key:"toggleActiveInactiveSeries",value:function(i){var n=this.w;if(i)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=n.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");a&&(a.classList.add("apexcharts-active"),a.style.display=n.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(i){var n=i.i,a=i.j,l=this.w,d=this.ctx.series.filteredSeriesX(),u="",h="",g=null,x=null,y={series:l.globals.series,seriesIndex:n,dataPointIndex:a,w:l},b=l.globals.ttZFormatter;a===null?x=l.globals.series[n]:l.globals.isXNumeric&&l.config.chart.type!=="treemap"?(u=d[n][a],d[n].length===0&&(u=d[this.tooltipUtil.getFirstActiveXArray(d)][a])):u=l.globals.labels[a]!==void 0?l.globals.labels[a]:"";var w=u;return l.globals.isXNumeric&&l.config.xaxis.type==="datetime"?u=new qe(this.ctx).xLabelFormat(l.globals.ttKeyFormatter,w,w,{i:void 0,dateFormatter:new Re(this.ctx).formatDate,w:this.w}):u=l.globals.isBarHorizontal?l.globals.yLabelFormatters[0](w,y):l.globals.xLabelFormatter(w,y),l.config.tooltip.x.formatter!==void 0&&(u=l.globals.ttKeyFormatter(w,y)),l.globals.seriesZ.length>0&&l.globals.seriesZ[n].length>0&&(g=b(l.globals.seriesZ[n][a],l)),h=typeof l.config.xaxis.tooltip.formatter=="function"?l.globals.xaxisTooltipFormatter(w,y):u,{val:Array.isArray(x)?x.join(" "):x,xVal:Array.isArray(u)?u.join(" "):u,xAxisTTVal:Array.isArray(h)?h.join(" "):h,zVal:g}}},{key:"handleCustomTooltip",value:function(i){var n=i.i,a=i.j,l=i.y1,d=i.y2,u=i.w,h=this.ttCtx.getElTooltip(),g=u.config.tooltip.custom;Array.isArray(g)&&g[n]&&(g=g[n]),h.innerHTML=g({ctx:this.ctx,series:u.globals.series,seriesIndex:n,dataPointIndex:a,y1:l,y2:d,w:u})}}]),O}(),Ko=function(){function O(i){c(this,O),this.ttCtx=i,this.ctx=i.ctx,this.w=i.w}return v(O,[{key:"moveXCrosshairs",value:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=this.ttCtx,l=this.w,d=a.getElXCrosshairs(),u=i-a.xcrosshairsWidth/2,h=l.globals.labels.slice().length;if(n!==null&&(u=l.globals.gridWidth/h*n),d===null||l.globals.isBarHorizontal||(d.setAttribute("x",u),d.setAttribute("x1",u),d.setAttribute("x2",u),d.setAttribute("y2",l.globals.gridHeight),d.classList.add("apexcharts-active")),u<0&&(u=0),u>l.globals.gridWidth&&(u=l.globals.gridWidth),a.isXAxisTooltipEnabled){var g=u;l.config.xaxis.crosshairs.width!=="tickWidth"&&l.config.xaxis.crosshairs.width!=="barWidth"||(g=u+a.xcrosshairsWidth/2),this.moveXAxisTooltip(g)}}},{key:"moveYCrosshairs",value:function(i){var n=this.ttCtx;n.ycrosshairs!==null&&X.setAttrs(n.ycrosshairs,{y1:i,y2:i}),n.ycrosshairsHidden!==null&&X.setAttrs(n.ycrosshairsHidden,{y1:i,y2:i})}},{key:"moveXAxisTooltip",value:function(i){var n=this.w,a=this.ttCtx;if(a.xaxisTooltip!==null&&a.xcrosshairsWidth!==0){a.xaxisTooltip.classList.add("apexcharts-active");var l=a.xaxisOffY+n.config.xaxis.tooltip.offsetY+n.globals.translateY+1+n.config.xaxis.offsetY;if(i-=a.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(i)){i+=n.globals.translateX;var d;d=new X(this.ctx).getTextRects(a.xaxisTooltipText.innerHTML),a.xaxisTooltipText.style.minWidth=d.width+"px",a.xaxisTooltip.style.left=i+"px",a.xaxisTooltip.style.top=l+"px"}}}},{key:"moveYAxisTooltip",value:function(i){var n=this.w,a=this.ttCtx;a.yaxisTTEls===null&&(a.yaxisTTEls=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var l=parseInt(a.ycrosshairsHidden.getAttribute("y1"),10),d=n.globals.translateY+l,u=a.yaxisTTEls[i].getBoundingClientRect().height,h=n.globals.translateYAxisX[i]-2;n.config.yaxis[i].opposite&&(h-=26),d-=u/2,n.globals.ignoreYAxisIndexes.indexOf(i)===-1?(a.yaxisTTEls[i].classList.add("apexcharts-active"),a.yaxisTTEls[i].style.top=d+"px",a.yaxisTTEls[i].style.left=h+n.config.yaxis[i].tooltip.offsetX+"px"):a.yaxisTTEls[i].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,l=this.w,d=this.ttCtx,u=d.getElTooltip(),h=d.tooltipRect,g=a!==null?parseFloat(a):1,x=parseFloat(i)+g+5,y=parseFloat(n)+g/2;if(x>l.globals.gridWidth/2&&(x=x-h.ttWidth-g-10),x>l.globals.gridWidth-h.ttWidth-10&&(x=l.globals.gridWidth-h.ttWidth),x<-20&&(x=-20),l.config.tooltip.followCursor){var b=d.getElGrid().getBoundingClientRect();(x=d.e.clientX-b.left)>l.globals.gridWidth/2&&(x-=d.tooltipRect.ttWidth),(y=d.e.clientY+l.globals.translateY-b.top)>l.globals.gridHeight/2&&(y-=d.tooltipRect.ttHeight)}else l.globals.isBarHorizontal||h.ttHeight/2+y>l.globals.gridHeight&&(y=l.globals.gridHeight-h.ttHeight+l.globals.translateY);isNaN(x)||(x+=l.globals.translateX,u.style.left=x+"px",u.style.top=y+"px")}},{key:"moveMarkers",value:function(i,n){var a=this.w,l=this.ttCtx;if(a.globals.markers.size[i]>0)for(var d=a.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(i,"'] .apexcharts-marker")),u=0;u0&&(y.setAttribute("r",g),y.setAttribute("cx",a),y.setAttribute("cy",l)),this.moveXCrosshairs(a),u.fixedTooltip||this.moveTooltip(a,l,g)}}},{key:"moveDynamicPointsOnHover",value:function(i){var n,a=this.ttCtx,l=a.w,d=0,u=0,h=l.globals.pointsArray;n=new Me(this.ctx).getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var g=a.tooltipUtil.getHoverMarkerSize(n);h[n]&&(d=h[n][i][0],u=h[n][i][1]);var x=a.tooltipUtil.getAllMarkers();if(x!==null)for(var y=0;y0?(x[y]&&x[y].setAttribute("r",g),x[y]&&x[y].setAttribute("cy",w)):x[y]&&x[y].setAttribute("r",0)}}this.moveXCrosshairs(d),a.fixedTooltip||this.moveTooltip(d,u||l.globals.gridHeight,g)}},{key:"moveStickyTooltipOverBars",value:function(i,n){var a=this.w,l=this.ttCtx,d=a.globals.columnSeries?a.globals.columnSeries.length:a.globals.series.length,u=d>=2&&d%2==0?Math.floor(d/2):Math.floor(d/2)+1;a.globals.isBarHorizontal&&(u=new Me(this.ctx).getActiveConfigSeriesIndex("desc")+1);var h=a.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(u,"'] path[j='").concat(i,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(u,"'] path[j='").concat(i,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(u,"'] path[j='").concat(i,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(u,"'] path[j='").concat(i,"']"));h||typeof n!="number"||(h=a.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(n,"'] path[j='").concat(i,`'], .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(i,`'], .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(i,`'], - .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(i,"']")));var g=h?parseFloat(h.getAttribute("cx")):0,x=h?parseFloat(h.getAttribute("cy")):0,y=h?parseFloat(h.getAttribute("barWidth")):0,b=l.getElGrid().getBoundingClientRect(),w=h&&(h.classList.contains("apexcharts-candlestick-area")||h.classList.contains("apexcharts-boxPlot-area"));a.globals.isXNumeric?(h&&!w&&(g-=d%2!=0?y/2:0),h&&w&&a.globals.comboCharts&&(g-=y/2)):a.globals.isBarHorizontal||(g=l.xAxisTicksPositions[i-1]+l.dataPointsDividedWidth/2,isNaN(g)&&(g=l.xAxisTicksPositions[i]-l.dataPointsDividedWidth/2)),a.globals.isBarHorizontal?x-=l.tooltipRect.ttHeight:a.config.tooltip.followCursor?x=l.e.clientY-b.top-l.tooltipRect.ttHeight/2:x+l.tooltipRect.ttHeight+15>a.globals.gridHeight&&(x=a.globals.gridHeight),a.globals.isBarHorizontal||this.moveXCrosshairs(g),l.fixedTooltip||this.moveTooltip(g,x||a.globals.gridHeight)}}]),O}(),Jo=function(){function O(i){c(this,O),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx,this.tooltipPosition=new Ko(i)}return v(O,[{key:"drawDynamicPoints",value:function(){var i=this.w,n=new X(this.ctx),a=new Ue(this.ctx),l=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series");l=D(l),i.config.chart.stacked&&l.sort(function(b,w){return parseFloat(b.getAttribute("data:realIndex"))-parseFloat(w.getAttribute("data:realIndex"))});for(var d=0;d2&&arguments[2]!==void 0?arguments[2]:null,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,d=this.w;d.config.chart.type!=="bubble"&&this.newPointSize(i,n);var u=n.getAttribute("cx"),h=n.getAttribute("cy");if(a!==null&&l!==null&&(u=a,h=l),this.tooltipPosition.moveXCrosshairs(u),!this.fixedTooltip){if(d.config.chart.type==="radar"){var g=this.ttCtx.getElGrid().getBoundingClientRect();u=this.ttCtx.e.clientX-g.left}this.tooltipPosition.moveTooltip(u,h,d.config.markers.hover.size)}}},{key:"enlargePoints",value:function(i){for(var n=this.w,a=this,l=this.ttCtx,d=i,u=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),h=n.config.markers.hover.size,g=0;g=0?i[n].setAttribute("r",a):i[n].setAttribute("r",0)}}}]),O}(),r5=function(){function O(i){c(this,O),this.w=i.w;var n=this.w;this.ttCtx=i,this.isVerticalGroupedRangeBar=!n.globals.isBarHorizontal&&n.config.chart.type==="rangeBar"&&n.config.plotOptions.bar.rangeBarGroupRows}return v(O,[{key:"getAttr",value:function(i,n){return parseFloat(i.target.getAttribute(n))}},{key:"handleHeatTreeTooltip",value:function(i){var n=i.e,a=i.opt,l=i.x,d=i.y,u=i.type,h=this.ttCtx,g=this.w;if(n.target.classList.contains("apexcharts-".concat(u,"-rect"))){var x=this.getAttr(n,"i"),y=this.getAttr(n,"j"),b=this.getAttr(n,"cx"),w=this.getAttr(n,"cy"),S=this.getAttr(n,"width"),j=this.getAttr(n,"height");if(h.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:x,j:y,shared:!1,e:n}),g.globals.capturedSeriesIndex=x,g.globals.capturedDataPointIndex=y,l=b+h.tooltipRect.ttWidth/2+S,d=w+h.tooltipRect.ttHeight/2-j/2,h.tooltipPosition.moveXCrosshairs(b+S/2),l>g.globals.gridWidth/2&&(l=b-h.tooltipRect.ttWidth/2+S),h.w.config.tooltip.followCursor){var E=g.globals.dom.elWrap.getBoundingClientRect();l=g.globals.clientX-E.left-(l>g.globals.gridWidth/2?h.tooltipRect.ttWidth:0),d=g.globals.clientY-E.top-(d>g.globals.gridHeight/2?h.tooltipRect.ttHeight:0)}}return{x:l,y:d}}},{key:"handleMarkerTooltip",value:function(i){var n,a,l=i.e,d=i.opt,u=i.x,h=i.y,g=this.w,x=this.ttCtx;if(l.target.classList.contains("apexcharts-marker")){var y=parseInt(d.paths.getAttribute("cx"),10),b=parseInt(d.paths.getAttribute("cy"),10),w=parseFloat(d.paths.getAttribute("val"));if(a=parseInt(d.paths.getAttribute("rel"),10),n=parseInt(d.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,x.intersect){var S=_.findAncestor(d.paths,"apexcharts-series");S&&(n=parseInt(S.getAttribute("data:realIndex"),10))}if(x.tooltipLabels.drawSeriesTexts({ttItems:d.ttItems,i:n,j:a,shared:!x.showOnIntersect&&g.config.tooltip.shared,e:l}),l.type==="mouseup"&&x.markerClick(l,n,a),g.globals.capturedSeriesIndex=n,g.globals.capturedDataPointIndex=a,u=y,h=b+g.globals.translateY-1.4*x.tooltipRect.ttHeight,x.w.config.tooltip.followCursor){var j=x.getElGrid().getBoundingClientRect();h=x.e.clientY+g.globals.translateY-j.top}w<0&&(h=b),x.marker.enlargeCurrentPoint(a,d.paths,u,h)}return{x:u,y:h}}},{key:"handleBarTooltip",value:function(i){var n,a,l=i.e,d=i.opt,u=this.w,h=this.ttCtx,g=h.getElTooltip(),x=0,y=0,b=0,w=this.getBarTooltipXY({e:l,opt:d});n=w.i;var S=w.barHeight,j=w.j;u.globals.capturedSeriesIndex=n,u.globals.capturedDataPointIndex=j,u.globals.isBarHorizontal&&h.tooltipUtil.hasBars()||!u.config.tooltip.shared?(y=w.x,b=w.y,a=Array.isArray(u.config.stroke.width)?u.config.stroke.width[n]:u.config.stroke.width,x=y):u.globals.comboCharts||u.config.tooltip.shared||(x/=2),isNaN(b)&&(b=u.globals.svgHeight-h.tooltipRect.ttHeight);var E=parseInt(d.paths.parentNode.getAttribute("data:realIndex"),10),T=u.globals.isMultipleYAxis?u.config.yaxis[E]&&u.config.yaxis[E].reversed:u.config.yaxis[0].reversed;if(y+h.tooltipRect.ttWidth>u.globals.gridWidth&&!T?y-=h.tooltipRect.ttWidth:y<0&&(y=0),h.w.config.tooltip.followCursor){var I=h.getElGrid().getBoundingClientRect();b=h.e.clientY-I.top}h.tooltip===null&&(h.tooltip=u.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),u.config.tooltip.shared||(u.globals.comboBarCount>0?h.tooltipPosition.moveXCrosshairs(x+a/2):h.tooltipPosition.moveXCrosshairs(x)),!h.fixedTooltip&&(!u.config.tooltip.shared||u.globals.isBarHorizontal&&h.tooltipUtil.hasBars())&&(T&&(y-=h.tooltipRect.ttWidth)<0&&(y=0),!T||u.globals.isBarHorizontal&&h.tooltipUtil.hasBars()||(b=b+S-2*(u.globals.series[n][j]<0?S:0)),b=b+u.globals.translateY-h.tooltipRect.ttHeight/2,g.style.left=y+u.globals.translateX+"px",g.style.top=b+"px")}},{key:"getBarTooltipXY",value:function(i){var n=this,a=i.e,l=i.opt,d=this.w,u=null,h=this.ttCtx,g=0,x=0,y=0,b=0,w=0,S=a.target.classList;if(S.contains("apexcharts-bar-area")||S.contains("apexcharts-candlestick-area")||S.contains("apexcharts-boxPlot-area")||S.contains("apexcharts-rangebar-area")){var j=a.target,E=j.getBoundingClientRect(),T=l.elGrid.getBoundingClientRect(),I=E.height;w=E.height;var F=E.width,m=parseInt(j.getAttribute("cx"),10),k=parseInt(j.getAttribute("cy"),10);b=parseFloat(j.getAttribute("barWidth"));var N=a.type==="touchmove"?a.touches[0].clientX:a.clientX;u=parseInt(j.getAttribute("j"),10),g=parseInt(j.parentNode.getAttribute("rel"),10)-1;var R=j.getAttribute("data-range-y1"),z=j.getAttribute("data-range-y2");d.globals.comboCharts&&(g=parseInt(j.parentNode.getAttribute("data:realIndex"),10));var $=function(U){return d.globals.isXNumeric?m-F/2:n.isVerticalGroupedRangeBar?m+F/2:m-h.dataPointsDividedWidth+F/2},Y=function(){return k-h.dataPointsDividedHeight+I/2-h.tooltipRect.ttHeight/2};h.tooltipLabels.drawSeriesTexts({ttItems:l.ttItems,i:g,j:u,y1:R?parseInt(R,10):null,y2:z?parseInt(z,10):null,shared:!h.showOnIntersect&&d.config.tooltip.shared,e:a}),d.config.tooltip.followCursor?d.globals.isBarHorizontal?(x=N-T.left+15,y=Y()):(x=$(),y=a.clientY-T.top-h.tooltipRect.ttHeight/2-15):d.globals.isBarHorizontal?((x=m)0&&a.setAttribute("width",n.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var i=this.w,n=this.ttCtx;n.ycrosshairs=i.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),n.ycrosshairsHidden=i.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(i,n,a){var l=this.ttCtx,d=this.w,u=d.globals.yLabelFormatters[i];if(l.yaxisTooltips[i]){var h=l.getElGrid().getBoundingClientRect(),g=(n-h.top)*a.yRatio[i],x=d.globals.maxYArr[i]-d.globals.minYArr[i],y=d.globals.minYArr[i]+(x-g);l.tooltipPosition.moveYCrosshairs(n-h.top),l.yaxisTooltipText[i].innerHTML=u(y),l.tooltipPosition.moveYAxisTooltip(i)}}}]),O}(),R1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w;var n=this.w;this.tConfig=n.config.tooltip,this.tooltipUtil=new qo(this),this.tooltipLabels=new Qo(this),this.tooltipPosition=new Ko(this),this.marker=new Jo(this),this.intersect=new r5(this),this.axesTooltip=new i5(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!n.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return v(O,[{key:"getElTooltip",value:function(i){return i||(i=this),i.w.globals.dom.baseEl?i.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(i){var n=this.w;this.xyRatios=i,this.isXAxisTooltipEnabled=n.config.xaxis.tooltip.enabled&&n.globals.axisCharts,this.yaxisTooltips=n.config.yaxis.map(function(u,h){return!!(u.show&&u.tooltip.enabled&&n.globals.axisCharts)}),this.allTooltipSeriesGroups=[],n.globals.axisCharts||(this.showTooltipTitle=!1);var a=document.createElement("div");if(a.classList.add("apexcharts-tooltip"),n.config.tooltip.cssClass&&a.classList.add(n.config.tooltip.cssClass),a.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),n.globals.dom.elWrap.appendChild(a),n.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var l=new Bi(this.ctx);this.xAxisTicksPositions=l.getXAxisTicksPositions()}if(!n.globals.comboCharts&&!this.tConfig.intersect&&n.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),n.config.markers.size!==0&&n.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),n.globals.collapsedSeries.length!==n.globals.series.length){this.dataPointsDividedHeight=n.globals.gridHeight/n.globals.dataPoints,this.dataPointsDividedWidth=n.globals.gridWidth/n.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||n.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,a.appendChild(this.tooltipTitle));var d=n.globals.series.length;(n.globals.xyCharts||n.globals.comboCharts)&&this.tConfig.shared&&(d=this.showOnIntersect?1:n.globals.series.length),this.legendLabels=n.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(d),this.addSVGEvents()}}},{key:"createTTElements",value:function(i){for(var n=this,a=this.w,l=[],d=this.getElTooltip(),u=function(g){var x=document.createElement("div");x.classList.add("apexcharts-tooltip-series-group"),x.style.order=a.config.tooltip.inverseOrder?i-g:g+1,n.tConfig.shared&&n.tConfig.enabledOnSeries&&Array.isArray(n.tConfig.enabledOnSeries)&&n.tConfig.enabledOnSeries.indexOf(g)<0&&x.classList.add("apexcharts-tooltip-series-group-hidden");var y=document.createElement("span");y.classList.add("apexcharts-tooltip-marker"),y.style.backgroundColor=a.globals.colors[g],x.appendChild(y);var b=document.createElement("div");b.classList.add("apexcharts-tooltip-text"),b.style.fontFamily=n.tConfig.style.fontFamily||a.config.chart.fontFamily,b.style.fontSize=n.tConfig.style.fontSize,["y","goals","z"].forEach(function(w){var S=document.createElement("div");S.classList.add("apexcharts-tooltip-".concat(w,"-group"));var j=document.createElement("span");j.classList.add("apexcharts-tooltip-text-".concat(w,"-label")),S.appendChild(j);var E=document.createElement("span");E.classList.add("apexcharts-tooltip-text-".concat(w,"-value")),S.appendChild(E),b.appendChild(S)}),x.appendChild(b),d.appendChild(x),l.push(x)},h=0;h0&&this.addPathsEventListeners(j,b),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(b)}}},{key:"drawFixedTooltipRect",value:function(){var i=this.w,n=this.getElTooltip(),a=n.getBoundingClientRect(),l=a.width+10,d=a.height+10,u=this.tConfig.fixed.offsetX,h=this.tConfig.fixed.offsetY,g=this.tConfig.fixed.position.toLowerCase();return g.indexOf("right")>-1&&(u=u+i.globals.svgWidth-l+10),g.indexOf("bottom")>-1&&(h=h+i.globals.svgHeight-d-10),n.style.left=u+"px",n.style.top=h+"px",{x:u,y:h,ttWidth:l,ttHeight:d}}},{key:"addDatapointEventsListeners",value:function(i){var n=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(n,i)}},{key:"addPathsEventListeners",value:function(i,n){for(var a=this,l=function(u){var h={paths:i[u],tooltipEl:n.tooltipEl,tooltipY:n.tooltipY,tooltipX:n.tooltipX,elGrid:n.elGrid,hoverArea:n.hoverArea,ttItems:n.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(g){return i[u].addEventListener(g,a.onSeriesHover.bind(a,h),{capture:!1,passive:!0})})},d=0;d=100?this.seriesHover(i,n):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){a.seriesHover(i,n)},100-l))}},{key:"seriesHover",value:function(i,n){var a=this;this.lastHoverTime=Date.now();var l=[],d=this.w;d.config.chart.group&&(l=this.ctx.getGroupedCharts()),d.globals.axisCharts&&(d.globals.minX===-1/0&&d.globals.maxX===1/0||d.globals.dataPoints===0)||(l.length?l.forEach(function(u){var h=a.getElTooltip(u),g={paths:i.paths,tooltipEl:h,tooltipY:i.tooltipY,tooltipX:i.tooltipX,elGrid:i.elGrid,hoverArea:i.hoverArea,ttItems:u.w.globals.tooltip.ttItems};u.w.globals.minX===a.w.globals.minX&&u.w.globals.maxX===a.w.globals.maxX&&u.w.globals.tooltip.seriesHoverByContext({chartCtx:u,ttCtx:u.w.globals.tooltip,opt:g,e:n})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:i,e:n}))}},{key:"seriesHoverByContext",value:function(i){var n=i.chartCtx,a=i.ttCtx,l=i.opt,d=i.e,u=n.w,h=this.getElTooltip();h&&(a.tooltipRect={x:0,y:0,ttWidth:h.getBoundingClientRect().width,ttHeight:h.getBoundingClientRect().height},a.e=d,a.tooltipUtil.hasBars()&&!u.globals.comboCharts&&!a.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Me(n).toggleSeriesOnHover(d,d.target.parentNode),a.fixedTooltip&&a.drawFixedTooltipRect(),u.globals.axisCharts?a.axisChartsTooltips({e:d,opt:l,tooltipRect:a.tooltipRect}):a.nonAxisChartsTooltips({e:d,opt:l,tooltipRect:a.tooltipRect}))}},{key:"axisChartsTooltips",value:function(i){var n,a,l=i.e,d=i.opt,u=this.w,h=d.elGrid.getBoundingClientRect(),g=l.type==="touchmove"?l.touches[0].clientX:l.clientX,x=l.type==="touchmove"?l.touches[0].clientY:l.clientY;if(this.clientY=x,this.clientX=g,u.globals.capturedSeriesIndex=-1,u.globals.capturedDataPointIndex=-1,xh.top+h.height)this.handleMouseOut(d);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!u.config.tooltip.shared){var y=parseInt(d.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(y)<0)return void this.handleMouseOut(d)}var b=this.getElTooltip(),w=this.getElXCrosshairs(),S=u.globals.xyCharts||u.config.chart.type==="bar"&&!u.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||u.globals.comboCharts&&this.tooltipUtil.hasBars();if(l.type==="mousemove"||l.type==="touchmove"||l.type==="mouseup"){if(u.globals.collapsedSeries.length+u.globals.ancillaryCollapsedSeries.length===u.globals.series.length)return;w!==null&&w.classList.add("apexcharts-active");var j=this.yaxisTooltips.filter(function(I){return I===!0});if(this.ycrosshairs!==null&&j.length&&this.ycrosshairs.classList.add("apexcharts-active"),S&&!this.showOnIntersect)this.handleStickyTooltip(l,g,x,d);else if(u.config.chart.type==="heatmap"||u.config.chart.type==="treemap"){var E=this.intersect.handleHeatTreeTooltip({e:l,opt:d,x:n,y:a,type:u.config.chart.type});n=E.x,a=E.y,b.style.left=n+"px",b.style.top=a+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:l,opt:d}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:l,opt:d,x:n,y:a});if(this.yaxisTooltips.length)for(var T=0;Tx.width)this.handleMouseOut(l);else if(g!==null)this.handleStickyCapturedSeries(i,g,l,h);else if(this.tooltipUtil.isXoverlap(h)||d.globals.isBarHorizontal){var y=d.globals.series.findIndex(function(b,w){return!d.globals.collapsedSeriesIndices.includes(w)});this.create(i,this,y,h,l.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(i,n,a,l){var d=this.w;if(!this.tConfig.shared&&d.globals.series[n][l]===null)return void this.handleMouseOut(a);if(d.globals.series[n][l]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(l)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(i,this,n,l,a.ttItems):this.create(i,this,n,l,a.ttItems,!1);else if(this.tooltipUtil.isXoverlap(l)){var u=d.globals.series.findIndex(function(h,g){return!d.globals.collapsedSeriesIndices.includes(g)});this.create(i,this,u,l,a.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var i=this.w,n=new X(this.ctx),a=i.globals.dom.Paper.select(".apexcharts-bar-area"),l=0;l5&&arguments[5]!==void 0?arguments[5]:null,z=this.w,$=n;i.type==="mouseup"&&this.markerClick(i,a,l),R===null&&(R=this.tConfig.shared);var Y=this.tooltipUtil.hasMarkers(a),U=this.tooltipUtil.getElBars();if(z.config.legend.tooltipHoverFormatter){var te=z.config.legend.tooltipHoverFormatter,ne=Array.from(this.legendLabels);ne.forEach(function(Zt){var Tt=Zt.getAttribute("data:default-text");Zt.innerHTML=decodeURIComponent(Tt)});for(var ie=0;ie0?$.marker.enlargePoints(l):$.tooltipPosition.moveDynamicPointsOnHover(l);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(U),this.barSeriesHeight>0)){var We=new X(this.ctx),tt=z.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(l,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(l,a);for(var ot=0;ot0&&l.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(j-=b*z)),R&&(j=j+S.height/2-m/2-2);var Y=this.barCtx.series[d][u]<0,U=x;switch(this.barCtx.isReversed&&(U=x-w+(Y?2*w:0),x-=w),I.position){case"center":E=R?Y?U-w/2+N:U+w/2-N:Y?U-w/2+S.height/2+N:U+w/2+S.height/2-N;break;case"bottom":E=R?Y?U-w+N:U+w-N:Y?U-w+S.height+m+N:U+w-S.height/2+m-N;break;case"top":E=R?Y?U+N:U-N:Y?U-S.height/2-N:U+S.height+N}if(this.barCtx.lastActiveBarSerieIndex===h&&F.enabled){var te=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:h,j:u}),T.fontSize);n=Y?U-te.height/2-N-F.offsetY+18:U+te.height+N+F.offsetY-18,a=j+F.offsetX}return l.config.chart.stacked||(E<0?E=0+m:E+S.height/3>l.globals.gridHeight&&(E=l.globals.gridHeight-m)),{bcx:y,bcy:x,dataLabelsX:j,dataLabelsY:E,totalDataLabelsX:a,totalDataLabelsY:n,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(i){var n=this.w,a=i.x,l=i.i,d=i.j,u=i.realIndex,h=i.groupIndex,g=i.bcy,x=i.barHeight,y=i.barWidth,b=i.textRects,w=i.dataLabelsX,S=i.strokeWidth,j=i.dataLabelsConfig,E=i.barDataLabelsConfig,T=i.barTotalDataLabelsConfig,I=i.offX,F=i.offY,m=n.globals.gridHeight/n.globals.dataPoints;y=Math.abs(y);var k,N,R=(g+=h!==-1?h*x:0)-(this.barCtx.isRangeBar?0:m)+x/2+b.height/2+F-3,z="start",$=this.barCtx.series[l][d]<0,Y=a;switch(this.barCtx.isReversed&&(Y=a+y-($?2*y:0),a=n.globals.gridWidth-y),E.position){case"center":w=$?Y+y/2-I:Math.max(b.width/2,Y-y/2)+I;break;case"bottom":w=$?Y+y-S-Math.round(b.width/2)-I:Y-y+S+Math.round(b.width/2)+I;break;case"top":w=$?Y-S+Math.round(b.width/2)-I:Y-S-Math.round(b.width/2)+I}if(this.barCtx.lastActiveBarSerieIndex===u&&T.enabled){var U=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:u,j:d}),j.fontSize);$?(k=Y-S+Math.round(U.width/2)-I-T.offsetX-15,z="end"):k=Y-S-Math.round(U.width/2)+I+T.offsetX+15,N=R+T.offsetY}return n.config.chart.stacked||(w<0?w=w+b.width+S:w+b.width/2>n.globals.gridWidth&&(w=n.globals.gridWidth-b.width-S)),{bcx:a,bcy:g,dataLabelsX:w,dataLabelsY:R,totalDataLabelsX:k,totalDataLabelsY:N,totalDataLabelsAnchor:z}}},{key:"drawCalculatedDataLabels",value:function(i){var n=i.x,a=i.y,l=i.val,d=i.i,u=i.j,h=i.textRects,g=i.barHeight,x=i.barWidth,y=i.dataLabelsConfig,b=this.w,w="rotate(0)";b.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(w="rotate(-90, ".concat(n,", ").concat(a,")"));var S=new Be(this.barCtx.ctx),j=new X(this.barCtx.ctx),E=y.formatter,T=null,I=b.globals.collapsedSeriesIndices.indexOf(d)>-1;if(y.enabled&&!I){T=j.group({class:"apexcharts-data-labels",transform:w});var F="";l!==void 0&&(F=E(l,s(s({},b),{},{seriesIndex:d,dataPointIndex:u,w:b}))),!l&&b.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(F="");var m=b.globals.series[d][u]<0,k=b.config.plotOptions.bar.dataLabels.position;b.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(k==="top"&&(y.textAnchor=m?"end":"start"),k==="center"&&(y.textAnchor="middle"),k==="bottom"&&(y.textAnchor=m?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&xMath.abs(x)&&(F=""):h.height/1.6>Math.abs(g)&&(F=""));var N=s({},y);this.barCtx.isHorizontal&&l<0&&(y.textAnchor==="start"?N.textAnchor="end":y.textAnchor==="end"&&(N.textAnchor="start")),S.plotDataLabelsText({x:n,y:a,text:F,i:d,j:u,parent:T,dataLabelsConfig:N,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return T}},{key:"drawTotalDataLabels",value:function(i){var n,a=i.x,l=i.y,d=i.val,u=i.barWidth,h=i.barHeight,g=i.realIndex,x=i.textAnchor,y=i.barTotalDataLabelsConfig,b=this.w,w=new X(this.barCtx.ctx);return y.enabled&&a!==void 0&&l!==void 0&&this.barCtx.lastActiveBarSerieIndex===g&&(n=w.drawText({x:a-(!b.globals.isBarHorizontal&&b.globals.seriesGroups.length?u/b.globals.seriesGroups.length:0),y:l-(b.globals.isBarHorizontal&&b.globals.seriesGroups.length?h/b.globals.seriesGroups.length:0),foreColor:y.style.color,text:d,textAnchor:x,fontFamily:y.style.fontFamily,fontSize:y.style.fontSize,fontWeight:y.style.fontWeight})),n}}]),O}(),s5=function(){function O(i){c(this,O),this.w=i.w,this.barCtx=i}return v(O,[{key:"initVariables",value:function(i){var n=this.w;this.barCtx.series=i,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var a=0;a0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=i[a].length),n.globals.isXNumeric)for(var l=0;ln.globals.minX&&n.globals.seriesX[a][l]0&&(l=x.globals.minXDiff/w),(u=l/b*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(u=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(u=parseInt(this.barCtx.barOptions.columnWidth,10)),h=x.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?x.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),i=x.globals.padHorizontal+(l-u*this.barCtx.seriesLen)/2}return x.globals.barHeight=d,x.globals.barWidth=u,{x:i,y:n,yDivision:a,xDivision:l,barHeight:d,barWidth:u,zeroH:h,zeroW:g}}},{key:"initializeStackedPrevVars",value:function(i){var n=i.w;n.globals.hasSeriesGroups?n.globals.seriesGroups.forEach(function(a){i[a]||(i[a]={}),i[a].prevY=[],i[a].prevX=[],i[a].prevYF=[],i[a].prevXF=[],i[a].prevYVal=[],i[a].prevXVal=[]}):(i.prevY=[],i.prevX=[],i.prevYF=[],i.prevXF=[],i.prevYVal=[],i.prevXVal=[])}},{key:"initializeStackedXYVars",value:function(i){var n=i.w;n.globals.hasSeriesGroups?n.globals.seriesGroups.forEach(function(a){i[a]||(i[a]={}),i[a].xArrj=[],i[a].xArrjF=[],i[a].xArrjVal=[],i[a].yArrj=[],i[a].yArrjF=[],i[a].yArrjVal=[]}):(i.xArrj=[],i.xArrjF=[],i.xArrjVal=[],i.yArrj=[],i.yArrjF=[],i.yArrjVal=[])}},{key:"getPathFillColor",value:function(i,n,a,l){var d,u,h,g,x=this.w,y=new ze(this.barCtx.ctx),b=null,w=this.barCtx.barOptions.distributed?a:n;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(S){i[n][a]>=S.from&&i[n][a]<=S.to&&(b=S.color)}),x.config.series[n].data[a]&&x.config.series[n].data[a].fillColor&&(b=x.config.series[n].data[a].fillColor),y.fillPath({seriesNumber:this.barCtx.barOptions.distributed?w:l,dataPointIndex:a,color:b,value:i[n][a],fillConfig:(d=x.config.series[n].data[a])===null||d===void 0?void 0:d.fill,fillType:(u=x.config.series[n].data[a])!==null&&u!==void 0&&(h=u.fill)!==null&&h!==void 0&&h.type?(g=x.config.series[n].data[a])===null||g===void 0?void 0:g.fill.type:Array.isArray(x.config.fill.type)?x.config.fill.type[n]:x.config.fill.type})}},{key:"getStrokeWidth",value:function(i,n,a){var l=0,d=this.w;return this.barCtx.series[i][n]===void 0||this.barCtx.series[i][n]===null?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,d.config.stroke.show&&(this.barCtx.isNullValue||(l=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[a]:this.barCtx.strokeWidth)),l}},{key:"shouldApplyRadius",value:function(i){var n=this.w,a=!1;return n.config.plotOptions.bar.borderRadius>0&&(n.config.chart.stacked&&n.config.plotOptions.bar.borderRadiusWhenStacked==="last"?this.barCtx.lastActiveBarSerieIndex===i&&(a=!0):a=!0),a}},{key:"barBackground",value:function(i){var n=i.j,a=i.i,l=i.x1,d=i.x2,u=i.y1,h=i.y2,g=i.elSeries,x=this.w,y=new X(this.barCtx.ctx),b=new Me(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&b===a){n>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(n%=this.barCtx.barOptions.colors.backgroundBarColors.length);var w=this.barCtx.barOptions.colors.backgroundBarColors[n],S=y.drawRect(l!==void 0?l:0,u!==void 0?u:0,d!==void 0?d:x.globals.gridWidth,h!==void 0?h:x.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,w,this.barCtx.barOptions.colors.backgroundBarOpacity);g.add(S),S.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(i){var n,a=i.barWidth,l=i.barXPosition,d=i.y1,u=i.y2,h=i.strokeWidth,g=i.seriesGroup,x=i.realIndex,y=i.i,b=i.j,w=i.w,S=new X(this.barCtx.ctx);(h=Array.isArray(h)?h[x]:h)||(h=0);var j=a,E=l;(n=w.config.series[x].data[b])!==null&&n!==void 0&&n.columnWidthOffset&&(E=l-w.config.series[x].data[b].columnWidthOffset/2,j=a+w.config.series[x].data[b].columnWidthOffset);var T=E,I=E+j;d+=.001,u+=.001;var F=S.move(T,d),m=S.move(T,d),k=S.line(I-h,d);if(w.globals.previousPaths.length>0&&(m=this.barCtx.getPreviousPath(x,b,!1)),F=F+S.line(T,u)+S.line(I-h,u)+S.line(I-h,d)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),m=m+S.line(T,d)+k+k+k+k+k+S.line(T,d)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),this.shouldApplyRadius(x)&&(F=S.roundPathCorners(F,w.config.plotOptions.bar.borderRadius)),w.config.chart.stacked){var N=this.barCtx;w.globals.hasSeriesGroups&&g&&(N=this.barCtx[g]),N.yArrj.push(u),N.yArrjF.push(Math.abs(d-u)),N.yArrjVal.push(this.barCtx.series[y][b])}return{pathTo:F,pathFrom:m}}},{key:"getBarpaths",value:function(i){var n,a=i.barYPosition,l=i.barHeight,d=i.x1,u=i.x2,h=i.strokeWidth,g=i.seriesGroup,x=i.realIndex,y=i.i,b=i.j,w=i.w,S=new X(this.barCtx.ctx);(h=Array.isArray(h)?h[x]:h)||(h=0);var j=a,E=l;(n=w.config.series[x].data[b])!==null&&n!==void 0&&n.barHeightOffset&&(j=a-w.config.series[x].data[b].barHeightOffset/2,E=l+w.config.series[x].data[b].barHeightOffset);var T=j,I=j+E;d+=.001,u+=.001;var F=S.move(d,T),m=S.move(d,T);w.globals.previousPaths.length>0&&(m=this.barCtx.getPreviousPath(x,b,!1));var k=S.line(d,I-h);if(F=F+S.line(u,T)+S.line(u,I-h)+k+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),m=m+S.line(d,T)+k+k+k+k+k+S.line(d,T)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),this.shouldApplyRadius(x)&&(F=S.roundPathCorners(F,w.config.plotOptions.bar.borderRadius)),w.config.chart.stacked){var N=this.barCtx;w.globals.hasSeriesGroups&&g&&(N=this.barCtx[g]),N.xArrj.push(u),N.xArrjF.push(Math.abs(d-u)),N.xArrjVal.push(this.barCtx.series[y][b])}return{pathTo:F,pathFrom:m}}},{key:"checkZeroSeries",value:function(i){for(var n=i.series,a=this.w,l=0;l2&&arguments[2]!==void 0)||arguments[2]?n:null;return i!=null&&(a=n+i/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?i/this.barCtx.invertedYRatio:0)),a}},{key:"getYForValue",value:function(i,n){var a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?n:null;return i!=null&&(a=n-i/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?i/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),a}},{key:"getGoalValues",value:function(i,n,a,l,d){var u=this,h=this.w,g=[],x=function(w,S){var j;g.push((C(j={},i,i==="x"?u.getXForValue(w,n,!1):u.getYForValue(w,a,!1)),C(j,"attrs",S),j))};if(h.globals.seriesGoals[l]&&h.globals.seriesGoals[l][d]&&Array.isArray(h.globals.seriesGoals[l][d])&&h.globals.seriesGoals[l][d].forEach(function(w){x(w.value,w)}),this.barCtx.barOptions.isDumbbell&&h.globals.seriesRange.length){var y=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:h.globals.colors,b={strokeHeight:i==="x"?0:h.globals.markers.size[l],strokeWidth:i==="x"?h.globals.markers.size[l]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(y[l])?y[l][0]:y[l]};x(h.globals.seriesRangeStart[l][d],b),x(h.globals.seriesRangeEnd[l][d],s(s({},b),{},{strokeColor:Array.isArray(y[l])?y[l][1]:y[l]}))}return g}},{key:"drawGoalLine",value:function(i){var n=i.barXPosition,a=i.barYPosition,l=i.goalX,d=i.goalY,u=i.barWidth,h=i.barHeight,g=new X(this.barCtx.ctx),x=g.group({className:"apexcharts-bar-goals-groups"});x.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:x.node}),x.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var y=null;return this.barCtx.isHorizontal?Array.isArray(l)&&l.forEach(function(b){var w=b.attrs.strokeHeight!==void 0?b.attrs.strokeHeight:h/2,S=a+w+h/2;y=g.drawLine(b.x,S-2*w,b.x,S,b.attrs.strokeColor?b.attrs.strokeColor:void 0,b.attrs.strokeDashArray,b.attrs.strokeWidth?b.attrs.strokeWidth:2,b.attrs.strokeLineCap),x.add(y)}):Array.isArray(d)&&d.forEach(function(b){var w=b.attrs.strokeWidth!==void 0?b.attrs.strokeWidth:u/2,S=n+w+u/2;y=g.drawLine(S-2*w,b.y,S,b.y,b.attrs.strokeColor?b.attrs.strokeColor:void 0,b.attrs.strokeDashArray,b.attrs.strokeHeight?b.attrs.strokeHeight:2,b.attrs.strokeLineCap),x.add(y)}),x}},{key:"drawBarShadow",value:function(i){var n=i.prevPaths,a=i.currPaths,l=i.color,d=this.w,u=n.x,h=n.x1,g=n.barYPosition,x=a.x,y=a.x1,b=a.barYPosition,w=g+a.barHeight,S=new X(this.barCtx.ctx),j=new _,E=S.move(h,w)+S.line(u,w)+S.line(x,b)+S.line(y,b)+S.line(h,w)+(d.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z");return S.drawPath({d:E,fill:j.shadeColor(.5,_.rgb2hex(l)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadows"})}},{key:"getZeroValueEncounters",value:function(i){var n=i.i,a=i.j,l=this.w,d=0,u=0;return l.globals.seriesPercent.forEach(function(h,g){h[a]&&d++,gthis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var h=0,g=0;h0&&(this.visibleI=this.visibleI+1);var m=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=I),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed;var N=this.barHelpers.initialPositions();j=N.y,m=N.barHeight,y=N.yDivision,w=N.zeroW,S=N.x,k=N.barWidth,x=N.xDivision,b=N.zeroH,this.horizontal||T.push(S+k/2);var R=l.group({class:"apexcharts-datalabels","data:realIndex":I});a.globals.delayedElements.push({el:R.node}),R.node.classList.add("apexcharts-element-hidden");var z=l.group({class:"apexcharts-bar-goals-markers"}),$=l.group({class:"apexcharts-bar-shadows"});a.globals.delayedElements.push({el:$.node}),$.node.classList.add("apexcharts-element-hidden");for(var Y=0;Y0){var ge=this.barHelpers.drawBarShadow({color:typeof ie=="string"&&(ie==null?void 0:ie.indexOf("url"))===-1?ie:_.hexToRgba(a.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:te});ge&&$.add(ge)}this.pathArr.push(te);var be=this.barHelpers.drawGoalLine({barXPosition:te.barXPosition,barYPosition:te.barYPosition,goalX:te.goalX,goalY:te.goalY,barHeight:m,barWidth:k});be&&z.add(be),j=te.y,S=te.x,Y>0&&T.push(S+k/2),E.push(j),this.renderSeries({realIndex:I,pathFill:ie,j:Y,i:h,pathFrom:te.pathFrom,pathTo:te.pathTo,strokeWidth:U,elSeries:F,x:S,y:j,series:i,barHeight:te.barHeight?te.barHeight:m,barWidth:te.barWidth?te.barWidth:k,elDataLabelsWrap:R,elGoalsMarkers:z,elBarShadows:$,visibleSeries:this.visibleI,type:"bar"})}a.globals.seriesXvalues[I]=T,a.globals.seriesYvalues[I]=E,u.add(F)}return u}},{key:"renderSeries",value:function(i){var n=i.realIndex,a=i.pathFill,l=i.lineFill,d=i.j,u=i.i,h=i.groupIndex,g=i.pathFrom,x=i.pathTo,y=i.strokeWidth,b=i.elSeries,w=i.x,S=i.y,j=i.y1,E=i.y2,T=i.series,I=i.barHeight,F=i.barWidth,m=i.barXPosition,k=i.barYPosition,N=i.elDataLabelsWrap,R=i.elGoalsMarkers,z=i.elBarShadows,$=i.visibleSeries,Y=i.type,U=this.w,te=new X(this.ctx);l||(l=this.barOptions.distributed?U.globals.stroke.colors[d]:U.globals.stroke.colors[n]),U.config.series[u].data[d]&&U.config.series[u].data[d].strokeColor&&(l=U.config.series[u].data[d].strokeColor),this.isNullValue&&(a="none");var ne=d/U.config.chart.animations.animateGradually.delay*(U.config.chart.animations.speed/U.globals.dataPoints)/2.4,ie=te.renderPaths({i:u,j:d,realIndex:n,pathFrom:g,pathTo:x,stroke:l,strokeWidth:y,strokeLineCap:U.config.stroke.lineCap,fill:a,animationDelay:ne,initialSpeed:U.config.chart.animations.speed,dataChangeSpeed:U.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(Y,"-area")});ie.attr("clip-path","url(#gridRectMask".concat(U.globals.cuid,")"));var ge=U.config.forecastDataPoints;ge.count>0&&d>=U.globals.dataPoints-ge.count&&(ie.node.setAttribute("stroke-dasharray",ge.dashArray),ie.node.setAttribute("stroke-width",ge.strokeWidth),ie.node.setAttribute("fill-opacity",ge.fillOpacity)),j!==void 0&&E!==void 0&&(ie.attr("data-range-y1",j),ie.attr("data-range-y2",E)),new ee(this.ctx).setSelectionFilter(ie,n,d),b.add(ie);var be=new n5(this).handleBarDataLabels({x:w,y:S,y1:j,y2:E,i:u,j:d,series:T,realIndex:n,groupIndex:h,barHeight:I,barWidth:F,barXPosition:m,barYPosition:k,renderedPath:ie,visibleSeries:$});return be.dataLabels!==null&&N.add(be.dataLabels),be.totalDataLabels&&N.add(be.totalDataLabels),b.add(N),R&&b.add(R),z&&b.add(z),b}},{key:"drawBarPaths",value:function(i){var n,a=i.indexes,l=i.barHeight,d=i.strokeWidth,u=i.zeroW,h=i.x,g=i.y,x=i.yDivision,y=i.elSeries,b=this.w,w=a.i,S=a.j;if(b.globals.isXNumeric)n=(g=(b.globals.seriesX[w][S]-b.globals.minX)/this.invertedXRatio-l)+l*this.visibleI;else if(b.config.plotOptions.bar.hideZeroBarsWhenGrouped){var j=0,E=0;b.globals.seriesPercent.forEach(function(I,F){I[S]&&j++,F0&&(l=this.seriesLen*l/j),n=g+l*this.visibleI,n-=l*E}else n=g+l*this.visibleI;this.isFunnel&&(u-=(this.barHelpers.getXForValue(this.series[w][S],u)-u)/2),h=this.barHelpers.getXForValue(this.series[w][S],u);var T=this.barHelpers.getBarpaths({barYPosition:n,barHeight:l,x1:u,x2:h,strokeWidth:d,series:this.series,realIndex:a.realIndex,i:w,j:S,w:b});return b.globals.isXNumeric||(g+=x),this.barHelpers.barBackground({j:S,i:w,y1:n-l*this.visibleI,y2:l*this.seriesLen,elSeries:y}),{pathTo:T.pathTo,pathFrom:T.pathFrom,x1:u,x:h,y:g,goalX:this.barHelpers.getGoalValues("x",u,null,w,S),barYPosition:n,barHeight:l}}},{key:"drawColumnPaths",value:function(i){var n,a=i.indexes,l=i.x,d=i.y,u=i.xDivision,h=i.barWidth,g=i.zeroH,x=i.strokeWidth,y=i.elSeries,b=this.w,w=a.realIndex,S=a.i,j=a.j,E=a.bc;if(b.globals.isXNumeric){var T=this.getBarXForNumericXAxis({x:l,j,realIndex:w,barWidth:h});l=T.x,n=T.barXPosition}else if(b.config.plotOptions.bar.hideZeroBarsWhenGrouped){var I=this.barHelpers.getZeroValueEncounters({i:S,j}),F=I.nonZeroColumns,m=I.zeroEncounters;F>0&&(h=this.seriesLen*h/F),n=l+h*this.visibleI,n-=h*m}else n=l+h*this.visibleI;d=this.barHelpers.getYForValue(this.series[S][j],g);var k=this.barHelpers.getColumnPaths({barXPosition:n,barWidth:h,y1:g,y2:d,strokeWidth:x,series:this.series,realIndex:a.realIndex,i:S,j,w:b});return b.globals.isXNumeric||(l+=u),this.barHelpers.barBackground({bc:E,j,i:S,x1:n-x/2-h*this.visibleI,x2:h*this.seriesLen+x/2,elSeries:y}),{pathTo:k.pathTo,pathFrom:k.pathFrom,x:l,y:d,goalY:this.barHelpers.getGoalValues("y",null,g,S,j),barXPosition:n,barWidth:h}}},{key:"getBarXForNumericXAxis",value:function(i){var n=i.x,a=i.barWidth,l=i.realIndex,d=i.j,u=this.w,h=l;return u.globals.seriesX[l].length||(h=u.globals.maxValsInArrayIndex),u.globals.seriesX[h][d]&&(n=(u.globals.seriesX[h][d]-u.globals.minX)/this.xRatio-a*this.seriesLen/2),{barXPosition:n+a*this.visibleI,x:n}}},{key:"getPreviousPath",value:function(i,n){for(var a,l=this.w,d=0;d0&&parseInt(u.realIndex,10)===parseInt(i,10)&&l.globals.previousPaths[d].paths[n]!==void 0&&(a=l.globals.previousPaths[d].paths[n].d)}return a}}]),O}(),_1=function(O){A(n,ds);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l){var d=this,u=this.w;this.graphics=new X(this.ctx),this.bar=new ds(this.ctx,this.xyRatios);var h=new q(this.ctx,u);a=h.getLogSeries(a),this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(a),u.config.chart.stackType==="100%"&&(a=u.globals.seriesPercent.slice()),this.series=a,this.barHelpers.initializeStackedPrevVars(this);for(var g=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),x=0,y=0,b=function(j,E){var T=void 0,I=void 0,F=void 0,m=void 0,k=-1;d.groupCtx=d,u.globals.seriesGroups.forEach(function(tt,ot){tt.indexOf(u.config.series[j].name)>-1&&(k=ot)}),k!==-1&&(d.groupCtx=d[u.globals.seriesGroups[k]]);var N=[],R=[],z=u.globals.comboCharts?l[j]:j;d.yRatio.length>1&&(d.yaxisIndex=z),d.isReversed=u.config.yaxis[d.yaxisIndex]&&u.config.yaxis[d.yaxisIndex].reversed;var $=d.graphics.group({class:"apexcharts-series",seriesName:_.escapeString(u.globals.seriesNames[z]),rel:j+1,"data:realIndex":z});d.ctx.series.addCollapsedClassToSeries($,z);var Y=d.graphics.group({class:"apexcharts-datalabels","data:realIndex":z}),U=d.graphics.group({class:"apexcharts-bar-goals-markers"}),te=0,ne=0,ie=d.initialPositions(x,y,T,I,F,m);y=ie.y,te=ie.barHeight,I=ie.yDivision,m=ie.zeroW,x=ie.x,ne=ie.barWidth,T=ie.xDivision,F=ie.zeroH,u.globals.barHeight=te,u.globals.barWidth=ne,d.barHelpers.initializeStackedXYVars(d),d.groupCtx.prevY.length===1&&d.groupCtx.prevY[0].every(function(tt){return isNaN(tt)})&&(d.groupCtx.prevY[0]=d.groupCtx.prevY[0].map(function(tt){return F}),d.groupCtx.prevYF[0]=d.groupCtx.prevYF[0].map(function(tt){return 0}));for(var ge=0;ge1?(d=S.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:w*parseInt(S.config.plotOptions.bar.columnWidth,10)/100,String(S.config.plotOptions.bar.columnWidth).indexOf("%")===-1&&(w=parseInt(S.config.plotOptions.bar.columnWidth,10)),h=S.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?S.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),a=S.globals.padHorizontal+(d-w)/2),{x:a,y:l,yDivision:u,xDivision:d,barHeight:(x=S.globals.seriesGroups)!==null&&x!==void 0&&x.length?b/S.globals.seriesGroups.length:b,barWidth:(y=S.globals.seriesGroups)!==null&&y!==void 0&&y.length?w/S.globals.seriesGroups.length:w,zeroH:h,zeroW:g}}},{key:"drawStackedBarPaths",value:function(a){for(var l,d=a.indexes,u=a.barHeight,h=a.strokeWidth,g=a.zeroW,x=a.x,y=a.y,b=a.groupIndex,w=a.seriesGroup,S=a.yDivision,j=a.elSeries,E=this.w,T=y+(b!==-1?b*u:0),I=d.i,F=d.j,m=0,k=0;k0){var R=g;this.groupCtx.prevXVal[N-1][F]<0?R=this.series[I][F]>=0?this.groupCtx.prevX[N-1][F]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[N-1][F]:this.groupCtx.prevXVal[N-1][F]>=0&&(R=this.series[I][F]>=0?this.groupCtx.prevX[N-1][F]:this.groupCtx.prevX[N-1][F]-m+2*(this.isReversed?m:0)),l=R}else l=g;x=this.series[I][F]===null?l:l+this.series[I][F]/this.invertedYRatio-2*(this.isReversed?this.series[I][F]/this.invertedYRatio:0);var z=this.barHelpers.getBarpaths({barYPosition:T,barHeight:u,x1:l,x2:x,strokeWidth:h,series:this.series,realIndex:d.realIndex,seriesGroup:w,i:I,j:F,w:E});return this.barHelpers.barBackground({j:F,i:I,y1:T,y2:u,elSeries:j}),y+=S,{pathTo:z.pathTo,pathFrom:z.pathFrom,goalX:this.barHelpers.getGoalValues("x",g,null,I,F),barYPosition:T,x,y}}},{key:"drawStackedColumnPaths",value:function(a){var l=a.indexes,d=a.x,u=a.y,h=a.xDivision,g=a.barWidth,x=a.zeroH,y=a.groupIndex,b=a.seriesGroup,w=a.elSeries,S=this.w,j=l.i,E=l.j,T=l.bc;if(S.globals.isXNumeric){var I=S.globals.seriesX[j][E];I||(I=0),d=(I-S.globals.minX)/this.xRatio-g/2,S.globals.seriesGroups.length&&(d=(I-S.globals.minX)/this.xRatio-g/2*S.globals.seriesGroups.length)}for(var F,m=d+(y!==-1?y*g:0),k=0,N=0;N0&&!S.globals.isXNumeric||R>0&&S.globals.isXNumeric&&S.globals.seriesX[j-1][E]===S.globals.seriesX[j][E]){var z,$,Y,U=Math.min(this.yRatio.length+1,j+1);if(this.groupCtx.prevY[R-1]!==void 0&&this.groupCtx.prevY[R-1].length)for(var te=1;te=0?Y-k+2*(this.isReversed?k:0):Y;break}if(((be=this.groupCtx.prevYVal[R-ie])===null||be===void 0?void 0:be[E])>=0){$=this.series[j][E]>=0?Y:Y+k-2*(this.isReversed?k:0);break}}$===void 0&&($=S.globals.gridHeight),F=(z=this.groupCtx.prevYF[0])!==null&&z!==void 0&&z.every(function(Oe){return Oe===0})&&this.groupCtx.prevYF.slice(1,R).every(function(Oe){return Oe.every(function(Ve){return isNaN(Ve)})})?x:$}else F=x;u=this.series[j][E]?F-this.series[j][E]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[j][E]/this.yRatio[this.yaxisIndex]:0):F;var Le=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:g,y1:F,y2:u,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,seriesGroup:b,realIndex:l.realIndex,i:j,j:E,w:S});return this.barHelpers.barBackground({bc:T,j:E,i:j,x1:m,x2:g,elSeries:w}),d+=h,{pathTo:Le.pathTo,pathFrom:Le.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,x,j,E),barXPosition:m,x:S.globals.isXNumeric?d-h:d,y:u}}}]),n}(),Xd=function(O){A(n,ds);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l,d){var u=this,h=this.w,g=new X(this.ctx),x=h.globals.comboCharts?l:h.config.chart.type,y=new ze(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=h.config.plotOptions.bar.horizontal;var b=new q(this.ctx,h);a=b.getLogSeries(a),this.series=a,this.yRatio=b.getLogYRatios(this.yRatio),this.barHelpers.initVariables(a);for(var w=g.group({class:"apexcharts-".concat(x,"-series apexcharts-plot-series")}),S=function(E){u.isBoxPlot=h.config.chart.type==="boxPlot"||h.config.series[E].type==="boxPlot";var T,I,F,m,k=void 0,N=void 0,R=[],z=[],$=h.globals.comboCharts?d[E]:E,Y=g.group({class:"apexcharts-series",seriesName:_.escapeString(h.globals.seriesNames[$]),rel:E+1,"data:realIndex":$});u.ctx.series.addCollapsedClassToSeries(Y,$),a[E].length>0&&(u.visibleI=u.visibleI+1);var U,te;u.yRatio.length>1&&(u.yaxisIndex=$);var ne=u.barHelpers.initialPositions();N=ne.y,U=ne.barHeight,I=ne.yDivision,m=ne.zeroW,k=ne.x,te=ne.barWidth,T=ne.xDivision,F=ne.zeroH,z.push(k+te/2);for(var ie=g.group({class:"apexcharts-datalabels","data:realIndex":$}),ge=function(Le){var Oe=u.barHelpers.getStrokeWidth(E,Le,$),Ve=null,We={indexes:{i:E,j:Le,realIndex:$},x:k,y:N,strokeWidth:Oe,elSeries:Y};Ve=u.isHorizontal?u.drawHorizontalBoxPaths(s(s({},We),{},{yDivision:I,barHeight:U,zeroW:m})):u.drawVerticalBoxPaths(s(s({},We),{},{xDivision:T,barWidth:te,zeroH:F})),N=Ve.y,k=Ve.x,Le>0&&z.push(k+te/2),R.push(N),Ve.pathTo.forEach(function(tt,ot){var Zt=!u.isBoxPlot&&u.candlestickOptions.wick.useFillColor?Ve.color[ot]:h.globals.stroke.colors[E],Tt=y.fillPath({seriesNumber:$,dataPointIndex:Le,color:Ve.color[ot],value:a[E][Le]});u.renderSeries({realIndex:$,pathFill:Tt,lineFill:Zt,j:Le,i:E,pathFrom:Ve.pathFrom,pathTo:tt,strokeWidth:Oe,elSeries:Y,x:k,y:N,series:a,barHeight:U,barWidth:te,elDataLabelsWrap:ie,visibleSeries:u.visibleI,type:h.config.chart.type})})},be=0;bek.c&&(j=!1);var z=Math.min(k.o,k.c),$=Math.max(k.o,k.c),Y=k.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[m][S]-y.globals.minX)/this.xRatio-h/2);var U=d+h*this.visibleI;this.series[w][S]===void 0||this.series[w][S]===null?(z=g,$=g):(z=g-z/F,$=g-$/F,N=g-k.h/F,R=g-k.l/F,Y=g-k.m/F);var te=b.move(U,g),ne=b.move(U+h/2,z);return y.globals.previousPaths.length>0&&(ne=this.getPreviousPath(m,S,!0)),te=this.isBoxPlot?[b.move(U,z)+b.line(U+h/2,z)+b.line(U+h/2,N)+b.line(U+h/4,N)+b.line(U+h-h/4,N)+b.line(U+h/2,N)+b.line(U+h/2,z)+b.line(U+h,z)+b.line(U+h,Y)+b.line(U,Y)+b.line(U,z+x/2),b.move(U,Y)+b.line(U+h,Y)+b.line(U+h,$)+b.line(U+h/2,$)+b.line(U+h/2,R)+b.line(U+h-h/4,R)+b.line(U+h/4,R)+b.line(U+h/2,R)+b.line(U+h/2,$)+b.line(U,$)+b.line(U,Y)+"z"]:[b.move(U,$)+b.line(U+h/2,$)+b.line(U+h/2,N)+b.line(U+h/2,$)+b.line(U+h,$)+b.line(U+h,z)+b.line(U+h/2,z)+b.line(U+h/2,R)+b.line(U+h/2,z)+b.line(U,z)+b.line(U,$-x/2)],ne+=b.move(U,z),y.globals.isXNumeric||(d+=u),{pathTo:te,pathFrom:ne,x:d,y:$,barXPosition:U,color:this.isBoxPlot?I:j?[E]:[T]}}},{key:"drawHorizontalBoxPaths",value:function(a){var l=a.indexes;a.x;var d=a.y,u=a.yDivision,h=a.barHeight,g=a.zeroW,x=a.strokeWidth,y=this.w,b=new X(this.ctx),w=l.i,S=l.j,j=this.boxOptions.colors.lower;this.isBoxPlot&&(j=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var E=this.invertedYRatio,T=l.realIndex,I=this.getOHLCValue(T,S),F=g,m=g,k=Math.min(I.o,I.c),N=Math.max(I.o,I.c),R=I.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[T][S]-y.globals.minX)/this.invertedXRatio-h/2);var z=d+h*this.visibleI;this.series[w][S]===void 0||this.series[w][S]===null?(k=g,N=g):(k=g+k/E,N=g+N/E,F=g+I.h/E,m=g+I.l/E,R=g+I.m/E);var $=b.move(g,z),Y=b.move(k,z+h/2);return y.globals.previousPaths.length>0&&(Y=this.getPreviousPath(T,S,!0)),$=[b.move(k,z)+b.line(k,z+h/2)+b.line(F,z+h/2)+b.line(F,z+h/2-h/4)+b.line(F,z+h/2+h/4)+b.line(F,z+h/2)+b.line(k,z+h/2)+b.line(k,z+h)+b.line(R,z+h)+b.line(R,z)+b.line(k+x/2,z),b.move(R,z)+b.line(R,z+h)+b.line(N,z+h)+b.line(N,z+h/2)+b.line(m,z+h/2)+b.line(m,z+h-h/4)+b.line(m,z+h/4)+b.line(m,z+h/2)+b.line(N,z+h/2)+b.line(N,z)+b.line(R,z)+"z"],Y+=b.move(k,z),y.globals.isXNumeric||(d+=u),{pathTo:$,pathFrom:Y,x:N,y:d,barYPosition:z,color:j}}},{key:"getOHLCValue",value:function(a,l){var d=this.w;return{o:this.isBoxPlot?d.globals.seriesCandleH[a][l]:d.globals.seriesCandleO[a][l],h:this.isBoxPlot?d.globals.seriesCandleO[a][l]:d.globals.seriesCandleH[a][l],m:d.globals.seriesCandleM[a][l],l:this.isBoxPlot?d.globals.seriesCandleC[a][l]:d.globals.seriesCandleL[a][l],c:this.isBoxPlot?d.globals.seriesCandleL[a][l]:d.globals.seriesCandleC[a][l]}}}]),n}(),M1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"checkColorRange",value:function(){var i=this.w,n=!1,a=i.config.plotOptions[i.config.chart.type];return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(function(l,d){l.from<=0&&(n=!0)}),n}},{key:"getShadeColor",value:function(i,n,a,l){var d=this.w,u=1,h=d.config.plotOptions[i].shadeIntensity,g=this.determineColor(i,n,a);d.globals.hasNegs||l?u=d.config.plotOptions[i].reverseNegativeShade?g.percent<0?g.percent/100*(1.25*h):(1-g.percent/100)*(1.25*h):g.percent<=0?1-(1+g.percent/100)*h:(1-g.percent/100)*h:(u=1-g.percent/100,i==="treemap"&&(u=(1-g.percent/100)*(1.25*h)));var x=g.color,y=new _;return d.config.plotOptions[i].enableShades&&(x=this.w.config.theme.mode==="dark"?_.hexToRgba(y.shadeColor(-1*u,g.color),d.config.fill.opacity):_.hexToRgba(y.shadeColor(u,g.color),d.config.fill.opacity)),{color:x,colorProps:g}}},{key:"determineColor",value:function(i,n,a){var l=this.w,d=l.globals.series[n][a],u=l.config.plotOptions[i],h=u.colorScale.inverse?a:n;u.distributed&&l.config.chart.type==="treemap"&&(h=a);var g=l.globals.colors[h],x=null,y=Math.min.apply(Math,D(l.globals.series[n])),b=Math.max.apply(Math,D(l.globals.series[n]));u.distributed||i!=="heatmap"||(y=l.globals.minY,b=l.globals.maxY),u.colorScale.min!==void 0&&(y=u.colorScale.minl.globals.maxY?u.colorScale.max:l.globals.maxY);var w=Math.abs(b)+Math.abs(y),S=100*d/(w===0?w-1e-6:w);return u.colorScale.ranges.length>0&&u.colorScale.ranges.map(function(j,E){if(d>=j.from&&d<=j.to){g=j.color,x=j.foreColor?j.foreColor:null,y=j.from,b=j.to;var T=Math.abs(b)+Math.abs(y);S=100*d/(T===0?T-1e-6:T)}}),{color:g,foreColor:x,percent:S}}},{key:"calculateDataLabels",value:function(i){var n=i.text,a=i.x,l=i.y,d=i.i,u=i.j,h=i.colorProps,g=i.fontSize,x=this.w.config.dataLabels,y=new X(this.ctx),b=new Be(this.ctx),w=null;if(x.enabled){w=y.group({class:"apexcharts-data-labels"});var S=x.offsetX,j=x.offsetY,E=a+S,T=l+parseFloat(x.style.fontSize)/3+j;b.plotDataLabelsText({x:E,y:T,text:n,i:d,j:u,color:h.foreColor,parent:w,fontSize:g,dataLabelsConfig:x})}return w}},{key:"addListeners",value:function(i){var n=new X(this.ctx);i.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this,i)),i.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this,i)),i.node.addEventListener("mousedown",n.pathMouseDown.bind(this,i))}}]),O}(),a5=function(){function O(i,n){c(this,O),this.ctx=i,this.w=i.w,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new M1(i),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return v(O,[{key:"draw",value:function(i){var n=this.w,a=new X(this.ctx),l=a.group({class:"apexcharts-heatmap"});l.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")"));var d=n.globals.gridWidth/n.globals.dataPoints,u=n.globals.gridHeight/n.globals.series.length,h=0,g=!1;this.negRange=this.helpers.checkColorRange();var x=i.slice();n.config.yaxis[0].reversed&&(g=!0,x.reverse());for(var y=g?0:x.length-1;g?y=0;g?y++:y--){var b=a.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:_.escapeString(n.globals.seriesNames[y]),rel:y+1,"data:realIndex":y});if(this.ctx.series.addCollapsedClassToSeries(b,y),n.config.chart.dropShadow.enabled){var w=n.config.chart.dropShadow;new ee(this.ctx).dropShadow(b,w,y)}for(var S=0,j=n.config.plotOptions.heatmap.shadeIntensity,E=0;E-1&&this.pieClicked(w),a.config.dataLabels.enabled){var N=m.x,R=m.y,z=100*j/this.fullAngle+"%";if(j!==0&&a.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?n.endAngle=n.endAngle-(l+h):l+h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(y=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(y)>this.fullAngle&&(y-=this.fullAngle);var b=Math.PI*(y-90)/180,w=a.centerX+u*Math.cos(x),S=a.centerY+u*Math.sin(x),j=a.centerX+u*Math.cos(b),E=a.centerY+u*Math.sin(b),T=_.polarToCartesian(a.centerX,a.centerY,a.donutSize,y),I=_.polarToCartesian(a.centerX,a.centerY,a.donutSize,g),F=d>180?1:0,m=["M",w,S,"A",u,u,0,F,1,j,E];return n=a.chartType==="donut"?[].concat(m,["L",T.x,T.y,"A",a.donutSize,a.donutSize,0,F,0,I.x,I.y,"L",w,S,"z"]).join(" "):a.chartType==="pie"||a.chartType==="polarArea"?[].concat(m,["L",a.centerX,a.centerY,"L",w,S]).join(" "):[].concat(m).join(" "),h.roundPathCorners(n,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(i){var n=this.w,a=new ca(this.ctx),l=new X(this.ctx),d=new O1(this.ctx),u=l.group(),h=l.group(),g=a.niceScale(0,Math.ceil(this.maxY),0),x=g.result.reverse(),y=g.result.length;this.maxY=g.niceMax;for(var b=n.globals.radialSize,w=b/(y-1),S=0;S1&&i.total.show&&(d=i.total.color);var h=u.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),g=u.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");a=(0,i.value.formatter)(a,u),l||typeof i.total.formatter!="function"||(a=i.total.formatter(u));var x=n===i.total.label;n=i.name.formatter(n,x,u),h!==null&&(h.textContent=n),g!==null&&(g.textContent=a),h!==null&&(h.style.fill=d)}},{key:"printDataLabelsInner",value:function(i,n){var a=this.w,l=i.getAttribute("data:value"),d=a.globals.seriesNames[parseInt(i.parentNode.getAttribute("rel"),10)-1];a.globals.series.length>1&&this.printInnerLabels(n,d,l,i);var u=a.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");u!==null&&(u.style.opacity=1)}},{key:"drawSpokes",value:function(i){var n=this,a=this.w,l=new X(this.ctx),d=a.config.plotOptions.polarArea.spokes;if(d.strokeWidth!==0){for(var u=[],h=360/a.globals.series.length,g=0;g1)h&&!n.total.showAlways?x({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(n,n.total.label,n.total.formatter(d));else if(x({makeSliceOut:!1,printLabel:!0}),!h)if(d.globals.selectedDataPoints.length&&d.globals.series.length>1)if(d.globals.selectedDataPoints[0].length>0){var y=d.globals.selectedDataPoints[0],b=d.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(y));this.printDataLabelsInner(b,n)}else u&&d.globals.selectedDataPoints.length&&d.globals.selectedDataPoints[0].length===0&&(u.style.opacity=0);else u&&d.globals.series.length>1&&(u.style.opacity=0)}}]),O}(),o5=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var n=this.w;this.graphics=new X(this.ctx),this.lineColorArr=n.globals.stroke.colors!==void 0?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight0&&(R=n.getPreviousPath(I));for(var z=0;z=10?i.x>0?(a="start",l+=10):i.x<0&&(a="end",l-=10):a="middle",Math.abs(i.y)>=n-10&&(i.y<0?d-=10:i.y>0&&(d+=10)),{textAnchor:a,newX:l,newY:d}}},{key:"getPreviousPath",value:function(i){for(var n=this.w,a=null,l=0;l0&&parseInt(d.realIndex,10)===parseInt(i,10)&&n.globals.previousPaths[l].paths[0]!==void 0&&(a=n.globals.previousPaths[l].paths[0].d)}return a}},{key:"getDataPointsPos",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;i=i||[],n=n||[];for(var l=[],d=0;d=360&&(E=360-Math.abs(this.startAngle)-.1);var T=d.drawPath({d:"",stroke:S,strokeWidth:x*parseInt(w.strokeWidth,10)/100,fill:"none",strokeOpacity:w.opacity,classes:"apexcharts-radialbar-area"});if(w.dropShadow.enabled){var I=w.dropShadow;h.dropShadow(T,I)}b.add(T),T.attr("id","apexcharts-radialbarTrack-"+y),this.animatePaths(T,{centerX:a.centerX,centerY:a.centerY,endAngle:E,startAngle:j,size:a.size,i:y,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:l.globals.easing})}return u}},{key:"drawArcs",value:function(a){var l=this.w,d=new X(this.ctx),u=new ze(this.ctx),h=new ee(this.ctx),g=d.group(),x=this.getStrokeWidth(a);a.size=a.size-x/2;var y=l.config.plotOptions.radialBar.hollow.background,b=a.size-x*a.series.length-this.margin*a.series.length-x*parseInt(l.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,w=b-l.config.plotOptions.radialBar.hollow.margin;l.config.plotOptions.radialBar.hollow.image!==void 0&&(y=this.drawHollowImage(a,g,b,y));var S=this.drawHollow({size:w,centerX:a.centerX,centerY:a.centerY,fill:y||"transparent"});if(l.config.plotOptions.radialBar.hollow.dropShadow.enabled){var j=l.config.plotOptions.radialBar.hollow.dropShadow;h.dropShadow(S,j)}var E=1;!this.radialDataLabels.total.show&&l.globals.series.length>1&&(E=0);var T=null;this.radialDataLabels.show&&(T=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:b,centerX:a.centerX,centerY:a.centerY,opacity:E})),l.config.plotOptions.radialBar.hollow.position==="back"&&(g.add(S),T&&g.add(T));var I=!1;l.config.plotOptions.radialBar.inverseOrder&&(I=!0);for(var F=I?a.series.length-1:0;I?F>=0:F100?100:a.series[F])/100,$=Math.round(this.totalAngle*z)+this.startAngle,Y=void 0;l.globals.dataChanged&&(R=this.startAngle,Y=Math.round(this.totalAngle*_.negToZero(l.globals.previousPaths[F])/100)+R),Math.abs($)+Math.abs(N)>=360&&($-=.01),Math.abs(Y)+Math.abs(R)>=360&&(Y-=.01);var U=$-N,te=Array.isArray(l.config.stroke.dashArray)?l.config.stroke.dashArray[F]:l.config.stroke.dashArray,ne=d.drawPath({d:"",stroke:k,strokeWidth:x,fill:"none",fillOpacity:l.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+F,strokeDashArray:te});if(X.setAttrs(ne.node,{"data:angle":U,"data:value":a.series[F]}),l.config.chart.dropShadow.enabled){var ie=l.config.chart.dropShadow;h.dropShadow(ne,ie,F)}if(h.setSelectionFilter(ne,0,F),this.addListeners(ne,this.radialDataLabels),m.add(ne),ne.attr({index:0,j:F}),this.barLabels.enabled){var ge=_.polarToCartesian(a.centerX,a.centerY,a.size,N),be=this.barLabels.formatter(l.globals.seriesNames[F],{seriesIndex:F,w:l}),Le=["apexcharts-radialbar-label"];this.barLabels.onClick||Le.push("apexcharts-no-click");var Oe=this.barLabels.useSeriesColors?l.globals.colors[F]:l.config.chart.foreColor;Oe||(Oe=l.config.chart.foreColor);var Ve=ge.x-this.barLabels.margin,We=ge.y,tt=d.drawText({x:Ve,y:We,text:be,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:Oe,cssClass:Le.join(" ")});tt.on("click",this.onBarLabelClick),tt.attr({rel:F+1}),N!==0&&tt.attr({"transform-origin":"".concat(Ve," ").concat(We),transform:"rotate(".concat(N," 0 0)")}),m.add(tt)}var ot=0;!this.initialAnim||l.globals.resized||l.globals.dataChanged||(ot=l.config.chart.animations.speed),l.globals.dataChanged&&(ot=l.config.chart.animations.dynamicAnimation.speed),this.animDur=ot/(1.2*a.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(ne,{centerX:a.centerX,centerY:a.centerY,endAngle:$,startAngle:N,prevEndAngle:Y,prevStartAngle:R,size:a.size,i:F,totalItems:2,animBeginArr:this.animBeginArr,dur:ot,shouldSetPrevPaths:!0,easing:l.globals.easing})}return{g,elHollow:S,dataLabels:T}}},{key:"drawHollow",value:function(a){var l=new X(this.ctx).drawCircle(2*a.size);return l.attr({class:"apexcharts-radialbar-hollow",cx:a.centerX,cy:a.centerY,r:a.size,fill:a.fill}),l}},{key:"drawHollowImage",value:function(a,l,d,u){var h=this.w,g=new ze(this.ctx),x=_.randomId(),y=h.config.plotOptions.radialBar.hollow.image;if(h.config.plotOptions.radialBar.hollow.imageClipped)g.clippedImgArea({width:d,height:d,image:y,patternID:"pattern".concat(h.globals.cuid).concat(x)}),u="url(#pattern".concat(h.globals.cuid).concat(x,")");else{var b=h.config.plotOptions.radialBar.hollow.imageWidth,w=h.config.plotOptions.radialBar.hollow.imageHeight;if(b===void 0&&w===void 0){var S=h.globals.dom.Paper.image(y).loaded(function(E){this.move(a.centerX-E.width/2+h.config.plotOptions.radialBar.hollow.imageOffsetX,a.centerY-E.height/2+h.config.plotOptions.radialBar.hollow.imageOffsetY)});l.add(S)}else{var j=h.globals.dom.Paper.image(y).loaded(function(E){this.move(a.centerX-b/2+h.config.plotOptions.radialBar.hollow.imageOffsetX,a.centerY-w/2+h.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(b,w)});l.add(j)}}return u}},{key:"getStrokeWidth",value:function(a){var l=this.w;return a.size*(100-parseInt(l.config.plotOptions.radialBar.hollow.size,10))/100/(a.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(a){var l=parseInt(a.target.getAttribute("rel"),10)-1,d=this.barLabels.onClick,u=this.w;d&&d(u.globals.seriesNames[l],{w:u,seriesIndex:l})}}]),n}(),c5=function(O){A(n,ds);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l){var d=this.w,u=new X(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=a,this.seriesRangeStart=d.globals.seriesRangeStart,this.seriesRangeEnd=d.globals.seriesRangeEnd,this.barHelpers.initVariables(a);for(var h=u.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),g=0;g0&&(this.visibleI=this.visibleI+1);var I=0,F=0;this.yRatio.length>1&&(this.yaxisIndex=E);var m=this.barHelpers.initialPositions();j=m.y,w=m.zeroW,S=m.x,F=m.barWidth,I=m.barHeight,x=m.xDivision,y=m.yDivision,b=m.zeroH;for(var k=u.group({class:"apexcharts-datalabels","data:realIndex":E}),N=u.group({class:"apexcharts-rangebar-goals-markers"}),R=0;R0});return this.isHorizontal?(u=E.config.plotOptions.bar.rangeBarGroupRows?g+w*k:g+y*this.visibleI+w*k,N>-1&&!E.config.plotOptions.bar.rangeBarOverlap&&(T=E.globals.seriesRange[l][N].overlaps).indexOf(I)>-1&&(u=(y=j.barHeight/T.length)*this.visibleI+w*(100-parseInt(this.barOptions.barHeight,10))/100/2+y*(this.visibleI+T.indexOf(I))+w*k)):(k>-1&&(h=E.config.plotOptions.bar.rangeBarGroupRows?x+S*k:x+b*this.visibleI+S*k),N>-1&&!E.config.plotOptions.bar.rangeBarOverlap&&(T=E.globals.seriesRange[l][N].overlaps).indexOf(I)>-1&&(h=(b=j.barWidth/T.length)*this.visibleI+S*(100-parseInt(this.barOptions.barWidth,10))/100/2+b*(this.visibleI+T.indexOf(I))+S*k)),{barYPosition:u,barXPosition:h,barHeight:y,barWidth:b}}},{key:"drawRangeColumnPaths",value:function(a){var l=a.indexes,d=a.x,u=a.xDivision,h=a.barWidth,g=a.barXPosition,x=a.zeroH,y=this.w,b=l.i,w=l.j,S=this.yRatio[this.yaxisIndex],j=l.realIndex,E=this.getRangeValue(j,w),T=Math.min(E.start,E.end),I=Math.max(E.start,E.end);this.series[b][w]===void 0||this.series[b][w]===null?T=x:(T=x-T/S,I=x-I/S);var F=Math.abs(I-T),m=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:h,y1:T,y2:I,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:l.realIndex,i:j,j:w,w:y});if(y.globals.isXNumeric){var k=this.getBarXForNumericXAxis({x:d,j:w,realIndex:j,barWidth:h});d=k.x,g=k.barXPosition}else d+=u;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:F,x:d,y:I,goalY:this.barHelpers.getGoalValues("y",null,x,b,w),barXPosition:g}}},{key:"drawRangeBarPaths",value:function(a){var l=a.indexes,d=a.y,u=a.y1,h=a.y2,g=a.yDivision,x=a.barHeight,y=a.barYPosition,b=a.zeroW,w=this.w,S=b+u/this.invertedYRatio,j=b+h/this.invertedYRatio,E=Math.abs(j-S),T=this.barHelpers.getBarpaths({barYPosition:y,barHeight:x,x1:S,x2:j,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:l.realIndex,realIndex:l.realIndex,j:l.j,w});return w.globals.isXNumeric||(d+=g),{pathTo:T.pathTo,pathFrom:T.pathFrom,barWidth:E,x:j,goalX:this.barHelpers.getGoalValues("x",b,null,l.realIndex,l.j),y:d}}},{key:"getRangeValue",value:function(a,l){var d=this.w;return{start:d.globals.seriesRangeStart[a][l],end:d.globals.seriesRangeEnd[a][l]}}}]),n}(),d5=function(){function O(i){c(this,O),this.w=i.w,this.lineCtx=i}return v(O,[{key:"sameValueSeriesFix",value:function(i,n){var a=this.w;if((a.config.fill.type==="gradient"||a.config.fill.type[i]==="gradient")&&new q(this.lineCtx.ctx,a).seriesHaveSameValues(i)){var l=n[i].slice();l[l.length-1]=l[l.length-1]+1e-6,n[i]=l}return n}},{key:"calculatePoints",value:function(i){var n=i.series,a=i.realIndex,l=i.x,d=i.y,u=i.i,h=i.j,g=i.prevY,x=this.w,y=[],b=[];if(h===0){var w=this.lineCtx.categoryAxisCorrection+x.config.markers.offsetX;x.globals.isXNumeric&&(w=(x.globals.seriesX[a][0]-x.globals.minX)/this.lineCtx.xRatio+x.config.markers.offsetX),y.push(w),b.push(_.isNumber(n[u][0])?g+x.config.markers.offsetY:null),y.push(l+x.config.markers.offsetX),b.push(_.isNumber(n[u][h+1])?d+x.config.markers.offsetY:null)}else y.push(l+x.config.markers.offsetX),b.push(_.isNumber(n[u][h+1])?d+x.config.markers.offsetY:null);return{x:y,y:b}}},{key:"checkPreviousPaths",value:function(i){for(var n=i.pathFromLine,a=i.pathFromArea,l=i.realIndex,d=this.w,u=0;u0&&parseInt(h.realIndex,10)===parseInt(l,10)&&(h.type==="line"?(this.lineCtx.appendPathFrom=!1,n=d.globals.previousPaths[u].paths[0].d):h.type==="area"&&(this.lineCtx.appendPathFrom=!1,a=d.globals.previousPaths[u].paths[0].d,d.config.stroke.show&&d.globals.previousPaths[u].paths[1]&&(n=d.globals.previousPaths[u].paths[1].d)))}return{pathFromLine:n,pathFromArea:a}}},{key:"determineFirstPrevY",value:function(i){var n,a,l=i.i,d=i.series,u=i.prevY,h=i.lineYPosition,g=this.w,x=g.config.chart.stacked&&!g.globals.comboCharts||g.config.chart.stacked&&g.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[l])===null||n===void 0?void 0:n.type)==="bar");if(((a=d[l])===null||a===void 0?void 0:a[0])!==void 0)u=(h=x&&l>0?this.lineCtx.prevSeriesY[l-1][0]:this.lineCtx.zeroY)-d[l][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?d[l][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(x&&l>0&&d[l][0]===void 0){for(var y=l-1;y>=0;y--)if(d[y][0]!==null&&d[y][0]!==void 0){u=h=this.lineCtx.prevSeriesY[y][0];break}}return{prevY:u,lineYPosition:h}}}]),O}(),u5=function(O){for(var i,n,a,l,d=function(y){for(var b=[],w=y[0],S=y[1],j=b[0]=Ud(w,S),E=1,T=y.length-1;E9&&(l=3*a/Math.sqrt(l),d[g]=l*i,d[g+1]=l*n);for(var x=0;x<=u;x++)l=(O[Math.min(u,x+1)][0]-O[Math.max(0,x-1)][0])/(6*(1+d[x]*d[x])),h.push([l||0,d[x]*l||0]);return h},Yd=function(O){for(var i="",n=0;n4?(i+="C".concat(a[0],", ").concat(a[1]),i+=", ".concat(a[2],", ").concat(a[3]),i+=", ".concat(a[4],", ").concat(a[5])):l>2&&(i+="S".concat(a[0],", ").concat(a[1]),i+=", ".concat(a[2],", ").concat(a[3]))}return i},z1=function(O){var i=u5(O),n=O[1],a=O[0],l=[],d=i[1],u=i[0];l.push(a,[a[0]+u[0],a[1]+u[1],n[0]-d[0],n[1]-d[1],n[0],n[1]]);for(var h=2,g=i.length;h0&&(I=(u.globals.seriesX[S][0]-u.globals.minX)/this.xRatio),T.push(I);var F,m=I,k=void 0,N=m,R=this.zeroY,z=this.zeroY;R=this.lineHelpers.determineFirstPrevY({i:w,series:i,prevY:R,lineYPosition:0}).prevY,u.config.stroke.curve==="monotonCubic"&&i[w][0]===null?j.push(null):j.push(R),F=R,g==="rangeArea"&&(k=z=this.lineHelpers.determineFirstPrevY({i:w,series:l,prevY:z,lineYPosition:0}).prevY,E.push(z));var $={type:g,series:i,realIndex:S,i:w,x:I,y:1,pX:m,pY:F,pathsFrom:this._calculatePathsFrom({type:g,series:i,i:w,realIndex:S,prevX:N,prevY:R,prevY2:z}),linePaths:[],areaPaths:[],seriesIndex:a,lineYPosition:0,xArrj:T,yArrj:j,y2Arrj:E,seriesRangeEnd:l},Y=this._iterateOverDataPoints(s(s({},$),{},{iterations:g==="rangeArea"?i[w].length-1:void 0,isRangeStart:!0}));if(g==="rangeArea"){var U=this._calculatePathsFrom({series:l,i:w,realIndex:S,prevX:N,prevY:z}),te=this._iterateOverDataPoints(s(s({},$),{},{series:l,pY:k,pathsFrom:U,iterations:l[w].length-1,isRangeStart:!1}));Y.linePaths[0]=te.linePath+Y.linePath,Y.pathFromLine=te.pathFromLine+Y.pathFromLine}this._handlePaths({type:g,realIndex:S,i:w,paths:Y}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),b.push(this.elSeries)}if(((d=u.config.series[0])===null||d===void 0?void 0:d.zIndex)!==void 0&&b.sort(function(ge,be){return Number(ge.node.getAttribute("zIndex"))-Number(be.node.getAttribute("zIndex"))}),u.config.chart.stacked)for(var ne=b.length;ne>0;ne--)x.add(b[ne-1]);else for(var ie=0;ie1&&(this.yaxisIndex=a),this.isReversed=l.config.yaxis[this.yaxisIndex]&&l.config.yaxis[this.yaxisIndex].reversed,this.zeroY=l.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?l.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>l.globals.gridHeight||l.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=l.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=d.group({class:"apexcharts-series",zIndex:l.config.series[a].zIndex!==void 0?l.config.series[a].zIndex:a,seriesName:_.escapeString(l.globals.seriesNames[a])}),this.elPointsMain=d.group({class:"apexcharts-series-markers-wrap","data:realIndex":a}),this.elDataLabelsWrap=d.group({class:"apexcharts-datalabels","data:realIndex":a});var u=i[n].length===l.globals.dataPoints;this.elSeries.attr({"data:longestSeries":u,rel:n+1,"data:realIndex":a}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(i){var n,a,l,d,u=i.type,h=i.series,g=i.i,x=i.realIndex,y=i.prevX,b=i.prevY,w=i.prevY2,S=this.w,j=new X(this.ctx);if(h[g][0]===null){for(var E=0;E0){var T=this.lineHelpers.checkPreviousPaths({pathFromLine:l,pathFromArea:d,realIndex:x});l=T.pathFromLine,d=T.pathFromArea}return{prevX:y,prevY:b,linePath:n,areaPath:a,pathFromLine:l,pathFromArea:d}}},{key:"_handlePaths",value:function(i){var n=i.type,a=i.realIndex,l=i.i,d=i.paths,u=this.w,h=new X(this.ctx),g=new ze(this.ctx);this.prevSeriesY.push(d.yArrj),u.globals.seriesXvalues[a]=d.xArrj,u.globals.seriesYvalues[a]=d.yArrj;var x=u.config.forecastDataPoints;if(x.count>0&&n!=="rangeArea"){var y=u.globals.seriesXvalues[a][u.globals.seriesXvalues[a].length-x.count-1],b=h.drawRect(y,0,u.globals.gridWidth,u.globals.gridHeight,0);u.globals.dom.elForecastMask.appendChild(b.node);var w=h.drawRect(0,0,y,u.globals.gridHeight,0);u.globals.dom.elNonForecastMask.appendChild(w.node)}this.pointsChart||u.globals.delayedElements.push({el:this.elPointsMain.node,index:a});var S={i:l,realIndex:a,animationDelay:l,initialSpeed:u.config.chart.animations.speed,dataChangeSpeed:u.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(n)};if(n==="area")for(var j=g.fillPath({seriesNumber:a}),E=0;E0&&n!=="rangeArea"){var z=h.renderPaths(N);z.node.setAttribute("stroke-dasharray",x.dashArray),x.strokeWidth&&z.node.setAttribute("stroke-width",x.strokeWidth),this.elSeries.add(z),z.attr("clip-path","url(#forecastMask".concat(u.globals.cuid,")")),R.attr("clip-path","url(#nonForecastMask".concat(u.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(i){var n,a=this,l=i.type,d=i.series,u=i.iterations,h=i.realIndex,g=i.i,x=i.x,y=i.y,b=i.pX,w=i.pY,S=i.pathsFrom,j=i.linePaths,E=i.areaPaths,T=i.seriesIndex,I=i.lineYPosition,F=i.xArrj,m=i.yArrj,k=i.y2Arrj,N=i.isRangeStart,R=i.seriesRangeEnd,z=this.w,$=new X(this.ctx),Y=this.yRatio,U=S.prevY,te=S.linePath,ne=S.areaPath,ie=S.pathFromLine,ge=S.pathFromArea,be=_.isNumber(z.globals.minYArr[h])?z.globals.minYArr[h]:z.globals.minY;u||(u=z.globals.dataPoints>1?z.globals.dataPoints-1:z.globals.dataPoints);for(var Le=function(Or,gi){return gi-Or/Y[a.yaxisIndex]+2*(a.isReversed?Or/Y[a.yaxisIndex]:0)},Oe=y,Ve=z.config.chart.stacked&&!z.globals.comboCharts||z.config.chart.stacked&&z.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[h])===null||n===void 0?void 0:n.type)==="bar"),We=0;We0&&z.globals.collapsedSeries.length-1){gi--;break}return gi>=0?gi:0}(g-1)][We+1]:I=this.zeroY:I=this.zeroY,tt?y=Le(be,I):(y=Le(d[g][We+1],I),l==="rangeArea"&&(Oe=Le(R[g][We+1],I))),F.push(x),tt&&z.config.stroke.curve==="smooth"?m.push(null):m.push(y),k.push(Oe);var Zt=this.lineHelpers.calculatePoints({series:d,x,y,realIndex:h,i:g,j:We,prevY:U}),Tt=this._createPaths({type:l,series:d,i:g,realIndex:h,j:We,x,y,y2:Oe,xArrj:F,yArrj:m,y2Arrj:k,pX:b,pY:w,linePath:te,areaPath:ne,linePaths:j,areaPaths:E,seriesIndex:T,isRangeStart:N});E=Tt.areaPaths,j=Tt.linePaths,b=Tt.pX,w=Tt.pY,ne=Tt.areaPath,te=Tt.linePath,!this.appendPathFrom||z.config.stroke.curve==="monotoneCubic"&&l==="rangeArea"||(ie+=$.line(x,this.zeroY),ge+=$.line(x,this.zeroY)),this.handleNullDataPoints(d,Zt,g,We,h),this._handleMarkersAndLabels({type:l,pointsPos:Zt,i:g,j:We,realIndex:h,isRangeStart:N})}return{yArrj:m,xArrj:F,pathFromArea:ge,areaPaths:E,pathFromLine:ie,linePaths:j,linePath:te,areaPath:ne}}},{key:"_handleMarkersAndLabels",value:function(i){var n=i.type,a=i.pointsPos,l=i.isRangeStart,d=i.i,u=i.j,h=i.realIndex,g=this.w,x=new Be(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,u,{realIndex:h,pointsPos:a,zRatio:this.zRatio,elParent:this.elPointsMain});else{g.globals.series[d].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var y=this.markers.plotChartMarkers(a,h,u+1);y!==null&&this.elPointsMain.add(y)}var b=x.drawDataLabel({type:n,isRangeStart:l,pos:a,i:h,j:u+1});b!==null&&this.elDataLabelsWrap.add(b)}},{key:"_createPaths",value:function(i){var n=i.type,a=i.series,l=i.i,d=i.realIndex,u=i.j,h=i.x,g=i.y,x=i.xArrj,y=i.yArrj,b=i.y2,w=i.y2Arrj,S=i.pX,j=i.pY,E=i.linePath,T=i.areaPath,I=i.linePaths,F=i.areaPaths,m=i.seriesIndex,k=i.isRangeStart,N=this.w,R=new X(this.ctx),z=N.config.stroke.curve,$=this.areaBottomY;if(Array.isArray(N.config.stroke.curve)&&(z=Array.isArray(m)?N.config.stroke.curve[m[l]]:N.config.stroke.curve[l]),n==="rangeArea"&&(N.globals.hasNullValues||N.config.forecastDataPoints.count>0)&&z==="monotoneCubic"&&(z="straight"),z==="monotoneCubic"){var Y=n==="rangeArea"?x.length===N.globals.dataPoints:u===a[l].length-2,U=x.map(function(Ve,We){return[x[We],y[We]]}).filter(function(Ve){return Ve[1]!==null});if(Y&&U.length>1){var te=z1(U);if(E+=Yd(te),a[l][0]===null?T=E:T+=Yd(te),n==="rangeArea"&&k){E+=R.line(x[x.length-1],w[w.length-1]);var ne=x.slice().reverse(),ie=w.slice().reverse(),ge=ne.map(function(Ve,We){return[ne[We],ie[We]]}),be=z1(ge);T=E+=Yd(be)}else T+=R.line(U[U.length-1][0],$)+R.line(U[0][0],$)+R.move(U[0][0],U[0][1])+"z";I.push(E),F.push(T)}}else if(z==="smooth"){var Le=.35*(h-S);N.globals.hasNullValues?(a[l][u]!==null&&(a[l][u+1]!==null?(E=R.move(S,j)+R.curve(S+Le,j,h-Le,g,h+1,g),T=R.move(S+1,j)+R.curve(S+Le,j,h-Le,g,h+1,g)+R.line(h,$)+R.line(S,$)+"z"):(E=R.move(S,j),T=R.move(S,j)+"z")),I.push(E),F.push(T)):(E+=R.curve(S+Le,j,h-Le,g,h,g),T+=R.curve(S+Le,j,h-Le,g,h,g)),S=h,j=g,u===a[l].length-2&&(T=T+R.curve(S,j,h,g,h,$)+R.move(h,g)+"z",n==="rangeArea"&&k?E=E+R.curve(S,j,h,g,h,b)+R.move(h,b)+"z":N.globals.hasNullValues||(I.push(E),F.push(T)))}else{if(a[l][u+1]===null){E+=R.move(h,g);var Oe=N.globals.isXNumeric?(N.globals.seriesX[d][u]-N.globals.minX)/this.xRatio:h-this.xDivision;T=T+R.line(Oe,$)+R.move(h,g)+"z"}a[l][u]===null&&(E+=R.move(h,g),T+=R.move(h,$)),z==="stepline"?(E=E+R.line(h,null,"H")+R.line(null,g,"V"),T=T+R.line(h,null,"H")+R.line(null,g,"V")):z==="straight"&&(E+=R.line(h,g),T+=R.line(h,g)),u===a[l].length-2&&(T=T+R.line(h,$)+R.move(h,g)+"z",n==="rangeArea"&&k?E=E+R.line(h,b)+R.move(h,b)+"z":(I.push(E),F.push(T)))}return{linePaths:I,areaPaths:F,pX:S,pY:j,linePath:E,areaPath:T}}},{key:"handleNullDataPoints",value:function(i,n,a,l,d){var u=this.w;if(i[a][l]===null&&u.config.markers.showNullDataPoints||i[a].length===1){var h=this.markers.plotChartMarkers(n,d,l+1,this.strokeWidth-u.config.markers.strokeWidth/2,!0);h!==null&&this.elPointsMain.add(h)}}}]),O}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function O(h,g,x,y){this.xoffset=h,this.yoffset=g,this.height=y,this.width=x,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(b){var w,S=[],j=this.xoffset,E=this.yoffset,T=d(b)/this.height,I=d(b)/this.width;if(this.width>=this.height)for(w=0;w=this.height){var S=b/this.height,j=this.width-S;w=new O(this.xoffset+S,this.yoffset,j,this.height)}else{var E=b/this.width,T=this.height-E;w=new O(this.xoffset,this.yoffset+E,this.width,T)}return w}}function i(h,g,x,y,b){y=y===void 0?0:y,b=b===void 0?0:b;var w=n(function(S,j){var E,T=[],I=j/d(S);for(E=0;E=m}(g,w=h[0],b)?(g.push(w),n(h.slice(1),g,x,y)):(S=x.cutArea(d(g),y),y.push(x.getCoordinates(g)),n(h,[],S,y)),y;y.push(x.getCoordinates(g))}function a(h,g){var x=Math.min.apply(Math,h),y=Math.max.apply(Math,h),b=d(h);return Math.max(Math.pow(g,2)*y/Math.pow(b,2),Math.pow(b,2)/(Math.pow(g,2)*x))}function l(h){return h&&h.constructor===Array}function d(h){var g,x=0;for(g=0;gu-l&&x.width<=h-d){var y=g.rotateAroundCenter(i.node);i.node.setAttribute("transform","rotate(-90 ".concat(y.x," ").concat(y.y,") translate(").concat(x.height/3,")"))}}},{key:"truncateLabels",value:function(i,n,a,l,d,u){var h=new X(this.ctx),g=h.getTextRects(i,n).width+this.w.config.stroke.width+5>d-a&&u-l>d-a?u-l:d-a,x=h.getTextBasedOnMaxWidth({text:i,maxWidth:g,fontSize:n});return i.length!==x.length&&g/n<5?"":x}},{key:"animateTreemap",value:function(i,n,a,l){var d=new K(this.ctx);d.animateRect(i,{x:n.x,y:n.y,width:n.width,height:n.height},{x:a.x,y:a.y,width:a.width,height:a.height},l,function(){d.animationCompleted(i)})}}]),O}(),f5=86400,p5=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return v(O,[{key:"calculateTimeScaleTicks",value:function(i,n){var a=this,l=this.w;if(l.globals.allSeriesCollapsed)return l.globals.labels=[],l.globals.timescaleLabels=[],[];var d=new Re(this.ctx),u=(n-i)/864e5;this.determineInterval(u),l.globals.disableZoomIn=!1,l.globals.disableZoomOut=!1,u<.00011574074074074075?l.globals.disableZoomIn=!0:u>5e4&&(l.globals.disableZoomOut=!0);var h=d.getTimeUnitsfromTimestamp(i,n,this.utc),g=l.globals.gridWidth/u,x=g/24,y=x/60,b=y/60,w=Math.floor(24*u),S=Math.floor(1440*u),j=Math.floor(u*f5),E=Math.floor(u),T=Math.floor(u/30),I=Math.floor(u/365),F={minMillisecond:h.minMillisecond,minSecond:h.minSecond,minMinute:h.minMinute,minHour:h.minHour,minDate:h.minDate,minMonth:h.minMonth,minYear:h.minYear},m={firstVal:F,currentMillisecond:F.minMillisecond,currentSecond:F.minSecond,currentMinute:F.minMinute,currentHour:F.minHour,currentMonthDate:F.minDate,currentDate:F.minDate,currentMonth:F.minMonth,currentYear:F.minYear,daysWidthOnXAxis:g,hoursWidthOnXAxis:x,minutesWidthOnXAxis:y,secondsWidthOnXAxis:b,numberOfSeconds:j,numberOfMinutes:S,numberOfHours:w,numberOfDays:E,numberOfMonths:T,numberOfYears:I};switch(this.tickInterval){case"years":this.generateYearScale(m);break;case"months":case"half_year":this.generateMonthScale(m);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(m);break;case"hours":this.generateHourScale(m);break;case"minutes_fives":case"minutes":this.generateMinuteScale(m);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(m)}var k=this.timeScaleArray.map(function(N){var R={position:N.position,unit:N.unit,year:N.year,day:N.day?N.day:1,hour:N.hour?N.hour:0,month:N.month+1};return N.unit==="month"?s(s({},R),{},{day:1,value:N.value+1}):N.unit==="day"||N.unit==="hour"?s(s({},R),{},{value:N.value}):N.unit==="minute"?s(s({},R),{},{value:N.value,minute:N.value}):N.unit==="second"?s(s({},R),{},{value:N.value,minute:N.minute,second:N.second}):N});return k.filter(function(N){var R=1,z=Math.ceil(l.globals.gridWidth/120),$=N.value;l.config.xaxis.tickAmount!==void 0&&(z=l.config.xaxis.tickAmount),k.length>z&&(R=Math.floor(k.length/z));var Y=!1,U=!1;switch(a.tickInterval){case"years":N.unit==="year"&&(Y=!0);break;case"half_year":R=7,N.unit==="year"&&(Y=!0);break;case"months":R=1,N.unit==="year"&&(Y=!0);break;case"months_fortnight":R=15,N.unit!=="year"&&N.unit!=="month"||(Y=!0),$===30&&(U=!0);break;case"months_days":R=10,N.unit==="month"&&(Y=!0),$===30&&(U=!0);break;case"week_days":R=8,N.unit==="month"&&(Y=!0);break;case"days":R=1,N.unit==="month"&&(Y=!0);break;case"hours":N.unit==="day"&&(Y=!0);break;case"minutes_fives":case"seconds_fives":$%5!=0&&(U=!0);break;case"seconds_tens":$%10!=0&&(U=!0)}if(a.tickInterval==="hours"||a.tickInterval==="minutes_fives"||a.tickInterval==="seconds_tens"||a.tickInterval==="seconds_fives"){if(!U)return!0}else if(($%R==0||Y)&&!U)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(i,n){var a=this.w,l=this.formatDates(i),d=this.removeOverlappingTS(l);a.globals.timescaleLabels=d.slice(),new Pt(this.ctx).plotCoords()}},{key:"determineInterval",value:function(i){var n=24*i,a=60*n;switch(!0){case i/365>5:this.tickInterval="years";break;case i>800:this.tickInterval="half_year";break;case i>180:this.tickInterval="months";break;case i>90:this.tickInterval="months_fortnight";break;case i>60:this.tickInterval="months_days";break;case i>30:this.tickInterval="week_days";break;case i>2:this.tickInterval="days";break;case n>2.4:this.tickInterval="hours";break;case a>15:this.tickInterval="minutes_fives";break;case a>5:this.tickInterval="minutes";break;case a>1:this.tickInterval="seconds_tens";break;case 60*a>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(i){var n=i.firstVal,a=i.currentMonth,l=i.currentYear,d=i.daysWidthOnXAxis,u=i.numberOfYears,h=n.minYear,g=0,x=new Re(this.ctx),y="year";if(n.minDate>1||n.minMonth>0){var b=x.determineRemainingDaysOfYear(n.minYear,n.minMonth,n.minDate);g=(x.determineDaysOfYear(n.minYear)-b+1)*d,h=n.minYear+1,this.timeScaleArray.push({position:g,value:h,unit:y,year:h,month:_.monthMod(a+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:g,value:h,unit:y,year:l,month:_.monthMod(a+1)});for(var w=h,S=g,j=0;j1){x=(y.determineDaysOfMonths(l+1,n.minYear)-a+1)*u,g=_.monthMod(l+1);var S=d+w,j=_.monthMod(g),E=g;g===0&&(b="year",E=S,j=1,S+=w+=1),this.timeScaleArray.push({position:x,value:E,unit:b,year:S,month:j})}else this.timeScaleArray.push({position:x,value:g,unit:b,year:d,month:_.monthMod(l)});for(var T=g+1,I=x,F=0,m=1;Fh.determineDaysOfMonths(k+1,N)&&(y=1,g="month",S=k+=1),k},w=(24-n.minHour)*d,S=x,j=b(y,a,l);n.minHour===0&&n.minDate===1?(w=0,S=_.monthMod(n.minMonth),g="month",y=n.minDate):n.minDate!==1&&n.minHour===0&&n.minMinute===0&&(w=0,x=n.minDate,S=x,j=b(y=x,a,l)),this.timeScaleArray.push({position:w,value:S,unit:g,year:this._getYear(l,j,0),month:_.monthMod(j),day:y});for(var E=w,T=0;Tg.determineDaysOfMonths(z+1,d)&&(T=1,z+=1),{month:z,date:T}},b=function(R,z){return R>g.determineDaysOfMonths(z+1,d)?z+=1:z},w=60-(n.minMinute+n.minSecond/60),S=w*u,j=n.minHour+1,E=j;w===60&&(S=0,E=j=n.minHour);var T=a;E>=24&&(E=0,T+=1,x="day");var I=y(T,l).month;I=b(T,I),this.timeScaleArray.push({position:S,value:j,unit:x,day:T,hour:E,year:d,month:_.monthMod(I)}),E++;for(var F=S,m=0;m=24&&(E=0,x="day",I=y(T+=1,I).month,I=b(T,I));var k=this._getYear(d,I,0);F=60*u+F;var N=E===0?T:E;this.timeScaleArray.push({position:F,value:N,unit:x,hour:E,day:T,year:k,month:_.monthMod(I)}),E++}}},{key:"generateMinuteScale",value:function(i){for(var n=i.currentMillisecond,a=i.currentSecond,l=i.currentMinute,d=i.currentHour,u=i.currentDate,h=i.currentMonth,g=i.currentYear,x=i.minutesWidthOnXAxis,y=i.secondsWidthOnXAxis,b=i.numberOfMinutes,w=l+1,S=u,j=h,E=g,T=d,I=(60-a-n/1e3)*y,F=0;F=60&&(w=0,(T+=1)===24&&(T=0)),this.timeScaleArray.push({position:I,value:w,unit:"minute",hour:T,minute:w,day:S,year:this._getYear(E,j,0),month:_.monthMod(j)}),I+=x,w++}},{key:"generateSecondScale",value:function(i){for(var n=i.currentMillisecond,a=i.currentSecond,l=i.currentMinute,d=i.currentHour,u=i.currentDate,h=i.currentMonth,g=i.currentYear,x=i.secondsWidthOnXAxis,y=i.numberOfSeconds,b=a+1,w=l,S=u,j=h,E=g,T=d,I=(1e3-n)/1e3*x,F=0;F=60&&(b=0,++w>=60&&(w=0,++T===24&&(T=0))),this.timeScaleArray.push({position:I,value:b,unit:"second",hour:T,minute:w,second:b,day:S,year:this._getYear(E,j,0),month:_.monthMod(j)}),I+=x,b++}},{key:"createRawDateString",value:function(i,n){var a=i.year;return i.month===0&&(i.month=1),a+="-"+("0"+i.month.toString()).slice(-2),i.unit==="day"?a+=i.unit==="day"?"-"+("0"+n).slice(-2):"-01":a+="-"+("0"+(i.day?i.day:"1")).slice(-2),i.unit==="hour"?a+=i.unit==="hour"?"T"+("0"+n).slice(-2):"T00":a+="T"+("0"+(i.hour?i.hour:"0")).slice(-2),i.unit==="minute"?a+=":"+("0"+n).slice(-2):a+=":"+(i.minute?("0"+i.minute).slice(-2):"00"),i.unit==="second"?a+=":"+("0"+n).slice(-2):a+=":00",this.utc&&(a+=".000Z"),a}},{key:"formatDates",value:function(i){var n=this,a=this.w;return i.map(function(l){var d=l.value.toString(),u=new Re(n.ctx),h=n.createRawDateString(l,d),g=u.getDate(u.parseDate(h));if(n.utc||(g=u.getDate(u.parseDateWithTimezone(h))),a.config.xaxis.labels.format===void 0){var x="dd MMM",y=a.config.xaxis.labels.datetimeFormatter;l.unit==="year"&&(x=y.year),l.unit==="month"&&(x=y.month),l.unit==="day"&&(x=y.day),l.unit==="hour"&&(x=y.hour),l.unit==="minute"&&(x=y.minute),l.unit==="second"&&(x=y.second),d=u.formatDate(g,x)}else d=u.formatDate(g,a.config.xaxis.labels.format);return{dateString:h,position:l.position,value:d,unit:l.unit,year:l.year,month:l.month}})}},{key:"removeOverlappingTS",value:function(i){var n,a=this,l=new X(this.ctx),d=!1;i.length>0&&i[0].value&&i.every(function(g){return g.value.length===i[0].value.length})&&(d=!0,n=l.getTextRects(i[0].value).width);var u=0,h=i.map(function(g,x){if(x>0&&a.w.config.xaxis.labels.hideOverlappingLabels){var y=d?n:l.getTextRects(i[u].value).width,b=i[u].position;return g.position>b+y+10?(u=x,g):null}return g});return h=h.filter(function(g){return g!==null})}},{key:"_getYear",value:function(i,n,a){return i+Math.floor(n/12)+a}}]),O}(),g5=function(){function O(i,n){c(this,O),this.ctx=n,this.w=n.w,this.el=i}return v(O,[{key:"setupElements",value:function(){var i=this.w.globals,n=this.w.config,a=n.chart.type;i.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(a)>-1,i.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].indexOf(a)>-1,i.isBarHorizontal=(n.chart.type==="bar"||n.chart.type==="rangeBar"||n.chart.type==="boxPlot")&&n.plotOptions.bar.horizontal,i.chartClass=".apexcharts"+i.chartID,i.dom.baseEl=this.el,i.dom.elWrap=document.createElement("div"),X.setAttrs(i.dom.elWrap,{id:i.chartClass.substring(1),class:"apexcharts-canvas "+i.chartClass.substring(1)}),this.el.appendChild(i.dom.elWrap),i.dom.Paper=new window.SVG.Doc(i.dom.elWrap),i.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(n.chart.offsetX,", ").concat(n.chart.offsetY,")")}),i.dom.Paper.node.style.background=n.theme.mode!=="dark"||n.chart.background?n.chart.background:"rgba(0, 0, 0, 0.8)",this.setSVGDimensions(),i.dom.elLegendForeign=document.createElementNS(i.SVGNS,"foreignObject"),X.setAttrs(i.dom.elLegendForeign,{x:0,y:0,width:i.svgWidth,height:i.svgHeight}),i.dom.elLegendWrap=document.createElement("div"),i.dom.elLegendWrap.classList.add("apexcharts-legend"),i.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),i.dom.elLegendForeign.appendChild(i.dom.elLegendWrap),i.dom.Paper.node.appendChild(i.dom.elLegendForeign),i.dom.elGraphical=i.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),i.dom.elDefs=i.dom.Paper.defs(),i.dom.Paper.add(i.dom.elGraphical),i.dom.elGraphical.add(i.dom.elDefs)}},{key:"plotChartType",value:function(i,n){var a=this.w,l=a.config,d=a.globals,u={series:[],i:[]},h={series:[],i:[]},g={series:[],i:[]},x={series:[],i:[]},y={series:[],i:[]},b={series:[],i:[]},w={series:[],i:[]},S={series:[],i:[]},j={series:[],seriesRangeEnd:[],i:[]};d.series.map(function(z,$){var Y=0;i[$].type!==void 0?(i[$].type==="column"||i[$].type==="bar"?(d.series.length>1&&l.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),y.series.push(z),y.i.push($),Y++,a.globals.columnSeries=y.series):i[$].type==="area"?(h.series.push(z),h.i.push($),Y++):i[$].type==="line"?(u.series.push(z),u.i.push($),Y++):i[$].type==="scatter"?(g.series.push(z),g.i.push($)):i[$].type==="bubble"?(x.series.push(z),x.i.push($),Y++):i[$].type==="candlestick"?(b.series.push(z),b.i.push($),Y++):i[$].type==="boxPlot"?(w.series.push(z),w.i.push($),Y++):i[$].type==="rangeBar"?(S.series.push(z),S.i.push($),Y++):i[$].type==="rangeArea"?(j.series.push(d.seriesRangeStart[$]),j.seriesRangeEnd.push(d.seriesRangeEnd[$]),j.i.push($),Y++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble/candlestick/boxPlot/rangeBar/rangeArea"),Y>1&&(d.comboCharts=!0)):(u.series.push(z),u.i.push($))});var E=new Gd(this.ctx,n),T=new Xd(this.ctx,n);this.ctx.pie=new I1(this.ctx);var I=new l5(this.ctx);this.ctx.rangeBar=new c5(this.ctx,n);var F=new o5(this.ctx),m=[];if(d.comboCharts){if(h.series.length>0&&m.push(E.draw(h.series,"area",h.i)),y.series.length>0)if(a.config.chart.stacked){var k=new _1(this.ctx,n);m.push(k.draw(y.series,y.i))}else this.ctx.bar=new ds(this.ctx,n),m.push(this.ctx.bar.draw(y.series,y.i));if(j.series.length>0&&m.push(E.draw(j.series,"rangeArea",j.i,j.seriesRangeEnd)),u.series.length>0&&m.push(E.draw(u.series,"line",u.i)),b.series.length>0&&m.push(T.draw(b.series,"candlestick",b.i)),w.series.length>0&&m.push(T.draw(w.series,"boxPlot",w.i)),S.series.length>0&&m.push(this.ctx.rangeBar.draw(S.series,S.i)),g.series.length>0){var N=new Gd(this.ctx,n,!0);m.push(N.draw(g.series,"scatter",g.i))}if(x.series.length>0){var R=new Gd(this.ctx,n,!0);m.push(R.draw(x.series,"bubble",x.i))}}else switch(l.chart.type){case"line":m=E.draw(d.series,"line");break;case"area":m=E.draw(d.series,"area");break;case"bar":l.chart.stacked?m=new _1(this.ctx,n).draw(d.series):(this.ctx.bar=new ds(this.ctx,n),m=this.ctx.bar.draw(d.series));break;case"candlestick":m=new Xd(this.ctx,n).draw(d.series,"candlestick");break;case"boxPlot":m=new Xd(this.ctx,n).draw(d.series,l.chart.type);break;case"rangeBar":m=this.ctx.rangeBar.draw(d.series);break;case"rangeArea":m=E.draw(d.seriesRangeStart,"rangeArea",void 0,d.seriesRangeEnd);break;case"heatmap":m=new a5(this.ctx,n).draw(d.series);break;case"treemap":m=new h5(this.ctx,n).draw(d.series);break;case"pie":case"donut":case"polarArea":m=this.ctx.pie.draw(d.series);break;case"radialBar":m=I.draw(d.series);break;case"radar":m=F.draw(d.series);break;default:m=E.draw(d.series)}return m}},{key:"setSVGDimensions",value:function(){var i=this.w.globals,n=this.w.config;i.svgWidth=n.chart.width,i.svgHeight=n.chart.height;var a=_.getDimensions(this.el),l=n.chart.width.toString().split(/[0-9]+/g).pop();l==="%"?_.isNumber(a[0])&&(a[0].width===0&&(a=_.getDimensions(this.el.parentNode)),i.svgWidth=a[0]*parseInt(n.chart.width,10)/100):l!=="px"&&l!==""||(i.svgWidth=parseInt(n.chart.width,10));var d=n.chart.height.toString().split(/[0-9]+/g).pop();if(i.svgHeight!=="auto"&&i.svgHeight!=="")if(d==="%"){var u=_.getDimensions(this.el.parentNode);i.svgHeight=u[1]*parseInt(n.chart.height,10)/100}else i.svgHeight=parseInt(n.chart.height,10);else i.axisCharts?i.svgHeight=i.svgWidth/1.61:i.svgHeight=i.svgWidth/1.2;if(i.svgWidth<0&&(i.svgWidth=0),i.svgHeight<0&&(i.svgHeight=0),X.setAttrs(i.dom.Paper.node,{width:i.svgWidth,height:i.svgHeight}),d!=="%"){var h=n.chart.sparkline.enabled?0:i.axisCharts?n.chart.parentHeightOffset:0;i.dom.Paper.node.parentNode.parentNode.style.minHeight=i.svgHeight+h+"px"}i.dom.elWrap.style.width=i.svgWidth+"px",i.dom.elWrap.style.height=i.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var i=this.w.globals,n=i.translateY,a={transform:"translate("+i.translateX+", "+n+")"};X.setAttrs(i.dom.elGraphical.node,a)}},{key:"resizeNonAxisCharts",value:function(){var i=this.w,n=i.globals,a=0,l=i.config.chart.sparkline.enabled?1:15;l+=i.config.grid.padding.bottom,i.config.legend.position!=="top"&&i.config.legend.position!=="bottom"||!i.config.legend.show||i.config.legend.floating||(a=new Zo(this.ctx).legendHelpers.getLegendBBox().clwh+10);var d=i.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),u=2.05*i.globals.radialSize;if(d&&!i.config.chart.sparkline.enabled&&i.config.plotOptions.radialBar.startAngle!==0){var h=_.getBoundingClientRect(d);u=h.bottom;var g=h.bottom-h.top;u=Math.max(2.05*i.globals.radialSize,g)}var x=u+n.translateY+a+l;n.dom.elLegendForeign&&n.dom.elLegendForeign.setAttribute("height",x),i.config.chart.height&&String(i.config.chart.height).indexOf("%")>0||(n.dom.elWrap.style.height=x+"px",X.setAttrs(n.dom.Paper.node,{height:x}),n.dom.Paper.node.parentNode.parentNode.style.minHeight=x+"px")}},{key:"coreCalculations",value:function(){new ls(this.ctx).init()}},{key:"resetGlobals",value:function(){var i=this,n=function(){return i.w.config.series.map(function(d){return[]})},a=new Ae,l=this.w.globals;a.initGlobalVars(l),l.seriesXvalues=n(),l.seriesYvalues=n()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var i=null,n=this.w;if(n.globals.axisCharts){if(n.config.xaxis.crosshairs.position==="back"&&new re(this.ctx).drawXCrosshairs(),n.config.yaxis[0].crosshairs.position==="back"&&new re(this.ctx).drawYCrosshairs(),n.config.xaxis.type==="datetime"&&n.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new p5(this.ctx);var a=[];isFinite(n.globals.minX)&&isFinite(n.globals.maxX)&&!n.globals.isBarHorizontal?a=this.ctx.timeScale.calculateTimeScaleTicks(n.globals.minX,n.globals.maxX):n.globals.isBarHorizontal&&(a=this.ctx.timeScale.calculateTimeScaleTicks(n.globals.minY,n.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(a)}i=new q(this.ctx).getCalculatedRatios()}return i}},{key:"updateSourceChart",value:function(i){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:i.w.globals.minX,max:i.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var i=this,n=this.w;if(n.config.chart.brush.enabled&&typeof n.config.chart.events.selection!="function"){var a=Array.isArray(n.config.chart.brush.targets)?n.config.chart.brush.targets:[n.config.chart.brush.target];a.forEach(function(l){var d=ApexCharts.getChartByID(l);d.w.globals.brushSource=i.ctx,typeof d.w.config.chart.events.zoomed!="function"&&(d.w.config.chart.events.zoomed=function(){i.updateSourceChart(d)}),typeof d.w.config.chart.events.scrolled!="function"&&(d.w.config.chart.events.scrolled=function(){i.updateSourceChart(d)})}),n.config.chart.events.selection=function(l,d){a.forEach(function(u){ApexCharts.getChartByID(u).ctx.updateHelpers._updateOptions({xaxis:{min:d.xaxis.min,max:d.xaxis.max}},!1,!1,!1,!1)})}}}}]),O}(),m5=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"_updateOptions",value:function(i){var n=this,a=arguments.length>1&&arguments[1]!==void 0&&arguments[1],l=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],d=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],u=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(h){var g=[n.ctx];d&&(g=n.ctx.getSyncedCharts()),n.ctx.w.globals.isExecCalled&&(g=[n.ctx],n.ctx.w.globals.isExecCalled=!1),g.forEach(function(x,y){var b=x.w;if(b.globals.shouldAnimate=l,a||(b.globals.resized=!0,b.globals.dataChanged=!0,l&&x.series.getPreviousPaths()),i&&o(i)==="object"&&(x.config=new oe(i),i=q.extendArrayProps(x.config,i,b),x.w.globals.chartID!==n.ctx.w.globals.chartID&&delete i.series,b.config=_.extend(b.config,i),u&&(b.globals.lastXAxis=i.xaxis?_.clone(i.xaxis):[],b.globals.lastYAxis=i.yaxis?_.clone(i.yaxis):[],b.globals.initialConfig=_.extend({},b.config),b.globals.initialSeries=_.clone(b.config.series),i.series))){for(var w=0;w2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(d){var u,h=a.w;return h.globals.shouldAnimate=n,h.globals.dataChanged=!0,n&&a.ctx.series.getPreviousPaths(),h.globals.axisCharts?((u=i.map(function(g,x){return a._extendSeries(g,x)})).length===0&&(u=[{data:[]}]),h.config.series=u):h.config.series=i.slice(),l&&(h.globals.initialConfig.series=_.clone(h.config.series),h.globals.initialSeries=_.clone(h.config.series)),a.ctx.update().then(function(){d(a.ctx)})})}},{key:"_extendSeries",value:function(i,n){var a=this.w,l=a.config.series[n];return s(s({},a.config.series[n]),{},{name:i.name?i.name:l==null?void 0:l.name,color:i.color?i.color:l==null?void 0:l.color,type:i.type?i.type:l==null?void 0:l.type,group:i.group?i.group:l==null?void 0:l.group,data:i.data?i.data:l==null?void 0:l.data,zIndex:i.zIndex!==void 0?i.zIndex:n})}},{key:"toggleDataPointSelection",value:function(i,n){var a=this.w,l=null,d=".apexcharts-series[data\\:realIndex='".concat(i,"']");return a.globals.axisCharts?l=a.globals.dom.Paper.select("".concat(d," path[j='").concat(n,"'], ").concat(d," circle[j='").concat(n,"'], ").concat(d," rect[j='").concat(n,"']")).members[0]:n===void 0&&(l=a.globals.dom.Paper.select("".concat(d," path[j='").concat(i,"']")).members[0],a.config.chart.type!=="pie"&&a.config.chart.type!=="polarArea"&&a.config.chart.type!=="donut"||this.ctx.pie.pieClicked(i)),l?(new X(this.ctx).pathMouseDown(l,null),l.node?l.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(i){var n=this.w;if(["min","max"].forEach(function(l){i.xaxis[l]!==void 0&&(n.config.xaxis[l]=i.xaxis[l],n.globals.lastXAxis[l]=i.xaxis[l])}),i.xaxis.categories&&i.xaxis.categories.length&&(n.config.xaxis.categories=i.xaxis.categories),n.config.xaxis.convertedCatToNumeric){var a=new le(i);i=a.convertCatToNumericXaxis(i,this.ctx)}return i}},{key:"forceYAxisUpdate",value:function(i){return i.chart&&i.chart.stacked&&i.chart.stackType==="100%"&&(Array.isArray(i.yaxis)?i.yaxis.forEach(function(n,a){i.yaxis[a].min=0,i.yaxis[a].max=100}):(i.yaxis.min=0,i.yaxis.max=100)),i}},{key:"revertDefaultAxisMinMax",value:function(i){var n=this,a=this.w,l=a.globals.lastXAxis,d=a.globals.lastYAxis;i&&i.xaxis&&(l=i.xaxis),i&&i.yaxis&&(d=i.yaxis),a.config.xaxis.min=l.min,a.config.xaxis.max=l.max;var u=function(h){d[h]!==void 0&&(a.config.yaxis[h].min=d[h].min,a.config.yaxis[h].max=d[h].max)};a.config.yaxis.map(function(h,g){a.globals.zoomed||d[g]!==void 0?u(g):n.ctx.opts.yaxis[g]!==void 0&&(h.min=n.ctx.opts.yaxis[g].min,h.max=n.ctx.opts.yaxis[g].max)})}}]),O}();Rn=typeof window<"u"?window:void 0,el=function(O,i){var n=(this!==void 0?this:O).SVG=function(m){if(n.supported)return m=new n.Doc(m),n.parser.draw||n.prepare(),m};if(n.ns="http://www.w3.org/2000/svg",n.xmlns="http://www.w3.org/2000/xmlns/",n.xlink="http://www.w3.org/1999/xlink",n.svgjs="http://svgjs.dev",n.supported=!0,!n.supported)return!1;n.did=1e3,n.eid=function(m){return"Svgjs"+y(m)+n.did++},n.create=function(m){var k=i.createElementNS(this.ns,m);return k.setAttribute("id",this.eid(m)),k},n.extend=function(){var m,k;k=(m=[].slice.call(arguments)).pop();for(var N=m.length-1;N>=0;N--)if(m[N])for(var R in k)m[N].prototype[R]=k[R];n.Set&&n.Set.inherit&&n.Set.inherit()},n.invent=function(m){var k=typeof m.create=="function"?m.create:function(){this.constructor.call(this,n.create(m.create))};return m.inherit&&(k.prototype=new m.inherit),m.extend&&n.extend(k,m.extend),m.construct&&n.extend(m.parent||n.Container,m.construct),k},n.adopt=function(m){return m?m.instance?m.instance:((k=m.nodeName=="svg"?m.parentNode instanceof O.SVGElement?new n.Nested:new n.Doc:m.nodeName=="linearGradient"?new n.Gradient("linear"):m.nodeName=="radialGradient"?new n.Gradient("radial"):n[y(m.nodeName)]?new n[y(m.nodeName)]:new n.Element(m)).type=m.nodeName,k.node=m,m.instance=k,k instanceof n.Doc&&k.namespace().defs(),k.setData(JSON.parse(m.getAttribute("svgjs:data"))||{}),k):null;var k},n.prepare=function(){var m=i.getElementsByTagName("body")[0],k=(m?new n.Doc(m):n.adopt(i.documentElement).nested()).size(2,0);n.parser={body:m||i.documentElement,draw:k.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:k.polyline().node,path:k.path().node,native:n.create("svg")}},n.parser={native:n.create("svg")},i.addEventListener("DOMContentLoaded",function(){n.parser.draw||n.prepare()},!1),n.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},n.utils={map:function(m,k){for(var N=m.length,R=[],z=0;z1?1:m,new n.Color({r:~~(this.r+(this.destination.r-this.r)*m),g:~~(this.g+(this.destination.g-this.g)*m),b:~~(this.b+(this.destination.b-this.b)*m)})):this}}),n.Color.test=function(m){return m+="",n.regex.isHex.test(m)||n.regex.isRgb.test(m)},n.Color.isRgb=function(m){return m&&typeof m.r=="number"&&typeof m.g=="number"&&typeof m.b=="number"},n.Color.isColor=function(m){return n.Color.isRgb(m)||n.Color.test(m)},n.Array=function(m,k){(m=(m||[]).valueOf()).length==0&&k&&(m=k.valueOf()),this.value=this.parse(m)},n.extend(n.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(m){return m=m.valueOf(),Array.isArray(m)?m:this.split(m)}}),n.PointArray=function(m,k){n.Array.call(this,m,k||[[0,0]])},n.PointArray.prototype=new n.Array,n.PointArray.prototype.constructor=n.PointArray;for(var a={M:function(m,k,N){return k.x=N.x=m[0],k.y=N.y=m[1],["M",k.x,k.y]},L:function(m,k){return k.x=m[0],k.y=m[1],["L",m[0],m[1]]},H:function(m,k){return k.x=m[0],["H",m[0]]},V:function(m,k){return k.y=m[0],["V",m[0]]},C:function(m,k){return k.x=m[4],k.y=m[5],["C",m[0],m[1],m[2],m[3],m[4],m[5]]},Q:function(m,k){return k.x=m[2],k.y=m[3],["Q",m[0],m[1],m[2],m[3]]},S:function(m,k){return k.x=m[2],k.y=m[3],["S",m[0],m[1],m[2],m[3]]},Z:function(m,k,N){return k.x=N.x,k.y=N.y,["Z"]}},l="mlhvqtcsaz".split(""),d=0,u=l.length;dY);return R},bbox:function(){return n.parser.draw||n.prepare(),n.parser.path.setAttribute("d",this.toString()),n.parser.path.getBBox()}}),n.Number=n.invent({create:function(m,k){this.value=0,this.unit=k||"",typeof m=="number"?this.value=isNaN(m)?0:isFinite(m)?m:m<0?-34e37:34e37:typeof m=="string"?(k=m.match(n.regex.numberAndUnit))&&(this.value=parseFloat(k[1]),k[5]=="%"?this.value/=100:k[5]=="s"&&(this.value*=1e3),this.unit=k[5]):m instanceof n.Number&&(this.value=m.valueOf(),this.unit=m.unit)},extend:{toString:function(){return(this.unit=="%"?~~(1e8*this.value)/1e6:this.unit=="s"?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(m){return m=new n.Number(m),new n.Number(this+m,this.unit||m.unit)},minus:function(m){return m=new n.Number(m),new n.Number(this-m,this.unit||m.unit)},times:function(m){return m=new n.Number(m),new n.Number(this*m,this.unit||m.unit)},divide:function(m){return m=new n.Number(m),new n.Number(this/m,this.unit||m.unit)},to:function(m){var k=new n.Number(this);return typeof m=="string"&&(k.unit=m),k},morph:function(m){return this.destination=new n.Number(m),m.relative&&(this.destination.value+=this.value),this},at:function(m){return this.destination?new n.Number(this.destination).minus(this).times(m).plus(this):this}}}),n.Element=n.invent({create:function(m){this._stroke=n.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=m)&&(this.type=m.nodeName,this.node.instance=this,this._stroke=m.getAttribute("stroke")||this._stroke)},extend:{x:function(m){return this.attr("x",m)},y:function(m){return this.attr("y",m)},cx:function(m){return m==null?this.x()+this.width()/2:this.x(m-this.width()/2)},cy:function(m){return m==null?this.y()+this.height()/2:this.y(m-this.height()/2)},move:function(m,k){return this.x(m).y(k)},center:function(m,k){return this.cx(m).cy(k)},width:function(m){return this.attr("width",m)},height:function(m){return this.attr("height",m)},size:function(m,k){var N=w(this,m,k);return this.width(new n.Number(N.width)).height(new n.Number(N.height))},clone:function(m){this.writeDataToDom();var k=E(this.node.cloneNode(!0));return m?m.add(k):this.after(k),k},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(m){return this.after(m).remove(),m},addTo:function(m){return m.put(this)},putIn:function(m){return m.add(this)},id:function(m){return this.attr("id",m)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return this.style("display")!="none"},toString:function(){return this.attr("id")},classes:function(){var m=this.attr("class");return m==null?[]:m.trim().split(n.regex.delimiter)},hasClass:function(m){return this.classes().indexOf(m)!=-1},addClass:function(m){if(!this.hasClass(m)){var k=this.classes();k.push(m),this.attr("class",k.join(" "))}return this},removeClass:function(m){return this.hasClass(m)&&this.attr("class",this.classes().filter(function(k){return k!=m}).join(" ")),this},toggleClass:function(m){return this.hasClass(m)?this.removeClass(m):this.addClass(m)},reference:function(m){return n.get(this.attr(m))},parent:function(m){var k=this;if(!k.node.parentNode)return null;if(k=n.adopt(k.node.parentNode),!m)return k;for(;k&&k.node instanceof O.SVGElement;){if(typeof m=="string"?k.matches(m):k instanceof m)return k;if(!k.node.parentNode||k.node.parentNode.nodeName=="#document")return null;k=n.adopt(k.node.parentNode)}},doc:function(){return this instanceof n.Doc?this:this.parent(n.Doc)},parents:function(m){var k=[],N=this;do{if(!(N=N.parent(m))||!N.node)break;k.push(N)}while(N.parent);return k},matches:function(m){return function(k,N){return(k.matches||k.matchesSelector||k.msMatchesSelector||k.mozMatchesSelector||k.webkitMatchesSelector||k.oMatchesSelector).call(k,N)}(this.node,m)},native:function(){return this.node},svg:function(m){var k=i.createElement("svg");if(!(m&&this instanceof n.Parent))return k.appendChild(m=i.createElement("svg")),this.writeDataToDom(),m.appendChild(this.node.cloneNode(!0)),k.innerHTML.replace(/^/,"").replace(/<\/svg>$/,"");k.innerHTML=""+m.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var N=0,R=k.firstChild.childNodes.length;N":function(m){return-Math.cos(m*Math.PI)/2+.5},">":function(m){return Math.sin(m*Math.PI/2)},"<":function(m){return 1-Math.cos(m*Math.PI/2)}},n.morph=function(m){return function(k,N){return new n.MorphObj(k,N).at(m)}},n.Situation=n.invent({create:function(m){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new n.Number(m.duration).valueOf(),this.delay=new n.Number(m.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=m.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),n.FX=n.invent({create:function(m){this._target=m,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(m,k,N){o(m)==="object"&&(k=m.ease,N=m.delay,m=m.duration);var R=new n.Situation({duration:m||1e3,delay:N||0,ease:n.easing[k||"-"]||k});return this.queue(R),this},target:function(m){return m&&m instanceof n.Element?(this._target=m,this):this._target},timeToAbsPos:function(m){return(m-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(m){return this.situation.duration/this._speed*m+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=O.requestAnimationFrame((function(){this.step()}).bind(this))},stopAnimFrame:function(){O.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(m){return(typeof m=="function"||m instanceof n.Situation)&&this.situations.push(m),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof n.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var m,k=this.situation;if(k.init)return this;for(var N in k.animations){m=this.target()[N](),Array.isArray(m)||(m=[m]),Array.isArray(k.animations[N])||(k.animations[N]=[k.animations[N]]);for(var R=m.length;R--;)k.animations[N][R]instanceof n.Number&&(m[R]=new n.Number(m[R])),k.animations[N][R]=m[R].morph(k.animations[N][R])}for(var N in k.attrs)k.attrs[N]=new n.MorphObj(this.target().attr(N),k.attrs[N]);for(var N in k.styles)k.styles[N]=new n.MorphObj(this.target().style(N),k.styles[N]);return k.initialTransformation=this.target().matrixify(),k.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(m,k){var N=this.active;return this.active=!1,k&&this.clearQueue(),m&&this.situation&&(!N&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(m){var k=this.last();return this.target().on("finished.fx",function N(R){R.detail.situation==k&&(m.call(this,k),this.off("finished.fx",N))}),this._callStart()},during:function(m){var k=this.last(),N=function(R){R.detail.situation==k&&m.call(this,R.detail.pos,n.morph(R.detail.pos),R.detail.eased,k)};return this.target().off("during.fx",N).on("during.fx",N),this.after(function(){this.off("during.fx",N)}),this._callStart()},afterAll:function(m){var k=function N(R){m.call(this),this.off("allfinished.fx",N)};return this.target().off("allfinished.fx",k).on("allfinished.fx",k),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(m,k,N){return this.last()[N||"animations"][m]=k,this._callStart()},step:function(m){var k,N,R;m||(this.absPos=this.timeToAbsPos(+new Date)),this.situation.loops!==!1?(k=Math.max(this.absPos,0),N=Math.floor(k),this.situation.loops===!0||Nthis.lastPos&&$<=z&&(this.situation.once[$].call(this.target(),this.pos,z),delete this.situation.once[$]);return this.active&&this.target().fire("during",{pos:this.pos,eased:z,fx:this,situation:this.situation}),this.situation?(this.eachAt(),this.pos==1&&!this.situation.reversed||this.situation.reversed&&this.pos==0?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=z,this):this},eachAt:function(){var m,k=this,N=this.target(),R=this.situation;for(var z in R.animations)m=[].concat(R.animations[z]).map(function(U){return typeof U!="string"&&U.at?U.at(R.ease(k.pos),k.pos):U}),N[z].apply(N,m);for(var z in R.attrs)m=[z].concat(R.attrs[z]).map(function(te){return typeof te!="string"&&te.at?te.at(R.ease(k.pos),k.pos):te}),N.attr.apply(N,m);for(var z in R.styles)m=[z].concat(R.styles[z]).map(function(te){return typeof te!="string"&&te.at?te.at(R.ease(k.pos),k.pos):te}),N.style.apply(N,m);if(R.transforms.length){m=R.initialTransformation,z=0;for(var $=R.transforms.length;z<$;z++){var Y=R.transforms[z];Y instanceof n.Matrix?m=Y.relative?m.multiply(new n.Matrix().morph(Y).at(R.ease(this.pos))):m.morph(Y).at(R.ease(this.pos)):(Y.relative||Y.undo(m.extract()),m=m.multiply(Y.at(R.ease(this.pos))))}N.matrix(m)}return this},once:function(m,k,N){var R=this.last();return N||(m=R.ease(m)),R.once[m]=k,this},_callStart:function(){return setTimeout((function(){this.start()}).bind(this),0),this}},parent:n.Element,construct:{animate:function(m,k,N){return(this.fx||(this.fx=new n.FX(this))).animate(m,k,N)},delay:function(m){return(this.fx||(this.fx=new n.FX(this))).delay(m)},stop:function(m,k){return this.fx&&this.fx.stop(m,k),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),n.MorphObj=n.invent({create:function(m,k){return n.Color.isColor(k)?new n.Color(m).morph(k):n.regex.delimiter.test(m)?n.regex.pathLetters.test(m)?new n.PathArray(m).morph(k):new n.Array(m).morph(k):n.regex.numberAndUnit.test(k)?new n.Number(m).morph(k):(this.value=m,void(this.destination=k))},extend:{at:function(m,k){return k<1?this.value:this.destination},valueOf:function(){return this.value}}}),n.extend(n.FX,{attr:function(m,k,N){if(o(m)==="object")for(var R in m)this.attr(R,m[R]);else this.add(m,k,"attrs");return this},plot:function(m,k,N,R){return arguments.length==4?this.plot([m,k,N,R]):this.add("plot",new(this.target()).morphArray(m))}}),n.Box=n.invent({create:function(m,k,N,R){if(!(o(m)!=="object"||m instanceof n.Element))return n.Box.call(this,m.left!=null?m.left:m.x,m.top!=null?m.top:m.y,m.width,m.height);var z;arguments.length==4&&(this.x=m,this.y=k,this.width=N,this.height=R),(z=this).x==null&&(z.x=0,z.y=0,z.width=0,z.height=0),z.w=z.width,z.h=z.height,z.x2=z.x+z.width,z.y2=z.y+z.height,z.cx=z.x+z.width/2,z.cy=z.y+z.height/2}}),n.BBox=n.invent({create:function(m){if(n.Box.apply(this,[].slice.call(arguments)),m instanceof n.Element){var k;try{if(!i.documentElement.contains){for(var N=m.node;N.parentNode;)N=N.parentNode;if(N!=i)throw new Error("Element not in the dom")}k=m.node.getBBox()}catch{if(m instanceof n.Shape){n.parser.draw||n.prepare();var R=m.clone(n.parser.draw.instance).show();R&&R.node&&typeof R.node.getBBox=="function"&&(k=R.node.getBBox()),R&&typeof R.remove=="function"&&R.remove()}else k={x:m.node.clientLeft,y:m.node.clientTop,width:m.node.clientWidth,height:m.node.clientHeight}}n.Box.call(this,k)}},inherit:n.Box,parent:n.Element,construct:{bbox:function(){return new n.BBox(this)}}}),n.BBox.prototype.constructor=n.BBox,n.Matrix=n.invent({create:function(m){var k=j([1,0,0,1,0,0]);m=m===null?k:m instanceof n.Element?m.matrixify():typeof m=="string"?j(m.split(n.regex.delimiter).map(parseFloat)):arguments.length==6?j([].slice.call(arguments)):Array.isArray(m)?j(m):m&&o(m)==="object"?m:k;for(var N=I.length-1;N>=0;--N)this[I[N]]=m[I[N]]!=null?m[I[N]]:k[I[N]]},extend:{extract:function(){var m=S(this,0,1);S(this,1,0);var k=180/Math.PI*Math.atan2(m.y,m.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(k*Math.PI/180)+this.f*Math.sin(k*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(k*Math.PI/180)+this.e*Math.sin(-k*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:k,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new n.Matrix(this)}},clone:function(){return new n.Matrix(this)},morph:function(m){return this.destination=new n.Matrix(m),this},multiply:function(m){return new n.Matrix(this.native().multiply(function(k){return k instanceof n.Matrix||(k=new n.Matrix(k)),k}(m).native()))},inverse:function(){return new n.Matrix(this.native().inverse())},translate:function(m,k){return new n.Matrix(this.native().translate(m||0,k||0))},native:function(){for(var m=n.parser.native.createSVGMatrix(),k=I.length-1;k>=0;k--)m[I[k]]=this[I[k]];return m},toString:function(){return"matrix("+T(this.a)+","+T(this.b)+","+T(this.c)+","+T(this.d)+","+T(this.e)+","+T(this.f)+")"}},parent:n.Element,construct:{ctm:function(){return new n.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof n.Nested){var m=this.rect(1,1),k=m.node.getScreenCTM();return m.remove(),new n.Matrix(k)}return new n.Matrix(this.node.getScreenCTM())}}}),n.Point=n.invent({create:function(m,k){var N;N=Array.isArray(m)?{x:m[0],y:m[1]}:o(m)==="object"?{x:m.x,y:m.y}:m!=null?{x:m,y:k??m}:{x:0,y:0},this.x=N.x,this.y=N.y},extend:{clone:function(){return new n.Point(this)},morph:function(m,k){return this.destination=new n.Point(m,k),this}}}),n.extend(n.Element,{point:function(m,k){return new n.Point(m,k).transform(this.screenCTM().inverse())}}),n.extend(n.Element,{attr:function(m,k,N){if(m==null){for(m={},N=(k=this.node.attributes).length-1;N>=0;N--)m[k[N].nodeName]=n.regex.isNumber.test(k[N].nodeValue)?parseFloat(k[N].nodeValue):k[N].nodeValue;return m}if(o(m)==="object")for(var R in m)this.attr(R,m[R]);else if(k===null)this.node.removeAttribute(m);else{if(k==null)return(k=this.node.getAttribute(m))==null?n.defaults.attrs[m]:n.regex.isNumber.test(k)?parseFloat(k):k;m=="stroke-width"?this.attr("stroke",parseFloat(k)>0?this._stroke:null):m=="stroke"&&(this._stroke=k),m!="fill"&&m!="stroke"||(n.regex.isImage.test(k)&&(k=this.doc().defs().image(k,0,0)),k instanceof n.Image&&(k=this.doc().defs().pattern(0,0,function(){this.add(k)}))),typeof k=="number"?k=new n.Number(k):n.Color.isColor(k)?k=new n.Color(k):Array.isArray(k)&&(k=new n.Array(k)),m=="leading"?this.leading&&this.leading(k):typeof N=="string"?this.node.setAttributeNS(N,m,k.toString()):this.node.setAttribute(m,k.toString()),!this.rebuild||m!="font-size"&&m!="x"||this.rebuild(m,k)}return this}}),n.extend(n.Element,{transform:function(m,k){var N;return o(m)!=="object"?(N=new n.Matrix(this).extract(),typeof m=="string"?N[m]:N):(N=new n.Matrix(this),k=!!k||!!m.relative,m.a!=null&&(N=k?N.multiply(new n.Matrix(m)):new n.Matrix(m)),this.attr("transform",N))}}),n.extend(n.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(n.regex.transforms).slice(0,-1).map(function(m){var k=m.trim().split("(");return[k[0],k[1].split(n.regex.delimiter).map(function(N){return parseFloat(N)})]}).reduce(function(m,k){return k[0]=="matrix"?m.multiply(j(k[1])):m[k[0]].apply(m,k[1])},new n.Matrix)},toParent:function(m){if(this==m)return this;var k=this.screenCTM(),N=m.screenCTM().inverse();return this.addTo(m).untransform().transform(N.multiply(k)),this},toDoc:function(){return this.toParent(this.doc())}}),n.Transformation=n.invent({create:function(m,k){if(arguments.length>1&&typeof k!="boolean")return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(m))for(var N=0,R=this.arguments.length;N=0},index:function(m){return[].slice.call(this.node.childNodes).indexOf(m.node)},get:function(m){return n.adopt(this.node.childNodes[m])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(m,k){for(var N=this.children(),R=0,z=N.length;Ra.globals.gridHeight&&(x=a.globals.gridHeight),a.globals.isBarHorizontal||this.moveXCrosshairs(g),l.fixedTooltip||this.moveTooltip(g,x||a.globals.gridHeight)}}]),O}(),Jo=function(){function O(i){c(this,O),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx,this.tooltipPosition=new Ko(i)}return v(O,[{key:"drawDynamicPoints",value:function(){var i=this.w,n=new X(this.ctx),a=new Ue(this.ctx),l=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series");l=D(l),i.config.chart.stacked&&l.sort(function(b,w){return parseFloat(b.getAttribute("data:realIndex"))-parseFloat(w.getAttribute("data:realIndex"))});for(var d=0;d2&&arguments[2]!==void 0?arguments[2]:null,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,d=this.w;d.config.chart.type!=="bubble"&&this.newPointSize(i,n);var u=n.getAttribute("cx"),h=n.getAttribute("cy");if(a!==null&&l!==null&&(u=a,h=l),this.tooltipPosition.moveXCrosshairs(u),!this.fixedTooltip){if(d.config.chart.type==="radar"){var g=this.ttCtx.getElGrid().getBoundingClientRect();u=this.ttCtx.e.clientX-g.left}this.tooltipPosition.moveTooltip(u,h,d.config.markers.hover.size)}}},{key:"enlargePoints",value:function(i){for(var n=this.w,a=this,l=this.ttCtx,d=i,u=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),h=n.config.markers.hover.size,g=0;g=0?i[n].setAttribute("r",a):i[n].setAttribute("r",0)}}}]),O}(),r5=function(){function O(i){c(this,O),this.w=i.w;var n=this.w;this.ttCtx=i,this.isVerticalGroupedRangeBar=!n.globals.isBarHorizontal&&n.config.chart.type==="rangeBar"&&n.config.plotOptions.bar.rangeBarGroupRows}return v(O,[{key:"getAttr",value:function(i,n){return parseFloat(i.target.getAttribute(n))}},{key:"handleHeatTreeTooltip",value:function(i){var n=i.e,a=i.opt,l=i.x,d=i.y,u=i.type,h=this.ttCtx,g=this.w;if(n.target.classList.contains("apexcharts-".concat(u,"-rect"))){var x=this.getAttr(n,"i"),y=this.getAttr(n,"j"),b=this.getAttr(n,"cx"),w=this.getAttr(n,"cy"),S=this.getAttr(n,"width"),j=this.getAttr(n,"height");if(h.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:x,j:y,shared:!1,e:n}),g.globals.capturedSeriesIndex=x,g.globals.capturedDataPointIndex=y,l=b+h.tooltipRect.ttWidth/2+S,d=w+h.tooltipRect.ttHeight/2-j/2,h.tooltipPosition.moveXCrosshairs(b+S/2),l>g.globals.gridWidth/2&&(l=b-h.tooltipRect.ttWidth/2+S),h.w.config.tooltip.followCursor){var L=g.globals.dom.elWrap.getBoundingClientRect();l=g.globals.clientX-L.left-(l>g.globals.gridWidth/2?h.tooltipRect.ttWidth:0),d=g.globals.clientY-L.top-(d>g.globals.gridHeight/2?h.tooltipRect.ttHeight:0)}}return{x:l,y:d}}},{key:"handleMarkerTooltip",value:function(i){var n,a,l=i.e,d=i.opt,u=i.x,h=i.y,g=this.w,x=this.ttCtx;if(l.target.classList.contains("apexcharts-marker")){var y=parseInt(d.paths.getAttribute("cx"),10),b=parseInt(d.paths.getAttribute("cy"),10),w=parseFloat(d.paths.getAttribute("val"));if(a=parseInt(d.paths.getAttribute("rel"),10),n=parseInt(d.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,x.intersect){var S=_.findAncestor(d.paths,"apexcharts-series");S&&(n=parseInt(S.getAttribute("data:realIndex"),10))}if(x.tooltipLabels.drawSeriesTexts({ttItems:d.ttItems,i:n,j:a,shared:!x.showOnIntersect&&g.config.tooltip.shared,e:l}),l.type==="mouseup"&&x.markerClick(l,n,a),g.globals.capturedSeriesIndex=n,g.globals.capturedDataPointIndex=a,u=y,h=b+g.globals.translateY-1.4*x.tooltipRect.ttHeight,x.w.config.tooltip.followCursor){var j=x.getElGrid().getBoundingClientRect();h=x.e.clientY+g.globals.translateY-j.top}w<0&&(h=b),x.marker.enlargeCurrentPoint(a,d.paths,u,h)}return{x:u,y:h}}},{key:"handleBarTooltip",value:function(i){var n,a,l=i.e,d=i.opt,u=this.w,h=this.ttCtx,g=h.getElTooltip(),x=0,y=0,b=0,w=this.getBarTooltipXY({e:l,opt:d});n=w.i;var S=w.barHeight,j=w.j;u.globals.capturedSeriesIndex=n,u.globals.capturedDataPointIndex=j,u.globals.isBarHorizontal&&h.tooltipUtil.hasBars()||!u.config.tooltip.shared?(y=w.x,b=w.y,a=Array.isArray(u.config.stroke.width)?u.config.stroke.width[n]:u.config.stroke.width,x=y):u.globals.comboCharts||u.config.tooltip.shared||(x/=2),isNaN(b)&&(b=u.globals.svgHeight-h.tooltipRect.ttHeight);var L=parseInt(d.paths.parentNode.getAttribute("data:realIndex"),10),T=u.globals.isMultipleYAxis?u.config.yaxis[L]&&u.config.yaxis[L].reversed:u.config.yaxis[0].reversed;if(y+h.tooltipRect.ttWidth>u.globals.gridWidth&&!T?y-=h.tooltipRect.ttWidth:y<0&&(y=0),h.w.config.tooltip.followCursor){var I=h.getElGrid().getBoundingClientRect();b=h.e.clientY-I.top}h.tooltip===null&&(h.tooltip=u.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),u.config.tooltip.shared||(u.globals.comboBarCount>0?h.tooltipPosition.moveXCrosshairs(x+a/2):h.tooltipPosition.moveXCrosshairs(x)),!h.fixedTooltip&&(!u.config.tooltip.shared||u.globals.isBarHorizontal&&h.tooltipUtil.hasBars())&&(T&&(y-=h.tooltipRect.ttWidth)<0&&(y=0),!T||u.globals.isBarHorizontal&&h.tooltipUtil.hasBars()||(b=b+S-2*(u.globals.series[n][j]<0?S:0)),b=b+u.globals.translateY-h.tooltipRect.ttHeight/2,g.style.left=y+u.globals.translateX+"px",g.style.top=b+"px")}},{key:"getBarTooltipXY",value:function(i){var n=this,a=i.e,l=i.opt,d=this.w,u=null,h=this.ttCtx,g=0,x=0,y=0,b=0,w=0,S=a.target.classList;if(S.contains("apexcharts-bar-area")||S.contains("apexcharts-candlestick-area")||S.contains("apexcharts-boxPlot-area")||S.contains("apexcharts-rangebar-area")){var j=a.target,L=j.getBoundingClientRect(),T=l.elGrid.getBoundingClientRect(),I=L.height;w=L.height;var F=L.width,m=parseInt(j.getAttribute("cx"),10),k=parseInt(j.getAttribute("cy"),10);b=parseFloat(j.getAttribute("barWidth"));var N=a.type==="touchmove"?a.touches[0].clientX:a.clientX;u=parseInt(j.getAttribute("j"),10),g=parseInt(j.parentNode.getAttribute("rel"),10)-1;var R=j.getAttribute("data-range-y1"),z=j.getAttribute("data-range-y2");d.globals.comboCharts&&(g=parseInt(j.parentNode.getAttribute("data:realIndex"),10));var $=function(U){return d.globals.isXNumeric?m-F/2:n.isVerticalGroupedRangeBar?m+F/2:m-h.dataPointsDividedWidth+F/2},Y=function(){return k-h.dataPointsDividedHeight+I/2-h.tooltipRect.ttHeight/2};h.tooltipLabels.drawSeriesTexts({ttItems:l.ttItems,i:g,j:u,y1:R?parseInt(R,10):null,y2:z?parseInt(z,10):null,shared:!h.showOnIntersect&&d.config.tooltip.shared,e:a}),d.config.tooltip.followCursor?d.globals.isBarHorizontal?(x=N-T.left+15,y=Y()):(x=$(),y=a.clientY-T.top-h.tooltipRect.ttHeight/2-15):d.globals.isBarHorizontal?((x=m)0&&a.setAttribute("width",n.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var i=this.w,n=this.ttCtx;n.ycrosshairs=i.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),n.ycrosshairsHidden=i.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(i,n,a){var l=this.ttCtx,d=this.w,u=d.globals.yLabelFormatters[i];if(l.yaxisTooltips[i]){var h=l.getElGrid().getBoundingClientRect(),g=(n-h.top)*a.yRatio[i],x=d.globals.maxYArr[i]-d.globals.minYArr[i],y=d.globals.minYArr[i]+(x-g);l.tooltipPosition.moveYCrosshairs(n-h.top),l.yaxisTooltipText[i].innerHTML=u(y),l.tooltipPosition.moveYAxisTooltip(i)}}}]),O}(),R1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w;var n=this.w;this.tConfig=n.config.tooltip,this.tooltipUtil=new qo(this),this.tooltipLabels=new Qo(this),this.tooltipPosition=new Ko(this),this.marker=new Jo(this),this.intersect=new r5(this),this.axesTooltip=new i5(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!n.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return v(O,[{key:"getElTooltip",value:function(i){return i||(i=this),i.w.globals.dom.baseEl?i.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(i){var n=this.w;this.xyRatios=i,this.isXAxisTooltipEnabled=n.config.xaxis.tooltip.enabled&&n.globals.axisCharts,this.yaxisTooltips=n.config.yaxis.map(function(u,h){return!!(u.show&&u.tooltip.enabled&&n.globals.axisCharts)}),this.allTooltipSeriesGroups=[],n.globals.axisCharts||(this.showTooltipTitle=!1);var a=document.createElement("div");if(a.classList.add("apexcharts-tooltip"),n.config.tooltip.cssClass&&a.classList.add(n.config.tooltip.cssClass),a.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),n.globals.dom.elWrap.appendChild(a),n.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var l=new Bi(this.ctx);this.xAxisTicksPositions=l.getXAxisTicksPositions()}if(!n.globals.comboCharts&&!this.tConfig.intersect&&n.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),n.config.markers.size!==0&&n.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),n.globals.collapsedSeries.length!==n.globals.series.length){this.dataPointsDividedHeight=n.globals.gridHeight/n.globals.dataPoints,this.dataPointsDividedWidth=n.globals.gridWidth/n.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||n.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,a.appendChild(this.tooltipTitle));var d=n.globals.series.length;(n.globals.xyCharts||n.globals.comboCharts)&&this.tConfig.shared&&(d=this.showOnIntersect?1:n.globals.series.length),this.legendLabels=n.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(d),this.addSVGEvents()}}},{key:"createTTElements",value:function(i){for(var n=this,a=this.w,l=[],d=this.getElTooltip(),u=function(g){var x=document.createElement("div");x.classList.add("apexcharts-tooltip-series-group"),x.style.order=a.config.tooltip.inverseOrder?i-g:g+1,n.tConfig.shared&&n.tConfig.enabledOnSeries&&Array.isArray(n.tConfig.enabledOnSeries)&&n.tConfig.enabledOnSeries.indexOf(g)<0&&x.classList.add("apexcharts-tooltip-series-group-hidden");var y=document.createElement("span");y.classList.add("apexcharts-tooltip-marker"),y.style.backgroundColor=a.globals.colors[g],x.appendChild(y);var b=document.createElement("div");b.classList.add("apexcharts-tooltip-text"),b.style.fontFamily=n.tConfig.style.fontFamily||a.config.chart.fontFamily,b.style.fontSize=n.tConfig.style.fontSize,["y","goals","z"].forEach(function(w){var S=document.createElement("div");S.classList.add("apexcharts-tooltip-".concat(w,"-group"));var j=document.createElement("span");j.classList.add("apexcharts-tooltip-text-".concat(w,"-label")),S.appendChild(j);var L=document.createElement("span");L.classList.add("apexcharts-tooltip-text-".concat(w,"-value")),S.appendChild(L),b.appendChild(S)}),x.appendChild(b),d.appendChild(x),l.push(x)},h=0;h0&&this.addPathsEventListeners(j,b),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(b)}}},{key:"drawFixedTooltipRect",value:function(){var i=this.w,n=this.getElTooltip(),a=n.getBoundingClientRect(),l=a.width+10,d=a.height+10,u=this.tConfig.fixed.offsetX,h=this.tConfig.fixed.offsetY,g=this.tConfig.fixed.position.toLowerCase();return g.indexOf("right")>-1&&(u=u+i.globals.svgWidth-l+10),g.indexOf("bottom")>-1&&(h=h+i.globals.svgHeight-d-10),n.style.left=u+"px",n.style.top=h+"px",{x:u,y:h,ttWidth:l,ttHeight:d}}},{key:"addDatapointEventsListeners",value:function(i){var n=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(n,i)}},{key:"addPathsEventListeners",value:function(i,n){for(var a=this,l=function(u){var h={paths:i[u],tooltipEl:n.tooltipEl,tooltipY:n.tooltipY,tooltipX:n.tooltipX,elGrid:n.elGrid,hoverArea:n.hoverArea,ttItems:n.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(g){return i[u].addEventListener(g,a.onSeriesHover.bind(a,h),{capture:!1,passive:!0})})},d=0;d=100?this.seriesHover(i,n):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){a.seriesHover(i,n)},100-l))}},{key:"seriesHover",value:function(i,n){var a=this;this.lastHoverTime=Date.now();var l=[],d=this.w;d.config.chart.group&&(l=this.ctx.getGroupedCharts()),d.globals.axisCharts&&(d.globals.minX===-1/0&&d.globals.maxX===1/0||d.globals.dataPoints===0)||(l.length?l.forEach(function(u){var h=a.getElTooltip(u),g={paths:i.paths,tooltipEl:h,tooltipY:i.tooltipY,tooltipX:i.tooltipX,elGrid:i.elGrid,hoverArea:i.hoverArea,ttItems:u.w.globals.tooltip.ttItems};u.w.globals.minX===a.w.globals.minX&&u.w.globals.maxX===a.w.globals.maxX&&u.w.globals.tooltip.seriesHoverByContext({chartCtx:u,ttCtx:u.w.globals.tooltip,opt:g,e:n})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:i,e:n}))}},{key:"seriesHoverByContext",value:function(i){var n=i.chartCtx,a=i.ttCtx,l=i.opt,d=i.e,u=n.w,h=this.getElTooltip();h&&(a.tooltipRect={x:0,y:0,ttWidth:h.getBoundingClientRect().width,ttHeight:h.getBoundingClientRect().height},a.e=d,a.tooltipUtil.hasBars()&&!u.globals.comboCharts&&!a.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Me(n).toggleSeriesOnHover(d,d.target.parentNode),a.fixedTooltip&&a.drawFixedTooltipRect(),u.globals.axisCharts?a.axisChartsTooltips({e:d,opt:l,tooltipRect:a.tooltipRect}):a.nonAxisChartsTooltips({e:d,opt:l,tooltipRect:a.tooltipRect}))}},{key:"axisChartsTooltips",value:function(i){var n,a,l=i.e,d=i.opt,u=this.w,h=d.elGrid.getBoundingClientRect(),g=l.type==="touchmove"?l.touches[0].clientX:l.clientX,x=l.type==="touchmove"?l.touches[0].clientY:l.clientY;if(this.clientY=x,this.clientX=g,u.globals.capturedSeriesIndex=-1,u.globals.capturedDataPointIndex=-1,xh.top+h.height)this.handleMouseOut(d);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!u.config.tooltip.shared){var y=parseInt(d.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(y)<0)return void this.handleMouseOut(d)}var b=this.getElTooltip(),w=this.getElXCrosshairs(),S=u.globals.xyCharts||u.config.chart.type==="bar"&&!u.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||u.globals.comboCharts&&this.tooltipUtil.hasBars();if(l.type==="mousemove"||l.type==="touchmove"||l.type==="mouseup"){if(u.globals.collapsedSeries.length+u.globals.ancillaryCollapsedSeries.length===u.globals.series.length)return;w!==null&&w.classList.add("apexcharts-active");var j=this.yaxisTooltips.filter(function(I){return I===!0});if(this.ycrosshairs!==null&&j.length&&this.ycrosshairs.classList.add("apexcharts-active"),S&&!this.showOnIntersect)this.handleStickyTooltip(l,g,x,d);else if(u.config.chart.type==="heatmap"||u.config.chart.type==="treemap"){var L=this.intersect.handleHeatTreeTooltip({e:l,opt:d,x:n,y:a,type:u.config.chart.type});n=L.x,a=L.y,b.style.left=n+"px",b.style.top=a+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:l,opt:d}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:l,opt:d,x:n,y:a});if(this.yaxisTooltips.length)for(var T=0;Tx.width)this.handleMouseOut(l);else if(g!==null)this.handleStickyCapturedSeries(i,g,l,h);else if(this.tooltipUtil.isXoverlap(h)||d.globals.isBarHorizontal){var y=d.globals.series.findIndex(function(b,w){return!d.globals.collapsedSeriesIndices.includes(w)});this.create(i,this,y,h,l.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(i,n,a,l){var d=this.w;if(!this.tConfig.shared&&d.globals.series[n][l]===null)return void this.handleMouseOut(a);if(d.globals.series[n][l]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(l)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(i,this,n,l,a.ttItems):this.create(i,this,n,l,a.ttItems,!1);else if(this.tooltipUtil.isXoverlap(l)){var u=d.globals.series.findIndex(function(h,g){return!d.globals.collapsedSeriesIndices.includes(g)});this.create(i,this,u,l,a.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var i=this.w,n=new X(this.ctx),a=i.globals.dom.Paper.select(".apexcharts-bar-area"),l=0;l5&&arguments[5]!==void 0?arguments[5]:null,z=this.w,$=n;i.type==="mouseup"&&this.markerClick(i,a,l),R===null&&(R=this.tConfig.shared);var Y=this.tooltipUtil.hasMarkers(a),U=this.tooltipUtil.getElBars();if(z.config.legend.tooltipHoverFormatter){var te=z.config.legend.tooltipHoverFormatter,ne=Array.from(this.legendLabels);ne.forEach(function(Zt){var Tt=Zt.getAttribute("data:default-text");Zt.innerHTML=decodeURIComponent(Tt)});for(var ie=0;ie0?$.marker.enlargePoints(l):$.tooltipPosition.moveDynamicPointsOnHover(l);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(U),this.barSeriesHeight>0)){var We=new X(this.ctx),tt=z.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(l,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(l,a);for(var ot=0;ot0&&l.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(j-=b*z)),R&&(j=j+S.height/2-m/2-2);var Y=this.barCtx.series[d][u]<0,U=x;switch(this.barCtx.isReversed&&(U=x-w+(Y?2*w:0),x-=w),I.position){case"center":L=R?Y?U-w/2+N:U+w/2-N:Y?U-w/2+S.height/2+N:U+w/2+S.height/2-N;break;case"bottom":L=R?Y?U-w+N:U+w-N:Y?U-w+S.height+m+N:U+w-S.height/2+m-N;break;case"top":L=R?Y?U+N:U-N:Y?U-S.height/2-N:U+S.height+N}if(this.barCtx.lastActiveBarSerieIndex===h&&F.enabled){var te=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:h,j:u}),T.fontSize);n=Y?U-te.height/2-N-F.offsetY+18:U+te.height+N+F.offsetY-18,a=j+F.offsetX}return l.config.chart.stacked||(L<0?L=0+m:L+S.height/3>l.globals.gridHeight&&(L=l.globals.gridHeight-m)),{bcx:y,bcy:x,dataLabelsX:j,dataLabelsY:L,totalDataLabelsX:a,totalDataLabelsY:n,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(i){var n=this.w,a=i.x,l=i.i,d=i.j,u=i.realIndex,h=i.groupIndex,g=i.bcy,x=i.barHeight,y=i.barWidth,b=i.textRects,w=i.dataLabelsX,S=i.strokeWidth,j=i.dataLabelsConfig,L=i.barDataLabelsConfig,T=i.barTotalDataLabelsConfig,I=i.offX,F=i.offY,m=n.globals.gridHeight/n.globals.dataPoints;y=Math.abs(y);var k,N,R=(g+=h!==-1?h*x:0)-(this.barCtx.isRangeBar?0:m)+x/2+b.height/2+F-3,z="start",$=this.barCtx.series[l][d]<0,Y=a;switch(this.barCtx.isReversed&&(Y=a+y-($?2*y:0),a=n.globals.gridWidth-y),L.position){case"center":w=$?Y+y/2-I:Math.max(b.width/2,Y-y/2)+I;break;case"bottom":w=$?Y+y-S-Math.round(b.width/2)-I:Y-y+S+Math.round(b.width/2)+I;break;case"top":w=$?Y-S+Math.round(b.width/2)-I:Y-S-Math.round(b.width/2)+I}if(this.barCtx.lastActiveBarSerieIndex===u&&T.enabled){var U=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:u,j:d}),j.fontSize);$?(k=Y-S+Math.round(U.width/2)-I-T.offsetX-15,z="end"):k=Y-S-Math.round(U.width/2)+I+T.offsetX+15,N=R+T.offsetY}return n.config.chart.stacked||(w<0?w=w+b.width+S:w+b.width/2>n.globals.gridWidth&&(w=n.globals.gridWidth-b.width-S)),{bcx:a,bcy:g,dataLabelsX:w,dataLabelsY:R,totalDataLabelsX:k,totalDataLabelsY:N,totalDataLabelsAnchor:z}}},{key:"drawCalculatedDataLabels",value:function(i){var n=i.x,a=i.y,l=i.val,d=i.i,u=i.j,h=i.textRects,g=i.barHeight,x=i.barWidth,y=i.dataLabelsConfig,b=this.w,w="rotate(0)";b.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(w="rotate(-90, ".concat(n,", ").concat(a,")"));var S=new Be(this.barCtx.ctx),j=new X(this.barCtx.ctx),L=y.formatter,T=null,I=b.globals.collapsedSeriesIndices.indexOf(d)>-1;if(y.enabled&&!I){T=j.group({class:"apexcharts-data-labels",transform:w});var F="";l!==void 0&&(F=L(l,s(s({},b),{},{seriesIndex:d,dataPointIndex:u,w:b}))),!l&&b.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(F="");var m=b.globals.series[d][u]<0,k=b.config.plotOptions.bar.dataLabels.position;b.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(k==="top"&&(y.textAnchor=m?"end":"start"),k==="center"&&(y.textAnchor="middle"),k==="bottom"&&(y.textAnchor=m?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&xMath.abs(x)&&(F=""):h.height/1.6>Math.abs(g)&&(F=""));var N=s({},y);this.barCtx.isHorizontal&&l<0&&(y.textAnchor==="start"?N.textAnchor="end":y.textAnchor==="end"&&(N.textAnchor="start")),S.plotDataLabelsText({x:n,y:a,text:F,i:d,j:u,parent:T,dataLabelsConfig:N,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return T}},{key:"drawTotalDataLabels",value:function(i){var n,a=i.x,l=i.y,d=i.val,u=i.barWidth,h=i.barHeight,g=i.realIndex,x=i.textAnchor,y=i.barTotalDataLabelsConfig,b=this.w,w=new X(this.barCtx.ctx);return y.enabled&&a!==void 0&&l!==void 0&&this.barCtx.lastActiveBarSerieIndex===g&&(n=w.drawText({x:a-(!b.globals.isBarHorizontal&&b.globals.seriesGroups.length?u/b.globals.seriesGroups.length:0),y:l-(b.globals.isBarHorizontal&&b.globals.seriesGroups.length?h/b.globals.seriesGroups.length:0),foreColor:y.style.color,text:d,textAnchor:x,fontFamily:y.style.fontFamily,fontSize:y.style.fontSize,fontWeight:y.style.fontWeight})),n}}]),O}(),s5=function(){function O(i){c(this,O),this.w=i.w,this.barCtx=i}return v(O,[{key:"initVariables",value:function(i){var n=this.w;this.barCtx.series=i,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var a=0;a0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=i[a].length),n.globals.isXNumeric)for(var l=0;ln.globals.minX&&n.globals.seriesX[a][l]0&&(l=x.globals.minXDiff/w),(u=l/b*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(u=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(u=parseInt(this.barCtx.barOptions.columnWidth,10)),h=x.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?x.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),i=x.globals.padHorizontal+(l-u*this.barCtx.seriesLen)/2}return x.globals.barHeight=d,x.globals.barWidth=u,{x:i,y:n,yDivision:a,xDivision:l,barHeight:d,barWidth:u,zeroH:h,zeroW:g}}},{key:"initializeStackedPrevVars",value:function(i){var n=i.w;n.globals.hasSeriesGroups?n.globals.seriesGroups.forEach(function(a){i[a]||(i[a]={}),i[a].prevY=[],i[a].prevX=[],i[a].prevYF=[],i[a].prevXF=[],i[a].prevYVal=[],i[a].prevXVal=[]}):(i.prevY=[],i.prevX=[],i.prevYF=[],i.prevXF=[],i.prevYVal=[],i.prevXVal=[])}},{key:"initializeStackedXYVars",value:function(i){var n=i.w;n.globals.hasSeriesGroups?n.globals.seriesGroups.forEach(function(a){i[a]||(i[a]={}),i[a].xArrj=[],i[a].xArrjF=[],i[a].xArrjVal=[],i[a].yArrj=[],i[a].yArrjF=[],i[a].yArrjVal=[]}):(i.xArrj=[],i.xArrjF=[],i.xArrjVal=[],i.yArrj=[],i.yArrjF=[],i.yArrjVal=[])}},{key:"getPathFillColor",value:function(i,n,a,l){var d,u,h,g,x=this.w,y=new ze(this.barCtx.ctx),b=null,w=this.barCtx.barOptions.distributed?a:n;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(S){i[n][a]>=S.from&&i[n][a]<=S.to&&(b=S.color)}),x.config.series[n].data[a]&&x.config.series[n].data[a].fillColor&&(b=x.config.series[n].data[a].fillColor),y.fillPath({seriesNumber:this.barCtx.barOptions.distributed?w:l,dataPointIndex:a,color:b,value:i[n][a],fillConfig:(d=x.config.series[n].data[a])===null||d===void 0?void 0:d.fill,fillType:(u=x.config.series[n].data[a])!==null&&u!==void 0&&(h=u.fill)!==null&&h!==void 0&&h.type?(g=x.config.series[n].data[a])===null||g===void 0?void 0:g.fill.type:Array.isArray(x.config.fill.type)?x.config.fill.type[n]:x.config.fill.type})}},{key:"getStrokeWidth",value:function(i,n,a){var l=0,d=this.w;return this.barCtx.series[i][n]===void 0||this.barCtx.series[i][n]===null?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,d.config.stroke.show&&(this.barCtx.isNullValue||(l=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[a]:this.barCtx.strokeWidth)),l}},{key:"shouldApplyRadius",value:function(i){var n=this.w,a=!1;return n.config.plotOptions.bar.borderRadius>0&&(n.config.chart.stacked&&n.config.plotOptions.bar.borderRadiusWhenStacked==="last"?this.barCtx.lastActiveBarSerieIndex===i&&(a=!0):a=!0),a}},{key:"barBackground",value:function(i){var n=i.j,a=i.i,l=i.x1,d=i.x2,u=i.y1,h=i.y2,g=i.elSeries,x=this.w,y=new X(this.barCtx.ctx),b=new Me(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&b===a){n>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(n%=this.barCtx.barOptions.colors.backgroundBarColors.length);var w=this.barCtx.barOptions.colors.backgroundBarColors[n],S=y.drawRect(l!==void 0?l:0,u!==void 0?u:0,d!==void 0?d:x.globals.gridWidth,h!==void 0?h:x.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,w,this.barCtx.barOptions.colors.backgroundBarOpacity);g.add(S),S.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(i){var n,a=i.barWidth,l=i.barXPosition,d=i.y1,u=i.y2,h=i.strokeWidth,g=i.seriesGroup,x=i.realIndex,y=i.i,b=i.j,w=i.w,S=new X(this.barCtx.ctx);(h=Array.isArray(h)?h[x]:h)||(h=0);var j=a,L=l;(n=w.config.series[x].data[b])!==null&&n!==void 0&&n.columnWidthOffset&&(L=l-w.config.series[x].data[b].columnWidthOffset/2,j=a+w.config.series[x].data[b].columnWidthOffset);var T=L,I=L+j;d+=.001,u+=.001;var F=S.move(T,d),m=S.move(T,d),k=S.line(I-h,d);if(w.globals.previousPaths.length>0&&(m=this.barCtx.getPreviousPath(x,b,!1)),F=F+S.line(T,u)+S.line(I-h,u)+S.line(I-h,d)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),m=m+S.line(T,d)+k+k+k+k+k+S.line(T,d)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),this.shouldApplyRadius(x)&&(F=S.roundPathCorners(F,w.config.plotOptions.bar.borderRadius)),w.config.chart.stacked){var N=this.barCtx;w.globals.hasSeriesGroups&&g&&(N=this.barCtx[g]),N.yArrj.push(u),N.yArrjF.push(Math.abs(d-u)),N.yArrjVal.push(this.barCtx.series[y][b])}return{pathTo:F,pathFrom:m}}},{key:"getBarpaths",value:function(i){var n,a=i.barYPosition,l=i.barHeight,d=i.x1,u=i.x2,h=i.strokeWidth,g=i.seriesGroup,x=i.realIndex,y=i.i,b=i.j,w=i.w,S=new X(this.barCtx.ctx);(h=Array.isArray(h)?h[x]:h)||(h=0);var j=a,L=l;(n=w.config.series[x].data[b])!==null&&n!==void 0&&n.barHeightOffset&&(j=a-w.config.series[x].data[b].barHeightOffset/2,L=l+w.config.series[x].data[b].barHeightOffset);var T=j,I=j+L;d+=.001,u+=.001;var F=S.move(d,T),m=S.move(d,T);w.globals.previousPaths.length>0&&(m=this.barCtx.getPreviousPath(x,b,!1));var k=S.line(d,I-h);if(F=F+S.line(u,T)+S.line(u,I-h)+k+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),m=m+S.line(d,T)+k+k+k+k+k+S.line(d,T)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),this.shouldApplyRadius(x)&&(F=S.roundPathCorners(F,w.config.plotOptions.bar.borderRadius)),w.config.chart.stacked){var N=this.barCtx;w.globals.hasSeriesGroups&&g&&(N=this.barCtx[g]),N.xArrj.push(u),N.xArrjF.push(Math.abs(d-u)),N.xArrjVal.push(this.barCtx.series[y][b])}return{pathTo:F,pathFrom:m}}},{key:"checkZeroSeries",value:function(i){for(var n=i.series,a=this.w,l=0;l2&&arguments[2]!==void 0)||arguments[2]?n:null;return i!=null&&(a=n+i/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?i/this.barCtx.invertedYRatio:0)),a}},{key:"getYForValue",value:function(i,n){var a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?n:null;return i!=null&&(a=n-i/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?i/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),a}},{key:"getGoalValues",value:function(i,n,a,l,d){var u=this,h=this.w,g=[],x=function(w,S){var j;g.push((C(j={},i,i==="x"?u.getXForValue(w,n,!1):u.getYForValue(w,a,!1)),C(j,"attrs",S),j))};if(h.globals.seriesGoals[l]&&h.globals.seriesGoals[l][d]&&Array.isArray(h.globals.seriesGoals[l][d])&&h.globals.seriesGoals[l][d].forEach(function(w){x(w.value,w)}),this.barCtx.barOptions.isDumbbell&&h.globals.seriesRange.length){var y=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:h.globals.colors,b={strokeHeight:i==="x"?0:h.globals.markers.size[l],strokeWidth:i==="x"?h.globals.markers.size[l]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(y[l])?y[l][0]:y[l]};x(h.globals.seriesRangeStart[l][d],b),x(h.globals.seriesRangeEnd[l][d],s(s({},b),{},{strokeColor:Array.isArray(y[l])?y[l][1]:y[l]}))}return g}},{key:"drawGoalLine",value:function(i){var n=i.barXPosition,a=i.barYPosition,l=i.goalX,d=i.goalY,u=i.barWidth,h=i.barHeight,g=new X(this.barCtx.ctx),x=g.group({className:"apexcharts-bar-goals-groups"});x.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:x.node}),x.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var y=null;return this.barCtx.isHorizontal?Array.isArray(l)&&l.forEach(function(b){var w=b.attrs.strokeHeight!==void 0?b.attrs.strokeHeight:h/2,S=a+w+h/2;y=g.drawLine(b.x,S-2*w,b.x,S,b.attrs.strokeColor?b.attrs.strokeColor:void 0,b.attrs.strokeDashArray,b.attrs.strokeWidth?b.attrs.strokeWidth:2,b.attrs.strokeLineCap),x.add(y)}):Array.isArray(d)&&d.forEach(function(b){var w=b.attrs.strokeWidth!==void 0?b.attrs.strokeWidth:u/2,S=n+w+u/2;y=g.drawLine(S-2*w,b.y,S,b.y,b.attrs.strokeColor?b.attrs.strokeColor:void 0,b.attrs.strokeDashArray,b.attrs.strokeHeight?b.attrs.strokeHeight:2,b.attrs.strokeLineCap),x.add(y)}),x}},{key:"drawBarShadow",value:function(i){var n=i.prevPaths,a=i.currPaths,l=i.color,d=this.w,u=n.x,h=n.x1,g=n.barYPosition,x=a.x,y=a.x1,b=a.barYPosition,w=g+a.barHeight,S=new X(this.barCtx.ctx),j=new _,L=S.move(h,w)+S.line(u,w)+S.line(x,b)+S.line(y,b)+S.line(h,w)+(d.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z");return S.drawPath({d:L,fill:j.shadeColor(.5,_.rgb2hex(l)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadows"})}},{key:"getZeroValueEncounters",value:function(i){var n=i.i,a=i.j,l=this.w,d=0,u=0;return l.globals.seriesPercent.forEach(function(h,g){h[a]&&d++,gthis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var h=0,g=0;h0&&(this.visibleI=this.visibleI+1);var m=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=I),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed;var N=this.barHelpers.initialPositions();j=N.y,m=N.barHeight,y=N.yDivision,w=N.zeroW,S=N.x,k=N.barWidth,x=N.xDivision,b=N.zeroH,this.horizontal||T.push(S+k/2);var R=l.group({class:"apexcharts-datalabels","data:realIndex":I});a.globals.delayedElements.push({el:R.node}),R.node.classList.add("apexcharts-element-hidden");var z=l.group({class:"apexcharts-bar-goals-markers"}),$=l.group({class:"apexcharts-bar-shadows"});a.globals.delayedElements.push({el:$.node}),$.node.classList.add("apexcharts-element-hidden");for(var Y=0;Y0){var me=this.barHelpers.drawBarShadow({color:typeof ie=="string"&&(ie==null?void 0:ie.indexOf("url"))===-1?ie:_.hexToRgba(a.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:te});me&&$.add(me)}this.pathArr.push(te);var be=this.barHelpers.drawGoalLine({barXPosition:te.barXPosition,barYPosition:te.barYPosition,goalX:te.goalX,goalY:te.goalY,barHeight:m,barWidth:k});be&&z.add(be),j=te.y,S=te.x,Y>0&&T.push(S+k/2),L.push(j),this.renderSeries({realIndex:I,pathFill:ie,j:Y,i:h,pathFrom:te.pathFrom,pathTo:te.pathTo,strokeWidth:U,elSeries:F,x:S,y:j,series:i,barHeight:te.barHeight?te.barHeight:m,barWidth:te.barWidth?te.barWidth:k,elDataLabelsWrap:R,elGoalsMarkers:z,elBarShadows:$,visibleSeries:this.visibleI,type:"bar"})}a.globals.seriesXvalues[I]=T,a.globals.seriesYvalues[I]=L,u.add(F)}return u}},{key:"renderSeries",value:function(i){var n=i.realIndex,a=i.pathFill,l=i.lineFill,d=i.j,u=i.i,h=i.groupIndex,g=i.pathFrom,x=i.pathTo,y=i.strokeWidth,b=i.elSeries,w=i.x,S=i.y,j=i.y1,L=i.y2,T=i.series,I=i.barHeight,F=i.barWidth,m=i.barXPosition,k=i.barYPosition,N=i.elDataLabelsWrap,R=i.elGoalsMarkers,z=i.elBarShadows,$=i.visibleSeries,Y=i.type,U=this.w,te=new X(this.ctx);l||(l=this.barOptions.distributed?U.globals.stroke.colors[d]:U.globals.stroke.colors[n]),U.config.series[u].data[d]&&U.config.series[u].data[d].strokeColor&&(l=U.config.series[u].data[d].strokeColor),this.isNullValue&&(a="none");var ne=d/U.config.chart.animations.animateGradually.delay*(U.config.chart.animations.speed/U.globals.dataPoints)/2.4,ie=te.renderPaths({i:u,j:d,realIndex:n,pathFrom:g,pathTo:x,stroke:l,strokeWidth:y,strokeLineCap:U.config.stroke.lineCap,fill:a,animationDelay:ne,initialSpeed:U.config.chart.animations.speed,dataChangeSpeed:U.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(Y,"-area")});ie.attr("clip-path","url(#gridRectMask".concat(U.globals.cuid,")"));var me=U.config.forecastDataPoints;me.count>0&&d>=U.globals.dataPoints-me.count&&(ie.node.setAttribute("stroke-dasharray",me.dashArray),ie.node.setAttribute("stroke-width",me.strokeWidth),ie.node.setAttribute("fill-opacity",me.fillOpacity)),j!==void 0&&L!==void 0&&(ie.attr("data-range-y1",j),ie.attr("data-range-y2",L)),new ee(this.ctx).setSelectionFilter(ie,n,d),b.add(ie);var be=new n5(this).handleBarDataLabels({x:w,y:S,y1:j,y2:L,i:u,j:d,series:T,realIndex:n,groupIndex:h,barHeight:I,barWidth:F,barXPosition:m,barYPosition:k,renderedPath:ie,visibleSeries:$});return be.dataLabels!==null&&N.add(be.dataLabels),be.totalDataLabels&&N.add(be.totalDataLabels),b.add(N),R&&b.add(R),z&&b.add(z),b}},{key:"drawBarPaths",value:function(i){var n,a=i.indexes,l=i.barHeight,d=i.strokeWidth,u=i.zeroW,h=i.x,g=i.y,x=i.yDivision,y=i.elSeries,b=this.w,w=a.i,S=a.j;if(b.globals.isXNumeric)n=(g=(b.globals.seriesX[w][S]-b.globals.minX)/this.invertedXRatio-l)+l*this.visibleI;else if(b.config.plotOptions.bar.hideZeroBarsWhenGrouped){var j=0,L=0;b.globals.seriesPercent.forEach(function(I,F){I[S]&&j++,F0&&(l=this.seriesLen*l/j),n=g+l*this.visibleI,n-=l*L}else n=g+l*this.visibleI;this.isFunnel&&(u-=(this.barHelpers.getXForValue(this.series[w][S],u)-u)/2),h=this.barHelpers.getXForValue(this.series[w][S],u);var T=this.barHelpers.getBarpaths({barYPosition:n,barHeight:l,x1:u,x2:h,strokeWidth:d,series:this.series,realIndex:a.realIndex,i:w,j:S,w:b});return b.globals.isXNumeric||(g+=x),this.barHelpers.barBackground({j:S,i:w,y1:n-l*this.visibleI,y2:l*this.seriesLen,elSeries:y}),{pathTo:T.pathTo,pathFrom:T.pathFrom,x1:u,x:h,y:g,goalX:this.barHelpers.getGoalValues("x",u,null,w,S),barYPosition:n,barHeight:l}}},{key:"drawColumnPaths",value:function(i){var n,a=i.indexes,l=i.x,d=i.y,u=i.xDivision,h=i.barWidth,g=i.zeroH,x=i.strokeWidth,y=i.elSeries,b=this.w,w=a.realIndex,S=a.i,j=a.j,L=a.bc;if(b.globals.isXNumeric){var T=this.getBarXForNumericXAxis({x:l,j,realIndex:w,barWidth:h});l=T.x,n=T.barXPosition}else if(b.config.plotOptions.bar.hideZeroBarsWhenGrouped){var I=this.barHelpers.getZeroValueEncounters({i:S,j}),F=I.nonZeroColumns,m=I.zeroEncounters;F>0&&(h=this.seriesLen*h/F),n=l+h*this.visibleI,n-=h*m}else n=l+h*this.visibleI;d=this.barHelpers.getYForValue(this.series[S][j],g);var k=this.barHelpers.getColumnPaths({barXPosition:n,barWidth:h,y1:g,y2:d,strokeWidth:x,series:this.series,realIndex:a.realIndex,i:S,j,w:b});return b.globals.isXNumeric||(l+=u),this.barHelpers.barBackground({bc:L,j,i:S,x1:n-x/2-h*this.visibleI,x2:h*this.seriesLen+x/2,elSeries:y}),{pathTo:k.pathTo,pathFrom:k.pathFrom,x:l,y:d,goalY:this.barHelpers.getGoalValues("y",null,g,S,j),barXPosition:n,barWidth:h}}},{key:"getBarXForNumericXAxis",value:function(i){var n=i.x,a=i.barWidth,l=i.realIndex,d=i.j,u=this.w,h=l;return u.globals.seriesX[l].length||(h=u.globals.maxValsInArrayIndex),u.globals.seriesX[h][d]&&(n=(u.globals.seriesX[h][d]-u.globals.minX)/this.xRatio-a*this.seriesLen/2),{barXPosition:n+a*this.visibleI,x:n}}},{key:"getPreviousPath",value:function(i,n){for(var a,l=this.w,d=0;d0&&parseInt(u.realIndex,10)===parseInt(i,10)&&l.globals.previousPaths[d].paths[n]!==void 0&&(a=l.globals.previousPaths[d].paths[n].d)}return a}}]),O}(),_1=function(O){A(n,us);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l){var d=this,u=this.w;this.graphics=new X(this.ctx),this.bar=new us(this.ctx,this.xyRatios);var h=new Q(this.ctx,u);a=h.getLogSeries(a),this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(a),u.config.chart.stackType==="100%"&&(a=u.globals.seriesPercent.slice()),this.series=a,this.barHelpers.initializeStackedPrevVars(this);for(var g=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),x=0,y=0,b=function(j,L){var T=void 0,I=void 0,F=void 0,m=void 0,k=-1;d.groupCtx=d,u.globals.seriesGroups.forEach(function(tt,ot){tt.indexOf(u.config.series[j].name)>-1&&(k=ot)}),k!==-1&&(d.groupCtx=d[u.globals.seriesGroups[k]]);var N=[],R=[],z=u.globals.comboCharts?l[j]:j;d.yRatio.length>1&&(d.yaxisIndex=z),d.isReversed=u.config.yaxis[d.yaxisIndex]&&u.config.yaxis[d.yaxisIndex].reversed;var $=d.graphics.group({class:"apexcharts-series",seriesName:_.escapeString(u.globals.seriesNames[z]),rel:j+1,"data:realIndex":z});d.ctx.series.addCollapsedClassToSeries($,z);var Y=d.graphics.group({class:"apexcharts-datalabels","data:realIndex":z}),U=d.graphics.group({class:"apexcharts-bar-goals-markers"}),te=0,ne=0,ie=d.initialPositions(x,y,T,I,F,m);y=ie.y,te=ie.barHeight,I=ie.yDivision,m=ie.zeroW,x=ie.x,ne=ie.barWidth,T=ie.xDivision,F=ie.zeroH,u.globals.barHeight=te,u.globals.barWidth=ne,d.barHelpers.initializeStackedXYVars(d),d.groupCtx.prevY.length===1&&d.groupCtx.prevY[0].every(function(tt){return isNaN(tt)})&&(d.groupCtx.prevY[0]=d.groupCtx.prevY[0].map(function(tt){return F}),d.groupCtx.prevYF[0]=d.groupCtx.prevYF[0].map(function(tt){return 0}));for(var me=0;me1?(d=S.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:w*parseInt(S.config.plotOptions.bar.columnWidth,10)/100,String(S.config.plotOptions.bar.columnWidth).indexOf("%")===-1&&(w=parseInt(S.config.plotOptions.bar.columnWidth,10)),h=S.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?S.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),a=S.globals.padHorizontal+(d-w)/2),{x:a,y:l,yDivision:u,xDivision:d,barHeight:(x=S.globals.seriesGroups)!==null&&x!==void 0&&x.length?b/S.globals.seriesGroups.length:b,barWidth:(y=S.globals.seriesGroups)!==null&&y!==void 0&&y.length?w/S.globals.seriesGroups.length:w,zeroH:h,zeroW:g}}},{key:"drawStackedBarPaths",value:function(a){for(var l,d=a.indexes,u=a.barHeight,h=a.strokeWidth,g=a.zeroW,x=a.x,y=a.y,b=a.groupIndex,w=a.seriesGroup,S=a.yDivision,j=a.elSeries,L=this.w,T=y+(b!==-1?b*u:0),I=d.i,F=d.j,m=0,k=0;k0){var R=g;this.groupCtx.prevXVal[N-1][F]<0?R=this.series[I][F]>=0?this.groupCtx.prevX[N-1][F]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[N-1][F]:this.groupCtx.prevXVal[N-1][F]>=0&&(R=this.series[I][F]>=0?this.groupCtx.prevX[N-1][F]:this.groupCtx.prevX[N-1][F]-m+2*(this.isReversed?m:0)),l=R}else l=g;x=this.series[I][F]===null?l:l+this.series[I][F]/this.invertedYRatio-2*(this.isReversed?this.series[I][F]/this.invertedYRatio:0);var z=this.barHelpers.getBarpaths({barYPosition:T,barHeight:u,x1:l,x2:x,strokeWidth:h,series:this.series,realIndex:d.realIndex,seriesGroup:w,i:I,j:F,w:L});return this.barHelpers.barBackground({j:F,i:I,y1:T,y2:u,elSeries:j}),y+=S,{pathTo:z.pathTo,pathFrom:z.pathFrom,goalX:this.barHelpers.getGoalValues("x",g,null,I,F),barYPosition:T,x,y}}},{key:"drawStackedColumnPaths",value:function(a){var l=a.indexes,d=a.x,u=a.y,h=a.xDivision,g=a.barWidth,x=a.zeroH,y=a.groupIndex,b=a.seriesGroup,w=a.elSeries,S=this.w,j=l.i,L=l.j,T=l.bc;if(S.globals.isXNumeric){var I=S.globals.seriesX[j][L];I||(I=0),d=(I-S.globals.minX)/this.xRatio-g/2,S.globals.seriesGroups.length&&(d=(I-S.globals.minX)/this.xRatio-g/2*S.globals.seriesGroups.length)}for(var F,m=d+(y!==-1?y*g:0),k=0,N=0;N0&&!S.globals.isXNumeric||R>0&&S.globals.isXNumeric&&S.globals.seriesX[j-1][L]===S.globals.seriesX[j][L]){var z,$,Y,U=Math.min(this.yRatio.length+1,j+1);if(this.groupCtx.prevY[R-1]!==void 0&&this.groupCtx.prevY[R-1].length)for(var te=1;te=0?Y-k+2*(this.isReversed?k:0):Y;break}if(((be=this.groupCtx.prevYVal[R-ie])===null||be===void 0?void 0:be[L])>=0){$=this.series[j][L]>=0?Y:Y+k-2*(this.isReversed?k:0);break}}$===void 0&&($=S.globals.gridHeight),F=(z=this.groupCtx.prevYF[0])!==null&&z!==void 0&&z.every(function(Oe){return Oe===0})&&this.groupCtx.prevYF.slice(1,R).every(function(Oe){return Oe.every(function(Ve){return isNaN(Ve)})})?x:$}else F=x;u=this.series[j][L]?F-this.series[j][L]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[j][L]/this.yRatio[this.yaxisIndex]:0):F;var Le=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:g,y1:F,y2:u,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,seriesGroup:b,realIndex:l.realIndex,i:j,j:L,w:S});return this.barHelpers.barBackground({bc:T,j:L,i:j,x1:m,x2:g,elSeries:w}),d+=h,{pathTo:Le.pathTo,pathFrom:Le.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,x,j,L),barXPosition:m,x:S.globals.isXNumeric?d-h:d,y:u}}}]),n}(),Xd=function(O){A(n,us);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l,d){var u=this,h=this.w,g=new X(this.ctx),x=h.globals.comboCharts?l:h.config.chart.type,y=new ze(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=h.config.plotOptions.bar.horizontal;var b=new Q(this.ctx,h);a=b.getLogSeries(a),this.series=a,this.yRatio=b.getLogYRatios(this.yRatio),this.barHelpers.initVariables(a);for(var w=g.group({class:"apexcharts-".concat(x,"-series apexcharts-plot-series")}),S=function(L){u.isBoxPlot=h.config.chart.type==="boxPlot"||h.config.series[L].type==="boxPlot";var T,I,F,m,k=void 0,N=void 0,R=[],z=[],$=h.globals.comboCharts?d[L]:L,Y=g.group({class:"apexcharts-series",seriesName:_.escapeString(h.globals.seriesNames[$]),rel:L+1,"data:realIndex":$});u.ctx.series.addCollapsedClassToSeries(Y,$),a[L].length>0&&(u.visibleI=u.visibleI+1);var U,te;u.yRatio.length>1&&(u.yaxisIndex=$);var ne=u.barHelpers.initialPositions();N=ne.y,U=ne.barHeight,I=ne.yDivision,m=ne.zeroW,k=ne.x,te=ne.barWidth,T=ne.xDivision,F=ne.zeroH,z.push(k+te/2);for(var ie=g.group({class:"apexcharts-datalabels","data:realIndex":$}),me=function(Le){var Oe=u.barHelpers.getStrokeWidth(L,Le,$),Ve=null,We={indexes:{i:L,j:Le,realIndex:$},x:k,y:N,strokeWidth:Oe,elSeries:Y};Ve=u.isHorizontal?u.drawHorizontalBoxPaths(s(s({},We),{},{yDivision:I,barHeight:U,zeroW:m})):u.drawVerticalBoxPaths(s(s({},We),{},{xDivision:T,barWidth:te,zeroH:F})),N=Ve.y,k=Ve.x,Le>0&&z.push(k+te/2),R.push(N),Ve.pathTo.forEach(function(tt,ot){var Zt=!u.isBoxPlot&&u.candlestickOptions.wick.useFillColor?Ve.color[ot]:h.globals.stroke.colors[L],Tt=y.fillPath({seriesNumber:$,dataPointIndex:Le,color:Ve.color[ot],value:a[L][Le]});u.renderSeries({realIndex:$,pathFill:Tt,lineFill:Zt,j:Le,i:L,pathFrom:Ve.pathFrom,pathTo:tt,strokeWidth:Oe,elSeries:Y,x:k,y:N,series:a,barHeight:U,barWidth:te,elDataLabelsWrap:ie,visibleSeries:u.visibleI,type:h.config.chart.type})})},be=0;bek.c&&(j=!1);var z=Math.min(k.o,k.c),$=Math.max(k.o,k.c),Y=k.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[m][S]-y.globals.minX)/this.xRatio-h/2);var U=d+h*this.visibleI;this.series[w][S]===void 0||this.series[w][S]===null?(z=g,$=g):(z=g-z/F,$=g-$/F,N=g-k.h/F,R=g-k.l/F,Y=g-k.m/F);var te=b.move(U,g),ne=b.move(U+h/2,z);return y.globals.previousPaths.length>0&&(ne=this.getPreviousPath(m,S,!0)),te=this.isBoxPlot?[b.move(U,z)+b.line(U+h/2,z)+b.line(U+h/2,N)+b.line(U+h/4,N)+b.line(U+h-h/4,N)+b.line(U+h/2,N)+b.line(U+h/2,z)+b.line(U+h,z)+b.line(U+h,Y)+b.line(U,Y)+b.line(U,z+x/2),b.move(U,Y)+b.line(U+h,Y)+b.line(U+h,$)+b.line(U+h/2,$)+b.line(U+h/2,R)+b.line(U+h-h/4,R)+b.line(U+h/4,R)+b.line(U+h/2,R)+b.line(U+h/2,$)+b.line(U,$)+b.line(U,Y)+"z"]:[b.move(U,$)+b.line(U+h/2,$)+b.line(U+h/2,N)+b.line(U+h/2,$)+b.line(U+h,$)+b.line(U+h,z)+b.line(U+h/2,z)+b.line(U+h/2,R)+b.line(U+h/2,z)+b.line(U,z)+b.line(U,$-x/2)],ne+=b.move(U,z),y.globals.isXNumeric||(d+=u),{pathTo:te,pathFrom:ne,x:d,y:$,barXPosition:U,color:this.isBoxPlot?I:j?[L]:[T]}}},{key:"drawHorizontalBoxPaths",value:function(a){var l=a.indexes;a.x;var d=a.y,u=a.yDivision,h=a.barHeight,g=a.zeroW,x=a.strokeWidth,y=this.w,b=new X(this.ctx),w=l.i,S=l.j,j=this.boxOptions.colors.lower;this.isBoxPlot&&(j=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var L=this.invertedYRatio,T=l.realIndex,I=this.getOHLCValue(T,S),F=g,m=g,k=Math.min(I.o,I.c),N=Math.max(I.o,I.c),R=I.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[T][S]-y.globals.minX)/this.invertedXRatio-h/2);var z=d+h*this.visibleI;this.series[w][S]===void 0||this.series[w][S]===null?(k=g,N=g):(k=g+k/L,N=g+N/L,F=g+I.h/L,m=g+I.l/L,R=g+I.m/L);var $=b.move(g,z),Y=b.move(k,z+h/2);return y.globals.previousPaths.length>0&&(Y=this.getPreviousPath(T,S,!0)),$=[b.move(k,z)+b.line(k,z+h/2)+b.line(F,z+h/2)+b.line(F,z+h/2-h/4)+b.line(F,z+h/2+h/4)+b.line(F,z+h/2)+b.line(k,z+h/2)+b.line(k,z+h)+b.line(R,z+h)+b.line(R,z)+b.line(k+x/2,z),b.move(R,z)+b.line(R,z+h)+b.line(N,z+h)+b.line(N,z+h/2)+b.line(m,z+h/2)+b.line(m,z+h-h/4)+b.line(m,z+h/4)+b.line(m,z+h/2)+b.line(N,z+h/2)+b.line(N,z)+b.line(R,z)+"z"],Y+=b.move(k,z),y.globals.isXNumeric||(d+=u),{pathTo:$,pathFrom:Y,x:N,y:d,barYPosition:z,color:j}}},{key:"getOHLCValue",value:function(a,l){var d=this.w;return{o:this.isBoxPlot?d.globals.seriesCandleH[a][l]:d.globals.seriesCandleO[a][l],h:this.isBoxPlot?d.globals.seriesCandleO[a][l]:d.globals.seriesCandleH[a][l],m:d.globals.seriesCandleM[a][l],l:this.isBoxPlot?d.globals.seriesCandleC[a][l]:d.globals.seriesCandleL[a][l],c:this.isBoxPlot?d.globals.seriesCandleL[a][l]:d.globals.seriesCandleC[a][l]}}}]),n}(),M1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"checkColorRange",value:function(){var i=this.w,n=!1,a=i.config.plotOptions[i.config.chart.type];return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(function(l,d){l.from<=0&&(n=!0)}),n}},{key:"getShadeColor",value:function(i,n,a,l){var d=this.w,u=1,h=d.config.plotOptions[i].shadeIntensity,g=this.determineColor(i,n,a);d.globals.hasNegs||l?u=d.config.plotOptions[i].reverseNegativeShade?g.percent<0?g.percent/100*(1.25*h):(1-g.percent/100)*(1.25*h):g.percent<=0?1-(1+g.percent/100)*h:(1-g.percent/100)*h:(u=1-g.percent/100,i==="treemap"&&(u=(1-g.percent/100)*(1.25*h)));var x=g.color,y=new _;return d.config.plotOptions[i].enableShades&&(x=this.w.config.theme.mode==="dark"?_.hexToRgba(y.shadeColor(-1*u,g.color),d.config.fill.opacity):_.hexToRgba(y.shadeColor(u,g.color),d.config.fill.opacity)),{color:x,colorProps:g}}},{key:"determineColor",value:function(i,n,a){var l=this.w,d=l.globals.series[n][a],u=l.config.plotOptions[i],h=u.colorScale.inverse?a:n;u.distributed&&l.config.chart.type==="treemap"&&(h=a);var g=l.globals.colors[h],x=null,y=Math.min.apply(Math,D(l.globals.series[n])),b=Math.max.apply(Math,D(l.globals.series[n]));u.distributed||i!=="heatmap"||(y=l.globals.minY,b=l.globals.maxY),u.colorScale.min!==void 0&&(y=u.colorScale.minl.globals.maxY?u.colorScale.max:l.globals.maxY);var w=Math.abs(b)+Math.abs(y),S=100*d/(w===0?w-1e-6:w);return u.colorScale.ranges.length>0&&u.colorScale.ranges.map(function(j,L){if(d>=j.from&&d<=j.to){g=j.color,x=j.foreColor?j.foreColor:null,y=j.from,b=j.to;var T=Math.abs(b)+Math.abs(y);S=100*d/(T===0?T-1e-6:T)}}),{color:g,foreColor:x,percent:S}}},{key:"calculateDataLabels",value:function(i){var n=i.text,a=i.x,l=i.y,d=i.i,u=i.j,h=i.colorProps,g=i.fontSize,x=this.w.config.dataLabels,y=new X(this.ctx),b=new Be(this.ctx),w=null;if(x.enabled){w=y.group({class:"apexcharts-data-labels"});var S=x.offsetX,j=x.offsetY,L=a+S,T=l+parseFloat(x.style.fontSize)/3+j;b.plotDataLabelsText({x:L,y:T,text:n,i:d,j:u,color:h.foreColor,parent:w,fontSize:g,dataLabelsConfig:x})}return w}},{key:"addListeners",value:function(i){var n=new X(this.ctx);i.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this,i)),i.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this,i)),i.node.addEventListener("mousedown",n.pathMouseDown.bind(this,i))}}]),O}(),a5=function(){function O(i,n){c(this,O),this.ctx=i,this.w=i.w,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new M1(i),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return v(O,[{key:"draw",value:function(i){var n=this.w,a=new X(this.ctx),l=a.group({class:"apexcharts-heatmap"});l.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")"));var d=n.globals.gridWidth/n.globals.dataPoints,u=n.globals.gridHeight/n.globals.series.length,h=0,g=!1;this.negRange=this.helpers.checkColorRange();var x=i.slice();n.config.yaxis[0].reversed&&(g=!0,x.reverse());for(var y=g?0:x.length-1;g?y=0;g?y++:y--){var b=a.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:_.escapeString(n.globals.seriesNames[y]),rel:y+1,"data:realIndex":y});if(this.ctx.series.addCollapsedClassToSeries(b,y),n.config.chart.dropShadow.enabled){var w=n.config.chart.dropShadow;new ee(this.ctx).dropShadow(b,w,y)}for(var S=0,j=n.config.plotOptions.heatmap.shadeIntensity,L=0;L-1&&this.pieClicked(w),a.config.dataLabels.enabled){var N=m.x,R=m.y,z=100*j/this.fullAngle+"%";if(j!==0&&a.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?n.endAngle=n.endAngle-(l+h):l+h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(y=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(y)>this.fullAngle&&(y-=this.fullAngle);var b=Math.PI*(y-90)/180,w=a.centerX+u*Math.cos(x),S=a.centerY+u*Math.sin(x),j=a.centerX+u*Math.cos(b),L=a.centerY+u*Math.sin(b),T=_.polarToCartesian(a.centerX,a.centerY,a.donutSize,y),I=_.polarToCartesian(a.centerX,a.centerY,a.donutSize,g),F=d>180?1:0,m=["M",w,S,"A",u,u,0,F,1,j,L];return n=a.chartType==="donut"?[].concat(m,["L",T.x,T.y,"A",a.donutSize,a.donutSize,0,F,0,I.x,I.y,"L",w,S,"z"]).join(" "):a.chartType==="pie"||a.chartType==="polarArea"?[].concat(m,["L",a.centerX,a.centerY,"L",w,S]).join(" "):[].concat(m).join(" "),h.roundPathCorners(n,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(i){var n=this.w,a=new da(this.ctx),l=new X(this.ctx),d=new O1(this.ctx),u=l.group(),h=l.group(),g=a.niceScale(0,Math.ceil(this.maxY),0),x=g.result.reverse(),y=g.result.length;this.maxY=g.niceMax;for(var b=n.globals.radialSize,w=b/(y-1),S=0;S1&&i.total.show&&(d=i.total.color);var h=u.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),g=u.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");a=(0,i.value.formatter)(a,u),l||typeof i.total.formatter!="function"||(a=i.total.formatter(u));var x=n===i.total.label;n=i.name.formatter(n,x,u),h!==null&&(h.textContent=n),g!==null&&(g.textContent=a),h!==null&&(h.style.fill=d)}},{key:"printDataLabelsInner",value:function(i,n){var a=this.w,l=i.getAttribute("data:value"),d=a.globals.seriesNames[parseInt(i.parentNode.getAttribute("rel"),10)-1];a.globals.series.length>1&&this.printInnerLabels(n,d,l,i);var u=a.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");u!==null&&(u.style.opacity=1)}},{key:"drawSpokes",value:function(i){var n=this,a=this.w,l=new X(this.ctx),d=a.config.plotOptions.polarArea.spokes;if(d.strokeWidth!==0){for(var u=[],h=360/a.globals.series.length,g=0;g1)h&&!n.total.showAlways?x({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(n,n.total.label,n.total.formatter(d));else if(x({makeSliceOut:!1,printLabel:!0}),!h)if(d.globals.selectedDataPoints.length&&d.globals.series.length>1)if(d.globals.selectedDataPoints[0].length>0){var y=d.globals.selectedDataPoints[0],b=d.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(y));this.printDataLabelsInner(b,n)}else u&&d.globals.selectedDataPoints.length&&d.globals.selectedDataPoints[0].length===0&&(u.style.opacity=0);else u&&d.globals.series.length>1&&(u.style.opacity=0)}}]),O}(),o5=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var n=this.w;this.graphics=new X(this.ctx),this.lineColorArr=n.globals.stroke.colors!==void 0?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight0&&(R=n.getPreviousPath(I));for(var z=0;z=10?i.x>0?(a="start",l+=10):i.x<0&&(a="end",l-=10):a="middle",Math.abs(i.y)>=n-10&&(i.y<0?d-=10:i.y>0&&(d+=10)),{textAnchor:a,newX:l,newY:d}}},{key:"getPreviousPath",value:function(i){for(var n=this.w,a=null,l=0;l0&&parseInt(d.realIndex,10)===parseInt(i,10)&&n.globals.previousPaths[l].paths[0]!==void 0&&(a=n.globals.previousPaths[l].paths[0].d)}return a}},{key:"getDataPointsPos",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;i=i||[],n=n||[];for(var l=[],d=0;d=360&&(L=360-Math.abs(this.startAngle)-.1);var T=d.drawPath({d:"",stroke:S,strokeWidth:x*parseInt(w.strokeWidth,10)/100,fill:"none",strokeOpacity:w.opacity,classes:"apexcharts-radialbar-area"});if(w.dropShadow.enabled){var I=w.dropShadow;h.dropShadow(T,I)}b.add(T),T.attr("id","apexcharts-radialbarTrack-"+y),this.animatePaths(T,{centerX:a.centerX,centerY:a.centerY,endAngle:L,startAngle:j,size:a.size,i:y,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:l.globals.easing})}return u}},{key:"drawArcs",value:function(a){var l=this.w,d=new X(this.ctx),u=new ze(this.ctx),h=new ee(this.ctx),g=d.group(),x=this.getStrokeWidth(a);a.size=a.size-x/2;var y=l.config.plotOptions.radialBar.hollow.background,b=a.size-x*a.series.length-this.margin*a.series.length-x*parseInt(l.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,w=b-l.config.plotOptions.radialBar.hollow.margin;l.config.plotOptions.radialBar.hollow.image!==void 0&&(y=this.drawHollowImage(a,g,b,y));var S=this.drawHollow({size:w,centerX:a.centerX,centerY:a.centerY,fill:y||"transparent"});if(l.config.plotOptions.radialBar.hollow.dropShadow.enabled){var j=l.config.plotOptions.radialBar.hollow.dropShadow;h.dropShadow(S,j)}var L=1;!this.radialDataLabels.total.show&&l.globals.series.length>1&&(L=0);var T=null;this.radialDataLabels.show&&(T=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:b,centerX:a.centerX,centerY:a.centerY,opacity:L})),l.config.plotOptions.radialBar.hollow.position==="back"&&(g.add(S),T&&g.add(T));var I=!1;l.config.plotOptions.radialBar.inverseOrder&&(I=!0);for(var F=I?a.series.length-1:0;I?F>=0:F100?100:a.series[F])/100,$=Math.round(this.totalAngle*z)+this.startAngle,Y=void 0;l.globals.dataChanged&&(R=this.startAngle,Y=Math.round(this.totalAngle*_.negToZero(l.globals.previousPaths[F])/100)+R),Math.abs($)+Math.abs(N)>=360&&($-=.01),Math.abs(Y)+Math.abs(R)>=360&&(Y-=.01);var U=$-N,te=Array.isArray(l.config.stroke.dashArray)?l.config.stroke.dashArray[F]:l.config.stroke.dashArray,ne=d.drawPath({d:"",stroke:k,strokeWidth:x,fill:"none",fillOpacity:l.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+F,strokeDashArray:te});if(X.setAttrs(ne.node,{"data:angle":U,"data:value":a.series[F]}),l.config.chart.dropShadow.enabled){var ie=l.config.chart.dropShadow;h.dropShadow(ne,ie,F)}if(h.setSelectionFilter(ne,0,F),this.addListeners(ne,this.radialDataLabels),m.add(ne),ne.attr({index:0,j:F}),this.barLabels.enabled){var me=_.polarToCartesian(a.centerX,a.centerY,a.size,N),be=this.barLabels.formatter(l.globals.seriesNames[F],{seriesIndex:F,w:l}),Le=["apexcharts-radialbar-label"];this.barLabels.onClick||Le.push("apexcharts-no-click");var Oe=this.barLabels.useSeriesColors?l.globals.colors[F]:l.config.chart.foreColor;Oe||(Oe=l.config.chart.foreColor);var Ve=me.x-this.barLabels.margin,We=me.y,tt=d.drawText({x:Ve,y:We,text:be,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:Oe,cssClass:Le.join(" ")});tt.on("click",this.onBarLabelClick),tt.attr({rel:F+1}),N!==0&&tt.attr({"transform-origin":"".concat(Ve," ").concat(We),transform:"rotate(".concat(N," 0 0)")}),m.add(tt)}var ot=0;!this.initialAnim||l.globals.resized||l.globals.dataChanged||(ot=l.config.chart.animations.speed),l.globals.dataChanged&&(ot=l.config.chart.animations.dynamicAnimation.speed),this.animDur=ot/(1.2*a.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(ne,{centerX:a.centerX,centerY:a.centerY,endAngle:$,startAngle:N,prevEndAngle:Y,prevStartAngle:R,size:a.size,i:F,totalItems:2,animBeginArr:this.animBeginArr,dur:ot,shouldSetPrevPaths:!0,easing:l.globals.easing})}return{g,elHollow:S,dataLabels:T}}},{key:"drawHollow",value:function(a){var l=new X(this.ctx).drawCircle(2*a.size);return l.attr({class:"apexcharts-radialbar-hollow",cx:a.centerX,cy:a.centerY,r:a.size,fill:a.fill}),l}},{key:"drawHollowImage",value:function(a,l,d,u){var h=this.w,g=new ze(this.ctx),x=_.randomId(),y=h.config.plotOptions.radialBar.hollow.image;if(h.config.plotOptions.radialBar.hollow.imageClipped)g.clippedImgArea({width:d,height:d,image:y,patternID:"pattern".concat(h.globals.cuid).concat(x)}),u="url(#pattern".concat(h.globals.cuid).concat(x,")");else{var b=h.config.plotOptions.radialBar.hollow.imageWidth,w=h.config.plotOptions.radialBar.hollow.imageHeight;if(b===void 0&&w===void 0){var S=h.globals.dom.Paper.image(y).loaded(function(L){this.move(a.centerX-L.width/2+h.config.plotOptions.radialBar.hollow.imageOffsetX,a.centerY-L.height/2+h.config.plotOptions.radialBar.hollow.imageOffsetY)});l.add(S)}else{var j=h.globals.dom.Paper.image(y).loaded(function(L){this.move(a.centerX-b/2+h.config.plotOptions.radialBar.hollow.imageOffsetX,a.centerY-w/2+h.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(b,w)});l.add(j)}}return u}},{key:"getStrokeWidth",value:function(a){var l=this.w;return a.size*(100-parseInt(l.config.plotOptions.radialBar.hollow.size,10))/100/(a.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(a){var l=parseInt(a.target.getAttribute("rel"),10)-1,d=this.barLabels.onClick,u=this.w;d&&d(u.globals.seriesNames[l],{w:u,seriesIndex:l})}}]),n}(),c5=function(O){A(n,us);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l){var d=this.w,u=new X(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=a,this.seriesRangeStart=d.globals.seriesRangeStart,this.seriesRangeEnd=d.globals.seriesRangeEnd,this.barHelpers.initVariables(a);for(var h=u.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),g=0;g0&&(this.visibleI=this.visibleI+1);var I=0,F=0;this.yRatio.length>1&&(this.yaxisIndex=L);var m=this.barHelpers.initialPositions();j=m.y,w=m.zeroW,S=m.x,F=m.barWidth,I=m.barHeight,x=m.xDivision,y=m.yDivision,b=m.zeroH;for(var k=u.group({class:"apexcharts-datalabels","data:realIndex":L}),N=u.group({class:"apexcharts-rangebar-goals-markers"}),R=0;R0});return this.isHorizontal?(u=L.config.plotOptions.bar.rangeBarGroupRows?g+w*k:g+y*this.visibleI+w*k,N>-1&&!L.config.plotOptions.bar.rangeBarOverlap&&(T=L.globals.seriesRange[l][N].overlaps).indexOf(I)>-1&&(u=(y=j.barHeight/T.length)*this.visibleI+w*(100-parseInt(this.barOptions.barHeight,10))/100/2+y*(this.visibleI+T.indexOf(I))+w*k)):(k>-1&&(h=L.config.plotOptions.bar.rangeBarGroupRows?x+S*k:x+b*this.visibleI+S*k),N>-1&&!L.config.plotOptions.bar.rangeBarOverlap&&(T=L.globals.seriesRange[l][N].overlaps).indexOf(I)>-1&&(h=(b=j.barWidth/T.length)*this.visibleI+S*(100-parseInt(this.barOptions.barWidth,10))/100/2+b*(this.visibleI+T.indexOf(I))+S*k)),{barYPosition:u,barXPosition:h,barHeight:y,barWidth:b}}},{key:"drawRangeColumnPaths",value:function(a){var l=a.indexes,d=a.x,u=a.xDivision,h=a.barWidth,g=a.barXPosition,x=a.zeroH,y=this.w,b=l.i,w=l.j,S=this.yRatio[this.yaxisIndex],j=l.realIndex,L=this.getRangeValue(j,w),T=Math.min(L.start,L.end),I=Math.max(L.start,L.end);this.series[b][w]===void 0||this.series[b][w]===null?T=x:(T=x-T/S,I=x-I/S);var F=Math.abs(I-T),m=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:h,y1:T,y2:I,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:l.realIndex,i:j,j:w,w:y});if(y.globals.isXNumeric){var k=this.getBarXForNumericXAxis({x:d,j:w,realIndex:j,barWidth:h});d=k.x,g=k.barXPosition}else d+=u;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:F,x:d,y:I,goalY:this.barHelpers.getGoalValues("y",null,x,b,w),barXPosition:g}}},{key:"drawRangeBarPaths",value:function(a){var l=a.indexes,d=a.y,u=a.y1,h=a.y2,g=a.yDivision,x=a.barHeight,y=a.barYPosition,b=a.zeroW,w=this.w,S=b+u/this.invertedYRatio,j=b+h/this.invertedYRatio,L=Math.abs(j-S),T=this.barHelpers.getBarpaths({barYPosition:y,barHeight:x,x1:S,x2:j,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:l.realIndex,realIndex:l.realIndex,j:l.j,w});return w.globals.isXNumeric||(d+=g),{pathTo:T.pathTo,pathFrom:T.pathFrom,barWidth:L,x:j,goalX:this.barHelpers.getGoalValues("x",b,null,l.realIndex,l.j),y:d}}},{key:"getRangeValue",value:function(a,l){var d=this.w;return{start:d.globals.seriesRangeStart[a][l],end:d.globals.seriesRangeEnd[a][l]}}}]),n}(),d5=function(){function O(i){c(this,O),this.w=i.w,this.lineCtx=i}return v(O,[{key:"sameValueSeriesFix",value:function(i,n){var a=this.w;if((a.config.fill.type==="gradient"||a.config.fill.type[i]==="gradient")&&new Q(this.lineCtx.ctx,a).seriesHaveSameValues(i)){var l=n[i].slice();l[l.length-1]=l[l.length-1]+1e-6,n[i]=l}return n}},{key:"calculatePoints",value:function(i){var n=i.series,a=i.realIndex,l=i.x,d=i.y,u=i.i,h=i.j,g=i.prevY,x=this.w,y=[],b=[];if(h===0){var w=this.lineCtx.categoryAxisCorrection+x.config.markers.offsetX;x.globals.isXNumeric&&(w=(x.globals.seriesX[a][0]-x.globals.minX)/this.lineCtx.xRatio+x.config.markers.offsetX),y.push(w),b.push(_.isNumber(n[u][0])?g+x.config.markers.offsetY:null),y.push(l+x.config.markers.offsetX),b.push(_.isNumber(n[u][h+1])?d+x.config.markers.offsetY:null)}else y.push(l+x.config.markers.offsetX),b.push(_.isNumber(n[u][h+1])?d+x.config.markers.offsetY:null);return{x:y,y:b}}},{key:"checkPreviousPaths",value:function(i){for(var n=i.pathFromLine,a=i.pathFromArea,l=i.realIndex,d=this.w,u=0;u0&&parseInt(h.realIndex,10)===parseInt(l,10)&&(h.type==="line"?(this.lineCtx.appendPathFrom=!1,n=d.globals.previousPaths[u].paths[0].d):h.type==="area"&&(this.lineCtx.appendPathFrom=!1,a=d.globals.previousPaths[u].paths[0].d,d.config.stroke.show&&d.globals.previousPaths[u].paths[1]&&(n=d.globals.previousPaths[u].paths[1].d)))}return{pathFromLine:n,pathFromArea:a}}},{key:"determineFirstPrevY",value:function(i){var n,a,l=i.i,d=i.series,u=i.prevY,h=i.lineYPosition,g=this.w,x=g.config.chart.stacked&&!g.globals.comboCharts||g.config.chart.stacked&&g.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[l])===null||n===void 0?void 0:n.type)==="bar");if(((a=d[l])===null||a===void 0?void 0:a[0])!==void 0)u=(h=x&&l>0?this.lineCtx.prevSeriesY[l-1][0]:this.lineCtx.zeroY)-d[l][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?d[l][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(x&&l>0&&d[l][0]===void 0){for(var y=l-1;y>=0;y--)if(d[y][0]!==null&&d[y][0]!==void 0){u=h=this.lineCtx.prevSeriesY[y][0];break}}return{prevY:u,lineYPosition:h}}}]),O}(),u5=function(O){for(var i,n,a,l,d=function(y){for(var b=[],w=y[0],S=y[1],j=b[0]=Ud(w,S),L=1,T=y.length-1;L9&&(l=3*a/Math.sqrt(l),d[g]=l*i,d[g+1]=l*n);for(var x=0;x<=u;x++)l=(O[Math.min(u,x+1)][0]-O[Math.max(0,x-1)][0])/(6*(1+d[x]*d[x])),h.push([l||0,d[x]*l||0]);return h},Yd=function(O){for(var i="",n=0;n4?(i+="C".concat(a[0],", ").concat(a[1]),i+=", ".concat(a[2],", ").concat(a[3]),i+=", ".concat(a[4],", ").concat(a[5])):l>2&&(i+="S".concat(a[0],", ").concat(a[1]),i+=", ".concat(a[2],", ").concat(a[3]))}return i},z1=function(O){var i=u5(O),n=O[1],a=O[0],l=[],d=i[1],u=i[0];l.push(a,[a[0]+u[0],a[1]+u[1],n[0]-d[0],n[1]-d[1],n[0],n[1]]);for(var h=2,g=i.length;h0&&(I=(u.globals.seriesX[S][0]-u.globals.minX)/this.xRatio),T.push(I);var F,m=I,k=void 0,N=m,R=this.zeroY,z=this.zeroY;R=this.lineHelpers.determineFirstPrevY({i:w,series:i,prevY:R,lineYPosition:0}).prevY,u.config.stroke.curve==="monotonCubic"&&i[w][0]===null?j.push(null):j.push(R),F=R,g==="rangeArea"&&(k=z=this.lineHelpers.determineFirstPrevY({i:w,series:l,prevY:z,lineYPosition:0}).prevY,L.push(z));var $={type:g,series:i,realIndex:S,i:w,x:I,y:1,pX:m,pY:F,pathsFrom:this._calculatePathsFrom({type:g,series:i,i:w,realIndex:S,prevX:N,prevY:R,prevY2:z}),linePaths:[],areaPaths:[],seriesIndex:a,lineYPosition:0,xArrj:T,yArrj:j,y2Arrj:L,seriesRangeEnd:l},Y=this._iterateOverDataPoints(s(s({},$),{},{iterations:g==="rangeArea"?i[w].length-1:void 0,isRangeStart:!0}));if(g==="rangeArea"){var U=this._calculatePathsFrom({series:l,i:w,realIndex:S,prevX:N,prevY:z}),te=this._iterateOverDataPoints(s(s({},$),{},{series:l,pY:k,pathsFrom:U,iterations:l[w].length-1,isRangeStart:!1}));Y.linePaths[0]=te.linePath+Y.linePath,Y.pathFromLine=te.pathFromLine+Y.pathFromLine}this._handlePaths({type:g,realIndex:S,i:w,paths:Y}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),b.push(this.elSeries)}if(((d=u.config.series[0])===null||d===void 0?void 0:d.zIndex)!==void 0&&b.sort(function(me,be){return Number(me.node.getAttribute("zIndex"))-Number(be.node.getAttribute("zIndex"))}),u.config.chart.stacked)for(var ne=b.length;ne>0;ne--)x.add(b[ne-1]);else for(var ie=0;ie1&&(this.yaxisIndex=a),this.isReversed=l.config.yaxis[this.yaxisIndex]&&l.config.yaxis[this.yaxisIndex].reversed,this.zeroY=l.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?l.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>l.globals.gridHeight||l.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=l.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=d.group({class:"apexcharts-series",zIndex:l.config.series[a].zIndex!==void 0?l.config.series[a].zIndex:a,seriesName:_.escapeString(l.globals.seriesNames[a])}),this.elPointsMain=d.group({class:"apexcharts-series-markers-wrap","data:realIndex":a}),this.elDataLabelsWrap=d.group({class:"apexcharts-datalabels","data:realIndex":a});var u=i[n].length===l.globals.dataPoints;this.elSeries.attr({"data:longestSeries":u,rel:n+1,"data:realIndex":a}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(i){var n,a,l,d,u=i.type,h=i.series,g=i.i,x=i.realIndex,y=i.prevX,b=i.prevY,w=i.prevY2,S=this.w,j=new X(this.ctx);if(h[g][0]===null){for(var L=0;L0){var T=this.lineHelpers.checkPreviousPaths({pathFromLine:l,pathFromArea:d,realIndex:x});l=T.pathFromLine,d=T.pathFromArea}return{prevX:y,prevY:b,linePath:n,areaPath:a,pathFromLine:l,pathFromArea:d}}},{key:"_handlePaths",value:function(i){var n=i.type,a=i.realIndex,l=i.i,d=i.paths,u=this.w,h=new X(this.ctx),g=new ze(this.ctx);this.prevSeriesY.push(d.yArrj),u.globals.seriesXvalues[a]=d.xArrj,u.globals.seriesYvalues[a]=d.yArrj;var x=u.config.forecastDataPoints;if(x.count>0&&n!=="rangeArea"){var y=u.globals.seriesXvalues[a][u.globals.seriesXvalues[a].length-x.count-1],b=h.drawRect(y,0,u.globals.gridWidth,u.globals.gridHeight,0);u.globals.dom.elForecastMask.appendChild(b.node);var w=h.drawRect(0,0,y,u.globals.gridHeight,0);u.globals.dom.elNonForecastMask.appendChild(w.node)}this.pointsChart||u.globals.delayedElements.push({el:this.elPointsMain.node,index:a});var S={i:l,realIndex:a,animationDelay:l,initialSpeed:u.config.chart.animations.speed,dataChangeSpeed:u.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(n)};if(n==="area")for(var j=g.fillPath({seriesNumber:a}),L=0;L0&&n!=="rangeArea"){var z=h.renderPaths(N);z.node.setAttribute("stroke-dasharray",x.dashArray),x.strokeWidth&&z.node.setAttribute("stroke-width",x.strokeWidth),this.elSeries.add(z),z.attr("clip-path","url(#forecastMask".concat(u.globals.cuid,")")),R.attr("clip-path","url(#nonForecastMask".concat(u.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(i){var n,a=this,l=i.type,d=i.series,u=i.iterations,h=i.realIndex,g=i.i,x=i.x,y=i.y,b=i.pX,w=i.pY,S=i.pathsFrom,j=i.linePaths,L=i.areaPaths,T=i.seriesIndex,I=i.lineYPosition,F=i.xArrj,m=i.yArrj,k=i.y2Arrj,N=i.isRangeStart,R=i.seriesRangeEnd,z=this.w,$=new X(this.ctx),Y=this.yRatio,U=S.prevY,te=S.linePath,ne=S.areaPath,ie=S.pathFromLine,me=S.pathFromArea,be=_.isNumber(z.globals.minYArr[h])?z.globals.minYArr[h]:z.globals.minY;u||(u=z.globals.dataPoints>1?z.globals.dataPoints-1:z.globals.dataPoints);for(var Le=function(Or,gi){return gi-Or/Y[a.yaxisIndex]+2*(a.isReversed?Or/Y[a.yaxisIndex]:0)},Oe=y,Ve=z.config.chart.stacked&&!z.globals.comboCharts||z.config.chart.stacked&&z.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[h])===null||n===void 0?void 0:n.type)==="bar"),We=0;We0&&z.globals.collapsedSeries.length-1){gi--;break}return gi>=0?gi:0}(g-1)][We+1]:I=this.zeroY:I=this.zeroY,tt?y=Le(be,I):(y=Le(d[g][We+1],I),l==="rangeArea"&&(Oe=Le(R[g][We+1],I))),F.push(x),tt&&z.config.stroke.curve==="smooth"?m.push(null):m.push(y),k.push(Oe);var Zt=this.lineHelpers.calculatePoints({series:d,x,y,realIndex:h,i:g,j:We,prevY:U}),Tt=this._createPaths({type:l,series:d,i:g,realIndex:h,j:We,x,y,y2:Oe,xArrj:F,yArrj:m,y2Arrj:k,pX:b,pY:w,linePath:te,areaPath:ne,linePaths:j,areaPaths:L,seriesIndex:T,isRangeStart:N});L=Tt.areaPaths,j=Tt.linePaths,b=Tt.pX,w=Tt.pY,ne=Tt.areaPath,te=Tt.linePath,!this.appendPathFrom||z.config.stroke.curve==="monotoneCubic"&&l==="rangeArea"||(ie+=$.line(x,this.zeroY),me+=$.line(x,this.zeroY)),this.handleNullDataPoints(d,Zt,g,We,h),this._handleMarkersAndLabels({type:l,pointsPos:Zt,i:g,j:We,realIndex:h,isRangeStart:N})}return{yArrj:m,xArrj:F,pathFromArea:me,areaPaths:L,pathFromLine:ie,linePaths:j,linePath:te,areaPath:ne}}},{key:"_handleMarkersAndLabels",value:function(i){var n=i.type,a=i.pointsPos,l=i.isRangeStart,d=i.i,u=i.j,h=i.realIndex,g=this.w,x=new Be(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,u,{realIndex:h,pointsPos:a,zRatio:this.zRatio,elParent:this.elPointsMain});else{g.globals.series[d].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var y=this.markers.plotChartMarkers(a,h,u+1);y!==null&&this.elPointsMain.add(y)}var b=x.drawDataLabel({type:n,isRangeStart:l,pos:a,i:h,j:u+1});b!==null&&this.elDataLabelsWrap.add(b)}},{key:"_createPaths",value:function(i){var n=i.type,a=i.series,l=i.i,d=i.realIndex,u=i.j,h=i.x,g=i.y,x=i.xArrj,y=i.yArrj,b=i.y2,w=i.y2Arrj,S=i.pX,j=i.pY,L=i.linePath,T=i.areaPath,I=i.linePaths,F=i.areaPaths,m=i.seriesIndex,k=i.isRangeStart,N=this.w,R=new X(this.ctx),z=N.config.stroke.curve,$=this.areaBottomY;if(Array.isArray(N.config.stroke.curve)&&(z=Array.isArray(m)?N.config.stroke.curve[m[l]]:N.config.stroke.curve[l]),n==="rangeArea"&&(N.globals.hasNullValues||N.config.forecastDataPoints.count>0)&&z==="monotoneCubic"&&(z="straight"),z==="monotoneCubic"){var Y=n==="rangeArea"?x.length===N.globals.dataPoints:u===a[l].length-2,U=x.map(function(Ve,We){return[x[We],y[We]]}).filter(function(Ve){return Ve[1]!==null});if(Y&&U.length>1){var te=z1(U);if(L+=Yd(te),a[l][0]===null?T=L:T+=Yd(te),n==="rangeArea"&&k){L+=R.line(x[x.length-1],w[w.length-1]);var ne=x.slice().reverse(),ie=w.slice().reverse(),me=ne.map(function(Ve,We){return[ne[We],ie[We]]}),be=z1(me);T=L+=Yd(be)}else T+=R.line(U[U.length-1][0],$)+R.line(U[0][0],$)+R.move(U[0][0],U[0][1])+"z";I.push(L),F.push(T)}}else if(z==="smooth"){var Le=.35*(h-S);N.globals.hasNullValues?(a[l][u]!==null&&(a[l][u+1]!==null?(L=R.move(S,j)+R.curve(S+Le,j,h-Le,g,h+1,g),T=R.move(S+1,j)+R.curve(S+Le,j,h-Le,g,h+1,g)+R.line(h,$)+R.line(S,$)+"z"):(L=R.move(S,j),T=R.move(S,j)+"z")),I.push(L),F.push(T)):(L+=R.curve(S+Le,j,h-Le,g,h,g),T+=R.curve(S+Le,j,h-Le,g,h,g)),S=h,j=g,u===a[l].length-2&&(T=T+R.curve(S,j,h,g,h,$)+R.move(h,g)+"z",n==="rangeArea"&&k?L=L+R.curve(S,j,h,g,h,b)+R.move(h,b)+"z":N.globals.hasNullValues||(I.push(L),F.push(T)))}else{if(a[l][u+1]===null){L+=R.move(h,g);var Oe=N.globals.isXNumeric?(N.globals.seriesX[d][u]-N.globals.minX)/this.xRatio:h-this.xDivision;T=T+R.line(Oe,$)+R.move(h,g)+"z"}a[l][u]===null&&(L+=R.move(h,g),T+=R.move(h,$)),z==="stepline"?(L=L+R.line(h,null,"H")+R.line(null,g,"V"),T=T+R.line(h,null,"H")+R.line(null,g,"V")):z==="straight"&&(L+=R.line(h,g),T+=R.line(h,g)),u===a[l].length-2&&(T=T+R.line(h,$)+R.move(h,g)+"z",n==="rangeArea"&&k?L=L+R.line(h,b)+R.move(h,b)+"z":(I.push(L),F.push(T)))}return{linePaths:I,areaPaths:F,pX:S,pY:j,linePath:L,areaPath:T}}},{key:"handleNullDataPoints",value:function(i,n,a,l,d){var u=this.w;if(i[a][l]===null&&u.config.markers.showNullDataPoints||i[a].length===1){var h=this.markers.plotChartMarkers(n,d,l+1,this.strokeWidth-u.config.markers.strokeWidth/2,!0);h!==null&&this.elPointsMain.add(h)}}}]),O}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function O(h,g,x,y){this.xoffset=h,this.yoffset=g,this.height=y,this.width=x,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(b){var w,S=[],j=this.xoffset,L=this.yoffset,T=d(b)/this.height,I=d(b)/this.width;if(this.width>=this.height)for(w=0;w=this.height){var S=b/this.height,j=this.width-S;w=new O(this.xoffset+S,this.yoffset,j,this.height)}else{var L=b/this.width,T=this.height-L;w=new O(this.xoffset,this.yoffset+L,this.width,T)}return w}}function i(h,g,x,y,b){y=y===void 0?0:y,b=b===void 0?0:b;var w=n(function(S,j){var L,T=[],I=j/d(S);for(L=0;L=m}(g,w=h[0],b)?(g.push(w),n(h.slice(1),g,x,y)):(S=x.cutArea(d(g),y),y.push(x.getCoordinates(g)),n(h,[],S,y)),y;y.push(x.getCoordinates(g))}function a(h,g){var x=Math.min.apply(Math,h),y=Math.max.apply(Math,h),b=d(h);return Math.max(Math.pow(g,2)*y/Math.pow(b,2),Math.pow(b,2)/(Math.pow(g,2)*x))}function l(h){return h&&h.constructor===Array}function d(h){var g,x=0;for(g=0;gu-l&&x.width<=h-d){var y=g.rotateAroundCenter(i.node);i.node.setAttribute("transform","rotate(-90 ".concat(y.x," ").concat(y.y,") translate(").concat(x.height/3,")"))}}},{key:"truncateLabels",value:function(i,n,a,l,d,u){var h=new X(this.ctx),g=h.getTextRects(i,n).width+this.w.config.stroke.width+5>d-a&&u-l>d-a?u-l:d-a,x=h.getTextBasedOnMaxWidth({text:i,maxWidth:g,fontSize:n});return i.length!==x.length&&g/n<5?"":x}},{key:"animateTreemap",value:function(i,n,a,l){var d=new K(this.ctx);d.animateRect(i,{x:n.x,y:n.y,width:n.width,height:n.height},{x:a.x,y:a.y,width:a.width,height:a.height},l,function(){d.animationCompleted(i)})}}]),O}(),f5=86400,p5=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return v(O,[{key:"calculateTimeScaleTicks",value:function(i,n){var a=this,l=this.w;if(l.globals.allSeriesCollapsed)return l.globals.labels=[],l.globals.timescaleLabels=[],[];var d=new Re(this.ctx),u=(n-i)/864e5;this.determineInterval(u),l.globals.disableZoomIn=!1,l.globals.disableZoomOut=!1,u<.00011574074074074075?l.globals.disableZoomIn=!0:u>5e4&&(l.globals.disableZoomOut=!0);var h=d.getTimeUnitsfromTimestamp(i,n,this.utc),g=l.globals.gridWidth/u,x=g/24,y=x/60,b=y/60,w=Math.floor(24*u),S=Math.floor(1440*u),j=Math.floor(u*f5),L=Math.floor(u),T=Math.floor(u/30),I=Math.floor(u/365),F={minMillisecond:h.minMillisecond,minSecond:h.minSecond,minMinute:h.minMinute,minHour:h.minHour,minDate:h.minDate,minMonth:h.minMonth,minYear:h.minYear},m={firstVal:F,currentMillisecond:F.minMillisecond,currentSecond:F.minSecond,currentMinute:F.minMinute,currentHour:F.minHour,currentMonthDate:F.minDate,currentDate:F.minDate,currentMonth:F.minMonth,currentYear:F.minYear,daysWidthOnXAxis:g,hoursWidthOnXAxis:x,minutesWidthOnXAxis:y,secondsWidthOnXAxis:b,numberOfSeconds:j,numberOfMinutes:S,numberOfHours:w,numberOfDays:L,numberOfMonths:T,numberOfYears:I};switch(this.tickInterval){case"years":this.generateYearScale(m);break;case"months":case"half_year":this.generateMonthScale(m);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(m);break;case"hours":this.generateHourScale(m);break;case"minutes_fives":case"minutes":this.generateMinuteScale(m);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(m)}var k=this.timeScaleArray.map(function(N){var R={position:N.position,unit:N.unit,year:N.year,day:N.day?N.day:1,hour:N.hour?N.hour:0,month:N.month+1};return N.unit==="month"?s(s({},R),{},{day:1,value:N.value+1}):N.unit==="day"||N.unit==="hour"?s(s({},R),{},{value:N.value}):N.unit==="minute"?s(s({},R),{},{value:N.value,minute:N.value}):N.unit==="second"?s(s({},R),{},{value:N.value,minute:N.minute,second:N.second}):N});return k.filter(function(N){var R=1,z=Math.ceil(l.globals.gridWidth/120),$=N.value;l.config.xaxis.tickAmount!==void 0&&(z=l.config.xaxis.tickAmount),k.length>z&&(R=Math.floor(k.length/z));var Y=!1,U=!1;switch(a.tickInterval){case"years":N.unit==="year"&&(Y=!0);break;case"half_year":R=7,N.unit==="year"&&(Y=!0);break;case"months":R=1,N.unit==="year"&&(Y=!0);break;case"months_fortnight":R=15,N.unit!=="year"&&N.unit!=="month"||(Y=!0),$===30&&(U=!0);break;case"months_days":R=10,N.unit==="month"&&(Y=!0),$===30&&(U=!0);break;case"week_days":R=8,N.unit==="month"&&(Y=!0);break;case"days":R=1,N.unit==="month"&&(Y=!0);break;case"hours":N.unit==="day"&&(Y=!0);break;case"minutes_fives":case"seconds_fives":$%5!=0&&(U=!0);break;case"seconds_tens":$%10!=0&&(U=!0)}if(a.tickInterval==="hours"||a.tickInterval==="minutes_fives"||a.tickInterval==="seconds_tens"||a.tickInterval==="seconds_fives"){if(!U)return!0}else if(($%R==0||Y)&&!U)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(i,n){var a=this.w,l=this.formatDates(i),d=this.removeOverlappingTS(l);a.globals.timescaleLabels=d.slice(),new Pt(this.ctx).plotCoords()}},{key:"determineInterval",value:function(i){var n=24*i,a=60*n;switch(!0){case i/365>5:this.tickInterval="years";break;case i>800:this.tickInterval="half_year";break;case i>180:this.tickInterval="months";break;case i>90:this.tickInterval="months_fortnight";break;case i>60:this.tickInterval="months_days";break;case i>30:this.tickInterval="week_days";break;case i>2:this.tickInterval="days";break;case n>2.4:this.tickInterval="hours";break;case a>15:this.tickInterval="minutes_fives";break;case a>5:this.tickInterval="minutes";break;case a>1:this.tickInterval="seconds_tens";break;case 60*a>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(i){var n=i.firstVal,a=i.currentMonth,l=i.currentYear,d=i.daysWidthOnXAxis,u=i.numberOfYears,h=n.minYear,g=0,x=new Re(this.ctx),y="year";if(n.minDate>1||n.minMonth>0){var b=x.determineRemainingDaysOfYear(n.minYear,n.minMonth,n.minDate);g=(x.determineDaysOfYear(n.minYear)-b+1)*d,h=n.minYear+1,this.timeScaleArray.push({position:g,value:h,unit:y,year:h,month:_.monthMod(a+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:g,value:h,unit:y,year:l,month:_.monthMod(a+1)});for(var w=h,S=g,j=0;j1){x=(y.determineDaysOfMonths(l+1,n.minYear)-a+1)*u,g=_.monthMod(l+1);var S=d+w,j=_.monthMod(g),L=g;g===0&&(b="year",L=S,j=1,S+=w+=1),this.timeScaleArray.push({position:x,value:L,unit:b,year:S,month:j})}else this.timeScaleArray.push({position:x,value:g,unit:b,year:d,month:_.monthMod(l)});for(var T=g+1,I=x,F=0,m=1;Fh.determineDaysOfMonths(k+1,N)&&(y=1,g="month",S=k+=1),k},w=(24-n.minHour)*d,S=x,j=b(y,a,l);n.minHour===0&&n.minDate===1?(w=0,S=_.monthMod(n.minMonth),g="month",y=n.minDate):n.minDate!==1&&n.minHour===0&&n.minMinute===0&&(w=0,x=n.minDate,S=x,j=b(y=x,a,l)),this.timeScaleArray.push({position:w,value:S,unit:g,year:this._getYear(l,j,0),month:_.monthMod(j),day:y});for(var L=w,T=0;Tg.determineDaysOfMonths(z+1,d)&&(T=1,z+=1),{month:z,date:T}},b=function(R,z){return R>g.determineDaysOfMonths(z+1,d)?z+=1:z},w=60-(n.minMinute+n.minSecond/60),S=w*u,j=n.minHour+1,L=j;w===60&&(S=0,L=j=n.minHour);var T=a;L>=24&&(L=0,T+=1,x="day");var I=y(T,l).month;I=b(T,I),this.timeScaleArray.push({position:S,value:j,unit:x,day:T,hour:L,year:d,month:_.monthMod(I)}),L++;for(var F=S,m=0;m=24&&(L=0,x="day",I=y(T+=1,I).month,I=b(T,I));var k=this._getYear(d,I,0);F=60*u+F;var N=L===0?T:L;this.timeScaleArray.push({position:F,value:N,unit:x,hour:L,day:T,year:k,month:_.monthMod(I)}),L++}}},{key:"generateMinuteScale",value:function(i){for(var n=i.currentMillisecond,a=i.currentSecond,l=i.currentMinute,d=i.currentHour,u=i.currentDate,h=i.currentMonth,g=i.currentYear,x=i.minutesWidthOnXAxis,y=i.secondsWidthOnXAxis,b=i.numberOfMinutes,w=l+1,S=u,j=h,L=g,T=d,I=(60-a-n/1e3)*y,F=0;F=60&&(w=0,(T+=1)===24&&(T=0)),this.timeScaleArray.push({position:I,value:w,unit:"minute",hour:T,minute:w,day:S,year:this._getYear(L,j,0),month:_.monthMod(j)}),I+=x,w++}},{key:"generateSecondScale",value:function(i){for(var n=i.currentMillisecond,a=i.currentSecond,l=i.currentMinute,d=i.currentHour,u=i.currentDate,h=i.currentMonth,g=i.currentYear,x=i.secondsWidthOnXAxis,y=i.numberOfSeconds,b=a+1,w=l,S=u,j=h,L=g,T=d,I=(1e3-n)/1e3*x,F=0;F=60&&(b=0,++w>=60&&(w=0,++T===24&&(T=0))),this.timeScaleArray.push({position:I,value:b,unit:"second",hour:T,minute:w,second:b,day:S,year:this._getYear(L,j,0),month:_.monthMod(j)}),I+=x,b++}},{key:"createRawDateString",value:function(i,n){var a=i.year;return i.month===0&&(i.month=1),a+="-"+("0"+i.month.toString()).slice(-2),i.unit==="day"?a+=i.unit==="day"?"-"+("0"+n).slice(-2):"-01":a+="-"+("0"+(i.day?i.day:"1")).slice(-2),i.unit==="hour"?a+=i.unit==="hour"?"T"+("0"+n).slice(-2):"T00":a+="T"+("0"+(i.hour?i.hour:"0")).slice(-2),i.unit==="minute"?a+=":"+("0"+n).slice(-2):a+=":"+(i.minute?("0"+i.minute).slice(-2):"00"),i.unit==="second"?a+=":"+("0"+n).slice(-2):a+=":00",this.utc&&(a+=".000Z"),a}},{key:"formatDates",value:function(i){var n=this,a=this.w;return i.map(function(l){var d=l.value.toString(),u=new Re(n.ctx),h=n.createRawDateString(l,d),g=u.getDate(u.parseDate(h));if(n.utc||(g=u.getDate(u.parseDateWithTimezone(h))),a.config.xaxis.labels.format===void 0){var x="dd MMM",y=a.config.xaxis.labels.datetimeFormatter;l.unit==="year"&&(x=y.year),l.unit==="month"&&(x=y.month),l.unit==="day"&&(x=y.day),l.unit==="hour"&&(x=y.hour),l.unit==="minute"&&(x=y.minute),l.unit==="second"&&(x=y.second),d=u.formatDate(g,x)}else d=u.formatDate(g,a.config.xaxis.labels.format);return{dateString:h,position:l.position,value:d,unit:l.unit,year:l.year,month:l.month}})}},{key:"removeOverlappingTS",value:function(i){var n,a=this,l=new X(this.ctx),d=!1;i.length>0&&i[0].value&&i.every(function(g){return g.value.length===i[0].value.length})&&(d=!0,n=l.getTextRects(i[0].value).width);var u=0,h=i.map(function(g,x){if(x>0&&a.w.config.xaxis.labels.hideOverlappingLabels){var y=d?n:l.getTextRects(i[u].value).width,b=i[u].position;return g.position>b+y+10?(u=x,g):null}return g});return h=h.filter(function(g){return g!==null})}},{key:"_getYear",value:function(i,n,a){return i+Math.floor(n/12)+a}}]),O}(),g5=function(){function O(i,n){c(this,O),this.ctx=n,this.w=n.w,this.el=i}return v(O,[{key:"setupElements",value:function(){var i=this.w.globals,n=this.w.config,a=n.chart.type;i.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(a)>-1,i.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].indexOf(a)>-1,i.isBarHorizontal=(n.chart.type==="bar"||n.chart.type==="rangeBar"||n.chart.type==="boxPlot")&&n.plotOptions.bar.horizontal,i.chartClass=".apexcharts"+i.chartID,i.dom.baseEl=this.el,i.dom.elWrap=document.createElement("div"),X.setAttrs(i.dom.elWrap,{id:i.chartClass.substring(1),class:"apexcharts-canvas "+i.chartClass.substring(1)}),this.el.appendChild(i.dom.elWrap),i.dom.Paper=new window.SVG.Doc(i.dom.elWrap),i.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(n.chart.offsetX,", ").concat(n.chart.offsetY,")")}),i.dom.Paper.node.style.background=n.theme.mode!=="dark"||n.chart.background?n.chart.background:"rgba(0, 0, 0, 0.8)",this.setSVGDimensions(),i.dom.elLegendForeign=document.createElementNS(i.SVGNS,"foreignObject"),X.setAttrs(i.dom.elLegendForeign,{x:0,y:0,width:i.svgWidth,height:i.svgHeight}),i.dom.elLegendWrap=document.createElement("div"),i.dom.elLegendWrap.classList.add("apexcharts-legend"),i.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),i.dom.elLegendForeign.appendChild(i.dom.elLegendWrap),i.dom.Paper.node.appendChild(i.dom.elLegendForeign),i.dom.elGraphical=i.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),i.dom.elDefs=i.dom.Paper.defs(),i.dom.Paper.add(i.dom.elGraphical),i.dom.elGraphical.add(i.dom.elDefs)}},{key:"plotChartType",value:function(i,n){var a=this.w,l=a.config,d=a.globals,u={series:[],i:[]},h={series:[],i:[]},g={series:[],i:[]},x={series:[],i:[]},y={series:[],i:[]},b={series:[],i:[]},w={series:[],i:[]},S={series:[],i:[]},j={series:[],seriesRangeEnd:[],i:[]};d.series.map(function(z,$){var Y=0;i[$].type!==void 0?(i[$].type==="column"||i[$].type==="bar"?(d.series.length>1&&l.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),y.series.push(z),y.i.push($),Y++,a.globals.columnSeries=y.series):i[$].type==="area"?(h.series.push(z),h.i.push($),Y++):i[$].type==="line"?(u.series.push(z),u.i.push($),Y++):i[$].type==="scatter"?(g.series.push(z),g.i.push($)):i[$].type==="bubble"?(x.series.push(z),x.i.push($),Y++):i[$].type==="candlestick"?(b.series.push(z),b.i.push($),Y++):i[$].type==="boxPlot"?(w.series.push(z),w.i.push($),Y++):i[$].type==="rangeBar"?(S.series.push(z),S.i.push($),Y++):i[$].type==="rangeArea"?(j.series.push(d.seriesRangeStart[$]),j.seriesRangeEnd.push(d.seriesRangeEnd[$]),j.i.push($),Y++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble/candlestick/boxPlot/rangeBar/rangeArea"),Y>1&&(d.comboCharts=!0)):(u.series.push(z),u.i.push($))});var L=new Gd(this.ctx,n),T=new Xd(this.ctx,n);this.ctx.pie=new I1(this.ctx);var I=new l5(this.ctx);this.ctx.rangeBar=new c5(this.ctx,n);var F=new o5(this.ctx),m=[];if(d.comboCharts){if(h.series.length>0&&m.push(L.draw(h.series,"area",h.i)),y.series.length>0)if(a.config.chart.stacked){var k=new _1(this.ctx,n);m.push(k.draw(y.series,y.i))}else this.ctx.bar=new us(this.ctx,n),m.push(this.ctx.bar.draw(y.series,y.i));if(j.series.length>0&&m.push(L.draw(j.series,"rangeArea",j.i,j.seriesRangeEnd)),u.series.length>0&&m.push(L.draw(u.series,"line",u.i)),b.series.length>0&&m.push(T.draw(b.series,"candlestick",b.i)),w.series.length>0&&m.push(T.draw(w.series,"boxPlot",w.i)),S.series.length>0&&m.push(this.ctx.rangeBar.draw(S.series,S.i)),g.series.length>0){var N=new Gd(this.ctx,n,!0);m.push(N.draw(g.series,"scatter",g.i))}if(x.series.length>0){var R=new Gd(this.ctx,n,!0);m.push(R.draw(x.series,"bubble",x.i))}}else switch(l.chart.type){case"line":m=L.draw(d.series,"line");break;case"area":m=L.draw(d.series,"area");break;case"bar":l.chart.stacked?m=new _1(this.ctx,n).draw(d.series):(this.ctx.bar=new us(this.ctx,n),m=this.ctx.bar.draw(d.series));break;case"candlestick":m=new Xd(this.ctx,n).draw(d.series,"candlestick");break;case"boxPlot":m=new Xd(this.ctx,n).draw(d.series,l.chart.type);break;case"rangeBar":m=this.ctx.rangeBar.draw(d.series);break;case"rangeArea":m=L.draw(d.seriesRangeStart,"rangeArea",void 0,d.seriesRangeEnd);break;case"heatmap":m=new a5(this.ctx,n).draw(d.series);break;case"treemap":m=new h5(this.ctx,n).draw(d.series);break;case"pie":case"donut":case"polarArea":m=this.ctx.pie.draw(d.series);break;case"radialBar":m=I.draw(d.series);break;case"radar":m=F.draw(d.series);break;default:m=L.draw(d.series)}return m}},{key:"setSVGDimensions",value:function(){var i=this.w.globals,n=this.w.config;i.svgWidth=n.chart.width,i.svgHeight=n.chart.height;var a=_.getDimensions(this.el),l=n.chart.width.toString().split(/[0-9]+/g).pop();l==="%"?_.isNumber(a[0])&&(a[0].width===0&&(a=_.getDimensions(this.el.parentNode)),i.svgWidth=a[0]*parseInt(n.chart.width,10)/100):l!=="px"&&l!==""||(i.svgWidth=parseInt(n.chart.width,10));var d=n.chart.height.toString().split(/[0-9]+/g).pop();if(i.svgHeight!=="auto"&&i.svgHeight!=="")if(d==="%"){var u=_.getDimensions(this.el.parentNode);i.svgHeight=u[1]*parseInt(n.chart.height,10)/100}else i.svgHeight=parseInt(n.chart.height,10);else i.axisCharts?i.svgHeight=i.svgWidth/1.61:i.svgHeight=i.svgWidth/1.2;if(i.svgWidth<0&&(i.svgWidth=0),i.svgHeight<0&&(i.svgHeight=0),X.setAttrs(i.dom.Paper.node,{width:i.svgWidth,height:i.svgHeight}),d!=="%"){var h=n.chart.sparkline.enabled?0:i.axisCharts?n.chart.parentHeightOffset:0;i.dom.Paper.node.parentNode.parentNode.style.minHeight=i.svgHeight+h+"px"}i.dom.elWrap.style.width=i.svgWidth+"px",i.dom.elWrap.style.height=i.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var i=this.w.globals,n=i.translateY,a={transform:"translate("+i.translateX+", "+n+")"};X.setAttrs(i.dom.elGraphical.node,a)}},{key:"resizeNonAxisCharts",value:function(){var i=this.w,n=i.globals,a=0,l=i.config.chart.sparkline.enabled?1:15;l+=i.config.grid.padding.bottom,i.config.legend.position!=="top"&&i.config.legend.position!=="bottom"||!i.config.legend.show||i.config.legend.floating||(a=new Zo(this.ctx).legendHelpers.getLegendBBox().clwh+10);var d=i.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),u=2.05*i.globals.radialSize;if(d&&!i.config.chart.sparkline.enabled&&i.config.plotOptions.radialBar.startAngle!==0){var h=_.getBoundingClientRect(d);u=h.bottom;var g=h.bottom-h.top;u=Math.max(2.05*i.globals.radialSize,g)}var x=u+n.translateY+a+l;n.dom.elLegendForeign&&n.dom.elLegendForeign.setAttribute("height",x),i.config.chart.height&&String(i.config.chart.height).indexOf("%")>0||(n.dom.elWrap.style.height=x+"px",X.setAttrs(n.dom.Paper.node,{height:x}),n.dom.Paper.node.parentNode.parentNode.style.minHeight=x+"px")}},{key:"coreCalculations",value:function(){new cs(this.ctx).init()}},{key:"resetGlobals",value:function(){var i=this,n=function(){return i.w.config.series.map(function(d){return[]})},a=new Ae,l=this.w.globals;a.initGlobalVars(l),l.seriesXvalues=n(),l.seriesYvalues=n()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var i=null,n=this.w;if(n.globals.axisCharts){if(n.config.xaxis.crosshairs.position==="back"&&new re(this.ctx).drawXCrosshairs(),n.config.yaxis[0].crosshairs.position==="back"&&new re(this.ctx).drawYCrosshairs(),n.config.xaxis.type==="datetime"&&n.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new p5(this.ctx);var a=[];isFinite(n.globals.minX)&&isFinite(n.globals.maxX)&&!n.globals.isBarHorizontal?a=this.ctx.timeScale.calculateTimeScaleTicks(n.globals.minX,n.globals.maxX):n.globals.isBarHorizontal&&(a=this.ctx.timeScale.calculateTimeScaleTicks(n.globals.minY,n.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(a)}i=new Q(this.ctx).getCalculatedRatios()}return i}},{key:"updateSourceChart",value:function(i){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:i.w.globals.minX,max:i.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var i=this,n=this.w;if(n.config.chart.brush.enabled&&typeof n.config.chart.events.selection!="function"){var a=Array.isArray(n.config.chart.brush.targets)?n.config.chart.brush.targets:[n.config.chart.brush.target];a.forEach(function(l){var d=ApexCharts.getChartByID(l);d.w.globals.brushSource=i.ctx,typeof d.w.config.chart.events.zoomed!="function"&&(d.w.config.chart.events.zoomed=function(){i.updateSourceChart(d)}),typeof d.w.config.chart.events.scrolled!="function"&&(d.w.config.chart.events.scrolled=function(){i.updateSourceChart(d)})}),n.config.chart.events.selection=function(l,d){a.forEach(function(u){ApexCharts.getChartByID(u).ctx.updateHelpers._updateOptions({xaxis:{min:d.xaxis.min,max:d.xaxis.max}},!1,!1,!1,!1)})}}}}]),O}(),m5=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"_updateOptions",value:function(i){var n=this,a=arguments.length>1&&arguments[1]!==void 0&&arguments[1],l=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],d=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],u=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(h){var g=[n.ctx];d&&(g=n.ctx.getSyncedCharts()),n.ctx.w.globals.isExecCalled&&(g=[n.ctx],n.ctx.w.globals.isExecCalled=!1),g.forEach(function(x,y){var b=x.w;if(b.globals.shouldAnimate=l,a||(b.globals.resized=!0,b.globals.dataChanged=!0,l&&x.series.getPreviousPaths()),i&&o(i)==="object"&&(x.config=new le(i),i=Q.extendArrayProps(x.config,i,b),x.w.globals.chartID!==n.ctx.w.globals.chartID&&delete i.series,b.config=_.extend(b.config,i),u&&(b.globals.lastXAxis=i.xaxis?_.clone(i.xaxis):[],b.globals.lastYAxis=i.yaxis?_.clone(i.yaxis):[],b.globals.initialConfig=_.extend({},b.config),b.globals.initialSeries=_.clone(b.config.series),i.series))){for(var w=0;w2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(d){var u,h=a.w;return h.globals.shouldAnimate=n,h.globals.dataChanged=!0,n&&a.ctx.series.getPreviousPaths(),h.globals.axisCharts?((u=i.map(function(g,x){return a._extendSeries(g,x)})).length===0&&(u=[{data:[]}]),h.config.series=u):h.config.series=i.slice(),l&&(h.globals.initialConfig.series=_.clone(h.config.series),h.globals.initialSeries=_.clone(h.config.series)),a.ctx.update().then(function(){d(a.ctx)})})}},{key:"_extendSeries",value:function(i,n){var a=this.w,l=a.config.series[n];return s(s({},a.config.series[n]),{},{name:i.name?i.name:l==null?void 0:l.name,color:i.color?i.color:l==null?void 0:l.color,type:i.type?i.type:l==null?void 0:l.type,group:i.group?i.group:l==null?void 0:l.group,data:i.data?i.data:l==null?void 0:l.data,zIndex:i.zIndex!==void 0?i.zIndex:n})}},{key:"toggleDataPointSelection",value:function(i,n){var a=this.w,l=null,d=".apexcharts-series[data\\:realIndex='".concat(i,"']");return a.globals.axisCharts?l=a.globals.dom.Paper.select("".concat(d," path[j='").concat(n,"'], ").concat(d," circle[j='").concat(n,"'], ").concat(d," rect[j='").concat(n,"']")).members[0]:n===void 0&&(l=a.globals.dom.Paper.select("".concat(d," path[j='").concat(i,"']")).members[0],a.config.chart.type!=="pie"&&a.config.chart.type!=="polarArea"&&a.config.chart.type!=="donut"||this.ctx.pie.pieClicked(i)),l?(new X(this.ctx).pathMouseDown(l,null),l.node?l.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(i){var n=this.w;if(["min","max"].forEach(function(l){i.xaxis[l]!==void 0&&(n.config.xaxis[l]=i.xaxis[l],n.globals.lastXAxis[l]=i.xaxis[l])}),i.xaxis.categories&&i.xaxis.categories.length&&(n.config.xaxis.categories=i.xaxis.categories),n.config.xaxis.convertedCatToNumeric){var a=new ce(i);i=a.convertCatToNumericXaxis(i,this.ctx)}return i}},{key:"forceYAxisUpdate",value:function(i){return i.chart&&i.chart.stacked&&i.chart.stackType==="100%"&&(Array.isArray(i.yaxis)?i.yaxis.forEach(function(n,a){i.yaxis[a].min=0,i.yaxis[a].max=100}):(i.yaxis.min=0,i.yaxis.max=100)),i}},{key:"revertDefaultAxisMinMax",value:function(i){var n=this,a=this.w,l=a.globals.lastXAxis,d=a.globals.lastYAxis;i&&i.xaxis&&(l=i.xaxis),i&&i.yaxis&&(d=i.yaxis),a.config.xaxis.min=l.min,a.config.xaxis.max=l.max;var u=function(h){d[h]!==void 0&&(a.config.yaxis[h].min=d[h].min,a.config.yaxis[h].max=d[h].max)};a.config.yaxis.map(function(h,g){a.globals.zoomed||d[g]!==void 0?u(g):n.ctx.opts.yaxis[g]!==void 0&&(h.min=n.ctx.opts.yaxis[g].min,h.max=n.ctx.opts.yaxis[g].max)})}}]),O}();Rn=typeof window<"u"?window:void 0,el=function(O,i){var n=(this!==void 0?this:O).SVG=function(m){if(n.supported)return m=new n.Doc(m),n.parser.draw||n.prepare(),m};if(n.ns="http://www.w3.org/2000/svg",n.xmlns="http://www.w3.org/2000/xmlns/",n.xlink="http://www.w3.org/1999/xlink",n.svgjs="http://svgjs.dev",n.supported=!0,!n.supported)return!1;n.did=1e3,n.eid=function(m){return"Svgjs"+y(m)+n.did++},n.create=function(m){var k=i.createElementNS(this.ns,m);return k.setAttribute("id",this.eid(m)),k},n.extend=function(){var m,k;k=(m=[].slice.call(arguments)).pop();for(var N=m.length-1;N>=0;N--)if(m[N])for(var R in k)m[N].prototype[R]=k[R];n.Set&&n.Set.inherit&&n.Set.inherit()},n.invent=function(m){var k=typeof m.create=="function"?m.create:function(){this.constructor.call(this,n.create(m.create))};return m.inherit&&(k.prototype=new m.inherit),m.extend&&n.extend(k,m.extend),m.construct&&n.extend(m.parent||n.Container,m.construct),k},n.adopt=function(m){return m?m.instance?m.instance:((k=m.nodeName=="svg"?m.parentNode instanceof O.SVGElement?new n.Nested:new n.Doc:m.nodeName=="linearGradient"?new n.Gradient("linear"):m.nodeName=="radialGradient"?new n.Gradient("radial"):n[y(m.nodeName)]?new n[y(m.nodeName)]:new n.Element(m)).type=m.nodeName,k.node=m,m.instance=k,k instanceof n.Doc&&k.namespace().defs(),k.setData(JSON.parse(m.getAttribute("svgjs:data"))||{}),k):null;var k},n.prepare=function(){var m=i.getElementsByTagName("body")[0],k=(m?new n.Doc(m):n.adopt(i.documentElement).nested()).size(2,0);n.parser={body:m||i.documentElement,draw:k.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:k.polyline().node,path:k.path().node,native:n.create("svg")}},n.parser={native:n.create("svg")},i.addEventListener("DOMContentLoaded",function(){n.parser.draw||n.prepare()},!1),n.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},n.utils={map:function(m,k){for(var N=m.length,R=[],z=0;z1?1:m,new n.Color({r:~~(this.r+(this.destination.r-this.r)*m),g:~~(this.g+(this.destination.g-this.g)*m),b:~~(this.b+(this.destination.b-this.b)*m)})):this}}),n.Color.test=function(m){return m+="",n.regex.isHex.test(m)||n.regex.isRgb.test(m)},n.Color.isRgb=function(m){return m&&typeof m.r=="number"&&typeof m.g=="number"&&typeof m.b=="number"},n.Color.isColor=function(m){return n.Color.isRgb(m)||n.Color.test(m)},n.Array=function(m,k){(m=(m||[]).valueOf()).length==0&&k&&(m=k.valueOf()),this.value=this.parse(m)},n.extend(n.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(m){return m=m.valueOf(),Array.isArray(m)?m:this.split(m)}}),n.PointArray=function(m,k){n.Array.call(this,m,k||[[0,0]])},n.PointArray.prototype=new n.Array,n.PointArray.prototype.constructor=n.PointArray;for(var a={M:function(m,k,N){return k.x=N.x=m[0],k.y=N.y=m[1],["M",k.x,k.y]},L:function(m,k){return k.x=m[0],k.y=m[1],["L",m[0],m[1]]},H:function(m,k){return k.x=m[0],["H",m[0]]},V:function(m,k){return k.y=m[0],["V",m[0]]},C:function(m,k){return k.x=m[4],k.y=m[5],["C",m[0],m[1],m[2],m[3],m[4],m[5]]},Q:function(m,k){return k.x=m[2],k.y=m[3],["Q",m[0],m[1],m[2],m[3]]},S:function(m,k){return k.x=m[2],k.y=m[3],["S",m[0],m[1],m[2],m[3]]},Z:function(m,k,N){return k.x=N.x,k.y=N.y,["Z"]}},l="mlhvqtcsaz".split(""),d=0,u=l.length;dY);return R},bbox:function(){return n.parser.draw||n.prepare(),n.parser.path.setAttribute("d",this.toString()),n.parser.path.getBBox()}}),n.Number=n.invent({create:function(m,k){this.value=0,this.unit=k||"",typeof m=="number"?this.value=isNaN(m)?0:isFinite(m)?m:m<0?-34e37:34e37:typeof m=="string"?(k=m.match(n.regex.numberAndUnit))&&(this.value=parseFloat(k[1]),k[5]=="%"?this.value/=100:k[5]=="s"&&(this.value*=1e3),this.unit=k[5]):m instanceof n.Number&&(this.value=m.valueOf(),this.unit=m.unit)},extend:{toString:function(){return(this.unit=="%"?~~(1e8*this.value)/1e6:this.unit=="s"?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(m){return m=new n.Number(m),new n.Number(this+m,this.unit||m.unit)},minus:function(m){return m=new n.Number(m),new n.Number(this-m,this.unit||m.unit)},times:function(m){return m=new n.Number(m),new n.Number(this*m,this.unit||m.unit)},divide:function(m){return m=new n.Number(m),new n.Number(this/m,this.unit||m.unit)},to:function(m){var k=new n.Number(this);return typeof m=="string"&&(k.unit=m),k},morph:function(m){return this.destination=new n.Number(m),m.relative&&(this.destination.value+=this.value),this},at:function(m){return this.destination?new n.Number(this.destination).minus(this).times(m).plus(this):this}}}),n.Element=n.invent({create:function(m){this._stroke=n.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=m)&&(this.type=m.nodeName,this.node.instance=this,this._stroke=m.getAttribute("stroke")||this._stroke)},extend:{x:function(m){return this.attr("x",m)},y:function(m){return this.attr("y",m)},cx:function(m){return m==null?this.x()+this.width()/2:this.x(m-this.width()/2)},cy:function(m){return m==null?this.y()+this.height()/2:this.y(m-this.height()/2)},move:function(m,k){return this.x(m).y(k)},center:function(m,k){return this.cx(m).cy(k)},width:function(m){return this.attr("width",m)},height:function(m){return this.attr("height",m)},size:function(m,k){var N=w(this,m,k);return this.width(new n.Number(N.width)).height(new n.Number(N.height))},clone:function(m){this.writeDataToDom();var k=L(this.node.cloneNode(!0));return m?m.add(k):this.after(k),k},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(m){return this.after(m).remove(),m},addTo:function(m){return m.put(this)},putIn:function(m){return m.add(this)},id:function(m){return this.attr("id",m)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return this.style("display")!="none"},toString:function(){return this.attr("id")},classes:function(){var m=this.attr("class");return m==null?[]:m.trim().split(n.regex.delimiter)},hasClass:function(m){return this.classes().indexOf(m)!=-1},addClass:function(m){if(!this.hasClass(m)){var k=this.classes();k.push(m),this.attr("class",k.join(" "))}return this},removeClass:function(m){return this.hasClass(m)&&this.attr("class",this.classes().filter(function(k){return k!=m}).join(" ")),this},toggleClass:function(m){return this.hasClass(m)?this.removeClass(m):this.addClass(m)},reference:function(m){return n.get(this.attr(m))},parent:function(m){var k=this;if(!k.node.parentNode)return null;if(k=n.adopt(k.node.parentNode),!m)return k;for(;k&&k.node instanceof O.SVGElement;){if(typeof m=="string"?k.matches(m):k instanceof m)return k;if(!k.node.parentNode||k.node.parentNode.nodeName=="#document")return null;k=n.adopt(k.node.parentNode)}},doc:function(){return this instanceof n.Doc?this:this.parent(n.Doc)},parents:function(m){var k=[],N=this;do{if(!(N=N.parent(m))||!N.node)break;k.push(N)}while(N.parent);return k},matches:function(m){return function(k,N){return(k.matches||k.matchesSelector||k.msMatchesSelector||k.mozMatchesSelector||k.webkitMatchesSelector||k.oMatchesSelector).call(k,N)}(this.node,m)},native:function(){return this.node},svg:function(m){var k=i.createElement("svg");if(!(m&&this instanceof n.Parent))return k.appendChild(m=i.createElement("svg")),this.writeDataToDom(),m.appendChild(this.node.cloneNode(!0)),k.innerHTML.replace(/^/,"").replace(/<\/svg>$/,"");k.innerHTML=""+m.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var N=0,R=k.firstChild.childNodes.length;N":function(m){return-Math.cos(m*Math.PI)/2+.5},">":function(m){return Math.sin(m*Math.PI/2)},"<":function(m){return 1-Math.cos(m*Math.PI/2)}},n.morph=function(m){return function(k,N){return new n.MorphObj(k,N).at(m)}},n.Situation=n.invent({create:function(m){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new n.Number(m.duration).valueOf(),this.delay=new n.Number(m.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=m.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),n.FX=n.invent({create:function(m){this._target=m,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(m,k,N){o(m)==="object"&&(k=m.ease,N=m.delay,m=m.duration);var R=new n.Situation({duration:m||1e3,delay:N||0,ease:n.easing[k||"-"]||k});return this.queue(R),this},target:function(m){return m&&m instanceof n.Element?(this._target=m,this):this._target},timeToAbsPos:function(m){return(m-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(m){return this.situation.duration/this._speed*m+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=O.requestAnimationFrame((function(){this.step()}).bind(this))},stopAnimFrame:function(){O.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(m){return(typeof m=="function"||m instanceof n.Situation)&&this.situations.push(m),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof n.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var m,k=this.situation;if(k.init)return this;for(var N in k.animations){m=this.target()[N](),Array.isArray(m)||(m=[m]),Array.isArray(k.animations[N])||(k.animations[N]=[k.animations[N]]);for(var R=m.length;R--;)k.animations[N][R]instanceof n.Number&&(m[R]=new n.Number(m[R])),k.animations[N][R]=m[R].morph(k.animations[N][R])}for(var N in k.attrs)k.attrs[N]=new n.MorphObj(this.target().attr(N),k.attrs[N]);for(var N in k.styles)k.styles[N]=new n.MorphObj(this.target().style(N),k.styles[N]);return k.initialTransformation=this.target().matrixify(),k.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(m,k){var N=this.active;return this.active=!1,k&&this.clearQueue(),m&&this.situation&&(!N&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(m){var k=this.last();return this.target().on("finished.fx",function N(R){R.detail.situation==k&&(m.call(this,k),this.off("finished.fx",N))}),this._callStart()},during:function(m){var k=this.last(),N=function(R){R.detail.situation==k&&m.call(this,R.detail.pos,n.morph(R.detail.pos),R.detail.eased,k)};return this.target().off("during.fx",N).on("during.fx",N),this.after(function(){this.off("during.fx",N)}),this._callStart()},afterAll:function(m){var k=function N(R){m.call(this),this.off("allfinished.fx",N)};return this.target().off("allfinished.fx",k).on("allfinished.fx",k),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(m,k,N){return this.last()[N||"animations"][m]=k,this._callStart()},step:function(m){var k,N,R;m||(this.absPos=this.timeToAbsPos(+new Date)),this.situation.loops!==!1?(k=Math.max(this.absPos,0),N=Math.floor(k),this.situation.loops===!0||Nthis.lastPos&&$<=z&&(this.situation.once[$].call(this.target(),this.pos,z),delete this.situation.once[$]);return this.active&&this.target().fire("during",{pos:this.pos,eased:z,fx:this,situation:this.situation}),this.situation?(this.eachAt(),this.pos==1&&!this.situation.reversed||this.situation.reversed&&this.pos==0?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=z,this):this},eachAt:function(){var m,k=this,N=this.target(),R=this.situation;for(var z in R.animations)m=[].concat(R.animations[z]).map(function(U){return typeof U!="string"&&U.at?U.at(R.ease(k.pos),k.pos):U}),N[z].apply(N,m);for(var z in R.attrs)m=[z].concat(R.attrs[z]).map(function(te){return typeof te!="string"&&te.at?te.at(R.ease(k.pos),k.pos):te}),N.attr.apply(N,m);for(var z in R.styles)m=[z].concat(R.styles[z]).map(function(te){return typeof te!="string"&&te.at?te.at(R.ease(k.pos),k.pos):te}),N.style.apply(N,m);if(R.transforms.length){m=R.initialTransformation,z=0;for(var $=R.transforms.length;z<$;z++){var Y=R.transforms[z];Y instanceof n.Matrix?m=Y.relative?m.multiply(new n.Matrix().morph(Y).at(R.ease(this.pos))):m.morph(Y).at(R.ease(this.pos)):(Y.relative||Y.undo(m.extract()),m=m.multiply(Y.at(R.ease(this.pos))))}N.matrix(m)}return this},once:function(m,k,N){var R=this.last();return N||(m=R.ease(m)),R.once[m]=k,this},_callStart:function(){return setTimeout((function(){this.start()}).bind(this),0),this}},parent:n.Element,construct:{animate:function(m,k,N){return(this.fx||(this.fx=new n.FX(this))).animate(m,k,N)},delay:function(m){return(this.fx||(this.fx=new n.FX(this))).delay(m)},stop:function(m,k){return this.fx&&this.fx.stop(m,k),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),n.MorphObj=n.invent({create:function(m,k){return n.Color.isColor(k)?new n.Color(m).morph(k):n.regex.delimiter.test(m)?n.regex.pathLetters.test(m)?new n.PathArray(m).morph(k):new n.Array(m).morph(k):n.regex.numberAndUnit.test(k)?new n.Number(m).morph(k):(this.value=m,void(this.destination=k))},extend:{at:function(m,k){return k<1?this.value:this.destination},valueOf:function(){return this.value}}}),n.extend(n.FX,{attr:function(m,k,N){if(o(m)==="object")for(var R in m)this.attr(R,m[R]);else this.add(m,k,"attrs");return this},plot:function(m,k,N,R){return arguments.length==4?this.plot([m,k,N,R]):this.add("plot",new(this.target()).morphArray(m))}}),n.Box=n.invent({create:function(m,k,N,R){if(!(o(m)!=="object"||m instanceof n.Element))return n.Box.call(this,m.left!=null?m.left:m.x,m.top!=null?m.top:m.y,m.width,m.height);var z;arguments.length==4&&(this.x=m,this.y=k,this.width=N,this.height=R),(z=this).x==null&&(z.x=0,z.y=0,z.width=0,z.height=0),z.w=z.width,z.h=z.height,z.x2=z.x+z.width,z.y2=z.y+z.height,z.cx=z.x+z.width/2,z.cy=z.y+z.height/2}}),n.BBox=n.invent({create:function(m){if(n.Box.apply(this,[].slice.call(arguments)),m instanceof n.Element){var k;try{if(!i.documentElement.contains){for(var N=m.node;N.parentNode;)N=N.parentNode;if(N!=i)throw new Error("Element not in the dom")}k=m.node.getBBox()}catch{if(m instanceof n.Shape){n.parser.draw||n.prepare();var R=m.clone(n.parser.draw.instance).show();R&&R.node&&typeof R.node.getBBox=="function"&&(k=R.node.getBBox()),R&&typeof R.remove=="function"&&R.remove()}else k={x:m.node.clientLeft,y:m.node.clientTop,width:m.node.clientWidth,height:m.node.clientHeight}}n.Box.call(this,k)}},inherit:n.Box,parent:n.Element,construct:{bbox:function(){return new n.BBox(this)}}}),n.BBox.prototype.constructor=n.BBox,n.Matrix=n.invent({create:function(m){var k=j([1,0,0,1,0,0]);m=m===null?k:m instanceof n.Element?m.matrixify():typeof m=="string"?j(m.split(n.regex.delimiter).map(parseFloat)):arguments.length==6?j([].slice.call(arguments)):Array.isArray(m)?j(m):m&&o(m)==="object"?m:k;for(var N=I.length-1;N>=0;--N)this[I[N]]=m[I[N]]!=null?m[I[N]]:k[I[N]]},extend:{extract:function(){var m=S(this,0,1);S(this,1,0);var k=180/Math.PI*Math.atan2(m.y,m.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(k*Math.PI/180)+this.f*Math.sin(k*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(k*Math.PI/180)+this.e*Math.sin(-k*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:k,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new n.Matrix(this)}},clone:function(){return new n.Matrix(this)},morph:function(m){return this.destination=new n.Matrix(m),this},multiply:function(m){return new n.Matrix(this.native().multiply(function(k){return k instanceof n.Matrix||(k=new n.Matrix(k)),k}(m).native()))},inverse:function(){return new n.Matrix(this.native().inverse())},translate:function(m,k){return new n.Matrix(this.native().translate(m||0,k||0))},native:function(){for(var m=n.parser.native.createSVGMatrix(),k=I.length-1;k>=0;k--)m[I[k]]=this[I[k]];return m},toString:function(){return"matrix("+T(this.a)+","+T(this.b)+","+T(this.c)+","+T(this.d)+","+T(this.e)+","+T(this.f)+")"}},parent:n.Element,construct:{ctm:function(){return new n.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof n.Nested){var m=this.rect(1,1),k=m.node.getScreenCTM();return m.remove(),new n.Matrix(k)}return new n.Matrix(this.node.getScreenCTM())}}}),n.Point=n.invent({create:function(m,k){var N;N=Array.isArray(m)?{x:m[0],y:m[1]}:o(m)==="object"?{x:m.x,y:m.y}:m!=null?{x:m,y:k??m}:{x:0,y:0},this.x=N.x,this.y=N.y},extend:{clone:function(){return new n.Point(this)},morph:function(m,k){return this.destination=new n.Point(m,k),this}}}),n.extend(n.Element,{point:function(m,k){return new n.Point(m,k).transform(this.screenCTM().inverse())}}),n.extend(n.Element,{attr:function(m,k,N){if(m==null){for(m={},N=(k=this.node.attributes).length-1;N>=0;N--)m[k[N].nodeName]=n.regex.isNumber.test(k[N].nodeValue)?parseFloat(k[N].nodeValue):k[N].nodeValue;return m}if(o(m)==="object")for(var R in m)this.attr(R,m[R]);else if(k===null)this.node.removeAttribute(m);else{if(k==null)return(k=this.node.getAttribute(m))==null?n.defaults.attrs[m]:n.regex.isNumber.test(k)?parseFloat(k):k;m=="stroke-width"?this.attr("stroke",parseFloat(k)>0?this._stroke:null):m=="stroke"&&(this._stroke=k),m!="fill"&&m!="stroke"||(n.regex.isImage.test(k)&&(k=this.doc().defs().image(k,0,0)),k instanceof n.Image&&(k=this.doc().defs().pattern(0,0,function(){this.add(k)}))),typeof k=="number"?k=new n.Number(k):n.Color.isColor(k)?k=new n.Color(k):Array.isArray(k)&&(k=new n.Array(k)),m=="leading"?this.leading&&this.leading(k):typeof N=="string"?this.node.setAttributeNS(N,m,k.toString()):this.node.setAttribute(m,k.toString()),!this.rebuild||m!="font-size"&&m!="x"||this.rebuild(m,k)}return this}}),n.extend(n.Element,{transform:function(m,k){var N;return o(m)!=="object"?(N=new n.Matrix(this).extract(),typeof m=="string"?N[m]:N):(N=new n.Matrix(this),k=!!k||!!m.relative,m.a!=null&&(N=k?N.multiply(new n.Matrix(m)):new n.Matrix(m)),this.attr("transform",N))}}),n.extend(n.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(n.regex.transforms).slice(0,-1).map(function(m){var k=m.trim().split("(");return[k[0],k[1].split(n.regex.delimiter).map(function(N){return parseFloat(N)})]}).reduce(function(m,k){return k[0]=="matrix"?m.multiply(j(k[1])):m[k[0]].apply(m,k[1])},new n.Matrix)},toParent:function(m){if(this==m)return this;var k=this.screenCTM(),N=m.screenCTM().inverse();return this.addTo(m).untransform().transform(N.multiply(k)),this},toDoc:function(){return this.toParent(this.doc())}}),n.Transformation=n.invent({create:function(m,k){if(arguments.length>1&&typeof k!="boolean")return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(m))for(var N=0,R=this.arguments.length;N=0},index:function(m){return[].slice.call(this.node.childNodes).indexOf(m.node)},get:function(m){return n.adopt(this.node.childNodes[m])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(m,k){for(var N=this.children(),R=0,z=N.length;R=0;k--)m.childNodes[k]instanceof O.SVGElement&&E(m.childNodes[k]);return n.adopt(m).id(n.eid(m.nodeName))}function T(m){return Math.abs(m)>1e-37?m:0}["fill","stroke"].forEach(function(m){var k={};k[m]=function(N){if(N===void 0)return this;if(typeof N=="string"||n.Color.isRgb(N)||N&&typeof N.fill=="function")this.attr(m,N);else for(var R=h[m].length-1;R>=0;R--)N[h[m][R]]!=null&&this.attr(h.prefix(m,h[m][R]),N[h[m][R]]);return this},n.extend(n.Element,n.FX,k)}),n.extend(n.Element,n.FX,{translate:function(m,k){return this.transform({x:m,y:k})},matrix:function(m){return this.attr("transform",new n.Matrix(arguments.length==6?[].slice.call(arguments):m))},opacity:function(m){return this.attr("opacity",m)},dx:function(m){return this.x(new n.Number(m).plus(this instanceof n.FX?0:this.x()),!0)},dy:function(m){return this.y(new n.Number(m).plus(this instanceof n.FX?0:this.y()),!0)}}),n.extend(n.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(m){return this.node.getPointAtLength(m)}}),n.Set=n.invent({create:function(m){Array.isArray(m)?this.members=m:this.clear()},extend:{add:function(){for(var m=[].slice.call(arguments),k=0,N=m.length;k-1&&this.members.splice(k,1),this},each:function(m){for(var k=0,N=this.members.length;k=0},index:function(m){return this.members.indexOf(m)},get:function(m){return this.members[m]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(m){return new n.Set(m)}}}),n.FX.Set=n.invent({create:function(m){this.set=m}}),n.Set.inherit=function(){var m=[];for(var k in n.Shape.prototype)typeof n.Shape.prototype[k]=="function"&&typeof n.Set.prototype[k]!="function"&&m.push(k);for(var k in m.forEach(function(R){n.Set.prototype[R]=function(){for(var z=0,$=this.members.length;z<$;z++)this.members[z]&&typeof this.members[z][R]=="function"&&this.members[z][R].apply(this.members[z],arguments);return R=="animate"?this.fx||(this.fx=new n.FX.Set(this)):this}}),m=[],n.FX.prototype)typeof n.FX.prototype[k]=="function"&&typeof n.FX.Set.prototype[k]!="function"&&m.push(k);m.forEach(function(N){n.FX.Set.prototype[N]=function(){for(var R=0,z=this.set.members.length;R=0;m--)delete this.memory()[arguments[m]];return this},memory:function(){return this._memory||(this._memory={})}}),n.get=function(m){var k=i.getElementById(function(N){var R=(N||"").toString().match(n.regex.reference);if(R)return R[1]}(m)||m);return n.adopt(k)},n.select=function(m,k){return new n.Set(n.utils.map((k||i).querySelectorAll(m),function(N){return n.adopt(N)}))},n.extend(n.Parent,{select:function(m){return n.select(m,this.node)}});var I="abcdef".split("");if(typeof O.CustomEvent!="function"){var F=function(m,k){k=k||{bubbles:!1,cancelable:!1,detail:void 0};var N=i.createEvent("CustomEvent");return N.initCustomEvent(m,k.bubbles,k.cancelable,k.detail),N};F.prototype=O.Event.prototype,n.CustomEvent=F}else n.CustomEvent=O.CustomEvent;return n},o(t)==="object"?e.exports=Rn.document?el(Rn,Rn.document):function(O){return el(O,O.document)}:Rn.SVG=el(Rn,Rn.document),(function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(u,h){return this.add(u,h),!u.attr("in")&&this.autoSetIn&&u.attr("in",this.source),u.attr("result")||u.attr("result",u),u},blend:function(u,h,g){return this.put(new SVG.BlendEffect(u,h,g))},colorMatrix:function(u,h){return this.put(new SVG.ColorMatrixEffect(u,h))},convolveMatrix:function(u){return this.put(new SVG.ConvolveMatrixEffect(u))},componentTransfer:function(u){return this.put(new SVG.ComponentTransferEffect(u))},composite:function(u,h,g){return this.put(new SVG.CompositeEffect(u,h,g))},flood:function(u,h){return this.put(new SVG.FloodEffect(u,h))},offset:function(u,h){return this.put(new SVG.OffsetEffect(u,h))},image:function(u){return this.put(new SVG.ImageEffect(u))},merge:function(){var u=[void 0];for(var h in arguments)u.push(arguments[h]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,u)))},gaussianBlur:function(u,h){return this.put(new SVG.GaussianBlurEffect(u,h))},morphology:function(u,h){return this.put(new SVG.MorphologyEffect(u,h))},diffuseLighting:function(u,h,g){return this.put(new SVG.DiffuseLightingEffect(u,h,g))},displacementMap:function(u,h,g,x,y){return this.put(new SVG.DisplacementMapEffect(u,h,g,x,y))},specularLighting:function(u,h,g,x){return this.put(new SVG.SpecularLightingEffect(u,h,g,x))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(u,h,g,x,y){return this.put(new SVG.TurbulenceEffect(u,h,g,x,y))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(u){var h=this.put(new SVG.Filter);return typeof u=="function"&&u.call(h,h),h}}),SVG.extend(SVG.Container,{filter:function(u){return this.defs().filter(u)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(u){return this.filterer=u instanceof SVG.Element?u:this.doc().filter(u),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(u){return this.filterer&&u===!0&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(u){return u==null?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",u)},result:function(u){return u==null?this.attr("result"):this.attr("result",u)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(u){return u==null?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",u)},result:function(u){return u==null?this.attr("result"):this.attr("result",u)},toString:function(){return this.result()}}});var O={blend:function(u,h){return this.parent()&&this.parent().blend(this,u,h)},colorMatrix:function(u,h){return this.parent()&&this.parent().colorMatrix(u,h).in(this)},convolveMatrix:function(u){return this.parent()&&this.parent().convolveMatrix(u).in(this)},componentTransfer:function(u){return this.parent()&&this.parent().componentTransfer(u).in(this)},composite:function(u,h){return this.parent()&&this.parent().composite(this,u,h)},flood:function(u,h){return this.parent()&&this.parent().flood(u,h)},offset:function(u,h){return this.parent()&&this.parent().offset(u,h).in(this)},image:function(u){return this.parent()&&this.parent().image(u)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(u,h){return this.parent()&&this.parent().gaussianBlur(u,h).in(this)},morphology:function(u,h){return this.parent()&&this.parent().morphology(u,h).in(this)},diffuseLighting:function(u,h,g){return this.parent()&&this.parent().diffuseLighting(u,h,g).in(this)},displacementMap:function(u,h,g,x){return this.parent()&&this.parent().displacementMap(this,u,h,g,x)},specularLighting:function(u,h,g,x){return this.parent()&&this.parent().specularLighting(u,h,g,x).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(u,h,g,x,y){return this.parent()&&this.parent().turbulence(u,h,g,x,y).in(this)}};SVG.extend(SVG.Effect,O),SVG.extend(SVG.ParentEffect,O),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(u){this.attr("in",u)}}});var i={blend:function(u,h,g){this.attr({in:u,in2:h,mode:g||"normal"})},colorMatrix:function(u,h){u=="matrix"&&(h=l(h)),this.attr({type:u,values:h===void 0?null:h})},convolveMatrix:function(u){u=l(u),this.attr({order:Math.sqrt(u.split(" ").length),kernelMatrix:u})},composite:function(u,h,g){this.attr({in:u,in2:h,operator:g})},flood:function(u,h){this.attr("flood-color",u),h!=null&&this.attr("flood-opacity",h)},offset:function(u,h){this.attr({dx:u,dy:h})},image:function(u){this.attr("href",u,SVG.xlink)},displacementMap:function(u,h,g,x,y){this.attr({in:u,in2:h,scale:g,xChannelSelector:x,yChannelSelector:y})},gaussianBlur:function(u,h){u!=null||h!=null?this.attr("stdDeviation",function(g){if(!Array.isArray(g))return g;for(var x=0,y=g.length,b=[];x1&&(We*=y=Math.sqrt(y),tt*=y),b=new SVG.Matrix().rotate(ot).scale(1/We,1/tt).rotate(-ot),It=It.transform(b),Vt=Vt.transform(b),w=[Vt.x-It.x,Vt.y-It.y],j=w[0]*w[0]+w[1]*w[1],S=Math.sqrt(j),w[0]/=S,w[1]/=S,E=j<4?Math.sqrt(1-j/4):0,Zt===Tt&&(E*=-1),T=new SVG.Point((Vt.x+It.x)/2+E*-w[1],(Vt.y+It.y)/2+E*w[0]),I=new SVG.Point(It.x-T.x,It.y-T.y),F=new SVG.Point(Vt.x-T.x,Vt.y-T.y),m=Math.acos(I.x/Math.sqrt(I.x*I.x+I.y*I.y)),I.y<0&&(m*=-1),k=Math.acos(F.x/Math.sqrt(F.x*F.x+F.y*F.y)),F.y<0&&(k*=-1),Tt&&m>k&&(k+=2*Math.PI),!Tt&&mu.maxX-n.width&&(h=(l=u.maxX-n.width)-this.startPoints.box.x),u.minY!=null&&du.maxY-n.height&&(g=(d=u.maxY-n.height)-this.startPoints.box.y),u.snapToGrid!=null&&(l-=l%u.snapToGrid,d-=d%u.snapToGrid,h-=h%u.snapToGrid,g-=g%u.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:h,y:g},!0):this.el.move(l,d));return a},O.prototype.end=function(i){var n=this.drag(i);this.el.fire("dragend",{event:i,p:n,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(i,n){typeof i!="function"&&typeof i!="object"||(n=i,i=!0);var a=this.remember("_draggable")||new O(this);return(i=i===void 0||i)?a.init(n||{},i):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}).call(void 0),function(){function O(i){this.el=i,i.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(n,a,l){var d=typeof n!="string"?n:a[n];return l?d/2:d},this.pointCoords=function(n,a){var l=this.pointsList[n];return{x:this.pointCoord(l[0],a,n==="t"||n==="b"),y:this.pointCoord(l[1],a,n==="r"||n==="l")}}}O.prototype.init=function(i,n){var a=this.el.bbox();this.options={};var l=this.el.selectize.defaults.points;for(var d in this.el.selectize.defaults)this.options[d]=this.el.selectize.defaults[d],n[d]!==void 0&&(this.options[d]=n[d]);var u=["points","pointsExclude"];for(var d in u){var h=this.options[u[d]];typeof h=="string"?h=h.length>0?h.split(/\s*,\s*/i):[]:typeof h=="boolean"&&u[d]==="points"&&(h=h?l:[]),this.options[u[d]]=h}this.options.points=[l,this.options.points].reduce(function(g,x){return g.filter(function(y){return x.indexOf(y)>-1})}),this.options.points=[this.options.points,this.options.pointsExclude].reduce(function(g,x){return g.filter(function(y){return x.indexOf(y)<0})}),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(a.x,a.y)),this.options.deepSelect&&["line","polyline","polygon"].indexOf(this.el.type)!==-1?this.selectPoints(i):this.selectRect(i),this.observe(),this.cleanup()},O.prototype.selectPoints=function(i){return this.pointSelection.isSelected=i,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},O.prototype.getPointArray=function(){var i=this.el.bbox();return this.el.array().valueOf().map(function(n){return[n[0]-i.x,n[1]-i.y]})},O.prototype.drawPoints=function(){for(var i=this,n=this.getPointArray(),a=0,l=n.length;a0&&this.parameters.box.height-h[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x+h[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-h[0]);h=this.checkAspectRatio(h),this.el.move(this.parameters.box.x+h[0],this.parameters.box.y+h[1]).size(this.parameters.box.width-h[0],this.parameters.box.height-h[1])}};break;case"rt":this.calc=function(d,u){var h=this.snapToGrid(d,u,2);if(this.parameters.box.width+h[0]>0&&this.parameters.box.height-h[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x-h[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+h[0]);h=this.checkAspectRatio(h,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+h[1]).size(this.parameters.box.width+h[0],this.parameters.box.height-h[1])}};break;case"rb":this.calc=function(d,u){var h=this.snapToGrid(d,u,0);if(this.parameters.box.width+h[0]>0&&this.parameters.box.height+h[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x-h[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+h[0]);h=this.checkAspectRatio(h),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+h[0],this.parameters.box.height+h[1])}};break;case"lb":this.calc=function(d,u){var h=this.snapToGrid(d,u,1);if(this.parameters.box.width-h[0]>0&&this.parameters.box.height+h[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x+h[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-h[0]);h=this.checkAspectRatio(h,!0),this.el.move(this.parameters.box.x+h[0],this.parameters.box.y).size(this.parameters.box.width-h[0],this.parameters.box.height+h[1])}};break;case"t":this.calc=function(d,u){var h=this.snapToGrid(d,u,2);if(this.parameters.box.height-h[1]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x,this.parameters.box.y+h[1]).height(this.parameters.box.height-h[1])}};break;case"r":this.calc=function(d,u){var h=this.snapToGrid(d,u,0);if(this.parameters.box.width+h[0]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+h[0])}};break;case"b":this.calc=function(d,u){var h=this.snapToGrid(d,u,0);if(this.parameters.box.height+h[1]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+h[1])}};break;case"l":this.calc=function(d,u){var h=this.snapToGrid(d,u,1);if(this.parameters.box.width-h[0]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x+h[0],this.parameters.box.y).width(this.parameters.box.width-h[0])}};break;case"rot":this.calc=function(d,u){var h=d+this.parameters.p.x,g=u+this.parameters.p.y,x=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),y=Math.atan2(g-this.parameters.box.y-this.parameters.box.height/2,h-this.parameters.box.x-this.parameters.box.width/2),b=this.parameters.rotation+180*(y-x)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(b-b%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(d,u){var h=this.snapToGrid(d,u,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),g=this.el.array().valueOf();g[this.parameters.i][0]=this.parameters.pointCoords[0]+h[0],g[this.parameters.i][1]=this.parameters.pointCoords[1]+h[1],this.el.plot(g)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:i}),SVG.on(window,"touchmove.resize",function(d){n.update(d||window.event)}),SVG.on(window,"touchend.resize",function(){n.done()}),SVG.on(window,"mousemove.resize",function(d){n.update(d||window.event)}),SVG.on(window,"mouseup.resize",function(){n.done()})},O.prototype.update=function(i){if(i){var n=this._extractPosition(i),a=this.transformPoint(n.x,n.y),l=a.x-this.parameters.p.x,d=a.y-this.parameters.p.y;this.lastUpdateCall=[l,d],this.calc(l,d),this.el.fire("resizing",{dx:l,dy:d,event:i})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},O.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},O.prototype.snapToGrid=function(i,n,a,l){var d;return l!==void 0?d=[(a+i)%this.options.snapToGrid,(l+n)%this.options.snapToGrid]:(a=a??3,d=[(this.parameters.box.x+i+(1&a?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+n+(2&a?0:this.parameters.box.height))%this.options.snapToGrid]),i<0&&(d[0]-=this.options.snapToGrid),n<0&&(d[1]-=this.options.snapToGrid),i-=Math.abs(d[0])h.maxX&&(i=h.maxX-d),h.minY!==void 0&&u+nh.maxY&&(n=h.maxY-u),[i,n]},O.prototype.checkAspectRatio=function(i,n){if(!this.options.saveAspectRatio)return i;var a=i.slice(),l=this.parameters.box.width/this.parameters.box.height,d=this.parameters.box.width+i[0],u=this.parameters.box.height-i[1],h=d/u;return hl&&(a[0]=this.parameters.box.width-u*l,n&&(a[0]=-a[0])),a},SVG.extend(SVG.Element,{resize:function(i){return(this.remember("_resizeHandler")||new O(this)).init(i||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),window.Apex===void 0&&(window.Apex={});var F1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new K(this.ctx),this.ctx.axes=new Q(this.ctx),this.ctx.core=new g5(this.ctx.el,this.ctx),this.ctx.config=new oe({}),this.ctx.data=new Nt(this.ctx),this.ctx.grid=new Uo(this.ctx),this.ctx.graphics=new X(this.ctx),this.ctx.coreUtils=new q(this.ctx),this.ctx.crosshairs=new re(this.ctx),this.ctx.events=new P1(this.ctx),this.ctx.exports=new os(this.ctx),this.ctx.localization=new T1(this.ctx),this.ctx.options=new Ee,this.ctx.responsive=new se(this.ctx),this.ctx.series=new Me(this.ctx),this.ctx.theme=new ye(this.ctx),this.ctx.formatters=new qe(this.ctx),this.ctx.titleSubtitle=new xe(this.ctx),this.ctx.legend=new Zo(this.ctx),this.ctx.toolbar=new cs(this.ctx),this.ctx.tooltip=new R1(this.ctx),this.ctx.dimensions=new Pt(this.ctx),this.ctx.updateHelpers=new m5(this.ctx),this.ctx.zoomPanSelection=new da(this.ctx),this.ctx.w.globals.tooltip=new R1(this.ctx)}}]),O}(),D1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"clear",value:function(i){var n=i.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:n})}},{key:"killSVG",value:function(i){i.each(function(n,a){this.removeClass("*"),this.off(),this.stop()},!0),i.ungroup(),i.clear()}},{key:"clearDomElements",value:function(i){var n=this,a=i.isUpdating,l=this.w.globals.dom.Paper.node;l.parentNode&&l.parentNode.parentNode&&!a&&(l.parentNode.parentNode.style.minHeight="unset");var d=this.w.globals.dom.baseEl;d&&this.ctx.eventList.forEach(function(h){d.removeEventListener(h,n.ctx.events.documentEvent)});var u=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(u.Paper),u.Paper.remove(),u.elWrap=null,u.elGraphical=null,u.elLegendWrap=null,u.elLegendForeign=null,u.baseEl=null,u.elGridRect=null,u.elGridRectMask=null,u.elGridRectMarkerMask=null,u.elForecastMask=null,u.elNonForecastMask=null,u.elDefs=null}}]),O}(),Zd=new WeakMap,x5=function(){function O(i,n){c(this,O),this.opts=n,this.ctx=this,this.w=new je(n).init(),this.el=i,this.w.globals.cuid=_.randomId(),this.w.globals.chartID=this.w.config.chart.id?_.escapeString(this.w.config.chart.id):this.w.globals.cuid,new F1(this).initModules(),this.create=_.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return v(O,[{key:"render",value:function(){var i=this;return new Promise(function(n,a){if(i.el!==null){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),i.w.config.chart.id&&Apex._chartInstances.push({id:i.w.globals.chartID,group:i.w.config.chart.group,chart:i}),i.setLocale(i.w.config.chart.defaultLocale);var l=i.w.config.chart.events.beforeMount;if(typeof l=="function"&&l(i,i.w),i.events.fireEvent("beforeMount",[i,i.w]),window.addEventListener("resize",i.windowResizeHandler),function(w,S){var j=!1;if(w.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var E=w.getBoundingClientRect();w.style.display!=="none"&&E.width!==0||(j=!0)}var T=new ResizeObserver(function(I){j&&S.call(w,I),j=!0});w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(w.children).forEach(function(I){return T.observe(I)}):T.observe(w),Zd.set(S,T)}(i.el.parentNode,i.parentResizeHandler),!i.css){var d=i.el.getRootNode&&i.el.getRootNode(),u=_.is("ShadowRoot",d),h=i.el.ownerDocument,g=h.getElementById("apexcharts-css");if(u||!g){var x;i.css=document.createElement("style"),i.css.id="apexcharts-css",i.css.textContent=`@keyframes opaque { +`:""):(typeof m=="function"?m.call(this,this):this.plain(m),this)},dx:function(m){return this.attr("dx",m)},dy:function(m){return this.attr("dy",m)},newLine:function(){var m=this.parent(n.Text);return this.dom.newLined=!0,this.dy(m.dom.leading*m.attr("font-size")).attr("x",m.x())}}}),n.extend(n.Text,n.Tspan,{plain:function(m){return this._build===!1&&this.clear(),this.node.appendChild(i.createTextNode(m)),this},tspan:function(m){var k=(this.textPath&&this.textPath()||this).node,N=new n.Tspan;return this._build===!1&&this.clear(),k.appendChild(N.node),N.text(m)},clear:function(){for(var m=(this.textPath&&this.textPath()||this).node;m.hasChildNodes();)m.removeChild(m.lastChild);return this},length:function(){return this.node.getComputedTextLength()}}),n.TextPath=n.invent({create:"textPath",inherit:n.Parent,parent:n.Text,construct:{morphArray:n.PathArray,array:function(){var m=this.track();return m?m.array():null},plot:function(m){var k=this.track(),N=null;return k&&(N=k.plot(m)),m==null?N:this},track:function(){var m=this.textPath();if(m)return m.reference("href")},textPath:function(){if(this.node.firstChild&&this.node.firstChild.nodeName=="textPath")return n.adopt(this.node.firstChild)}}}),n.Nested=n.invent({create:function(){this.constructor.call(this,n.create("svg")),this.style("overflow","visible")},inherit:n.Container,construct:{nested:function(){return this.put(new n.Nested)}}});var h={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(m,k){return k=="color"?m:m+"-"+k}};function g(m,k,N,R){return N+R.replace(n.regex.dots," .")}function x(m){return m.toLowerCase().replace(/-(.)/g,function(k,N){return N.toUpperCase()})}function y(m){return m.charAt(0).toUpperCase()+m.slice(1)}function b(m){var k=m.toString(16);return k.length==1?"0"+k:k}function w(m,k,N){if(k==null||N==null){var R=m.bbox();k==null?k=R.width/R.height*N:N==null&&(N=R.height/R.width*k)}return{width:k,height:N}}function S(m,k,N){return{x:k*m.a+N*m.c+0,y:k*m.b+N*m.d+0}}function j(m){return{a:m[0],b:m[1],c:m[2],d:m[3],e:m[4],f:m[5]}}function L(m){for(var k=m.childNodes.length-1;k>=0;k--)m.childNodes[k]instanceof O.SVGElement&&L(m.childNodes[k]);return n.adopt(m).id(n.eid(m.nodeName))}function T(m){return Math.abs(m)>1e-37?m:0}["fill","stroke"].forEach(function(m){var k={};k[m]=function(N){if(N===void 0)return this;if(typeof N=="string"||n.Color.isRgb(N)||N&&typeof N.fill=="function")this.attr(m,N);else for(var R=h[m].length-1;R>=0;R--)N[h[m][R]]!=null&&this.attr(h.prefix(m,h[m][R]),N[h[m][R]]);return this},n.extend(n.Element,n.FX,k)}),n.extend(n.Element,n.FX,{translate:function(m,k){return this.transform({x:m,y:k})},matrix:function(m){return this.attr("transform",new n.Matrix(arguments.length==6?[].slice.call(arguments):m))},opacity:function(m){return this.attr("opacity",m)},dx:function(m){return this.x(new n.Number(m).plus(this instanceof n.FX?0:this.x()),!0)},dy:function(m){return this.y(new n.Number(m).plus(this instanceof n.FX?0:this.y()),!0)}}),n.extend(n.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(m){return this.node.getPointAtLength(m)}}),n.Set=n.invent({create:function(m){Array.isArray(m)?this.members=m:this.clear()},extend:{add:function(){for(var m=[].slice.call(arguments),k=0,N=m.length;k-1&&this.members.splice(k,1),this},each:function(m){for(var k=0,N=this.members.length;k=0},index:function(m){return this.members.indexOf(m)},get:function(m){return this.members[m]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(m){return new n.Set(m)}}}),n.FX.Set=n.invent({create:function(m){this.set=m}}),n.Set.inherit=function(){var m=[];for(var k in n.Shape.prototype)typeof n.Shape.prototype[k]=="function"&&typeof n.Set.prototype[k]!="function"&&m.push(k);for(var k in m.forEach(function(R){n.Set.prototype[R]=function(){for(var z=0,$=this.members.length;z<$;z++)this.members[z]&&typeof this.members[z][R]=="function"&&this.members[z][R].apply(this.members[z],arguments);return R=="animate"?this.fx||(this.fx=new n.FX.Set(this)):this}}),m=[],n.FX.prototype)typeof n.FX.prototype[k]=="function"&&typeof n.FX.Set.prototype[k]!="function"&&m.push(k);m.forEach(function(N){n.FX.Set.prototype[N]=function(){for(var R=0,z=this.set.members.length;R=0;m--)delete this.memory()[arguments[m]];return this},memory:function(){return this._memory||(this._memory={})}}),n.get=function(m){var k=i.getElementById(function(N){var R=(N||"").toString().match(n.regex.reference);if(R)return R[1]}(m)||m);return n.adopt(k)},n.select=function(m,k){return new n.Set(n.utils.map((k||i).querySelectorAll(m),function(N){return n.adopt(N)}))},n.extend(n.Parent,{select:function(m){return n.select(m,this.node)}});var I="abcdef".split("");if(typeof O.CustomEvent!="function"){var F=function(m,k){k=k||{bubbles:!1,cancelable:!1,detail:void 0};var N=i.createEvent("CustomEvent");return N.initCustomEvent(m,k.bubbles,k.cancelable,k.detail),N};F.prototype=O.Event.prototype,n.CustomEvent=F}else n.CustomEvent=O.CustomEvent;return n},o(t)==="object"?e.exports=Rn.document?el(Rn,Rn.document):function(O){return el(O,O.document)}:Rn.SVG=el(Rn,Rn.document),(function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(u,h){return this.add(u,h),!u.attr("in")&&this.autoSetIn&&u.attr("in",this.source),u.attr("result")||u.attr("result",u),u},blend:function(u,h,g){return this.put(new SVG.BlendEffect(u,h,g))},colorMatrix:function(u,h){return this.put(new SVG.ColorMatrixEffect(u,h))},convolveMatrix:function(u){return this.put(new SVG.ConvolveMatrixEffect(u))},componentTransfer:function(u){return this.put(new SVG.ComponentTransferEffect(u))},composite:function(u,h,g){return this.put(new SVG.CompositeEffect(u,h,g))},flood:function(u,h){return this.put(new SVG.FloodEffect(u,h))},offset:function(u,h){return this.put(new SVG.OffsetEffect(u,h))},image:function(u){return this.put(new SVG.ImageEffect(u))},merge:function(){var u=[void 0];for(var h in arguments)u.push(arguments[h]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,u)))},gaussianBlur:function(u,h){return this.put(new SVG.GaussianBlurEffect(u,h))},morphology:function(u,h){return this.put(new SVG.MorphologyEffect(u,h))},diffuseLighting:function(u,h,g){return this.put(new SVG.DiffuseLightingEffect(u,h,g))},displacementMap:function(u,h,g,x,y){return this.put(new SVG.DisplacementMapEffect(u,h,g,x,y))},specularLighting:function(u,h,g,x){return this.put(new SVG.SpecularLightingEffect(u,h,g,x))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(u,h,g,x,y){return this.put(new SVG.TurbulenceEffect(u,h,g,x,y))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(u){var h=this.put(new SVG.Filter);return typeof u=="function"&&u.call(h,h),h}}),SVG.extend(SVG.Container,{filter:function(u){return this.defs().filter(u)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(u){return this.filterer=u instanceof SVG.Element?u:this.doc().filter(u),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(u){return this.filterer&&u===!0&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(u){return u==null?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",u)},result:function(u){return u==null?this.attr("result"):this.attr("result",u)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(u){return u==null?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",u)},result:function(u){return u==null?this.attr("result"):this.attr("result",u)},toString:function(){return this.result()}}});var O={blend:function(u,h){return this.parent()&&this.parent().blend(this,u,h)},colorMatrix:function(u,h){return this.parent()&&this.parent().colorMatrix(u,h).in(this)},convolveMatrix:function(u){return this.parent()&&this.parent().convolveMatrix(u).in(this)},componentTransfer:function(u){return this.parent()&&this.parent().componentTransfer(u).in(this)},composite:function(u,h){return this.parent()&&this.parent().composite(this,u,h)},flood:function(u,h){return this.parent()&&this.parent().flood(u,h)},offset:function(u,h){return this.parent()&&this.parent().offset(u,h).in(this)},image:function(u){return this.parent()&&this.parent().image(u)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(u,h){return this.parent()&&this.parent().gaussianBlur(u,h).in(this)},morphology:function(u,h){return this.parent()&&this.parent().morphology(u,h).in(this)},diffuseLighting:function(u,h,g){return this.parent()&&this.parent().diffuseLighting(u,h,g).in(this)},displacementMap:function(u,h,g,x){return this.parent()&&this.parent().displacementMap(this,u,h,g,x)},specularLighting:function(u,h,g,x){return this.parent()&&this.parent().specularLighting(u,h,g,x).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(u,h,g,x,y){return this.parent()&&this.parent().turbulence(u,h,g,x,y).in(this)}};SVG.extend(SVG.Effect,O),SVG.extend(SVG.ParentEffect,O),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(u){this.attr("in",u)}}});var i={blend:function(u,h,g){this.attr({in:u,in2:h,mode:g||"normal"})},colorMatrix:function(u,h){u=="matrix"&&(h=l(h)),this.attr({type:u,values:h===void 0?null:h})},convolveMatrix:function(u){u=l(u),this.attr({order:Math.sqrt(u.split(" ").length),kernelMatrix:u})},composite:function(u,h,g){this.attr({in:u,in2:h,operator:g})},flood:function(u,h){this.attr("flood-color",u),h!=null&&this.attr("flood-opacity",h)},offset:function(u,h){this.attr({dx:u,dy:h})},image:function(u){this.attr("href",u,SVG.xlink)},displacementMap:function(u,h,g,x,y){this.attr({in:u,in2:h,scale:g,xChannelSelector:x,yChannelSelector:y})},gaussianBlur:function(u,h){u!=null||h!=null?this.attr("stdDeviation",function(g){if(!Array.isArray(g))return g;for(var x=0,y=g.length,b=[];x1&&(We*=y=Math.sqrt(y),tt*=y),b=new SVG.Matrix().rotate(ot).scale(1/We,1/tt).rotate(-ot),It=It.transform(b),Vt=Vt.transform(b),w=[Vt.x-It.x,Vt.y-It.y],j=w[0]*w[0]+w[1]*w[1],S=Math.sqrt(j),w[0]/=S,w[1]/=S,L=j<4?Math.sqrt(1-j/4):0,Zt===Tt&&(L*=-1),T=new SVG.Point((Vt.x+It.x)/2+L*-w[1],(Vt.y+It.y)/2+L*w[0]),I=new SVG.Point(It.x-T.x,It.y-T.y),F=new SVG.Point(Vt.x-T.x,Vt.y-T.y),m=Math.acos(I.x/Math.sqrt(I.x*I.x+I.y*I.y)),I.y<0&&(m*=-1),k=Math.acos(F.x/Math.sqrt(F.x*F.x+F.y*F.y)),F.y<0&&(k*=-1),Tt&&m>k&&(k+=2*Math.PI),!Tt&&mu.maxX-n.width&&(h=(l=u.maxX-n.width)-this.startPoints.box.x),u.minY!=null&&du.maxY-n.height&&(g=(d=u.maxY-n.height)-this.startPoints.box.y),u.snapToGrid!=null&&(l-=l%u.snapToGrid,d-=d%u.snapToGrid,h-=h%u.snapToGrid,g-=g%u.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:h,y:g},!0):this.el.move(l,d));return a},O.prototype.end=function(i){var n=this.drag(i);this.el.fire("dragend",{event:i,p:n,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(i,n){typeof i!="function"&&typeof i!="object"||(n=i,i=!0);var a=this.remember("_draggable")||new O(this);return(i=i===void 0||i)?a.init(n||{},i):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}).call(void 0),function(){function O(i){this.el=i,i.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(n,a,l){var d=typeof n!="string"?n:a[n];return l?d/2:d},this.pointCoords=function(n,a){var l=this.pointsList[n];return{x:this.pointCoord(l[0],a,n==="t"||n==="b"),y:this.pointCoord(l[1],a,n==="r"||n==="l")}}}O.prototype.init=function(i,n){var a=this.el.bbox();this.options={};var l=this.el.selectize.defaults.points;for(var d in this.el.selectize.defaults)this.options[d]=this.el.selectize.defaults[d],n[d]!==void 0&&(this.options[d]=n[d]);var u=["points","pointsExclude"];for(var d in u){var h=this.options[u[d]];typeof h=="string"?h=h.length>0?h.split(/\s*,\s*/i):[]:typeof h=="boolean"&&u[d]==="points"&&(h=h?l:[]),this.options[u[d]]=h}this.options.points=[l,this.options.points].reduce(function(g,x){return g.filter(function(y){return x.indexOf(y)>-1})}),this.options.points=[this.options.points,this.options.pointsExclude].reduce(function(g,x){return g.filter(function(y){return x.indexOf(y)<0})}),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(a.x,a.y)),this.options.deepSelect&&["line","polyline","polygon"].indexOf(this.el.type)!==-1?this.selectPoints(i):this.selectRect(i),this.observe(),this.cleanup()},O.prototype.selectPoints=function(i){return this.pointSelection.isSelected=i,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},O.prototype.getPointArray=function(){var i=this.el.bbox();return this.el.array().valueOf().map(function(n){return[n[0]-i.x,n[1]-i.y]})},O.prototype.drawPoints=function(){for(var i=this,n=this.getPointArray(),a=0,l=n.length;a0&&this.parameters.box.height-h[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x+h[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-h[0]);h=this.checkAspectRatio(h),this.el.move(this.parameters.box.x+h[0],this.parameters.box.y+h[1]).size(this.parameters.box.width-h[0],this.parameters.box.height-h[1])}};break;case"rt":this.calc=function(d,u){var h=this.snapToGrid(d,u,2);if(this.parameters.box.width+h[0]>0&&this.parameters.box.height-h[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x-h[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+h[0]);h=this.checkAspectRatio(h,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+h[1]).size(this.parameters.box.width+h[0],this.parameters.box.height-h[1])}};break;case"rb":this.calc=function(d,u){var h=this.snapToGrid(d,u,0);if(this.parameters.box.width+h[0]>0&&this.parameters.box.height+h[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x-h[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+h[0]);h=this.checkAspectRatio(h),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+h[0],this.parameters.box.height+h[1])}};break;case"lb":this.calc=function(d,u){var h=this.snapToGrid(d,u,1);if(this.parameters.box.width-h[0]>0&&this.parameters.box.height+h[1]>0){if(this.parameters.type==="text")return this.el.move(this.parameters.box.x+h[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-h[0]);h=this.checkAspectRatio(h,!0),this.el.move(this.parameters.box.x+h[0],this.parameters.box.y).size(this.parameters.box.width-h[0],this.parameters.box.height+h[1])}};break;case"t":this.calc=function(d,u){var h=this.snapToGrid(d,u,2);if(this.parameters.box.height-h[1]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x,this.parameters.box.y+h[1]).height(this.parameters.box.height-h[1])}};break;case"r":this.calc=function(d,u){var h=this.snapToGrid(d,u,0);if(this.parameters.box.width+h[0]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+h[0])}};break;case"b":this.calc=function(d,u){var h=this.snapToGrid(d,u,0);if(this.parameters.box.height+h[1]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+h[1])}};break;case"l":this.calc=function(d,u){var h=this.snapToGrid(d,u,1);if(this.parameters.box.width-h[0]>0){if(this.parameters.type==="text")return;this.el.move(this.parameters.box.x+h[0],this.parameters.box.y).width(this.parameters.box.width-h[0])}};break;case"rot":this.calc=function(d,u){var h=d+this.parameters.p.x,g=u+this.parameters.p.y,x=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),y=Math.atan2(g-this.parameters.box.y-this.parameters.box.height/2,h-this.parameters.box.x-this.parameters.box.width/2),b=this.parameters.rotation+180*(y-x)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(b-b%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(d,u){var h=this.snapToGrid(d,u,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),g=this.el.array().valueOf();g[this.parameters.i][0]=this.parameters.pointCoords[0]+h[0],g[this.parameters.i][1]=this.parameters.pointCoords[1]+h[1],this.el.plot(g)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:i}),SVG.on(window,"touchmove.resize",function(d){n.update(d||window.event)}),SVG.on(window,"touchend.resize",function(){n.done()}),SVG.on(window,"mousemove.resize",function(d){n.update(d||window.event)}),SVG.on(window,"mouseup.resize",function(){n.done()})},O.prototype.update=function(i){if(i){var n=this._extractPosition(i),a=this.transformPoint(n.x,n.y),l=a.x-this.parameters.p.x,d=a.y-this.parameters.p.y;this.lastUpdateCall=[l,d],this.calc(l,d),this.el.fire("resizing",{dx:l,dy:d,event:i})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},O.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},O.prototype.snapToGrid=function(i,n,a,l){var d;return l!==void 0?d=[(a+i)%this.options.snapToGrid,(l+n)%this.options.snapToGrid]:(a=a??3,d=[(this.parameters.box.x+i+(1&a?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+n+(2&a?0:this.parameters.box.height))%this.options.snapToGrid]),i<0&&(d[0]-=this.options.snapToGrid),n<0&&(d[1]-=this.options.snapToGrid),i-=Math.abs(d[0])h.maxX&&(i=h.maxX-d),h.minY!==void 0&&u+nh.maxY&&(n=h.maxY-u),[i,n]},O.prototype.checkAspectRatio=function(i,n){if(!this.options.saveAspectRatio)return i;var a=i.slice(),l=this.parameters.box.width/this.parameters.box.height,d=this.parameters.box.width+i[0],u=this.parameters.box.height-i[1],h=d/u;return hl&&(a[0]=this.parameters.box.width-u*l,n&&(a[0]=-a[0])),a},SVG.extend(SVG.Element,{resize:function(i){return(this.remember("_resizeHandler")||new O(this)).init(i||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),window.Apex===void 0&&(window.Apex={});var F1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new K(this.ctx),this.ctx.axes=new q(this.ctx),this.ctx.core=new g5(this.ctx.el,this.ctx),this.ctx.config=new le({}),this.ctx.data=new Nt(this.ctx),this.ctx.grid=new Uo(this.ctx),this.ctx.graphics=new X(this.ctx),this.ctx.coreUtils=new Q(this.ctx),this.ctx.crosshairs=new re(this.ctx),this.ctx.events=new P1(this.ctx),this.ctx.exports=new ls(this.ctx),this.ctx.localization=new T1(this.ctx),this.ctx.options=new Ee,this.ctx.responsive=new se(this.ctx),this.ctx.series=new Me(this.ctx),this.ctx.theme=new ye(this.ctx),this.ctx.formatters=new qe(this.ctx),this.ctx.titleSubtitle=new xe(this.ctx),this.ctx.legend=new Zo(this.ctx),this.ctx.toolbar=new ds(this.ctx),this.ctx.tooltip=new R1(this.ctx),this.ctx.dimensions=new Pt(this.ctx),this.ctx.updateHelpers=new m5(this.ctx),this.ctx.zoomPanSelection=new ua(this.ctx),this.ctx.w.globals.tooltip=new R1(this.ctx)}}]),O}(),D1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"clear",value:function(i){var n=i.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:n})}},{key:"killSVG",value:function(i){i.each(function(n,a){this.removeClass("*"),this.off(),this.stop()},!0),i.ungroup(),i.clear()}},{key:"clearDomElements",value:function(i){var n=this,a=i.isUpdating,l=this.w.globals.dom.Paper.node;l.parentNode&&l.parentNode.parentNode&&!a&&(l.parentNode.parentNode.style.minHeight="unset");var d=this.w.globals.dom.baseEl;d&&this.ctx.eventList.forEach(function(h){d.removeEventListener(h,n.ctx.events.documentEvent)});var u=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(u.Paper),u.Paper.remove(),u.elWrap=null,u.elGraphical=null,u.elLegendWrap=null,u.elLegendForeign=null,u.baseEl=null,u.elGridRect=null,u.elGridRectMask=null,u.elGridRectMarkerMask=null,u.elForecastMask=null,u.elNonForecastMask=null,u.elDefs=null}}]),O}(),Zd=new WeakMap,x5=function(){function O(i,n){c(this,O),this.opts=n,this.ctx=this,this.w=new je(n).init(),this.el=i,this.w.globals.cuid=_.randomId(),this.w.globals.chartID=this.w.config.chart.id?_.escapeString(this.w.config.chart.id):this.w.globals.cuid,new F1(this).initModules(),this.create=_.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return v(O,[{key:"render",value:function(){var i=this;return new Promise(function(n,a){if(i.el!==null){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),i.w.config.chart.id&&Apex._chartInstances.push({id:i.w.globals.chartID,group:i.w.config.chart.group,chart:i}),i.setLocale(i.w.config.chart.defaultLocale);var l=i.w.config.chart.events.beforeMount;if(typeof l=="function"&&l(i,i.w),i.events.fireEvent("beforeMount",[i,i.w]),window.addEventListener("resize",i.windowResizeHandler),function(w,S){var j=!1;if(w.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var L=w.getBoundingClientRect();w.style.display!=="none"&&L.width!==0||(j=!0)}var T=new ResizeObserver(function(I){j&&S.call(w,I),j=!0});w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(w.children).forEach(function(I){return T.observe(I)}):T.observe(w),Zd.set(S,T)}(i.el.parentNode,i.parentResizeHandler),!i.css){var d=i.el.getRootNode&&i.el.getRootNode(),u=_.is("ShadowRoot",d),h=i.el.ownerDocument,g=h.getElementById("apexcharts-css");if(u||!g){var x;i.css=document.createElement("style"),i.css.id="apexcharts-css",i.css.textContent=`@keyframes opaque { 0% { opacity: 0 } @@ -787,7 +787,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho .apexcharts-rangebar-goals-markers{ pointer-events: none -}`;var y=((x=i.opts.chart)===null||x===void 0?void 0:x.nonce)||i.w.config.chart.nonce;y&&i.css.setAttribute("nonce",y),u?d.prepend(i.css):h.head.appendChild(i.css)}}var b=i.create(i.w.config.series,{});if(!b)return n(i);i.mount(b).then(function(){typeof i.w.config.chart.events.mounted=="function"&&i.w.config.chart.events.mounted(i,i.w),i.events.fireEvent("mounted",[i,i.w]),n(b)}).catch(function(w){a(w)})}else a(new Error("Element not found"))})}},{key:"create",value:function(i,n){var a=this.w;new F1(this).initModules();var l=this.w.globals;if(l.noData=!1,l.animationEnded=!1,this.responsive.checkResponsiveConfig(n),a.config.xaxis.convertedCatToNumeric&&new le(a.config).convertCatToNumericXaxis(a.config,this.ctx),this.el===null||(this.core.setupElements(),a.config.chart.type==="treemap"&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),l.svgWidth===0))return l.animationEnded=!0,null;var d=q.checkComboSeries(i);l.comboCharts=d.comboCharts,l.comboBarCount=d.comboBarCount;var u=i.every(function(y){return y.data&&y.data.length===0});(i.length===0||u)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(i),this.theme.init(),new Ue(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),l.noData&&l.collapsedSeries.length!==l.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),l.axisCharts&&(this.core.coreCalculations(),a.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new q(this).getLargestMarkerSize(),this.dimensions.plotCoords();var h=this.core.xySettings();this.grid.createGridMask();var g=this.core.plotChartType(i,h),x=new Be(this);return x.bringForward(),a.config.dataLabels.background.enabled&&x.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:g,xyRatios:h,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var i=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,a=this,l=a.w;return new Promise(function(d,u){if(a.el===null)return u(new Error("Not enough data to display or target element not found"));(n===null||l.globals.allSeriesCollapsed)&&a.series.handleNoData(),a.grid=new Uo(a);var h,g,x=a.grid.drawGrid();if(a.annotations=new Fe(a),a.annotations.drawImageAnnos(),a.annotations.drawTextAnnos(),l.config.grid.position==="back"&&(x&&l.globals.dom.elGraphical.add(x.el),x!=null&&(h=x.elGridBorders)!==null&&h!==void 0&&h.node&&l.globals.dom.elGraphical.add(x.elGridBorders)),Array.isArray(n.elGraph))for(var y=0;y0&&l.globals.memory.methodsToExec.forEach(function(j){j.method(j.params,!1,j.context)}),l.globals.axisCharts||l.globals.noData||a.core.resizeNonAxisCharts(),d(a)})}},{key:"destroy",value:function(){var i,n;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,i=this.parentResizeHandler,(n=Zd.get(i))&&(n.disconnect(),Zd.delete(i));var a=this.w.config.chart.id;a&&Apex._chartInstances.forEach(function(l,d){l.id===_.escapeString(a)&&Apex._chartInstances.splice(d,1)}),new D1(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(i){var n=this,a=arguments.length>1&&arguments[1]!==void 0&&arguments[1],l=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],d=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],u=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],h=this.w;return h.globals.selection=void 0,i.series&&(this.series.resetSeries(!1,!0,!1),i.series.length&&i.series[0].data&&(i.series=i.series.map(function(g,x){return n.updateHelpers._extendSeries(g,x)})),this.updateHelpers.revertDefaultAxisMinMax()),i.xaxis&&(i=this.updateHelpers.forceXAxisUpdate(i)),i.yaxis&&(i=this.updateHelpers.forceYAxisUpdate(i)),h.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),i.theme&&(i=this.theme.updateThemeOptions(i)),this.updateHelpers._updateOptions(i,a,l,d,u)}},{key:"updateSeries",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,n,a)}},{key:"appendSeries",value:function(i){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],l=this.w.config.series.slice();return l.push(i),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(l,n,a)}},{key:"appendData",value:function(i){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=this;a.w.globals.dataChanged=!0,a.series.getPreviousPaths();for(var l=a.w.config.series.slice(),d=0;d0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(i,n)}},{key:"addEventListener",value:function(i,n){this.events.addEventListener(i,n)}},{key:"removeEventListener",value:function(i,n){this.events.removeEventListener(i,n)}},{key:"addXaxisAnnotation",value:function(i){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;a&&(l=a),l.annotations.addXaxisAnnotationExternal(i,n,l)}},{key:"addYaxisAnnotation",value:function(i){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;a&&(l=a),l.annotations.addYaxisAnnotationExternal(i,n,l)}},{key:"addPointAnnotation",value:function(i){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;a&&(l=a),l.annotations.addPointAnnotationExternal(i,n,l)}},{key:"clearAnnotations",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,n=this;i&&(n=i),n.annotations.clearAnnotations(n)}},{key:"removeAnnotation",value:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,a=this;n&&(a=n),a.annotations.removeAnnotation(a,i)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(i,n){return this.coreUtils.getSeriesTotalsXRange(i,n)}},{key:"getHighestValueInSeries",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new ls(this.ctx).getMinYMaxY(i).highestY}},{key:"getLowestValueInSeries",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new ls(this.ctx).getMinYMaxY(i).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(i,n){return this.updateHelpers.toggleDataPointSelection(i,n)}},{key:"zoomX",value:function(i,n){this.ctx.toolbar.zoomUpdateOptions(i,n)}},{key:"setLocale",value:function(i){this.localization.setCurrentLocaleValues(i)}},{key:"dataURI",value:function(i){return new os(this.ctx).dataURI(i)}},{key:"exportToCSV",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new os(this.ctx).exportToCSV(i)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var i=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){i.w.globals.resized=!0,i.w.globals.dataChanged=!1,i.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var i=this.w.config.chart.redrawOnWindowResize;typeof i=="function"&&(i=i()),i&&this._windowResize()}}],[{key:"getChartByID",value:function(i){var n=_.escapeString(i);if(Apex._chartInstances){var a=Apex._chartInstances.filter(function(l){return l.id===n})[0];return a&&a.chart}}},{key:"initOnLoad",value:function(){for(var i=document.querySelectorAll("[data-apexcharts]"),n=0;n2?d-2:0),h=2;h{const r=G.useMemo(()=>{if(e&&(e==null?void 0:e.length)>0)return(e==null?void 0:e.sort((A,L)=>new Date(A.date).getTime()-new Date(L.date).getTime())).map(A=>A.totalRevenue)},[e]),s=G.useMemo(()=>{if(e&&(e==null?void 0:e.length)>0)return e==null?void 0:e.map(A=>A.date.toString().split(" ").slice(0,3).join(" "))},[e]),[o,c]=G.useState({series:[{name:"Profit",data:[4,7,10,11,13,14,17]}]}),[p,v]=G.useState(jl);return G.useEffect(()=>{r&&r.length>0&&c(C=>{const A=C.series.findIndex(L=>L.name==="Revenue");return A>=0?{...C,series:C.series.map((L,P)=>P===A?{...L,data:r}:L)}:{...C,series:[...C.series,{name:"Revenue",data:r}]}})},[r]),G.useEffect(()=>{s&&(s==null?void 0:s.length)>0&&r&&(r==null?void 0:r.length)>0&&v({...jl,xaxis:{...jl.xaxis,categories:s},yaxis:{...jl.yaxis,max:Math.ceil(Math.max(...r)/100)*100,min:Math.floor(Math.min(...r)/100)*100}})},[s,r]),f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:col-span-8",children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 sm:flex-nowrap",children:[f.jsxs("div",{className:"flex w-full flex-wrap gap-3 sm:gap-5",children:[f.jsxs("div",{className:"flex min-w-47.5",children:[f.jsx("span",{className:"mt-1 mr-2 flex h-4 w-full max-w-4 items-center justify-center rounded-full border border-primary",children:f.jsx("span",{className:"block h-2.5 w-full max-w-2.5 rounded-full bg-primary"})}),f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"font-semibold text-primary",children:"Total Profit"}),f.jsx("p",{className:"text-sm font-medium",children:"Last 7 Days"})]})]}),f.jsxs("div",{className:"flex min-w-47.5",children:[f.jsx("span",{className:"mt-1 mr-2 flex h-4 w-full max-w-4 items-center justify-center rounded-full border border-secondary",children:f.jsx("span",{className:"block h-2.5 w-full max-w-2.5 rounded-full bg-secondary"})}),f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"font-semibold text-secondary",children:"Total Revenue"}),f.jsx("p",{className:"text-sm font-medium",children:"Last 7 Days"})]})]})]}),f.jsx("div",{className:"flex w-full max-w-45 justify-end",children:f.jsxs("div",{className:"inline-flex items-center rounded-md bg-whiter p-1.5 dark:bg-meta-4",children:[f.jsx("button",{className:"rounded bg-white py-1 px-3 text-xs font-medium text-black shadow-card hover:bg-white hover:shadow-card dark:bg-boxdark dark:text-white dark:hover:bg-boxdark",children:"Day"}),f.jsx("button",{className:"rounded py-1 px-3 text-xs font-medium text-black hover:bg-white hover:shadow-card dark:text-white dark:hover:bg-boxdark",children:"Week"}),f.jsx("button",{className:"rounded py-1 px-3 text-xs font-medium text-black hover:bg-white hover:shadow-card dark:text-white dark:hover:bg-boxdark",children:"Month"})]})})]}),f.jsx("div",{children:f.jsx("div",{id:"chartOne",className:"-ml-5",children:f.jsx(Vd,{options:p,series:o.series,type:"area",height:350})})})]})},OE=({sources:e})=>f.jsxs("div",{className:"rounded-sm border border-stroke bg-white px-5 pt-6 pb-2.5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:pb-1",children:[f.jsx("h4",{className:"mb-6 text-xl font-semibold text-black dark:text-white",children:"Top Sources"}),f.jsxs("div",{className:"flex flex-col",children:[f.jsxs("div",{className:"grid grid-cols-3 rounded-sm bg-gray-2 dark:bg-meta-4 ",children:[f.jsx("div",{className:"p-2.5 xl:p-5",children:f.jsx("h5",{className:"text-sm font-medium uppercase xsm:text-base",children:"Source"})}),f.jsx("div",{className:"p-2.5 text-center xl:p-5",children:f.jsx("h5",{className:"text-sm font-medium uppercase xsm:text-base",children:"Visitors"})}),f.jsx("div",{className:"hidden p-2.5 text-center sm:block xl:p-5",children:f.jsx("h5",{className:"text-sm font-medium uppercase xsm:text-base",children:"Sales"})})]}),e&&e.length>0?e.map(t=>f.jsxs("div",{className:"grid grid-cols-3 border-b border-stroke dark:border-strokedark",children:[f.jsx("div",{className:"flex items-center gap-3 p-2.5 xl:p-5",children:f.jsx("p",{className:"text-black dark:text-white",children:t.name})}),f.jsx("div",{className:"flex items-center justify-center p-2.5 xl:p-5",children:f.jsx("p",{className:"text-black dark:text-white",children:t.visitors})}),f.jsx("div",{className:"hidden items-center justify-center p-2.5 sm:flex xl:p-5",children:f.jsx("p",{className:"text-black dark:text-white",children:"--"})})]})):f.jsx("div",{className:"flex items-center justify-center p-2.5 xl:p-5",children:f.jsx("p",{className:"text-black dark:text-white",children:"No data to display"})})]})]}),N0=({children:e,activeCondition:t})=>{const[r,s]=G.useState(t),o=()=>{s(!r)};return f.jsx("li",{children:e(o,r)})},IE=({sidebarOpen:e,setSidebarOpen:t})=>{const r=na(),{pathname:s}=r,o=G.useRef(null),c=G.useRef(null),p=localStorage.getItem("sidebar-expanded"),[v,C]=G.useState(p===null?!1:p==="true");return G.useEffect(()=>{const A=({target:L})=>{!c.current||!o.current||!e||c.current.contains(L)||o.current.contains(L)||t(!1)};return document.addEventListener("click",A),()=>document.removeEventListener("click",A)}),G.useEffect(()=>{const A=({keyCode:L})=>{!e||L!==27||t(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)}),G.useEffect(()=>{var A,L;localStorage.setItem("sidebar-expanded",v.toString()),v?(A=document.querySelector("body"))==null||A.classList.add("sidebar-expanded"):(L=document.querySelector("body"))==null||L.classList.remove("sidebar-expanded")},[v]),f.jsxs("aside",{ref:c,className:`absolute left-0 top-0 z-9999 flex h-screen w-72.5 flex-col overflow-y-hidden bg-captn-dark-blue duration-300 ease-linear dark:bg-captn-dark-blue lg:static lg:translate-x-0 ${e?"translate-x-0":"-translate-x-full"}`,children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 px-6 py-5.5 lg:py-6.5",children:[f.jsx(sr,{to:"/",children:f.jsx("img",{src:j2,alt:"Logo",className:"h-10 w-auto -mt-1 "})}),f.jsx("button",{ref:o,onClick:()=>t(!e),"aria-controls":"sidebar","aria-expanded":e,className:"block lg:hidden text-captn-light-cream",children:f.jsx("svg",{className:"fill-current",width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M19 8.175H2.98748L9.36248 1.6875C9.69998 1.35 9.69998 0.825 9.36248 0.4875C9.02498 0.15 8.49998 0.15 8.16248 0.4875L0.399976 8.3625C0.0624756 8.7 0.0624756 9.225 0.399976 9.5625L8.16248 17.4375C8.31248 17.5875 8.53748 17.7 8.76248 17.7C8.98748 17.7 9.17498 17.625 9.36248 17.475C9.69998 17.1375 9.69998 16.6125 9.36248 16.275L3.02498 9.8625H19C19.45 9.8625 19.825 9.4875 19.825 9.0375C19.825 8.55 19.45 8.175 19 8.175Z",fill:""})})})]}),f.jsx("div",{className:"no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear",children:f.jsxs("nav",{className:"mt-5 py-4 px-4 lg:mt-9 lg:px-6",children:[f.jsxs("div",{children:[f.jsx("h3",{className:"mb-4 ml-4 text-sm font-semibold text-bodydark2",children:"MENU"}),f.jsxs("ul",{className:"mb-6 flex flex-col gap-1.5",children:[f.jsxs(sr,{to:"/admin",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s==="/"&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M6.10322 0.956299H2.53135C1.5751 0.956299 0.787598 1.7438 0.787598 2.70005V6.27192C0.787598 7.22817 1.5751 8.01567 2.53135 8.01567H6.10322C7.05947 8.01567 7.84697 7.22817 7.84697 6.27192V2.72817C7.8751 1.7438 7.0876 0.956299 6.10322 0.956299ZM6.60947 6.30005C6.60947 6.5813 6.38447 6.8063 6.10322 6.8063H2.53135C2.2501 6.8063 2.0251 6.5813 2.0251 6.30005V2.72817C2.0251 2.44692 2.2501 2.22192 2.53135 2.22192H6.10322C6.38447 2.22192 6.60947 2.44692 6.60947 2.72817V6.30005Z",fill:""}),f.jsx("path",{d:"M15.4689 0.956299H11.8971C10.9408 0.956299 10.1533 1.7438 10.1533 2.70005V6.27192C10.1533 7.22817 10.9408 8.01567 11.8971 8.01567H15.4689C16.4252 8.01567 17.2127 7.22817 17.2127 6.27192V2.72817C17.2127 1.7438 16.4252 0.956299 15.4689 0.956299ZM15.9752 6.30005C15.9752 6.5813 15.7502 6.8063 15.4689 6.8063H11.8971C11.6158 6.8063 11.3908 6.5813 11.3908 6.30005V2.72817C11.3908 2.44692 11.6158 2.22192 11.8971 2.22192H15.4689C15.7502 2.22192 15.9752 2.44692 15.9752 2.72817V6.30005Z",fill:""}),f.jsx("path",{d:"M6.10322 9.92822H2.53135C1.5751 9.92822 0.787598 10.7157 0.787598 11.672V15.2438C0.787598 16.2001 1.5751 16.9876 2.53135 16.9876H6.10322C7.05947 16.9876 7.84697 16.2001 7.84697 15.2438V11.7001C7.8751 10.7157 7.0876 9.92822 6.10322 9.92822ZM6.60947 15.272C6.60947 15.5532 6.38447 15.7782 6.10322 15.7782H2.53135C2.2501 15.7782 2.0251 15.5532 2.0251 15.272V11.7001C2.0251 11.4188 2.2501 11.1938 2.53135 11.1938H6.10322C6.38447 11.1938 6.60947 11.4188 6.60947 11.7001V15.272Z",fill:""}),f.jsx("path",{d:"M15.4689 9.92822H11.8971C10.9408 9.92822 10.1533 10.7157 10.1533 11.672V15.2438C10.1533 16.2001 10.9408 16.9876 11.8971 16.9876H15.4689C16.4252 16.9876 17.2127 16.2001 17.2127 15.2438V11.7001C17.2127 10.7157 16.4252 9.92822 15.4689 9.92822ZM15.9752 15.272C15.9752 15.5532 15.7502 15.7782 15.4689 15.7782H11.8971C11.6158 15.7782 11.3908 15.5532 11.3908 15.272V11.7001C11.3908 11.4188 11.6158 11.1938 11.8971 11.1938H15.4689C15.7502 11.1938 15.9752 11.4188 15.9752 11.7001V15.272Z",fill:""})]}),"Dashboard"]}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/users",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("users")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_130_9756)",children:f.jsx("path",{d:"M15.7501 0.55835H2.2501C1.29385 0.55835 0.506348 1.34585 0.506348 2.3021V15.8021C0.506348 16.7584 1.29385 17.574 2.27822 17.574H15.7782C16.7345 17.574 17.5501 16.7865 17.5501 15.8021V2.3021C17.522 1.34585 16.7063 0.55835 15.7501 0.55835ZM6.69385 10.599V6.4646H11.3063V10.5709H6.69385V10.599ZM11.3063 11.8646V16.3083H6.69385V11.8646H11.3063ZM1.77197 6.4646H5.45635V10.5709H1.77197V6.4646ZM12.572 6.4646H16.2563V10.5709H12.572V6.4646ZM2.2501 1.82397H15.7501C16.0313 1.82397 16.2563 2.04897 16.2563 2.33022V5.2271H1.77197V2.3021C1.77197 2.02085 1.96885 1.82397 2.2501 1.82397ZM1.77197 15.8021V11.8646H5.45635V16.3083H2.2501C1.96885 16.3083 1.77197 16.0834 1.77197 15.8021ZM15.7501 16.3083H12.572V11.8646H16.2563V15.8021C16.2563 16.0834 16.0313 16.3083 15.7501 16.3083Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9756",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Users"]})}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/settings",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("settings")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9763)",children:[f.jsx("path",{d:"M17.0721 7.30835C16.7909 6.99897 16.3971 6.83022 15.9752 6.83022H15.8909C15.7502 6.83022 15.6377 6.74585 15.6096 6.63335C15.5815 6.52085 15.5252 6.43647 15.4971 6.32397C15.4409 6.21147 15.4971 6.09897 15.5815 6.0146L15.6377 5.95835C15.9471 5.6771 16.1159 5.28335 16.1159 4.86147C16.1159 4.4396 15.9752 4.04585 15.6659 3.73647L14.569 2.61147C13.9784 1.99272 12.9659 1.9646 12.3471 2.58335L12.2627 2.6396C12.1784 2.72397 12.0377 2.7521 11.8971 2.69585C11.7846 2.6396 11.6721 2.58335 11.5315 2.55522C11.3909 2.49897 11.3065 2.38647 11.3065 2.27397V2.13335C11.3065 1.26147 10.6034 0.55835 9.73148 0.55835H8.15648C7.7346 0.55835 7.34085 0.7271 7.0596 1.00835C6.75023 1.31772 6.6096 1.71147 6.6096 2.10522V2.21772C6.6096 2.33022 6.52523 2.44272 6.41273 2.49897C6.35648 2.5271 6.32835 2.5271 6.2721 2.55522C6.1596 2.61147 6.01898 2.58335 5.9346 2.49897L5.87835 2.4146C5.5971 2.10522 5.20335 1.93647 4.78148 1.93647C4.3596 1.93647 3.96585 2.0771 3.65648 2.38647L2.53148 3.48335C1.91273 4.07397 1.8846 5.08647 2.50335 5.70522L2.5596 5.7896C2.64398 5.87397 2.6721 6.0146 2.61585 6.09897C2.5596 6.21147 2.53148 6.29585 2.47523 6.40835C2.41898 6.52085 2.3346 6.5771 2.19398 6.5771H2.1096C1.68773 6.5771 1.29398 6.71772 0.984604 7.0271C0.675229 7.30835 0.506479 7.7021 0.506479 8.12397L0.478354 9.69897C0.450229 10.5708 1.15335 11.274 2.02523 11.3021H2.1096C2.25023 11.3021 2.36273 11.3865 2.39085 11.499C2.4471 11.5833 2.50335 11.6677 2.53148 11.7802C2.5596 11.8927 2.53148 12.0052 2.4471 12.0896L2.39085 12.1458C2.08148 12.4271 1.91273 12.8208 1.91273 13.2427C1.91273 13.6646 2.05335 14.0583 2.36273 14.3677L3.4596 15.4927C4.05023 16.1115 5.06273 16.1396 5.68148 15.5208L5.76585 15.4646C5.85023 15.3802 5.99085 15.3521 6.13148 15.4083C6.24398 15.4646 6.35648 15.5208 6.4971 15.549C6.63773 15.6052 6.7221 15.7177 6.7221 15.8302V15.9427C6.7221 16.8146 7.42523 17.5177 8.2971 17.5177H9.8721C10.744 17.5177 11.4471 16.8146 11.4471 15.9427V15.8302C11.4471 15.7177 11.5315 15.6052 11.644 15.549C11.7002 15.5208 11.7284 15.5208 11.7846 15.4927C11.9252 15.4365 12.0377 15.4646 12.1221 15.549L12.1784 15.6333C12.4596 15.9427 12.8534 16.1115 13.2752 16.1115C13.6971 16.1115 14.0909 15.9708 14.4002 15.6615L15.5252 14.5646C16.144 13.974 16.1721 12.9615 15.5534 12.3427L15.4971 12.2583C15.4127 12.174 15.3846 12.0333 15.4409 11.949C15.4971 11.8365 15.5252 11.7521 15.5815 11.6396C15.6377 11.5271 15.7502 11.4708 15.8627 11.4708H15.9471H15.9752C16.819 11.4708 17.5221 10.7958 17.5502 9.92397L17.5784 8.34897C17.5221 8.01147 17.3534 7.5896 17.0721 7.30835ZM16.2284 9.9521C16.2284 10.1208 16.0877 10.2615 15.919 10.2615H15.8346H15.8065C15.1596 10.2615 14.569 10.6552 14.344 11.2177C14.3159 11.3021 14.2596 11.3865 14.2315 11.4708C13.9784 12.0333 14.0909 12.7365 14.5409 13.1865L14.5971 13.2708C14.7096 13.3833 14.7096 13.5802 14.5971 13.6927L13.4721 14.7896C13.3877 14.874 13.3034 14.874 13.2471 14.874C13.1909 14.874 13.1065 14.874 13.0221 14.7896L12.9659 14.7052C12.5159 14.2271 11.8409 14.0865 11.2221 14.3677L11.1096 14.424C10.4909 14.6771 10.0971 15.2396 10.0971 15.8865V15.999C10.0971 16.1677 9.95648 16.3083 9.78773 16.3083H8.21273C8.04398 16.3083 7.90335 16.1677 7.90335 15.999V15.8865C7.90335 15.2396 7.5096 14.649 6.89085 14.424C6.80648 14.3958 6.69398 14.3396 6.6096 14.3115C6.3846 14.199 6.1596 14.1708 5.9346 14.1708C5.54085 14.1708 5.1471 14.3115 4.83773 14.6208L4.78148 14.649C4.66898 14.7615 4.4721 14.7615 4.3596 14.649L3.26273 13.524C3.17835 13.4396 3.17835 13.3552 3.17835 13.299C3.17835 13.2427 3.17835 13.1583 3.26273 13.074L3.31898 13.0177C3.7971 12.5677 3.93773 11.8646 3.6846 11.3021C3.65648 11.2177 3.62835 11.1333 3.5721 11.049C3.3471 10.4583 2.7846 10.0365 2.13773 10.0365H2.05335C1.8846 10.0365 1.74398 9.89585 1.74398 9.7271L1.7721 8.1521C1.7721 8.0396 1.82835 7.98335 1.85648 7.9271C1.8846 7.89897 1.96898 7.84272 2.08148 7.84272H2.16585C2.81273 7.87085 3.40335 7.4771 3.65648 6.88647C3.6846 6.8021 3.74085 6.71772 3.76898 6.63335C4.0221 6.07085 3.9096 5.36772 3.4596 4.91772L3.40335 4.83335C3.29085 4.72085 3.29085 4.52397 3.40335 4.41147L4.52835 3.3146C4.61273 3.23022 4.6971 3.23022 4.75335 3.23022C4.8096 3.23022 4.89398 3.23022 4.97835 3.3146L5.0346 3.39897C5.4846 3.8771 6.1596 4.01772 6.77835 3.7646L6.89085 3.70835C7.5096 3.45522 7.90335 2.89272 7.90335 2.24585V2.13335C7.90335 2.02085 7.9596 1.9646 7.98773 1.90835C8.01585 1.8521 8.10023 1.82397 8.21273 1.82397H9.78773C9.95648 1.82397 10.0971 1.9646 10.0971 2.13335V2.24585C10.0971 2.89272 10.4909 3.48335 11.1096 3.70835C11.194 3.73647 11.3065 3.79272 11.3909 3.82085C11.9815 4.1021 12.6846 3.9896 13.1627 3.5396L13.2471 3.48335C13.3596 3.37085 13.5565 3.37085 13.669 3.48335L14.7659 4.60835C14.8502 4.69272 14.8502 4.7771 14.8502 4.83335C14.8502 4.8896 14.8221 4.97397 14.7659 5.05835L14.7096 5.1146C14.2034 5.53647 14.0627 6.2396 14.2877 6.8021C14.3159 6.88647 14.344 6.97085 14.4002 7.05522C14.6252 7.64585 15.1877 8.06772 15.8346 8.06772H15.919C16.0315 8.06772 16.0877 8.12397 16.144 8.1521C16.2002 8.18022 16.2284 8.2646 16.2284 8.3771V9.9521Z",fill:""}),f.jsx("path",{d:"M9.00029 5.22705C6.89092 5.22705 5.17529 6.94268 5.17529 9.05205C5.17529 11.1614 6.89092 12.8771 9.00029 12.8771C11.1097 12.8771 12.8253 11.1614 12.8253 9.05205C12.8253 6.94268 11.1097 5.22705 9.00029 5.22705ZM9.00029 11.6114C7.59404 11.6114 6.44092 10.4583 6.44092 9.05205C6.44092 7.6458 7.59404 6.49268 9.00029 6.49268C10.4065 6.49268 11.5597 7.6458 11.5597 9.05205C11.5597 10.4583 10.4065 11.6114 9.00029 11.6114Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9763",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Settings"]})})]})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"mb-4 ml-4 text-sm font-semibold text-bodydark2",children:"Extra Components"}),f.jsxs("ul",{className:"mb-6 flex flex-col gap-1.5",children:[f.jsx("li",{children:f.jsxs(sr,{to:"/admin/chart",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("chart")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9801)",children:[f.jsx("path",{d:"M10.8563 0.55835C10.5188 0.55835 10.2095 0.8396 10.2095 1.20522V6.83022C10.2095 7.16773 10.4907 7.4771 10.8563 7.4771H16.8751C17.0438 7.4771 17.2126 7.39272 17.3251 7.28022C17.4376 7.1396 17.4938 6.97085 17.4938 6.8021C17.2688 3.28647 14.3438 0.55835 10.8563 0.55835ZM11.4751 6.15522V1.8521C13.8095 2.13335 15.6938 3.8771 16.1438 6.18335H11.4751V6.15522Z",fill:""}),f.jsx("path",{d:"M15.3845 8.7427H9.1126V2.69582C9.1126 2.35832 8.83135 2.07707 8.49385 2.07707C8.40947 2.07707 8.3251 2.07707 8.24072 2.07707C3.96572 2.04895 0.506348 5.53645 0.506348 9.81145C0.506348 14.0864 3.99385 17.5739 8.26885 17.5739C12.5438 17.5739 16.0313 14.0864 16.0313 9.81145C16.0313 9.6427 16.0313 9.47395 16.0032 9.33332C16.0032 8.99582 15.722 8.7427 15.3845 8.7427ZM8.26885 16.3083C4.66885 16.3083 1.77197 13.4114 1.77197 9.81145C1.77197 6.3802 4.47197 3.53957 7.8751 3.3427V9.36145C7.8751 9.69895 8.15635 10.0083 8.52197 10.0083H14.7938C14.6813 13.4958 11.7845 16.3083 8.26885 16.3083Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9801",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Chart"]})}),f.jsx(N0,{activeCondition:s==="/forms"||s.includes("forms"),children:(A,L)=>f.jsxs(pe.Fragment,{children:[f.jsxs(sr,{to:"#",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${(s==="/forms"||s.includes("forms"))&&"bg-gray-700 dark:bg-meta-4"}`,onClick:P=>{P.preventDefault(),v?A():C(!0)},children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M1.43425 7.5093H2.278C2.44675 7.5093 2.55925 7.3968 2.58737 7.31243L2.98112 6.32805H5.90612L6.27175 7.31243C6.328 7.48118 6.46862 7.5093 6.58112 7.5093H7.453C7.76237 7.48118 7.87487 7.25618 7.76237 7.03118L5.428 1.4343C5.37175 1.26555 5.3155 1.23743 5.14675 1.23743H3.88112C3.76862 1.23743 3.59987 1.29368 3.57175 1.4343L1.153 7.08743C1.0405 7.2843 1.20925 7.5093 1.43425 7.5093ZM4.47175 2.98118L5.3155 5.17493H3.59987L4.47175 2.98118Z",fill:""}),f.jsx("path",{d:"M10.1249 2.5031H16.8749C17.2124 2.5031 17.5218 2.22185 17.5218 1.85623C17.5218 1.4906 17.2405 1.20935 16.8749 1.20935H10.1249C9.7874 1.20935 9.47803 1.4906 9.47803 1.85623C9.47803 2.22185 9.75928 2.5031 10.1249 2.5031Z",fill:""}),f.jsx("path",{d:"M16.8749 6.21558H10.1249C9.7874 6.21558 9.47803 6.49683 9.47803 6.86245C9.47803 7.22808 9.75928 7.50933 10.1249 7.50933H16.8749C17.2124 7.50933 17.5218 7.22808 17.5218 6.86245C17.5218 6.49683 17.2124 6.21558 16.8749 6.21558Z",fill:""}),f.jsx("path",{d:"M16.875 11.1656H1.77187C1.43438 11.1656 1.125 11.4469 1.125 11.8125C1.125 12.1781 1.40625 12.4594 1.77187 12.4594H16.875C17.2125 12.4594 17.5219 12.1781 17.5219 11.8125C17.5219 11.4469 17.2125 11.1656 16.875 11.1656Z",fill:""}),f.jsx("path",{d:"M16.875 16.1156H1.77187C1.43438 16.1156 1.125 16.3969 1.125 16.7625C1.125 17.1281 1.40625 17.4094 1.77187 17.4094H16.875C17.2125 17.4094 17.5219 17.1281 17.5219 16.7625C17.5219 16.3969 17.2125 16.1156 16.875 16.1156Z",fill:"white"})]}),"Forms",f.jsx("svg",{className:`absolute right-4 top-1/2 -translate-y-1/2 fill-current ${L&&"rotate-180"}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.41107 6.9107C4.73651 6.58527 5.26414 6.58527 5.58958 6.9107L10.0003 11.3214L14.4111 6.91071C14.7365 6.58527 15.2641 6.58527 15.5896 6.91071C15.915 7.23614 15.915 7.76378 15.5896 8.08922L10.5896 13.0892C10.2641 13.4147 9.73651 13.4147 9.41107 13.0892L4.41107 8.08922C4.08563 7.76378 4.08563 7.23614 4.41107 6.9107Z",fill:""})})]}),f.jsx("div",{className:`translate transform overflow-hidden ${!L&&"hidden"}`,children:f.jsxs("ul",{className:"mt-4 mb-5.5 flex flex-col gap-2.5 pl-6",children:[f.jsx("li",{children:f.jsx(sr,{to:"/admin/forms/form-elements",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Form Elements"})}),f.jsx("li",{children:f.jsx(sr,{to:"/admin/forms/form-layouts",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Form Layout"})})]})})]})}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/calendar",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("calendar")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsx("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M15.7499 2.9812H14.2874V2.36245C14.2874 2.02495 14.0062 1.71558 13.6405 1.71558C13.2749 1.71558 12.9937 1.99683 12.9937 2.36245V2.9812H4.97803V2.36245C4.97803 2.02495 4.69678 1.71558 4.33115 1.71558C3.96553 1.71558 3.68428 1.99683 3.68428 2.36245V2.9812H2.2499C1.29365 2.9812 0.478027 3.7687 0.478027 4.75308V14.5406C0.478027 15.4968 1.26553 16.3125 2.2499 16.3125H15.7499C16.7062 16.3125 17.5218 15.525 17.5218 14.5406V4.72495C17.5218 3.7687 16.7062 2.9812 15.7499 2.9812ZM1.77178 8.21245H4.1624V10.9968H1.77178V8.21245ZM5.42803 8.21245H8.38115V10.9968H5.42803V8.21245ZM8.38115 12.2625V15.0187H5.42803V12.2625H8.38115ZM9.64678 12.2625H12.5999V15.0187H9.64678V12.2625ZM9.64678 10.9968V8.21245H12.5999V10.9968H9.64678ZM13.8374 8.21245H16.228V10.9968H13.8374V8.21245ZM2.2499 4.24683H3.7124V4.83745C3.7124 5.17495 3.99365 5.48433 4.35928 5.48433C4.7249 5.48433 5.00615 5.20308 5.00615 4.83745V4.24683H13.0499V4.83745C13.0499 5.17495 13.3312 5.48433 13.6968 5.48433C14.0624 5.48433 14.3437 5.20308 14.3437 4.83745V4.24683H15.7499C16.0312 4.24683 16.2562 4.47183 16.2562 4.75308V6.94683H1.77178V4.75308C1.77178 4.47183 1.96865 4.24683 2.2499 4.24683ZM1.77178 14.5125V12.2343H4.1624V14.9906H2.2499C1.96865 15.0187 1.77178 14.7937 1.77178 14.5125ZM15.7499 15.0187H13.8374V12.2625H16.228V14.5406C16.2562 14.7937 16.0312 15.0187 15.7499 15.0187Z",fill:""})}),"Calendar"]})}),f.jsx(N0,{activeCondition:s==="/ui"||s.includes("ui"),children:(A,L)=>f.jsxs(pe.Fragment,{children:[f.jsxs(sr,{to:"#",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${(s==="/ui"||s.includes("ui"))&&"bg-gray-700 dark:bg-meta-4"}`,onClick:P=>{P.preventDefault(),v?A():C(!0)},children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9807)",children:[f.jsx("path",{d:"M15.7501 0.55835H2.2501C1.29385 0.55835 0.506348 1.34585 0.506348 2.3021V7.53335C0.506348 8.4896 1.29385 9.2771 2.2501 9.2771H15.7501C16.7063 9.2771 17.4938 8.4896 17.4938 7.53335V2.3021C17.4938 1.34585 16.7063 0.55835 15.7501 0.55835ZM16.2563 7.53335C16.2563 7.8146 16.0313 8.0396 15.7501 8.0396H2.2501C1.96885 8.0396 1.74385 7.8146 1.74385 7.53335V2.3021C1.74385 2.02085 1.96885 1.79585 2.2501 1.79585H15.7501C16.0313 1.79585 16.2563 2.02085 16.2563 2.3021V7.53335Z",fill:""}),f.jsx("path",{d:"M6.13135 10.9646H2.2501C1.29385 10.9646 0.506348 11.7521 0.506348 12.7083V15.8021C0.506348 16.7583 1.29385 17.5458 2.2501 17.5458H6.13135C7.0876 17.5458 7.8751 16.7583 7.8751 15.8021V12.7083C7.90322 11.7521 7.11572 10.9646 6.13135 10.9646ZM6.6376 15.8021C6.6376 16.0833 6.4126 16.3083 6.13135 16.3083H2.2501C1.96885 16.3083 1.74385 16.0833 1.74385 15.8021V12.7083C1.74385 12.4271 1.96885 12.2021 2.2501 12.2021H6.13135C6.4126 12.2021 6.6376 12.4271 6.6376 12.7083V15.8021Z",fill:""}),f.jsx("path",{d:"M15.75 10.9646H11.8688C10.9125 10.9646 10.125 11.7521 10.125 12.7083V15.8021C10.125 16.7583 10.9125 17.5458 11.8688 17.5458H15.75C16.7063 17.5458 17.4938 16.7583 17.4938 15.8021V12.7083C17.4938 11.7521 16.7063 10.9646 15.75 10.9646ZM16.2562 15.8021C16.2562 16.0833 16.0312 16.3083 15.75 16.3083H11.8688C11.5875 16.3083 11.3625 16.0833 11.3625 15.8021V12.7083C11.3625 12.4271 11.5875 12.2021 11.8688 12.2021H15.75C16.0312 12.2021 16.2562 12.4271 16.2562 12.7083V15.8021Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9807",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"UI Elements",f.jsx("svg",{className:`absolute right-4 top-1/2 -translate-y-1/2 fill-current ${L&&"rotate-180"}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.41107 6.9107C4.73651 6.58527 5.26414 6.58527 5.58958 6.9107L10.0003 11.3214L14.4111 6.91071C14.7365 6.58527 15.2641 6.58527 15.5896 6.91071C15.915 7.23614 15.915 7.76378 15.5896 8.08922L10.5896 13.0892C10.2641 13.4147 9.73651 13.4147 9.41107 13.0892L4.41107 8.08922C4.08563 7.76378 4.08563 7.23614 4.41107 6.9107Z",fill:""})})]}),f.jsx("div",{className:`translate transform overflow-hidden ${!L&&"hidden"}`,children:f.jsxs("ul",{className:"mt-4 mb-5.5 flex flex-col gap-2.5 pl-6",children:[f.jsx("li",{children:f.jsx(sr,{to:"/admin/ui/alerts",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Alerts"})}),f.jsx("li",{children:f.jsx(sr,{to:"/admin/ui/buttons",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Buttons"})})]})})]})})]})]})]})})]})},Hi=({children:e})=>{const[t,r]=G.useState(!1),{data:s}=Qr();return f.jsx("div",{className:"dark:bg-boxdark-2 dark:text-bodydark",children:f.jsxs("div",{className:"flex h-screen overflow-hidden",children:[f.jsx(IE,{sidebarOpen:t,setSidebarOpen:r}),f.jsxs("div",{className:"relative flex flex-1 flex-col overflow-y-auto overflow-x-hidden",children:[f.jsx(A2,{sidebarOpen:t,setSidebarOpen:r,user:s}),f.jsx("main",{children:f.jsx("div",{className:"mx-auto max-w-screen-2xl p-4 md:p-6 2xl:p-10",children:e})})]})]})})},zE=({user:e})=>{var c;const t=Mr();e.isAdmin||t.push("/");const{data:r,isLoading:s,error:o}=Qs(Ck);return f.jsxs(Hi,{children:[f.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 md:gap-6 xl:grid-cols-4 2xl:gap-7.5",children:[f.jsx(gE,{totalPageViews:r==null?void 0:r.dailyStats.totalViews,prevDayViewsChangePercent:r==null?void 0:r.dailyStats.prevDayViewsChangePercent}),f.jsx(xE,{dailyStats:r==null?void 0:r.dailyStats,weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx(mE,{dailyStats:r==null?void 0:r.dailyStats,isLoading:s}),f.jsx(pE,{dailyStats:r==null?void 0:r.dailyStats,isLoading:s})]}),f.jsxs("div",{className:"mt-4 grid grid-cols-12 gap-4 md:mt-6 md:gap-6 2xl:mt-7.5 2xl:gap-7.5",children:[f.jsx(ME,{weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx("div",{className:"col-span-12 xl:col-span-8",children:f.jsx(OE,{sources:(c=r==null?void 0:r.dailyStats)==null?void 0:c.sources})})]})]})},Pn=({pageName:e})=>f.jsxs("div",{className:"mb-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[f.jsx("h2",{className:"text-title-md2 font-semibold text-black dark:text-white",children:e}),f.jsx("nav",{children:f.jsxs("ol",{className:"flex items-center gap-2",children:[f.jsx("li",{children:f.jsx(rt,{to:"/",children:"Dashboard /"})}),f.jsx("li",{className:"text-primary",children:e})]})})]}),FE=()=>f.jsx("div",{className:"flex h-screen items-center justify-center bg-white",children:f.jsx("div",{className:"h-16 w-16 animate-spin rounded-full border-4 border-solid border-primary border-t-transparent"})}),DE=()=>{const[e,t]=G.useState(!1),r=G.useRef(null),s=G.useRef(null);return G.useEffect(()=>{const o=({target:c})=>{s.current&&(!e||s.current.contains(c)||r.current.contains(c)||t(!1))};return document.addEventListener("click",o),()=>document.removeEventListener("click",o)}),G.useEffect(()=>{const o=({keyCode:c})=>{!e||c!==27||t(!1)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)}),f.jsxs("div",{className:"relative",children:[f.jsx("button",{ref:r,onClick:()=>t(!e),children:f.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M2.25 11.25C3.49264 11.25 4.5 10.2426 4.5 9C4.5 7.75736 3.49264 6.75 2.25 6.75C1.00736 6.75 0 7.75736 0 9C0 10.2426 1.00736 11.25 2.25 11.25Z",fill:"#98A6AD"}),f.jsx("path",{d:"M9 11.25C10.2426 11.25 11.25 10.2426 11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25Z",fill:"#98A6AD"}),f.jsx("path",{d:"M15.75 11.25C16.9926 11.25 18 10.2426 18 9C18 7.75736 16.9926 6.75 15.75 6.75C14.5074 6.75 13.5 7.75736 13.5 9C13.5 10.2426 14.5074 11.25 15.75 11.25Z",fill:"#98A6AD"})]})}),f.jsxs("div",{ref:s,onFocus:()=>t(!0),onBlur:()=>t(!1),className:`absolute right-0 top-full z-40 w-40 space-y-1 rounded-sm border border-stroke bg-white p-1.5 shadow-default dark:border-strokedark dark:bg-boxdark ${e===!0?"block":"hidden"}`,children:[f.jsxs("button",{className:"flex w-full items-center gap-2 rounded-sm py-1.5 px-4 text-left text-sm hover:bg-gray dark:hover:bg-meta-4",children:[f.jsxs("svg",{className:"fill-current",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_62_9787)",children:f.jsx("path",{d:"M15.55 2.97499C15.55 2.77499 15.475 2.57499 15.325 2.42499C15.025 2.12499 14.725 1.82499 14.45 1.52499C14.175 1.24999 13.925 0.974987 13.65 0.724987C13.525 0.574987 13.375 0.474986 13.175 0.449986C12.95 0.424986 12.75 0.474986 12.575 0.624987L10.875 2.32499H2.02495C1.17495 2.32499 0.449951 3.02499 0.449951 3.89999V14C0.449951 14.85 1.14995 15.575 2.02495 15.575H12.15C13 15.575 13.725 14.875 13.725 14V5.12499L15.35 3.49999C15.475 3.34999 15.55 3.17499 15.55 2.97499ZM8.19995 8.99999C8.17495 9.02499 8.17495 9.02499 8.14995 9.02499L6.34995 9.62499L6.94995 7.82499C6.94995 7.79999 6.97495 7.79999 6.97495 7.77499L11.475 3.27499L12.725 4.49999L8.19995 8.99999ZM12.575 14C12.575 14.25 12.375 14.45 12.125 14.45H2.02495C1.77495 14.45 1.57495 14.25 1.57495 14V3.87499C1.57495 3.62499 1.77495 3.42499 2.02495 3.42499H9.72495L6.17495 6.99999C6.04995 7.12499 5.92495 7.29999 5.87495 7.49999L4.94995 10.3C4.87495 10.5 4.92495 10.675 5.02495 10.85C5.09995 10.95 5.24995 11.1 5.52495 11.1H5.62495L8.49995 10.15C8.67495 10.1 8.84995 9.97499 8.97495 9.84999L12.575 6.24999V14ZM13.5 3.72499L12.25 2.49999L13.025 1.72499C13.225 1.92499 14.05 2.74999 14.25 2.97499L13.5 3.72499Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_62_9787",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),"Edit"]}),f.jsxs("button",{className:"flex w-full items-center gap-2 rounded-sm py-1.5 px-4 text-left text-sm hover:bg-gray dark:hover:bg-meta-4",children:[f.jsxs("svg",{className:"fill-current",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M12.225 2.20005H10.3V1.77505C10.3 1.02505 9.70005 0.425049 8.95005 0.425049H7.02505C6.27505 0.425049 5.67505 1.02505 5.67505 1.77505V2.20005H3.75005C3.02505 2.20005 2.42505 2.80005 2.42505 3.52505V4.27505C2.42505 4.82505 2.75005 5.27505 3.22505 5.47505L3.62505 13.75C3.67505 14.775 4.52505 15.575 5.55005 15.575H10.4C11.425 15.575 12.275 14.775 12.325 13.75L12.75 5.45005C13.225 5.25005 13.55 4.77505 13.55 4.25005V3.50005C13.55 2.80005 12.95 2.20005 12.225 2.20005ZM6.82505 1.77505C6.82505 1.65005 6.92505 1.55005 7.05005 1.55005H8.97505C9.10005 1.55005 9.20005 1.65005 9.20005 1.77505V2.20005H6.85005V1.77505H6.82505ZM3.57505 3.52505C3.57505 3.42505 3.65005 3.32505 3.77505 3.32505H12.225C12.325 3.32505 12.425 3.40005 12.425 3.52505V4.27505C12.425 4.37505 12.35 4.47505 12.225 4.47505H3.77505C3.67505 4.47505 3.57505 4.40005 3.57505 4.27505V3.52505V3.52505ZM10.425 14.45H5.57505C5.15005 14.45 4.80005 14.125 4.77505 13.675L4.40005 5.57505H11.625L11.25 13.675C11.2 14.1 10.85 14.45 10.425 14.45Z",fill:""}),f.jsx("path",{d:"M8.00005 8.1001C7.70005 8.1001 7.42505 8.3501 7.42505 8.6751V11.8501C7.42505 12.1501 7.67505 12.4251 8.00005 12.4251C8.30005 12.4251 8.57505 12.1751 8.57505 11.8501V8.6751C8.57505 8.3501 8.30005 8.1001 8.00005 8.1001Z",fill:""}),f.jsx("path",{d:"M9.99994 8.60004C9.67494 8.57504 9.42494 8.80004 9.39994 9.12504L9.24994 11.325C9.22494 11.625 9.44994 11.9 9.77494 11.925C9.79994 11.925 9.79994 11.925 9.82494 11.925C10.1249 11.925 10.3749 11.7 10.3749 11.4L10.5249 9.20004C10.5249 8.87504 10.2999 8.62504 9.99994 8.60004Z",fill:""}),f.jsx("path",{d:"M5.97497 8.60004C5.67497 8.62504 5.42497 8.90004 5.44997 9.20004L5.62497 11.4C5.64997 11.7 5.89997 11.925 6.17497 11.925C6.19997 11.925 6.19997 11.925 6.22497 11.925C6.52497 11.9 6.77497 11.625 6.74997 11.325L6.57497 9.12504C6.57497 8.80004 6.29997 8.57504 5.97497 8.60004Z",fill:""})]}),"Delete"]})]})]})},HE=()=>{var M;const[e,t]=G.useState(0),[r,s]=G.useState(1),[o,c]=G.useState(void 0),[p,v]=G.useState([]),[C,A]=G.useState(void 0),{data:L,isLoading:P,error:B}=Qs(Sk,{skip:e,hasPaidFilter:C,emailContains:o,subscriptionStatus:(p==null?void 0:p.length)>0?p:void 0});return G.useEffect(()=>{s(1)},[o,p]),G.useEffect(()=>{t((r-1)*10)},[r]),f.jsx("div",{className:"flex flex-col gap-4",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsxs("div",{className:"flex-col flex items-start justify-between p-6 gap-3 w-full bg-gray-100/40 dark:bg-gray-700/50",children:[f.jsx("span",{className:"text-sm font-medium",children:"Filters:"}),f.jsxs("div",{className:"flex items-center justify-between gap-3 w-full px-2",children:[f.jsxs("div",{className:"relative flex items-center gap-3 ",children:[f.jsx("label",{htmlFor:"email-filter",className:"block text-sm text-gray-700 dark:text-white",children:"email:"}),f.jsx("input",{type:"text",id:"email-filter",placeholder:"dude@example.com",onChange:H=>{c(H.currentTarget.value)},className:"rounded border border-stroke py-2 px-5 bg-white outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"}),f.jsx("label",{htmlFor:"status-filter",className:"block text-sm ml-2 text-gray-700 dark:text-white",children:"status:"}),f.jsxs("div",{className:"flex-grow relative z-20 rounded border border-stroke pr-8 outline-none bg-white transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsx("div",{className:"flex items-center",children:p&&p.length>0?p.map((H,D)=>f.jsxs("span",{className:"z-30 flex items-center my-1 mx-2 py-1 px-2 outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary",children:[H,f.jsx("span",{onClick:Z=>{Z.stopPropagation(),v(W=>W==null?void 0:W.filter(V=>V!==H))},className:"z-30 cursor-pointer pl-2 hover:text-danger",children:f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.35355 3.35355C9.54882 3.15829 9.54882 2.84171 9.35355 2.64645C9.15829 2.45118 8.84171 2.45118 8.64645 2.64645L6 5.29289L3.35355 2.64645C3.15829 2.45118 2.84171 2.45118 2.64645 2.64645C2.45118 2.84171 2.45118 3.15829 2.64645 3.35355L5.29289 6L2.64645 8.64645C2.45118 8.84171 2.45118 9.15829 2.64645 9.35355C2.84171 9.54882 3.15829 9.54882 3.35355 9.35355L6 6.70711L8.64645 9.35355C8.84171 9.54882 9.15829 9.54882 9.35355 9.35355C9.54882 9.15829 9.54882 8.84171 9.35355 8.64645L6.70711 6L9.35355 3.35355Z",fill:"currentColor"})})})]},H)):f.jsx("span",{className:"bg-white text-gray-500 py-2 px-5 outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary",children:"Select Status Filters"})}),f.jsxs("select",{onChange:H=>{v(D=>D!=null&&D.includes(H.target.value)?D==null?void 0:D.filter(Z=>Z!==H.target.value):D&&[...D,H.target.value])},name:"status-filter",id:"status-filter",className:"absolute top-0 left-0 z-20 h-full w-full bg-white opacity-0",children:[f.jsx("option",{value:"",children:"Select filters"}),["past_due","canceled","active"].map(H=>{if(!p.includes(H))return f.jsx("option",{value:H,children:H})})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-10 -translate-y-1/2",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:"#637381"})})})})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("label",{htmlFor:"hasPaid-filter",className:"block text-sm ml-2 text-gray-700 dark:text-white",children:"hasPaid:"}),f.jsxs("select",{name:"hasPaid-filter",onChange:H=>{H.target.value==="both"?A(void 0):A(H.target.value==="true")},className:"relative z-20 w-full appearance-none rounded border border-stroke bg-white p-2 pl-4 pr-8 outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsx("option",{value:"both",children:"both"}),f.jsx("option",{value:"true",children:"true"}),f.jsx("option",{value:"false",children:"false"})]})]})]}),!P&&f.jsxs("div",{className:"max-w-60",children:[f.jsx("span",{className:"text-md mr-2 text-black dark:text-white",children:"page"}),f.jsx("input",{type:"number",value:r,min:1,max:L==null?void 0:L.totalPages,onChange:H=>{s(parseInt(H.currentTarget.value))},className:"rounded-md border-1 border-stroke bg-transparent px-4 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"}),f.jsxs("span",{className:"text-md text-black dark:text-white",children:[" ","/ ",L==null?void 0:L.totalPages," "]})]})]})]}),f.jsxs("div",{className:"grid grid-cols-12 border-t-4 border-stroke py-4.5 px-4 dark:border-strokedark md:px-6 ",children:[f.jsx("div",{className:"col-span-3 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Email / Username"})}),f.jsx("div",{className:"col-span-3 hidden items-center sm:flex",children:f.jsx("p",{className:"font-medium",children:"Last Active"})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Subscription Status"})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Stripe ID"})}),f.jsx("div",{className:"col-span-1 flex items-center",children:f.jsx("p",{className:"font-medium"})})]}),P&&f.jsx("div",{className:"-mt-40",children:f.jsx(FE,{})}),!!(L!=null&&L.users)&&((M=L==null?void 0:L.users)==null?void 0:M.length)>0&&L.users.map(H=>f.jsxs("div",{className:"grid grid-cols-12 gap-4 border-t border-stroke py-4.5 px-4 dark:border-strokedark md:px-6 ",children:[f.jsx("div",{className:"col-span-3 flex items-center",children:f.jsxs("div",{className:"flex flex-col gap-1 ",children:[f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.email}),f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.username})]})}),f.jsx("div",{className:"col-span-3 hidden items-center sm:flex",children:f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.lastActiveTimestamp.toLocaleDateString()+" "+H.lastActiveTimestamp.toLocaleTimeString()})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.subscriptionStatus})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"text-sm text-meta-3",children:H.stripeId})}),f.jsx("div",{className:"col-span-1 flex items-center",children:f.jsx(DE,{})})]},H.id))]})})},BE=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Users"}),f.jsx("div",{className:"flex flex-col gap-10",children:f.jsx(HE,{})})]});let VE={data:""},WE=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||VE,$E=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,XE=/\/\*[^]*?\*\/| +/g,E0=/\n+/g,en=(e,t)=>{let r="",s="",o="";for(let c in e){let p=e[c];c[0]=="@"?c[1]=="i"?r=c+" "+p+";":s+=c[1]=="f"?en(p,c):c+"{"+en(p,c[1]=="k"?"":t)+"}":typeof p=="object"?s+=en(p,t?t.replace(/([^,])+/g,v=>c.replace(/(^:.*)|([^,])+/g,C=>/&/.test(C)?C.replace(/&/g,v):v?v+" "+C:C)):c):p!=null&&(c=/^--/.test(c)?c:c.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=en.p?en.p(c,p):c+":"+p+";")}return r+(t&&o?t+"{"+o+"}":o)+s},yi={},J2=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+J2(e[r]);return t}return e},YE=(e,t,r,s,o)=>{let c=J2(e),p=yi[c]||(yi[c]=(C=>{let A=0,L=11;for(;A>>0;return"go"+L})(c));if(!yi[p]){let C=c!==e?e:(A=>{let L,P,B=[{}];for(;L=$E.exec(A.replace(XE,""));)L[4]?B.shift():L[3]?(P=L[3].replace(E0," ").trim(),B.unshift(B[0][P]=B[0][P]||{})):B[0][L[1]]=L[2].replace(E0," ").trim();return B[0]})(e);yi[p]=en(o?{["@keyframes "+p]:C}:C,r?"":"."+p)}let v=r&&yi.g?yi.g:null;return r&&(yi.g=yi[p]),((C,A,L,P)=>{P?A.data=A.data.replace(P,C):A.data.indexOf(C)===-1&&(A.data=L?C+A.data:A.data+C)})(yi[p],t,s,v),p},UE=(e,t,r)=>e.reduce((s,o,c)=>{let p=t[c];if(p&&p.call){let v=p(r),C=v&&v.props&&v.props.className||/^go/.test(v)&&v;p=C?"."+C:v&&typeof v=="object"?v.props?"":en(v,""):v===!1?"":v}return s+o+(p??"")},"");function Wd(e){let t=this||{},r=e.call?e(t.p):e;return YE(r.unshift?r.raw?UE(r,[].slice.call(arguments,1),t.p):r.reduce((s,o)=>Object.assign(s,o&&o.call?o(t.p):o),{}):r,WE(t.target),t.g,t.o,t.k)}let e5,zf,Ff;Wd.bind({g:1});let zi=Wd.bind({k:1});function GE(e,t,r,s){en.p=t,e5=e,zf=r,Ff=s}function Tn(e,t){let r=this||{};return function(){let s=arguments;function o(c,p){let v=Object.assign({},c),C=v.className||o.className;r.p=Object.assign({theme:zf&&zf()},v),r.o=/ *go\d+/.test(C),v.className=Wd.apply(r,s)+(C?" "+C:""),t&&(v.ref=p);let A=e;return e[0]&&(A=v.as||e,delete v.as),Ff&&A[0]&&Ff(v),e5(A,v)}return t?t(o):o}}var ZE=e=>typeof e=="function",Df=(e,t)=>ZE(e)?e(t):e,qE=(()=>{let e=0;return()=>(++e).toString()})(),QE=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),KE=20,ec=new Map,JE=1e3,L0=e=>{if(ec.has(e))return;let t=setTimeout(()=>{ec.delete(e),$d({type:4,toastId:e})},JE);ec.set(e,t)},eL=e=>{let t=ec.get(e);t&&clearTimeout(t)},Hf=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,KE)};case 1:return t.toast.id&&eL(t.toast.id),{...e,toasts:e.toasts.map(c=>c.id===t.toast.id?{...c,...t.toast}:c)};case 2:let{toast:r}=t;return e.toasts.find(c=>c.id===r.id)?Hf(e,{type:1,toast:r}):Hf(e,{type:0,toast:r});case 3:let{toastId:s}=t;return s?L0(s):e.toasts.forEach(c=>{L0(c.id)}),{...e,toasts:e.toasts.map(c=>c.id===s||s===void 0?{...c,visible:!1}:c)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(c=>c.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(c=>({...c,pauseDuration:c.pauseDuration+o}))}}},tL=[],qu={toasts:[],pausedAt:void 0},$d=e=>{qu=Hf(qu,e),tL.forEach(t=>{t(qu)})},rL=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||qE()}),Yo=e=>(t,r)=>{let s=rL(t,e,r);return $d({type:2,toast:s}),s.id},$r=(e,t)=>Yo("blank")(e,t);$r.error=Yo("error");$r.success=Yo("success");$r.loading=Yo("loading");$r.custom=Yo("custom");$r.dismiss=e=>{$d({type:3,toastId:e})};$r.remove=e=>$d({type:4,toastId:e});$r.promise=(e,t,r)=>{let s=$r.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(o=>($r.success(Df(t.success,o),{id:s,...r,...r==null?void 0:r.success}),o)).catch(o=>{$r.error(Df(t.error,o),{id:s,...r,...r==null?void 0:r.error})}),e};var iL=zi` +}`;var y=((x=i.opts.chart)===null||x===void 0?void 0:x.nonce)||i.w.config.chart.nonce;y&&i.css.setAttribute("nonce",y),u?d.prepend(i.css):h.head.appendChild(i.css)}}var b=i.create(i.w.config.series,{});if(!b)return n(i);i.mount(b).then(function(){typeof i.w.config.chart.events.mounted=="function"&&i.w.config.chart.events.mounted(i,i.w),i.events.fireEvent("mounted",[i,i.w]),n(b)}).catch(function(w){a(w)})}else a(new Error("Element not found"))})}},{key:"create",value:function(i,n){var a=this.w;new F1(this).initModules();var l=this.w.globals;if(l.noData=!1,l.animationEnded=!1,this.responsive.checkResponsiveConfig(n),a.config.xaxis.convertedCatToNumeric&&new ce(a.config).convertCatToNumericXaxis(a.config,this.ctx),this.el===null||(this.core.setupElements(),a.config.chart.type==="treemap"&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),l.svgWidth===0))return l.animationEnded=!0,null;var d=Q.checkComboSeries(i);l.comboCharts=d.comboCharts,l.comboBarCount=d.comboBarCount;var u=i.every(function(y){return y.data&&y.data.length===0});(i.length===0||u)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(i),this.theme.init(),new Ue(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),l.noData&&l.collapsedSeries.length!==l.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),l.axisCharts&&(this.core.coreCalculations(),a.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Q(this).getLargestMarkerSize(),this.dimensions.plotCoords();var h=this.core.xySettings();this.grid.createGridMask();var g=this.core.plotChartType(i,h),x=new Be(this);return x.bringForward(),a.config.dataLabels.background.enabled&&x.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:g,xyRatios:h,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var i=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,a=this,l=a.w;return new Promise(function(d,u){if(a.el===null)return u(new Error("Not enough data to display or target element not found"));(n===null||l.globals.allSeriesCollapsed)&&a.series.handleNoData(),a.grid=new Uo(a);var h,g,x=a.grid.drawGrid();if(a.annotations=new Fe(a),a.annotations.drawImageAnnos(),a.annotations.drawTextAnnos(),l.config.grid.position==="back"&&(x&&l.globals.dom.elGraphical.add(x.el),x!=null&&(h=x.elGridBorders)!==null&&h!==void 0&&h.node&&l.globals.dom.elGraphical.add(x.elGridBorders)),Array.isArray(n.elGraph))for(var y=0;y0&&l.globals.memory.methodsToExec.forEach(function(j){j.method(j.params,!1,j.context)}),l.globals.axisCharts||l.globals.noData||a.core.resizeNonAxisCharts(),d(a)})}},{key:"destroy",value:function(){var i,n;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,i=this.parentResizeHandler,(n=Zd.get(i))&&(n.disconnect(),Zd.delete(i));var a=this.w.config.chart.id;a&&Apex._chartInstances.forEach(function(l,d){l.id===_.escapeString(a)&&Apex._chartInstances.splice(d,1)}),new D1(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(i){var n=this,a=arguments.length>1&&arguments[1]!==void 0&&arguments[1],l=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],d=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],u=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],h=this.w;return h.globals.selection=void 0,i.series&&(this.series.resetSeries(!1,!0,!1),i.series.length&&i.series[0].data&&(i.series=i.series.map(function(g,x){return n.updateHelpers._extendSeries(g,x)})),this.updateHelpers.revertDefaultAxisMinMax()),i.xaxis&&(i=this.updateHelpers.forceXAxisUpdate(i)),i.yaxis&&(i=this.updateHelpers.forceYAxisUpdate(i)),h.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),i.theme&&(i=this.theme.updateThemeOptions(i)),this.updateHelpers._updateOptions(i,a,l,d,u)}},{key:"updateSeries",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,n,a)}},{key:"appendSeries",value:function(i){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],l=this.w.config.series.slice();return l.push(i),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(l,n,a)}},{key:"appendData",value:function(i){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=this;a.w.globals.dataChanged=!0,a.series.getPreviousPaths();for(var l=a.w.config.series.slice(),d=0;d0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(i,n)}},{key:"addEventListener",value:function(i,n){this.events.addEventListener(i,n)}},{key:"removeEventListener",value:function(i,n){this.events.removeEventListener(i,n)}},{key:"addXaxisAnnotation",value:function(i){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;a&&(l=a),l.annotations.addXaxisAnnotationExternal(i,n,l)}},{key:"addYaxisAnnotation",value:function(i){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;a&&(l=a),l.annotations.addYaxisAnnotationExternal(i,n,l)}},{key:"addPointAnnotation",value:function(i){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,l=this;a&&(l=a),l.annotations.addPointAnnotationExternal(i,n,l)}},{key:"clearAnnotations",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,n=this;i&&(n=i),n.annotations.clearAnnotations(n)}},{key:"removeAnnotation",value:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,a=this;n&&(a=n),a.annotations.removeAnnotation(a,i)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(i,n){return this.coreUtils.getSeriesTotalsXRange(i,n)}},{key:"getHighestValueInSeries",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new cs(this.ctx).getMinYMaxY(i).highestY}},{key:"getLowestValueInSeries",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new cs(this.ctx).getMinYMaxY(i).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(i,n){return this.updateHelpers.toggleDataPointSelection(i,n)}},{key:"zoomX",value:function(i,n){this.ctx.toolbar.zoomUpdateOptions(i,n)}},{key:"setLocale",value:function(i){this.localization.setCurrentLocaleValues(i)}},{key:"dataURI",value:function(i){return new ls(this.ctx).dataURI(i)}},{key:"exportToCSV",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new ls(this.ctx).exportToCSV(i)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var i=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){i.w.globals.resized=!0,i.w.globals.dataChanged=!1,i.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var i=this.w.config.chart.redrawOnWindowResize;typeof i=="function"&&(i=i()),i&&this._windowResize()}}],[{key:"getChartByID",value:function(i){var n=_.escapeString(i);if(Apex._chartInstances){var a=Apex._chartInstances.filter(function(l){return l.id===n})[0];return a&&a.chart}}},{key:"initOnLoad",value:function(){for(var i=document.querySelectorAll("[data-apexcharts]"),n=0;n2?d-2:0),h=2;h{const r=G.useMemo(()=>{if(e&&(e==null?void 0:e.length)>0)return(e==null?void 0:e.sort((A,E)=>new Date(A.date).getTime()-new Date(E.date).getTime())).map(A=>A.totalRevenue)},[e]),s=G.useMemo(()=>{if(e&&(e==null?void 0:e.length)>0)return e==null?void 0:e.map(A=>A.date.toString().split(" ").slice(0,3).join(" "))},[e]),[o,c]=G.useState({series:[{name:"Profit",data:[4,7,10,11,13,14,17]}]}),[p,v]=G.useState(jl);return G.useEffect(()=>{r&&r.length>0&&c(C=>{const A=C.series.findIndex(E=>E.name==="Revenue");return A>=0?{...C,series:C.series.map((E,P)=>P===A?{...E,data:r}:E)}:{...C,series:[...C.series,{name:"Revenue",data:r}]}})},[r]),G.useEffect(()=>{s&&(s==null?void 0:s.length)>0&&r&&(r==null?void 0:r.length)>0&&v({...jl,xaxis:{...jl.xaxis,categories:s},yaxis:{...jl.yaxis,max:Math.ceil(Math.max(...r)/100)*100,min:Math.floor(Math.min(...r)/100)*100}})},[s,r]),f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:col-span-8",children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 sm:flex-nowrap",children:[f.jsxs("div",{className:"flex w-full flex-wrap gap-3 sm:gap-5",children:[f.jsxs("div",{className:"flex min-w-47.5",children:[f.jsx("span",{className:"mt-1 mr-2 flex h-4 w-full max-w-4 items-center justify-center rounded-full border border-primary",children:f.jsx("span",{className:"block h-2.5 w-full max-w-2.5 rounded-full bg-primary"})}),f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"font-semibold text-primary",children:"Total Profit"}),f.jsx("p",{className:"text-sm font-medium",children:"Last 7 Days"})]})]}),f.jsxs("div",{className:"flex min-w-47.5",children:[f.jsx("span",{className:"mt-1 mr-2 flex h-4 w-full max-w-4 items-center justify-center rounded-full border border-secondary",children:f.jsx("span",{className:"block h-2.5 w-full max-w-2.5 rounded-full bg-secondary"})}),f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"font-semibold text-secondary",children:"Total Revenue"}),f.jsx("p",{className:"text-sm font-medium",children:"Last 7 Days"})]})]})]}),f.jsx("div",{className:"flex w-full max-w-45 justify-end",children:f.jsxs("div",{className:"inline-flex items-center rounded-md bg-whiter p-1.5 dark:bg-meta-4",children:[f.jsx("button",{className:"rounded bg-white py-1 px-3 text-xs font-medium text-black shadow-card hover:bg-white hover:shadow-card dark:bg-boxdark dark:text-white dark:hover:bg-boxdark",children:"Day"}),f.jsx("button",{className:"rounded py-1 px-3 text-xs font-medium text-black hover:bg-white hover:shadow-card dark:text-white dark:hover:bg-boxdark",children:"Week"}),f.jsx("button",{className:"rounded py-1 px-3 text-xs font-medium text-black hover:bg-white hover:shadow-card dark:text-white dark:hover:bg-boxdark",children:"Month"})]})})]}),f.jsx("div",{children:f.jsx("div",{id:"chartOne",className:"-ml-5",children:f.jsx(Vd,{options:p,series:o.series,type:"area",height:350})})})]})},IE=({sources:e})=>f.jsxs("div",{className:"rounded-sm border border-stroke bg-white px-5 pt-6 pb-2.5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:pb-1",children:[f.jsx("h4",{className:"mb-6 text-xl font-semibold text-black dark:text-white",children:"Top Sources"}),f.jsxs("div",{className:"flex flex-col",children:[f.jsxs("div",{className:"grid grid-cols-3 rounded-sm bg-gray-2 dark:bg-meta-4 ",children:[f.jsx("div",{className:"p-2.5 xl:p-5",children:f.jsx("h5",{className:"text-sm font-medium uppercase xsm:text-base",children:"Source"})}),f.jsx("div",{className:"p-2.5 text-center xl:p-5",children:f.jsx("h5",{className:"text-sm font-medium uppercase xsm:text-base",children:"Visitors"})}),f.jsx("div",{className:"hidden p-2.5 text-center sm:block xl:p-5",children:f.jsx("h5",{className:"text-sm font-medium uppercase xsm:text-base",children:"Sales"})})]}),e&&e.length>0?e.map(t=>f.jsxs("div",{className:"grid grid-cols-3 border-b border-stroke dark:border-strokedark",children:[f.jsx("div",{className:"flex items-center gap-3 p-2.5 xl:p-5",children:f.jsx("p",{className:"text-black dark:text-white",children:t.name})}),f.jsx("div",{className:"flex items-center justify-center p-2.5 xl:p-5",children:f.jsx("p",{className:"text-black dark:text-white",children:t.visitors})}),f.jsx("div",{className:"hidden items-center justify-center p-2.5 sm:flex xl:p-5",children:f.jsx("p",{className:"text-black dark:text-white",children:"--"})})]})):f.jsx("div",{className:"flex items-center justify-center p-2.5 xl:p-5",children:f.jsx("p",{className:"text-black dark:text-white",children:"No data to display"})})]})]}),N0=({children:e,activeCondition:t})=>{const[r,s]=G.useState(t),o=()=>{s(!r)};return f.jsx("li",{children:e(o,r)})},zE=({sidebarOpen:e,setSidebarOpen:t})=>{const r=na(),{pathname:s}=r,o=G.useRef(null),c=G.useRef(null),p=localStorage.getItem("sidebar-expanded"),[v,C]=G.useState(p===null?!1:p==="true");return G.useEffect(()=>{const A=({target:E})=>{!c.current||!o.current||!e||c.current.contains(E)||o.current.contains(E)||t(!1)};return document.addEventListener("click",A),()=>document.removeEventListener("click",A)}),G.useEffect(()=>{const A=({keyCode:E})=>{!e||E!==27||t(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)}),G.useEffect(()=>{var A,E;localStorage.setItem("sidebar-expanded",v.toString()),v?(A=document.querySelector("body"))==null||A.classList.add("sidebar-expanded"):(E=document.querySelector("body"))==null||E.classList.remove("sidebar-expanded")},[v]),f.jsxs("aside",{ref:c,className:`absolute left-0 top-0 z-9999 flex h-screen w-72.5 flex-col overflow-y-hidden bg-captn-dark-blue duration-300 ease-linear dark:bg-captn-dark-blue lg:static lg:translate-x-0 ${e?"translate-x-0":"-translate-x-full"}`,children:[f.jsxs("div",{className:"flex items-center justify-between gap-2 px-6 py-5.5 lg:py-6.5",children:[f.jsx(sr,{to:"/",children:f.jsx("img",{src:j2,alt:"Logo",className:"h-10 w-auto -mt-1 "})}),f.jsx("button",{ref:o,onClick:()=>t(!e),"aria-controls":"sidebar","aria-expanded":e,className:"block lg:hidden text-captn-light-cream",children:f.jsx("svg",{className:"fill-current",width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M19 8.175H2.98748L9.36248 1.6875C9.69998 1.35 9.69998 0.825 9.36248 0.4875C9.02498 0.15 8.49998 0.15 8.16248 0.4875L0.399976 8.3625C0.0624756 8.7 0.0624756 9.225 0.399976 9.5625L8.16248 17.4375C8.31248 17.5875 8.53748 17.7 8.76248 17.7C8.98748 17.7 9.17498 17.625 9.36248 17.475C9.69998 17.1375 9.69998 16.6125 9.36248 16.275L3.02498 9.8625H19C19.45 9.8625 19.825 9.4875 19.825 9.0375C19.825 8.55 19.45 8.175 19 8.175Z",fill:""})})})]}),f.jsx("div",{className:"no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear",children:f.jsxs("nav",{className:"mt-5 py-4 px-4 lg:mt-9 lg:px-6",children:[f.jsxs("div",{children:[f.jsx("h3",{className:"mb-4 ml-4 text-sm font-semibold text-bodydark2",children:"MENU"}),f.jsxs("ul",{className:"mb-6 flex flex-col gap-1.5",children:[f.jsxs(sr,{to:"/admin",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s==="/"&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M6.10322 0.956299H2.53135C1.5751 0.956299 0.787598 1.7438 0.787598 2.70005V6.27192C0.787598 7.22817 1.5751 8.01567 2.53135 8.01567H6.10322C7.05947 8.01567 7.84697 7.22817 7.84697 6.27192V2.72817C7.8751 1.7438 7.0876 0.956299 6.10322 0.956299ZM6.60947 6.30005C6.60947 6.5813 6.38447 6.8063 6.10322 6.8063H2.53135C2.2501 6.8063 2.0251 6.5813 2.0251 6.30005V2.72817C2.0251 2.44692 2.2501 2.22192 2.53135 2.22192H6.10322C6.38447 2.22192 6.60947 2.44692 6.60947 2.72817V6.30005Z",fill:""}),f.jsx("path",{d:"M15.4689 0.956299H11.8971C10.9408 0.956299 10.1533 1.7438 10.1533 2.70005V6.27192C10.1533 7.22817 10.9408 8.01567 11.8971 8.01567H15.4689C16.4252 8.01567 17.2127 7.22817 17.2127 6.27192V2.72817C17.2127 1.7438 16.4252 0.956299 15.4689 0.956299ZM15.9752 6.30005C15.9752 6.5813 15.7502 6.8063 15.4689 6.8063H11.8971C11.6158 6.8063 11.3908 6.5813 11.3908 6.30005V2.72817C11.3908 2.44692 11.6158 2.22192 11.8971 2.22192H15.4689C15.7502 2.22192 15.9752 2.44692 15.9752 2.72817V6.30005Z",fill:""}),f.jsx("path",{d:"M6.10322 9.92822H2.53135C1.5751 9.92822 0.787598 10.7157 0.787598 11.672V15.2438C0.787598 16.2001 1.5751 16.9876 2.53135 16.9876H6.10322C7.05947 16.9876 7.84697 16.2001 7.84697 15.2438V11.7001C7.8751 10.7157 7.0876 9.92822 6.10322 9.92822ZM6.60947 15.272C6.60947 15.5532 6.38447 15.7782 6.10322 15.7782H2.53135C2.2501 15.7782 2.0251 15.5532 2.0251 15.272V11.7001C2.0251 11.4188 2.2501 11.1938 2.53135 11.1938H6.10322C6.38447 11.1938 6.60947 11.4188 6.60947 11.7001V15.272Z",fill:""}),f.jsx("path",{d:"M15.4689 9.92822H11.8971C10.9408 9.92822 10.1533 10.7157 10.1533 11.672V15.2438C10.1533 16.2001 10.9408 16.9876 11.8971 16.9876H15.4689C16.4252 16.9876 17.2127 16.2001 17.2127 15.2438V11.7001C17.2127 10.7157 16.4252 9.92822 15.4689 9.92822ZM15.9752 15.272C15.9752 15.5532 15.7502 15.7782 15.4689 15.7782H11.8971C11.6158 15.7782 11.3908 15.5532 11.3908 15.272V11.7001C11.3908 11.4188 11.6158 11.1938 11.8971 11.1938H15.4689C15.7502 11.1938 15.9752 11.4188 15.9752 11.7001V15.272Z",fill:""})]}),"Dashboard"]}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/users",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("users")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_130_9756)",children:f.jsx("path",{d:"M15.7501 0.55835H2.2501C1.29385 0.55835 0.506348 1.34585 0.506348 2.3021V15.8021C0.506348 16.7584 1.29385 17.574 2.27822 17.574H15.7782C16.7345 17.574 17.5501 16.7865 17.5501 15.8021V2.3021C17.522 1.34585 16.7063 0.55835 15.7501 0.55835ZM6.69385 10.599V6.4646H11.3063V10.5709H6.69385V10.599ZM11.3063 11.8646V16.3083H6.69385V11.8646H11.3063ZM1.77197 6.4646H5.45635V10.5709H1.77197V6.4646ZM12.572 6.4646H16.2563V10.5709H12.572V6.4646ZM2.2501 1.82397H15.7501C16.0313 1.82397 16.2563 2.04897 16.2563 2.33022V5.2271H1.77197V2.3021C1.77197 2.02085 1.96885 1.82397 2.2501 1.82397ZM1.77197 15.8021V11.8646H5.45635V16.3083H2.2501C1.96885 16.3083 1.77197 16.0834 1.77197 15.8021ZM15.7501 16.3083H12.572V11.8646H16.2563V15.8021C16.2563 16.0834 16.0313 16.3083 15.7501 16.3083Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9756",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Users"]})}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/settings",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("settings")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9763)",children:[f.jsx("path",{d:"M17.0721 7.30835C16.7909 6.99897 16.3971 6.83022 15.9752 6.83022H15.8909C15.7502 6.83022 15.6377 6.74585 15.6096 6.63335C15.5815 6.52085 15.5252 6.43647 15.4971 6.32397C15.4409 6.21147 15.4971 6.09897 15.5815 6.0146L15.6377 5.95835C15.9471 5.6771 16.1159 5.28335 16.1159 4.86147C16.1159 4.4396 15.9752 4.04585 15.6659 3.73647L14.569 2.61147C13.9784 1.99272 12.9659 1.9646 12.3471 2.58335L12.2627 2.6396C12.1784 2.72397 12.0377 2.7521 11.8971 2.69585C11.7846 2.6396 11.6721 2.58335 11.5315 2.55522C11.3909 2.49897 11.3065 2.38647 11.3065 2.27397V2.13335C11.3065 1.26147 10.6034 0.55835 9.73148 0.55835H8.15648C7.7346 0.55835 7.34085 0.7271 7.0596 1.00835C6.75023 1.31772 6.6096 1.71147 6.6096 2.10522V2.21772C6.6096 2.33022 6.52523 2.44272 6.41273 2.49897C6.35648 2.5271 6.32835 2.5271 6.2721 2.55522C6.1596 2.61147 6.01898 2.58335 5.9346 2.49897L5.87835 2.4146C5.5971 2.10522 5.20335 1.93647 4.78148 1.93647C4.3596 1.93647 3.96585 2.0771 3.65648 2.38647L2.53148 3.48335C1.91273 4.07397 1.8846 5.08647 2.50335 5.70522L2.5596 5.7896C2.64398 5.87397 2.6721 6.0146 2.61585 6.09897C2.5596 6.21147 2.53148 6.29585 2.47523 6.40835C2.41898 6.52085 2.3346 6.5771 2.19398 6.5771H2.1096C1.68773 6.5771 1.29398 6.71772 0.984604 7.0271C0.675229 7.30835 0.506479 7.7021 0.506479 8.12397L0.478354 9.69897C0.450229 10.5708 1.15335 11.274 2.02523 11.3021H2.1096C2.25023 11.3021 2.36273 11.3865 2.39085 11.499C2.4471 11.5833 2.50335 11.6677 2.53148 11.7802C2.5596 11.8927 2.53148 12.0052 2.4471 12.0896L2.39085 12.1458C2.08148 12.4271 1.91273 12.8208 1.91273 13.2427C1.91273 13.6646 2.05335 14.0583 2.36273 14.3677L3.4596 15.4927C4.05023 16.1115 5.06273 16.1396 5.68148 15.5208L5.76585 15.4646C5.85023 15.3802 5.99085 15.3521 6.13148 15.4083C6.24398 15.4646 6.35648 15.5208 6.4971 15.549C6.63773 15.6052 6.7221 15.7177 6.7221 15.8302V15.9427C6.7221 16.8146 7.42523 17.5177 8.2971 17.5177H9.8721C10.744 17.5177 11.4471 16.8146 11.4471 15.9427V15.8302C11.4471 15.7177 11.5315 15.6052 11.644 15.549C11.7002 15.5208 11.7284 15.5208 11.7846 15.4927C11.9252 15.4365 12.0377 15.4646 12.1221 15.549L12.1784 15.6333C12.4596 15.9427 12.8534 16.1115 13.2752 16.1115C13.6971 16.1115 14.0909 15.9708 14.4002 15.6615L15.5252 14.5646C16.144 13.974 16.1721 12.9615 15.5534 12.3427L15.4971 12.2583C15.4127 12.174 15.3846 12.0333 15.4409 11.949C15.4971 11.8365 15.5252 11.7521 15.5815 11.6396C15.6377 11.5271 15.7502 11.4708 15.8627 11.4708H15.9471H15.9752C16.819 11.4708 17.5221 10.7958 17.5502 9.92397L17.5784 8.34897C17.5221 8.01147 17.3534 7.5896 17.0721 7.30835ZM16.2284 9.9521C16.2284 10.1208 16.0877 10.2615 15.919 10.2615H15.8346H15.8065C15.1596 10.2615 14.569 10.6552 14.344 11.2177C14.3159 11.3021 14.2596 11.3865 14.2315 11.4708C13.9784 12.0333 14.0909 12.7365 14.5409 13.1865L14.5971 13.2708C14.7096 13.3833 14.7096 13.5802 14.5971 13.6927L13.4721 14.7896C13.3877 14.874 13.3034 14.874 13.2471 14.874C13.1909 14.874 13.1065 14.874 13.0221 14.7896L12.9659 14.7052C12.5159 14.2271 11.8409 14.0865 11.2221 14.3677L11.1096 14.424C10.4909 14.6771 10.0971 15.2396 10.0971 15.8865V15.999C10.0971 16.1677 9.95648 16.3083 9.78773 16.3083H8.21273C8.04398 16.3083 7.90335 16.1677 7.90335 15.999V15.8865C7.90335 15.2396 7.5096 14.649 6.89085 14.424C6.80648 14.3958 6.69398 14.3396 6.6096 14.3115C6.3846 14.199 6.1596 14.1708 5.9346 14.1708C5.54085 14.1708 5.1471 14.3115 4.83773 14.6208L4.78148 14.649C4.66898 14.7615 4.4721 14.7615 4.3596 14.649L3.26273 13.524C3.17835 13.4396 3.17835 13.3552 3.17835 13.299C3.17835 13.2427 3.17835 13.1583 3.26273 13.074L3.31898 13.0177C3.7971 12.5677 3.93773 11.8646 3.6846 11.3021C3.65648 11.2177 3.62835 11.1333 3.5721 11.049C3.3471 10.4583 2.7846 10.0365 2.13773 10.0365H2.05335C1.8846 10.0365 1.74398 9.89585 1.74398 9.7271L1.7721 8.1521C1.7721 8.0396 1.82835 7.98335 1.85648 7.9271C1.8846 7.89897 1.96898 7.84272 2.08148 7.84272H2.16585C2.81273 7.87085 3.40335 7.4771 3.65648 6.88647C3.6846 6.8021 3.74085 6.71772 3.76898 6.63335C4.0221 6.07085 3.9096 5.36772 3.4596 4.91772L3.40335 4.83335C3.29085 4.72085 3.29085 4.52397 3.40335 4.41147L4.52835 3.3146C4.61273 3.23022 4.6971 3.23022 4.75335 3.23022C4.8096 3.23022 4.89398 3.23022 4.97835 3.3146L5.0346 3.39897C5.4846 3.8771 6.1596 4.01772 6.77835 3.7646L6.89085 3.70835C7.5096 3.45522 7.90335 2.89272 7.90335 2.24585V2.13335C7.90335 2.02085 7.9596 1.9646 7.98773 1.90835C8.01585 1.8521 8.10023 1.82397 8.21273 1.82397H9.78773C9.95648 1.82397 10.0971 1.9646 10.0971 2.13335V2.24585C10.0971 2.89272 10.4909 3.48335 11.1096 3.70835C11.194 3.73647 11.3065 3.79272 11.3909 3.82085C11.9815 4.1021 12.6846 3.9896 13.1627 3.5396L13.2471 3.48335C13.3596 3.37085 13.5565 3.37085 13.669 3.48335L14.7659 4.60835C14.8502 4.69272 14.8502 4.7771 14.8502 4.83335C14.8502 4.8896 14.8221 4.97397 14.7659 5.05835L14.7096 5.1146C14.2034 5.53647 14.0627 6.2396 14.2877 6.8021C14.3159 6.88647 14.344 6.97085 14.4002 7.05522C14.6252 7.64585 15.1877 8.06772 15.8346 8.06772H15.919C16.0315 8.06772 16.0877 8.12397 16.144 8.1521C16.2002 8.18022 16.2284 8.2646 16.2284 8.3771V9.9521Z",fill:""}),f.jsx("path",{d:"M9.00029 5.22705C6.89092 5.22705 5.17529 6.94268 5.17529 9.05205C5.17529 11.1614 6.89092 12.8771 9.00029 12.8771C11.1097 12.8771 12.8253 11.1614 12.8253 9.05205C12.8253 6.94268 11.1097 5.22705 9.00029 5.22705ZM9.00029 11.6114C7.59404 11.6114 6.44092 10.4583 6.44092 9.05205C6.44092 7.6458 7.59404 6.49268 9.00029 6.49268C10.4065 6.49268 11.5597 7.6458 11.5597 9.05205C11.5597 10.4583 10.4065 11.6114 9.00029 11.6114Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9763",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Settings"]})})]})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"mb-4 ml-4 text-sm font-semibold text-bodydark2",children:"Extra Components"}),f.jsxs("ul",{className:"mb-6 flex flex-col gap-1.5",children:[f.jsx("li",{children:f.jsxs(sr,{to:"/admin/chart",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("chart")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9801)",children:[f.jsx("path",{d:"M10.8563 0.55835C10.5188 0.55835 10.2095 0.8396 10.2095 1.20522V6.83022C10.2095 7.16773 10.4907 7.4771 10.8563 7.4771H16.8751C17.0438 7.4771 17.2126 7.39272 17.3251 7.28022C17.4376 7.1396 17.4938 6.97085 17.4938 6.8021C17.2688 3.28647 14.3438 0.55835 10.8563 0.55835ZM11.4751 6.15522V1.8521C13.8095 2.13335 15.6938 3.8771 16.1438 6.18335H11.4751V6.15522Z",fill:""}),f.jsx("path",{d:"M15.3845 8.7427H9.1126V2.69582C9.1126 2.35832 8.83135 2.07707 8.49385 2.07707C8.40947 2.07707 8.3251 2.07707 8.24072 2.07707C3.96572 2.04895 0.506348 5.53645 0.506348 9.81145C0.506348 14.0864 3.99385 17.5739 8.26885 17.5739C12.5438 17.5739 16.0313 14.0864 16.0313 9.81145C16.0313 9.6427 16.0313 9.47395 16.0032 9.33332C16.0032 8.99582 15.722 8.7427 15.3845 8.7427ZM8.26885 16.3083C4.66885 16.3083 1.77197 13.4114 1.77197 9.81145C1.77197 6.3802 4.47197 3.53957 7.8751 3.3427V9.36145C7.8751 9.69895 8.15635 10.0083 8.52197 10.0083H14.7938C14.6813 13.4958 11.7845 16.3083 8.26885 16.3083Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9801",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Chart"]})}),f.jsx(N0,{activeCondition:s==="/forms"||s.includes("forms"),children:(A,E)=>f.jsxs(ge.Fragment,{children:[f.jsxs(sr,{to:"#",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${(s==="/forms"||s.includes("forms"))&&"bg-gray-700 dark:bg-meta-4"}`,onClick:P=>{P.preventDefault(),v?A():C(!0)},children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M1.43425 7.5093H2.278C2.44675 7.5093 2.55925 7.3968 2.58737 7.31243L2.98112 6.32805H5.90612L6.27175 7.31243C6.328 7.48118 6.46862 7.5093 6.58112 7.5093H7.453C7.76237 7.48118 7.87487 7.25618 7.76237 7.03118L5.428 1.4343C5.37175 1.26555 5.3155 1.23743 5.14675 1.23743H3.88112C3.76862 1.23743 3.59987 1.29368 3.57175 1.4343L1.153 7.08743C1.0405 7.2843 1.20925 7.5093 1.43425 7.5093ZM4.47175 2.98118L5.3155 5.17493H3.59987L4.47175 2.98118Z",fill:""}),f.jsx("path",{d:"M10.1249 2.5031H16.8749C17.2124 2.5031 17.5218 2.22185 17.5218 1.85623C17.5218 1.4906 17.2405 1.20935 16.8749 1.20935H10.1249C9.7874 1.20935 9.47803 1.4906 9.47803 1.85623C9.47803 2.22185 9.75928 2.5031 10.1249 2.5031Z",fill:""}),f.jsx("path",{d:"M16.8749 6.21558H10.1249C9.7874 6.21558 9.47803 6.49683 9.47803 6.86245C9.47803 7.22808 9.75928 7.50933 10.1249 7.50933H16.8749C17.2124 7.50933 17.5218 7.22808 17.5218 6.86245C17.5218 6.49683 17.2124 6.21558 16.8749 6.21558Z",fill:""}),f.jsx("path",{d:"M16.875 11.1656H1.77187C1.43438 11.1656 1.125 11.4469 1.125 11.8125C1.125 12.1781 1.40625 12.4594 1.77187 12.4594H16.875C17.2125 12.4594 17.5219 12.1781 17.5219 11.8125C17.5219 11.4469 17.2125 11.1656 16.875 11.1656Z",fill:""}),f.jsx("path",{d:"M16.875 16.1156H1.77187C1.43438 16.1156 1.125 16.3969 1.125 16.7625C1.125 17.1281 1.40625 17.4094 1.77187 17.4094H16.875C17.2125 17.4094 17.5219 17.1281 17.5219 16.7625C17.5219 16.3969 17.2125 16.1156 16.875 16.1156Z",fill:"white"})]}),"Forms",f.jsx("svg",{className:`absolute right-4 top-1/2 -translate-y-1/2 fill-current ${E&&"rotate-180"}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.41107 6.9107C4.73651 6.58527 5.26414 6.58527 5.58958 6.9107L10.0003 11.3214L14.4111 6.91071C14.7365 6.58527 15.2641 6.58527 15.5896 6.91071C15.915 7.23614 15.915 7.76378 15.5896 8.08922L10.5896 13.0892C10.2641 13.4147 9.73651 13.4147 9.41107 13.0892L4.41107 8.08922C4.08563 7.76378 4.08563 7.23614 4.41107 6.9107Z",fill:""})})]}),f.jsx("div",{className:`translate transform overflow-hidden ${!E&&"hidden"}`,children:f.jsxs("ul",{className:"mt-4 mb-5.5 flex flex-col gap-2.5 pl-6",children:[f.jsx("li",{children:f.jsx(sr,{to:"/admin/forms/form-elements",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Form Elements"})}),f.jsx("li",{children:f.jsx(sr,{to:"/admin/forms/form-layouts",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Form Layout"})})]})})]})}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/calendar",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("calendar")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsx("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M15.7499 2.9812H14.2874V2.36245C14.2874 2.02495 14.0062 1.71558 13.6405 1.71558C13.2749 1.71558 12.9937 1.99683 12.9937 2.36245V2.9812H4.97803V2.36245C4.97803 2.02495 4.69678 1.71558 4.33115 1.71558C3.96553 1.71558 3.68428 1.99683 3.68428 2.36245V2.9812H2.2499C1.29365 2.9812 0.478027 3.7687 0.478027 4.75308V14.5406C0.478027 15.4968 1.26553 16.3125 2.2499 16.3125H15.7499C16.7062 16.3125 17.5218 15.525 17.5218 14.5406V4.72495C17.5218 3.7687 16.7062 2.9812 15.7499 2.9812ZM1.77178 8.21245H4.1624V10.9968H1.77178V8.21245ZM5.42803 8.21245H8.38115V10.9968H5.42803V8.21245ZM8.38115 12.2625V15.0187H5.42803V12.2625H8.38115ZM9.64678 12.2625H12.5999V15.0187H9.64678V12.2625ZM9.64678 10.9968V8.21245H12.5999V10.9968H9.64678ZM13.8374 8.21245H16.228V10.9968H13.8374V8.21245ZM2.2499 4.24683H3.7124V4.83745C3.7124 5.17495 3.99365 5.48433 4.35928 5.48433C4.7249 5.48433 5.00615 5.20308 5.00615 4.83745V4.24683H13.0499V4.83745C13.0499 5.17495 13.3312 5.48433 13.6968 5.48433C14.0624 5.48433 14.3437 5.20308 14.3437 4.83745V4.24683H15.7499C16.0312 4.24683 16.2562 4.47183 16.2562 4.75308V6.94683H1.77178V4.75308C1.77178 4.47183 1.96865 4.24683 2.2499 4.24683ZM1.77178 14.5125V12.2343H4.1624V14.9906H2.2499C1.96865 15.0187 1.77178 14.7937 1.77178 14.5125ZM15.7499 15.0187H13.8374V12.2625H16.228V14.5406C16.2562 14.7937 16.0312 15.0187 15.7499 15.0187Z",fill:""})}),"Calendar"]})}),f.jsx(N0,{activeCondition:s==="/ui"||s.includes("ui"),children:(A,E)=>f.jsxs(ge.Fragment,{children:[f.jsxs(sr,{to:"#",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${(s==="/ui"||s.includes("ui"))&&"bg-gray-700 dark:bg-meta-4"}`,onClick:P=>{P.preventDefault(),v?A():C(!0)},children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9807)",children:[f.jsx("path",{d:"M15.7501 0.55835H2.2501C1.29385 0.55835 0.506348 1.34585 0.506348 2.3021V7.53335C0.506348 8.4896 1.29385 9.2771 2.2501 9.2771H15.7501C16.7063 9.2771 17.4938 8.4896 17.4938 7.53335V2.3021C17.4938 1.34585 16.7063 0.55835 15.7501 0.55835ZM16.2563 7.53335C16.2563 7.8146 16.0313 8.0396 15.7501 8.0396H2.2501C1.96885 8.0396 1.74385 7.8146 1.74385 7.53335V2.3021C1.74385 2.02085 1.96885 1.79585 2.2501 1.79585H15.7501C16.0313 1.79585 16.2563 2.02085 16.2563 2.3021V7.53335Z",fill:""}),f.jsx("path",{d:"M6.13135 10.9646H2.2501C1.29385 10.9646 0.506348 11.7521 0.506348 12.7083V15.8021C0.506348 16.7583 1.29385 17.5458 2.2501 17.5458H6.13135C7.0876 17.5458 7.8751 16.7583 7.8751 15.8021V12.7083C7.90322 11.7521 7.11572 10.9646 6.13135 10.9646ZM6.6376 15.8021C6.6376 16.0833 6.4126 16.3083 6.13135 16.3083H2.2501C1.96885 16.3083 1.74385 16.0833 1.74385 15.8021V12.7083C1.74385 12.4271 1.96885 12.2021 2.2501 12.2021H6.13135C6.4126 12.2021 6.6376 12.4271 6.6376 12.7083V15.8021Z",fill:""}),f.jsx("path",{d:"M15.75 10.9646H11.8688C10.9125 10.9646 10.125 11.7521 10.125 12.7083V15.8021C10.125 16.7583 10.9125 17.5458 11.8688 17.5458H15.75C16.7063 17.5458 17.4938 16.7583 17.4938 15.8021V12.7083C17.4938 11.7521 16.7063 10.9646 15.75 10.9646ZM16.2562 15.8021C16.2562 16.0833 16.0312 16.3083 15.75 16.3083H11.8688C11.5875 16.3083 11.3625 16.0833 11.3625 15.8021V12.7083C11.3625 12.4271 11.5875 12.2021 11.8688 12.2021H15.75C16.0312 12.2021 16.2562 12.4271 16.2562 12.7083V15.8021Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9807",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"UI Elements",f.jsx("svg",{className:`absolute right-4 top-1/2 -translate-y-1/2 fill-current ${E&&"rotate-180"}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.41107 6.9107C4.73651 6.58527 5.26414 6.58527 5.58958 6.9107L10.0003 11.3214L14.4111 6.91071C14.7365 6.58527 15.2641 6.58527 15.5896 6.91071C15.915 7.23614 15.915 7.76378 15.5896 8.08922L10.5896 13.0892C10.2641 13.4147 9.73651 13.4147 9.41107 13.0892L4.41107 8.08922C4.08563 7.76378 4.08563 7.23614 4.41107 6.9107Z",fill:""})})]}),f.jsx("div",{className:`translate transform overflow-hidden ${!E&&"hidden"}`,children:f.jsxs("ul",{className:"mt-4 mb-5.5 flex flex-col gap-2.5 pl-6",children:[f.jsx("li",{children:f.jsx(sr,{to:"/admin/ui/alerts",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Alerts"})}),f.jsx("li",{children:f.jsx(sr,{to:"/admin/ui/buttons",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Buttons"})})]})})]})})]})]})]})})]})},Hi=({children:e})=>{const[t,r]=G.useState(!1),{data:s}=Qr();return f.jsx("div",{className:"dark:bg-boxdark-2 dark:text-bodydark",children:f.jsxs("div",{className:"flex h-screen overflow-hidden",children:[f.jsx(zE,{sidebarOpen:t,setSidebarOpen:r}),f.jsxs("div",{className:"relative flex flex-1 flex-col overflow-y-auto overflow-x-hidden",children:[f.jsx(A2,{sidebarOpen:t,setSidebarOpen:r,user:s}),f.jsx("main",{children:f.jsx("div",{className:"mx-auto max-w-screen-2xl p-4 md:p-6 2xl:p-10",children:e})})]})]})})},FE=({user:e})=>{var c;const t=Mr();e.isAdmin||t.push("/");const{data:r,isLoading:s,error:o}=Un(Ck);return f.jsxs(Hi,{children:[f.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 md:gap-6 xl:grid-cols-4 2xl:gap-7.5",children:[f.jsx(mE,{totalPageViews:r==null?void 0:r.dailyStats.totalViews,prevDayViewsChangePercent:r==null?void 0:r.dailyStats.prevDayViewsChangePercent}),f.jsx(vE,{dailyStats:r==null?void 0:r.dailyStats,weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx(xE,{dailyStats:r==null?void 0:r.dailyStats,isLoading:s}),f.jsx(gE,{dailyStats:r==null?void 0:r.dailyStats,isLoading:s})]}),f.jsxs("div",{className:"mt-4 grid grid-cols-12 gap-4 md:mt-6 md:gap-6 2xl:mt-7.5 2xl:gap-7.5",children:[f.jsx(OE,{weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx("div",{className:"col-span-12 xl:col-span-8",children:f.jsx(IE,{sources:(c=r==null?void 0:r.dailyStats)==null?void 0:c.sources})})]})]})},Pn=({pageName:e})=>f.jsxs("div",{className:"mb-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[f.jsx("h2",{className:"text-title-md2 font-semibold text-black dark:text-white",children:e}),f.jsx("nav",{children:f.jsxs("ol",{className:"flex items-center gap-2",children:[f.jsx("li",{children:f.jsx(rt,{to:"/",children:"Dashboard /"})}),f.jsx("li",{className:"text-primary",children:e})]})})]}),DE=()=>f.jsx("div",{className:"flex h-screen items-center justify-center bg-white",children:f.jsx("div",{className:"h-16 w-16 animate-spin rounded-full border-4 border-solid border-primary border-t-transparent"})}),HE=()=>{const[e,t]=G.useState(!1),r=G.useRef(null),s=G.useRef(null);return G.useEffect(()=>{const o=({target:c})=>{s.current&&(!e||s.current.contains(c)||r.current.contains(c)||t(!1))};return document.addEventListener("click",o),()=>document.removeEventListener("click",o)}),G.useEffect(()=>{const o=({keyCode:c})=>{!e||c!==27||t(!1)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)}),f.jsxs("div",{className:"relative",children:[f.jsx("button",{ref:r,onClick:()=>t(!e),children:f.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M2.25 11.25C3.49264 11.25 4.5 10.2426 4.5 9C4.5 7.75736 3.49264 6.75 2.25 6.75C1.00736 6.75 0 7.75736 0 9C0 10.2426 1.00736 11.25 2.25 11.25Z",fill:"#98A6AD"}),f.jsx("path",{d:"M9 11.25C10.2426 11.25 11.25 10.2426 11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25Z",fill:"#98A6AD"}),f.jsx("path",{d:"M15.75 11.25C16.9926 11.25 18 10.2426 18 9C18 7.75736 16.9926 6.75 15.75 6.75C14.5074 6.75 13.5 7.75736 13.5 9C13.5 10.2426 14.5074 11.25 15.75 11.25Z",fill:"#98A6AD"})]})}),f.jsxs("div",{ref:s,onFocus:()=>t(!0),onBlur:()=>t(!1),className:`absolute right-0 top-full z-40 w-40 space-y-1 rounded-sm border border-stroke bg-white p-1.5 shadow-default dark:border-strokedark dark:bg-boxdark ${e===!0?"block":"hidden"}`,children:[f.jsxs("button",{className:"flex w-full items-center gap-2 rounded-sm py-1.5 px-4 text-left text-sm hover:bg-gray dark:hover:bg-meta-4",children:[f.jsxs("svg",{className:"fill-current",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_62_9787)",children:f.jsx("path",{d:"M15.55 2.97499C15.55 2.77499 15.475 2.57499 15.325 2.42499C15.025 2.12499 14.725 1.82499 14.45 1.52499C14.175 1.24999 13.925 0.974987 13.65 0.724987C13.525 0.574987 13.375 0.474986 13.175 0.449986C12.95 0.424986 12.75 0.474986 12.575 0.624987L10.875 2.32499H2.02495C1.17495 2.32499 0.449951 3.02499 0.449951 3.89999V14C0.449951 14.85 1.14995 15.575 2.02495 15.575H12.15C13 15.575 13.725 14.875 13.725 14V5.12499L15.35 3.49999C15.475 3.34999 15.55 3.17499 15.55 2.97499ZM8.19995 8.99999C8.17495 9.02499 8.17495 9.02499 8.14995 9.02499L6.34995 9.62499L6.94995 7.82499C6.94995 7.79999 6.97495 7.79999 6.97495 7.77499L11.475 3.27499L12.725 4.49999L8.19995 8.99999ZM12.575 14C12.575 14.25 12.375 14.45 12.125 14.45H2.02495C1.77495 14.45 1.57495 14.25 1.57495 14V3.87499C1.57495 3.62499 1.77495 3.42499 2.02495 3.42499H9.72495L6.17495 6.99999C6.04995 7.12499 5.92495 7.29999 5.87495 7.49999L4.94995 10.3C4.87495 10.5 4.92495 10.675 5.02495 10.85C5.09995 10.95 5.24995 11.1 5.52495 11.1H5.62495L8.49995 10.15C8.67495 10.1 8.84995 9.97499 8.97495 9.84999L12.575 6.24999V14ZM13.5 3.72499L12.25 2.49999L13.025 1.72499C13.225 1.92499 14.05 2.74999 14.25 2.97499L13.5 3.72499Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_62_9787",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),"Edit"]}),f.jsxs("button",{className:"flex w-full items-center gap-2 rounded-sm py-1.5 px-4 text-left text-sm hover:bg-gray dark:hover:bg-meta-4",children:[f.jsxs("svg",{className:"fill-current",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M12.225 2.20005H10.3V1.77505C10.3 1.02505 9.70005 0.425049 8.95005 0.425049H7.02505C6.27505 0.425049 5.67505 1.02505 5.67505 1.77505V2.20005H3.75005C3.02505 2.20005 2.42505 2.80005 2.42505 3.52505V4.27505C2.42505 4.82505 2.75005 5.27505 3.22505 5.47505L3.62505 13.75C3.67505 14.775 4.52505 15.575 5.55005 15.575H10.4C11.425 15.575 12.275 14.775 12.325 13.75L12.75 5.45005C13.225 5.25005 13.55 4.77505 13.55 4.25005V3.50005C13.55 2.80005 12.95 2.20005 12.225 2.20005ZM6.82505 1.77505C6.82505 1.65005 6.92505 1.55005 7.05005 1.55005H8.97505C9.10005 1.55005 9.20005 1.65005 9.20005 1.77505V2.20005H6.85005V1.77505H6.82505ZM3.57505 3.52505C3.57505 3.42505 3.65005 3.32505 3.77505 3.32505H12.225C12.325 3.32505 12.425 3.40005 12.425 3.52505V4.27505C12.425 4.37505 12.35 4.47505 12.225 4.47505H3.77505C3.67505 4.47505 3.57505 4.40005 3.57505 4.27505V3.52505V3.52505ZM10.425 14.45H5.57505C5.15005 14.45 4.80005 14.125 4.77505 13.675L4.40005 5.57505H11.625L11.25 13.675C11.2 14.1 10.85 14.45 10.425 14.45Z",fill:""}),f.jsx("path",{d:"M8.00005 8.1001C7.70005 8.1001 7.42505 8.3501 7.42505 8.6751V11.8501C7.42505 12.1501 7.67505 12.4251 8.00005 12.4251C8.30005 12.4251 8.57505 12.1751 8.57505 11.8501V8.6751C8.57505 8.3501 8.30005 8.1001 8.00005 8.1001Z",fill:""}),f.jsx("path",{d:"M9.99994 8.60004C9.67494 8.57504 9.42494 8.80004 9.39994 9.12504L9.24994 11.325C9.22494 11.625 9.44994 11.9 9.77494 11.925C9.79994 11.925 9.79994 11.925 9.82494 11.925C10.1249 11.925 10.3749 11.7 10.3749 11.4L10.5249 9.20004C10.5249 8.87504 10.2999 8.62504 9.99994 8.60004Z",fill:""}),f.jsx("path",{d:"M5.97497 8.60004C5.67497 8.62504 5.42497 8.90004 5.44997 9.20004L5.62497 11.4C5.64997 11.7 5.89997 11.925 6.17497 11.925C6.19997 11.925 6.19997 11.925 6.22497 11.925C6.52497 11.9 6.77497 11.625 6.74997 11.325L6.57497 9.12504C6.57497 8.80004 6.29997 8.57504 5.97497 8.60004Z",fill:""})]}),"Delete"]})]})]})},BE=()=>{var M;const[e,t]=G.useState(0),[r,s]=G.useState(1),[o,c]=G.useState(void 0),[p,v]=G.useState([]),[C,A]=G.useState(void 0),{data:E,isLoading:P,error:B}=Un(Sk,{skip:e,hasPaidFilter:C,emailContains:o,subscriptionStatus:(p==null?void 0:p.length)>0?p:void 0});return G.useEffect(()=>{s(1)},[o,p]),G.useEffect(()=>{t((r-1)*10)},[r]),f.jsx("div",{className:"flex flex-col gap-4",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsxs("div",{className:"flex-col flex items-start justify-between p-6 gap-3 w-full bg-gray-100/40 dark:bg-gray-700/50",children:[f.jsx("span",{className:"text-sm font-medium",children:"Filters:"}),f.jsxs("div",{className:"flex items-center justify-between gap-3 w-full px-2",children:[f.jsxs("div",{className:"relative flex items-center gap-3 ",children:[f.jsx("label",{htmlFor:"email-filter",className:"block text-sm text-gray-700 dark:text-white",children:"email:"}),f.jsx("input",{type:"text",id:"email-filter",placeholder:"dude@example.com",onChange:H=>{c(H.currentTarget.value)},className:"rounded border border-stroke py-2 px-5 bg-white outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"}),f.jsx("label",{htmlFor:"status-filter",className:"block text-sm ml-2 text-gray-700 dark:text-white",children:"status:"}),f.jsxs("div",{className:"flex-grow relative z-20 rounded border border-stroke pr-8 outline-none bg-white transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsx("div",{className:"flex items-center",children:p&&p.length>0?p.map((H,D)=>f.jsxs("span",{className:"z-30 flex items-center my-1 mx-2 py-1 px-2 outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary",children:[H,f.jsx("span",{onClick:Z=>{Z.stopPropagation(),v(W=>W==null?void 0:W.filter(V=>V!==H))},className:"z-30 cursor-pointer pl-2 hover:text-danger",children:f.jsx("svg",{width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.35355 3.35355C9.54882 3.15829 9.54882 2.84171 9.35355 2.64645C9.15829 2.45118 8.84171 2.45118 8.64645 2.64645L6 5.29289L3.35355 2.64645C3.15829 2.45118 2.84171 2.45118 2.64645 2.64645C2.45118 2.84171 2.45118 3.15829 2.64645 3.35355L5.29289 6L2.64645 8.64645C2.45118 8.84171 2.45118 9.15829 2.64645 9.35355C2.84171 9.54882 3.15829 9.54882 3.35355 9.35355L6 6.70711L8.64645 9.35355C8.84171 9.54882 9.15829 9.54882 9.35355 9.35355C9.54882 9.15829 9.54882 8.84171 9.35355 8.64645L6.70711 6L9.35355 3.35355Z",fill:"currentColor"})})})]},H)):f.jsx("span",{className:"bg-white text-gray-500 py-2 px-5 outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary",children:"Select Status Filters"})}),f.jsxs("select",{onChange:H=>{v(D=>D!=null&&D.includes(H.target.value)?D==null?void 0:D.filter(Z=>Z!==H.target.value):D&&[...D,H.target.value])},name:"status-filter",id:"status-filter",className:"absolute top-0 left-0 z-20 h-full w-full bg-white opacity-0",children:[f.jsx("option",{value:"",children:"Select filters"}),["past_due","canceled","active"].map(H=>{if(!p.includes(H))return f.jsx("option",{value:H,children:H})})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-10 -translate-y-1/2",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:"#637381"})})})})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("label",{htmlFor:"hasPaid-filter",className:"block text-sm ml-2 text-gray-700 dark:text-white",children:"hasPaid:"}),f.jsxs("select",{name:"hasPaid-filter",onChange:H=>{H.target.value==="both"?A(void 0):A(H.target.value==="true")},className:"relative z-20 w-full appearance-none rounded border border-stroke bg-white p-2 pl-4 pr-8 outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsx("option",{value:"both",children:"both"}),f.jsx("option",{value:"true",children:"true"}),f.jsx("option",{value:"false",children:"false"})]})]})]}),!P&&f.jsxs("div",{className:"max-w-60",children:[f.jsx("span",{className:"text-md mr-2 text-black dark:text-white",children:"page"}),f.jsx("input",{type:"number",value:r,min:1,max:E==null?void 0:E.totalPages,onChange:H=>{s(parseInt(H.currentTarget.value))},className:"rounded-md border-1 border-stroke bg-transparent px-4 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"}),f.jsxs("span",{className:"text-md text-black dark:text-white",children:[" ","/ ",E==null?void 0:E.totalPages," "]})]})]})]}),f.jsxs("div",{className:"grid grid-cols-12 border-t-4 border-stroke py-4.5 px-4 dark:border-strokedark md:px-6 ",children:[f.jsx("div",{className:"col-span-3 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Email / Username"})}),f.jsx("div",{className:"col-span-3 hidden items-center sm:flex",children:f.jsx("p",{className:"font-medium",children:"Last Active"})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Subscription Status"})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Stripe ID"})}),f.jsx("div",{className:"col-span-1 flex items-center",children:f.jsx("p",{className:"font-medium"})})]}),P&&f.jsx("div",{className:"-mt-40",children:f.jsx(DE,{})}),!!(E!=null&&E.users)&&((M=E==null?void 0:E.users)==null?void 0:M.length)>0&&E.users.map(H=>f.jsxs("div",{className:"grid grid-cols-12 gap-4 border-t border-stroke py-4.5 px-4 dark:border-strokedark md:px-6 ",children:[f.jsx("div",{className:"col-span-3 flex items-center",children:f.jsxs("div",{className:"flex flex-col gap-1 ",children:[f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.email}),f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.username})]})}),f.jsx("div",{className:"col-span-3 hidden items-center sm:flex",children:f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.lastActiveTimestamp.toLocaleDateString()+" "+H.lastActiveTimestamp.toLocaleTimeString()})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.subscriptionStatus})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"text-sm text-meta-3",children:H.stripeId})}),f.jsx("div",{className:"col-span-1 flex items-center",children:f.jsx(HE,{})})]},H.id))]})})},VE=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Users"}),f.jsx("div",{className:"flex flex-col gap-10",children:f.jsx(BE,{})})]});let WE={data:""},$E=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||WE,XE=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,YE=/\/\*[^]*?\*\/| +/g,E0=/\n+/g,en=(e,t)=>{let r="",s="",o="";for(let c in e){let p=e[c];c[0]=="@"?c[1]=="i"?r=c+" "+p+";":s+=c[1]=="f"?en(p,c):c+"{"+en(p,c[1]=="k"?"":t)+"}":typeof p=="object"?s+=en(p,t?t.replace(/([^,])+/g,v=>c.replace(/(^:.*)|([^,])+/g,C=>/&/.test(C)?C.replace(/&/g,v):v?v+" "+C:C)):c):p!=null&&(c=/^--/.test(c)?c:c.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=en.p?en.p(c,p):c+":"+p+";")}return r+(t&&o?t+"{"+o+"}":o)+s},yi={},J2=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+J2(e[r]);return t}return e},UE=(e,t,r,s,o)=>{let c=J2(e),p=yi[c]||(yi[c]=(C=>{let A=0,E=11;for(;A>>0;return"go"+E})(c));if(!yi[p]){let C=c!==e?e:(A=>{let E,P,B=[{}];for(;E=XE.exec(A.replace(YE,""));)E[4]?B.shift():E[3]?(P=E[3].replace(E0," ").trim(),B.unshift(B[0][P]=B[0][P]||{})):B[0][E[1]]=E[2].replace(E0," ").trim();return B[0]})(e);yi[p]=en(o?{["@keyframes "+p]:C}:C,r?"":"."+p)}let v=r&&yi.g?yi.g:null;return r&&(yi.g=yi[p]),((C,A,E,P)=>{P?A.data=A.data.replace(P,C):A.data.indexOf(C)===-1&&(A.data=E?C+A.data:A.data+C)})(yi[p],t,s,v),p},GE=(e,t,r)=>e.reduce((s,o,c)=>{let p=t[c];if(p&&p.call){let v=p(r),C=v&&v.props&&v.props.className||/^go/.test(v)&&v;p=C?"."+C:v&&typeof v=="object"?v.props?"":en(v,""):v===!1?"":v}return s+o+(p??"")},"");function Wd(e){let t=this||{},r=e.call?e(t.p):e;return UE(r.unshift?r.raw?GE(r,[].slice.call(arguments,1),t.p):r.reduce((s,o)=>Object.assign(s,o&&o.call?o(t.p):o),{}):r,$E(t.target),t.g,t.o,t.k)}let e5,zf,Ff;Wd.bind({g:1});let zi=Wd.bind({k:1});function ZE(e,t,r,s){en.p=t,e5=e,zf=r,Ff=s}function Tn(e,t){let r=this||{};return function(){let s=arguments;function o(c,p){let v=Object.assign({},c),C=v.className||o.className;r.p=Object.assign({theme:zf&&zf()},v),r.o=/ *go\d+/.test(C),v.className=Wd.apply(r,s)+(C?" "+C:""),t&&(v.ref=p);let A=e;return e[0]&&(A=v.as||e,delete v.as),Ff&&A[0]&&Ff(v),e5(A,v)}return t?t(o):o}}var qE=e=>typeof e=="function",Df=(e,t)=>qE(e)?e(t):e,QE=(()=>{let e=0;return()=>(++e).toString()})(),KE=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),JE=20,ec=new Map,eL=1e3,L0=e=>{if(ec.has(e))return;let t=setTimeout(()=>{ec.delete(e),$d({type:4,toastId:e})},eL);ec.set(e,t)},tL=e=>{let t=ec.get(e);t&&clearTimeout(t)},Hf=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,JE)};case 1:return t.toast.id&&tL(t.toast.id),{...e,toasts:e.toasts.map(c=>c.id===t.toast.id?{...c,...t.toast}:c)};case 2:let{toast:r}=t;return e.toasts.find(c=>c.id===r.id)?Hf(e,{type:1,toast:r}):Hf(e,{type:0,toast:r});case 3:let{toastId:s}=t;return s?L0(s):e.toasts.forEach(c=>{L0(c.id)}),{...e,toasts:e.toasts.map(c=>c.id===s||s===void 0?{...c,visible:!1}:c)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(c=>c.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(c=>({...c,pauseDuration:c.pauseDuration+o}))}}},rL=[],qu={toasts:[],pausedAt:void 0},$d=e=>{qu=Hf(qu,e),rL.forEach(t=>{t(qu)})},iL=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||QE()}),Yo=e=>(t,r)=>{let s=iL(t,e,r);return $d({type:2,toast:s}),s.id},$r=(e,t)=>Yo("blank")(e,t);$r.error=Yo("error");$r.success=Yo("success");$r.loading=Yo("loading");$r.custom=Yo("custom");$r.dismiss=e=>{$d({type:3,toastId:e})};$r.remove=e=>$d({type:4,toastId:e});$r.promise=(e,t,r)=>{let s=$r.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(o=>($r.success(Df(t.success,o),{id:s,...r,...r==null?void 0:r.success}),o)).catch(o=>{$r.error(Df(t.error,o),{id:s,...r,...r==null?void 0:r.error})}),e};var nL=zi` from { transform: scale(0) rotate(45deg); opacity: 0; @@ -795,7 +795,7 @@ from { to { transform: scale(1) rotate(45deg); opacity: 1; -}`,nL=zi` +}`,sL=zi` from { transform: scale(0); opacity: 0; @@ -803,7 +803,7 @@ from { to { transform: scale(1); opacity: 1; -}`,sL=zi` +}`,aL=zi` from { transform: scale(0) rotate(90deg); opacity: 0; @@ -811,7 +811,7 @@ from { to { transform: scale(1) rotate(90deg); opacity: 1; -}`,aL=Tn("div")` +}`,oL=Tn("div")` width: 20px; opacity: 0; height: 20px; @@ -820,14 +820,14 @@ to { position: relative; transform: rotate(45deg); - animation: ${iL} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + animation: ${nL} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after, &:before { content: ''; - animation: ${nL} 0.15s ease-out forwards; + animation: ${sL} 0.15s ease-out forwards; animation-delay: 150ms; position: absolute; border-radius: 3px; @@ -840,18 +840,18 @@ to { } &:before { - animation: ${sL} 0.15s ease-out forwards; + animation: ${aL} 0.15s ease-out forwards; animation-delay: 180ms; transform: rotate(90deg); } -`,oL=zi` +`,lL=zi` from { transform: rotate(0deg); } to { transform: rotate(360deg); } -`,lL=Tn("div")` +`,cL=Tn("div")` width: 12px; height: 12px; box-sizing: border-box; @@ -859,8 +859,8 @@ to { border-radius: 100%; border-color: ${e=>e.secondary||"#e0e0e0"}; border-right-color: ${e=>e.primary||"#616161"}; - animation: ${oL} 1s linear infinite; -`,cL=zi` + animation: ${lL} 1s linear infinite; +`,dL=zi` from { transform: scale(0) rotate(45deg); opacity: 0; @@ -868,7 +868,7 @@ from { to { transform: scale(1) rotate(45deg); opacity: 1; -}`,dL=zi` +}`,uL=zi` 0% { height: 0; width: 0; @@ -882,7 +882,7 @@ to { 100% { opacity: 1; height: 10px; -}`,uL=Tn("div")` +}`,hL=Tn("div")` width: 20px; opacity: 0; height: 20px; @@ -891,13 +891,13 @@ to { position: relative; transform: rotate(45deg); - animation: ${cL} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) + animation: ${dL} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after { content: ''; box-sizing: border-box; - animation: ${dL} 0.2s ease-out forwards; + animation: ${uL} 0.2s ease-out forwards; opacity: 0; animation-delay: 200ms; position: absolute; @@ -909,16 +909,16 @@ to { height: 10px; width: 6px; } -`,hL=Tn("div")` - position: absolute; `,fL=Tn("div")` + position: absolute; +`,pL=Tn("div")` position: relative; display: flex; justify-content: center; align-items: center; min-width: 20px; min-height: 20px; -`,pL=zi` +`,gL=zi` from { transform: scale(0.6); opacity: 0.4; @@ -926,20 +926,20 @@ from { to { transform: scale(1); opacity: 1; -}`,gL=Tn("div")` +}`,mL=Tn("div")` position: relative; transform: scale(0.6); opacity: 0.4; min-width: 20px; - animation: ${pL} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) + animation: ${gL} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; -`,mL=({toast:e})=>{let{icon:t,type:r,iconTheme:s}=e;return t!==void 0?typeof t=="string"?G.createElement(gL,null,t):t:r==="blank"?null:G.createElement(fL,null,G.createElement(lL,{...s}),r!=="loading"&&G.createElement(hL,null,r==="error"?G.createElement(aL,{...s}):G.createElement(uL,{...s})))},xL=e=>` +`,xL=({toast:e})=>{let{icon:t,type:r,iconTheme:s}=e;return t!==void 0?typeof t=="string"?G.createElement(mL,null,t):t:r==="blank"?null:G.createElement(pL,null,G.createElement(cL,{...s}),r!=="loading"&&G.createElement(fL,null,r==="error"?G.createElement(oL,{...s}):G.createElement(hL,{...s})))},vL=e=>` 0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} 100% {transform: translate3d(0,0,0) scale(1); opacity:1;} -`,vL=e=>` +`,yL=e=>` 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} 100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} -`,yL="0%{opacity:0;} 100%{opacity:1;}",bL="0%{opacity:1;} 100%{opacity:0;}",wL=Tn("div")` +`,bL="0%{opacity:0;} 100%{opacity:1;}",wL="0%{opacity:1;} 100%{opacity:0;}",kL=Tn("div")` display: flex; align-items: center; background: #fff; @@ -951,16 +951,16 @@ to { pointer-events: auto; padding: 8px 10px; border-radius: 8px; -`,kL=Tn("div")` +`,CL=Tn("div")` display: flex; justify-content: center; margin: 4px 10px; color: inherit; flex: 1 1 auto; white-space: pre-line; -`,CL=(e,t)=>{let r=e.includes("top")?1:-1,[s,o]=QE()?[yL,bL]:[xL(r),vL(r)];return{animation:t?`${zi(s)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${zi(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}};G.memo(({toast:e,position:t,style:r,children:s})=>{let o=e.height?CL(e.position||t||"top-center",e.visible):{opacity:0},c=G.createElement(mL,{toast:e}),p=G.createElement(kL,{...e.ariaProps},Df(e.message,e));return G.createElement(wL,{className:e.className,style:{...o,...r,...e.style}},typeof s=="function"?s({icon:c,message:p}):G.createElement(G.Fragment,null,c,p))});GE(G.createElement);Wd` +`,SL=(e,t)=>{let r=e.includes("top")?1:-1,[s,o]=KE()?[bL,wL]:[vL(r),yL(r)];return{animation:t?`${zi(s)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${zi(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}};G.memo(({toast:e,position:t,style:r,children:s})=>{let o=e.height?SL(e.position||t||"top-center",e.visible):{opacity:0},c=G.createElement(xL,{toast:e}),p=G.createElement(CL,{...e.ariaProps},Df(e.message,e));return G.createElement(kL,{className:e.className,style:{...o,...r,...e.style}},typeof s=="function"?s({icon:c,message:p}):G.createElement(G.Fragment,null,c,p))});ZE(G.createElement);Wd` z-index: 9999; > * { pointer-events: auto; } -`;var P0=$r;const SL=()=>{const e=t=>{t.preventDefault(),confirm("Are you sure you want to save the changes?")?P0.success("Your changes have been saved successfully!"):P0.error("Your changes have not been saved!")};return f.jsx(Hi,{children:f.jsxs("div",{className:"mx-auto max-w-270",children:[f.jsx(Pn,{pageName:"Settings"}),f.jsxs("div",{className:"grid grid-cols-5 gap-8",children:[f.jsx("div",{className:"col-span-5 xl:col-span-3",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-7 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Personal Information"})}),f.jsx("div",{className:"p-7",children:f.jsxs("form",{onSubmit:e,children:[f.jsxs("div",{className:"mb-5.5 flex flex-col gap-5.5 sm:flex-row",children:[f.jsxs("div",{className:"w-full sm:w-1/2",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"fullName",children:"Full Name"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsx("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.72039 12.887C4.50179 12.1056 5.5616 11.6666 6.66667 11.6666H13.3333C14.4384 11.6666 15.4982 12.1056 16.2796 12.887C17.061 13.6684 17.5 14.7282 17.5 15.8333V17.5C17.5 17.9602 17.1269 18.3333 16.6667 18.3333C16.2064 18.3333 15.8333 17.9602 15.8333 17.5V15.8333C15.8333 15.1703 15.5699 14.5344 15.1011 14.0655C14.6323 13.5967 13.9964 13.3333 13.3333 13.3333H6.66667C6.00363 13.3333 5.36774 13.5967 4.8989 14.0655C4.43006 14.5344 4.16667 15.1703 4.16667 15.8333V17.5C4.16667 17.9602 3.79357 18.3333 3.33333 18.3333C2.8731 18.3333 2.5 17.9602 2.5 17.5V15.8333C2.5 14.7282 2.93899 13.6684 3.72039 12.887Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99967 3.33329C8.61896 3.33329 7.49967 4.45258 7.49967 5.83329C7.49967 7.214 8.61896 8.33329 9.99967 8.33329C11.3804 8.33329 12.4997 7.214 12.4997 5.83329C12.4997 4.45258 11.3804 3.33329 9.99967 3.33329ZM5.83301 5.83329C5.83301 3.53211 7.69849 1.66663 9.99967 1.66663C12.3009 1.66663 14.1663 3.53211 14.1663 5.83329C14.1663 8.13448 12.3009 9.99996 9.99967 9.99996C7.69849 9.99996 5.83301 8.13448 5.83301 5.83329Z",fill:""})]})})}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"fullName",id:"fullName",placeholder:"Devid Jhon",defaultValue:"Devid Jhon"})]})]}),f.jsxs("div",{className:"w-full sm:w-1/2",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"phoneNumber",children:"Phone Number"}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 px-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"phoneNumber",id:"phoneNumber",placeholder:"+990 3343 7865",defaultValue:"+990 3343 7865"})]})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"emailAddress",children:"Email Address"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsx("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33301 4.16667C2.87658 4.16667 2.49967 4.54357 2.49967 5V15C2.49967 15.4564 2.87658 15.8333 3.33301 15.8333H16.6663C17.1228 15.8333 17.4997 15.4564 17.4997 15V5C17.4997 4.54357 17.1228 4.16667 16.6663 4.16667H3.33301ZM0.833008 5C0.833008 3.6231 1.9561 2.5 3.33301 2.5H16.6663C18.0432 2.5 19.1663 3.6231 19.1663 5V15C19.1663 16.3769 18.0432 17.5 16.6663 17.5H3.33301C1.9561 17.5 0.833008 16.3769 0.833008 15V5Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.983719 4.52215C1.24765 4.1451 1.76726 4.05341 2.1443 4.31734L9.99975 9.81615L17.8552 4.31734C18.2322 4.05341 18.7518 4.1451 19.0158 4.52215C19.2797 4.89919 19.188 5.4188 18.811 5.68272L10.4776 11.5161C10.1907 11.7169 9.80879 11.7169 9.52186 11.5161L1.18853 5.68272C0.811486 5.4188 0.719791 4.89919 0.983719 4.52215Z",fill:""})]})})}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"email",name:"emailAddress",id:"emailAddress",placeholder:"devidjond45@gmail.com",defaultValue:"devidjond45@gmail.com"})]})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"Username",children:"Username"}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 px-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"Username",id:"Username",placeholder:"devidjhon24",defaultValue:"devidjhon24"})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"Username",children:"BIO"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{opacity:"0.8",clipPath:"url(#clip0_88_10224)",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.56524 3.23223C2.03408 2.76339 2.66997 2.5 3.33301 2.5H9.16634C9.62658 2.5 9.99967 2.8731 9.99967 3.33333C9.99967 3.79357 9.62658 4.16667 9.16634 4.16667H3.33301C3.11199 4.16667 2.90003 4.25446 2.74375 4.41074C2.58747 4.56702 2.49967 4.77899 2.49967 5V16.6667C2.49967 16.8877 2.58747 17.0996 2.74375 17.2559C2.90003 17.4122 3.11199 17.5 3.33301 17.5H14.9997C15.2207 17.5 15.4326 17.4122 15.5889 17.2559C15.7452 17.0996 15.833 16.8877 15.833 16.6667V10.8333C15.833 10.3731 16.2061 10 16.6663 10C17.1266 10 17.4997 10.3731 17.4997 10.8333V16.6667C17.4997 17.3297 17.2363 17.9656 16.7674 18.4344C16.2986 18.9033 15.6627 19.1667 14.9997 19.1667H3.33301C2.66997 19.1667 2.03408 18.9033 1.56524 18.4344C1.0964 17.9656 0.833008 17.3297 0.833008 16.6667V5C0.833008 4.33696 1.0964 3.70107 1.56524 3.23223Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6664 2.39884C16.4185 2.39884 16.1809 2.49729 16.0056 2.67253L8.25216 10.426L7.81167 12.188L9.57365 11.7475L17.3271 3.99402C17.5023 3.81878 17.6008 3.5811 17.6008 3.33328C17.6008 3.08545 17.5023 2.84777 17.3271 2.67253C17.1519 2.49729 16.9142 2.39884 16.6664 2.39884ZM14.8271 1.49402C15.3149 1.00622 15.9765 0.732178 16.6664 0.732178C17.3562 0.732178 18.0178 1.00622 18.5056 1.49402C18.9934 1.98182 19.2675 2.64342 19.2675 3.33328C19.2675 4.02313 18.9934 4.68473 18.5056 5.17253L10.5889 13.0892C10.4821 13.196 10.3483 13.2718 10.2018 13.3084L6.86847 14.1417C6.58449 14.2127 6.28409 14.1295 6.0771 13.9225C5.87012 13.7156 5.78691 13.4151 5.85791 13.1312L6.69124 9.79783C6.72787 9.65131 6.80364 9.51749 6.91044 9.41069L14.8271 1.49402Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_88_10224",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),f.jsx("textarea",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",name:"bio",id:"bio",rows:6,placeholder:"Write your bio here",defaultValue:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque posuere fermentum urna, eu condimentum mauris tempus ut. Donec fermentum blandit aliquet."})]})]}),f.jsxs("div",{className:"flex justify-end gap-4.5",children:[f.jsx("button",{className:"flex justify-center rounded border border-stroke py-2 px-6 font-medium text-black hover:shadow-1 dark:border-strokedark dark:text-white",type:"submit",children:"Cancel"}),f.jsx("button",{className:"flex justify-center rounded bg-primary py-2 px-6 font-medium text-gray hover:shadow-1",type:"submit",children:"Save"})]})]})})]})}),f.jsx("div",{className:"col-span-5 xl:col-span-2",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-7 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Your Photo"})}),f.jsx("div",{className:"p-7",children:f.jsxs("form",{action:"#",children:[f.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[f.jsx("div",{className:"h-14 w-14 rounded-full"}),f.jsxs("div",{children:[f.jsx("span",{className:"mb-1.5 text-black dark:text-white",children:"Edit your photo"}),f.jsxs("span",{className:"flex gap-2.5",children:[f.jsx("button",{className:"text-sm hover:text-primary",children:"Delete"}),f.jsx("button",{className:"text-sm hover:text-primary",children:"Update"})]})]})]}),f.jsxs("div",{id:"FileUpload",className:"relative mb-5.5 block w-full cursor-pointer appearance-none rounded border-2 border-dashed border-primary bg-gray py-4 px-4 dark:bg-meta-4 sm:py-7.5",children:[f.jsx("input",{type:"file",accept:"image/*",className:"absolute inset-0 z-50 m-0 h-full w-full cursor-pointer p-0 opacity-0 outline-none"}),f.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[f.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full border border-stroke bg-white dark:border-strokedark dark:bg-boxdark",children:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.99967 9.33337C2.36786 9.33337 2.66634 9.63185 2.66634 10V12.6667C2.66634 12.8435 2.73658 13.0131 2.8616 13.1381C2.98663 13.2631 3.1562 13.3334 3.33301 13.3334H12.6663C12.8431 13.3334 13.0127 13.2631 13.1377 13.1381C13.2628 13.0131 13.333 12.8435 13.333 12.6667V10C13.333 9.63185 13.6315 9.33337 13.9997 9.33337C14.3679 9.33337 14.6663 9.63185 14.6663 10V12.6667C14.6663 13.1971 14.4556 13.7058 14.0806 14.0809C13.7055 14.456 13.1968 14.6667 12.6663 14.6667H3.33301C2.80257 14.6667 2.29387 14.456 1.91879 14.0809C1.54372 13.7058 1.33301 13.1971 1.33301 12.6667V10C1.33301 9.63185 1.63148 9.33337 1.99967 9.33337Z",fill:"#3C50E0"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5286 1.52864C7.78894 1.26829 8.21106 1.26829 8.4714 1.52864L11.8047 4.86197C12.0651 5.12232 12.0651 5.54443 11.8047 5.80478C11.5444 6.06513 11.1223 6.06513 10.8619 5.80478L8 2.94285L5.13807 5.80478C4.87772 6.06513 4.45561 6.06513 4.19526 5.80478C3.93491 5.54443 3.93491 5.12232 4.19526 4.86197L7.5286 1.52864Z",fill:"#3C50E0"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99967 1.33337C8.36786 1.33337 8.66634 1.63185 8.66634 2.00004V10C8.66634 10.3682 8.36786 10.6667 7.99967 10.6667C7.63148 10.6667 7.33301 10.3682 7.33301 10V2.00004C7.33301 1.63185 7.63148 1.33337 7.99967 1.33337Z",fill:"#3C50E0"})]})}),f.jsxs("p",{children:[f.jsx("span",{className:"text-primary",children:"Click to upload"})," or drag and drop"]}),f.jsx("p",{className:"mt-1.5",children:"SVG, PNG, JPG or GIF"}),f.jsx("p",{children:"(max, 800 X 800px)"})]})]}),f.jsxs("div",{className:"flex justify-end gap-4.5",children:[f.jsx("button",{className:"flex justify-center rounded border border-stroke py-2 px-6 font-medium text-black hover:shadow-1 dark:border-strokedark dark:text-white",type:"submit",children:"Cancel"}),f.jsx("button",{className:"flex justify-center rounded bg-primary py-2 px-6 font-medium text-gray hover:bg-opacity-70",type:"submit",children:"Save"})]})]})})]})})]})]})})},AL=()=>{const[e,t]=G.useState({series:[{data:[168,385,201,298,187,195,291,110,215,390,280,112,123,212,270,190,310,115,90,380,112,223,292,170,290,110,115,290,380,312]}]}),r={colors:["#3C50E0"],chart:{fontFamily:"Satoshi, sans-serif",type:"bar",height:350,toolbar:{show:!1}},plotOptions:{bar:{horizontal:!1,columnWidth:"55%",borderRadius:2}},dataLabels:{enabled:!1},stroke:{show:!0,width:4,colors:["transparent"]},xaxis:{categories:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],axisBorder:{show:!1},axisTicks:{show:!1}},legend:{show:!0,position:"top",horizontalAlign:"left",fontFamily:"inter",markers:{radius:99}},grid:{yaxis:{lines:{show:!1}}},fill:{opacity:1},tooltip:{x:{show:!1}}};return f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5",children:[f.jsx("div",{children:f.jsx("h3",{className:"text-xl font-semibold text-black dark:text-white",children:"Visitors Analytics"})}),f.jsx("div",{className:"mb-2",children:f.jsx("div",{id:"chartFour",className:"-ml-5",children:f.jsx(Vd,{options:r,series:e.series,type:"bar",height:350})})})]})},jL={chart:{type:"donut"},colors:["#10B981","#375E83","#259AE6","#FFA70B"],labels:["Remote","Hybrid","Onsite","Leave"],legend:{show:!0,position:"bottom"},plotOptions:{pie:{donut:{size:"65%",background:"transparent"}}},dataLabels:{enabled:!1},responsive:[{breakpoint:2600,options:{chart:{width:380}}},{breakpoint:640,options:{chart:{width:200}}}]},NL=()=>{const[e,t]=G.useState({series:[65,34,12,56]});return f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:col-span-5",children:[f.jsxs("div",{className:"mb-3 justify-between gap-4 sm:flex",children:[f.jsx("div",{children:f.jsx("h5",{className:"text-xl font-semibold text-black dark:text-white",children:"Visitors Analytics"})}),f.jsx("div",{children:f.jsxs("div",{className:"relative z-20 inline-block",children:[f.jsxs("select",{name:"",id:"",className:"relative z-20 inline-flex appearance-none bg-transparent py-1 pl-3 pr-8 text-sm font-medium outline-none",children:[f.jsx("option",{value:"",children:"Monthly"}),f.jsx("option",{value:"",children:"Yearly"})]}),f.jsx("span",{className:"absolute top-1/2 right-3 z-10 -translate-y-1/2",children:f.jsxs("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M0.47072 1.08816C0.47072 1.02932 0.500141 0.955772 0.54427 0.911642C0.647241 0.808672 0.809051 0.808672 0.912022 0.896932L4.85431 4.60386C4.92785 4.67741 5.06025 4.67741 5.14851 4.60386L9.09079 0.896932C9.19376 0.793962 9.35557 0.808672 9.45854 0.911642C9.56151 1.01461 9.5468 1.17642 9.44383 1.27939L5.50155 4.98632C5.22206 5.23639 4.78076 5.23639 4.51598 4.98632L0.558981 1.27939C0.50014 1.22055 0.47072 1.16171 0.47072 1.08816Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.22659 0.546578L5.00141 4.09604L8.76422 0.557869C9.08459 0.244537 9.54201 0.329403 9.79139 0.578788C10.112 0.899434 10.0277 1.36122 9.77668 1.61224L9.76644 1.62248L5.81552 5.33722C5.36257 5.74249 4.6445 5.7544 4.19352 5.32924C4.19327 5.32901 4.19377 5.32948 4.19352 5.32924L0.225953 1.61241C0.102762 1.48922 -4.20186e-08 1.31674 -3.20269e-08 1.08816C-2.40601e-08 0.905899 0.0780105 0.712197 0.211421 0.578787C0.494701 0.295506 0.935574 0.297138 1.21836 0.539529L1.22659 0.546578ZM4.51598 4.98632C4.78076 5.23639 5.22206 5.23639 5.50155 4.98632L9.44383 1.27939C9.5468 1.17642 9.56151 1.01461 9.45854 0.911642C9.35557 0.808672 9.19376 0.793962 9.09079 0.896932L5.14851 4.60386C5.06025 4.67741 4.92785 4.67741 4.85431 4.60386L0.912022 0.896932C0.809051 0.808672 0.647241 0.808672 0.54427 0.911642C0.500141 0.955772 0.47072 1.02932 0.47072 1.08816C0.47072 1.16171 0.50014 1.22055 0.558981 1.27939L4.51598 4.98632Z",fill:"#637381"})]})})]})})]}),f.jsx("div",{className:"mb-2",children:f.jsx("div",{id:"chartThree",className:"mx-auto flex justify-center",children:f.jsx(Vd,{options:jL,series:e.series,type:"donut"})})}),f.jsxs("div",{className:"-mx-8 flex flex-wrap items-center justify-center gap-y-3",children:[f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-primary"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Desktop "}),f.jsx("span",{children:" 65% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#6577F3]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Tablet "}),f.jsx("span",{children:" 34% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#8FD0EF]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Mobile "}),f.jsx("span",{children:" 45% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#0FADCF]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Unknown "}),f.jsx("span",{children:" 12% "})]})]})})]})]})},EL=()=>f.jsx("div",{className:"col-span-12 rounded-sm border border-stroke bg-white p-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:f.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2 xl:grid-cols-4 xl:gap-0",children:[f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark xl:border-b-0 xl:border-r xl:pb-0",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"$4,350"}),f.jsx("p",{className:"text-sm font-medium",children:"Unique Visitors"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"18%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark xl:border-b-0 xl:border-r xl:pb-0",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"55.9K"}),f.jsx("p",{className:"text-sm font-medium",children:"Total Pageviews"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"25%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark sm:border-b-0 sm:pb-0 xl:border-r",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"54%"}),f.jsx("p",{className:"text-sm font-medium",children:"Bounce Rate"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M9.75302 12.1328L13.7773 8.10856L14.8381 9.16939L9.00279 15.0047L3.16748 9.16939L4.22831 8.10856L8.25256 12.1328V3.00098H9.75302V12.1328Z",fill:"#F0950C"})}),f.jsx("span",{className:"text-meta-8",children:"7%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"2m 56s"}),f.jsx("p",{className:"text-sm font-medium",children:"Visit Duration"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"12%"})]})]})]})}),LL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Chart"}),f.jsxs("div",{className:"grid grid-cols-12 gap-4 md:gap-6 2xl:gap-7.5",children:[f.jsx(EL,{}),f.jsx("div",{className:"col-span-12",children:f.jsx(AL,{})}),f.jsx(NL,{})]})]});function PL(){return f.jsx("div",{children:"Hello world!"})}const TL=()=>{const[e,t]=G.useState(!1);return f.jsx("div",{children:f.jsxs("label",{htmlFor:"checkboxLabelFour",className:"flex cursor-pointer select-none items-center",children:[f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:"checkboxLabelFour",className:"sr-only",onChange:()=>{t(!e)}}),f.jsx("div",{className:`mr-4 flex h-5 w-5 items-center justify-center rounded-full border ${e&&"border-primary"}`,children:f.jsx("span",{className:`h-2.5 w-2.5 rounded-full bg-transparent ${e&&"!bg-primary"}`,children:" "})})]}),"Checkbox Text"]})})},RL=({user:e,updateUserById:t})=>{const[r,s]=G.useState((e==null?void 0:e.hasPaid)||!1);return f.jsx("div",{className:"relative",children:f.jsx("label",{htmlFor:`toggle1-${e==null?void 0:e.id}`,className:"flex cursor-pointer select-none items-center",children:f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:`toggle1-${e==null?void 0:e.id}`,className:"sr-only",onChange:()=>{s(!r),t&&t({id:e==null?void 0:e.id,data:{hasPaid:!r}})}}),f.jsx("div",{className:"reblock h-8 w-14 rounded-full bg-meta-9 dark:bg-[#5A616B]"}),f.jsx("div",{className:`absolute left-1 top-1 h-6 w-6 rounded-full bg-white dark:bg-gray-400 transition ${r&&"!right-1 !translate-x-full !bg-primary dark:!bg-white"}`})]})})})},_L=()=>{const[e,t]=G.useState(!1);return f.jsx("div",{children:f.jsx("label",{htmlFor:"toggle3",className:"flex cursor-pointer select-none items-center",children:f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:"toggle3",className:"sr-only",onChange:()=>{t(!e)}}),f.jsx("div",{className:"block h-8 w-14 rounded-full bg-meta-9 dark:bg-[#5A616B]"}),f.jsxs("div",{className:`dot absolute left-1 top-1 flex h-6 w-6 items-center justify-center rounded-full bg-white transition ${e&&"!right-1 !translate-x-full !bg-primary dark:!bg-white"}`,children:[f.jsx("span",{className:`hidden ${e&&"!block"}`,children:f.jsx("svg",{className:"fill-white dark:fill-black",width:"11",height:"8",viewBox:"0 0 11 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M10.0915 0.951972L10.0867 0.946075L10.0813 0.940568C9.90076 0.753564 9.61034 0.753146 9.42927 0.939309L4.16201 6.22962L1.58507 3.63469C1.40401 3.44841 1.11351 3.44879 0.932892 3.63584C0.755703 3.81933 0.755703 4.10875 0.932892 4.29224L0.932878 4.29225L0.934851 4.29424L3.58046 6.95832C3.73676 7.11955 3.94983 7.2 4.1473 7.2C4.36196 7.2 4.55963 7.11773 4.71406 6.9584L10.0468 1.60234C10.2436 1.4199 10.2421 1.1339 10.0915 0.951972ZM4.2327 6.30081L4.2317 6.2998C4.23206 6.30015 4.23237 6.30049 4.23269 6.30082L4.2327 6.30081Z",fill:"",stroke:"",strokeWidth:"0.4"})})}),f.jsx("span",{className:`${e&&"hidden"}`,children:f.jsx("svg",{className:"h-4 w-4 stroke-current",fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]})]})})})},ML=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"FormElements"}),f.jsxs("div",{className:"grid grid-cols-1 gap-9 sm:grid-cols-2",children:[f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Input Fields"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Default Input"}),f.jsx("input",{type:"text",placeholder:"Default Input",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Active Input"}),f.jsx("input",{type:"text",placeholder:"Active Input",className:"w-full rounded-lg border-[1.5px] border-primary bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:bg-form-input"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block font-medium text-black dark:text-white",children:"Disabled label"}),f.jsx("input",{type:"text",placeholder:"Disabled label",disabled:!0,className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary dark:disabled:bg-black"})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Toggle switch input"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsx(RL,{}),f.jsx(_L,{})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Time and date"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Date picker"}),f.jsx("div",{className:"relative",children:f.jsx("input",{type:"date",className:"custom-input-date custom-input-date-1 w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Select date"}),f.jsx("div",{className:"relative",children:f.jsx("input",{type:"date",className:"custom-input-date custom-input-date-2 w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"File upload"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Attach file"}),f.jsx("input",{type:"file",className:"w-full cursor-pointer rounded-lg border-[1.5px] border-stroke bg-transparent font-medium outline-none transition file:mr-5 file:border-collapse file:cursor-pointer file:border-0 file:border-r file:border-solid file:border-stroke file:bg-whiter file:py-3 file:px-5 file:hover:bg-primary file:hover:bg-opacity-10 focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:file:border-form-strokedark dark:file:bg-white/30 dark:file:text-white dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Attach file"}),f.jsx("input",{type:"file",className:"w-full rounded-md border border-stroke p-3 outline-none transition file:mr-4 file:rounded file:border-[0.5px] file:border-stroke file:bg-[#EEEEEE] file:py-1 file:px-2.5 file:text-sm file:font-medium focus:border-primary file:focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:file:border-strokedark dark:file:bg-white/30 dark:file:text-white"})]})]})]})]}),f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Textarea Fields"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Default textarea"}),f.jsx("textarea",{rows:6,placeholder:"Default textarea",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Active textarea"}),f.jsx("textarea",{rows:6,placeholder:"Active textarea",className:"w-full rounded-lg border-[1.5px] border-primary bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:bg-form-input"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Disabled textarea"}),f.jsx("textarea",{rows:6,disabled:!0,placeholder:"Disabled textarea",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary dark:disabled:bg-black"})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Checkbox and radio"})}),f.jsx("div",{className:"flex flex-col gap-5.5 p-6.5",children:f.jsx(TL,{})})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Select input"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Select Country"}),f.jsxs("div",{className:"relative z-20 bg-white dark:bg-form-input",children:[f.jsx("span",{className:"absolute top-1/2 left-4 z-30 -translate-y-1/2",children:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0007 2.50065C5.85852 2.50065 2.50065 5.85852 2.50065 10.0007C2.50065 14.1428 5.85852 17.5007 10.0007 17.5007C14.1428 17.5007 17.5007 14.1428 17.5007 10.0007C17.5007 5.85852 14.1428 2.50065 10.0007 2.50065ZM0.833984 10.0007C0.833984 4.93804 4.93804 0.833984 10.0007 0.833984C15.0633 0.833984 19.1673 4.93804 19.1673 10.0007C19.1673 15.0633 15.0633 19.1673 10.0007 19.1673C4.93804 19.1673 0.833984 15.0633 0.833984 10.0007Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.833984 9.99935C0.833984 9.53911 1.20708 9.16602 1.66732 9.16602H18.334C18.7942 9.16602 19.1673 9.53911 19.1673 9.99935C19.1673 10.4596 18.7942 10.8327 18.334 10.8327H1.66732C1.20708 10.8327 0.833984 10.4596 0.833984 9.99935Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.50084 10.0008C7.55796 12.5632 8.4392 15.0301 10.0006 17.0418C11.5621 15.0301 12.4433 12.5632 12.5005 10.0008C12.4433 7.43845 11.5621 4.97153 10.0007 2.95982C8.4392 4.97153 7.55796 7.43845 7.50084 10.0008ZM10.0007 1.66749L9.38536 1.10547C7.16473 3.53658 5.90275 6.69153 5.83417 9.98346C5.83392 9.99503 5.83392 10.0066 5.83417 10.0182C5.90275 13.3101 7.16473 16.4651 9.38536 18.8962C9.54325 19.069 9.76655 19.1675 10.0007 19.1675C10.2348 19.1675 10.4581 19.069 10.6159 18.8962C12.8366 16.4651 14.0986 13.3101 14.1671 10.0182C14.1674 10.0066 14.1674 9.99503 14.1671 9.98346C14.0986 6.69153 12.8366 3.53658 10.6159 1.10547L10.0007 1.66749Z",fill:"#637381"})]})})}),f.jsxs("select",{className:"relative z-20 w-full appearance-none rounded border border-stroke bg-transparent py-3 px-12 outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsx("option",{value:"",children:"USA"}),f.jsx("option",{value:"",children:"UK"}),f.jsx("option",{value:"",children:"Canada"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-10 -translate-y-1/2",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:"#637381"})})})})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Multiselect Dropdown"}),f.jsxs("div",{className:"relative z-20 w-full rounded border border-stroke p-1.5 pr-8 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsxs("div",{className:"flex flex-wrap items-center",children:[f.jsxs("span",{className:"m-1.5 flex items-center justify-center rounded border-[.5px] border-stroke bg-gray py-1.5 px-2.5 text-sm font-medium dark:border-strokedark dark:bg-white/30",children:["Design",f.jsx("span",{className:"cursor-pointer pl-2 hover:text-danger",children:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.35355 3.35355C9.54882 3.15829 9.54882 2.84171 9.35355 2.64645C9.15829 2.45118 8.84171 2.45118 8.64645 2.64645L6 5.29289L3.35355 2.64645C3.15829 2.45118 2.84171 2.45118 2.64645 2.64645C2.45118 2.84171 2.45118 3.15829 2.64645 3.35355L5.29289 6L2.64645 8.64645C2.45118 8.84171 2.45118 9.15829 2.64645 9.35355C2.84171 9.54882 3.15829 9.54882 3.35355 9.35355L6 6.70711L8.64645 9.35355C8.84171 9.54882 9.15829 9.54882 9.35355 9.35355C9.54882 9.15829 9.54882 8.84171 9.35355 8.64645L6.70711 6L9.35355 3.35355Z",fill:"currentColor"})})})]}),f.jsxs("span",{className:"m-1.5 flex items-center justify-center rounded border-[.5px] border-stroke bg-gray py-1.5 px-2.5 text-sm font-medium dark:border-strokedark dark:bg-white/30",children:["Development",f.jsx("span",{className:"cursor-pointer pl-2 hover:text-danger",children:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.35355 3.35355C9.54882 3.15829 9.54882 2.84171 9.35355 2.64645C9.15829 2.45118 8.84171 2.45118 8.64645 2.64645L6 5.29289L3.35355 2.64645C3.15829 2.45118 2.84171 2.45118 2.64645 2.64645C2.45118 2.84171 2.45118 3.15829 2.64645 3.35355L5.29289 6L2.64645 8.64645C2.45118 8.84171 2.45118 9.15829 2.64645 9.35355C2.84171 9.54882 3.15829 9.54882 3.35355 9.35355L6 6.70711L8.64645 9.35355C8.84171 9.54882 9.15829 9.54882 9.35355 9.35355C9.54882 9.15829 9.54882 8.84171 9.35355 8.64645L6.70711 6L9.35355 3.35355Z",fill:"currentColor"})})})]})]}),f.jsxs("select",{name:"",id:"",className:"absolute top-0 left-0 z-20 h-full w-full bg-transparent opacity-0",children:[f.jsx("option",{value:"",children:"Option"}),f.jsx("option",{value:"",children:"Option"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-10 -translate-y-1/2",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:"#637381"})})})})]})]})]})]})]})]})]}),OL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"FormLayout"}),f.jsxs("div",{className:"grid grid-cols-1 gap-9 sm:grid-cols-2",children:[f.jsx("div",{className:"flex flex-col gap-9",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Contact Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5 flex flex-col gap-6 xl:flex-row",children:[f.jsxs("div",{className:"w-full xl:w-1/2",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"First name"}),f.jsx("input",{type:"text",placeholder:"Enter your first name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"w-full xl:w-1/2",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Last name"}),f.jsx("input",{type:"text",placeholder:"Enter your last name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsxs("label",{className:"mb-2.5 block text-black dark:text-white",children:["Email ",f.jsx("span",{className:"text-meta-1",children:"*"})]}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Subject"}),f.jsx("input",{type:"text",placeholder:"Select subject",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Subject"}),f.jsxs("div",{className:"relative z-20 bg-transparent dark:bg-form-input",children:[f.jsxs("select",{className:"relative z-20 w-full appearance-none rounded border border-stroke bg-transparent py-3 px-5 outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary",children:[f.jsx("option",{value:"",children:"Type your subject"}),f.jsx("option",{value:"",children:"USA"}),f.jsx("option",{value:"",children:"UK"}),f.jsx("option",{value:"",children:"Canada"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-30 -translate-y-1/2",children:f.jsx("svg",{className:"fill-current",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:""})})})})]})]}),f.jsxs("div",{className:"mb-6",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Message"}),f.jsx("textarea",{rows:6,placeholder:"Type your message",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Send Message"})]})})]})}),f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Sign In Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Email"}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Password"}),f.jsx("input",{type:"password",placeholder:"Enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mt-5 mb-5.5 flex items-center justify-between",children:[f.jsxs("label",{htmlFor:"formCheckbox",className:"flex cursor-pointer",children:[f.jsxs("div",{className:"relative pt-0.5",children:[f.jsx("input",{type:"checkbox",id:"formCheckbox",className:"taskCheckbox sr-only"}),f.jsx("div",{className:"box mr-3 flex h-5 w-5 items-center justify-center rounded border border-stroke dark:border-strokedark",children:f.jsx("span",{className:"text-white opacity-0",children:f.jsx("svg",{className:"fill-current",width:"10",height:"7",viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70685 0.292804C9.89455 0.480344 10 0.734667 10 0.999847C10 1.26503 9.89455 1.51935 9.70685 1.70689L4.70059 6.7072C4.51283 6.89468 4.2582 7 3.9927 7C3.72721 7 3.47258 6.89468 3.28482 6.7072L0.281063 3.70701C0.0986771 3.5184 -0.00224342 3.26578 3.785e-05 3.00357C0.00231912 2.74136 0.10762 2.49053 0.29326 2.30511C0.4789 2.11969 0.730026 2.01451 0.992551 2.01224C1.25508 2.00996 1.50799 2.11076 1.69683 2.29293L3.9927 4.58607L8.29108 0.292804C8.47884 0.105322 8.73347 0 8.99896 0C9.26446 0 9.51908 0.105322 9.70685 0.292804Z",fill:""})})})})]}),f.jsx("p",{children:"Remember me"})]}),f.jsx("a",{href:"#",className:"text-sm text-primary",children:"Forget password?"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Sign In"})]})})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Sign Up Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Name"}),f.jsx("input",{type:"text",placeholder:"Enter your full name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Email"}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Password"}),f.jsx("input",{type:"password",placeholder:"Enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Re-type Password"}),f.jsx("input",{type:"password",placeholder:"Re-enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Sign Up"})]})})]})]})]})]}),IL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Calendar"}),f.jsx("div",{className:"w-full max-w-full rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:f.jsxs("table",{className:"w-full",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"grid grid-cols-7 rounded-t-sm bg-primary text-white",children:[f.jsxs("th",{className:"flex h-15 items-center justify-center rounded-tl-sm p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Sunday "}),f.jsx("span",{className:"block lg:hidden",children:" Sun "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Monday "}),f.jsx("span",{className:"block lg:hidden",children:" Mon "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Tuesday "}),f.jsx("span",{className:"block lg:hidden",children:" Tue "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Wednesday "}),f.jsx("span",{className:"block lg:hidden",children:" Wed "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Thursday "}),f.jsx("span",{className:"block lg:hidden",children:" Thur "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Friday "}),f.jsx("span",{className:"block lg:hidden",children:" Fri "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center rounded-tr-sm p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Saturday "}),f.jsx("span",{className:"block lg:hidden",children:" Sat "})]})]})}),f.jsxs("tbody",{children:[f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsxs("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:[f.jsx("span",{className:"font-medium text-black dark:text-white",children:"1"}),f.jsxs("div",{className:"group h-16 w-full flex-grow cursor-pointer py-1 md:h-30",children:[f.jsx("span",{className:"group-hover:text-primary md:hidden",children:"More"}),f.jsxs("div",{className:"event invisible absolute left-2 z-99 mb-1 flex w-[200%] flex-col rounded-sm border-l-[3px] border-primary bg-gray px-3 py-1 text-left opacity-0 group-hover:visible group-hover:opacity-100 dark:bg-meta-4 md:visible md:w-[190%] md:opacity-100",children:[f.jsx("span",{className:"event-name text-sm font-semibold text-black dark:text-white",children:"Redesign Website"}),f.jsx("span",{className:"time text-sm font-medium text-black dark:text-white",children:"1 Dec - 2 Dec"})]})]})]}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"2"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"3"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"4"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"5"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"6"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"7"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"8"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"9"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"10"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"11"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"12"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"13"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"14"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"15"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"16"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"17"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"18"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"19"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"20"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"21"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"22"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"23"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"24"})}),f.jsxs("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:[f.jsx("span",{className:"font-medium text-black dark:text-white",children:"25"}),f.jsxs("div",{className:"group h-16 w-full flex-grow cursor-pointer py-1 md:h-30",children:[f.jsx("span",{className:"group-hover:text-primary md:hidden",children:"More"}),f.jsxs("div",{className:"event invisible absolute left-2 z-99 mb-1 flex w-[300%] flex-col rounded-sm border-l-[3px] border-primary bg-gray px-3 py-1 text-left opacity-0 group-hover:visible group-hover:opacity-100 dark:bg-meta-4 md:visible md:w-[290%] md:opacity-100",children:[f.jsx("span",{className:"event-name text-sm font-semibold text-black dark:text-white",children:"App Design"}),f.jsx("span",{className:"time text-sm font-medium text-black dark:text-white",children:"25 Dec - 27 Dec"})]})]})]}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"26"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"27"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"28"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"29"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"30"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"31"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"1"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"2"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"3"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"4"})})]})]})]})})]}),zL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Alerts"}),f.jsx("div",{className:"rounded-sm border border-stroke bg-white p-4 shadow-default dark:border-strokedark dark:bg-boxdark md:p-6 xl:p-9",children:f.jsxs("div",{className:"flex flex-col gap-7.5",children:[f.jsxs("div",{className:"flex w-full border-l-6 border-warning bg-warning bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-9 items-center justify-center rounded-lg bg-warning bg-opacity-30",children:f.jsx("svg",{width:"19",height:"16",viewBox:"0 0 19 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M1.50493 16H17.5023C18.6204 16 19.3413 14.9018 18.8354 13.9735L10.8367 0.770573C10.2852 -0.256858 8.70677 -0.256858 8.15528 0.770573L0.156617 13.9735C-0.334072 14.8998 0.386764 16 1.50493 16ZM10.7585 12.9298C10.7585 13.6155 10.2223 14.1433 9.45583 14.1433C8.6894 14.1433 8.15311 13.6155 8.15311 12.9298V12.9015C8.15311 12.2159 8.6894 11.688 9.45583 11.688C10.2223 11.688 10.7585 12.2159 10.7585 12.9015V12.9298ZM8.75236 4.01062H10.2548C10.6674 4.01062 10.9127 4.33826 10.8671 4.75288L10.2071 10.1186C10.1615 10.5049 9.88572 10.7455 9.50142 10.7455C9.11929 10.7455 8.84138 10.5028 8.79579 10.1186L8.13574 4.75288C8.09449 4.33826 8.33984 4.01062 8.75236 4.01062Z",fill:"#FBBF24"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 text-lg font-semibold text-[#9D5425]",children:"Attention needed"}),f.jsx("p",{className:"leading-relaxed text-[#D0915C]",children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when"})]})]}),f.jsxs("div",{className:"flex w-full border-l-6 border-[#34D399] bg-[#34D399] bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-full max-w-[36px] items-center justify-center rounded-lg bg-[#34D399]",children:f.jsx("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M15.2984 0.826822L15.2868 0.811827L15.2741 0.797751C14.9173 0.401867 14.3238 0.400754 13.9657 0.794406L5.91888 9.45376L2.05667 5.2868C1.69856 4.89287 1.10487 4.89389 0.747996 5.28987C0.417335 5.65675 0.417335 6.22337 0.747996 6.59026L0.747959 6.59029L0.752701 6.59541L4.86742 11.0348C5.14445 11.3405 5.52858 11.5 5.89581 11.5C6.29242 11.5 6.65178 11.3355 6.92401 11.035L15.2162 2.11161C15.5833 1.74452 15.576 1.18615 15.2984 0.826822Z",fill:"white",stroke:"white"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 text-lg font-semibold text-black dark:text-[#34D399] ",children:"Message Sent Successfully"}),f.jsx("p",{className:"text-base leading-relaxed text-body",children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry."})]})]}),f.jsxs("div",{className:"flex w-full border-l-6 border-[#F87171] bg-[#F87171] bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-full max-w-[36px] items-center justify-center rounded-lg bg-[#F87171]",children:f.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M6.4917 7.65579L11.106 12.2645C11.2545 12.4128 11.4715 12.5 11.6738 12.5C11.8762 12.5 12.0931 12.4128 12.2416 12.2645C12.5621 11.9445 12.5623 11.4317 12.2423 11.1114C12.2422 11.1113 12.2422 11.1113 12.2422 11.1113C12.242 11.1111 12.2418 11.1109 12.2416 11.1107L7.64539 6.50351L12.2589 1.91221L12.2595 1.91158C12.5802 1.59132 12.5802 1.07805 12.2595 0.757793C11.9393 0.437994 11.4268 0.437869 11.1064 0.757418C11.1063 0.757543 11.1062 0.757668 11.106 0.757793L6.49234 5.34931L1.89459 0.740581L1.89396 0.739942C1.57364 0.420019 1.0608 0.420019 0.740487 0.739944C0.42005 1.05999 0.419837 1.57279 0.73985 1.89309L6.4917 7.65579ZM6.4917 7.65579L1.89459 12.2639L1.89395 12.2645C1.74546 12.4128 1.52854 12.5 1.32616 12.5C1.12377 12.5 0.906853 12.4128 0.758361 12.2645L1.1117 11.9108L0.758358 12.2645C0.437984 11.9445 0.437708 11.4319 0.757539 11.1116C0.757812 11.1113 0.758086 11.111 0.75836 11.1107L5.33864 6.50287L0.740487 1.89373L6.4917 7.65579Z",fill:"#ffffff",stroke:"#ffffff"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 font-semibold text-[#B45454]",children:"There were 1 errors with your submission"}),f.jsx("ul",{children:f.jsx("li",{className:"leading-relaxed text-[#CD5D5D]",children:"Lorem Ipsum is simply dummy text of the printing"})})]})]})]})})]}),FL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Buttons"}),f.jsxs("div",{className:"mb-10 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke px-7 py-4 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Normal Button"})}),f.jsxs("div",{className:"p-4 md:p-6 xl:p-9",children:[f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]}),f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-meta-3 py-4 px-10 text-center font-medium text-meta-3 hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]}),f.jsxs("div",{className:"flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-black py-4 px-10 text-center font-medium text-black hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]})]})]}),f.jsxs("div",{className:"mb-10 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke px-7 py-4 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Button With Icon"})}),f.jsxs("div",{className:"p-4 md:p-6 xl:p-9",children:[f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]})]}),f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]})]}),f.jsxs("div",{className:"flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]})]})]})]})]}),DL={display:"flex",alignItems:"center",justifyContent:"center",padding:"4rem"},t5={display:"flex",alignItems:"center",gap:".5rem",borderRadius:".5rem",padding:"1rem"},HL={...t5,borderColor:"rgb(240 82 82)",backgroundColor:"rgb(253 232 232)",color:"rgb(200 30 30)"},BL={...t5,borderColor:"rgb(107 114 128)",backgroundColor:"rgb(243 244 246)",color:"rgb(55 65 81)"};function VL(){const{isLoading:e,error:t,user:r}=WL();return r!=null?f.jsx(Yp,{to:"/chat"}):f.jsxs("div",{style:DL,children:[t&&f.jsxs("div",{style:HL,children:[f.jsx(T0,{})," ",t]}),e&&f.jsxs("div",{style:BL,children:[f.jsx(T0,{})," Please wait a moment while we log you in."]})]})}function WL(){const{data:e}=Qr(),[t,r]=G.useState(!0),[s,o]=G.useState(null),c=na();async function p(){try{r(!0);const A=new URLSearchParams(c.search).get("error");if(A!==null){o(A);return}const L=c.hash.slice(1),P=await $L({code:L});if(!XL(P)){o("Unable to login with the OAuth provider.");return}await ob(P.data.sessionId)}catch(C){console.error(C),o("Unable to login with the OAuth provider.")}finally{r(!1)}}const v=G.useRef(!0);return G.useEffect(()=>{v.current&&(v.current=!1,p())},[]),{user:e,error:s,isLoading:t}}const T0=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.25rem",height:"1.25rem",fill:"currentColor",stroke:"currentColor",strokeWidth:0,"aria-hidden":"true",viewBox:"0 0 20 20",children:f.jsx("path",{fillRule:"evenodd",stroke:"none",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM9 9a1 1 0 0 0 0 2v3a1 1 0 0 0 1 1h1a1 1 0 1 0 0-2v-3a1 1 0 0 0-1-1H9z",clipRule:"evenodd"})});async function $L(e){return En.post("/auth/exchange-code",e)}function XL(e){return e.data&&typeof e.data.sessionId=="string"}const YL={LandingPageRoute:NA,LoginRoute:VA,SignupRoute:$A,TocPageRoute:XA,PrivacyRoute:YA,ChatPageRoute:sE,PricingPageRoute:lE,AccountRoute:wr(uE),CheckoutRoute:wr(fE),AdminRoute:wr(zE),AdminUsersRoute:wr(BE),AdminSettingsRoute:wr(SL),AdminChartsRoute:wr(LL),AdminMessagesRoute:wr(PL),AdminFormElementsRoute:wr(ML),AdminFormLayoutsRoute:wr(OL),AdminCalendarRoute:wr(IL),AdminUIAlertsRoute:wr(zL),AdminUIButtonsRoute:wr(FL)},UL=f.jsx(R8,{basename:"/",children:f.jsx(kA,{children:f.jsxs(T8,{children:[Object.entries(Mk).map(([e,t])=>f.jsx(ym,{exact:!0,path:t.to,component:YL[e]},e)),f.jsx(ym,{exact:!0,path:"/oauth/callback",children:f.jsx(VL,{})})]})})});GL();async function GL(){l9(),await ZL()}async function ZL(){const e=await c1;Ku.createRoot(document.getElementById("root")).render(f.jsx(pe.StrictMode,{children:f.jsx(yw,{client:e,children:f.jsx(Fj,{children:UL})})}))} +`;var P0=$r;const AL=()=>{const e=t=>{t.preventDefault(),confirm("Are you sure you want to save the changes?")?P0.success("Your changes have been saved successfully!"):P0.error("Your changes have not been saved!")};return f.jsx(Hi,{children:f.jsxs("div",{className:"mx-auto max-w-270",children:[f.jsx(Pn,{pageName:"Settings"}),f.jsxs("div",{className:"grid grid-cols-5 gap-8",children:[f.jsx("div",{className:"col-span-5 xl:col-span-3",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-7 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Personal Information"})}),f.jsx("div",{className:"p-7",children:f.jsxs("form",{onSubmit:e,children:[f.jsxs("div",{className:"mb-5.5 flex flex-col gap-5.5 sm:flex-row",children:[f.jsxs("div",{className:"w-full sm:w-1/2",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"fullName",children:"Full Name"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsx("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.72039 12.887C4.50179 12.1056 5.5616 11.6666 6.66667 11.6666H13.3333C14.4384 11.6666 15.4982 12.1056 16.2796 12.887C17.061 13.6684 17.5 14.7282 17.5 15.8333V17.5C17.5 17.9602 17.1269 18.3333 16.6667 18.3333C16.2064 18.3333 15.8333 17.9602 15.8333 17.5V15.8333C15.8333 15.1703 15.5699 14.5344 15.1011 14.0655C14.6323 13.5967 13.9964 13.3333 13.3333 13.3333H6.66667C6.00363 13.3333 5.36774 13.5967 4.8989 14.0655C4.43006 14.5344 4.16667 15.1703 4.16667 15.8333V17.5C4.16667 17.9602 3.79357 18.3333 3.33333 18.3333C2.8731 18.3333 2.5 17.9602 2.5 17.5V15.8333C2.5 14.7282 2.93899 13.6684 3.72039 12.887Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99967 3.33329C8.61896 3.33329 7.49967 4.45258 7.49967 5.83329C7.49967 7.214 8.61896 8.33329 9.99967 8.33329C11.3804 8.33329 12.4997 7.214 12.4997 5.83329C12.4997 4.45258 11.3804 3.33329 9.99967 3.33329ZM5.83301 5.83329C5.83301 3.53211 7.69849 1.66663 9.99967 1.66663C12.3009 1.66663 14.1663 3.53211 14.1663 5.83329C14.1663 8.13448 12.3009 9.99996 9.99967 9.99996C7.69849 9.99996 5.83301 8.13448 5.83301 5.83329Z",fill:""})]})})}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"fullName",id:"fullName",placeholder:"Devid Jhon",defaultValue:"Devid Jhon"})]})]}),f.jsxs("div",{className:"w-full sm:w-1/2",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"phoneNumber",children:"Phone Number"}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 px-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"phoneNumber",id:"phoneNumber",placeholder:"+990 3343 7865",defaultValue:"+990 3343 7865"})]})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"emailAddress",children:"Email Address"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsx("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33301 4.16667C2.87658 4.16667 2.49967 4.54357 2.49967 5V15C2.49967 15.4564 2.87658 15.8333 3.33301 15.8333H16.6663C17.1228 15.8333 17.4997 15.4564 17.4997 15V5C17.4997 4.54357 17.1228 4.16667 16.6663 4.16667H3.33301ZM0.833008 5C0.833008 3.6231 1.9561 2.5 3.33301 2.5H16.6663C18.0432 2.5 19.1663 3.6231 19.1663 5V15C19.1663 16.3769 18.0432 17.5 16.6663 17.5H3.33301C1.9561 17.5 0.833008 16.3769 0.833008 15V5Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.983719 4.52215C1.24765 4.1451 1.76726 4.05341 2.1443 4.31734L9.99975 9.81615L17.8552 4.31734C18.2322 4.05341 18.7518 4.1451 19.0158 4.52215C19.2797 4.89919 19.188 5.4188 18.811 5.68272L10.4776 11.5161C10.1907 11.7169 9.80879 11.7169 9.52186 11.5161L1.18853 5.68272C0.811486 5.4188 0.719791 4.89919 0.983719 4.52215Z",fill:""})]})})}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"email",name:"emailAddress",id:"emailAddress",placeholder:"devidjond45@gmail.com",defaultValue:"devidjond45@gmail.com"})]})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"Username",children:"Username"}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 px-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"Username",id:"Username",placeholder:"devidjhon24",defaultValue:"devidjhon24"})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"Username",children:"BIO"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{opacity:"0.8",clipPath:"url(#clip0_88_10224)",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.56524 3.23223C2.03408 2.76339 2.66997 2.5 3.33301 2.5H9.16634C9.62658 2.5 9.99967 2.8731 9.99967 3.33333C9.99967 3.79357 9.62658 4.16667 9.16634 4.16667H3.33301C3.11199 4.16667 2.90003 4.25446 2.74375 4.41074C2.58747 4.56702 2.49967 4.77899 2.49967 5V16.6667C2.49967 16.8877 2.58747 17.0996 2.74375 17.2559C2.90003 17.4122 3.11199 17.5 3.33301 17.5H14.9997C15.2207 17.5 15.4326 17.4122 15.5889 17.2559C15.7452 17.0996 15.833 16.8877 15.833 16.6667V10.8333C15.833 10.3731 16.2061 10 16.6663 10C17.1266 10 17.4997 10.3731 17.4997 10.8333V16.6667C17.4997 17.3297 17.2363 17.9656 16.7674 18.4344C16.2986 18.9033 15.6627 19.1667 14.9997 19.1667H3.33301C2.66997 19.1667 2.03408 18.9033 1.56524 18.4344C1.0964 17.9656 0.833008 17.3297 0.833008 16.6667V5C0.833008 4.33696 1.0964 3.70107 1.56524 3.23223Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6664 2.39884C16.4185 2.39884 16.1809 2.49729 16.0056 2.67253L8.25216 10.426L7.81167 12.188L9.57365 11.7475L17.3271 3.99402C17.5023 3.81878 17.6008 3.5811 17.6008 3.33328C17.6008 3.08545 17.5023 2.84777 17.3271 2.67253C17.1519 2.49729 16.9142 2.39884 16.6664 2.39884ZM14.8271 1.49402C15.3149 1.00622 15.9765 0.732178 16.6664 0.732178C17.3562 0.732178 18.0178 1.00622 18.5056 1.49402C18.9934 1.98182 19.2675 2.64342 19.2675 3.33328C19.2675 4.02313 18.9934 4.68473 18.5056 5.17253L10.5889 13.0892C10.4821 13.196 10.3483 13.2718 10.2018 13.3084L6.86847 14.1417C6.58449 14.2127 6.28409 14.1295 6.0771 13.9225C5.87012 13.7156 5.78691 13.4151 5.85791 13.1312L6.69124 9.79783C6.72787 9.65131 6.80364 9.51749 6.91044 9.41069L14.8271 1.49402Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_88_10224",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),f.jsx("textarea",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",name:"bio",id:"bio",rows:6,placeholder:"Write your bio here",defaultValue:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque posuere fermentum urna, eu condimentum mauris tempus ut. Donec fermentum blandit aliquet."})]})]}),f.jsxs("div",{className:"flex justify-end gap-4.5",children:[f.jsx("button",{className:"flex justify-center rounded border border-stroke py-2 px-6 font-medium text-black hover:shadow-1 dark:border-strokedark dark:text-white",type:"submit",children:"Cancel"}),f.jsx("button",{className:"flex justify-center rounded bg-primary py-2 px-6 font-medium text-gray hover:shadow-1",type:"submit",children:"Save"})]})]})})]})}),f.jsx("div",{className:"col-span-5 xl:col-span-2",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-7 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Your Photo"})}),f.jsx("div",{className:"p-7",children:f.jsxs("form",{action:"#",children:[f.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[f.jsx("div",{className:"h-14 w-14 rounded-full"}),f.jsxs("div",{children:[f.jsx("span",{className:"mb-1.5 text-black dark:text-white",children:"Edit your photo"}),f.jsxs("span",{className:"flex gap-2.5",children:[f.jsx("button",{className:"text-sm hover:text-primary",children:"Delete"}),f.jsx("button",{className:"text-sm hover:text-primary",children:"Update"})]})]})]}),f.jsxs("div",{id:"FileUpload",className:"relative mb-5.5 block w-full cursor-pointer appearance-none rounded border-2 border-dashed border-primary bg-gray py-4 px-4 dark:bg-meta-4 sm:py-7.5",children:[f.jsx("input",{type:"file",accept:"image/*",className:"absolute inset-0 z-50 m-0 h-full w-full cursor-pointer p-0 opacity-0 outline-none"}),f.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[f.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full border border-stroke bg-white dark:border-strokedark dark:bg-boxdark",children:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.99967 9.33337C2.36786 9.33337 2.66634 9.63185 2.66634 10V12.6667C2.66634 12.8435 2.73658 13.0131 2.8616 13.1381C2.98663 13.2631 3.1562 13.3334 3.33301 13.3334H12.6663C12.8431 13.3334 13.0127 13.2631 13.1377 13.1381C13.2628 13.0131 13.333 12.8435 13.333 12.6667V10C13.333 9.63185 13.6315 9.33337 13.9997 9.33337C14.3679 9.33337 14.6663 9.63185 14.6663 10V12.6667C14.6663 13.1971 14.4556 13.7058 14.0806 14.0809C13.7055 14.456 13.1968 14.6667 12.6663 14.6667H3.33301C2.80257 14.6667 2.29387 14.456 1.91879 14.0809C1.54372 13.7058 1.33301 13.1971 1.33301 12.6667V10C1.33301 9.63185 1.63148 9.33337 1.99967 9.33337Z",fill:"#3C50E0"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5286 1.52864C7.78894 1.26829 8.21106 1.26829 8.4714 1.52864L11.8047 4.86197C12.0651 5.12232 12.0651 5.54443 11.8047 5.80478C11.5444 6.06513 11.1223 6.06513 10.8619 5.80478L8 2.94285L5.13807 5.80478C4.87772 6.06513 4.45561 6.06513 4.19526 5.80478C3.93491 5.54443 3.93491 5.12232 4.19526 4.86197L7.5286 1.52864Z",fill:"#3C50E0"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99967 1.33337C8.36786 1.33337 8.66634 1.63185 8.66634 2.00004V10C8.66634 10.3682 8.36786 10.6667 7.99967 10.6667C7.63148 10.6667 7.33301 10.3682 7.33301 10V2.00004C7.33301 1.63185 7.63148 1.33337 7.99967 1.33337Z",fill:"#3C50E0"})]})}),f.jsxs("p",{children:[f.jsx("span",{className:"text-primary",children:"Click to upload"})," or drag and drop"]}),f.jsx("p",{className:"mt-1.5",children:"SVG, PNG, JPG or GIF"}),f.jsx("p",{children:"(max, 800 X 800px)"})]})]}),f.jsxs("div",{className:"flex justify-end gap-4.5",children:[f.jsx("button",{className:"flex justify-center rounded border border-stroke py-2 px-6 font-medium text-black hover:shadow-1 dark:border-strokedark dark:text-white",type:"submit",children:"Cancel"}),f.jsx("button",{className:"flex justify-center rounded bg-primary py-2 px-6 font-medium text-gray hover:bg-opacity-70",type:"submit",children:"Save"})]})]})})]})})]})]})})},jL=()=>{const[e,t]=G.useState({series:[{data:[168,385,201,298,187,195,291,110,215,390,280,112,123,212,270,190,310,115,90,380,112,223,292,170,290,110,115,290,380,312]}]}),r={colors:["#3C50E0"],chart:{fontFamily:"Satoshi, sans-serif",type:"bar",height:350,toolbar:{show:!1}},plotOptions:{bar:{horizontal:!1,columnWidth:"55%",borderRadius:2}},dataLabels:{enabled:!1},stroke:{show:!0,width:4,colors:["transparent"]},xaxis:{categories:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],axisBorder:{show:!1},axisTicks:{show:!1}},legend:{show:!0,position:"top",horizontalAlign:"left",fontFamily:"inter",markers:{radius:99}},grid:{yaxis:{lines:{show:!1}}},fill:{opacity:1},tooltip:{x:{show:!1}}};return f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5",children:[f.jsx("div",{children:f.jsx("h3",{className:"text-xl font-semibold text-black dark:text-white",children:"Visitors Analytics"})}),f.jsx("div",{className:"mb-2",children:f.jsx("div",{id:"chartFour",className:"-ml-5",children:f.jsx(Vd,{options:r,series:e.series,type:"bar",height:350})})})]})},NL={chart:{type:"donut"},colors:["#10B981","#375E83","#259AE6","#FFA70B"],labels:["Remote","Hybrid","Onsite","Leave"],legend:{show:!0,position:"bottom"},plotOptions:{pie:{donut:{size:"65%",background:"transparent"}}},dataLabels:{enabled:!1},responsive:[{breakpoint:2600,options:{chart:{width:380}}},{breakpoint:640,options:{chart:{width:200}}}]},EL=()=>{const[e,t]=G.useState({series:[65,34,12,56]});return f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:col-span-5",children:[f.jsxs("div",{className:"mb-3 justify-between gap-4 sm:flex",children:[f.jsx("div",{children:f.jsx("h5",{className:"text-xl font-semibold text-black dark:text-white",children:"Visitors Analytics"})}),f.jsx("div",{children:f.jsxs("div",{className:"relative z-20 inline-block",children:[f.jsxs("select",{name:"",id:"",className:"relative z-20 inline-flex appearance-none bg-transparent py-1 pl-3 pr-8 text-sm font-medium outline-none",children:[f.jsx("option",{value:"",children:"Monthly"}),f.jsx("option",{value:"",children:"Yearly"})]}),f.jsx("span",{className:"absolute top-1/2 right-3 z-10 -translate-y-1/2",children:f.jsxs("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M0.47072 1.08816C0.47072 1.02932 0.500141 0.955772 0.54427 0.911642C0.647241 0.808672 0.809051 0.808672 0.912022 0.896932L4.85431 4.60386C4.92785 4.67741 5.06025 4.67741 5.14851 4.60386L9.09079 0.896932C9.19376 0.793962 9.35557 0.808672 9.45854 0.911642C9.56151 1.01461 9.5468 1.17642 9.44383 1.27939L5.50155 4.98632C5.22206 5.23639 4.78076 5.23639 4.51598 4.98632L0.558981 1.27939C0.50014 1.22055 0.47072 1.16171 0.47072 1.08816Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.22659 0.546578L5.00141 4.09604L8.76422 0.557869C9.08459 0.244537 9.54201 0.329403 9.79139 0.578788C10.112 0.899434 10.0277 1.36122 9.77668 1.61224L9.76644 1.62248L5.81552 5.33722C5.36257 5.74249 4.6445 5.7544 4.19352 5.32924C4.19327 5.32901 4.19377 5.32948 4.19352 5.32924L0.225953 1.61241C0.102762 1.48922 -4.20186e-08 1.31674 -3.20269e-08 1.08816C-2.40601e-08 0.905899 0.0780105 0.712197 0.211421 0.578787C0.494701 0.295506 0.935574 0.297138 1.21836 0.539529L1.22659 0.546578ZM4.51598 4.98632C4.78076 5.23639 5.22206 5.23639 5.50155 4.98632L9.44383 1.27939C9.5468 1.17642 9.56151 1.01461 9.45854 0.911642C9.35557 0.808672 9.19376 0.793962 9.09079 0.896932L5.14851 4.60386C5.06025 4.67741 4.92785 4.67741 4.85431 4.60386L0.912022 0.896932C0.809051 0.808672 0.647241 0.808672 0.54427 0.911642C0.500141 0.955772 0.47072 1.02932 0.47072 1.08816C0.47072 1.16171 0.50014 1.22055 0.558981 1.27939L4.51598 4.98632Z",fill:"#637381"})]})})]})})]}),f.jsx("div",{className:"mb-2",children:f.jsx("div",{id:"chartThree",className:"mx-auto flex justify-center",children:f.jsx(Vd,{options:NL,series:e.series,type:"donut"})})}),f.jsxs("div",{className:"-mx-8 flex flex-wrap items-center justify-center gap-y-3",children:[f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-primary"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Desktop "}),f.jsx("span",{children:" 65% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#6577F3]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Tablet "}),f.jsx("span",{children:" 34% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#8FD0EF]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Mobile "}),f.jsx("span",{children:" 45% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#0FADCF]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Unknown "}),f.jsx("span",{children:" 12% "})]})]})})]})]})},LL=()=>f.jsx("div",{className:"col-span-12 rounded-sm border border-stroke bg-white p-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:f.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2 xl:grid-cols-4 xl:gap-0",children:[f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark xl:border-b-0 xl:border-r xl:pb-0",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"$4,350"}),f.jsx("p",{className:"text-sm font-medium",children:"Unique Visitors"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"18%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark xl:border-b-0 xl:border-r xl:pb-0",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"55.9K"}),f.jsx("p",{className:"text-sm font-medium",children:"Total Pageviews"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"25%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark sm:border-b-0 sm:pb-0 xl:border-r",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"54%"}),f.jsx("p",{className:"text-sm font-medium",children:"Bounce Rate"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M9.75302 12.1328L13.7773 8.10856L14.8381 9.16939L9.00279 15.0047L3.16748 9.16939L4.22831 8.10856L8.25256 12.1328V3.00098H9.75302V12.1328Z",fill:"#F0950C"})}),f.jsx("span",{className:"text-meta-8",children:"7%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"2m 56s"}),f.jsx("p",{className:"text-sm font-medium",children:"Visit Duration"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"12%"})]})]})]})}),PL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Chart"}),f.jsxs("div",{className:"grid grid-cols-12 gap-4 md:gap-6 2xl:gap-7.5",children:[f.jsx(LL,{}),f.jsx("div",{className:"col-span-12",children:f.jsx(jL,{})}),f.jsx(EL,{})]})]});function TL(){return f.jsx("div",{children:"Hello world!"})}const RL=()=>{const[e,t]=G.useState(!1);return f.jsx("div",{children:f.jsxs("label",{htmlFor:"checkboxLabelFour",className:"flex cursor-pointer select-none items-center",children:[f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:"checkboxLabelFour",className:"sr-only",onChange:()=>{t(!e)}}),f.jsx("div",{className:`mr-4 flex h-5 w-5 items-center justify-center rounded-full border ${e&&"border-primary"}`,children:f.jsx("span",{className:`h-2.5 w-2.5 rounded-full bg-transparent ${e&&"!bg-primary"}`,children:" "})})]}),"Checkbox Text"]})})},_L=({user:e,updateUserById:t})=>{const[r,s]=G.useState((e==null?void 0:e.hasPaid)||!1);return f.jsx("div",{className:"relative",children:f.jsx("label",{htmlFor:`toggle1-${e==null?void 0:e.id}`,className:"flex cursor-pointer select-none items-center",children:f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:`toggle1-${e==null?void 0:e.id}`,className:"sr-only",onChange:()=>{s(!r),t&&t({id:e==null?void 0:e.id,data:{hasPaid:!r}})}}),f.jsx("div",{className:"reblock h-8 w-14 rounded-full bg-meta-9 dark:bg-[#5A616B]"}),f.jsx("div",{className:`absolute left-1 top-1 h-6 w-6 rounded-full bg-white dark:bg-gray-400 transition ${r&&"!right-1 !translate-x-full !bg-primary dark:!bg-white"}`})]})})})},ML=()=>{const[e,t]=G.useState(!1);return f.jsx("div",{children:f.jsx("label",{htmlFor:"toggle3",className:"flex cursor-pointer select-none items-center",children:f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:"toggle3",className:"sr-only",onChange:()=>{t(!e)}}),f.jsx("div",{className:"block h-8 w-14 rounded-full bg-meta-9 dark:bg-[#5A616B]"}),f.jsxs("div",{className:`dot absolute left-1 top-1 flex h-6 w-6 items-center justify-center rounded-full bg-white transition ${e&&"!right-1 !translate-x-full !bg-primary dark:!bg-white"}`,children:[f.jsx("span",{className:`hidden ${e&&"!block"}`,children:f.jsx("svg",{className:"fill-white dark:fill-black",width:"11",height:"8",viewBox:"0 0 11 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M10.0915 0.951972L10.0867 0.946075L10.0813 0.940568C9.90076 0.753564 9.61034 0.753146 9.42927 0.939309L4.16201 6.22962L1.58507 3.63469C1.40401 3.44841 1.11351 3.44879 0.932892 3.63584C0.755703 3.81933 0.755703 4.10875 0.932892 4.29224L0.932878 4.29225L0.934851 4.29424L3.58046 6.95832C3.73676 7.11955 3.94983 7.2 4.1473 7.2C4.36196 7.2 4.55963 7.11773 4.71406 6.9584L10.0468 1.60234C10.2436 1.4199 10.2421 1.1339 10.0915 0.951972ZM4.2327 6.30081L4.2317 6.2998C4.23206 6.30015 4.23237 6.30049 4.23269 6.30082L4.2327 6.30081Z",fill:"",stroke:"",strokeWidth:"0.4"})})}),f.jsx("span",{className:`${e&&"hidden"}`,children:f.jsx("svg",{className:"h-4 w-4 stroke-current",fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]})]})})})},OL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"FormElements"}),f.jsxs("div",{className:"grid grid-cols-1 gap-9 sm:grid-cols-2",children:[f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Input Fields"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Default Input"}),f.jsx("input",{type:"text",placeholder:"Default Input",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Active Input"}),f.jsx("input",{type:"text",placeholder:"Active Input",className:"w-full rounded-lg border-[1.5px] border-primary bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:bg-form-input"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block font-medium text-black dark:text-white",children:"Disabled label"}),f.jsx("input",{type:"text",placeholder:"Disabled label",disabled:!0,className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary dark:disabled:bg-black"})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Toggle switch input"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsx(_L,{}),f.jsx(ML,{})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Time and date"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Date picker"}),f.jsx("div",{className:"relative",children:f.jsx("input",{type:"date",className:"custom-input-date custom-input-date-1 w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Select date"}),f.jsx("div",{className:"relative",children:f.jsx("input",{type:"date",className:"custom-input-date custom-input-date-2 w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"File upload"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Attach file"}),f.jsx("input",{type:"file",className:"w-full cursor-pointer rounded-lg border-[1.5px] border-stroke bg-transparent font-medium outline-none transition file:mr-5 file:border-collapse file:cursor-pointer file:border-0 file:border-r file:border-solid file:border-stroke file:bg-whiter file:py-3 file:px-5 file:hover:bg-primary file:hover:bg-opacity-10 focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:file:border-form-strokedark dark:file:bg-white/30 dark:file:text-white dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Attach file"}),f.jsx("input",{type:"file",className:"w-full rounded-md border border-stroke p-3 outline-none transition file:mr-4 file:rounded file:border-[0.5px] file:border-stroke file:bg-[#EEEEEE] file:py-1 file:px-2.5 file:text-sm file:font-medium focus:border-primary file:focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:file:border-strokedark dark:file:bg-white/30 dark:file:text-white"})]})]})]})]}),f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Textarea Fields"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Default textarea"}),f.jsx("textarea",{rows:6,placeholder:"Default textarea",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Active textarea"}),f.jsx("textarea",{rows:6,placeholder:"Active textarea",className:"w-full rounded-lg border-[1.5px] border-primary bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:bg-form-input"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Disabled textarea"}),f.jsx("textarea",{rows:6,disabled:!0,placeholder:"Disabled textarea",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary dark:disabled:bg-black"})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Checkbox and radio"})}),f.jsx("div",{className:"flex flex-col gap-5.5 p-6.5",children:f.jsx(RL,{})})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Select input"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Select Country"}),f.jsxs("div",{className:"relative z-20 bg-white dark:bg-form-input",children:[f.jsx("span",{className:"absolute top-1/2 left-4 z-30 -translate-y-1/2",children:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0007 2.50065C5.85852 2.50065 2.50065 5.85852 2.50065 10.0007C2.50065 14.1428 5.85852 17.5007 10.0007 17.5007C14.1428 17.5007 17.5007 14.1428 17.5007 10.0007C17.5007 5.85852 14.1428 2.50065 10.0007 2.50065ZM0.833984 10.0007C0.833984 4.93804 4.93804 0.833984 10.0007 0.833984C15.0633 0.833984 19.1673 4.93804 19.1673 10.0007C19.1673 15.0633 15.0633 19.1673 10.0007 19.1673C4.93804 19.1673 0.833984 15.0633 0.833984 10.0007Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.833984 9.99935C0.833984 9.53911 1.20708 9.16602 1.66732 9.16602H18.334C18.7942 9.16602 19.1673 9.53911 19.1673 9.99935C19.1673 10.4596 18.7942 10.8327 18.334 10.8327H1.66732C1.20708 10.8327 0.833984 10.4596 0.833984 9.99935Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.50084 10.0008C7.55796 12.5632 8.4392 15.0301 10.0006 17.0418C11.5621 15.0301 12.4433 12.5632 12.5005 10.0008C12.4433 7.43845 11.5621 4.97153 10.0007 2.95982C8.4392 4.97153 7.55796 7.43845 7.50084 10.0008ZM10.0007 1.66749L9.38536 1.10547C7.16473 3.53658 5.90275 6.69153 5.83417 9.98346C5.83392 9.99503 5.83392 10.0066 5.83417 10.0182C5.90275 13.3101 7.16473 16.4651 9.38536 18.8962C9.54325 19.069 9.76655 19.1675 10.0007 19.1675C10.2348 19.1675 10.4581 19.069 10.6159 18.8962C12.8366 16.4651 14.0986 13.3101 14.1671 10.0182C14.1674 10.0066 14.1674 9.99503 14.1671 9.98346C14.0986 6.69153 12.8366 3.53658 10.6159 1.10547L10.0007 1.66749Z",fill:"#637381"})]})})}),f.jsxs("select",{className:"relative z-20 w-full appearance-none rounded border border-stroke bg-transparent py-3 px-12 outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsx("option",{value:"",children:"USA"}),f.jsx("option",{value:"",children:"UK"}),f.jsx("option",{value:"",children:"Canada"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-10 -translate-y-1/2",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:"#637381"})})})})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Multiselect Dropdown"}),f.jsxs("div",{className:"relative z-20 w-full rounded border border-stroke p-1.5 pr-8 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsxs("div",{className:"flex flex-wrap items-center",children:[f.jsxs("span",{className:"m-1.5 flex items-center justify-center rounded border-[.5px] border-stroke bg-gray py-1.5 px-2.5 text-sm font-medium dark:border-strokedark dark:bg-white/30",children:["Design",f.jsx("span",{className:"cursor-pointer pl-2 hover:text-danger",children:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.35355 3.35355C9.54882 3.15829 9.54882 2.84171 9.35355 2.64645C9.15829 2.45118 8.84171 2.45118 8.64645 2.64645L6 5.29289L3.35355 2.64645C3.15829 2.45118 2.84171 2.45118 2.64645 2.64645C2.45118 2.84171 2.45118 3.15829 2.64645 3.35355L5.29289 6L2.64645 8.64645C2.45118 8.84171 2.45118 9.15829 2.64645 9.35355C2.84171 9.54882 3.15829 9.54882 3.35355 9.35355L6 6.70711L8.64645 9.35355C8.84171 9.54882 9.15829 9.54882 9.35355 9.35355C9.54882 9.15829 9.54882 8.84171 9.35355 8.64645L6.70711 6L9.35355 3.35355Z",fill:"currentColor"})})})]}),f.jsxs("span",{className:"m-1.5 flex items-center justify-center rounded border-[.5px] border-stroke bg-gray py-1.5 px-2.5 text-sm font-medium dark:border-strokedark dark:bg-white/30",children:["Development",f.jsx("span",{className:"cursor-pointer pl-2 hover:text-danger",children:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.35355 3.35355C9.54882 3.15829 9.54882 2.84171 9.35355 2.64645C9.15829 2.45118 8.84171 2.45118 8.64645 2.64645L6 5.29289L3.35355 2.64645C3.15829 2.45118 2.84171 2.45118 2.64645 2.64645C2.45118 2.84171 2.45118 3.15829 2.64645 3.35355L5.29289 6L2.64645 8.64645C2.45118 8.84171 2.45118 9.15829 2.64645 9.35355C2.84171 9.54882 3.15829 9.54882 3.35355 9.35355L6 6.70711L8.64645 9.35355C8.84171 9.54882 9.15829 9.54882 9.35355 9.35355C9.54882 9.15829 9.54882 8.84171 9.35355 8.64645L6.70711 6L9.35355 3.35355Z",fill:"currentColor"})})})]})]}),f.jsxs("select",{name:"",id:"",className:"absolute top-0 left-0 z-20 h-full w-full bg-transparent opacity-0",children:[f.jsx("option",{value:"",children:"Option"}),f.jsx("option",{value:"",children:"Option"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-10 -translate-y-1/2",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:"#637381"})})})})]})]})]})]})]})]})]}),IL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"FormLayout"}),f.jsxs("div",{className:"grid grid-cols-1 gap-9 sm:grid-cols-2",children:[f.jsx("div",{className:"flex flex-col gap-9",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Contact Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5 flex flex-col gap-6 xl:flex-row",children:[f.jsxs("div",{className:"w-full xl:w-1/2",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"First name"}),f.jsx("input",{type:"text",placeholder:"Enter your first name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"w-full xl:w-1/2",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Last name"}),f.jsx("input",{type:"text",placeholder:"Enter your last name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsxs("label",{className:"mb-2.5 block text-black dark:text-white",children:["Email ",f.jsx("span",{className:"text-meta-1",children:"*"})]}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Subject"}),f.jsx("input",{type:"text",placeholder:"Select subject",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Subject"}),f.jsxs("div",{className:"relative z-20 bg-transparent dark:bg-form-input",children:[f.jsxs("select",{className:"relative z-20 w-full appearance-none rounded border border-stroke bg-transparent py-3 px-5 outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary",children:[f.jsx("option",{value:"",children:"Type your subject"}),f.jsx("option",{value:"",children:"USA"}),f.jsx("option",{value:"",children:"UK"}),f.jsx("option",{value:"",children:"Canada"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-30 -translate-y-1/2",children:f.jsx("svg",{className:"fill-current",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:""})})})})]})]}),f.jsxs("div",{className:"mb-6",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Message"}),f.jsx("textarea",{rows:6,placeholder:"Type your message",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Send Message"})]})})]})}),f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Sign In Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Email"}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Password"}),f.jsx("input",{type:"password",placeholder:"Enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mt-5 mb-5.5 flex items-center justify-between",children:[f.jsxs("label",{htmlFor:"formCheckbox",className:"flex cursor-pointer",children:[f.jsxs("div",{className:"relative pt-0.5",children:[f.jsx("input",{type:"checkbox",id:"formCheckbox",className:"taskCheckbox sr-only"}),f.jsx("div",{className:"box mr-3 flex h-5 w-5 items-center justify-center rounded border border-stroke dark:border-strokedark",children:f.jsx("span",{className:"text-white opacity-0",children:f.jsx("svg",{className:"fill-current",width:"10",height:"7",viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70685 0.292804C9.89455 0.480344 10 0.734667 10 0.999847C10 1.26503 9.89455 1.51935 9.70685 1.70689L4.70059 6.7072C4.51283 6.89468 4.2582 7 3.9927 7C3.72721 7 3.47258 6.89468 3.28482 6.7072L0.281063 3.70701C0.0986771 3.5184 -0.00224342 3.26578 3.785e-05 3.00357C0.00231912 2.74136 0.10762 2.49053 0.29326 2.30511C0.4789 2.11969 0.730026 2.01451 0.992551 2.01224C1.25508 2.00996 1.50799 2.11076 1.69683 2.29293L3.9927 4.58607L8.29108 0.292804C8.47884 0.105322 8.73347 0 8.99896 0C9.26446 0 9.51908 0.105322 9.70685 0.292804Z",fill:""})})})})]}),f.jsx("p",{children:"Remember me"})]}),f.jsx("a",{href:"#",className:"text-sm text-primary",children:"Forget password?"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Sign In"})]})})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Sign Up Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Name"}),f.jsx("input",{type:"text",placeholder:"Enter your full name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Email"}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Password"}),f.jsx("input",{type:"password",placeholder:"Enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Re-type Password"}),f.jsx("input",{type:"password",placeholder:"Re-enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Sign Up"})]})})]})]})]})]}),zL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Calendar"}),f.jsx("div",{className:"w-full max-w-full rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:f.jsxs("table",{className:"w-full",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"grid grid-cols-7 rounded-t-sm bg-primary text-white",children:[f.jsxs("th",{className:"flex h-15 items-center justify-center rounded-tl-sm p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Sunday "}),f.jsx("span",{className:"block lg:hidden",children:" Sun "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Monday "}),f.jsx("span",{className:"block lg:hidden",children:" Mon "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Tuesday "}),f.jsx("span",{className:"block lg:hidden",children:" Tue "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Wednesday "}),f.jsx("span",{className:"block lg:hidden",children:" Wed "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Thursday "}),f.jsx("span",{className:"block lg:hidden",children:" Thur "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Friday "}),f.jsx("span",{className:"block lg:hidden",children:" Fri "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center rounded-tr-sm p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Saturday "}),f.jsx("span",{className:"block lg:hidden",children:" Sat "})]})]})}),f.jsxs("tbody",{children:[f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsxs("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:[f.jsx("span",{className:"font-medium text-black dark:text-white",children:"1"}),f.jsxs("div",{className:"group h-16 w-full flex-grow cursor-pointer py-1 md:h-30",children:[f.jsx("span",{className:"group-hover:text-primary md:hidden",children:"More"}),f.jsxs("div",{className:"event invisible absolute left-2 z-99 mb-1 flex w-[200%] flex-col rounded-sm border-l-[3px] border-primary bg-gray px-3 py-1 text-left opacity-0 group-hover:visible group-hover:opacity-100 dark:bg-meta-4 md:visible md:w-[190%] md:opacity-100",children:[f.jsx("span",{className:"event-name text-sm font-semibold text-black dark:text-white",children:"Redesign Website"}),f.jsx("span",{className:"time text-sm font-medium text-black dark:text-white",children:"1 Dec - 2 Dec"})]})]})]}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"2"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"3"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"4"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"5"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"6"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"7"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"8"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"9"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"10"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"11"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"12"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"13"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"14"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"15"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"16"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"17"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"18"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"19"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"20"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"21"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"22"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"23"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"24"})}),f.jsxs("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:[f.jsx("span",{className:"font-medium text-black dark:text-white",children:"25"}),f.jsxs("div",{className:"group h-16 w-full flex-grow cursor-pointer py-1 md:h-30",children:[f.jsx("span",{className:"group-hover:text-primary md:hidden",children:"More"}),f.jsxs("div",{className:"event invisible absolute left-2 z-99 mb-1 flex w-[300%] flex-col rounded-sm border-l-[3px] border-primary bg-gray px-3 py-1 text-left opacity-0 group-hover:visible group-hover:opacity-100 dark:bg-meta-4 md:visible md:w-[290%] md:opacity-100",children:[f.jsx("span",{className:"event-name text-sm font-semibold text-black dark:text-white",children:"App Design"}),f.jsx("span",{className:"time text-sm font-medium text-black dark:text-white",children:"25 Dec - 27 Dec"})]})]})]}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"26"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"27"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"28"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"29"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"30"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"31"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"1"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"2"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"3"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"4"})})]})]})]})})]}),FL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Alerts"}),f.jsx("div",{className:"rounded-sm border border-stroke bg-white p-4 shadow-default dark:border-strokedark dark:bg-boxdark md:p-6 xl:p-9",children:f.jsxs("div",{className:"flex flex-col gap-7.5",children:[f.jsxs("div",{className:"flex w-full border-l-6 border-warning bg-warning bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-9 items-center justify-center rounded-lg bg-warning bg-opacity-30",children:f.jsx("svg",{width:"19",height:"16",viewBox:"0 0 19 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M1.50493 16H17.5023C18.6204 16 19.3413 14.9018 18.8354 13.9735L10.8367 0.770573C10.2852 -0.256858 8.70677 -0.256858 8.15528 0.770573L0.156617 13.9735C-0.334072 14.8998 0.386764 16 1.50493 16ZM10.7585 12.9298C10.7585 13.6155 10.2223 14.1433 9.45583 14.1433C8.6894 14.1433 8.15311 13.6155 8.15311 12.9298V12.9015C8.15311 12.2159 8.6894 11.688 9.45583 11.688C10.2223 11.688 10.7585 12.2159 10.7585 12.9015V12.9298ZM8.75236 4.01062H10.2548C10.6674 4.01062 10.9127 4.33826 10.8671 4.75288L10.2071 10.1186C10.1615 10.5049 9.88572 10.7455 9.50142 10.7455C9.11929 10.7455 8.84138 10.5028 8.79579 10.1186L8.13574 4.75288C8.09449 4.33826 8.33984 4.01062 8.75236 4.01062Z",fill:"#FBBF24"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 text-lg font-semibold text-[#9D5425]",children:"Attention needed"}),f.jsx("p",{className:"leading-relaxed text-[#D0915C]",children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when"})]})]}),f.jsxs("div",{className:"flex w-full border-l-6 border-[#34D399] bg-[#34D399] bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-full max-w-[36px] items-center justify-center rounded-lg bg-[#34D399]",children:f.jsx("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M15.2984 0.826822L15.2868 0.811827L15.2741 0.797751C14.9173 0.401867 14.3238 0.400754 13.9657 0.794406L5.91888 9.45376L2.05667 5.2868C1.69856 4.89287 1.10487 4.89389 0.747996 5.28987C0.417335 5.65675 0.417335 6.22337 0.747996 6.59026L0.747959 6.59029L0.752701 6.59541L4.86742 11.0348C5.14445 11.3405 5.52858 11.5 5.89581 11.5C6.29242 11.5 6.65178 11.3355 6.92401 11.035L15.2162 2.11161C15.5833 1.74452 15.576 1.18615 15.2984 0.826822Z",fill:"white",stroke:"white"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 text-lg font-semibold text-black dark:text-[#34D399] ",children:"Message Sent Successfully"}),f.jsx("p",{className:"text-base leading-relaxed text-body",children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry."})]})]}),f.jsxs("div",{className:"flex w-full border-l-6 border-[#F87171] bg-[#F87171] bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-full max-w-[36px] items-center justify-center rounded-lg bg-[#F87171]",children:f.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M6.4917 7.65579L11.106 12.2645C11.2545 12.4128 11.4715 12.5 11.6738 12.5C11.8762 12.5 12.0931 12.4128 12.2416 12.2645C12.5621 11.9445 12.5623 11.4317 12.2423 11.1114C12.2422 11.1113 12.2422 11.1113 12.2422 11.1113C12.242 11.1111 12.2418 11.1109 12.2416 11.1107L7.64539 6.50351L12.2589 1.91221L12.2595 1.91158C12.5802 1.59132 12.5802 1.07805 12.2595 0.757793C11.9393 0.437994 11.4268 0.437869 11.1064 0.757418C11.1063 0.757543 11.1062 0.757668 11.106 0.757793L6.49234 5.34931L1.89459 0.740581L1.89396 0.739942C1.57364 0.420019 1.0608 0.420019 0.740487 0.739944C0.42005 1.05999 0.419837 1.57279 0.73985 1.89309L6.4917 7.65579ZM6.4917 7.65579L1.89459 12.2639L1.89395 12.2645C1.74546 12.4128 1.52854 12.5 1.32616 12.5C1.12377 12.5 0.906853 12.4128 0.758361 12.2645L1.1117 11.9108L0.758358 12.2645C0.437984 11.9445 0.437708 11.4319 0.757539 11.1116C0.757812 11.1113 0.758086 11.111 0.75836 11.1107L5.33864 6.50287L0.740487 1.89373L6.4917 7.65579Z",fill:"#ffffff",stroke:"#ffffff"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 font-semibold text-[#B45454]",children:"There were 1 errors with your submission"}),f.jsx("ul",{children:f.jsx("li",{className:"leading-relaxed text-[#CD5D5D]",children:"Lorem Ipsum is simply dummy text of the printing"})})]})]})]})})]}),DL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Buttons"}),f.jsxs("div",{className:"mb-10 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke px-7 py-4 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Normal Button"})}),f.jsxs("div",{className:"p-4 md:p-6 xl:p-9",children:[f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]}),f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-meta-3 py-4 px-10 text-center font-medium text-meta-3 hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]}),f.jsxs("div",{className:"flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-black py-4 px-10 text-center font-medium text-black hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]})]})]}),f.jsxs("div",{className:"mb-10 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke px-7 py-4 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Button With Icon"})}),f.jsxs("div",{className:"p-4 md:p-6 xl:p-9",children:[f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]})]}),f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]})]}),f.jsxs("div",{className:"flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]})]})]})]})]}),HL={display:"flex",alignItems:"center",justifyContent:"center",padding:"4rem"},t5={display:"flex",alignItems:"center",gap:".5rem",borderRadius:".5rem",padding:"1rem"},BL={...t5,borderColor:"rgb(240 82 82)",backgroundColor:"rgb(253 232 232)",color:"rgb(200 30 30)"},VL={...t5,borderColor:"rgb(107 114 128)",backgroundColor:"rgb(243 244 246)",color:"rgb(55 65 81)"};function WL(){const{isLoading:e,error:t,user:r}=$L();return r!=null?f.jsx(Yp,{to:"/chat"}):f.jsxs("div",{style:HL,children:[t&&f.jsxs("div",{style:BL,children:[f.jsx(T0,{})," ",t]}),e&&f.jsxs("div",{style:VL,children:[f.jsx(T0,{})," Please wait a moment while we log you in."]})]})}function $L(){const{data:e}=Qr(),[t,r]=G.useState(!0),[s,o]=G.useState(null),c=na();async function p(){try{r(!0);const A=new URLSearchParams(c.search).get("error");if(A!==null){o(A);return}const E=c.hash.slice(1),P=await XL({code:E});if(!YL(P)){o("Unable to login with the OAuth provider.");return}await ob(P.data.sessionId)}catch(C){console.error(C),o("Unable to login with the OAuth provider.")}finally{r(!1)}}const v=G.useRef(!0);return G.useEffect(()=>{v.current&&(v.current=!1,p())},[]),{user:e,error:s,isLoading:t}}const T0=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.25rem",height:"1.25rem",fill:"currentColor",stroke:"currentColor",strokeWidth:0,"aria-hidden":"true",viewBox:"0 0 20 20",children:f.jsx("path",{fillRule:"evenodd",stroke:"none",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM9 9a1 1 0 0 0 0 2v3a1 1 0 0 0 1 1h1a1 1 0 1 0 0-2v-3a1 1 0 0 0-1-1H9z",clipRule:"evenodd"})});async function XL(e){return En.post("/auth/exchange-code",e)}function YL(e){return e.data&&typeof e.data.sessionId=="string"}const UL={LandingPageRoute:EA,LoginRoute:WA,SignupRoute:XA,TocPageRoute:YA,PrivacyRoute:UA,ChatPageRoute:aE,PricingPageRoute:cE,AccountRoute:wr(hE),CheckoutRoute:wr(pE),AdminRoute:wr(FE),AdminUsersRoute:wr(VE),AdminSettingsRoute:wr(AL),AdminChartsRoute:wr(PL),AdminMessagesRoute:wr(TL),AdminFormElementsRoute:wr(OL),AdminFormLayoutsRoute:wr(IL),AdminCalendarRoute:wr(zL),AdminUIAlertsRoute:wr(FL),AdminUIButtonsRoute:wr(DL)},GL=f.jsx(R8,{basename:"/",children:f.jsx(CA,{children:f.jsxs(T8,{children:[Object.entries(Ok).map(([e,t])=>f.jsx(ym,{exact:!0,path:t.to,component:UL[e]},e)),f.jsx(ym,{exact:!0,path:"/oauth/callback",children:f.jsx(WL,{})})]})})});ZL();async function ZL(){l9(),await qL()}async function qL(){const e=await c1;Ku.createRoot(document.getElementById("root")).render(f.jsx(ge.StrictMode,{children:f.jsx(yw,{client:e,children:f.jsx(Dj,{children:GL})})}))} diff --git a/index.html b/index.html index 64d6dc0..22534ec 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ Capt’n.ai - +