From 1cbcdc2a86536d94481d66a65387b9035ea3fe2d Mon Sep 17 00:00:00 2001 From: "github-merge-queue[bot]" Date: Fri, 12 Jul 2024 12:21:30 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20airtai/c?= =?UTF-8?q?aptn-web-ui@b0d5b29c8bac5c3a78011c8c8e4f48aa801f79c9=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-B8G7WjyQ.js => index-B85Ajiob.js} | 47 ++++++++++--------- assets/index-CKbZvW8t.css | 1 - assets/index-M1ZQcW5_.css | 1 + index.html | 4 +- 4 files changed, 27 insertions(+), 26 deletions(-) rename assets/{index-B8G7WjyQ.js => index-B85Ajiob.js} (91%) delete mode 100644 assets/index-CKbZvW8t.css create mode 100644 assets/index-M1ZQcW5_.css diff --git a/assets/index-B8G7WjyQ.js b/assets/index-B85Ajiob.js similarity index 91% rename from assets/index-B8G7WjyQ.js rename to assets/index-B85Ajiob.js index b3d5f1f..d7a8db6 100644 --- a/assets/index-B8G7WjyQ.js +++ b/assets/index-B85Ajiob.js @@ -6,7 +6,7 @@ function S5(e,t){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eh=Object.prototype.hasOwnProperty,G5=/^[: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]*$/,B1={},V1={};function Z5(e){return eh.call(V1,e)?!0:eh.call(B1,e)?!1:G5.test(e)?V1[e]=!0:(B1[e]=!0,!1)}function q5(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 Q5(e,t,r,s){if(t===null||typeof t>"u"||q5(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 sr(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 sr(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 sr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ht[e]=new sr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ht[e]=new sr(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 sr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ht[e]=new sr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ht[e]=new sr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ht[e]=new sr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ht[e]=new sr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xf=/[\-:]([a-z])/g;function Yf(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(Xf,Yf);Ht[t]=new sr(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(Xf,Yf);Ht[t]=new sr(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(Xf,Yf);Ht[t]=new sr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ht[e]=new sr(e,1,!1,e.toLowerCase(),null,!1,!1)});Ht.xlinkHref=new sr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ht[e]=new sr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Uf(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"),eh=Object.prototype.hasOwnProperty,G5=/^[: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]*$/,B1={},V1={};function Z5(e){return eh.call(V1,e)?!0:eh.call(B1,e)?!1:G5.test(e)?V1[e]=!0:(B1[e]=!0,!1)}function q5(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 Q5(e,t,r,s){if(t===null||typeof t>"u"||q5(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 sr(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 sr(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 sr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ht[e]=new sr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ht[e]=new sr(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 sr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ht[e]=new sr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ht[e]=new sr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ht[e]=new sr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ht[e]=new sr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xf=/[\-:]([a-z])/g;function Yf(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(Xf,Yf);Ht[t]=new sr(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(Xf,Yf);Ht[t]=new sr(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(Xf,Yf);Ht[t]=new sr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ht[e]=new sr(e,1,!1,e.toLowerCase(),null,!1,!1)});Ht.xlinkHref=new sr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ht[e]=new sr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Uf(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{Jd=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ma(e):""}function K5(e){switch(e.tag){case 5:return Ma(e.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return e=eu(e.type,!1),e;case 11:return e=eu(e.type.render,!1),e;case 1:return e=eu(e.type,!0),e;default:return""}}function nh(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 ks:return"Fragment";case ws:return"Portal";case th:return"Profiler";case Gf:return"StrictMode";case rh:return"Suspense";case ih:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case q0:return(e.displayName||"Context")+".Consumer";case Z0:return(e._context.displayName||"Context")+".Provider";case Zf: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:nh(e.type)||"Memo";case Ui:t=e._payload,e=e._init;try{return nh(e(t))}catch{}}return null}function J5(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 nh(t);case 8:return t===Gf?"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 xn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function K0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function e3(e){var t=K0(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 ll(e){e._valueTracker||(e._valueTracker=e3(e))}function J0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),s="";return e&&(s=K0(e)?e.checked?"true":"false":e.value),e=s,e!==r?(t.setValue(e),!0):!1}function nc(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 sh(e,t){var r=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function $1(e,t){var r=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;r=xn(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 ex(e,t){t=t.checked,t!=null&&Uf(e,"checked",t,!1)}function ah(e,t){ex(e,t);var r=xn(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")?oh(e,t.type,r):t.hasOwnProperty("defaultValue")&&oh(e,t.type,xn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function X1(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 oh(e,t,r){(t!=="number"||nc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var _a=Array.isArray;function Is(e,t,r,s){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=cl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ro(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Va={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},t3=["Webkit","ms","Moz","O"];Object.keys(Va).forEach(function(e){t3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Va[t]=Va[e]})});function nx(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Va.hasOwnProperty(e)&&Va[e]?(""+t).trim():t+"px"}function sx(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var s=r.indexOf("--")===0,o=nx(r,t[r],s);r==="float"&&(r="cssFloat"),s?e.setProperty(r,o):e[r]=o}}var r3=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 dh(e,t){if(t){if(r3[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 uh(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 hh=null;function Qf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fh=null,zs=null,Fs=null;function G1(e){if(e=Do(e)){if(typeof fh!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=sd(t),fh(e.stateNode,e.type,t))}}function ax(e){zs?Fs?Fs.push(e):Fs=[e]:zs=e}function ox(){if(zs){var e=zs,t=Fs;if(Fs=zs=null,G1(e),t)for(e=0;e>>=0,e===0?32:31-(f3(e)/p3|0)|0}var dl=64,ul=4194304;function Oa(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 lc(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=Oa(v):(c&=p,c!==0&&(s=Oa(c)))}else p=r&~o,p!==0?s=Oa(p):c!==0&&(s=Oa(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 zo(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ur(t),e[t]=r}function v3(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=$a),ig=" ",ng=!1;function Nx(e,t){switch(e){case"keyup":return Y3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ex(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cs=!1;function G3(e,t){switch(e){case"compositionend":return Ex(t);case"keypress":return t.which!==32?null:(ng=!0,ig);case"textInput":return e=t.data,e===ig&&ng?null:e;default:return null}}function Z3(e,t){if(Cs)return e==="compositionend"||!sp&&Nx(e,t)?(e=Ax(),Ol=rp=tn=null,Cs=!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=lg(r)}}function Rx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mx(){for(var e=window,t=nc();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=nc(e.document)}return t}function ap(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 n4(e){var t=Mx(),r=e.focusedElem,s=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Rx(r.ownerDocument.documentElement,r)){if(s!==null&&ap(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=cg(r,c);var p=cg(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,Ss=null,yh=null,Ya=null,bh=!1;function dg(e,t,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;bh||Ss==null||Ss!==nc(s)||(s=Ss,"selectionStart"in s&&ap(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}),Ya&&lo(Ya,s)||(Ya=s,s=uc(yh,"onSelect"),0Ns||(e.current=jh[Ns],jh[Ns]=null,Ns--)}function lt(e,t){Ns++,jh[Ns]=e.current,e.current=t}var vn={},Ut=jn(vn),dr=jn(!1),Kn=vn;function $s(e,t){var r=e.type.contextTypes;if(!r)return vn;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 ur(e){return e=e.childContextTypes,e!=null}function fc(){ut(dr),ut(Ut)}function xg(e,t,r){if(Ut.current!==vn)throw Error(ue(168));lt(Ut,t),lt(dr,r)}function Vx(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,J5(e)||"Unknown",o));return mt({},r,s)}function pc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vn,Kn=Ut.current,lt(Ut,e),lt(dr,dr.current),!0}function vg(e,t,r){var s=e.stateNode;if(!s)throw Error(ue(169));r?(e=Vx(e,t,Kn),s.__reactInternalMemoizedMergedChildContext=e,ut(dr),ut(Ut),lt(Ut,e)):ut(dr),lt(dr,r)}var Ci=null,ad=!1,pu=!1;function Wx(e){Ci===null?Ci=[e]:Ci.push(e)}function m4(e){ad=!0,Wx(e)}function Nn(){if(!pu&&Ci!==null){pu=!0;var e=0,t=nt;try{var r=Ci;for(nt=1;e>=p,o-=p,ji=1<<32-Ur(t)+o|r<J?(fe=Q,Q=null):fe=Q.sibling;var le=I(W,Q,R[J],K);if(le===null){Q===null&&(Q=fe);break}e&&Q&&le.alternate===null&&t(W,Q),V=c(le,V,J),X===null?ee=le:X.sibling=le,X=le,Q=fe}if(J===R.length)return r(W,Q),ht&&Mn(W,J),ee;if(Q===null){for(;JJ?(fe=Q,Q=null):fe=Q.sibling;var Ne=I(W,Q,le.value,K);if(Ne===null){Q===null&&(Q=fe);break}e&&Q&&Ne.alternate===null&&t(W,Q),V=c(Ne,V,J),X===null?ee=Ne:X.sibling=Ne,X=Ne,Q=fe}if(le.done)return r(W,Q),ht&&Mn(W,J),ee;if(Q===null){for(;!le.done;J++,le=R.next())le=P(W,le.value,K),le!==null&&(V=c(le,V,J),X===null?ee=le:X.sibling=le,X=le);return ht&&Mn(W,J),ee}for(Q=s(W,Q);!le.done;J++,le=R.next())le=_(Q,W,J,le.value,K),le!==null&&(e&&le.alternate!==null&&Q.delete(le.key===null?J:le.key),V=c(le,V,J),X===null?ee=le:X.sibling=le,X=le);return e&&Q.forEach(function(ve){return t(W,ve)}),ht&&Mn(W,J),ee}function Z(W,V,R,K){if(typeof R=="object"&&R!==null&&R.type===ks&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case ol:e:{for(var ee=R.key,X=V;X!==null;){if(X.key===ee){if(ee=R.type,ee===ks){if(X.tag===7){r(W,X.sibling),V=o(X,R.props.children),V.return=W,W=V;break e}}else if(X.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Ui&&wg(ee)===X.type){r(W,X.sibling),V=o(X,R.props),V.ref=wa(W,X,R),V.return=W,W=V;break e}r(W,X);break}else t(W,X);X=X.sibling}R.type===ks?(V=Xn(R.props.children,W.mode,K,R.key),V.return=W,W=V):(K=Wl(R.type,R.key,R.props,null,W.mode,K),K.ref=wa(W,V,R),K.return=W,W=K)}return p(W);case ws:e:{for(X=R.key;V!==null;){if(V.key===X)if(V.tag===4&&V.stateNode.containerInfo===R.containerInfo&&V.stateNode.implementation===R.implementation){r(W,V.sibling),V=o(V,R.children||[]),V.return=W,W=V;break e}else{r(W,V);break}else t(W,V);V=V.sibling}V=ku(R,W.mode,K),V.return=W,W=V}return p(W);case Ui:return X=R._init,Z(W,V,X(R._payload),K)}if(_a(R))return H(W,V,R,K);if(ma(R))return B(W,V,R,K);vl(W,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,V!==null&&V.tag===6?(r(W,V.sibling),V=o(V,R),V.return=W,W=V):(r(W,V),V=wu(R,W.mode,K),V.return=W,W=V),p(W)):r(W,V)}return Z}var Ys=Ux(!0),Gx=Ux(!1),xc=jn(null),vc=null,Ps=null,dp=null;function up(){dp=Ps=vc=null}function hp(e){var t=xc.current;ut(xc),e._currentValue=t}function Lh(e,t,r){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===r)break;e=e.return}}function Hs(e,t){vc=e,dp=Ps=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(cr=!0),e.firstContext=null)}function Rr(e){var t=e._currentValue;if(dp!==e)if(e={context:e,memoizedValue:t,next:null},Ps===null){if(vc===null)throw Error(ue(308));Ps=e,vc.dependencies={lanes:0,firstContext:e}}else Ps=Ps.next=e;return t}var Hn=null;function fp(e){Hn===null?Hn=[e]:Hn.push(e)}function Zx(e,t,r,s){var o=t.interleaved;return o===null?(r.next=r,fp(t)):(r.next=o.next,o.next=r),t.interleaved=r,Mi(e,s)}function Mi(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Gi=!1;function pp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qx(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ei(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function un(e,t,r){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Ke&2){var o=s.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),s.pending=t,Mi(e,r)}return o=s.interleaved,o===null?(t.next=t,fp(s)):(t.next=o.next,o.next=t),s.interleaved=t,Mi(e,r)}function zl(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,Jf(e,r)}}function kg(e,t){var r=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,r===s)){var o=null,c=null;if(r=r.firstBaseUpdate,r!==null){do{var p={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};c===null?o=c=p:c=c.next=p,r=r.next}while(r!==null);c===null?o=c=t:c=c.next=t}else o=c=t;r={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:s.shared,effects:s.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function yc(e,t,r,s){var o=e.updateQueue;Gi=!1;var c=o.firstBaseUpdate,p=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var C=v,A=C.next;C.next=null,p===null?c=A:p.next=A,p=C;var E=e.alternate;E!==null&&(E=E.updateQueue,v=E.lastBaseUpdate,v!==p&&(v===null?E.firstBaseUpdate=A:v.next=A,E.lastBaseUpdate=C))}if(c!==null){var P=o.baseState;p=0,E=A=C=null,v=c;do{var I=v.lane,_=v.eventTime;if((s&I)===I){E!==null&&(E=E.next={eventTime:_,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var H=e,B=v;switch(I=t,_=r,B.tag){case 1:if(H=B.payload,typeof H=="function"){P=H.call(_,P,I);break e}P=H;break e;case 3:H.flags=H.flags&-65537|128;case 0:if(H=B.payload,I=typeof H=="function"?H.call(_,P,I):H,I==null)break e;P=mt({},P,I);break e;case 2:Gi=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,I=o.effects,I===null?o.effects=[v]:I.push(v))}else _={eventTime:_,lane:I,tag:v.tag,payload:v.payload,callback:v.callback,next:null},E===null?(A=E=_,C=P):E=E.next=_,p|=I;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;I=v,v=I.next,I.next=null,o.lastBaseUpdate=I,o.shared.pending=null}}while(!0);if(E===null&&(C=P),o.baseState=C,o.firstBaseUpdate=A,o.lastBaseUpdate=E,t=o.shared.interleaved,t!==null){o=t;do p|=o.lane,o=o.next;while(o!==t)}else c===null&&(o.shared.lanes=0);ts|=p,e.lanes=p,e.memoizedState=P}}function Cg(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var s=mu.transition;mu.transition={};try{e(!1),t()}finally{nt=r,mu.transition=s}}function fv(){return Mr().memoizedState}function b4(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=Zx(e,t,r,s),r!==null){var o=rr();Gr(r,e,s,o),mv(r,t,s)}}function w4(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,Qr(v,p)){var C=t.interleaved;C===null?(o.next=o,fp(t)):(o.next=C.next,C.next=o),t.interleaved=o;return}}catch{}finally{}r=Zx(e,t,o,s),r!==null&&(o=rr(),Gr(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){Ua=wc=!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,Jf(e,r)}}var kc={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},k4={readContext:Rr,useCallback:function(e,t){return ri().memoizedState=[e,t===void 0?null:t],e},useContext:Rr,useEffect:Ag,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Dl(4194308,4,lv.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Dl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Dl(4,2,e,t)},useMemo:function(e,t){var r=ri();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var s=ri();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=b4.bind(null,gt,e),[s.memoizedState,e]},useRef:function(e){var t=ri();return e={current:e},t.memoizedState=e},useState:Sg,useDebugValue:kp,useDeferredValue:function(e){return ri().memoizedState=e},useTransition:function(){var e=Sg(!1),t=e[0];return e=y4.bind(null,e[1]),ri().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var s=gt,o=ri();if(ht){if(r===void 0)throw Error(ue(407));r=r()}else{if(r=t(),_t===null)throw Error(ue(349));es&30||ev(s,t,r)}o.memoizedState=r;var c={value:r,getSnapshot:t};return o.queue=c,Ag(rv.bind(null,s,c,e),[e]),s.flags|=2048,xo(9,tv.bind(null,s,c,r,t),void 0,null),r},useId:function(){var e=ri(),t=_t.identifierPrefix;if(ht){var r=Ni,s=ji;r=(s&~(1<<32-Ur(s)-1)).toString(32)+r,t=":"+t+"R"+r,r=go++,0")&&(C=C.replace("",e.displayName)),C}while(1<=p&&0<=v);break}}}finally{Jd=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ma(e):""}function K5(e){switch(e.tag){case 5:return Ma(e.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return e=eu(e.type,!1),e;case 11:return e=eu(e.type.render,!1),e;case 1:return e=eu(e.type,!0),e;default:return""}}function nh(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 ks:return"Fragment";case ws:return"Portal";case th:return"Profiler";case Gf:return"StrictMode";case rh:return"Suspense";case ih:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case q0:return(e.displayName||"Context")+".Consumer";case Z0:return(e._context.displayName||"Context")+".Provider";case Zf: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:nh(e.type)||"Memo";case Ui:t=e._payload,e=e._init;try{return nh(e(t))}catch{}}return null}function J5(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 nh(t);case 8:return t===Gf?"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 xn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function K0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function e3(e){var t=K0(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 cl(e){e._valueTracker||(e._valueTracker=e3(e))}function J0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),s="";return e&&(s=K0(e)?e.checked?"true":"false":e.value),e=s,e!==r?(t.setValue(e),!0):!1}function sc(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 sh(e,t){var r=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function $1(e,t){var r=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;r=xn(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 ex(e,t){t=t.checked,t!=null&&Uf(e,"checked",t,!1)}function ah(e,t){ex(e,t);var r=xn(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")?oh(e,t.type,r):t.hasOwnProperty("defaultValue")&&oh(e,t.type,xn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function X1(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 oh(e,t,r){(t!=="number"||sc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var _a=Array.isArray;function Is(e,t,r,s){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=dl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function io(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Va={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},t3=["Webkit","ms","Moz","O"];Object.keys(Va).forEach(function(e){t3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Va[t]=Va[e]})});function nx(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Va.hasOwnProperty(e)&&Va[e]?(""+t).trim():t+"px"}function sx(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var s=r.indexOf("--")===0,o=nx(r,t[r],s);r==="float"&&(r="cssFloat"),s?e.setProperty(r,o):e[r]=o}}var r3=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 dh(e,t){if(t){if(r3[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 uh(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 hh=null;function Qf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fh=null,zs=null,Fs=null;function G1(e){if(e=Ho(e)){if(typeof fh!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=sd(t),fh(e.stateNode,e.type,t))}}function ax(e){zs?Fs?Fs.push(e):Fs=[e]:zs=e}function ox(){if(zs){var e=zs,t=Fs;if(Fs=zs=null,G1(e),t)for(e=0;e>>=0,e===0?32:31-(f3(e)/p3|0)|0}var ul=64,hl=4194304;function Oa(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 cc(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=Oa(v):(c&=p,c!==0&&(s=Oa(c)))}else p=r&~o,p!==0?s=Oa(p):c!==0&&(s=Oa(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 Fo(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ur(t),e[t]=r}function v3(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=$a),ig=" ",ng=!1;function Nx(e,t){switch(e){case"keyup":return Y3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ex(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cs=!1;function G3(e,t){switch(e){case"compositionend":return Ex(t);case"keypress":return t.which!==32?null:(ng=!0,ig);case"textInput":return e=t.data,e===ig&&ng?null:e;default:return null}}function Z3(e,t){if(Cs)return e==="compositionend"||!sp&&Nx(e,t)?(e=Ax(),Il=rp=tn=null,Cs=!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=lg(r)}}function Rx(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rx(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mx(){for(var e=window,t=sc();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=sc(e.document)}return t}function ap(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 n4(e){var t=Mx(),r=e.focusedElem,s=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Rx(r.ownerDocument.documentElement,r)){if(s!==null&&ap(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=cg(r,c);var p=cg(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,Ss=null,yh=null,Ya=null,bh=!1;function dg(e,t,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;bh||Ss==null||Ss!==sc(s)||(s=Ss,"selectionStart"in s&&ap(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}),Ya&&co(Ya,s)||(Ya=s,s=hc(yh,"onSelect"),0Ns||(e.current=jh[Ns],jh[Ns]=null,Ns--)}function lt(e,t){Ns++,jh[Ns]=e.current,e.current=t}var vn={},Ut=jn(vn),dr=jn(!1),Kn=vn;function $s(e,t){var r=e.type.contextTypes;if(!r)return vn;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 ur(e){return e=e.childContextTypes,e!=null}function pc(){ut(dr),ut(Ut)}function xg(e,t,r){if(Ut.current!==vn)throw Error(ue(168));lt(Ut,t),lt(dr,r)}function Vx(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,J5(e)||"Unknown",o));return mt({},r,s)}function gc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vn,Kn=Ut.current,lt(Ut,e),lt(dr,dr.current),!0}function vg(e,t,r){var s=e.stateNode;if(!s)throw Error(ue(169));r?(e=Vx(e,t,Kn),s.__reactInternalMemoizedMergedChildContext=e,ut(dr),ut(Ut),lt(Ut,e)):ut(dr),lt(dr,r)}var Ci=null,ad=!1,pu=!1;function Wx(e){Ci===null?Ci=[e]:Ci.push(e)}function m4(e){ad=!0,Wx(e)}function Nn(){if(!pu&&Ci!==null){pu=!0;var e=0,t=nt;try{var r=Ci;for(nt=1;e>=p,o-=p,ji=1<<32-Ur(t)+o|r<J?(fe=Q,Q=null):fe=Q.sibling;var le=I(W,Q,R[J],K);if(le===null){Q===null&&(Q=fe);break}e&&Q&&le.alternate===null&&t(W,Q),V=c(le,V,J),X===null?ee=le:X.sibling=le,X=le,Q=fe}if(J===R.length)return r(W,Q),ht&&Mn(W,J),ee;if(Q===null){for(;JJ?(fe=Q,Q=null):fe=Q.sibling;var Ne=I(W,Q,le.value,K);if(Ne===null){Q===null&&(Q=fe);break}e&&Q&&Ne.alternate===null&&t(W,Q),V=c(Ne,V,J),X===null?ee=Ne:X.sibling=Ne,X=Ne,Q=fe}if(le.done)return r(W,Q),ht&&Mn(W,J),ee;if(Q===null){for(;!le.done;J++,le=R.next())le=P(W,le.value,K),le!==null&&(V=c(le,V,J),X===null?ee=le:X.sibling=le,X=le);return ht&&Mn(W,J),ee}for(Q=s(W,Q);!le.done;J++,le=R.next())le=_(Q,W,J,le.value,K),le!==null&&(e&&le.alternate!==null&&Q.delete(le.key===null?J:le.key),V=c(le,V,J),X===null?ee=le:X.sibling=le,X=le);return e&&Q.forEach(function(ve){return t(W,ve)}),ht&&Mn(W,J),ee}function Z(W,V,R,K){if(typeof R=="object"&&R!==null&&R.type===ks&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case ll:e:{for(var ee=R.key,X=V;X!==null;){if(X.key===ee){if(ee=R.type,ee===ks){if(X.tag===7){r(W,X.sibling),V=o(X,R.props.children),V.return=W,W=V;break e}}else if(X.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Ui&&wg(ee)===X.type){r(W,X.sibling),V=o(X,R.props),V.ref=wa(W,X,R),V.return=W,W=V;break e}r(W,X);break}else t(W,X);X=X.sibling}R.type===ks?(V=Xn(R.props.children,W.mode,K,R.key),V.return=W,W=V):(K=$l(R.type,R.key,R.props,null,W.mode,K),K.ref=wa(W,V,R),K.return=W,W=K)}return p(W);case ws:e:{for(X=R.key;V!==null;){if(V.key===X)if(V.tag===4&&V.stateNode.containerInfo===R.containerInfo&&V.stateNode.implementation===R.implementation){r(W,V.sibling),V=o(V,R.children||[]),V.return=W,W=V;break e}else{r(W,V);break}else t(W,V);V=V.sibling}V=ku(R,W.mode,K),V.return=W,W=V}return p(W);case Ui:return X=R._init,Z(W,V,X(R._payload),K)}if(_a(R))return H(W,V,R,K);if(ma(R))return B(W,V,R,K);yl(W,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,V!==null&&V.tag===6?(r(W,V.sibling),V=o(V,R),V.return=W,W=V):(r(W,V),V=wu(R,W.mode,K),V.return=W,W=V),p(W)):r(W,V)}return Z}var Ys=Ux(!0),Gx=Ux(!1),vc=jn(null),yc=null,Ps=null,dp=null;function up(){dp=Ps=yc=null}function hp(e){var t=vc.current;ut(vc),e._currentValue=t}function Lh(e,t,r){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===r)break;e=e.return}}function Hs(e,t){yc=e,dp=Ps=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(cr=!0),e.firstContext=null)}function Rr(e){var t=e._currentValue;if(dp!==e)if(e={context:e,memoizedValue:t,next:null},Ps===null){if(yc===null)throw Error(ue(308));Ps=e,yc.dependencies={lanes:0,firstContext:e}}else Ps=Ps.next=e;return t}var Hn=null;function fp(e){Hn===null?Hn=[e]:Hn.push(e)}function Zx(e,t,r,s){var o=t.interleaved;return o===null?(r.next=r,fp(t)):(r.next=o.next,o.next=r),t.interleaved=r,Mi(e,s)}function Mi(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Gi=!1;function pp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qx(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ei(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function un(e,t,r){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Ke&2){var o=s.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),s.pending=t,Mi(e,r)}return o=s.interleaved,o===null?(t.next=t,fp(s)):(t.next=o.next,o.next=t),s.interleaved=t,Mi(e,r)}function Fl(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,Jf(e,r)}}function kg(e,t){var r=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,r===s)){var o=null,c=null;if(r=r.firstBaseUpdate,r!==null){do{var p={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};c===null?o=c=p:c=c.next=p,r=r.next}while(r!==null);c===null?o=c=t:c=c.next=t}else o=c=t;r={baseState:s.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:s.shared,effects:s.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function bc(e,t,r,s){var o=e.updateQueue;Gi=!1;var c=o.firstBaseUpdate,p=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var C=v,A=C.next;C.next=null,p===null?c=A:p.next=A,p=C;var E=e.alternate;E!==null&&(E=E.updateQueue,v=E.lastBaseUpdate,v!==p&&(v===null?E.firstBaseUpdate=A:v.next=A,E.lastBaseUpdate=C))}if(c!==null){var P=o.baseState;p=0,E=A=C=null,v=c;do{var I=v.lane,_=v.eventTime;if((s&I)===I){E!==null&&(E=E.next={eventTime:_,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var H=e,B=v;switch(I=t,_=r,B.tag){case 1:if(H=B.payload,typeof H=="function"){P=H.call(_,P,I);break e}P=H;break e;case 3:H.flags=H.flags&-65537|128;case 0:if(H=B.payload,I=typeof H=="function"?H.call(_,P,I):H,I==null)break e;P=mt({},P,I);break e;case 2:Gi=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,I=o.effects,I===null?o.effects=[v]:I.push(v))}else _={eventTime:_,lane:I,tag:v.tag,payload:v.payload,callback:v.callback,next:null},E===null?(A=E=_,C=P):E=E.next=_,p|=I;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;I=v,v=I.next,I.next=null,o.lastBaseUpdate=I,o.shared.pending=null}}while(!0);if(E===null&&(C=P),o.baseState=C,o.firstBaseUpdate=A,o.lastBaseUpdate=E,t=o.shared.interleaved,t!==null){o=t;do p|=o.lane,o=o.next;while(o!==t)}else c===null&&(o.shared.lanes=0);ts|=p,e.lanes=p,e.memoizedState=P}}function Cg(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var s=mu.transition;mu.transition={};try{e(!1),t()}finally{nt=r,mu.transition=s}}function fv(){return Mr().memoizedState}function b4(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=Zx(e,t,r,s),r!==null){var o=rr();Gr(r,e,s,o),mv(r,t,s)}}function w4(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,Qr(v,p)){var C=t.interleaved;C===null?(o.next=o,fp(t)):(o.next=C.next,C.next=o),t.interleaved=o;return}}catch{}finally{}r=Zx(e,t,o,s),r!==null&&(o=rr(),Gr(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){Ua=kc=!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,Jf(e,r)}}var Cc={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},k4={readContext:Rr,useCallback:function(e,t){return ri().memoizedState=[e,t===void 0?null:t],e},useContext:Rr,useEffect:Ag,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Hl(4194308,4,lv.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Hl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hl(4,2,e,t)},useMemo:function(e,t){var r=ri();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var s=ri();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=b4.bind(null,gt,e),[s.memoizedState,e]},useRef:function(e){var t=ri();return e={current:e},t.memoizedState=e},useState:Sg,useDebugValue:kp,useDeferredValue:function(e){return ri().memoizedState=e},useTransition:function(){var e=Sg(!1),t=e[0];return e=y4.bind(null,e[1]),ri().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var s=gt,o=ri();if(ht){if(r===void 0)throw Error(ue(407));r=r()}else{if(r=t(),_t===null)throw Error(ue(349));es&30||ev(s,t,r)}o.memoizedState=r;var c={value:r,getSnapshot:t};return o.queue=c,Ag(rv.bind(null,s,c,e),[e]),s.flags|=2048,vo(9,tv.bind(null,s,c,r,t),void 0,null),r},useId:function(){var e=ri(),t=_t.identifierPrefix;if(ht){var r=Ni,s=ji;r=(s&~(1<<32-Ur(s)-1)).toString(32)+r,t=":"+t+"R"+r,r=mo++,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[ii]=t,e[ho]=s,jv(e,t,!1,!1),t.stateNode=e;e:{switch(p=uh(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;oZs&&(t.flags|=128,s=!0,ka(c,!1),t.lanes=4194304)}else{if(!s)if(e=bc(p),e!==null){if(t.flags|=128,s=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ka(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!ht)return $t(t),null}else 2*yt()-c.renderingStartTime>Zs&&r!==1073741824&&(t.flags|=128,s=!0,ka(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 Ep(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?pr&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 P4(e,t){switch(lp(t),t.tag){case 1:return ur(t.type)&&fc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Us(),ut(dr),ut(Ut),xp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mp(t),null;case 13:if(ut(pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));Xs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ut(pt),null;case 4:return Us(),null;case 10:return hp(t.type._context),null;case 22:case 23:return Ep(),null;case 24:return null;default:return null}}var bl=!1,Xt=!1,T4=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function Ts(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 Fh(e,t,r){try{r()}catch(s){xt(e,t,s)}}var Ig=!1;function R4(e,t){if(wh=cc,e=Mx(),ap(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,I=null;t:for(;;){for(var _;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),(_=P.firstChild)!==null;)I=P,P=_;for(;;){if(P===e)break t;if(I===r&&++A===o&&(v=p),I===c&&++E===s&&(C=p),(_=P.nextSibling)!==null)break;P=I,I=P.parentNode}P=_}r=v===-1||C===-1?null:{start:v,end:C}}else r=null}r=r||{start:0,end:0}}else r=null;for(kh={focusedElem:e,selectionRange:r},cc=!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 B=H.memoizedProps,Z=H.memoizedState,W=t.stateNode,V=W.getSnapshotBeforeUpdate(t.elementType===t.type?B:Dr(t.type,B),Z);W.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.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=Ig,Ig=!1,H}function Ga(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&&Fh(t,r,c)}o=o.next}while(o!==s)}}function cd(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 Dh(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 Lv(e){var t=e.alternate;t!==null&&(e.alternate=null,Lv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ii],delete t[ho],delete t[Ah],delete t[p4],delete t[g4])),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 Pv(e){return e.tag===5||e.tag===3||e.tag===4}function zg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pv(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 Hh(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=hc));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}function Bh(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(Bh(e,t,r),e=e.sibling;e!==null;)Bh(e,t,r),e=e.sibling}var zt=null,Hr=!1;function Wi(e,t,r){for(r=r.child;r!==null;)Tv(e,t,r),r=r.sibling}function Tv(e,t,r){if(ai&&typeof ai.onCommitFiberUnmount=="function")try{ai.onCommitFiberUnmount(td,r)}catch{}switch(r.tag){case 5:Xt||Ts(r,t);case 6:var s=zt,o=Hr;zt=null,Wi(e,t,r),zt=s,Hr=o,zt!==null&&(Hr?(e=zt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):zt.removeChild(r.stateNode));break;case 18:zt!==null&&(Hr?(e=zt,r=r.stateNode,e.nodeType===8?fu(e.parentNode,r):e.nodeType===1&&fu(e,r),ao(e)):fu(zt,r.stateNode));break;case 4:s=zt,o=Hr,zt=r.stateNode.containerInfo,Hr=!0,Wi(e,t,r),zt=s,Hr=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)&&Fh(r,t,p),o=o.next}while(o!==s)}Wi(e,t,r);break;case 1:if(!Xt&&(Ts(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 Fg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new T4),t.forEach(function(s){var o=B4.bind(null,e,s);r.has(s)||(r.add(s),s.then(o,o))})}}function zr(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*_4(s/1960))-s,10e?16:e,rn===null)var s=!1;else{if(e=rn,rn=null,Ac=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()-jp?$n(e,0):Ap|=r),hr(e,t)}function Dv(e,t){t===0&&(e.mode&1?(t=ul,ul<<=1,!(ul&130023424)&&(ul=4194304)):t=1);var r=rr();e=Mi(e,t),e!==null&&(zo(e,t,r),hr(e,r))}function H4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Dv(e,r)}function B4(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),Dv(e,r)}var Hv;Hv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||dr.current)cr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return cr=!1,E4(e,t,r);cr=!!(e.flags&131072)}else cr=!1,ht&&t.flags&1048576&&$x(t,mc,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Hl(e,t),e=t.pendingProps;var o=$s(t,Ut.current);Hs(t,r),o=yp(null,t,s,e,o,r);var c=bp();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,ur(s)?(c=!0,pc(t)):c=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,pp(t),o.updater=ld,t.stateNode=o,o._reactInternals=t,Th(t,s,e,r),t=_h(null,t,s,!0,c,r)):(t.tag=0,ht&&c&&op(t),Kt(null,t,o,r),t=t.child),t;case 16:s=t.elementType;e:{switch(Hl(e,t),e=t.pendingProps,o=s._init,s=o(s._payload),t.type=s,o=t.tag=W4(s),e=Dr(s,e),o){case 0:t=Mh(null,t,s,e,r);break e;case 1:t=Mg(null,t,s,e,r);break e;case 11:t=Tg(null,t,s,e,r);break e;case 14:t=Rg(null,t,s,Dr(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:Dr(s,o),Mh(e,t,s,o,r);case 1:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Dr(s,o),Mg(e,t,s,o,r);case 3:e:{if(Cv(t),e===null)throw Error(ue(387));s=t.pendingProps,c=t.memoizedState,o=c.element,qx(e,t),yc(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=Gs(Error(ue(423)),t),t=_g(e,t,s,r,o);break e}else if(s!==o){o=Gs(Error(ue(424)),t),t=_g(e,t,s,r,o);break e}else for(gr=dn(t.stateNode.containerInfo.firstChild),mr=t,ht=!0,Vr=null,r=Gx(t,null,s,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Xs(),s===o){t=_i(e,t,r);break e}Kt(e,t,s,r)}t=t.child}return t;case 5:return Qx(t),e===null&&Eh(t),s=t.type,o=t.pendingProps,c=e!==null?e.memoizedProps:null,p=o.children,Ch(s,o)?p=null:c!==null&&Ch(s,c)&&(t.flags|=32),kv(e,t),Kt(e,t,p,r),t.child;case 6:return e===null&&Eh(t),null;case 13:return Sv(e,t,r);case 4:return gp(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ys(t,null,s,r):Kt(e,t,s,r),t.child;case 11:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Dr(s,o),Tg(e,t,s,o,r);case 7:return Kt(e,t,t.pendingProps,r),t.child;case 8:return Kt(e,t,t.pendingProps.children,r),t.child;case 12:return Kt(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(xc,s._currentValue),s._currentValue=p,c!==null)if(Qr(c.value,p)){if(c.children===o.children&&!dr.current){t=_i(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=Ei(-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),Lh(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),Lh(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}Kt(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,s=t.pendingProps.children,Hs(t,r),o=Rr(o),s=s(o),t.flags|=1,Kt(e,t,s,r),t.child;case 14:return s=t.type,o=Dr(s,t.pendingProps),o=Dr(s.type,o),Rg(e,t,s,o,r);case 15:return bv(e,t,t.type,t.pendingProps,r);case 17:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Dr(s,o),Hl(e,t),t.tag=1,ur(s)?(e=!0,pc(t)):e=!1,Hs(t,r),xv(t,s,o),Th(t,s,o,r),_h(null,t,s,!0,e,r);case 19:return Av(e,t,r);case 22:return wv(e,t,r)}throw Error(ue(156,t.tag))};function Bv(e,t){return px(e,t)}function V4(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 Nr(e,t,r,s){return new V4(e,t,r,s)}function Pp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function W4(e){if(typeof e=="function")return Pp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zf)return 11;if(e===qf)return 14}return 2}function pn(e,t){var r=e.alternate;return r===null?(r=Nr(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 Wl(e,t,r,s,o,c){var p=2;if(s=e,typeof e=="function")Pp(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case ks:return Xn(r.children,o,c,t);case Gf:p=8,o|=8;break;case th:return e=Nr(12,r,t,o|2),e.elementType=th,e.lanes=c,e;case rh:return e=Nr(13,r,t,o),e.elementType=rh,e.lanes=c,e;case ih:return e=Nr(19,r,t,o),e.elementType=ih,e.lanes=c,e;case Q0:return ud(r,o,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z0:p=10;break e;case q0:p=9;break e;case Zf: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=Nr(p,r,t,o),t.elementType=e,t.type=s,t.lanes=c,t}function Xn(e,t,r,s){return e=Nr(7,e,s,t),e.lanes=r,e}function ud(e,t,r,s){return e=Nr(22,e,s,t),e.elementType=Q0,e.lanes=r,e.stateNode={isHidden:!1},e}function wu(e,t,r){return e=Nr(6,e,null,t),e.lanes=r,e}function ku(e,t,r){return t=Nr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $4(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=ru(0),this.expirationTimes=ru(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ru(0),this.identifierPrefix=s,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Tp(e,t,r,s,o,c,p,v,C){return e=new $4(e,t,r,v,C),t===1?(t=1,c===!0&&(t|=8)):t=0,c=Nr(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:s,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},pp(c),e}function X4(e,t,r){var s=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xv)}catch(e){console.error(e)}}Xv(),X0.exports=vr;var Yv=X0.exports,Yg=Yv;Ju.createRoot=Yg.createRoot,Ju.hydrateRoot=Yg.hydrateRoot;class Bo{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 yo=typeof window>"u"||"Deno"in window;function kr(){}function q4(e,t){return typeof e=="function"?e(t):e}function Yh(e){return typeof e=="number"&&e>=0&&e!==1/0}function Uv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function za(e,t,r){return md(e)?typeof t=="function"?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Zi(e,t,r){return md(e)?[{...t,queryKey:e},r]:[e||{},t]}function Ug(e,t){const{type:r="all",exact:s,fetchStatus:o,predicate:c,queryKey:p,stale:v}=e;if(md(p)){if(s){if(t.queryHash!==Op(p,t.options))return!1}else if(!Ec(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 Gg(e,t){const{exact:r,fetching:s,predicate:o,mutationKey:c}=e;if(md(c)){if(!t.options.mutationKey)return!1;if(r){if(nn(t.options.mutationKey)!==nn(c))return!1}else if(!Ec(t.options.mutationKey,c))return!1}return!(typeof s=="boolean"&&t.state.status==="loading"!==s||o&&!o(t))}function Op(e,t){return((t==null?void 0:t.queryKeyHashFn)||nn)(e)}function nn(e){return JSON.stringify(e,(t,r)=>Gh(r)?Object.keys(r).sort().reduce((s,o)=>(s[o]=r[o],s),{}):r)}function Ec(e,t){return Gv(e,t)}function Gv(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!Gv(e[r],t[r])):!1}function Zv(e,t){if(e===t)return e;const r=Zg(e)&&Zg(t);if(r||Gh(e)&&Gh(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!(!qg(r)||!r.hasOwnProperty("isPrototypeOf"))}function qg(e){return Object.prototype.toString.call(e)==="[object Object]"}function md(e){return Array.isArray(e)}function qv(e){return new Promise(t=>{setTimeout(t,e)})}function Qg(e){qv(0).then(e)}function Q4(){if(typeof AbortController=="function")return new AbortController}function Zh(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Zv(e,t):t}class K4 extends Bo{constructor(){super(),this.setup=t=>{if(!yo&&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 Lc=new K4,Kg=["online","offline"];class J4 extends Bo{constructor(){super(),this.setup=t=>{if(!yo&&window.addEventListener){const r=()=>t();return Kg.forEach(s=>{window.addEventListener(s,r,!1)}),()=>{Kg.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 Pc=new J4;function ew(e){return Math.min(1e3*2**e,3e4)}function xd(e){return(e??"online")==="online"?Pc.isOnline():!0}class Qv{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function $l(e){return e instanceof Qv}function Kv(e){let t=!1,r=0,s=!1,o,c,p;const v=new Promise((Z,W)=>{c=Z,p=W}),C=Z=>{s||(_(new Qv(Z)),e.abort==null||e.abort())},A=()=>{t=!0},E=()=>{t=!1},P=()=>!Lc.isFocused()||e.networkMode!=="always"&&!Pc.isOnline(),I=Z=>{s||(s=!0,e.onSuccess==null||e.onSuccess(Z),o==null||o(),c(Z))},_=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()}),B=()=>{if(s)return;let Z;try{Z=e.fn()}catch(W){Z=Promise.reject(W)}Promise.resolve(Z).then(I).catch(W=>{var V,R;if(s)return;const K=(V=e.retry)!=null?V:3,ee=(R=e.retryDelay)!=null?R:ew,X=typeof ee=="function"?ee(r,W):ee,Q=K===!0||typeof K=="number"&&r{if(P())return H()}).then(()=>{t?_(W):B()})})};return xd(e.networkMode)?B():H().then(B),{promise:v,cancel:C,continue:()=>(o==null?void 0:o())?v:Promise.resolve(),cancelRetry:A,continueRetry:E}}const Ip=console;function tw(){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):Qg(()=>{r(E)})},p=E=>(...P)=>{c(()=>{E(...P)})},v=()=>{const E=e;e=[],E.length&&Qg(()=>{s(()=>{E.forEach(P=>{r(P)})})})};return{batch:o,batchCalls:p,schedule:c,setNotifyFunction:E=>{r=E},setBatchNotifyFunction:E=>{s=E}}}const Ct=tw();class Jv{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yh(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(yo?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class rw extends Jv{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Ip,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||iw(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=Zh(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(kr).catch(kr):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||!Uv(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 _=this.observers.find(H=>H.options.queryFn);_&&this.setOptions(_.options)}const p=Q4(),v={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},C=_=>{Object.defineProperty(_,"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 I=_=>{if($l(_)&&_.silent||this.dispatch({type:"error",error:_}),!$l(_)){var H,B,Z,W;(H=(B=this.cache.config).onError)==null||H.call(B,_,this),(Z=(W=this.cache.config).onSettled)==null||Z.call(W,this.state.data,_,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Kv({fn:E.fetchFn,abort:p==null?void 0:p.abort.bind(p),onSuccess:_=>{var H,B,Z,W;if(typeof _>"u"){I(new Error(this.queryHash+" data is undefined"));return}this.setData(_),(H=(B=this.cache.config).onSuccess)==null||H.call(B,_,this),(Z=(W=this.cache.config).onSettled)==null||Z.call(W,_,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:I,onFail:(_,H)=>{this.dispatch({type:"failed",failureCount:_,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:xd(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 $l(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 iw(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 nw extends Bo{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:Op(c,r);let v=this.get(p);return v||(v=new rw({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=>Ug(s,o))}findAll(t,r){const[s]=Zi(t,r);return Object.keys(s).length>0?this.queries.filter(o=>Ug(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 sw extends Jv{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Ip,this.observers=[],this.state=t.state||aw(),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=Kv({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(J,fe)=>{this.dispatch({type:"failed",failureCount:J,error:fe})},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,I,_,H;this.dispatch({type:"loading",variables:this.options.variables}),await((P=(I=this.mutationCache.config).onMutate)==null?void 0:P.call(I,this.state.variables,this));const J=await((_=(H=this.options).onMutate)==null?void 0:_.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 B,Z,W,V,R,K,ee,X;throw await((B=(Z=this.mutationCache.config).onError)==null?void 0:B.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((R=(K=this.mutationCache.config).onSettled)==null?void 0:R.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:!xd(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 aw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ow extends Bo{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,s){const o=new sw({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=>Gg(t,r))}findAll(t){return this.mutations.filter(r=>Gg(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(kr)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function lw(){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",I=((c=e.state.data)==null?void 0:c.pages)||[],_=((p=e.state.data)==null?void 0:p.pageParams)||[];let H=_,B=!1;const Z=X=>{Object.defineProperty(X,"signal",{enumerable:!0,get:()=>{var Q;if((Q=e.signal)!=null&&Q.aborted)B=!0;else{var J;(J=e.signal)==null||J.addEventListener("abort",()=>{B=!0})}return e.signal}})},W=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),V=(X,Q,J,fe)=>(H=fe?[Q,...H]:[...H,Q],fe?[J,...X]:[...X,J]),R=(X,Q,J,fe)=>{if(B)return Promise.reject("Cancelled");if(typeof J>"u"&&!Q&&X.length)return Promise.resolve(X);const le={queryKey:e.queryKey,pageParam:J,meta:e.options.meta};Z(le);const Ne=W(le);return Promise.resolve(Ne).then(Le=>V(X,J,Le,fe))};let K;if(!I.length)K=R([]);else if(E){const X=typeof A<"u",Q=X?A:Jg(e.options,I);K=R(I,X,Q)}else if(P){const X=typeof A<"u",Q=X?A:cw(e.options,I);K=R(I,X,Q,!0)}else{H=[];const X=typeof e.options.getNextPageParam>"u";K=(v&&I[0]?v(I[0],0,I):!0)?R([],X,_[0]):Promise.resolve(V([],_[0],I[0]));for(let J=1;J{if(v&&I[J]?v(I[J],J,I):!0){const Ne=X?_[J]:Jg(e.options,fe);return R(fe,X,Ne)}return Promise.resolve(V(fe,_[J],I[J]))})}return K.then(X=>({pages:X,pageParams:H}))}}}}function Jg(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function cw(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class dw{constructor(t={}){this.queryCache=t.queryCache||new nw,this.mutationCache=t.mutationCache||new ow,this.logger=t.logger||Ip,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Lc.subscribe(()=>{Lc.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Pc.subscribe(()=>{Pc.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=za(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=q4(r,c);if(typeof p>"u")return;const v=za(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(kr).catch(kr)}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(kr);return c!=null&&c.throwOnError||(v=v.catch(kr)),v}fetchQuery(t,r,s){const o=za(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(kr).catch(kr)}fetchInfiniteQuery(t,r,s){const o=za(t,r,s);return o.behavior=lw(),this.fetchQuery(o)}prefetchInfiniteQuery(t,r,s){return this.fetchInfiniteQuery(t,r,s).then(kr).catch(kr)}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=>Ec(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=>Ec(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=Op(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 uw extends Bo{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),em(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qh(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qh(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),Uh(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&&tm(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 fw(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(kr)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),yo||this.currentResult.isStale||!Yh(this.options.staleTime))return;const r=Uv(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,!(yo||this.options.enabled===!1||!Yh(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Lc.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:I,error:_,errorUpdatedAt:H,fetchStatus:B,status:Z}=P,W=!1,V=!1,R;if(r._optimisticResults){const J=this.hasListeners(),fe=!J&&em(t,r),le=J&&tm(t,s,r,o);(fe||le)&&(B=xd(t.options.networkMode)?"fetching":"paused",I||(Z="loading")),r._optimisticResults==="isRestoring"&&(B="idle")}if(r.keepPreviousData&&!P.dataUpdatedAt&&E!=null&&E.isSuccess&&Z!=="error")R=E.data,I=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)R=this.selectResult;else try{this.selectFn=r.select,R=r.select(P.data),R=Zh(c==null?void 0:c.data,R,r),this.selectResult=R,this.selectError=null}catch(J){this.selectError=J}else R=P.data;if(typeof r.placeholderData<"u"&&typeof R>"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(fe){this.selectError=fe}typeof J<"u"&&(Z="success",R=Zh(c==null?void 0:c.data,J,r),V=!0)}this.selectError&&(_=this.selectError,R=this.selectResult,H=Date.now(),Z="error");const K=B==="fetching",ee=Z==="loading",X=Z==="error";return{status:Z,fetchStatus:B,isLoading:ee,isSuccess:Z==="success",isError:X,isInitialLoading:ee&&K,data:R,dataUpdatedAt:I,error:_,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:B==="paused",isPlaceholderData:V,isPreviousData:W,isRefetchError:X&&P.dataUpdatedAt!==0,isStale:zp(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,Uh(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"&&!$l(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 hw(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function em(e,t){return hw(e,t)||e.state.dataUpdatedAt>0&&qh(e,t,t.refetchOnMount)}function qh(e,t,r){if(t.enabled!==!1){const s=typeof r=="function"?r(e):r;return s==="always"||s!==!1&&zp(e,t)}return!1}function tm(e,t,r,s){return r.enabled!==!1&&(e!==t||s.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&zp(e,r)}function zp(e,t){return e.isStaleByTime(t.staleTime)}function fw(e,t,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?t.isPlaceholderData:!Uh(e.getCurrentResult(),t)}var ey={exports:{}},ty={};/** +`+c.stack}return{value:e,source:t,stack:o,digest:null}}function yu(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Rh(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var A4=typeof WeakMap=="function"?WeakMap:Map;function vv(e,t,r){r=Ei(-1,r),r.tag=3,r.payload={element:null};var s=t.value;return r.callback=function(){Ac||(Ac=!0,Vh=s),Rh(e,t)},r}function yv(e,t,r){r=Ei(-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(){Rh(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(r.callback=function(){Rh(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 Eg(e,t,r){var s=e.pingCache;if(s===null){s=e.pingCache=new A4;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=D4.bind(null,e,t,r),t.then(e,e))}function Lg(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 Pg(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=Ei(-1,1),t.tag=2,un(r,t,1))),r.lanes|=1),e)}var j4=Fi.ReactCurrentOwner,cr=!1;function Kt(e,t,r,s){t.child=e===null?Gx(t,null,r,s):Ys(t,e.child,r,s)}function Tg(e,t,r,s,o){r=r.render;var c=t.ref;return Hs(t,o),s=yp(e,t,r,s,c,o),r=bp(),e!==null&&!cr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,_i(e,t,o)):(ht&&r&&op(t),t.flags|=1,Kt(e,t,s,o),t.child)}function Rg(e,t,r,s,o){if(e===null){var c=r.type;return typeof c=="function"&&!Pp(c)&&c.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=c,bv(e,t,c,s,o)):(e=$l(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:co,r(p,s)&&e.ref===t.ref)return _i(e,t,o)}return t.flags|=1,e=pn(c,s),e.ref=t.ref,e.return=t,t.child=e}function bv(e,t,r,s,o){if(e!==null){var c=e.memoizedProps;if(co(c,s)&&e.ref===t.ref)if(cr=!1,t.pendingProps=s=c,(e.lanes&o)!==0)e.flags&131072&&(cr=!0);else return t.lanes=e.lanes,_i(e,t,o)}return Mh(e,t,r,s,o)}function wv(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(Rs,pr),pr|=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(Rs,pr),pr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=c!==null?c.baseLanes:r,lt(Rs,pr),pr|=s}else c!==null?(s=c.baseLanes|r,t.memoizedState=null):s=r,lt(Rs,pr),pr|=s;return Kt(e,t,o,r),t.child}function kv(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Mh(e,t,r,s,o){var c=ur(r)?Kn:Ut.current;return c=$s(t,c),Hs(t,o),r=yp(e,t,r,s,c,o),s=bp(),e!==null&&!cr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,_i(e,t,o)):(ht&&s&&op(t),t.flags|=1,Kt(e,t,r,o),t.child)}function Mg(e,t,r,s,o){if(ur(r)){var c=!0;gc(t)}else c=!1;if(Hs(t,o),t.stateNode===null)Bl(e,t),xv(t,r,s),Th(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=ur(r)?Kn:Ut.current,A=$s(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 I=t.memoizedState;p.state=I,bc(t,s,p,o),C=t.memoizedState,v!==s||I!==C||dr.current||Gi?(typeof E=="function"&&(Ph(t,r,E,s),C=t.memoizedState),(v=Gi||jg(t,r,v,s,I,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,qx(e,t),v=t.memoizedProps,A=t.type===t.elementType?v:Dr(t.type,v),p.props=A,P=t.pendingProps,I=p.context,C=r.contextType,typeof C=="object"&&C!==null?C=Rr(C):(C=ur(r)?Kn:Ut.current,C=$s(t,C));var _=r.getDerivedStateFromProps;(E=typeof _=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==P||I!==C)&&Ng(t,p,s,C),Gi=!1,I=t.memoizedState,p.state=I,bc(t,s,p,o);var H=t.memoizedState;v!==P||I!==H||dr.current||Gi?(typeof _=="function"&&(Ph(t,r,_,s),H=t.memoizedState),(A=Gi||jg(t,r,A,s,I,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&&I===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&I===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&&I===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),s=!1)}return _h(e,t,r,s,c,o)}function _h(e,t,r,s,o,c){kv(e,t);var p=(t.flags&128)!==0;if(!s&&!p)return o&&vg(t,r,!1),_i(e,t,c);s=t.stateNode,j4.current=t;var v=p&&typeof r.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&p?(t.child=Ys(t,e.child,null,c),t.child=Ys(t,null,v,c)):Kt(e,t,v,c),t.memoizedState=s.state,o&&vg(t,r,!0),t.child}function Cv(e){var t=e.stateNode;t.pendingContext?xg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&xg(e,t.context,!1),gp(e,t.containerInfo)}function _g(e,t,r,s,o){return Xs(),cp(o),t.flags|=256,Kt(e,t,r,s),t.child}var Oh={dehydrated:null,treeContext:null,retryLane:0};function Ih(e){return{baseLanes:e,cachePool:null,transitions:null}}function Sv(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 Eh(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=ud(p,s,0,null),e=Xn(e,s,r,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=Ih(r),t.memoizedState=Oh,e):Cp(t,p));if(o=e.memoizedState,o!==null&&(v=o.dehydrated,v!==null))return N4(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=Xn(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?Ih(r):{baseLanes:p.baseLanes|r,cachePool:null,transitions:p.transitions},c.memoizedState=p,c.childLanes=e.childLanes&~r,t.memoizedState=Oh,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 Cp(e,t){return t=ud({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function bl(e,t,r,s){return s!==null&&cp(s),Ys(t,e.child,null,r),e=Cp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function N4(e,t,r,s,o,c,p){if(r)return t.flags&256?(t.flags&=-257,s=yu(Error(ue(422))),bl(e,t,p,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=s.fallback,o=t.mode,s=ud({mode:"visible",children:s.children},o,0,null),c=Xn(c,o,p,null),c.flags|=2,s.return=t,c.return=t,s.sibling=c,t.child=s,t.mode&1&&Ys(t,e.child,null,p),t.child.memoizedState=Ih(p),t.memoizedState=Oh,c);if(!(t.mode&1))return bl(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=yu(c,s,void 0),bl(e,t,p,s)}if(v=(p&e.childLanes)!==0,cr||v){if(s=_t,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,Mi(e,o),Gr(s,e,o,-1))}return Lp(),s=yu(Error(ue(421))),bl(e,t,p,s)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=H4.bind(null,e),o._reactRetry=t,null):(e=c.treeContext,gr=dn(o.nextSibling),mr=t,ht=!0,Vr=null,e!==null&&(Sr[Ar++]=ji,Sr[Ar++]=Ni,Sr[Ar++]=Jn,ji=e.id,Ni=e.overflow,Jn=t),t=Cp(t,s.children),t.flags|=4096,t)}function Og(e,t,r){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Lh(e.return,t,r)}function bu(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 Av(e,t,r){var s=t.pendingProps,o=s.revealOrder,c=s.tail;if(Kt(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&&Og(e,r,t);else if(e.tag===19)Og(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&&wc(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),bu(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&&wc(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}bu(t,!0,r,null,c);break;case"together":bu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Bl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function _i(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ts|=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 E4(e,t,r){switch(t.tag){case 3:Cv(t),Xs();break;case 5:Qx(t);break;case 1:ur(t.type)&&gc(t);break;case 4:gp(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,o=t.memoizedProps.value;lt(vc,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?Sv(e,t,r):(lt(pt,pt.current&1),e=_i(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 Av(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,wv(e,t,r)}return _i(e,t,r)}var jv,zh,Nv,Ev;jv=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}};zh=function(){};Nv=function(e,t,r,s){var o=e.memoizedProps;if(o!==s){e=t.stateNode,Bn(oi.current);var c=null;switch(r){case"input":o=sh(e,o),s=sh(e,s),c=[];break;case"select":o=mt({},o,{value:void 0}),s=mt({},s,{value:void 0}),c=[];break;case"textarea":o=lh(e,o),s=lh(e,s),c=[];break;default:typeof o.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=fc)}dh(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"&&(ro.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"&&(ro.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)}};Ev=function(e,t,r,s){r!==s&&(t.flags|=4)};function ka(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 L4(e,t,r){var s=t.pendingProps;switch(lp(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 ur(t.type)&&pc(),$t(t),null;case 3:return s=t.stateNode,Us(),ut(dr),ut(Ut),xp(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(vl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vr!==null&&(Xh(Vr),Vr=null))),zh(e,t),$t(t),null;case 5:mp(t);var o=Bn(go.current);if(r=t.type,e!==null&&t.stateNode!=null)Nv(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=Bn(oi.current),vl(t)){s=t.stateNode,r=t.type;var c=t.memoizedProps;switch(s[ii]=t,s[fo]=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[ii]=t,e[fo]=s,jv(e,t,!1,!1),t.stateNode=e;e:{switch(p=uh(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;oZs&&(t.flags|=128,s=!0,ka(c,!1),t.lanes=4194304)}else{if(!s)if(e=wc(p),e!==null){if(t.flags|=128,s=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ka(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!ht)return $t(t),null}else 2*yt()-c.renderingStartTime>Zs&&r!==1073741824&&(t.flags|=128,s=!0,ka(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 Ep(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?pr&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 P4(e,t){switch(lp(t),t.tag){case 1:return ur(t.type)&&pc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Us(),ut(dr),ut(Ut),xp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mp(t),null;case 13:if(ut(pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));Xs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ut(pt),null;case 4:return Us(),null;case 10:return hp(t.type._context),null;case 22:case 23:return Ep(),null;case 24:return null;default:return null}}var wl=!1,Xt=!1,T4=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function Ts(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 Fh(e,t,r){try{r()}catch(s){xt(e,t,s)}}var Ig=!1;function R4(e,t){if(wh=dc,e=Mx(),ap(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,I=null;t:for(;;){for(var _;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),(_=P.firstChild)!==null;)I=P,P=_;for(;;){if(P===e)break t;if(I===r&&++A===o&&(v=p),I===c&&++E===s&&(C=p),(_=P.nextSibling)!==null)break;P=I,I=P.parentNode}P=_}r=v===-1||C===-1?null:{start:v,end:C}}else r=null}r=r||{start:0,end:0}}else r=null;for(kh={focusedElem:e,selectionRange:r},dc=!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 B=H.memoizedProps,Z=H.memoizedState,W=t.stateNode,V=W.getSnapshotBeforeUpdate(t.elementType===t.type?B:Dr(t.type,B),Z);W.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.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=Ig,Ig=!1,H}function Ga(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&&Fh(t,r,c)}o=o.next}while(o!==s)}}function cd(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 Dh(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 Lv(e){var t=e.alternate;t!==null&&(e.alternate=null,Lv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ii],delete t[fo],delete t[Ah],delete t[p4],delete t[g4])),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 Pv(e){return e.tag===5||e.tag===3||e.tag===4}function zg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pv(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 Hh(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=fc));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}function Bh(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(Bh(e,t,r),e=e.sibling;e!==null;)Bh(e,t,r),e=e.sibling}var zt=null,Hr=!1;function Wi(e,t,r){for(r=r.child;r!==null;)Tv(e,t,r),r=r.sibling}function Tv(e,t,r){if(ai&&typeof ai.onCommitFiberUnmount=="function")try{ai.onCommitFiberUnmount(td,r)}catch{}switch(r.tag){case 5:Xt||Ts(r,t);case 6:var s=zt,o=Hr;zt=null,Wi(e,t,r),zt=s,Hr=o,zt!==null&&(Hr?(e=zt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):zt.removeChild(r.stateNode));break;case 18:zt!==null&&(Hr?(e=zt,r=r.stateNode,e.nodeType===8?fu(e.parentNode,r):e.nodeType===1&&fu(e,r),oo(e)):fu(zt,r.stateNode));break;case 4:s=zt,o=Hr,zt=r.stateNode.containerInfo,Hr=!0,Wi(e,t,r),zt=s,Hr=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)&&Fh(r,t,p),o=o.next}while(o!==s)}Wi(e,t,r);break;case 1:if(!Xt&&(Ts(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 Fg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new T4),t.forEach(function(s){var o=B4.bind(null,e,s);r.has(s)||(r.add(s),s.then(o,o))})}}function zr(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*_4(s/1960))-s,10e?16:e,rn===null)var s=!1;else{if(e=rn,rn=null,jc=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()-jp?$n(e,0):Ap|=r),hr(e,t)}function Dv(e,t){t===0&&(e.mode&1?(t=hl,hl<<=1,!(hl&130023424)&&(hl=4194304)):t=1);var r=rr();e=Mi(e,t),e!==null&&(Fo(e,t,r),hr(e,r))}function H4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Dv(e,r)}function B4(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),Dv(e,r)}var Hv;Hv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||dr.current)cr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return cr=!1,E4(e,t,r);cr=!!(e.flags&131072)}else cr=!1,ht&&t.flags&1048576&&$x(t,xc,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Bl(e,t),e=t.pendingProps;var o=$s(t,Ut.current);Hs(t,r),o=yp(null,t,s,e,o,r);var c=bp();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,ur(s)?(c=!0,gc(t)):c=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,pp(t),o.updater=ld,t.stateNode=o,o._reactInternals=t,Th(t,s,e,r),t=_h(null,t,s,!0,c,r)):(t.tag=0,ht&&c&&op(t),Kt(null,t,o,r),t=t.child),t;case 16:s=t.elementType;e:{switch(Bl(e,t),e=t.pendingProps,o=s._init,s=o(s._payload),t.type=s,o=t.tag=W4(s),e=Dr(s,e),o){case 0:t=Mh(null,t,s,e,r);break e;case 1:t=Mg(null,t,s,e,r);break e;case 11:t=Tg(null,t,s,e,r);break e;case 14:t=Rg(null,t,s,Dr(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:Dr(s,o),Mh(e,t,s,o,r);case 1:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Dr(s,o),Mg(e,t,s,o,r);case 3:e:{if(Cv(t),e===null)throw Error(ue(387));s=t.pendingProps,c=t.memoizedState,o=c.element,qx(e,t),bc(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=Gs(Error(ue(423)),t),t=_g(e,t,s,r,o);break e}else if(s!==o){o=Gs(Error(ue(424)),t),t=_g(e,t,s,r,o);break e}else for(gr=dn(t.stateNode.containerInfo.firstChild),mr=t,ht=!0,Vr=null,r=Gx(t,null,s,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Xs(),s===o){t=_i(e,t,r);break e}Kt(e,t,s,r)}t=t.child}return t;case 5:return Qx(t),e===null&&Eh(t),s=t.type,o=t.pendingProps,c=e!==null?e.memoizedProps:null,p=o.children,Ch(s,o)?p=null:c!==null&&Ch(s,c)&&(t.flags|=32),kv(e,t),Kt(e,t,p,r),t.child;case 6:return e===null&&Eh(t),null;case 13:return Sv(e,t,r);case 4:return gp(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ys(t,null,s,r):Kt(e,t,s,r),t.child;case 11:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Dr(s,o),Tg(e,t,s,o,r);case 7:return Kt(e,t,t.pendingProps,r),t.child;case 8:return Kt(e,t,t.pendingProps.children,r),t.child;case 12:return Kt(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(vc,s._currentValue),s._currentValue=p,c!==null)if(Qr(c.value,p)){if(c.children===o.children&&!dr.current){t=_i(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=Ei(-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),Lh(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),Lh(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}Kt(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,s=t.pendingProps.children,Hs(t,r),o=Rr(o),s=s(o),t.flags|=1,Kt(e,t,s,r),t.child;case 14:return s=t.type,o=Dr(s,t.pendingProps),o=Dr(s.type,o),Rg(e,t,s,o,r);case 15:return bv(e,t,t.type,t.pendingProps,r);case 17:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Dr(s,o),Bl(e,t),t.tag=1,ur(s)?(e=!0,gc(t)):e=!1,Hs(t,r),xv(t,s,o),Th(t,s,o,r),_h(null,t,s,!0,e,r);case 19:return Av(e,t,r);case 22:return wv(e,t,r)}throw Error(ue(156,t.tag))};function Bv(e,t){return px(e,t)}function V4(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 Nr(e,t,r,s){return new V4(e,t,r,s)}function Pp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function W4(e){if(typeof e=="function")return Pp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zf)return 11;if(e===qf)return 14}return 2}function pn(e,t){var r=e.alternate;return r===null?(r=Nr(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 $l(e,t,r,s,o,c){var p=2;if(s=e,typeof e=="function")Pp(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case ks:return Xn(r.children,o,c,t);case Gf:p=8,o|=8;break;case th:return e=Nr(12,r,t,o|2),e.elementType=th,e.lanes=c,e;case rh:return e=Nr(13,r,t,o),e.elementType=rh,e.lanes=c,e;case ih:return e=Nr(19,r,t,o),e.elementType=ih,e.lanes=c,e;case Q0:return ud(r,o,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z0:p=10;break e;case q0:p=9;break e;case Zf: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=Nr(p,r,t,o),t.elementType=e,t.type=s,t.lanes=c,t}function Xn(e,t,r,s){return e=Nr(7,e,s,t),e.lanes=r,e}function ud(e,t,r,s){return e=Nr(22,e,s,t),e.elementType=Q0,e.lanes=r,e.stateNode={isHidden:!1},e}function wu(e,t,r){return e=Nr(6,e,null,t),e.lanes=r,e}function ku(e,t,r){return t=Nr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $4(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=ru(0),this.expirationTimes=ru(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ru(0),this.identifierPrefix=s,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Tp(e,t,r,s,o,c,p,v,C){return e=new $4(e,t,r,v,C),t===1?(t=1,c===!0&&(t|=8)):t=0,c=Nr(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:s,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},pp(c),e}function X4(e,t,r){var s=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Xv)}catch(e){console.error(e)}}Xv(),X0.exports=vr;var Yv=X0.exports,Yg=Yv;Ju.createRoot=Yg.createRoot,Ju.hydrateRoot=Yg.hydrateRoot;class Vo{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 bo=typeof window>"u"||"Deno"in window;function kr(){}function q4(e,t){return typeof e=="function"?e(t):e}function Yh(e){return typeof e=="number"&&e>=0&&e!==1/0}function Uv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function za(e,t,r){return md(e)?typeof t=="function"?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Zi(e,t,r){return md(e)?[{...t,queryKey:e},r]:[e||{},t]}function Ug(e,t){const{type:r="all",exact:s,fetchStatus:o,predicate:c,queryKey:p,stale:v}=e;if(md(p)){if(s){if(t.queryHash!==Op(p,t.options))return!1}else if(!Lc(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 Gg(e,t){const{exact:r,fetching:s,predicate:o,mutationKey:c}=e;if(md(c)){if(!t.options.mutationKey)return!1;if(r){if(nn(t.options.mutationKey)!==nn(c))return!1}else if(!Lc(t.options.mutationKey,c))return!1}return!(typeof s=="boolean"&&t.state.status==="loading"!==s||o&&!o(t))}function Op(e,t){return((t==null?void 0:t.queryKeyHashFn)||nn)(e)}function nn(e){return JSON.stringify(e,(t,r)=>Gh(r)?Object.keys(r).sort().reduce((s,o)=>(s[o]=r[o],s),{}):r)}function Lc(e,t){return Gv(e,t)}function Gv(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!Gv(e[r],t[r])):!1}function Zv(e,t){if(e===t)return e;const r=Zg(e)&&Zg(t);if(r||Gh(e)&&Gh(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!(!qg(r)||!r.hasOwnProperty("isPrototypeOf"))}function qg(e){return Object.prototype.toString.call(e)==="[object Object]"}function md(e){return Array.isArray(e)}function qv(e){return new Promise(t=>{setTimeout(t,e)})}function Qg(e){qv(0).then(e)}function Q4(){if(typeof AbortController=="function")return new AbortController}function Zh(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Zv(e,t):t}class K4 extends Vo{constructor(){super(),this.setup=t=>{if(!bo&&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 Pc=new K4,Kg=["online","offline"];class J4 extends Vo{constructor(){super(),this.setup=t=>{if(!bo&&window.addEventListener){const r=()=>t();return Kg.forEach(s=>{window.addEventListener(s,r,!1)}),()=>{Kg.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 Tc=new J4;function ew(e){return Math.min(1e3*2**e,3e4)}function xd(e){return(e??"online")==="online"?Tc.isOnline():!0}class Qv{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Xl(e){return e instanceof Qv}function Kv(e){let t=!1,r=0,s=!1,o,c,p;const v=new Promise((Z,W)=>{c=Z,p=W}),C=Z=>{s||(_(new Qv(Z)),e.abort==null||e.abort())},A=()=>{t=!0},E=()=>{t=!1},P=()=>!Pc.isFocused()||e.networkMode!=="always"&&!Tc.isOnline(),I=Z=>{s||(s=!0,e.onSuccess==null||e.onSuccess(Z),o==null||o(),c(Z))},_=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()}),B=()=>{if(s)return;let Z;try{Z=e.fn()}catch(W){Z=Promise.reject(W)}Promise.resolve(Z).then(I).catch(W=>{var V,R;if(s)return;const K=(V=e.retry)!=null?V:3,ee=(R=e.retryDelay)!=null?R:ew,X=typeof ee=="function"?ee(r,W):ee,Q=K===!0||typeof K=="number"&&r{if(P())return H()}).then(()=>{t?_(W):B()})})};return xd(e.networkMode)?B():H().then(B),{promise:v,cancel:C,continue:()=>(o==null?void 0:o())?v:Promise.resolve(),cancelRetry:A,continueRetry:E}}const Ip=console;function tw(){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):Qg(()=>{r(E)})},p=E=>(...P)=>{c(()=>{E(...P)})},v=()=>{const E=e;e=[],E.length&&Qg(()=>{s(()=>{E.forEach(P=>{r(P)})})})};return{batch:o,batchCalls:p,schedule:c,setNotifyFunction:E=>{r=E},setBatchNotifyFunction:E=>{s=E}}}const Ct=tw();class Jv{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yh(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(bo?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class rw extends Jv{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Ip,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||iw(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=Zh(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(kr).catch(kr):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||!Uv(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 _=this.observers.find(H=>H.options.queryFn);_&&this.setOptions(_.options)}const p=Q4(),v={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},C=_=>{Object.defineProperty(_,"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 I=_=>{if(Xl(_)&&_.silent||this.dispatch({type:"error",error:_}),!Xl(_)){var H,B,Z,W;(H=(B=this.cache.config).onError)==null||H.call(B,_,this),(Z=(W=this.cache.config).onSettled)==null||Z.call(W,this.state.data,_,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Kv({fn:E.fetchFn,abort:p==null?void 0:p.abort.bind(p),onSuccess:_=>{var H,B,Z,W;if(typeof _>"u"){I(new Error(this.queryHash+" data is undefined"));return}this.setData(_),(H=(B=this.cache.config).onSuccess)==null||H.call(B,_,this),(Z=(W=this.cache.config).onSettled)==null||Z.call(W,_,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:I,onFail:(_,H)=>{this.dispatch({type:"failed",failureCount:_,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:xd(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 Xl(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 iw(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 nw extends Vo{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:Op(c,r);let v=this.get(p);return v||(v=new rw({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=>Ug(s,o))}findAll(t,r){const[s]=Zi(t,r);return Object.keys(s).length>0?this.queries.filter(o=>Ug(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 sw extends Jv{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Ip,this.observers=[],this.state=t.state||aw(),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=Kv({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(J,fe)=>{this.dispatch({type:"failed",failureCount:J,error:fe})},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,I,_,H;this.dispatch({type:"loading",variables:this.options.variables}),await((P=(I=this.mutationCache.config).onMutate)==null?void 0:P.call(I,this.state.variables,this));const J=await((_=(H=this.options).onMutate)==null?void 0:_.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 B,Z,W,V,R,K,ee,X;throw await((B=(Z=this.mutationCache.config).onError)==null?void 0:B.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((R=(K=this.mutationCache.config).onSettled)==null?void 0:R.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:!xd(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 aw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ow extends Vo{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,s){const o=new sw({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=>Gg(t,r))}findAll(t){return this.mutations.filter(r=>Gg(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(kr)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function lw(){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",I=((c=e.state.data)==null?void 0:c.pages)||[],_=((p=e.state.data)==null?void 0:p.pageParams)||[];let H=_,B=!1;const Z=X=>{Object.defineProperty(X,"signal",{enumerable:!0,get:()=>{var Q;if((Q=e.signal)!=null&&Q.aborted)B=!0;else{var J;(J=e.signal)==null||J.addEventListener("abort",()=>{B=!0})}return e.signal}})},W=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),V=(X,Q,J,fe)=>(H=fe?[Q,...H]:[...H,Q],fe?[J,...X]:[...X,J]),R=(X,Q,J,fe)=>{if(B)return Promise.reject("Cancelled");if(typeof J>"u"&&!Q&&X.length)return Promise.resolve(X);const le={queryKey:e.queryKey,pageParam:J,meta:e.options.meta};Z(le);const Ne=W(le);return Promise.resolve(Ne).then(Le=>V(X,J,Le,fe))};let K;if(!I.length)K=R([]);else if(E){const X=typeof A<"u",Q=X?A:Jg(e.options,I);K=R(I,X,Q)}else if(P){const X=typeof A<"u",Q=X?A:cw(e.options,I);K=R(I,X,Q,!0)}else{H=[];const X=typeof e.options.getNextPageParam>"u";K=(v&&I[0]?v(I[0],0,I):!0)?R([],X,_[0]):Promise.resolve(V([],_[0],I[0]));for(let J=1;J{if(v&&I[J]?v(I[J],J,I):!0){const Ne=X?_[J]:Jg(e.options,fe);return R(fe,X,Ne)}return Promise.resolve(V(fe,_[J],I[J]))})}return K.then(X=>({pages:X,pageParams:H}))}}}}function Jg(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function cw(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class dw{constructor(t={}){this.queryCache=t.queryCache||new nw,this.mutationCache=t.mutationCache||new ow,this.logger=t.logger||Ip,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Pc.subscribe(()=>{Pc.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Tc.subscribe(()=>{Tc.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=za(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=q4(r,c);if(typeof p>"u")return;const v=za(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(kr).catch(kr)}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(kr);return c!=null&&c.throwOnError||(v=v.catch(kr)),v}fetchQuery(t,r,s){const o=za(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(kr).catch(kr)}fetchInfiniteQuery(t,r,s){const o=za(t,r,s);return o.behavior=lw(),this.fetchQuery(o)}prefetchInfiniteQuery(t,r,s){return this.fetchInfiniteQuery(t,r,s).then(kr).catch(kr)}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=>Lc(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=>Lc(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=Op(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 uw extends Vo{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),em(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qh(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qh(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),Uh(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&&tm(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 fw(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(kr)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),bo||this.currentResult.isStale||!Yh(this.options.staleTime))return;const r=Uv(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,!(bo||this.options.enabled===!1||!Yh(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Pc.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:I,error:_,errorUpdatedAt:H,fetchStatus:B,status:Z}=P,W=!1,V=!1,R;if(r._optimisticResults){const J=this.hasListeners(),fe=!J&&em(t,r),le=J&&tm(t,s,r,o);(fe||le)&&(B=xd(t.options.networkMode)?"fetching":"paused",I||(Z="loading")),r._optimisticResults==="isRestoring"&&(B="idle")}if(r.keepPreviousData&&!P.dataUpdatedAt&&E!=null&&E.isSuccess&&Z!=="error")R=E.data,I=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)R=this.selectResult;else try{this.selectFn=r.select,R=r.select(P.data),R=Zh(c==null?void 0:c.data,R,r),this.selectResult=R,this.selectError=null}catch(J){this.selectError=J}else R=P.data;if(typeof r.placeholderData<"u"&&typeof R>"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(fe){this.selectError=fe}typeof J<"u"&&(Z="success",R=Zh(c==null?void 0:c.data,J,r),V=!0)}this.selectError&&(_=this.selectError,R=this.selectResult,H=Date.now(),Z="error");const K=B==="fetching",ee=Z==="loading",X=Z==="error";return{status:Z,fetchStatus:B,isLoading:ee,isSuccess:Z==="success",isError:X,isInitialLoading:ee&&K,data:R,dataUpdatedAt:I,error:_,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:B==="paused",isPlaceholderData:V,isPreviousData:W,isRefetchError:X&&P.dataUpdatedAt!==0,isStale:zp(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,Uh(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"&&!Xl(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 hw(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function em(e,t){return hw(e,t)||e.state.dataUpdatedAt>0&&qh(e,t,t.refetchOnMount)}function qh(e,t,r){if(t.enabled!==!1){const s=typeof r=="function"?r(e):r;return s==="always"||s!==!1&&zp(e,t)}return!1}function tm(e,t,r,s){return r.enabled!==!1&&(e!==t||s.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&zp(e,r)}function zp(e,t){return e.isStaleByTime(t.staleTime)}function fw(e,t,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?t.isPlaceholderData:!Uh(e.getCurrentResult(),t)}var ey={exports:{}},ty={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -45,22 +45,22 @@ 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 qs=Y;function pw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gw=typeof Object.is=="function"?Object.is:pw,mw=qs.useState,xw=qs.useEffect,vw=qs.useLayoutEffect,yw=qs.useDebugValue;function bw(e,t){var r=t(),s=mw({inst:{value:r,getSnapshot:t}}),o=s[0].inst,c=s[1];return vw(function(){o.value=r,o.getSnapshot=t,Cu(o)&&c({inst:o})},[e,r,t]),xw(function(){return Cu(o)&&c({inst:o}),e(function(){Cu(o)&&c({inst:o})})},[e]),yw(r),r}function Cu(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!gw(e,r)}catch{return!0}}function ww(e,t){return t()}var kw=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ww:bw;ty.useSyncExternalStore=qs.useSyncExternalStore!==void 0?qs.useSyncExternalStore:kw;ey.exports=ty;var Cw=ey.exports;const Sw=Cw.useSyncExternalStore,rm=Y.createContext(void 0),ry=Y.createContext(!1);function iy(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=rm),window.ReactQueryClientContext):rm)}const Aw=({context:e}={})=>{const t=Y.useContext(iy(e,Y.useContext(ry)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},jw=({client:e,children:t,context:r,contextSharing:s=!1})=>{Y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=iy(r,s);return Y.createElement(ry.Provider,{value:!r&&s},Y.createElement(o.Provider,{value:e},t))},ny=Y.createContext(!1),Nw=()=>Y.useContext(ny);ny.Provider;function Ew(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Lw=Y.createContext(Ew()),Pw=()=>Y.useContext(Lw);function Tw(e,t){return typeof e=="function"?e(...t):!!e}const Rw=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Mw=e=>{Y.useEffect(()=>{e.clearReset()},[e])},_w=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:s})=>e.isError&&!t.isReset()&&!e.isFetching&&Tw(r,[e.error,s]),Ow=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Iw=(e,t)=>e.isLoading&&e.isFetching&&!t,zw=(e,t,r)=>(e==null?void 0:e.suspense)&&Iw(t,r),Fw=(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 Dw(e,t){const r=Aw({context:e.context}),s=Nw(),o=Pw(),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)),Ow(c),Rw(c,o),Mw(o);const[p]=Y.useState(()=>new t(r,c)),v=p.getOptimisticResult(c);if(Sw(Y.useCallback(C=>{const A=s?()=>{}:p.subscribe(Ct.batchCalls(C));return p.updateResult(),A},[p,s]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),Y.useEffect(()=>{p.setOptions(c,{listeners:!1})},[c,p]),zw(c,v,s))throw Fw(c,p,o);if(_w({result:v,errorResetBoundary:o,useErrorBoundary:c.useErrorBoundary,query:p.getCurrentQuery()}))throw v.error;return c.notifyOnChangeProps?v:p.trackResult(v)}function Hw(e,t,r){const s=za(e,t,r);return Dw(s,uw)}function Qh(e,t){return Qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},Qh(e,t)}function ci(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Qh(e,t)}var sy={exports:{}},Bw="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Vw=Bw,Ww=Vw;function ay(){}function oy(){}oy.resetWarningCache=ay;var $w=function(){function e(s,o,c,p,v,C){if(C!==Ww){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:oy,resetWarningCache:ay};return r.PropTypes=r,r};sy.exports=$w();var Xw=sy.exports;const im=Hf(Xw);function Bt(){return Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;E--){var P=s[E];P==="."?Su(s,E):P===".."?(Su(s,E),A++):A&&(Su(s,E),A--)}if(!p)for(;A--;A)s.unshift("..");p&&s[0]!==""&&(!s[0]||!Cl(s[0]))&&s.unshift("");var I=s.join("/");return v&&I.substr(-1)!=="/"&&(I+="/"),I}function nm(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}function Xl(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 Xl(o,t[c])});if(typeof e=="object"||typeof t=="object"){var r=nm(e),s=nm(t);return r!==e||s!==t?Xl(r,s):Object.keys(Object.assign({},e,t)).every(function(o){return Xl(e[o],t[o])})}return!1}var Uw="Invariant failed";function En(e,t){throw new Error(Uw)}function Qa(e){return e.charAt(0)==="/"?e:"/"+e}function sm(e){return e.charAt(0)==="/"?e.substr(1):e}function Gw(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function ly(e,t){return Gw(e,t)?e.substr(t.length):e}function cy(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function Zw(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 or(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 er(e,t,r,s){var o;typeof e=="string"?(o=Zw(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=Yw(o.pathname,s.pathname)):o.pathname=s.pathname:o.pathname||(o.pathname="/"),o}function qw(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&Xl(e.state,t.state)}function Fp(){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,Ne):Re.push(Ne),E({action:le,location:Ne,index:Fe,entries:Re})}})}function Z(J,fe){var le="REPLACE",Ne=er(J,fe,P(),Q.location);A.confirmTransitionTo(Ne,le,r,function(ve){ve&&(Q.entries[Q.index]=Ne,E({action:le,location:Ne}))})}function W(J){var fe=dm(Q.index+J,0,Q.entries.length-1),le="POP",Ne=Q.entries[fe];A.confirmTransitionTo(Ne,le,r,function(ve){ve?E({action:le,location:Ne,index:fe}):E()})}function V(){W(-1)}function R(){W(1)}function K(J){var fe=Q.index+J;return fe>=0&&fe"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ww:bw;ty.useSyncExternalStore=qs.useSyncExternalStore!==void 0?qs.useSyncExternalStore:kw;ey.exports=ty;var Cw=ey.exports;const Sw=Cw.useSyncExternalStore,rm=Y.createContext(void 0),ry=Y.createContext(!1);function iy(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=rm),window.ReactQueryClientContext):rm)}const Aw=({context:e}={})=>{const t=Y.useContext(iy(e,Y.useContext(ry)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},jw=({client:e,children:t,context:r,contextSharing:s=!1})=>{Y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=iy(r,s);return Y.createElement(ry.Provider,{value:!r&&s},Y.createElement(o.Provider,{value:e},t))},ny=Y.createContext(!1),Nw=()=>Y.useContext(ny);ny.Provider;function Ew(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Lw=Y.createContext(Ew()),Pw=()=>Y.useContext(Lw);function Tw(e,t){return typeof e=="function"?e(...t):!!e}const Rw=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Mw=e=>{Y.useEffect(()=>{e.clearReset()},[e])},_w=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:s})=>e.isError&&!t.isReset()&&!e.isFetching&&Tw(r,[e.error,s]),Ow=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Iw=(e,t)=>e.isLoading&&e.isFetching&&!t,zw=(e,t,r)=>(e==null?void 0:e.suspense)&&Iw(t,r),Fw=(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 Dw(e,t){const r=Aw({context:e.context}),s=Nw(),o=Pw(),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)),Ow(c),Rw(c,o),Mw(o);const[p]=Y.useState(()=>new t(r,c)),v=p.getOptimisticResult(c);if(Sw(Y.useCallback(C=>{const A=s?()=>{}:p.subscribe(Ct.batchCalls(C));return p.updateResult(),A},[p,s]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),Y.useEffect(()=>{p.setOptions(c,{listeners:!1})},[c,p]),zw(c,v,s))throw Fw(c,p,o);if(_w({result:v,errorResetBoundary:o,useErrorBoundary:c.useErrorBoundary,query:p.getCurrentQuery()}))throw v.error;return c.notifyOnChangeProps?v:p.trackResult(v)}function Hw(e,t,r){const s=za(e,t,r);return Dw(s,uw)}function Qh(e,t){return Qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},Qh(e,t)}function ci(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Qh(e,t)}var sy={exports:{}},Bw="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Vw=Bw,Ww=Vw;function ay(){}function oy(){}oy.resetWarningCache=ay;var $w=function(){function e(s,o,c,p,v,C){if(C!==Ww){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:oy,resetWarningCache:ay};return r.PropTypes=r,r};sy.exports=$w();var Xw=sy.exports;const im=Hf(Xw);function Bt(){return Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;E--){var P=s[E];P==="."?Su(s,E):P===".."?(Su(s,E),A++):A&&(Su(s,E),A--)}if(!p)for(;A--;A)s.unshift("..");p&&s[0]!==""&&(!s[0]||!Sl(s[0]))&&s.unshift("");var I=s.join("/");return v&&I.substr(-1)!=="/"&&(I+="/"),I}function nm(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}function Yl(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 Yl(o,t[c])});if(typeof e=="object"||typeof t=="object"){var r=nm(e),s=nm(t);return r!==e||s!==t?Yl(r,s):Object.keys(Object.assign({},e,t)).every(function(o){return Yl(e[o],t[o])})}return!1}var Uw="Invariant failed";function En(e,t){throw new Error(Uw)}function Qa(e){return e.charAt(0)==="/"?e:"/"+e}function sm(e){return e.charAt(0)==="/"?e.substr(1):e}function Gw(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function ly(e,t){return Gw(e,t)?e.substr(t.length):e}function cy(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function Zw(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 or(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 er(e,t,r,s){var o;typeof e=="string"?(o=Zw(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=Yw(o.pathname,s.pathname)):o.pathname=s.pathname:o.pathname||(o.pathname="/"),o}function qw(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&Yl(e.state,t.state)}function Fp(){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,Ne):Re.push(Ne),E({action:le,location:Ne,index:Fe,entries:Re})}})}function Z(J,fe){var le="REPLACE",Ne=er(J,fe,P(),Q.location);A.confirmTransitionTo(Ne,le,r,function(ve){ve&&(Q.entries[Q.index]=Ne,E({action:le,location:Ne}))})}function W(J){var fe=dm(Q.index+J,0,Q.entries.length-1),le="POP",Ne=Q.entries[fe];A.confirmTransitionTo(Ne,le,r,function(ve){ve?E({action:le,location:Ne,index:fe}):E()})}function V(){W(-1)}function R(){W(1)}function K(J){var fe=Q.index+J;return fe>=0&&fe=0)continue;r[s]=e[s]}return r}var yy=w8,k8={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},C8={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},by={};by[yy.ForwardRef]=k8;by[yy.Memo]=C8;var ju=1073741823,um=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{};function S8(){var e="__global_unique_id__";return um[e]=(um[e]||0)+1}function A8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function j8(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 N8(e){return Array.isArray(e)?e[0]:e}function E8(e,t){var r,s,o="__create-react-context-"+S8()+"__",c=function(v){ci(C,v);function C(){for(var E,P=arguments.length,I=new Array(P),_=0;_"u"&&(Qs=Up);function H8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var B8=Qs(function(e,t){var r=e.innerRef,s=e.navigate,o=e.onClick,c=Ed(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")&&!H8(A)&&(A.preventDefault(),s())}});return Up!==Qs?v.ref=t||r:v.ref=r,ge.createElement("a",v)}),rt=Qs(function(e,t){var r=e.component,s=r===void 0?B8:r,o=e.replace,c=e.to,p=e.innerRef,v=Ed(e,["component","replace","to","innerRef"]);return ge.createElement(yn.Consumer,null,function(C){C||En();var A=C.history,E=Jh(Kh(c,C.location),C.location),P=E?A.createHref(E):"",I=Bt({},v,{href:P,navigate:function(){var H=Kh(c,C.location),B=or(C.location)===or(Jh(H)),Z=o||B?A.replace:A.push;Z(H)}});return Up!==Qs?I.ref=t||p:I.innerRef=p,ge.createElement(s,I)})}),Sy=function(t){return t},Rc=ge.forwardRef;typeof Rc>"u"&&(Rc=Sy);function V8(){for(var e=arguments.length,t=new Array(e),r=0;rtypeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,la=()=>{const e=Object.create(null);return(t,r,...s)=>{const o=(c=>JSON.stringify(c,$8))(t);return o in e?e[o]:e[o]=r(t,...s)}},Yn=Symbol.for("sxs.internal"),Gp=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),ym=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:X8}=Object.prototype,ef=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),Y8=/\s+(?![^()]*\))/,ms=e=>t=>e(...typeof t=="string"?String(t).split(Y8):[t]),bm={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:ms((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:ms((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:ms((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:ms((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:ms((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:ms((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},Lu=/([\d.]+)([^]*)/,U8=(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,G8=(e,t)=>e in Z8&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(r,s,o,c)=>s+(o==="stretch"?`-moz-available${c};${ef(e)}:${s}-webkit-fill-available`:`-moz-fit-content${c};${ef(e)}:${s}fit-content`)+c):String(t),Z8={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+"-":"",Ay=(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")+")":"")),q8=/\s*,\s*(?![^()]*\))/,Q8=Object.prototype.toString,Ms=(e,t,r,s,o)=>{let c,p,v;const C=(A,E,P)=>{let I,_;const H=B=>{for(I in B){const V=I.charCodeAt(0)===64,R=V&&Array.isArray(B[I])?B[I]:[B[I]];for(_ of R){const K=/[A-Z]/.test(W=I)?W:W.replace(/-[^]/g,X=>X[1].toUpperCase()),ee=typeof _=="object"&&_&&_.toString===Q8&&(!s.utils[K]||!E.length);if(K in s.utils&&!ee){const X=s.utils[K];if(X!==p){p=X,H(X(_)),p=null;continue}}else if(K in bm){const X=bm[K];if(X!==v){v=X,H(X(_)),v=null;continue}}if(V&&(Z=I.slice(1)in s.media?"@media "+s.media[I.slice(1)]:I,I=Z.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(X,Q,J,fe,le,Ne)=>{const ve=Lu.test(Q),Le=.0625*(ve?-1:1),[Fe,Re]=ve?[fe,Q]:[Q,fe];return"("+(J[0]==="="?"":J[0]===">"===ve?"max-":"min-")+Fe+":"+(J[0]!=="="&&J.length===1?Re.replace(Lu,(qe,it,de)=>Number(it)+Le*(J===">"?1:-1)+de):Re)+(le?") and ("+(le[0]===">"?"min-":"max-")+Fe+":"+(le.length===1?Ne.replace(Lu,(qe,it,de)=>Number(it)+Le*(le===">"?-1:1)+de):Ne):"")+")"})),ee){const X=V?P.concat(I):[...P],Q=V?[...E]:U8(E,I.split(q8));c!==void 0&&o(wm(...c)),c=void 0,C(_,Q,X)}else c===void 0&&(c=[[],E,P]),I=V||I.charCodeAt(0)!==36?I:`--${Oi(s.prefix)}${I.slice(1).replace(/\$/g,"-")}`,_=ee?_:typeof _=="number"?_&&K in K8?String(_)+"px":String(_):Ay(G8(K,_??""),s.prefix,s.themeMap[K]),c[0].push(`${V?`${I} `:`${ef(I)}:`}${_}`)}}var Z,W};H(A),c!==void 0&&o(wm(...c)),c=void 0};C(e,t,r)},wm=(e,t,r)=>`${r.map(s=>`${s}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(r.length?r.length+1:0).join("}")}`,K8={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},km=e=>String.fromCharCode(e+(e>25?39:97)),Un=e=>(t=>{let r,s="";for(r=Math.abs(t);r>52;r=r/52|0)s=km(r%52)+s;return km(r%52)+s})(((t,r)=>{let s=r.length;for(;s;)t=33*t^r.charCodeAt(--s);return t})(5381,JSON.stringify(e))>>>0),Fa=["themed","global","styled","onevar","resonevar","allvar","inline"],J8=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},e7=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(J8(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:I}=E;if(!I.startsWith("--sxs"))continue;const _=I.slice(14,-3).trim().split(/\s+/),H=Fa[_[0]];H&&(t||(t={sheet:v,reset:s,rules:{},toString:r}),t.rules[H]={group:P,index:C,cache:new Set(_)})}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=Fa.length-1;v>=0;--v){const C=Fa[v];if(!p[C]){const A=Fa[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])}}t7(p[C])}};return s(),t},t7=e=>{const t=e.group;let r=t.cssRules.length;e.apply=s=>{try{t.insertRule(s,r),++r}catch{}}},Aa=Symbol(),r7=la(),Cm=(e,t)=>r7(e,()=>(...r)=>{let s={type:null,composers:new Set};for(const o of r)if(o!=null)if(o[Yn]){s.type==null&&(s.type=o[Yn].type);for(const c of o[Yn].composers)s.composers.add(c)}else o.constructor!==Object||o.$$typeof?s.type==null&&(s.type=o):s.composers.add(i7(o,e));return s.type==null&&(s.type="span"),s.composers.size||s.composers.add(["PJLV",{},[],[],{},[]]),n7(e,s,t)}),i7=({variants:e,compoundVariants:t,defaultVariants:r,...s},o)=>{const c=`${Oi(o.prefix)}c-${Un(s)}`,p=[],v=[],C=Object.create(null),A=[];for(const I in r)C[I]=String(r[I]);if(typeof e=="object"&&e)for(const I in e){E=C,P=I,X8.call(E,P)||(C[I]="undefined");const _=e[I];for(const H in _){const B={[I]:String(H)};String(H)==="undefined"&&A.push(I);const Z=_[H],W=[B,Z,!ym(Z)];p.push(W)}}var E,P;if(typeof t=="object"&&t)for(const I of t){let{css:_,...H}=I;_=typeof _=="object"&&_||{};for(const Z in H)H[Z]=String(H[Z]);const B=[H,_,!ym(_)];v.push(B)}return[c,s,p,v,C,A]},n7=(e,t,r)=>{const[s,o,c,p]=s7(t.composers),v=typeof t.type=="function"||t.type.$$typeof?(P=>{function I(){for(let _=0;_I.rules[_]={apply:H=>I[Aa].push([_,H])}),I})(r):null,C=(v||r).rules,A=`.${s}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,E=P=>{P=typeof P=="object"&&P||a7;const{css:I,..._}=P,H={};for(const W in c)if(delete _[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 B=new Set([...o]);for(const[W,V,R,K]of t.composers){r.rules.styled.cache.has(W)||(r.rules.styled.cache.add(W),Ms(V,[`.${W}`],[],e,Q=>{C.styled.apply(Q)}));const ee=Sm(R,H,e.media),X=Sm(K,H,e.media,!0);for(const Q of ee)if(Q!==void 0)for(const[J,fe,le]of Q){const Ne=`${W}-${Un(fe)}-${J}`;B.add(Ne);const ve=(le?r.rules.resonevar:r.rules.onevar).cache,Le=le?C.resonevar:C.onevar;ve.has(Ne)||(ve.add(Ne),Ms(fe,[`.${Ne}`],[],e,Fe=>{Le.apply(Fe)}))}for(const Q of X)if(Q!==void 0)for(const[J,fe]of Q){const le=`${W}-${Un(fe)}-${J}`;B.add(le),r.rules.allvar.cache.has(le)||(r.rules.allvar.cache.add(le),Ms(fe,[`.${le}`],[],e,Ne=>{C.allvar.apply(Ne)}))}}if(typeof I=="object"&&I){const W=`${s}-i${Un(I)}-css`;B.add(W),r.rules.inline.cache.has(W)||(r.rules.inline.cache.add(W),Ms(I,[`.${W}`],[],e,V=>{C.inline.apply(V)}))}for(const W of String(P.className||"").trim().split(/\s+/))W&&B.add(W);const Z=_.className=[...B].join(" ");return{type:t.type,className:Z,selector:A,props:_,toString:()=>Z,deferredInjector:v}};return Gp(E,{className:s,selector:A,[Yn]:t,toString:()=>(r.rules.styled.cache.has(s)||E(),s)})},s7=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)]},Sm=(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 I=t[C];if(I!==P){if(typeof I!="object"||!I)continue e;{let _,H,B=0;for(const Z in I){if(P===String(I[Z])){if(Z!=="@initial"){const W=Z.slice(1);(H=H||[]).push(W in r?r[W]:Z.replace(/^@media ?/,"")),E=!0}A+=B,_=!0}++B}if(H&&H.length&&(p={["@media "+H.join(", ")]:p}),!_)continue e}}}(o[A]=o[A]||[]).push([s?"cv":`${C}-${c[C]}`,p,E])}return o},a7={},o7=la(),l7=(e,t)=>o7(e,()=>(...r)=>{const s=()=>{for(let o of r){o=typeof o=="object"&&o||{};let c=Un(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"]}Ms(o,[],[],e,p=>{t.rules.global.apply(p)})}}return""};return Gp(s,{toString:s})}),c7=la(),d7=(e,t)=>c7(e,()=>r=>{const s=`${Oi(e.prefix)}k-${Un(r)}`,o=()=>{if(!t.rules.global.cache.has(s)){t.rules.global.cache.add(s);const c=[];Ms(r,[],[],e,v=>c.push(v));const p=`@keyframes ${s}{${c.join("")}}`;t.rules.global.apply(p)}return s};return Gp(o,{get name(){return o()},toString:o})}),u7=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}},h7=la(),f7=(e,t)=>h7(e,()=>(r,s)=>{s=typeof r=="object"&&r||Object(s);const o=`.${r=(r=typeof r=="string"?r:"")||`${Oi(e.prefix)}t-${Un(s)}`}`,c={},p=[];for(const C in s){c[C]={};for(const A in s[C]){const E=`--${Oi(e.prefix)}${C}-${A}`,P=Ay(String(s[C][A]),e.prefix,C);c[C][A]=new u7(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}}),p7=la(),Am,g7=la(),Zp=e=>{const t=(r=>{let s=!1;const o=p7(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||{...W8},utils:typeof c.utils=="object"&&c.utils||{}},P=e7(C),I={css:Cm(E,P),globalCss:l7(E,P),keyframes:d7(E,P),createTheme:f7(E,P),reset(){P.reset(),I.theme.toString()},theme:{},sheet:P,config:E,prefix:p,getCssText:P.toString,toString:P.toString};return String(I.theme=I.createTheme(A)),I});return s||o.reset(),o})(e);return t.styled=(({config:r,sheet:s})=>g7(r,()=>{const o=Cm(r,s);return(...c)=>{const p=o(...c),v=p[Yn].type,C=ge.forwardRef((A,E)=>{const P=A&&A.as||v,{props:I,deferredInjector:_}=p(A);return delete I.as,I.ref=E,_?ge.createElement(ge.Fragment,null,ge.createElement(P,I),ge.createElement(_,null)):ge.createElement(P,I)});return C.className=p.className,C.displayName=`Styled.${v.displayName||v.name||v}`,C.selector=p.selector,C.toString=()=>p.selector,C[Yn]=p[Yn],C}}))(t),t},jy=()=>Am||(Am=Zp()),m7=(...e)=>jy().createTheme(...e),x7=(...e)=>jy().css(...e);const{styled:bt,css:dP}=Zp({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 Vo=e=>e.type==="checkbox",_s=e=>e instanceof Date,Jt=e=>e==null;const Ny=e=>typeof e=="object";var At=e=>!Jt(e)&&!Array.isArray(e)&&Ny(e)&&!_s(e),v7=e=>At(e)&&e.target?Vo(e.target)?e.target.checked:e.target.value:e,y7=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,b7=(e,t)=>e.has(y7(t)),w7=e=>{const t=e.constructor&&e.constructor.prototype;return At(t)&&t.hasOwnProperty("isPrototypeOf")},qp=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function wr(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(!(qp&&(e instanceof Blob||e instanceof FileList))&&(r||At(e)))if(t=r?[]:{},!r&&!w7(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=wr(e[s]));else return e;return t}var Wo=e=>Array.isArray(e)?e.filter(Boolean):[],vt=e=>e===void 0,Ee=(e,t,r)=>{if(!t||!At(e))return r;const s=Wo(t.split(/[,[\].]+?/)).reduce((o,c)=>Jt(o)?o:o[c],e);return vt(s)||s===e?vt(e[t])?r:e[t]:s},Si=e=>typeof e=="boolean";const jm={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$r={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},vi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ge.createContext(null);var k7=(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]!==$r.all&&(t._proxyFormState[p]=!s||$r.all),e[p]}});return o},Cr=e=>At(e)&&!Object.keys(e).length,C7=(e,t,r,s)=>{r(e);const{name:o,...c}=e;return Cr(c)||Object.keys(c).length>=Object.keys(t).length||Object.keys(c).find(p=>t[p]===$r.all)},Pu=e=>Array.isArray(e)?e:[e];function S7(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 ni=e=>typeof e=="string",A7=(e,t,r,s,o)=>ni(e)?(s&&t.watch.add(e),Ee(r,e,o)):Array.isArray(e)?e.map(c=>(s&&t.watch.add(c),Ee(r,c))):(s&&(t.watchAll=!0),r),Qp=e=>/^\w*$/.test(e),Ey=e=>Wo(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dt=(e,t,r)=>{let s=-1;const o=Qp(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}}:{},Nm=e=>({isOnSubmit:!e||e===$r.onSubmit,isOnBlur:e===$r.onBlur,isOnChange:e===$r.onChange,isOnAll:e===$r.all,isOnTouch:e===$r.onTouched}),Em=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Ka=(e,t,r,s)=>{for(const o of r||Object.keys(e)){const c=Ee(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;Ka(v,t)}else At(v)&&Ka(v,t)}}};var N7=(e,t,r)=>{const s=Wo(Ee(e,r));return dt(s,"root",t[r]),dt(e,r,s),e},Kp=e=>e.type==="file",sn=e=>typeof e=="function",Mc=e=>{if(!qp)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ul=e=>ni(e),Jp=e=>e.type==="radio",_c=e=>e instanceof RegExp;const Lm={value:!1,isValid:!1},Pm={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===""?Pm:{value:e[0].value,isValid:!0}:Pm:Lm}return Lm};const Tm={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,Tm):Tm;function Rm(e,t,r="validate"){if(Ul(e)||Array.isArray(e)&&e.every(Ul)||Si(e)&&!e)return{type:r,message:Ul(e)?e:"",ref:t}}var xs=e=>At(e)&&!_c(e)?e:{value:e,message:""},Mm=async(e,t,r,s,o)=>{const{ref:c,refs:p,required:v,maxLength:C,minLength:A,min:E,max:P,pattern:I,validate:_,name:H,valueAsNumber:B,mount:Z,disabled:W}=e._f,V=Ee(t,H);if(!Z||W)return{};const R=p?p[0]:c,K=ve=>{s&&R.reportValidity&&(R.setCustomValidity(Si(ve)?"":ve||""),R.reportValidity())},ee={},X=Jp(c),Q=Vo(c),J=X||Q,fe=(B||Kp(c))&&vt(c.value)&&vt(V)||Mc(c)&&c.value===""||V===""||Array.isArray(V)&&!V.length,le=j7.bind(null,H,r,ee),Ne=(ve,Le,Fe,Re=vi.maxLength,qe=vi.minLength)=>{const it=ve?Le:Fe;ee[H]={type:ve?Re:qe,message:it,ref:c,...le(ve?Re:qe,it)}};if(o?!Array.isArray(V)||!V.length:v&&(!J&&(fe||Jt(V))||Si(V)&&!V||Q&&!Ly(p).isValid||X&&!Py(p).isValid)){const{value:ve,message:Le}=Ul(v)?{value:!!v,message:v}:xs(v);if(ve&&(ee[H]={type:vi.required,message:Le,ref:R,...le(vi.required,Le)},!r))return K(Le),ee}if(!fe&&(!Jt(E)||!Jt(P))){let ve,Le;const Fe=xs(P),Re=xs(E);if(!Jt(V)&&!isNaN(V)){const qe=c.valueAsNumber||V&&+V;Jt(Fe.value)||(ve=qe>Fe.value),Jt(Re.value)||(Le=qenew Date(new Date().toDateString()+" "+oe),de=c.type=="time",ce=c.type=="week";ni(Fe.value)&&V&&(ve=de?it(V)>it(Fe.value):ce?V>Fe.value:qe>new Date(Fe.value)),ni(Re.value)&&V&&(Le=de?it(V)+ve.value,Re=!Jt(Le.value)&&V.length<+Le.value;if((Fe||Re)&&(Ne(Fe,ve.message,Le.message),!r))return K(ee[H].message),ee}if(I&&!fe&&ni(V)){const{value:ve,message:Le}=xs(I);if(_c(ve)&&!V.match(ve)&&(ee[H]={type:vi.pattern,message:Le,ref:c,...le(vi.pattern,Le)},!r))return K(Le),ee}if(_){if(sn(_)){const ve=await _(V,t),Le=Rm(ve,R);if(Le&&(ee[H]={...Le,...le(vi.validate,Le.message)},!r))return K(Le.message),ee}else if(At(_)){let ve={};for(const Le in _){if(!Cr(ve)&&!r)break;const Fe=Rm(await _[Le](V,t),R,Le);Fe&&(ve={...Fe,...le(Le,Fe.message)},K(Fe.message),r&&(ee[H]=ve))}if(!Cr(ve)&&(ee[H]={ref:R,...ve},!r))return ee}}return K(!0),ee};function E7(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=[]}}},Oc=e=>Jt(e)||!Ny(e);function Vn(e,t){if(Oc(e)||Oc(t))return e===t;if(_s(e)&&_s(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(_s(c)&&_s(p)||At(c)&&At(p)||Array.isArray(c)&&Array.isArray(p)?!Vn(c,p):c!==p)return!1}}return!0}var Ty=e=>e.type==="select-multiple",P7=e=>Jp(e)||Vo(e),Ru=e=>Mc(e)&&e.isConnected,T7=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 Ic(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])?[]:{},Ic(e[s],t[s])):Jt(e[s])||(t[s]=!0);return t}function My(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)||Oc(r[o])?r[o]=Array.isArray(e[o])?Ic(e[o],[]):{...Ic(e[o])}:My(e[o],Jt(t)?{}:t[o],r[o]):r[o]=!Vn(e[o],t[o]);return r}var Sl=(e,t)=>My(e,t,Ic(t)),_y=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:s})=>vt(e)?e:t?e===""?NaN:e&&+e:r&&ni(e)?new Date(e):s?s(e):e;function Mu(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Kp(t)?t.files:Jp(t)?Py(e.refs).value:Ty(t)?[...t.selectedOptions].map(({value:r})=>r):Vo(t)?Ly(e.refs).value:_y(vt(t.value)?e.ref.value:t.value,e)}var R7=(e,t,r,s)=>{const o={};for(const c of e){const p=Ee(t,c);p&&dt(o,c,p._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:s}},ja=e=>vt(e)?e:_c(e)?e.source:At(e)?_c(e.value)?e.value.source:e.value:e,M7=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function _m(e,t,r){const s=Ee(e,r);if(s||Qp(r))return{error:s,name:r};const o=r.split(".");for(;o.length;){const c=o.join("."),p=Ee(t,c),v=Ee(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 _7=(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,O7=(e,t)=>!Wo(Ee(e,t)).length&&Rt(e,t);const I7={mode:$r.onSubmit,reValidateMode:$r.onChange,shouldFocusError:!0};function z7(e={}){let t={...I7,...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)?wr(t.defaultValues||t.values)||{}:{},c=t.shouldUnregister?{}:wr(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:Tu(),array:Tu(),state:Tu()},I=Nm(t.mode),_=Nm(t.reValidateMode),H=t.criteriaMode===$r.all,B=q=>re=>{clearTimeout(A),A=setTimeout(q,re)},Z=async q=>{if(E.isValid||q){const re=t.resolver?Cr((await J()).errors):await le(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=T7(r.validatingFields),P.state.next({validatingFields:r.validatingFields,isValidating:r.isValidating}))},V=(q,re=[],se,be,xe=!0,pe=!0)=>{if(be&&se){if(p.action=!0,pe&&Array.isArray(Ee(s,q))){const Te=se(Ee(s,q),be.argA,be.argB);xe&&dt(s,q,Te)}if(pe&&Array.isArray(Ee(r.errors,q))){const Te=se(Ee(r.errors,q),be.argA,be.argB);xe&&dt(r.errors,q,Te),O7(r.errors,q)}if(E.touchedFields&&pe&&Array.isArray(Ee(r.touchedFields,q))){const Te=se(Ee(r.touchedFields,q),be.argA,be.argB);xe&&dt(r.touchedFields,q,Te)}E.dirtyFields&&(r.dirtyFields=Sl(o,c)),P.state.next({name:q,isDirty:ve(q,re),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else dt(c,q,re)},R=(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,be)=>{const xe=Ee(s,q);if(xe){const pe=Ee(c,q,vt(se)?Ee(o,q):se);vt(pe)||be&&be.defaultChecked||re?dt(c,q,re?pe:Mu(xe._f)):Re(q,pe),p.mount&&Z()}},X=(q,re,se,be,xe)=>{let pe=!1,Te=!1;const et={name:q},wt=!!(Ee(s,q)&&Ee(s,q)._f.disabled);if(!se||be){E.isDirty&&(Te=r.isDirty,r.isDirty=et.isDirty=ve(),pe=Te!==et.isDirty);const Pt=wt||Vn(Ee(o,q),re);Te=!!(!wt&&Ee(r.dirtyFields,q)),Pt||wt?Rt(r.dirtyFields,q):dt(r.dirtyFields,q,!0),et.dirtyFields=r.dirtyFields,pe=pe||E.dirtyFields&&Te!==!Pt}if(se){const Pt=Ee(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,be)=>{const xe=Ee(r.errors,q),pe=E.isValid&&Si(re)&&r.isValid!==re;if(e.delayError&&se?(C=B(()=>R(q,se)),C(e.delayError)):(clearTimeout(A),C=null,se?dt(r.errors,q,se):Rt(r.errors,q)),(se?!Vn(xe,se):xe)||!Cr(be)||pe){const Te={...be,...pe&&Si(re)?{isValid:re}:{},errors:r.errors,name:q};r={...r,...Te},P.state.next(Te)}W(!1,Object.keys(r.validatingFields).filter(Te=>Te===q))},J=async q=>t.resolver(c,t.context,R7(q||v.mount,s,t.criteriaMode,t.shouldUseNativeValidation)),fe=async q=>{const{errors:re}=await J(q);if(q)for(const se of q){const be=Ee(re,se);be?dt(r.errors,se,be):Rt(r.errors,se)}else r.errors=re;return re},le=async(q,re,se={valid:!0})=>{for(const be in q){const xe=q[be];if(xe){const{_f:pe,...Te}=xe;if(pe){const et=v.array.has(pe.name),wt=await Mm(xe,c,H,t.shouldUseNativeValidation&&!re,et);if(wt[pe.name]&&(se.valid=!1,re))break;!re&&(Ee(wt,pe.name)?et?N7(r.errors,wt,pe.name):dt(r.errors,pe.name,wt[pe.name]):Rt(r.errors,pe.name))}Te&&await le(Te,re,se)}}return se.valid},Ne=()=>{for(const q of v.unMount){const re=Ee(s,q);re&&(re._f.refs?re._f.refs.every(se=>!Ru(se)):!Ru(re._f.ref))&&Be(q)}v.unMount=new Set},ve=(q,re)=>(q&&re&&dt(c,q,re),!Vn(Ae(),o)),Le=(q,re,se)=>A7(q,v,{...p.mount?c:vt(re)?o:ni(q)?{[q]:re}:re},se,re),Fe=q=>Wo(Ee(p.mount?c:o,q,e.shouldUnregister?Ee(o,q,[]):[])),Re=(q,re,se={})=>{const be=Ee(s,q);let xe=re;if(be){const pe=be._f;pe&&(!pe.disabled&&dt(c,q,_y(re,pe)),xe=Mc(pe.ref)&&Jt(re)?"":re,Ty(pe.ref)?[...pe.ref.options].forEach(Te=>Te.selected=xe.includes(Te.value)):pe.refs?Vo(pe.ref)?pe.refs.length>1?pe.refs.forEach(Te=>(!Te.defaultChecked||!Te.disabled)&&(Te.checked=Array.isArray(xe)?!!xe.find(et=>et===Te.value):xe===Te.value)):pe.refs[0]&&(pe.refs[0].checked=!!xe):pe.refs.forEach(Te=>Te.checked=Te.value===xe):Kp(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&&oe(q)},qe=(q,re,se)=>{for(const be in re){const xe=re[be],pe=`${q}.${be}`,Te=Ee(s,pe);(v.array.has(q)||!Oc(xe)||Te&&!Te._f)&&!_s(xe)?qe(pe,xe,se):Re(pe,xe,se)}},it=(q,re,se={})=>{const be=Ee(s,q),xe=v.array.has(q),pe=wr(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:Sl(o,c),isDirty:ve(q,pe)})):be&&!be._f&&!Jt(pe)?qe(q,pe,se):Re(q,pe,se),Em(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,be=!0;const xe=Ee(s,se),pe=()=>re.type?Mu(xe._f):v7(q),Te=et=>{be=Number.isNaN(et)||et===Ee(c,se,et)};if(xe){let et,wt;const Pt=pe(),Vi=q.type===jm.BLUR||q.type===jm.FOCUS_OUT,el=!M7(xe._f)&&!t.resolver&&!Ee(r.errors,se)&&!xe._f.deps||_7(Vi,Ee(r.touchedFields,se),r.isSubmitted,_,I),fs=Em(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 ga=X(se,Pt,Vi,!1),tl=!Cr(ga)||fs;if(!Vi&&P.values.next({name:se,type:q.type,values:{...c}}),el)return E.isValid&&Z(),tl&&P.state.next({name:se,...fs?{}:ga});if(!Vi&&fs&&P.state.next({...r}),W(!0,[se]),t.resolver){const{errors:rl}=await J([se]);if(Te(Pt),be){const il=_m(r.errors,s,se),nl=_m(rl,s,il.name||se);et=nl.error,se=nl.name,wt=Cr(rl)}}else et=(await Mm(xe,c,H,t.shouldUseNativeValidation))[se],Te(Pt),be&&(et?wt=!1:E.isValid&&(wt=await le(s,!0)));be&&(xe._f.deps&&oe(xe._f.deps),Q(se,wt,et,ga))}},ce=(q,re)=>{if(Ee(r.errors,re)&&q.focus)return q.focus(),1},oe=async(q,re={})=>{let se,be;const xe=Pu(q);if(W(!0,xe),t.resolver){const pe=await fe(vt(q)?q:xe);se=Cr(pe),be=q?!xe.some(Te=>Ee(pe,Te)):se}else q?(be=(await Promise.all(xe.map(async pe=>{const Te=Ee(s,pe);return await le(Te&&Te._f?{[pe]:Te}:Te)}))).every(Boolean),!(!be&&!r.isValid)&&Z()):be=se=await le(s);return P.state.next({...!ni(q)||E.isValid&&se!==r.isValid?{}:{name:q},...t.resolver||!q?{isValid:se}:{},errors:r.errors,isValidating:!1}),re.shouldFocus&&!be&&Ka(s,ce,q?xe:v.mount),be},Ae=q=>{const re={...o,...p.mount?c:{}};return vt(q)?re:ni(q)?Ee(re,q):q.map(se=>Ee(re,se))},je=(q,re)=>({invalid:!!Ee((re||r).errors,q),isDirty:!!Ee((re||r).dirtyFields,q),isTouched:!!Ee((re||r).touchedFields,q),isValidating:!!Ee((re||r).validatingFields,q),error:Ee((re||r).errors,q)}),ze=q=>{q&&Pu(q).forEach(re=>Rt(r.errors,re)),P.state.next({errors:q?r.errors:{}})},Ue=(q,re,se)=>{const be=(Ee(s,q,{_f:{}})._f||{}).ref;dt(r.errors,q,{...re,ref:be}),P.state.next({name:q,errors:r.errors,isValid:!1}),se&&se.shouldFocus&&be&&be.focus&&be.focus()},He=(q,re)=>sn(q)?P.values.subscribe({next:se=>q(Le(void 0,re),se)}):Le(q,re,!0),Be=(q,re={})=>{for(const se of q?Pu(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:ve()}:{}}),!re.keepIsValid&&Z()},_e=({disabled:q,name:re,field:se,fields:be,value:xe})=>{if(Si(q)){const pe=q?void 0:vt(xe)?Mu(se?se._f:Ee(be,re)._f):xe;dt(c,re,pe),X(re,pe,!1,!1,!0)}},Nt=(q,re={})=>{let se=Ee(s,q);const be=Si(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?_e({field:se,disabled:re.disabled,name:q,value:re.value}):ee(q,!0,re.value),{...be?{disabled:re.disabled}:{},...t.progressive?{required:!!re.required,min:ja(re.min),max:ja(re.max),minLength:ja(re.minLength),maxLength:ja(re.maxLength),pattern:ja(re.pattern)}:{},name:q,onChange:de,onBlur:de,ref:xe=>{if(xe){Nt(q,re),se=Ee(s,q);const pe=vt(xe.value)&&xe.querySelectorAll&&xe.querySelectorAll("input,select,textarea")[0]||xe,Te=P7(pe),et=se._f.refs||[];if(Te?et.find(wt=>wt===pe):pe===se._f.ref)return;dt(s,q,{_f:{...se._f,...Te?{refs:[...et.filter(Ru),pe,...Array.isArray(Ee(o,q))?[{}]:[]],ref:{type:pe.type,name:q}}:{ref:pe}}}),ee(q,!1,void 0,pe)}else se=Ee(s,q,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||re.shouldUnregister)&&!(b7(v.array,q)&&p.action)&&v.unMount.add(q)}}},fr=()=>t.shouldFocusError&&Ka(s,ce,v.mount),us=q=>{Si(q)&&(P.state.next({disabled:q}),Ka(s,(re,se)=>{let be=q;const xe=Ee(s,se);xe&&Si(xe._f.disabled)&&(be||(be=xe._f.disabled)),re.disabled=be},0,!1))},Bi=(q,re)=>async se=>{let be;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let xe=wr(c);if(P.state.next({isSubmitting:!0}),t.resolver){const{errors:pe,values:Te}=await J();r.errors=pe,xe=Te}else await le(s);if(Rt(r.errors,"root"),Cr(r.errors)){P.state.next({errors:{}});try{await q(xe,se)}catch(pe){be=pe}}else re&&await re({...r.errors},se),fr(),setTimeout(fr);if(P.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Cr(r.errors)&&!be,submitCount:r.submitCount+1,errors:r.errors}),be)throw be},Ko=(q,re={})=>{Ee(s,q)&&(vt(re.defaultValue)?it(q,wr(Ee(o,q))):(it(q,re.defaultValue),dt(o,q,wr(re.defaultValue))),re.keepTouched||Rt(r.touchedFields,q),re.keepDirty||(Rt(r.dirtyFields,q),r.isDirty=re.defaultValue?ve(q,wr(Ee(o,q))):ve()),re.keepError||(Rt(r.errors,q),E.isValid&&Z()),P.state.next({...r}))},pa=(q,re={})=>{const se=q?wr(q):o,be=wr(se),xe=Cr(q),pe=xe?o:be;if(re.keepDefaultValues||(o=se),!re.keepValues){if(re.keepDirtyValues)for(const Te of v.mount)Ee(r.dirtyFields,Te)?dt(pe,Te,Ee(c,Te)):it(Te,Ee(pe,Te));else{if(qp&&vt(q))for(const Te of v.mount){const et=Ee(s,Te);if(et&&et._f){const wt=Array.isArray(et._f.refs)?et._f.refs[0]:et._f.ref;if(Mc(wt)){const Pt=wt.closest("form");if(Pt){Pt.reset();break}}}}s={}}c=e.shouldUnregister?re.keepDefaultValues?wr(o):{}:wr(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&&!Vn(q,o)),isSubmitted:re.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:xe?[]:re.keepDirtyValues?re.keepDefaultValues&&c?Sl(o,c):r.dirtyFields:re.keepDefaultValues&&q?Sl(o,q):{},touchedFields:re.keepTouched?r.touchedFields:{},errors:re.keepErrors?r.errors:{},isSubmitSuccessful:re.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},hs=(q,re)=>pa(sn(q)?q(c):q,re);return{control:{register:Nt,unregister:Be,getFieldState:je,handleSubmit:Bi,setError:Ue,_executeSchema:J,_getWatch:Le,_getDirty:ve,_updateValid:Z,_removeUnmounted:Ne,_updateFieldArray:V,_updateDisabledField:_e,_getFieldArray:Fe,_reset:pa,_resetDefaultValues:()=>sn(t.defaultValues)&&t.defaultValues().then(q=>{hs(q,t.resetOptions),P.state.next({isLoading:!1})}),_updateFormState:q=>{r={...r,...q}},_disableForm:us,_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:oe,register:Nt,handleSubmit:Bi,watch:He,setValue:it,getValues:Ae,reset:hs,resetField:Ko,clearErrors:ze,unregister:Be,setError:Ue,setFocus:(q,re={})=>{const se=Ee(s,q),be=se&&se._f;if(be){const xe=be.refs?be.refs[0]:be.ref;xe.focus&&(xe.focus(),re.shouldSelect&&xe.select())}},getFieldState:je}}function F7(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={...z7(e),formState:s});const c=t.current.control;return c._options=e,S7({subject:c._subjects.state,next:p=>{C7(p,c._proxyFormState,c._updateFormState)&&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&&!Vn(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=k7(s,c),t.current}function D7(e){return e.replace(/\/$/,"")}const H7=D7("https://backend.captn.ai")||"http://localhost:3001",Oy={apiUrl:H7};var zc;(function(e){e.Get="GET",e.Post="POST",e.Put="PUT",e.Delete="DELETE"})(zc||(zc={}));bt("form",{marginTop:"1.5rem"});bt("div",{"& + div":{marginTop:"1.5rem"}});bt("label",{display:"block !important",fontSize:"$sm !important",fontWeight:"500 !important",marginBottom:"0.5rem !important"});const 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"};bt("input",Iy);bt("textarea",Iy);bt("div",{display:"block",fontSize:"$sm",fontWeight:"500",color:"$formErrorText",marginTop:"0.5rem"});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"});x7({width:"1.25rem",height:"1.25rem"});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:B7}=Object.prototype,{getPrototypeOf:e1}=Object,Td=(e=>t=>{const r=B7.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),pi=e=>(e=e.toLowerCase(),t=>Td(t)===e),Rd=e=>t=>typeof t===e,{isArray:ca}=Array,bo=Rd("undefined");function V7(e){return e!==null&&!bo(e)&&e.constructor!==null&&!bo(e.constructor)&&Pr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fy=pi("ArrayBuffer");function W7(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Fy(e.buffer),t}const $7=Rd("string"),Pr=Rd("function"),Dy=Rd("number"),Md=e=>e!==null&&typeof e=="object",X7=e=>e===!0||e===!1,Gl=e=>{if(Td(e)!=="object")return!1;const t=e1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Y7=pi("Date"),U7=pi("File"),G7=pi("Blob"),Z7=pi("FileList"),q7=e=>Md(e)&&Pr(e.pipe),Q7=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Pr(e.append)&&((t=Td(e))==="formdata"||t==="object"&&Pr(e.toString)&&e.toString()==="[object FormData]"))},K7=pi("URLSearchParams"),J7=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $o(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),ca(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=>!bo(e)&&e!==By;function tf(){const{caseless:e}=Vy(this)&&this||{},t={},r=(s,o)=>{const c=e&&Hy(t,o)||o;Gl(t[c])&&Gl(s)?t[c]=tf(t[c],s):Gl(s)?t[c]=tf({},s):ca(s)?t[c]=s.slice():t[c]=s};for(let s=0,o=arguments.length;s($o(t,(o,c)=>{r&&Pr(o)?e[c]=zy(o,r):e[c]=o},{allOwnKeys:s}),e),t6=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),r6=(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)},i6=(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&&e1(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},n6=(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},s6=e=>{if(!e)return null;if(ca(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},a6=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&e1(Uint8Array)),o6=(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])}},l6=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},c6=pi("HTMLFormElement"),d6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,o){return s.toUpperCase()+o}),Om=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),u6=pi("RegExp"),Wy=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};$o(r,(o,c)=>{let p;(p=t(o,c,e))!==!1&&(s[c]=p||o)}),Object.defineProperties(e,s)},h6=e=>{Wy(e,(t,r)=>{if(Pr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(Pr(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+"'")})}})},f6=(e,t)=>{const r={},s=o=>{o.forEach(c=>{r[c]=!0})};return ca(e)?s(e):s(String(e).split(t)),r},p6=()=>{},g6=(e,t)=>(e=+e,Number.isFinite(e)?e:t),_u="abcdefghijklmnopqrstuvwxyz",Im="0123456789",$y={DIGIT:Im,ALPHA:_u,ALPHA_DIGIT:_u+_u.toUpperCase()+Im},m6=(e=16,t=$y.ALPHA_DIGIT)=>{let r="";const{length:s}=t;for(;e--;)r+=t[Math.random()*s|0];return r};function x6(e){return!!(e&&Pr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const v6=e=>{const t=new Array(10),r=(s,o)=>{if(Md(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[o]=s;const c=ca(s)?[]:{};return $o(s,(p,v)=>{const C=r(p,o+1);!bo(C)&&(c[v]=C)}),t[o]=void 0,c}}return s};return r(e,0)},y6=pi("AsyncFunction"),b6=e=>e&&(Md(e)||Pr(e))&&Pr(e.then)&&Pr(e.catch),ae={isArray:ca,isArrayBuffer:Fy,isBuffer:V7,isFormData:Q7,isArrayBufferView:W7,isString:$7,isNumber:Dy,isBoolean:X7,isObject:Md,isPlainObject:Gl,isUndefined:bo,isDate:Y7,isFile:U7,isBlob:G7,isRegExp:u6,isFunction:Pr,isStream:q7,isURLSearchParams:K7,isTypedArray:a6,isFileList:Z7,forEach:$o,merge:tf,extend:e6,trim:J7,stripBOM:t6,inherits:r6,toFlatObject:i6,kindOf:Td,kindOfTest:pi,endsWith:n6,toArray:s6,forEachEntry:o6,matchAll:l6,isHTMLForm:c6,hasOwnProperty:Om,hasOwnProp:Om,reduceDescriptors:Wy,freezeMethods:h6,toObjectSet:f6,toCamelCase:d6,noop:p6,toFiniteNumber:g6,findKey:Hy,global:By,isContextDefined:Vy,ALPHABET:$y,generateString:m6,isSpecCompliantForm:x6,toJSONObject:v6,isAsyncFn:y6,isThenable:b6};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 w6=null;function rf(e){return ae.isPlainObject(e)||ae.isArray(e)}function Uy(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function zm(e,t,r){return e?e.concat(t).map(function(o,c){return o=Uy(o),!r&&c?"["+o+"]":o}).join(r?".":""):t}function k6(e){return ae.isArray(e)&&!e.some(rf)}const C6=ae.toFlatObject(ae,{},null,function(t){return/^is[A-Z]/.test(t)});function _d(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(B,Z){return!ae.isUndefined(Z[B])});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,B,Z){let W=H;if(H&&!Z&&typeof H=="object"){if(ae.endsWith(B,"{}"))B=s?B:B.slice(0,-2),H=JSON.stringify(H);else if(ae.isArray(H)&&k6(H)||(ae.isFileList(H)||ae.endsWith(B,"[]"))&&(W=ae.toArray(H)))return B=Uy(B),W.forEach(function(R,K){!(ae.isUndefined(R)||R===null)&&t.append(p===!0?zm([B],K,c):p===null?B:B+"[]",A(R))}),!1}return rf(H)?!0:(t.append(zm(Z,B,c),A(H)),!1)}const P=[],I=Object.assign(C6,{defaultVisitor:E,convertValue:A,isVisitable:rf});function _(H,B){if(!ae.isUndefined(H)){if(P.indexOf(H)!==-1)throw Error("Circular reference detected in "+B.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,B,I))===!0&&_(W,B?B.concat(V):[V])}),P.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Fm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function t1(e,t){this._pairs=[],e&&_d(e,this,t)}const Gy=t1.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,Fm)}:Fm;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function S6(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||S6,o=r&&r.serialize;let c;if(o?c=o(t,r):c=ae.isURLSearchParams(t)?t.toString():new t1(t,r).toString(s),c){const p=e.indexOf("#");p!==-1&&(e=e.slice(0,p)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class Dm{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},A6=typeof URLSearchParams<"u"?URLSearchParams:t1,j6=typeof FormData<"u"?FormData:null,N6=typeof Blob<"u"?Blob:null,E6={isBrowser:!0,classes:{URLSearchParams:A6,FormData:j6,Blob:N6},protocols:["http","https","file","blob","url","data"]},Qy=typeof window<"u"&&typeof document<"u",L6=(e=>Qy&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),P6=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",T6=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qy,hasStandardBrowserEnv:L6,hasStandardBrowserWebWorkerEnv:P6},Symbol.toStringTag,{value:"Module"})),si={...T6,...E6};function R6(e,t){return _d(e,new si.classes.URLSearchParams,Object.assign({visitor:function(r,s,o,c){return si.isNode&&ae.isBuffer(r)?(this.append(s,r.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)}},t))}function M6(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _6(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]=_6(o[p])),!v)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const r={};return ae.forEachEntry(e,(s,o)=>{t(M6(s),o,r,0)}),r}return null}function O6(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 Xo={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 R6(t,this.formSerializer).toString();if((v=ae.isFileList(t))||s.indexOf("multipart/form-data")>-1){const C=this.env&&this.env.FormData;return _d(v?{"files[]":t}:t,C&&new C,this.formSerializer)}}return c||o?(r.setContentType("application/json",!1),O6(t)):t}],transformResponse:[function(t){const r=this.transitional||Xo.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:si.classes.FormData,Blob:si.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=>{Xo.headers[e]={}});const I6=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"]),z6=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]&&I6[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t},Hm=Symbol("internals");function Na(e){return e&&String(e).trim().toLowerCase()}function Zl(e){return e===!1||e==null?e:ae.isArray(e)?e.map(Zl):String(e)}function F6(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 D6=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ou(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 H6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function B6(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 Tr{constructor(t){t&&this.set(t)}set(t,r,s){const o=this;function c(v,C,A){const E=Na(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]=Zl(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())&&!D6(t)?p(z6(t),r):t!=null&&c(r,t,s),this}get(t,r){if(t=Na(t),t){const s=ae.findKey(this,t);if(s){const o=this[s];if(!r)return o;if(r===!0)return F6(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=Na(t),t){const s=ae.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||Ou(this,this[s],s,r)))}return!1}delete(t,r){const s=this;let o=!1;function c(p){if(p=Na(p),p){const v=ae.findKey(s,p);v&&(!r||Ou(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||Ou(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]=Zl(o),delete r[c];return}const v=t?H6(c):String(c).trim();v!==c&&delete r[c],r[v]=Zl(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[Hm]=this[Hm]={accessors:{}}).accessors,o=this.prototype;function c(p){const v=Na(p);s[v]||(B6(o,p),s[v]=!0)}return ae.isArray(t)?t.forEach(c):c(t),this}}Tr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(Tr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});ae.freezeMethods(Tr);function Iu(e,t){const r=this||Xo,s=t||r,o=Tr.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 Yo(e,t,r){Qe.call(this,e??"canceled",Qe.ERR_CANCELED,t,r),this.name="CanceledError"}ae.inherits(Yo,Qe,{__CANCEL__:!0});function V6(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 W6=si.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 $6(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function X6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function eb(e,t){return e&&!$6(t)?X6(e,t):t}const Y6=si.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 U6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function G6(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,I=0;for(;P!==o;)I+=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 Z6=typeof XMLHttpRequest<"u",q6=Z6&&function(e){return new Promise(function(r,s){let o=e.data;const c=Tr.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(si.hasStandardBrowserEnv||si.hasStandardBrowserWebWorkerEnv)c.setContentType(!1);else if((E=c.getContentType())!==!1){const[B,...Z]=E?E.split(";").map(W=>W.trim()).filter(Boolean):[];c.setContentType([B||"multipart/form-data",...Z].join("; "))}}let P=new XMLHttpRequest;if(e.auth){const B=e.auth.username||"",Z=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";c.set("Authorization","Basic "+btoa(B+":"+Z))}const I=eb(e.baseURL,e.url);P.open(e.method.toUpperCase(),Zy(I,e.params,e.paramsSerializer),!0),P.timeout=e.timeout;function _(){if(!P)return;const B=Tr.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),W={data:!p||p==="text"||p==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:B,config:e,request:P};V6(function(R){r(R),A()},function(R){s(R),A()},W),P=null}if("onloadend"in P?P.onloadend=_:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(_)},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},si.hasStandardBrowserEnv&&(v&&ae.isFunction(v)&&(v=v(e)),v||v!==!1&&Y6(I))){const B=e.xsrfHeaderName&&e.xsrfCookieName&&W6.read(e.xsrfCookieName);B&&c.set(e.xsrfHeaderName,B)}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",Bm(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&P.upload&&P.upload.addEventListener("progress",Bm(e.onUploadProgress)),(e.cancelToken||e.signal)&&(C=B=>{P&&(s(!B||B.type?new Yo(null,e,P):B),P.abort(),P=null)},e.cancelToken&&e.cancelToken.subscribe(C),e.signal&&(e.signal.aborted?C():e.signal.addEventListener("abort",C)));const H=U6(I);if(H&&si.protocols.indexOf(H)===-1){s(new Qe("Unsupported protocol "+H+":",Qe.ERR_BAD_REQUEST,e));return}P.send(o||null)})},nf={http:w6,xhr:q6};ae.forEach(nf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Vm=e=>`- ${e}`,Q6=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,Vp=Ot?Symbol.for("react.element"):60103,Wp=Ot?Symbol.for("react.portal"):60106,vd=Ot?Symbol.for("react.fragment"):60107,yd=Ot?Symbol.for("react.strict_mode"):60108,bd=Ot?Symbol.for("react.profiler"):60114,wd=Ot?Symbol.for("react.provider"):60109,kd=Ot?Symbol.for("react.context"):60110,$p=Ot?Symbol.for("react.async_mode"):60111,Cd=Ot?Symbol.for("react.concurrent_mode"):60111,Sd=Ot?Symbol.for("react.forward_ref"):60112,Ad=Ot?Symbol.for("react.suspense"):60113,m8=Ot?Symbol.for("react.suspense_list"):60120,jd=Ot?Symbol.for("react.memo"):60115,Nd=Ot?Symbol.for("react.lazy"):60116,x8=Ot?Symbol.for("react.block"):60121,v8=Ot?Symbol.for("react.fundamental"):60117,y8=Ot?Symbol.for("react.responder"):60118,b8=Ot?Symbol.for("react.scope"):60119;function br(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Vp:switch(e=e.type,e){case $p:case Cd:case vd:case bd:case yd:case Ad:return e;default:switch(e=e&&e.$$typeof,e){case kd:case Sd:case Nd:case jd:case wd:return e;default:return t}}case Wp:return t}}}function vy(e){return br(e)===Cd}st.AsyncMode=$p;st.ConcurrentMode=Cd;st.ContextConsumer=kd;st.ContextProvider=wd;st.Element=Vp;st.ForwardRef=Sd;st.Fragment=vd;st.Lazy=Nd;st.Memo=jd;st.Portal=Wp;st.Profiler=bd;st.StrictMode=yd;st.Suspense=Ad;st.isAsyncMode=function(e){return vy(e)||br(e)===$p};st.isConcurrentMode=vy;st.isContextConsumer=function(e){return br(e)===kd};st.isContextProvider=function(e){return br(e)===wd};st.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Vp};st.isForwardRef=function(e){return br(e)===Sd};st.isFragment=function(e){return br(e)===vd};st.isLazy=function(e){return br(e)===Nd};st.isMemo=function(e){return br(e)===jd};st.isPortal=function(e){return br(e)===Wp};st.isProfiler=function(e){return br(e)===bd};st.isStrictMode=function(e){return br(e)===yd};st.isSuspense=function(e){return br(e)===Ad};st.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===vd||e===Cd||e===bd||e===yd||e===Ad||e===m8||typeof e=="object"&&e!==null&&(e.$$typeof===Nd||e.$$typeof===jd||e.$$typeof===wd||e.$$typeof===kd||e.$$typeof===Sd||e.$$typeof===v8||e.$$typeof===y8||e.$$typeof===b8||e.$$typeof===x8)};st.typeOf=br;xy.exports=st;var w8=xy.exports;function Ed(e,t){if(e==null)return{};var r={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.includes(s))continue;r[s]=e[s]}return r}var yy=w8,k8={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},C8={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},by={};by[yy.ForwardRef]=k8;by[yy.Memo]=C8;var ju=1073741823,um=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{};function S8(){var e="__global_unique_id__";return um[e]=(um[e]||0)+1}function A8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function j8(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 N8(e){return Array.isArray(e)?e[0]:e}function E8(e,t){var r,s,o="__create-react-context-"+S8()+"__",c=function(v){ci(C,v);function C(){for(var E,P=arguments.length,I=new Array(P),_=0;_"u"&&(Qs=Up);function H8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var B8=Qs(function(e,t){var r=e.innerRef,s=e.navigate,o=e.onClick,c=Ed(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")&&!H8(A)&&(A.preventDefault(),s())}});return Up!==Qs?v.ref=t||r:v.ref=r,ge.createElement("a",v)}),rt=Qs(function(e,t){var r=e.component,s=r===void 0?B8:r,o=e.replace,c=e.to,p=e.innerRef,v=Ed(e,["component","replace","to","innerRef"]);return ge.createElement(yn.Consumer,null,function(C){C||En();var A=C.history,E=Jh(Kh(c,C.location),C.location),P=E?A.createHref(E):"",I=Bt({},v,{href:P,navigate:function(){var H=Kh(c,C.location),B=or(C.location)===or(Jh(H)),Z=o||B?A.replace:A.push;Z(H)}});return Up!==Qs?I.ref=t||p:I.innerRef=p,ge.createElement(s,I)})}),Sy=function(t){return t},Mc=ge.forwardRef;typeof Mc>"u"&&(Mc=Sy);function V8(){for(var e=arguments.length,t=new Array(e),r=0;rtypeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,la=()=>{const e=Object.create(null);return(t,r,...s)=>{const o=(c=>JSON.stringify(c,$8))(t);return o in e?e[o]:e[o]=r(t,...s)}},Yn=Symbol.for("sxs.internal"),Gp=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),ym=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:X8}=Object.prototype,ef=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),Y8=/\s+(?![^()]*\))/,ms=e=>t=>e(...typeof t=="string"?String(t).split(Y8):[t]),bm={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:ms((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:ms((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:ms((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:ms((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:ms((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:ms((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},Lu=/([\d.]+)([^]*)/,U8=(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,G8=(e,t)=>e in Z8&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(r,s,o,c)=>s+(o==="stretch"?`-moz-available${c};${ef(e)}:${s}-webkit-fill-available`:`-moz-fit-content${c};${ef(e)}:${s}fit-content`)+c):String(t),Z8={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+"-":"",Ay=(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")+")":"")),q8=/\s*,\s*(?![^()]*\))/,Q8=Object.prototype.toString,Ms=(e,t,r,s,o)=>{let c,p,v;const C=(A,E,P)=>{let I,_;const H=B=>{for(I in B){const V=I.charCodeAt(0)===64,R=V&&Array.isArray(B[I])?B[I]:[B[I]];for(_ of R){const K=/[A-Z]/.test(W=I)?W:W.replace(/-[^]/g,X=>X[1].toUpperCase()),ee=typeof _=="object"&&_&&_.toString===Q8&&(!s.utils[K]||!E.length);if(K in s.utils&&!ee){const X=s.utils[K];if(X!==p){p=X,H(X(_)),p=null;continue}}else if(K in bm){const X=bm[K];if(X!==v){v=X,H(X(_)),v=null;continue}}if(V&&(Z=I.slice(1)in s.media?"@media "+s.media[I.slice(1)]:I,I=Z.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(X,Q,J,fe,le,Ne)=>{const ve=Lu.test(Q),Le=.0625*(ve?-1:1),[Fe,Re]=ve?[fe,Q]:[Q,fe];return"("+(J[0]==="="?"":J[0]===">"===ve?"max-":"min-")+Fe+":"+(J[0]!=="="&&J.length===1?Re.replace(Lu,(qe,it,de)=>Number(it)+Le*(J===">"?1:-1)+de):Re)+(le?") and ("+(le[0]===">"?"min-":"max-")+Fe+":"+(le.length===1?Ne.replace(Lu,(qe,it,de)=>Number(it)+Le*(le===">"?-1:1)+de):Ne):"")+")"})),ee){const X=V?P.concat(I):[...P],Q=V?[...E]:U8(E,I.split(q8));c!==void 0&&o(wm(...c)),c=void 0,C(_,Q,X)}else c===void 0&&(c=[[],E,P]),I=V||I.charCodeAt(0)!==36?I:`--${Oi(s.prefix)}${I.slice(1).replace(/\$/g,"-")}`,_=ee?_:typeof _=="number"?_&&K in K8?String(_)+"px":String(_):Ay(G8(K,_??""),s.prefix,s.themeMap[K]),c[0].push(`${V?`${I} `:`${ef(I)}:`}${_}`)}}var Z,W};H(A),c!==void 0&&o(wm(...c)),c=void 0};C(e,t,r)},wm=(e,t,r)=>`${r.map(s=>`${s}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(r.length?r.length+1:0).join("}")}`,K8={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},km=e=>String.fromCharCode(e+(e>25?39:97)),Un=e=>(t=>{let r,s="";for(r=Math.abs(t);r>52;r=r/52|0)s=km(r%52)+s;return km(r%52)+s})(((t,r)=>{let s=r.length;for(;s;)t=33*t^r.charCodeAt(--s);return t})(5381,JSON.stringify(e))>>>0),Fa=["themed","global","styled","onevar","resonevar","allvar","inline"],J8=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},e7=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(J8(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:I}=E;if(!I.startsWith("--sxs"))continue;const _=I.slice(14,-3).trim().split(/\s+/),H=Fa[_[0]];H&&(t||(t={sheet:v,reset:s,rules:{},toString:r}),t.rules[H]={group:P,index:C,cache:new Set(_)})}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=Fa.length-1;v>=0;--v){const C=Fa[v];if(!p[C]){const A=Fa[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])}}t7(p[C])}};return s(),t},t7=e=>{const t=e.group;let r=t.cssRules.length;e.apply=s=>{try{t.insertRule(s,r),++r}catch{}}},Aa=Symbol(),r7=la(),Cm=(e,t)=>r7(e,()=>(...r)=>{let s={type:null,composers:new Set};for(const o of r)if(o!=null)if(o[Yn]){s.type==null&&(s.type=o[Yn].type);for(const c of o[Yn].composers)s.composers.add(c)}else o.constructor!==Object||o.$$typeof?s.type==null&&(s.type=o):s.composers.add(i7(o,e));return s.type==null&&(s.type="span"),s.composers.size||s.composers.add(["PJLV",{},[],[],{},[]]),n7(e,s,t)}),i7=({variants:e,compoundVariants:t,defaultVariants:r,...s},o)=>{const c=`${Oi(o.prefix)}c-${Un(s)}`,p=[],v=[],C=Object.create(null),A=[];for(const I in r)C[I]=String(r[I]);if(typeof e=="object"&&e)for(const I in e){E=C,P=I,X8.call(E,P)||(C[I]="undefined");const _=e[I];for(const H in _){const B={[I]:String(H)};String(H)==="undefined"&&A.push(I);const Z=_[H],W=[B,Z,!ym(Z)];p.push(W)}}var E,P;if(typeof t=="object"&&t)for(const I of t){let{css:_,...H}=I;_=typeof _=="object"&&_||{};for(const Z in H)H[Z]=String(H[Z]);const B=[H,_,!ym(_)];v.push(B)}return[c,s,p,v,C,A]},n7=(e,t,r)=>{const[s,o,c,p]=s7(t.composers),v=typeof t.type=="function"||t.type.$$typeof?(P=>{function I(){for(let _=0;_I.rules[_]={apply:H=>I[Aa].push([_,H])}),I})(r):null,C=(v||r).rules,A=`.${s}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,E=P=>{P=typeof P=="object"&&P||a7;const{css:I,..._}=P,H={};for(const W in c)if(delete _[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 B=new Set([...o]);for(const[W,V,R,K]of t.composers){r.rules.styled.cache.has(W)||(r.rules.styled.cache.add(W),Ms(V,[`.${W}`],[],e,Q=>{C.styled.apply(Q)}));const ee=Sm(R,H,e.media),X=Sm(K,H,e.media,!0);for(const Q of ee)if(Q!==void 0)for(const[J,fe,le]of Q){const Ne=`${W}-${Un(fe)}-${J}`;B.add(Ne);const ve=(le?r.rules.resonevar:r.rules.onevar).cache,Le=le?C.resonevar:C.onevar;ve.has(Ne)||(ve.add(Ne),Ms(fe,[`.${Ne}`],[],e,Fe=>{Le.apply(Fe)}))}for(const Q of X)if(Q!==void 0)for(const[J,fe]of Q){const le=`${W}-${Un(fe)}-${J}`;B.add(le),r.rules.allvar.cache.has(le)||(r.rules.allvar.cache.add(le),Ms(fe,[`.${le}`],[],e,Ne=>{C.allvar.apply(Ne)}))}}if(typeof I=="object"&&I){const W=`${s}-i${Un(I)}-css`;B.add(W),r.rules.inline.cache.has(W)||(r.rules.inline.cache.add(W),Ms(I,[`.${W}`],[],e,V=>{C.inline.apply(V)}))}for(const W of String(P.className||"").trim().split(/\s+/))W&&B.add(W);const Z=_.className=[...B].join(" ");return{type:t.type,className:Z,selector:A,props:_,toString:()=>Z,deferredInjector:v}};return Gp(E,{className:s,selector:A,[Yn]:t,toString:()=>(r.rules.styled.cache.has(s)||E(),s)})},s7=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)]},Sm=(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 I=t[C];if(I!==P){if(typeof I!="object"||!I)continue e;{let _,H,B=0;for(const Z in I){if(P===String(I[Z])){if(Z!=="@initial"){const W=Z.slice(1);(H=H||[]).push(W in r?r[W]:Z.replace(/^@media ?/,"")),E=!0}A+=B,_=!0}++B}if(H&&H.length&&(p={["@media "+H.join(", ")]:p}),!_)continue e}}}(o[A]=o[A]||[]).push([s?"cv":`${C}-${c[C]}`,p,E])}return o},a7={},o7=la(),l7=(e,t)=>o7(e,()=>(...r)=>{const s=()=>{for(let o of r){o=typeof o=="object"&&o||{};let c=Un(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"]}Ms(o,[],[],e,p=>{t.rules.global.apply(p)})}}return""};return Gp(s,{toString:s})}),c7=la(),d7=(e,t)=>c7(e,()=>r=>{const s=`${Oi(e.prefix)}k-${Un(r)}`,o=()=>{if(!t.rules.global.cache.has(s)){t.rules.global.cache.add(s);const c=[];Ms(r,[],[],e,v=>c.push(v));const p=`@keyframes ${s}{${c.join("")}}`;t.rules.global.apply(p)}return s};return Gp(o,{get name(){return o()},toString:o})}),u7=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}},h7=la(),f7=(e,t)=>h7(e,()=>(r,s)=>{s=typeof r=="object"&&r||Object(s);const o=`.${r=(r=typeof r=="string"?r:"")||`${Oi(e.prefix)}t-${Un(s)}`}`,c={},p=[];for(const C in s){c[C]={};for(const A in s[C]){const E=`--${Oi(e.prefix)}${C}-${A}`,P=Ay(String(s[C][A]),e.prefix,C);c[C][A]=new u7(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}}),p7=la(),Am,g7=la(),Zp=e=>{const t=(r=>{let s=!1;const o=p7(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||{...W8},utils:typeof c.utils=="object"&&c.utils||{}},P=e7(C),I={css:Cm(E,P),globalCss:l7(E,P),keyframes:d7(E,P),createTheme:f7(E,P),reset(){P.reset(),I.theme.toString()},theme:{},sheet:P,config:E,prefix:p,getCssText:P.toString,toString:P.toString};return String(I.theme=I.createTheme(A)),I});return s||o.reset(),o})(e);return t.styled=(({config:r,sheet:s})=>g7(r,()=>{const o=Cm(r,s);return(...c)=>{const p=o(...c),v=p[Yn].type,C=ge.forwardRef((A,E)=>{const P=A&&A.as||v,{props:I,deferredInjector:_}=p(A);return delete I.as,I.ref=E,_?ge.createElement(ge.Fragment,null,ge.createElement(P,I),ge.createElement(_,null)):ge.createElement(P,I)});return C.className=p.className,C.displayName=`Styled.${v.displayName||v.name||v}`,C.selector=p.selector,C.toString=()=>p.selector,C[Yn]=p[Yn],C}}))(t),t},jy=()=>Am||(Am=Zp()),m7=(...e)=>jy().createTheme(...e),x7=(...e)=>jy().css(...e);const{styled:bt,css:dP}=Zp({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 Wo=e=>e.type==="checkbox",_s=e=>e instanceof Date,Jt=e=>e==null;const Ny=e=>typeof e=="object";var At=e=>!Jt(e)&&!Array.isArray(e)&&Ny(e)&&!_s(e),v7=e=>At(e)&&e.target?Wo(e.target)?e.target.checked:e.target.value:e,y7=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,b7=(e,t)=>e.has(y7(t)),w7=e=>{const t=e.constructor&&e.constructor.prototype;return At(t)&&t.hasOwnProperty("isPrototypeOf")},qp=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function wr(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(!(qp&&(e instanceof Blob||e instanceof FileList))&&(r||At(e)))if(t=r?[]:{},!r&&!w7(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=wr(e[s]));else return e;return t}var $o=e=>Array.isArray(e)?e.filter(Boolean):[],vt=e=>e===void 0,Ee=(e,t,r)=>{if(!t||!At(e))return r;const s=$o(t.split(/[,[\].]+?/)).reduce((o,c)=>Jt(o)?o:o[c],e);return vt(s)||s===e?vt(e[t])?r:e[t]:s},Si=e=>typeof e=="boolean";const jm={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$r={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},vi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ge.createContext(null);var k7=(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]!==$r.all&&(t._proxyFormState[p]=!s||$r.all),e[p]}});return o},Cr=e=>At(e)&&!Object.keys(e).length,C7=(e,t,r,s)=>{r(e);const{name:o,...c}=e;return Cr(c)||Object.keys(c).length>=Object.keys(t).length||Object.keys(c).find(p=>t[p]===$r.all)},Pu=e=>Array.isArray(e)?e:[e];function S7(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 ni=e=>typeof e=="string",A7=(e,t,r,s,o)=>ni(e)?(s&&t.watch.add(e),Ee(r,e,o)):Array.isArray(e)?e.map(c=>(s&&t.watch.add(c),Ee(r,c))):(s&&(t.watchAll=!0),r),Qp=e=>/^\w*$/.test(e),Ey=e=>$o(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dt=(e,t,r)=>{let s=-1;const o=Qp(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}}:{},Nm=e=>({isOnSubmit:!e||e===$r.onSubmit,isOnBlur:e===$r.onBlur,isOnChange:e===$r.onChange,isOnAll:e===$r.all,isOnTouch:e===$r.onTouched}),Em=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Ka=(e,t,r,s)=>{for(const o of r||Object.keys(e)){const c=Ee(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;Ka(v,t)}else At(v)&&Ka(v,t)}}};var N7=(e,t,r)=>{const s=$o(Ee(e,r));return dt(s,"root",t[r]),dt(e,r,s),e},Kp=e=>e.type==="file",sn=e=>typeof e=="function",_c=e=>{if(!qp)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Gl=e=>ni(e),Jp=e=>e.type==="radio",Oc=e=>e instanceof RegExp;const Lm={value:!1,isValid:!1},Pm={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===""?Pm:{value:e[0].value,isValid:!0}:Pm:Lm}return Lm};const Tm={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,Tm):Tm;function Rm(e,t,r="validate"){if(Gl(e)||Array.isArray(e)&&e.every(Gl)||Si(e)&&!e)return{type:r,message:Gl(e)?e:"",ref:t}}var xs=e=>At(e)&&!Oc(e)?e:{value:e,message:""},Mm=async(e,t,r,s,o)=>{const{ref:c,refs:p,required:v,maxLength:C,minLength:A,min:E,max:P,pattern:I,validate:_,name:H,valueAsNumber:B,mount:Z,disabled:W}=e._f,V=Ee(t,H);if(!Z||W)return{};const R=p?p[0]:c,K=ve=>{s&&R.reportValidity&&(R.setCustomValidity(Si(ve)?"":ve||""),R.reportValidity())},ee={},X=Jp(c),Q=Wo(c),J=X||Q,fe=(B||Kp(c))&&vt(c.value)&&vt(V)||_c(c)&&c.value===""||V===""||Array.isArray(V)&&!V.length,le=j7.bind(null,H,r,ee),Ne=(ve,Le,Fe,Re=vi.maxLength,qe=vi.minLength)=>{const it=ve?Le:Fe;ee[H]={type:ve?Re:qe,message:it,ref:c,...le(ve?Re:qe,it)}};if(o?!Array.isArray(V)||!V.length:v&&(!J&&(fe||Jt(V))||Si(V)&&!V||Q&&!Ly(p).isValid||X&&!Py(p).isValid)){const{value:ve,message:Le}=Gl(v)?{value:!!v,message:v}:xs(v);if(ve&&(ee[H]={type:vi.required,message:Le,ref:R,...le(vi.required,Le)},!r))return K(Le),ee}if(!fe&&(!Jt(E)||!Jt(P))){let ve,Le;const Fe=xs(P),Re=xs(E);if(!Jt(V)&&!isNaN(V)){const qe=c.valueAsNumber||V&&+V;Jt(Fe.value)||(ve=qe>Fe.value),Jt(Re.value)||(Le=qenew Date(new Date().toDateString()+" "+oe),de=c.type=="time",ce=c.type=="week";ni(Fe.value)&&V&&(ve=de?it(V)>it(Fe.value):ce?V>Fe.value:qe>new Date(Fe.value)),ni(Re.value)&&V&&(Le=de?it(V)+ve.value,Re=!Jt(Le.value)&&V.length<+Le.value;if((Fe||Re)&&(Ne(Fe,ve.message,Le.message),!r))return K(ee[H].message),ee}if(I&&!fe&&ni(V)){const{value:ve,message:Le}=xs(I);if(Oc(ve)&&!V.match(ve)&&(ee[H]={type:vi.pattern,message:Le,ref:c,...le(vi.pattern,Le)},!r))return K(Le),ee}if(_){if(sn(_)){const ve=await _(V,t),Le=Rm(ve,R);if(Le&&(ee[H]={...Le,...le(vi.validate,Le.message)},!r))return K(Le.message),ee}else if(At(_)){let ve={};for(const Le in _){if(!Cr(ve)&&!r)break;const Fe=Rm(await _[Le](V,t),R,Le);Fe&&(ve={...Fe,...le(Le,Fe.message)},K(Fe.message),r&&(ee[H]=ve))}if(!Cr(ve)&&(ee[H]={ref:R,...ve},!r))return ee}}return K(!0),ee};function E7(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=[]}}},Ic=e=>Jt(e)||!Ny(e);function Vn(e,t){if(Ic(e)||Ic(t))return e===t;if(_s(e)&&_s(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(_s(c)&&_s(p)||At(c)&&At(p)||Array.isArray(c)&&Array.isArray(p)?!Vn(c,p):c!==p)return!1}}return!0}var Ty=e=>e.type==="select-multiple",P7=e=>Jp(e)||Wo(e),Ru=e=>_c(e)&&e.isConnected,T7=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 zc(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])?[]:{},zc(e[s],t[s])):Jt(e[s])||(t[s]=!0);return t}function My(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)||Ic(r[o])?r[o]=Array.isArray(e[o])?zc(e[o],[]):{...zc(e[o])}:My(e[o],Jt(t)?{}:t[o],r[o]):r[o]=!Vn(e[o],t[o]);return r}var Al=(e,t)=>My(e,t,zc(t)),_y=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:s})=>vt(e)?e:t?e===""?NaN:e&&+e:r&&ni(e)?new Date(e):s?s(e):e;function Mu(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Kp(t)?t.files:Jp(t)?Py(e.refs).value:Ty(t)?[...t.selectedOptions].map(({value:r})=>r):Wo(t)?Ly(e.refs).value:_y(vt(t.value)?e.ref.value:t.value,e)}var R7=(e,t,r,s)=>{const o={};for(const c of e){const p=Ee(t,c);p&&dt(o,c,p._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:s}},ja=e=>vt(e)?e:Oc(e)?e.source:At(e)?Oc(e.value)?e.value.source:e.value:e,M7=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function _m(e,t,r){const s=Ee(e,r);if(s||Qp(r))return{error:s,name:r};const o=r.split(".");for(;o.length;){const c=o.join("."),p=Ee(t,c),v=Ee(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 _7=(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,O7=(e,t)=>!$o(Ee(e,t)).length&&Rt(e,t);const I7={mode:$r.onSubmit,reValidateMode:$r.onChange,shouldFocusError:!0};function z7(e={}){let t={...I7,...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)?wr(t.defaultValues||t.values)||{}:{},c=t.shouldUnregister?{}:wr(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:Tu(),array:Tu(),state:Tu()},I=Nm(t.mode),_=Nm(t.reValidateMode),H=t.criteriaMode===$r.all,B=q=>re=>{clearTimeout(A),A=setTimeout(q,re)},Z=async q=>{if(E.isValid||q){const re=t.resolver?Cr((await J()).errors):await le(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=T7(r.validatingFields),P.state.next({validatingFields:r.validatingFields,isValidating:r.isValidating}))},V=(q,re=[],se,be,xe=!0,pe=!0)=>{if(be&&se){if(p.action=!0,pe&&Array.isArray(Ee(s,q))){const Te=se(Ee(s,q),be.argA,be.argB);xe&&dt(s,q,Te)}if(pe&&Array.isArray(Ee(r.errors,q))){const Te=se(Ee(r.errors,q),be.argA,be.argB);xe&&dt(r.errors,q,Te),O7(r.errors,q)}if(E.touchedFields&&pe&&Array.isArray(Ee(r.touchedFields,q))){const Te=se(Ee(r.touchedFields,q),be.argA,be.argB);xe&&dt(r.touchedFields,q,Te)}E.dirtyFields&&(r.dirtyFields=Al(o,c)),P.state.next({name:q,isDirty:ve(q,re),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else dt(c,q,re)},R=(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,be)=>{const xe=Ee(s,q);if(xe){const pe=Ee(c,q,vt(se)?Ee(o,q):se);vt(pe)||be&&be.defaultChecked||re?dt(c,q,re?pe:Mu(xe._f)):Re(q,pe),p.mount&&Z()}},X=(q,re,se,be,xe)=>{let pe=!1,Te=!1;const et={name:q},wt=!!(Ee(s,q)&&Ee(s,q)._f.disabled);if(!se||be){E.isDirty&&(Te=r.isDirty,r.isDirty=et.isDirty=ve(),pe=Te!==et.isDirty);const Pt=wt||Vn(Ee(o,q),re);Te=!!(!wt&&Ee(r.dirtyFields,q)),Pt||wt?Rt(r.dirtyFields,q):dt(r.dirtyFields,q,!0),et.dirtyFields=r.dirtyFields,pe=pe||E.dirtyFields&&Te!==!Pt}if(se){const Pt=Ee(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,be)=>{const xe=Ee(r.errors,q),pe=E.isValid&&Si(re)&&r.isValid!==re;if(e.delayError&&se?(C=B(()=>R(q,se)),C(e.delayError)):(clearTimeout(A),C=null,se?dt(r.errors,q,se):Rt(r.errors,q)),(se?!Vn(xe,se):xe)||!Cr(be)||pe){const Te={...be,...pe&&Si(re)?{isValid:re}:{},errors:r.errors,name:q};r={...r,...Te},P.state.next(Te)}W(!1,Object.keys(r.validatingFields).filter(Te=>Te===q))},J=async q=>t.resolver(c,t.context,R7(q||v.mount,s,t.criteriaMode,t.shouldUseNativeValidation)),fe=async q=>{const{errors:re}=await J(q);if(q)for(const se of q){const be=Ee(re,se);be?dt(r.errors,se,be):Rt(r.errors,se)}else r.errors=re;return re},le=async(q,re,se={valid:!0})=>{for(const be in q){const xe=q[be];if(xe){const{_f:pe,...Te}=xe;if(pe){const et=v.array.has(pe.name),wt=await Mm(xe,c,H,t.shouldUseNativeValidation&&!re,et);if(wt[pe.name]&&(se.valid=!1,re))break;!re&&(Ee(wt,pe.name)?et?N7(r.errors,wt,pe.name):dt(r.errors,pe.name,wt[pe.name]):Rt(r.errors,pe.name))}Te&&await le(Te,re,se)}}return se.valid},Ne=()=>{for(const q of v.unMount){const re=Ee(s,q);re&&(re._f.refs?re._f.refs.every(se=>!Ru(se)):!Ru(re._f.ref))&&Be(q)}v.unMount=new Set},ve=(q,re)=>(q&&re&&dt(c,q,re),!Vn(Ae(),o)),Le=(q,re,se)=>A7(q,v,{...p.mount?c:vt(re)?o:ni(q)?{[q]:re}:re},se,re),Fe=q=>$o(Ee(p.mount?c:o,q,e.shouldUnregister?Ee(o,q,[]):[])),Re=(q,re,se={})=>{const be=Ee(s,q);let xe=re;if(be){const pe=be._f;pe&&(!pe.disabled&&dt(c,q,_y(re,pe)),xe=_c(pe.ref)&&Jt(re)?"":re,Ty(pe.ref)?[...pe.ref.options].forEach(Te=>Te.selected=xe.includes(Te.value)):pe.refs?Wo(pe.ref)?pe.refs.length>1?pe.refs.forEach(Te=>(!Te.defaultChecked||!Te.disabled)&&(Te.checked=Array.isArray(xe)?!!xe.find(et=>et===Te.value):xe===Te.value)):pe.refs[0]&&(pe.refs[0].checked=!!xe):pe.refs.forEach(Te=>Te.checked=Te.value===xe):Kp(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&&oe(q)},qe=(q,re,se)=>{for(const be in re){const xe=re[be],pe=`${q}.${be}`,Te=Ee(s,pe);(v.array.has(q)||!Ic(xe)||Te&&!Te._f)&&!_s(xe)?qe(pe,xe,se):Re(pe,xe,se)}},it=(q,re,se={})=>{const be=Ee(s,q),xe=v.array.has(q),pe=wr(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:Al(o,c),isDirty:ve(q,pe)})):be&&!be._f&&!Jt(pe)?qe(q,pe,se):Re(q,pe,se),Em(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,be=!0;const xe=Ee(s,se),pe=()=>re.type?Mu(xe._f):v7(q),Te=et=>{be=Number.isNaN(et)||et===Ee(c,se,et)};if(xe){let et,wt;const Pt=pe(),Vi=q.type===jm.BLUR||q.type===jm.FOCUS_OUT,tl=!M7(xe._f)&&!t.resolver&&!Ee(r.errors,se)&&!xe._f.deps||_7(Vi,Ee(r.touchedFields,se),r.isSubmitted,_,I),fs=Em(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 ga=X(se,Pt,Vi,!1),rl=!Cr(ga)||fs;if(!Vi&&P.values.next({name:se,type:q.type,values:{...c}}),tl)return E.isValid&&Z(),rl&&P.state.next({name:se,...fs?{}:ga});if(!Vi&&fs&&P.state.next({...r}),W(!0,[se]),t.resolver){const{errors:il}=await J([se]);if(Te(Pt),be){const nl=_m(r.errors,s,se),sl=_m(il,s,nl.name||se);et=sl.error,se=sl.name,wt=Cr(il)}}else et=(await Mm(xe,c,H,t.shouldUseNativeValidation))[se],Te(Pt),be&&(et?wt=!1:E.isValid&&(wt=await le(s,!0)));be&&(xe._f.deps&&oe(xe._f.deps),Q(se,wt,et,ga))}},ce=(q,re)=>{if(Ee(r.errors,re)&&q.focus)return q.focus(),1},oe=async(q,re={})=>{let se,be;const xe=Pu(q);if(W(!0,xe),t.resolver){const pe=await fe(vt(q)?q:xe);se=Cr(pe),be=q?!xe.some(Te=>Ee(pe,Te)):se}else q?(be=(await Promise.all(xe.map(async pe=>{const Te=Ee(s,pe);return await le(Te&&Te._f?{[pe]:Te}:Te)}))).every(Boolean),!(!be&&!r.isValid)&&Z()):be=se=await le(s);return P.state.next({...!ni(q)||E.isValid&&se!==r.isValid?{}:{name:q},...t.resolver||!q?{isValid:se}:{},errors:r.errors,isValidating:!1}),re.shouldFocus&&!be&&Ka(s,ce,q?xe:v.mount),be},Ae=q=>{const re={...o,...p.mount?c:{}};return vt(q)?re:ni(q)?Ee(re,q):q.map(se=>Ee(re,se))},je=(q,re)=>({invalid:!!Ee((re||r).errors,q),isDirty:!!Ee((re||r).dirtyFields,q),isTouched:!!Ee((re||r).touchedFields,q),isValidating:!!Ee((re||r).validatingFields,q),error:Ee((re||r).errors,q)}),ze=q=>{q&&Pu(q).forEach(re=>Rt(r.errors,re)),P.state.next({errors:q?r.errors:{}})},Ue=(q,re,se)=>{const be=(Ee(s,q,{_f:{}})._f||{}).ref;dt(r.errors,q,{...re,ref:be}),P.state.next({name:q,errors:r.errors,isValid:!1}),se&&se.shouldFocus&&be&&be.focus&&be.focus()},He=(q,re)=>sn(q)?P.values.subscribe({next:se=>q(Le(void 0,re),se)}):Le(q,re,!0),Be=(q,re={})=>{for(const se of q?Pu(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:ve()}:{}}),!re.keepIsValid&&Z()},_e=({disabled:q,name:re,field:se,fields:be,value:xe})=>{if(Si(q)){const pe=q?void 0:vt(xe)?Mu(se?se._f:Ee(be,re)._f):xe;dt(c,re,pe),X(re,pe,!1,!1,!0)}},Nt=(q,re={})=>{let se=Ee(s,q);const be=Si(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?_e({field:se,disabled:re.disabled,name:q,value:re.value}):ee(q,!0,re.value),{...be?{disabled:re.disabled}:{},...t.progressive?{required:!!re.required,min:ja(re.min),max:ja(re.max),minLength:ja(re.minLength),maxLength:ja(re.maxLength),pattern:ja(re.pattern)}:{},name:q,onChange:de,onBlur:de,ref:xe=>{if(xe){Nt(q,re),se=Ee(s,q);const pe=vt(xe.value)&&xe.querySelectorAll&&xe.querySelectorAll("input,select,textarea")[0]||xe,Te=P7(pe),et=se._f.refs||[];if(Te?et.find(wt=>wt===pe):pe===se._f.ref)return;dt(s,q,{_f:{...se._f,...Te?{refs:[...et.filter(Ru),pe,...Array.isArray(Ee(o,q))?[{}]:[]],ref:{type:pe.type,name:q}}:{ref:pe}}}),ee(q,!1,void 0,pe)}else se=Ee(s,q,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||re.shouldUnregister)&&!(b7(v.array,q)&&p.action)&&v.unMount.add(q)}}},fr=()=>t.shouldFocusError&&Ka(s,ce,v.mount),us=q=>{Si(q)&&(P.state.next({disabled:q}),Ka(s,(re,se)=>{let be=q;const xe=Ee(s,se);xe&&Si(xe._f.disabled)&&(be||(be=xe._f.disabled)),re.disabled=be},0,!1))},Bi=(q,re)=>async se=>{let be;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let xe=wr(c);if(P.state.next({isSubmitting:!0}),t.resolver){const{errors:pe,values:Te}=await J();r.errors=pe,xe=Te}else await le(s);if(Rt(r.errors,"root"),Cr(r.errors)){P.state.next({errors:{}});try{await q(xe,se)}catch(pe){be=pe}}else re&&await re({...r.errors},se),fr(),setTimeout(fr);if(P.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Cr(r.errors)&&!be,submitCount:r.submitCount+1,errors:r.errors}),be)throw be},Jo=(q,re={})=>{Ee(s,q)&&(vt(re.defaultValue)?it(q,wr(Ee(o,q))):(it(q,re.defaultValue),dt(o,q,wr(re.defaultValue))),re.keepTouched||Rt(r.touchedFields,q),re.keepDirty||(Rt(r.dirtyFields,q),r.isDirty=re.defaultValue?ve(q,wr(Ee(o,q))):ve()),re.keepError||(Rt(r.errors,q),E.isValid&&Z()),P.state.next({...r}))},pa=(q,re={})=>{const se=q?wr(q):o,be=wr(se),xe=Cr(q),pe=xe?o:be;if(re.keepDefaultValues||(o=se),!re.keepValues){if(re.keepDirtyValues)for(const Te of v.mount)Ee(r.dirtyFields,Te)?dt(pe,Te,Ee(c,Te)):it(Te,Ee(pe,Te));else{if(qp&&vt(q))for(const Te of v.mount){const et=Ee(s,Te);if(et&&et._f){const wt=Array.isArray(et._f.refs)?et._f.refs[0]:et._f.ref;if(_c(wt)){const Pt=wt.closest("form");if(Pt){Pt.reset();break}}}}s={}}c=e.shouldUnregister?re.keepDefaultValues?wr(o):{}:wr(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&&!Vn(q,o)),isSubmitted:re.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:xe?[]:re.keepDirtyValues?re.keepDefaultValues&&c?Al(o,c):r.dirtyFields:re.keepDefaultValues&&q?Al(o,q):{},touchedFields:re.keepTouched?r.touchedFields:{},errors:re.keepErrors?r.errors:{},isSubmitSuccessful:re.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},hs=(q,re)=>pa(sn(q)?q(c):q,re);return{control:{register:Nt,unregister:Be,getFieldState:je,handleSubmit:Bi,setError:Ue,_executeSchema:J,_getWatch:Le,_getDirty:ve,_updateValid:Z,_removeUnmounted:Ne,_updateFieldArray:V,_updateDisabledField:_e,_getFieldArray:Fe,_reset:pa,_resetDefaultValues:()=>sn(t.defaultValues)&&t.defaultValues().then(q=>{hs(q,t.resetOptions),P.state.next({isLoading:!1})}),_updateFormState:q=>{r={...r,...q}},_disableForm:us,_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:oe,register:Nt,handleSubmit:Bi,watch:He,setValue:it,getValues:Ae,reset:hs,resetField:Jo,clearErrors:ze,unregister:Be,setError:Ue,setFocus:(q,re={})=>{const se=Ee(s,q),be=se&&se._f;if(be){const xe=be.refs?be.refs[0]:be.ref;xe.focus&&(xe.focus(),re.shouldSelect&&xe.select())}},getFieldState:je}}function F7(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={...z7(e),formState:s});const c=t.current.control;return c._options=e,S7({subject:c._subjects.state,next:p=>{C7(p,c._proxyFormState,c._updateFormState)&&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&&!Vn(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=k7(s,c),t.current}function D7(e){return e.replace(/\/$/,"")}const H7=D7("https://backend.captn.ai")||"http://localhost:3001",Oy={apiUrl:H7};var Fc;(function(e){e.Get="GET",e.Post="POST",e.Put="PUT",e.Delete="DELETE"})(Fc||(Fc={}));bt("form",{marginTop:"1.5rem"});bt("div",{"& + div":{marginTop:"1.5rem"}});bt("label",{display:"block !important",fontSize:"$sm !important",fontWeight:"500 !important",marginBottom:"0.5rem !important"});const 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"};bt("input",Iy);bt("textarea",Iy);bt("div",{display:"block",fontSize:"$sm",fontWeight:"500",color:"$formErrorText",marginTop:"0.5rem"});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"});x7({width:"1.25rem",height:"1.25rem"});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:B7}=Object.prototype,{getPrototypeOf:e1}=Object,Td=(e=>t=>{const r=B7.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),pi=e=>(e=e.toLowerCase(),t=>Td(t)===e),Rd=e=>t=>typeof t===e,{isArray:ca}=Array,wo=Rd("undefined");function V7(e){return e!==null&&!wo(e)&&e.constructor!==null&&!wo(e.constructor)&&Pr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fy=pi("ArrayBuffer");function W7(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Fy(e.buffer),t}const $7=Rd("string"),Pr=Rd("function"),Dy=Rd("number"),Md=e=>e!==null&&typeof e=="object",X7=e=>e===!0||e===!1,Zl=e=>{if(Td(e)!=="object")return!1;const t=e1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Y7=pi("Date"),U7=pi("File"),G7=pi("Blob"),Z7=pi("FileList"),q7=e=>Md(e)&&Pr(e.pipe),Q7=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Pr(e.append)&&((t=Td(e))==="formdata"||t==="object"&&Pr(e.toString)&&e.toString()==="[object FormData]"))},K7=pi("URLSearchParams"),J7=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xo(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),ca(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=>!wo(e)&&e!==By;function tf(){const{caseless:e}=Vy(this)&&this||{},t={},r=(s,o)=>{const c=e&&Hy(t,o)||o;Zl(t[c])&&Zl(s)?t[c]=tf(t[c],s):Zl(s)?t[c]=tf({},s):ca(s)?t[c]=s.slice():t[c]=s};for(let s=0,o=arguments.length;s(Xo(t,(o,c)=>{r&&Pr(o)?e[c]=zy(o,r):e[c]=o},{allOwnKeys:s}),e),t6=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),r6=(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)},i6=(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&&e1(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},n6=(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},s6=e=>{if(!e)return null;if(ca(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},a6=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&e1(Uint8Array)),o6=(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])}},l6=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},c6=pi("HTMLFormElement"),d6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,o){return s.toUpperCase()+o}),Om=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),u6=pi("RegExp"),Wy=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};Xo(r,(o,c)=>{let p;(p=t(o,c,e))!==!1&&(s[c]=p||o)}),Object.defineProperties(e,s)},h6=e=>{Wy(e,(t,r)=>{if(Pr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(Pr(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+"'")})}})},f6=(e,t)=>{const r={},s=o=>{o.forEach(c=>{r[c]=!0})};return ca(e)?s(e):s(String(e).split(t)),r},p6=()=>{},g6=(e,t)=>(e=+e,Number.isFinite(e)?e:t),_u="abcdefghijklmnopqrstuvwxyz",Im="0123456789",$y={DIGIT:Im,ALPHA:_u,ALPHA_DIGIT:_u+_u.toUpperCase()+Im},m6=(e=16,t=$y.ALPHA_DIGIT)=>{let r="";const{length:s}=t;for(;e--;)r+=t[Math.random()*s|0];return r};function x6(e){return!!(e&&Pr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const v6=e=>{const t=new Array(10),r=(s,o)=>{if(Md(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[o]=s;const c=ca(s)?[]:{};return Xo(s,(p,v)=>{const C=r(p,o+1);!wo(C)&&(c[v]=C)}),t[o]=void 0,c}}return s};return r(e,0)},y6=pi("AsyncFunction"),b6=e=>e&&(Md(e)||Pr(e))&&Pr(e.then)&&Pr(e.catch),ae={isArray:ca,isArrayBuffer:Fy,isBuffer:V7,isFormData:Q7,isArrayBufferView:W7,isString:$7,isNumber:Dy,isBoolean:X7,isObject:Md,isPlainObject:Zl,isUndefined:wo,isDate:Y7,isFile:U7,isBlob:G7,isRegExp:u6,isFunction:Pr,isStream:q7,isURLSearchParams:K7,isTypedArray:a6,isFileList:Z7,forEach:Xo,merge:tf,extend:e6,trim:J7,stripBOM:t6,inherits:r6,toFlatObject:i6,kindOf:Td,kindOfTest:pi,endsWith:n6,toArray:s6,forEachEntry:o6,matchAll:l6,isHTMLForm:c6,hasOwnProperty:Om,hasOwnProp:Om,reduceDescriptors:Wy,freezeMethods:h6,toObjectSet:f6,toCamelCase:d6,noop:p6,toFiniteNumber:g6,findKey:Hy,global:By,isContextDefined:Vy,ALPHABET:$y,generateString:m6,isSpecCompliantForm:x6,toJSONObject:v6,isAsyncFn:y6,isThenable:b6};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 w6=null;function rf(e){return ae.isPlainObject(e)||ae.isArray(e)}function Uy(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function zm(e,t,r){return e?e.concat(t).map(function(o,c){return o=Uy(o),!r&&c?"["+o+"]":o}).join(r?".":""):t}function k6(e){return ae.isArray(e)&&!e.some(rf)}const C6=ae.toFlatObject(ae,{},null,function(t){return/^is[A-Z]/.test(t)});function _d(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(B,Z){return!ae.isUndefined(Z[B])});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,B,Z){let W=H;if(H&&!Z&&typeof H=="object"){if(ae.endsWith(B,"{}"))B=s?B:B.slice(0,-2),H=JSON.stringify(H);else if(ae.isArray(H)&&k6(H)||(ae.isFileList(H)||ae.endsWith(B,"[]"))&&(W=ae.toArray(H)))return B=Uy(B),W.forEach(function(R,K){!(ae.isUndefined(R)||R===null)&&t.append(p===!0?zm([B],K,c):p===null?B:B+"[]",A(R))}),!1}return rf(H)?!0:(t.append(zm(Z,B,c),A(H)),!1)}const P=[],I=Object.assign(C6,{defaultVisitor:E,convertValue:A,isVisitable:rf});function _(H,B){if(!ae.isUndefined(H)){if(P.indexOf(H)!==-1)throw Error("Circular reference detected in "+B.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,B,I))===!0&&_(W,B?B.concat(V):[V])}),P.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Fm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function t1(e,t){this._pairs=[],e&&_d(e,this,t)}const Gy=t1.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,Fm)}:Fm;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function S6(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||S6,o=r&&r.serialize;let c;if(o?c=o(t,r):c=ae.isURLSearchParams(t)?t.toString():new t1(t,r).toString(s),c){const p=e.indexOf("#");p!==-1&&(e=e.slice(0,p)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class Dm{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},A6=typeof URLSearchParams<"u"?URLSearchParams:t1,j6=typeof FormData<"u"?FormData:null,N6=typeof Blob<"u"?Blob:null,E6={isBrowser:!0,classes:{URLSearchParams:A6,FormData:j6,Blob:N6},protocols:["http","https","file","blob","url","data"]},Qy=typeof window<"u"&&typeof document<"u",L6=(e=>Qy&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),P6=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",T6=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qy,hasStandardBrowserEnv:L6,hasStandardBrowserWebWorkerEnv:P6},Symbol.toStringTag,{value:"Module"})),si={...T6,...E6};function R6(e,t){return _d(e,new si.classes.URLSearchParams,Object.assign({visitor:function(r,s,o,c){return si.isNode&&ae.isBuffer(r)?(this.append(s,r.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)}},t))}function M6(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _6(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]=_6(o[p])),!v)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const r={};return ae.forEachEntry(e,(s,o)=>{t(M6(s),o,r,0)}),r}return null}function O6(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 Yo={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 R6(t,this.formSerializer).toString();if((v=ae.isFileList(t))||s.indexOf("multipart/form-data")>-1){const C=this.env&&this.env.FormData;return _d(v?{"files[]":t}:t,C&&new C,this.formSerializer)}}return c||o?(r.setContentType("application/json",!1),O6(t)):t}],transformResponse:[function(t){const r=this.transitional||Yo.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:si.classes.FormData,Blob:si.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=>{Yo.headers[e]={}});const I6=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"]),z6=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]&&I6[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t},Hm=Symbol("internals");function Na(e){return e&&String(e).trim().toLowerCase()}function ql(e){return e===!1||e==null?e:ae.isArray(e)?e.map(ql):String(e)}function F6(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 D6=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ou(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 H6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function B6(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 Tr{constructor(t){t&&this.set(t)}set(t,r,s){const o=this;function c(v,C,A){const E=Na(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]=ql(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())&&!D6(t)?p(z6(t),r):t!=null&&c(r,t,s),this}get(t,r){if(t=Na(t),t){const s=ae.findKey(this,t);if(s){const o=this[s];if(!r)return o;if(r===!0)return F6(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=Na(t),t){const s=ae.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||Ou(this,this[s],s,r)))}return!1}delete(t,r){const s=this;let o=!1;function c(p){if(p=Na(p),p){const v=ae.findKey(s,p);v&&(!r||Ou(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||Ou(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]=ql(o),delete r[c];return}const v=t?H6(c):String(c).trim();v!==c&&delete r[c],r[v]=ql(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[Hm]=this[Hm]={accessors:{}}).accessors,o=this.prototype;function c(p){const v=Na(p);s[v]||(B6(o,p),s[v]=!0)}return ae.isArray(t)?t.forEach(c):c(t),this}}Tr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(Tr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});ae.freezeMethods(Tr);function Iu(e,t){const r=this||Yo,s=t||r,o=Tr.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 Uo(e,t,r){Qe.call(this,e??"canceled",Qe.ERR_CANCELED,t,r),this.name="CanceledError"}ae.inherits(Uo,Qe,{__CANCEL__:!0});function V6(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 W6=si.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 $6(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function X6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function eb(e,t){return e&&!$6(t)?X6(e,t):t}const Y6=si.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 U6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function G6(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,I=0;for(;P!==o;)I+=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 Z6=typeof XMLHttpRequest<"u",q6=Z6&&function(e){return new Promise(function(r,s){let o=e.data;const c=Tr.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(si.hasStandardBrowserEnv||si.hasStandardBrowserWebWorkerEnv)c.setContentType(!1);else if((E=c.getContentType())!==!1){const[B,...Z]=E?E.split(";").map(W=>W.trim()).filter(Boolean):[];c.setContentType([B||"multipart/form-data",...Z].join("; "))}}let P=new XMLHttpRequest;if(e.auth){const B=e.auth.username||"",Z=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";c.set("Authorization","Basic "+btoa(B+":"+Z))}const I=eb(e.baseURL,e.url);P.open(e.method.toUpperCase(),Zy(I,e.params,e.paramsSerializer),!0),P.timeout=e.timeout;function _(){if(!P)return;const B=Tr.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),W={data:!p||p==="text"||p==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:B,config:e,request:P};V6(function(R){r(R),A()},function(R){s(R),A()},W),P=null}if("onloadend"in P?P.onloadend=_:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(_)},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},si.hasStandardBrowserEnv&&(v&&ae.isFunction(v)&&(v=v(e)),v||v!==!1&&Y6(I))){const B=e.xsrfHeaderName&&e.xsrfCookieName&&W6.read(e.xsrfCookieName);B&&c.set(e.xsrfHeaderName,B)}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",Bm(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&P.upload&&P.upload.addEventListener("progress",Bm(e.onUploadProgress)),(e.cancelToken||e.signal)&&(C=B=>{P&&(s(!B||B.type?new Uo(null,e,P):B),P.abort(),P=null)},e.cancelToken&&e.cancelToken.subscribe(C),e.signal&&(e.signal.aborted?C():e.signal.addEventListener("abort",C)));const H=U6(I);if(H&&si.protocols.indexOf(H)===-1){s(new Qe("Unsupported protocol "+H+":",Qe.ERR_BAD_REQUEST,e));return}P.send(o||null)})},nf={http:w6,xhr:q6};ae.forEach(nf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Vm=e=>`- ${e}`,Q6=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(Vm).join(` -`):" "+Vm(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:nf};function zu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Yo(null,e)}function Wm(e){return zu(e),e.headers=Tr.from(e.headers),e.data=Iu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tb.getAdapter(e.adapter||Xo.adapter)(e).then(function(s){return zu(e),s.data=Iu.call(e,e.transformResponse,s),s.headers=Tr.from(s.headers),s},function(s){return Jy(s)||(zu(e),s&&s.response&&(s.response.data=Iu.call(e,e.transformResponse,s.response),s.response.headers=Tr.from(s.response.headers))),Promise.reject(s)})}const $m=e=>e instanceof Tr?e.toJSON():e;function Ks(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($m(A),$m(E),!0)};return ae.forEach(Object.keys(Object.assign({},e,t)),function(E){const P=C[E]||o,I=P(e[E],t[E],E);ae.isUndefined(I)&&P!==v||(r[E]=I)}),r}const rb="1.6.7",r1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{r1[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Xm={};r1.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&&!Xm[p]&&(Xm[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 K6(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 sf={assertOptions:K6,validators:r1},$i=sf.validators;class Gn{constructor(t){this.defaults=t,this.interceptors={request:new Dm,response:new Dm}}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=Ks(this.defaults,r);const{transitional:s,paramsSerializer:o,headers:c}=r;s!==void 0&&sf.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}:sf.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=Tr.concat(p,c);const v=[];let C=!0;this.interceptors.request.forEach(function(B){typeof B.runWhen=="function"&&B.runWhen(r)===!1||(C=C&&B.synchronous,v.unshift(B.fulfilled,B.rejected))});const A=[];this.interceptors.response.forEach(function(B){A.push(B.fulfilled,B.rejected)});let E,P=0,I;if(!C){const H=[Wm.bind(this),void 0];for(H.unshift.apply(H,v),H.push.apply(H,A),I=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 Yo(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 i1(function(o){t=o}),cancel:t}}}function J6(e){return function(r){return e.apply(null,r)}}function e9(e){return ae.isObject(e)&&e.isAxiosError===!0}const af={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(af).forEach(([e,t])=>{af[t]=e});function ib(e){const t=new Gn(e),r=zy(Gn.prototype.request,t);return ae.extend(r,Gn.prototype,t,{allOwnKeys:!0}),ae.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return ib(Ks(e,o))},r}const jt=ib(Xo);jt.Axios=Gn;jt.CanceledError=Yo;jt.CancelToken=i1;jt.isCancel=Jy;jt.VERSION=rb;jt.toFormData=_d;jt.AxiosError=Qe;jt.Cancel=jt.CanceledError;jt.all=function(t){return Promise.all(t)};jt.spread=J6;jt.isAxiosError=e9;jt.mergeConfig=Ks;jt.AxiosHeaders=Tr;jt.formToJSON=e=>Ky(ae.isHTMLForm(e)?new FormData(e):e);jt.getAdapter=tb.getAdapter;jt.HttpStatusCode=af;jt.default=jt;function t9(e){function t(r){return`${e}:${r}`}return{getPrefixedKey:t,set(r,s){Al(),localStorage.setItem(t(r),JSON.stringify(s))},get(r){Al();const s=localStorage.getItem(t(r));try{return s?JSON.parse(s):void 0}catch{return}},remove(r){Al(),localStorage.removeItem(t(r))},clear(){Al(),Object.keys(localStorage).forEach(r=>{r.startsWith(e)&&localStorage.removeItem(r)})}}}const Uo=t9("wasp");function Al(){if(!window.localStorage)throw new Error("Local storage is not available.")}function r9(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 is=r9(),da=jt.create({baseURL:Oy.apiUrl}),Od="sessionId";let Js=Uo.get(Od);function i9(e){Js=e,Uo.set(Od,e),is.emit("sessionId.set")}function nb(){return Js}function n9(){Js=void 0,Uo.remove(Od),is.emit("sessionId.clear")}function s9(){Js=void 0,Uo.clear(),is.emit("sessionId.clear")}da.interceptors.request.use(e=>{const t=nb();return t&&(e.headers.Authorization=`Bearer ${t}`),e});da.interceptors.response.use(void 0,e=>{var t;return((t=e.response)===null||t===void 0?void 0:t.status)===401&&n9(),Promise.reject(e)});window.addEventListener("storage",e=>{e.key===Uo.getPrefixedKey(Od)&&(e.newValue?(Js=e.newValue,is.emit("sessionId.set")):(Js=void 0,is.emit("sessionId.clear")))});function sb(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 a9(o,(r=s==null?void 0:s.message)!==null&&r!==void 0?r:e.message,s)}else throw e}class a9 extends Error{constructor(t,r,s){super(r),this.statusCode=t,this.data=s}}const o9={};let ab;const n1=new Promise(e=>{ab=e});function l9(){const e=new dw(o9);ab(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 of=new Map,s1=c9(nn);function d9(e,t){for(const r of t){let s=of.get(r);s||(s=new Set,of.set(r,s)),s.add(e)}}function u9(e){e.forEach(({queryKey:t,updateQuery:r})=>s1.add(t,r))}async function h9(e,t){t.forEach(({queryKey:r})=>s1.remove(r)),await p9(e)}function f9(e){return s1.getUpdateHandlers(e)}async function ob(){const e=await n1;e.resetQueries(),e.removeQueries()}async function p9(e){const t=await n1;m9(e).forEach(s=>t.invalidateQueries(s))}function g9(e){return Array.from(of.get(e)||[])}function m9(e){return Array.from(new Set(e.flatMap(g9)))}async function x9(e){i9(e),await ob()}bt("div",{position:"relative",marginTop:"1.5rem"});bt("div",{position:"absolute",inset:"0px",display:"flex",alignItems:"center"});bt("div",{width:"100%",borderTopWidth:"1px",borderColor:"$gray500"});bt("div",{position:"relative",display:"flex",justifyContent:"center",fontSize:"$sm"});bt("span",{backgroundColor:"white",paddingLeft:"0.5rem",paddingRight:"0.5rem"});bt("div",{marginTop:"1.5rem"});bt("div",{fontWeight:"500",fontSize:"$sm"});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"}}}});const lb=bt("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"});bt(lb,{background:"$errorBackground",color:"$errorText"});bt(lb,{background:"$successBackground",color:"$successText"});bt("div",{display:"flex",flexDirection:"column"});bt("h2",{fontSize:"1.875rem !important",fontWeight:"700 !important",marginTop:"1.5rem !important"});Y.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}});var Ym;(function(e){e.Login="login",e.Signup="signup"})(Ym||(Ym={}));var v9=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}(),cb=function(){function e(t){this.generateIdentifier=t,this.kv=new v9}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}(),y9=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){y9(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}(cb),w9=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 k9(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 C9(e,t){var r=k9(e);if("find"in r)return r.find(t);for(var s=r,o=0;o"u"},j9=function(e){return e===null},wo=function(e){return typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype},lf=function(e){return wo(e)&&Object.keys(e).length===0},bn=function(e){return Array.isArray(e)},N9=function(e){return typeof e=="string"},E9=function(e){return typeof e=="number"&&!isNaN(e)},L9=function(e){return typeof e=="boolean"},P9=function(e){return e instanceof RegExp},ko=function(e){return e instanceof Map},Co=function(e){return e instanceof Set},ub=function(e){return A9(e)==="Symbol"},T9=function(e){return e instanceof Date&&!isNaN(e.valueOf())},R9=function(e){return e instanceof Error},Gm=function(e){return typeof e=="number"&&isNaN(e)},M9=function(e){return L9(e)||j9(e)||db(e)||E9(e)||N9(e)||ub(e)},_9=function(e){return typeof e=="bigint"},O9=function(e){return e===1/0||e===-1/0},I9=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},z9=function(e){return e instanceof URL},hb=function(e){return e.replace(/\./g,"\\.")},Fu=function(e){return e.map(String).map(hb).join(".")},Ja=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},uf=function(e,t){for(var r=0,s=t.length,o=e.length;r0?"Infinity":"-Infinity"},Number),ti(function(e){return e===0&&1/e===-1/0},"number",function(){return"-0"},Number),ti(z9,"URL",function(e){return e.toString()},function(e){return new URL(e)})];function Id(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}var pb=Id(function(e,t){if(ub(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}),F9=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),gb=Id(I9,function(e){return["typed-array",e.constructor.name]},function(e){return uf([],df(e))},function(e,t){var r=F9[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function mb(e,t){if(e!=null&&e.constructor){var r=!!t.classRegistry.getIdentifier(e.constructor);return r}return!1}var xb=Id(mb,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 cf({},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)}),vb=Id(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)}),D9=[xb,pb,vb,gb],Zm=function(e,t){var r=Um(D9,function(o){return o.isApplicable(e,t)});if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};var s=Um(fb,function(o){return o.isApplicable(e,t)});if(s)return{value:s.transform(e,t),type:s.annotation}},yb={};fb.forEach(function(e){yb[e.annotation]=e});var H9=function(e,t,r){if(bn(t))switch(t[0]){case"symbol":return pb.untransform(e,t,r);case"class":return xb.untransform(e,t,r);case"custom":return vb.untransform(e,t,r);case"typed-array":return gb.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{var s=yb[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,r)}},Os=function(e,t){for(var r=e.keys();t>0;)r.next(),t--;return r.next().value};function bb(e){if(ql(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(ql(e,"prototype"))throw new Error("prototype is not allowed as a property");if(ql(e,"constructor"))throw new Error("constructor is not allowed as a property")}var B9=function(e,t){bb(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;rpf(o,t));if(!U9(e))return e;const r=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...r,...s].reduce((o,c)=>{if(qm(t.props)&&!t.props.includes(c))return o;const p=e[c],v=pf(p,t);return G9(o,c,v,e,t.nonenumerable),o},{})}var In=function(){return In=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},q9=function(e,t){for(var r=0,s=t.length,o=e.length;rs(c,[]);return o.internal=s,o}const Nb=_r("operations/stripe-payment",["User"]),eo=_r("operations/update-current-user",["User"]);_r("operations/update-user-by-id",["User"]);const K9=_r("operations/create-new-chat",["Chat","Conversation"]),J9=_r("operations/create-new-daily-analysis-chat",["Chat","Conversation"]),di=_r("operations/update-current-chat",["Chat"]),Eb=_r("operations/update-current-conversation",["Conversation"]),ek=_r("operations/delete-last-conversation-in-chat",["Conversation"]),tk=_r("operations/retry-team-chat",["Chat","Conversation"]),rk=_r("operations/create-new-and-return-all-conversations",["Conversation"]),ik=_r("operations/create-new-and-return-last-conversation",["Conversation"]),nk=_r("operations/get-agent-response",["Chat","Conversation"]);function ua(e,t){const r=jb(e);async function s(o,c){const p=await Ab(r,c);return f9(o).reduce((v,C)=>C(v),p)}return Lb(s,{relativeQueryPath:e,queryRoute:r,entitiesUsed:t}),s}function Lb(e,{relativeQueryPath:t,queryRoute:r,entitiesUsed:s}){e.queryCacheKey=[t],e.route=r,d9(e.queryCacheKey,s)}const sk=ua("operations/get-daily-stats",["User","DailyStats"]),ak=ua("operations/get-paginated-users",["User"]),ok=ua("operations/get-chat",["Chat"]),lk=ua("operations/get-chats",["Chat"]),ck=ua("operations/get-conversations",["Conversation"]),dk=ua("operations/get-chat-from-uuid",["Chat"]);function Zn(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 Hw(Object.assign({queryKey:s,queryFn:()=>e(s,t)},r))}const uk=hk();function Or(e,t){return Zn(uk,e,t)}function hk(){const e="auth/me",t={method:zc.Get,path:`/${e}`};async function r(){var s;try{const o=await da.get(t.path);return Sb(o.data)}catch(o){if(((s=o.response)===null||s===void 0?void 0:s.status)===401)return null;sb(o)}}return Lb(r,{relativeQueryPath:e,queryRoute:t,entitiesUsed:["User"]}),r}async function Pb(){try{await da.post("/auth/logout")}finally{s9(),await ob()}}function kt(e,t,r,s){const o=t?fk(e,t):e,c=r?`?${new URLSearchParams(r).toString()}`:"",p=s?`#${s}`:"";return o+c+p}function fk(e,t){function r(o){if(o.startsWith(":")){const c=gk(o);return t[c]}return o}const s=e.split("/").map(r).filter(pk).join("/");return e.startsWith("/")?`/${s}`:s}function pk(e){return!!e}function gk(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 xk={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 vk=Object.defineProperty,yk=(e,t,r)=>t in e?vk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Du=(e,t,r)=>(yk(e,typeof t!="symbol"?t+"":t,r),r);let bk=class{constructor(){Du(this,"current",this.detect()),Du(this,"handoffState","pending"),Du(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 bk,Ln=(e,t)=>{Li.isServer?Y.useEffect(e,t):Y.useLayoutEffect(e,t)};function zd(e){let t=Y.useRef(e);return Ln(()=>{t.current=e},[e]),t}function Go(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function a1(){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 Go(()=>{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=a1();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 wk(){let[e]=Y.useState(a1);return Y.useEffect(()=>()=>e.dispose(),[e]),e}let Er=function(e){let t=zd(e);return ge.useCallback((...r)=>t.current(...r),[t])};function Fd(){let[e,t]=Y.useState(Li.isHandoffComplete);return e&&Li.isHandoffComplete===!1&&t(!1),Y.useEffect(()=>{e!==!0&&t(!0)},[e]),Y.useEffect(()=>Li.handoff(),[]),e}var Qm;let ha=(Qm=ge.useId)!=null?Qm:function(){let e=Fd(),[t,r]=ge.useState(e?()=>Li.nextId():null);return Ln(()=>{t===null&&r(Li.nextId())},[t]),t!=null?""+t:void 0};function wn(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,wn),s}function Tb(e){return Li.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let gf=["[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 zn=(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))(zn||{}),Rb=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Rb||{}),kk=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(kk||{});function Ck(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(gf)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Mb=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Mb||{});function Sk(e,t=0){var r;return e===((r=Tb(e))==null?void 0:r.body)?!1:wn(t,{0(){return e.matches(gf)},1(){let s=e;for(;s!==null;){if(s.matches(gf))return!0;s=s.parentElement}return!1}})}function qn(e){e==null||e.focus({preventScroll:!0})}let Ak=["textarea","input"].join(",");function jk(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Ak))!=null?r:!1}function Nk(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 Ql(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?Nk(e):e:Ck(e);o.length>0&&p.length>1&&(p=p.filter(_=>!o.includes(_))),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,I;do{if(E>=P||E+P<=0)return 0;let _=C+E;if(t&16)_=(_+P)%P;else{if(_<0)return 3;if(_>=P)return 1}I=p[_],I==null||I.focus(A),E+=v}while(I!==c.activeElement);return t&6&&jk(I)&&I.select(),I.hasAttribute("tabindex")||I.setAttribute("tabindex","0"),2}function Hu(e,t,r){let s=zd(t);Y.useEffect(()=>{function o(c){s.current(c)}return document.addEventListener(e,o,r),()=>document.removeEventListener(e,o,r)},[e,r])}function Ek(e,t,r=!0){let s=Y.useRef(!1);Y.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!Sk(A,Mb.Loose)&&A.tabIndex!==-1&&p.preventDefault(),t(p,A)}}let c=Y.useRef(null);Hu("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),Hu("click",p=>{c.current&&(o(p,()=>c.current),c.current=null)},!0),Hu("blur",p=>o(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let _b=Symbol();function Lk(e,t=!0){return Object.assign(e,{[_b]:t})}function Di(...e){let t=Y.useRef(e);Y.useEffect(()=>{t.current=e},[e]);let r=Er(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[_b]))?void 0:r}function Pk(...e){return e.filter(Boolean).join(" ")}var mf=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(mf||{}),Tk=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Tk||{});function gi({ourProps:e,theirProps:t,slot:r,defaultTag:s,features:o,visible:c=!0,name:p}){let v=Ob(t,e);if(c)return jl(v,r,s,p);let C=o??0;if(C&2){let{static:A=!1,...E}=v;if(A)return jl(E,r,s,p)}if(C&1){let{unmount:A=!0,...E}=v;return wn(A?0:1,{0(){return null},1(){return jl({...E,hidden:!0,style:{display:"none"}},r,s,p)}})}return jl(v,r,s,p)}function jl(e,t={},r,s){var o;let{as:c=r,children:p,refName:v="ref",...C}=Bu(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 I=!1,_=[];for(let[H,B]of Object.entries(t))typeof B=="boolean"&&(I=!0),B===!0&&_.push(H);I&&(P["data-headlessui-state"]=_.join(" "))}if(c===Y.Fragment&&Object.keys(Km(C)).length>0){if(!Y.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(` +`):" "+Vm(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:nf};function zu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Uo(null,e)}function Wm(e){return zu(e),e.headers=Tr.from(e.headers),e.data=Iu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tb.getAdapter(e.adapter||Yo.adapter)(e).then(function(s){return zu(e),s.data=Iu.call(e,e.transformResponse,s),s.headers=Tr.from(s.headers),s},function(s){return Jy(s)||(zu(e),s&&s.response&&(s.response.data=Iu.call(e,e.transformResponse,s.response),s.response.headers=Tr.from(s.response.headers))),Promise.reject(s)})}const $m=e=>e instanceof Tr?e.toJSON():e;function Ks(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($m(A),$m(E),!0)};return ae.forEach(Object.keys(Object.assign({},e,t)),function(E){const P=C[E]||o,I=P(e[E],t[E],E);ae.isUndefined(I)&&P!==v||(r[E]=I)}),r}const rb="1.6.7",r1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{r1[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Xm={};r1.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&&!Xm[p]&&(Xm[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 K6(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 sf={assertOptions:K6,validators:r1},$i=sf.validators;class Gn{constructor(t){this.defaults=t,this.interceptors={request:new Dm,response:new Dm}}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=Ks(this.defaults,r);const{transitional:s,paramsSerializer:o,headers:c}=r;s!==void 0&&sf.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}:sf.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=Tr.concat(p,c);const v=[];let C=!0;this.interceptors.request.forEach(function(B){typeof B.runWhen=="function"&&B.runWhen(r)===!1||(C=C&&B.synchronous,v.unshift(B.fulfilled,B.rejected))});const A=[];this.interceptors.response.forEach(function(B){A.push(B.fulfilled,B.rejected)});let E,P=0,I;if(!C){const H=[Wm.bind(this),void 0];for(H.unshift.apply(H,v),H.push.apply(H,A),I=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 Uo(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 i1(function(o){t=o}),cancel:t}}}function J6(e){return function(r){return e.apply(null,r)}}function e9(e){return ae.isObject(e)&&e.isAxiosError===!0}const af={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(af).forEach(([e,t])=>{af[t]=e});function ib(e){const t=new Gn(e),r=zy(Gn.prototype.request,t);return ae.extend(r,Gn.prototype,t,{allOwnKeys:!0}),ae.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return ib(Ks(e,o))},r}const jt=ib(Yo);jt.Axios=Gn;jt.CanceledError=Uo;jt.CancelToken=i1;jt.isCancel=Jy;jt.VERSION=rb;jt.toFormData=_d;jt.AxiosError=Qe;jt.Cancel=jt.CanceledError;jt.all=function(t){return Promise.all(t)};jt.spread=J6;jt.isAxiosError=e9;jt.mergeConfig=Ks;jt.AxiosHeaders=Tr;jt.formToJSON=e=>Ky(ae.isHTMLForm(e)?new FormData(e):e);jt.getAdapter=tb.getAdapter;jt.HttpStatusCode=af;jt.default=jt;function t9(e){function t(r){return`${e}:${r}`}return{getPrefixedKey:t,set(r,s){jl(),localStorage.setItem(t(r),JSON.stringify(s))},get(r){jl();const s=localStorage.getItem(t(r));try{return s?JSON.parse(s):void 0}catch{return}},remove(r){jl(),localStorage.removeItem(t(r))},clear(){jl(),Object.keys(localStorage).forEach(r=>{r.startsWith(e)&&localStorage.removeItem(r)})}}}const Go=t9("wasp");function jl(){if(!window.localStorage)throw new Error("Local storage is not available.")}function r9(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 is=r9(),da=jt.create({baseURL:Oy.apiUrl}),Od="sessionId";let Js=Go.get(Od);function i9(e){Js=e,Go.set(Od,e),is.emit("sessionId.set")}function nb(){return Js}function n9(){Js=void 0,Go.remove(Od),is.emit("sessionId.clear")}function s9(){Js=void 0,Go.clear(),is.emit("sessionId.clear")}da.interceptors.request.use(e=>{const t=nb();return t&&(e.headers.Authorization=`Bearer ${t}`),e});da.interceptors.response.use(void 0,e=>{var t;return((t=e.response)===null||t===void 0?void 0:t.status)===401&&n9(),Promise.reject(e)});window.addEventListener("storage",e=>{e.key===Go.getPrefixedKey(Od)&&(e.newValue?(Js=e.newValue,is.emit("sessionId.set")):(Js=void 0,is.emit("sessionId.clear")))});function sb(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 a9(o,(r=s==null?void 0:s.message)!==null&&r!==void 0?r:e.message,s)}else throw e}class a9 extends Error{constructor(t,r,s){super(r),this.statusCode=t,this.data=s}}const o9={};let ab;const n1=new Promise(e=>{ab=e});function l9(){const e=new dw(o9);ab(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 of=new Map,s1=c9(nn);function d9(e,t){for(const r of t){let s=of.get(r);s||(s=new Set,of.set(r,s)),s.add(e)}}function u9(e){e.forEach(({queryKey:t,updateQuery:r})=>s1.add(t,r))}async function h9(e,t){t.forEach(({queryKey:r})=>s1.remove(r)),await p9(e)}function f9(e){return s1.getUpdateHandlers(e)}async function ob(){const e=await n1;e.resetQueries(),e.removeQueries()}async function p9(e){const t=await n1;m9(e).forEach(s=>t.invalidateQueries(s))}function g9(e){return Array.from(of.get(e)||[])}function m9(e){return Array.from(new Set(e.flatMap(g9)))}async function x9(e){i9(e),await ob()}bt("div",{position:"relative",marginTop:"1.5rem"});bt("div",{position:"absolute",inset:"0px",display:"flex",alignItems:"center"});bt("div",{width:"100%",borderTopWidth:"1px",borderColor:"$gray500"});bt("div",{position:"relative",display:"flex",justifyContent:"center",fontSize:"$sm"});bt("span",{backgroundColor:"white",paddingLeft:"0.5rem",paddingRight:"0.5rem"});bt("div",{marginTop:"1.5rem"});bt("div",{fontWeight:"500",fontSize:"$sm"});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"}}}});const lb=bt("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"});bt(lb,{background:"$errorBackground",color:"$errorText"});bt(lb,{background:"$successBackground",color:"$successText"});bt("div",{display:"flex",flexDirection:"column"});bt("h2",{fontSize:"1.875rem !important",fontWeight:"700 !important",marginTop:"1.5rem !important"});Y.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}});var Ym;(function(e){e.Login="login",e.Signup="signup"})(Ym||(Ym={}));var v9=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}(),cb=function(){function e(t){this.generateIdentifier=t,this.kv=new v9}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}(),y9=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){y9(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}(cb),w9=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 k9(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 C9(e,t){var r=k9(e);if("find"in r)return r.find(t);for(var s=r,o=0;o"u"},j9=function(e){return e===null},ko=function(e){return typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype},lf=function(e){return ko(e)&&Object.keys(e).length===0},bn=function(e){return Array.isArray(e)},N9=function(e){return typeof e=="string"},E9=function(e){return typeof e=="number"&&!isNaN(e)},L9=function(e){return typeof e=="boolean"},P9=function(e){return e instanceof RegExp},Co=function(e){return e instanceof Map},So=function(e){return e instanceof Set},ub=function(e){return A9(e)==="Symbol"},T9=function(e){return e instanceof Date&&!isNaN(e.valueOf())},R9=function(e){return e instanceof Error},Gm=function(e){return typeof e=="number"&&isNaN(e)},M9=function(e){return L9(e)||j9(e)||db(e)||E9(e)||N9(e)||ub(e)},_9=function(e){return typeof e=="bigint"},O9=function(e){return e===1/0||e===-1/0},I9=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},z9=function(e){return e instanceof URL},hb=function(e){return e.replace(/\./g,"\\.")},Fu=function(e){return e.map(String).map(hb).join(".")},Ja=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},uf=function(e,t){for(var r=0,s=t.length,o=e.length;r0?"Infinity":"-Infinity"},Number),ti(function(e){return e===0&&1/e===-1/0},"number",function(){return"-0"},Number),ti(z9,"URL",function(e){return e.toString()},function(e){return new URL(e)})];function Id(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}var pb=Id(function(e,t){if(ub(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}),F9=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),gb=Id(I9,function(e){return["typed-array",e.constructor.name]},function(e){return uf([],df(e))},function(e,t){var r=F9[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function mb(e,t){if(e!=null&&e.constructor){var r=!!t.classRegistry.getIdentifier(e.constructor);return r}return!1}var xb=Id(mb,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 cf({},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)}),vb=Id(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)}),D9=[xb,pb,vb,gb],Zm=function(e,t){var r=Um(D9,function(o){return o.isApplicable(e,t)});if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};var s=Um(fb,function(o){return o.isApplicable(e,t)});if(s)return{value:s.transform(e,t),type:s.annotation}},yb={};fb.forEach(function(e){yb[e.annotation]=e});var H9=function(e,t,r){if(bn(t))switch(t[0]){case"symbol":return pb.untransform(e,t,r);case"class":return xb.untransform(e,t,r);case"custom":return vb.untransform(e,t,r);case"typed-array":return gb.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{var s=yb[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,r)}},Os=function(e,t){for(var r=e.keys();t>0;)r.next(),t--;return r.next().value};function bb(e){if(Ql(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Ql(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Ql(e,"constructor"))throw new Error("constructor is not allowed as a property")}var B9=function(e,t){bb(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;rpf(o,t));if(!U9(e))return e;const r=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...r,...s].reduce((o,c)=>{if(qm(t.props)&&!t.props.includes(c))return o;const p=e[c],v=pf(p,t);return G9(o,c,v,e,t.nonenumerable),o},{})}var In=function(){return In=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},q9=function(e,t){for(var r=0,s=t.length,o=e.length;rs(c,[]);return o.internal=s,o}const Nb=_r("operations/stripe-payment",["User"]),eo=_r("operations/update-current-user",["User"]);_r("operations/update-user-by-id",["User"]);const K9=_r("operations/create-new-chat",["Chat","Conversation"]),J9=_r("operations/create-new-daily-analysis-chat",["Chat","Conversation"]),di=_r("operations/update-current-chat",["Chat"]),Eb=_r("operations/update-current-conversation",["Conversation"]),ek=_r("operations/delete-last-conversation-in-chat",["Conversation"]),tk=_r("operations/retry-team-chat",["Chat","Conversation"]),rk=_r("operations/create-new-and-return-all-conversations",["Conversation"]),ik=_r("operations/create-new-and-return-last-conversation",["Conversation"]),nk=_r("operations/get-agent-response",["Chat","Conversation"]);function ua(e,t){const r=jb(e);async function s(o,c){const p=await Ab(r,c);return f9(o).reduce((v,C)=>C(v),p)}return Lb(s,{relativeQueryPath:e,queryRoute:r,entitiesUsed:t}),s}function Lb(e,{relativeQueryPath:t,queryRoute:r,entitiesUsed:s}){e.queryCacheKey=[t],e.route=r,d9(e.queryCacheKey,s)}const sk=ua("operations/get-daily-stats",["User","DailyStats"]),ak=ua("operations/get-paginated-users",["User"]),ok=ua("operations/get-chat",["Chat"]),lk=ua("operations/get-chats",["Chat"]),ck=ua("operations/get-conversations",["Conversation"]),dk=ua("operations/get-chat-from-uuid",["Chat"]);function Zn(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 Hw(Object.assign({queryKey:s,queryFn:()=>e(s,t)},r))}const uk=hk();function Or(e,t){return Zn(uk,e,t)}function hk(){const e="auth/me",t={method:Fc.Get,path:`/${e}`};async function r(){var s;try{const o=await da.get(t.path);return Sb(o.data)}catch(o){if(((s=o.response)===null||s===void 0?void 0:s.status)===401)return null;sb(o)}}return Lb(r,{relativeQueryPath:e,queryRoute:t,entitiesUsed:["User"]}),r}async function Pb(){try{await da.post("/auth/logout")}finally{s9(),await ob()}}function kt(e,t,r,s){const o=t?fk(e,t):e,c=r?`?${new URLSearchParams(r).toString()}`:"",p=s?`#${s}`:"";return o+c+p}function fk(e,t){function r(o){if(o.startsWith(":")){const c=gk(o);return t[c]}return o}const s=e.split("/").map(r).filter(pk).join("/");return e.startsWith("/")?`/${s}`:s}function pk(e){return!!e}function gk(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 xk={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 vk=Object.defineProperty,yk=(e,t,r)=>t in e?vk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Du=(e,t,r)=>(yk(e,typeof t!="symbol"?t+"":t,r),r);let bk=class{constructor(){Du(this,"current",this.detect()),Du(this,"handoffState","pending"),Du(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 bk,Ln=(e,t)=>{Li.isServer?Y.useEffect(e,t):Y.useLayoutEffect(e,t)};function zd(e){let t=Y.useRef(e);return Ln(()=>{t.current=e},[e]),t}function Zo(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function a1(){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 Zo(()=>{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=a1();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 wk(){let[e]=Y.useState(a1);return Y.useEffect(()=>()=>e.dispose(),[e]),e}let Er=function(e){let t=zd(e);return ge.useCallback((...r)=>t.current(...r),[t])};function Fd(){let[e,t]=Y.useState(Li.isHandoffComplete);return e&&Li.isHandoffComplete===!1&&t(!1),Y.useEffect(()=>{e!==!0&&t(!0)},[e]),Y.useEffect(()=>Li.handoff(),[]),e}var Qm;let ha=(Qm=ge.useId)!=null?Qm:function(){let e=Fd(),[t,r]=ge.useState(e?()=>Li.nextId():null);return Ln(()=>{t===null&&r(Li.nextId())},[t]),t!=null?""+t:void 0};function wn(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,wn),s}function Tb(e){return Li.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let gf=["[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 zn=(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))(zn||{}),Rb=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Rb||{}),kk=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(kk||{});function Ck(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(gf)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Mb=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Mb||{});function Sk(e,t=0){var r;return e===((r=Tb(e))==null?void 0:r.body)?!1:wn(t,{0(){return e.matches(gf)},1(){let s=e;for(;s!==null;){if(s.matches(gf))return!0;s=s.parentElement}return!1}})}function qn(e){e==null||e.focus({preventScroll:!0})}let Ak=["textarea","input"].join(",");function jk(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Ak))!=null?r:!1}function Nk(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 Kl(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?Nk(e):e:Ck(e);o.length>0&&p.length>1&&(p=p.filter(_=>!o.includes(_))),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,I;do{if(E>=P||E+P<=0)return 0;let _=C+E;if(t&16)_=(_+P)%P;else{if(_<0)return 3;if(_>=P)return 1}I=p[_],I==null||I.focus(A),E+=v}while(I!==c.activeElement);return t&6&&jk(I)&&I.select(),I.hasAttribute("tabindex")||I.setAttribute("tabindex","0"),2}function Hu(e,t,r){let s=zd(t);Y.useEffect(()=>{function o(c){s.current(c)}return document.addEventListener(e,o,r),()=>document.removeEventListener(e,o,r)},[e,r])}function Ek(e,t,r=!0){let s=Y.useRef(!1);Y.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!Sk(A,Mb.Loose)&&A.tabIndex!==-1&&p.preventDefault(),t(p,A)}}let c=Y.useRef(null);Hu("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),Hu("click",p=>{c.current&&(o(p,()=>c.current),c.current=null)},!0),Hu("blur",p=>o(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let _b=Symbol();function Lk(e,t=!0){return Object.assign(e,{[_b]:t})}function Di(...e){let t=Y.useRef(e);Y.useEffect(()=>{t.current=e},[e]);let r=Er(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[_b]))?void 0:r}function Pk(...e){return e.filter(Boolean).join(" ")}var mf=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(mf||{}),Tk=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Tk||{});function gi({ourProps:e,theirProps:t,slot:r,defaultTag:s,features:o,visible:c=!0,name:p}){let v=Ob(t,e);if(c)return Nl(v,r,s,p);let C=o??0;if(C&2){let{static:A=!1,...E}=v;if(A)return Nl(E,r,s,p)}if(C&1){let{unmount:A=!0,...E}=v;return wn(A?0:1,{0(){return null},1(){return Nl({...E,hidden:!0,style:{display:"none"}},r,s,p)}})}return Nl(v,r,s,p)}function Nl(e,t={},r,s){var o;let{as:c=r,children:p,refName:v="ref",...C}=Bu(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 I=!1,_=[];for(let[H,B]of Object.entries(t))typeof B=="boolean"&&(I=!0),B===!0&&_.push(H);I&&(P["data-headlessui-state"]=_.join(" "))}if(c===Y.Fragment&&Object.keys(Km(C)).length>0){if(!Y.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 I=Pk((o=E.props)==null?void 0:o.className,C.className),_=I?{className:I}:{};return Y.cloneElement(E,Object.assign({},Ob(E.props,Km(Bu(C,["ref"]))),P,A,Rk(E.ref,A.ref),_))}return Y.createElement(c,Object.assign({},Bu(C,["ref"]),c!==Y.Fragment&&A,c!==Y.Fragment&&P),E)}function Rk(...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 Ob(...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 mi(e){var t;return Object.assign(Y.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Km(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Bu(e,t=[]){let r=Object.assign({},e);for(let s of t)s in r&&delete r[s];return r}function Mk(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&&_k(r)?!1:s}function _k(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Ok="div";var Fc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Fc||{});function Ik(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 gi({ourProps:o,theirProps:s,slot:{},defaultTag:Ok,name:"Hidden"})}let xf=mi(Ik),Ib=Y.createContext(null);Ib.displayName="OpenClosedContext";var Da=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Da||{});function zk(){return Y.useContext(Ib)}var zb=(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))(zb||{});function o1(e,t){let r=Y.useRef([]),s=Er(e);Y.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 Fk(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Dk(e,t,r){let s=zd(t);Y.useEffect(()=>{function o(c){s.current(c)}return window.addEventListener(e,o,r),()=>window.removeEventListener(e,o,r)},[e,r])}var Ha=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ha||{});function Hk(){let e=Y.useRef(0);return Dk("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Fb(){let e=Y.useRef(!1);return Ln(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Dd(...e){return Y.useMemo(()=>Tb(...e),[...e])}function Db(e,t,r,s){let o=zd(r);Y.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 Hb(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 Bk="div";var Bb=(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))(Bb||{});function Vk(e,t){let r=Y.useRef(null),s=Di(r,t),{initialFocus:o,containers:c,features:p=30,...v}=e;Fd()||(p=1);let C=Dd(r);Xk({ownerDocument:C},!!(p&16));let A=Yk({ownerDocument:C,container:r,initialFocus:o},!!(p&2));Uk({ownerDocument:C,container:r,containers:c,previousActiveElement:A},!!(p&8));let E=Hk(),P=Er(B=>{let Z=r.current;Z&&(W=>W())(()=>{wn(E.current,{[Ha.Forwards]:()=>{Ql(Z,zn.First,{skipElements:[B.relatedTarget]})},[Ha.Backwards]:()=>{Ql(Z,zn.Last,{skipElements:[B.relatedTarget]})}})})}),I=wk(),_=Y.useRef(!1),H={ref:s,onKeyDown(B){B.key=="Tab"&&(_.current=!0,I.requestAnimationFrame(()=>{_.current=!1}))},onBlur(B){let Z=Hb(c);r.current instanceof HTMLElement&&Z.add(r.current);let W=B.relatedTarget;W instanceof HTMLElement&&W.dataset.headlessuiFocusGuard!=="true"&&(Vb(Z,W)||(_.current?Ql(r.current,wn(E.current,{[Ha.Forwards]:()=>zn.Next,[Ha.Backwards]:()=>zn.Previous})|zn.WrapAround,{relativeTo:B.target}):B.target instanceof HTMLElement&&qn(B.target)))}};return ge.createElement(ge.Fragment,null,!!(p&4)&&ge.createElement(xf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:Fc.Focusable}),gi({ourProps:H,theirProps:v,defaultTag:Bk,name:"FocusTrap"}),!!(p&4)&&ge.createElement(xf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:Fc.Focusable}))}let Wk=mi(Vk),Ea=Object.assign(Wk,{features:Bb}),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 $k(e=!0){let t=Y.useRef(Ki.slice());return o1(([r],[s])=>{s===!0&&r===!1&&Go(()=>{t.current.splice(0)}),s===!1&&r===!0&&(t.current=Ki.slice())},[e,Ki,t]),Er(()=>{var r;return(r=t.current.find(s=>s!=null&&s.isConnected))!=null?r:null})}function Xk({ownerDocument:e},t){let r=$k(t);o1(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&qn(r())},[t]);let s=Y.useRef(!1);Y.useEffect(()=>(s.current=!1,()=>{s.current=!0,Go(()=>{s.current&&qn(r())})}),[])}function Yk({ownerDocument:e,container:t,initialFocus:r},s){let o=Y.useRef(null),c=Fb();return o1(()=>{if(!s)return;let p=t.current;p&&Go(()=>{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?qn(r.current):Ql(p,zn.First)===Rb.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[s]),o}function Uk({ownerDocument:e,container:t,containers:r,previousActiveElement:s},o){let c=Fb();Db(e==null?void 0:e.defaultView,"focus",p=>{if(!o||!c.current)return;let v=Hb(r);t.current instanceof HTMLElement&&v.add(t.current);let C=s.current;if(!C)return;let A=p.target;A&&A instanceof HTMLElement?Vb(v,A)?(s.current=A,qn(A)):(p.preventDefault(),p.stopPropagation(),qn(C)):qn(s.current)},!0)}function Vb(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let Wb=Y.createContext(!1);function Gk(){return Y.useContext(Wb)}function vf(e){return ge.createElement(Wb.Provider,{value:e.force},e.children)}function Zk(e){let t=Gk(),r=Y.useContext($b),s=Dd(e),[o,c]=Y.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 Y.useEffect(()=>{o!==null&&(s!=null&&s.body.contains(o)||s==null||s.body.appendChild(o))},[o,s]),Y.useEffect(()=>{t||r!==null&&c(r.current)},[r,c,t]),o}let qk=Y.Fragment;function Qk(e,t){let r=e,s=Y.useRef(null),o=Di(Lk(E=>{s.current=E}),t),c=Dd(s),p=Zk(s),[v]=Y.useState(()=>{var E;return Li.isServer?null:(E=c==null?void 0:c.createElement("div"))!=null?E:null}),C=Fd(),A=Y.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,Go(()=>{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:Yv.createPortal(gi({ourProps:{ref:o},theirProps:r,defaultTag:qk,name:"Portal"}),v):null}let Kk=Y.Fragment,$b=Y.createContext(null);function Jk(e,t){let{target:r,...s}=e,o={ref:Di(t)};return ge.createElement($b.Provider,{value:r},gi({ourProps:o,theirProps:s,defaultTag:Kk,name:"Popover.Group"}))}let eC=mi(Qk),tC=mi(Jk),yf=Object.assign(eC,{Group:tC}),Xb=Y.createContext(null);function Yb(){let e=Y.useContext(Xb);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,Yb),t}return e}function rC(){let[e,t]=Y.useState([]);return[e.length>0?e.join(" "):void 0,Y.useMemo(()=>function(r){let s=Er(c=>(t(p=>[...p,c]),()=>t(p=>{let v=p.slice(),C=v.indexOf(c);return C!==-1&&v.splice(C,1),v}))),o=Y.useMemo(()=>({register:s,slot:r.slot,name:r.name,props:r.props}),[s,r.slot,r.name,r.props]);return ge.createElement(Xb.Provider,{value:o},r.children)},[t])]}let iC="p";function nC(e,t){let r=ha(),{id:s=`headlessui-description-${r}`,...o}=e,c=Yb(),p=Di(t);Ln(()=>c.register(s),[s,c.register]);let v={ref:p,...c.props,id:s};return gi({ourProps:v,theirProps:o,slot:c.slot||{},defaultTag:iC,name:c.name||"Description"})}let sC=mi(nC),aC=Object.assign(sC,{}),l1=Y.createContext(()=>{});l1.displayName="StackContext";var bf=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(bf||{});function oC(){return Y.useContext(l1)}function lC({children:e,onUpdate:t,type:r,element:s,enabled:o}){let c=oC(),p=Er((...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(l1.Provider,{value:p},e)}function cC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const dC=typeof Object.is=="function"?Object.is:cC,{useState:uC,useEffect:hC,useLayoutEffect:fC,useDebugValue:pC}=Ku;function gC(e,t,r){const s=t(),[{inst:o},c]=uC({inst:{value:s,getSnapshot:t}});return fC(()=>{o.value=s,o.getSnapshot=t,Vu(o)&&c({inst:o})},[e,s,t]),hC(()=>(Vu(o)&&c({inst:o}),e(()=>{Vu(o)&&c({inst:o})})),[e]),pC(s),s}function Vu(e){const t=e.getSnapshot,r=e.value;try{const s=t();return!dC(r,s)}catch{return!0}}function mC(e,t,r){return t()}const xC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vC=!xC,yC=vC?mC:gC,bC="useSyncExternalStore"in Ku?(e=>e.useSyncExternalStore)(Ku):yC;function wC(e){return bC(e.subscribe,e.getSnapshot,e.getSnapshot)}function kC(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 CC(){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 SC(){if(!Fk())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 AC(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function jC(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Wn=kC(()=>new Map,{PUSH(e,t){var r;let s=(r=this.get(e))!=null?r:{doc:e,count:0,d:a1(),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:jC(r)},o=[SC(),CC(),AC()];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)}});Wn.subscribe(()=>{let e=Wn.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)&&Wn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Wn.dispatch("TEARDOWN",r)}});function NC(e,t,r){let s=wC(Wn),o=e?s.get(e):void 0,c=o?o.count>0:!1;return Ln(()=>{if(!(!e||!t))return Wn.dispatch("PUSH",e,r),()=>Wn.dispatch("POP",e,r)},[t,e]),c}let Wu=new Map,La=new Map;function Jm(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=La.get(s))!=null?p:1;if(v===1?La.delete(s):La.set(s,v-1),v!==1)return;let C=Wu.get(s);C&&(C["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",C["aria-hidden"]),s.inert=C.inert,Wu.delete(s))}let c=(r=La.get(s))!=null?r:0;return La.set(s,c+1),c!==0||(Wu.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),o},[e,t])}var EC=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(EC||{}),LC=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(LC||{});let PC={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Dc=Y.createContext(null);Dc.displayName="DialogContext";function Zo(e){let t=Y.useContext(Dc);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Zo),r}return t}function TC(e,t,r=()=>[document.body]){NC(e,t,s=>{var o;return{containers:[...(o=s.containers)!=null?o:[],r]}})}function RC(e,t){return wn(t.type,PC,e,t)}let MC="div",_C=mf.RenderStrategy|mf.Static;function OC(e,t){let r=ha(),{id:s=`headlessui-dialog-${r}`,open:o,onClose:c,initialFocus:p,__demoMode:v=!1,...C}=e,[A,E]=Y.useState(0),P=zk();o===void 0&&P!==null&&(o=(P&Da.Open)===Da.Open);let I=Y.useRef(null),_=Di(I,t),H=Y.useRef(null),B=Dd(I),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,[R,K]=Y.useReducer(RC,{titleId:null,descriptionId:null,panelRef:Y.createRef()}),ee=Er(()=>c(!1)),X=Er(He=>K({type:0,id:He})),Q=Fd()?v?!1:V===0:!1,J=A>1,fe=Y.useContext(Dc)!==null,le=J?"parent":"leaf",Ne=P!==null?(P&Da.Closing)===Da.Closing:!1,ve=fe||Ne?!1:Q,Le=Y.useCallback(()=>{var He,Be;return(Be=Array.from((He=B==null?void 0:B.querySelectorAll("body > *"))!=null?He:[]).find(_e=>_e.id==="headlessui-portal-root"?!1:_e.contains(H.current)&&_e instanceof HTMLElement))!=null?Be:null},[H]);Jm(Le,ve);let Fe=J?!0:Q,Re=Y.useCallback(()=>{var He,Be;return(Be=Array.from((He=B==null?void 0:B.querySelectorAll("[data-headlessui-portal]"))!=null?He:[]).find(_e=>_e.contains(H.current)&&_e instanceof HTMLElement))!=null?Be:null},[H]);Jm(Re,Fe);let qe=Er(()=>{var He,Be;return[...Array.from((He=B==null?void 0:B.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))!=null?He:[]).filter(_e=>!(_e===document.body||_e===document.head||!(_e instanceof HTMLElement)||_e.contains(H.current)||R.panelRef.current&&_e.contains(R.panelRef.current))),(Be=R.panelRef.current)!=null?Be:I.current]});Ek(()=>qe(),ee,!(!Q||J));let de=!(J||V!==0);Db(B==null?void 0:B.defaultView,"keydown",He=>{de&&(He.defaultPrevented||He.key===zb.Escape&&(He.preventDefault(),He.stopPropagation(),ee()))}),TC(B,!(Ne||V!==0||fe),qe),Y.useEffect(()=>{if(V!==0||!I.current)return;let He=new ResizeObserver(Be=>{for(let _e of Be){let Nt=_e.target.getBoundingClientRect();Nt.x===0&&Nt.y===0&&Nt.width===0&&Nt.height===0&&ee()}});return He.observe(I.current),()=>He.disconnect()},[V,I,ee]);let[oe,Ae]=rC(),je=Y.useMemo(()=>[{dialogState:V,close:ee,setTitleId:X},R],[V,R,ee,X]),ze=Y.useMemo(()=>({open:V===0}),[V]),Ue={ref:_,id:s,role:"dialog","aria-modal":V===0?!0:void 0,"aria-labelledby":R.titleId,"aria-describedby":oe};return ge.createElement(lC,{type:"Dialog",enabled:V===0,element:I,onUpdate:Er((He,Be)=>{Be==="Dialog"&&wn(He,{[bf.Add]:()=>E(_e=>_e+1),[bf.Remove]:()=>E(_e=>_e-1)})})},ge.createElement(vf,{force:!0},ge.createElement(yf,null,ge.createElement(Dc.Provider,{value:je},ge.createElement(yf.Group,{target:I},ge.createElement(vf,{force:!1},ge.createElement(Ae,{slot:ze,name:"Dialog.Description"},ge.createElement(Ea,{initialFocus:p,containers:qe,features:Q?wn(le,{parent:Ea.features.RestoreFocus,leaf:Ea.features.All&~Ea.features.FocusLock}):Ea.features.None},gi({ourProps:Ue,theirProps:C,slot:ze,defaultTag:MC,features:_C,visible:V===0,name:"Dialog"})))))))),ge.createElement(xf,{features:Fc.Hidden,ref:H}))}let IC="div";function zC(e,t){let r=ha(),{id:s=`headlessui-dialog-overlay-${r}`,...o}=e,[{dialogState:c,close:p}]=Zo("Dialog.Overlay"),v=Di(t),C=Er(E=>{if(E.target===E.currentTarget){if(Mk(E.currentTarget))return E.preventDefault();E.preventDefault(),E.stopPropagation(),p()}}),A=Y.useMemo(()=>({open:c===0}),[c]);return gi({ourProps:{ref:v,id:s,"aria-hidden":!0,onClick:C},theirProps:o,slot:A,defaultTag:IC,name:"Dialog.Overlay"})}let FC="div";function DC(e,t){let r=ha(),{id:s=`headlessui-dialog-backdrop-${r}`,...o}=e,[{dialogState:c},p]=Zo("Dialog.Backdrop"),v=Di(t);Y.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[p.panelRef]);let C=Y.useMemo(()=>({open:c===0}),[c]);return ge.createElement(vf,{force:!0},ge.createElement(yf,null,gi({ourProps:{ref:v,id:s,"aria-hidden":!0},theirProps:o,slot:C,defaultTag:FC,name:"Dialog.Backdrop"})))}let HC="div";function BC(e,t){let r=ha(),{id:s=`headlessui-dialog-panel-${r}`,...o}=e,[{dialogState:c},p]=Zo("Dialog.Panel"),v=Di(t,p.panelRef),C=Y.useMemo(()=>({open:c===0}),[c]),A=Er(E=>{E.stopPropagation()});return gi({ourProps:{ref:v,id:s,onClick:A},theirProps:o,slot:C,defaultTag:HC,name:"Dialog.Panel"})}let VC="h2";function WC(e,t){let r=ha(),{id:s=`headlessui-dialog-title-${r}`,...o}=e,[{dialogState:c,setTitleId:p}]=Zo("Dialog.Title"),v=Di(t);Y.useEffect(()=>(p(s),()=>p(null)),[s,p]);let C=Y.useMemo(()=>({open:c===0}),[c]);return gi({ourProps:{ref:v,id:s},theirProps:o,slot:C,defaultTag:VC,name:"Dialog.Title"})}let $C=mi(OC),XC=mi(DC),YC=mi(BC),UC=mi(zC),GC=mi(WC),Hc=Object.assign($C,{Backdrop:XC,Panel:YC,Overlay:UC,Title:GC,Description:aC});var Ub={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},e0=ge.createContext&&ge.createContext(Ub),mn=function(){return mn=Object.assign||function(e){for(var t,r=1,s=arguments.length;r{const r=window.location.pathname,s=()=>{t&&t(!1)},c=Y.useMemo(()=>location.pathname.startsWith("/chat"),[location])?"text-captn-light-cream":"text-captn-dark-blue";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(gn,{to:"/account",onClick:s,className:`${c} no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out lg: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(gn,{to:"/admin",onClick:s,className:`${c} no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out lg:text-captn-light-cream hover:text-captn-light-blue`,children:[f.jsx(JC,{size:"1.1rem"}),"Admin dashboard"]})})}),f.jsxs("button",{onClick:()=>Pb(),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:""})]}),"Sign out"]})]})},u1=({user:e})=>{const[t,r]=Y.useState(!1),s=Y.useRef(null),o=Y.useRef(null),c=()=>r(p=>!p);return Y.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)}),Y.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(KC,{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(d1,{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 wf;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(wf||(wf={}));const ye=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 ye.undefined;case"string":return ye.string;case"number":return isNaN(e)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(e)?ye.array:e===null?ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ye.promise:typeof Map<"u"&&e instanceof Map?ye.map:typeof Set<"u"&&e instanceof Set?ye.set:typeof Date<"u"&&e instanceof Date?ye.date:ye.object;default:return ye.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"]),eS=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Zr 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()}}Zr.create=e=>new Zr(e);const So=(e,t)=>{let r;switch(e.code){case he.invalid_type:e.received===ye.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 Qb=So;function tS(e){Qb=e}function Vc(){return Qb}const Wc=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}},rS=[];function ke(e,t){const r=Wc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Vc(),So].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"}),Kb=e=>({status:"dirty",value:e}),ir=e=>({status:"valid",value:e}),kf=e=>e.status==="aborted",Cf=e=>e.status==="dirty",Ao=e=>e.status==="valid",$c=e=>typeof Promise<"u"&&e instanceof Promise;var Me;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Me||(Me={}));class ui{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 t0=(e,t)=>{if(Ao(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 Zr(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($c(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 t0(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($c(o)?o:Promise.resolve(o));return t0(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 Kr({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 as.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qr.create(this,this._def)}promise(){return ra.create(this,this._def)}or(t){return Lo.create([this,t],this._def)}and(t){return Po.create(this,t,this._def)}transform(t){return new Kr({...$e(this._def),schema:this,typeName:Ie.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Oo({...$e(this._def),innerType:this,defaultValue:r,typeName:Ie.ZodDefault})}brand(){return new e2({typeName:Ie.ZodBranded,type:this,...$e(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Gc({...$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 qo.create(this,t)}readonly(){return qc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const iS=/^c[^\s-]{8,}$/i,nS=/^[a-z][a-z0-9]*$/,sS=/^[0-9A-HJKMNP-TV-Z]{26}$/,aS=/^[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,oS=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $u;const cS=/^(((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}))$/,dS=/^(([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})))$/,uS=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 hS(e,t){return!!((t==="v4"||!t)&&cS.test(e)||(t==="v6"||!t)&&dS.test(e))}class Xr extends Xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ye.string){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ye.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,...Me.errToObj(s)})}_addCheck(t){return new Xr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Me.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Me.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Me.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Me.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Me.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Me.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Me.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Me.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,...Me.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Me.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Me.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Me.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Me.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Me.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Me.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Me.errToObj(r)})}nonempty(t){return this.min(1,Me.errToObj(t))}trim(){return new Xr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Xr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Xr({...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 Xr({checks:[],typeName:Ie.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};function fS(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 kn 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)!==ye.number){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ye.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"?fS(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,Me.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Me.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Me.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Me.toString(r))}setLimit(t,r,s,o){return new kn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:Me.toString(o)}]})}_addCheck(t){return new kn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Me.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Me.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Me.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Me.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Me.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Me.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Me.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Me.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Me.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 kn({checks:[],typeName:Ie.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class Cn 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)!==ye.bigint){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ye.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,Me.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Me.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Me.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Me.toString(r))}setLimit(t,r,s,o){return new Cn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:Me.toString(o)}]})}_addCheck(t){return new Cn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Me.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Me.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Me.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Me.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Me.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 Cn({checks:[],typeName:Ie.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};class jo extends Xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ye.boolean){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.boolean,received:s.parsedType}),De}return ir(t.data)}}jo.create=e=>new jo({typeName:Ie.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class ns extends Xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ye.date){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ye.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 ns({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Me.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Me.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 ns({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ie.ZodDate,...$e(e)});class Xc extends Xe{_parse(t){if(this._getType(t)!==ye.symbol){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.symbol,received:s.parsedType}),De}return ir(t.data)}}Xc.create=e=>new Xc({typeName:Ie.ZodSymbol,...$e(e)});class No extends Xe{_parse(t){if(this._getType(t)!==ye.undefined){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.undefined,received:s.parsedType}),De}return ir(t.data)}}No.create=e=>new No({typeName:Ie.ZodUndefined,...$e(e)});class Eo extends Xe{_parse(t){if(this._getType(t)!==ye.null){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.null,received:s.parsedType}),De}return ir(t.data)}}Eo.create=e=>new Eo({typeName:Ie.ZodNull,...$e(e)});class ta extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return ir(t.data)}}ta.create=e=>new ta({typeName:Ie.ZodAny,...$e(e)});class Qn extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ir(t.data)}}Qn.create=e=>new Qn({typeName:Ie.ZodUnknown,...$e(e)});class Ii extends Xe{_parse(t){const r=this._getOrReturnCtx(t);return ke(r,{code:he.invalid_type,expected:ye.never,received:r.parsedType}),De}}Ii.create=e=>new Ii({typeName:Ie.ZodNever,...$e(e)});class Yc extends Xe{_parse(t){if(this._getType(t)!==ye.undefined){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.void,received:s.parsedType}),De}return ir(t.data)}}Yc.create=e=>new Yc({typeName:Ie.ZodVoid,...$e(e)});class qr extends Xe{_parse(t){const{ctx:r,status:s}=this._processInputParams(t),o=this._def;if(r.parsedType!==ye.array)return ke(r,{code:he.invalid_type,expected:ye.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 ui(r,p,r.path,v)))).then(p=>Gt.mergeArray(s,p));const c=[...r.data].map((p,v)=>o.type._parseSync(new ui(r,p,r.path,v)));return Gt.mergeArray(s,c)}get element(){return this._def.type}min(t,r){return new qr({...this._def,minLength:{value:t,message:Me.toString(r)}})}max(t,r){return new qr({...this._def,maxLength:{value:t,message:Me.toString(r)}})}length(t,r){return new qr({...this._def,exactLength:{value:t,message:Me.toString(r)}})}nonempty(t){return this.min(1,t)}}qr.create=(e,t)=>new qr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ie.ZodArray,...$e(t)});function ys(e){if(e instanceof ft){const t={};for(const r in e.shape){const s=e.shape[r];t[r]=Pi.create(ys(s))}return new ft({...e._def,shape:()=>t})}else return e instanceof qr?new qr({...e._def,type:ys(e.element)}):e instanceof Pi?Pi.create(ys(e.unwrap())):e instanceof as?as.create(ys(e.unwrap())):e instanceof hi?hi.create(e.items.map(t=>ys(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)!==ye.object){const A=this._getOrReturnCtx(t);return ke(A,{code:he.invalid_type,expected:ye.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 ui(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: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 E of v){const P=o.data[E];C.push({key:{status:"valid",value:E},value:A._parse(new ui(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 Me.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=Me.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 ys(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 Jb(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 Lo 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 Zr(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},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 Zr(C));return ke(r,{code:he.invalid_union,unionErrors:v}),De}}get options(){return this._def.options}}Lo.create=(e,t)=>new Lo({options:e,typeName:Ie.ZodUnion,...$e(t)});const Kl=e=>e instanceof Ro?Kl(e.schema):e instanceof Kr?Kl(e.innerType()):e instanceof Mo?[e.value]:e instanceof Sn?e.options:e instanceof _o?Object.keys(e.enum):e instanceof Oo?Kl(e._def.innerType):e instanceof No?[void 0]:e instanceof Eo?[null]:null;class Hd extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.object)return ke(r,{code:he.invalid_type,expected:ye.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=Kl(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 Hd({typeName:Ie.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...$e(s)})}}function Sf(e,t){const r=Ji(e),s=Ji(t);if(e===t)return{valid:!0,data:e};if(r===ye.object&&s===ye.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=Sf(e[v],t[v]);if(!C.valid)return{valid:!1};p[v]=C.data}return{valid:!0,data:p}}else if(r===ye.array&&s===ye.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let c=0;c{if(kf(c)||kf(p))return De;const v=Sf(c.value,p.value);return v.valid?((Cf(c)||Cf(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}))}}Po.create=(e,t,r)=>new Po({left:e,right:t,typeName:Ie.ZodIntersection,...$e(r)});class hi extends Xe{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ye.array)return ke(s,{code:he.invalid_type,expected:ye.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 ui(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 hi({...this._def,rest:t})}}hi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new hi({items:e,typeName:Ie.ZodTuple,rest:null,...$e(t)})};class To 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!==ye.object)return ke(s,{code:he.invalid_type,expected:ye.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 ui(s,v,s.path,v)),value:p._parse(new ui(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 To({keyType:t,valueType:r,typeName:Ie.ZodRecord,...$e(s)}):new To({keyType:Xr.create(),valueType:t,typeName:Ie.ZodRecord,...$e(r)})}}class Uc 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!==ye.map)return ke(s,{code:he.invalid_type,expected:ye.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 ui(s,v,s.path,[A,"key"])),value:c._parse(new ui(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}}}}Uc.create=(e,t,r)=>new Uc({valueType:t,keyType:e,typeName:Ie.ZodMap,...$e(r)});class ss extends Xe{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ye.set)return ke(s,{code:he.invalid_type,expected:ye.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 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 ui(s,C,s.path,A)));return s.common.async?Promise.all(v).then(C=>p(C)):p(v)}min(t,r){return new ss({...this._def,minSize:{value:t,message:Me.toString(r)}})}max(t,r){return new ss({...this._def,maxSize:{value:t,message:Me.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}ss.create=(e,t)=>new ss({valueType:e,minSize:null,maxSize:null,typeName:Ie.ZodSet,...$e(t)});class Vs extends Xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.function)return ke(r,{code:he.invalid_type,expected:ye.function,received:r.parsedType}),De;function s(v,C){return Wc({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Vc(),So].filter(A=>!!A),issueData:{code:he.invalid_arguments,argumentsError:C}})}function o(v,C){return Wc({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Vc(),So].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 ra){const v=this;return ir(async function(...C){const A=new Zr([]),E=await v._def.args.parseAsync(C,c).catch(_=>{throw A.addIssue(s(C,_)),A}),P=await Reflect.apply(p,this,E);return await v._def.returns._def.type.parseAsync(P,c).catch(_=>{throw A.addIssue(o(P,_)),A})})}else{const v=this;return ir(function(...C){const A=v._def.args.safeParse(C,c);if(!A.success)throw new Zr([s(C,A.error)]);const E=Reflect.apply(p,this,A.data),P=v._def.returns.safeParse(E,c);if(!P.success)throw new Zr([o(E,P.error)]);return P.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Vs({...this._def,args:hi.create(t).rest(Qn.create())})}returns(t){return new Vs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,s){return new Vs({args:t||hi.create([]).rest(Qn.create()),returns:r||Qn.create(),typeName:Ie.ZodFunction,...$e(s)})}}class Ro 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})}}Ro.create=(e,t)=>new Ro({getter:e,typeName:Ie.ZodLazy,...$e(t)});class Mo 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}}Mo.create=(e,t)=>new Mo({value:e,typeName:Ie.ZodLiteral,...$e(t)});function Jb(e,t){return new Sn({values:e,typeName:Ie.ZodEnum,...$e(t)})}class Sn 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 ir(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 Sn.create(t)}exclude(t){return Sn.create(this.options.filter(r=>!t.includes(r)))}}Sn.create=Jb;class _o extends Xe{_parse(t){const r=Je.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==ye.string&&s.parsedType!==ye.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 ir(t.data)}get enum(){return this._def.values}}_o.create=(e,t)=>new _o({values:e,typeName:Ie.ZodNativeEnum,...$e(t)});class ra extends Xe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.promise&&r.common.async===!1)return ke(r,{code:he.invalid_type,expected:ye.promise,received:r.parsedType}),De;const s=r.parsedType===ye.promise?r.data:Promise.resolve(r.data);return ir(s.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ra.create=(e,t)=>new ra({type:e,typeName:Ie.ZodPromise,...$e(t)});class Kr 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(!Ao(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=>Ao(p)?Promise.resolve(o.transform(p.value,c)).then(v=>({status:r.value,value:v})):p);Je.assertNever(o)}}Kr.create=(e,t,r)=>new Kr({schema:e,typeName:Ie.ZodEffects,effect:t,...$e(r)});Kr.createWithPreprocess=(e,t,r)=>new Kr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ie.ZodEffects,...$e(r)});class Pi extends Xe{_parse(t){return this._getType(t)===ye.undefined?ir(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 as extends Xe{_parse(t){return this._getType(t)===ye.null?ir(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}as.create=(e,t)=>new as({innerType:e,typeName:Ie.ZodNullable,...$e(t)});class Oo extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t);let s=r.data;return r.parsedType===ye.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Oo.create=(e,t)=>new Oo({innerType:e,typeName:Ie.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class Gc 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 $c(o)?o.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Zr(s.common.issues)},input:s.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Zr(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Gc.create=(e,t)=>new Gc({innerType:e,typeName:Ie.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class Zc extends Xe{_parse(t){if(this._getType(t)!==ye.nan){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.nan,received:s.parsedType}),De}return{status:"valid",value:t.data}}}Zc.create=e=>new Zc({typeName:Ie.ZodNaN,...$e(e)});const pS=Symbol("zod_brand");class e2 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 qo 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(),Kb(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 qo({in:t,out:r,typeName:Ie.ZodPipeline})}}class qc extends Xe{_parse(t){const r=this._def.innerType._parse(t);return Ao(r)&&(r.value=Object.freeze(r.value)),r}}qc.create=(e,t)=>new qc({innerType:e,typeName:Ie.ZodReadonly,...$e(t)});const t2=(e,t={},r)=>e?ta.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})}}):ta.create(),gS={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}`})=>t2(r=>r instanceof e,t),r2=Xr.create,i2=kn.create,xS=Zc.create,vS=Cn.create,n2=jo.create,yS=ns.create,bS=Xc.create,wS=No.create,kS=Eo.create,CS=ta.create,SS=Qn.create,AS=Ii.create,jS=Yc.create,NS=qr.create,ES=ft.create,LS=ft.strictCreate,PS=Lo.create,TS=Hd.create,RS=Po.create,MS=hi.create,_S=To.create,OS=Uc.create,IS=ss.create,zS=Vs.create,FS=Ro.create,DS=Mo.create,HS=Sn.create,BS=_o.create,VS=ra.create,r0=Kr.create,WS=Pi.create,$S=as.create,XS=Kr.createWithPreprocess,YS=qo.create,US=()=>r2().optional(),GS=()=>i2().optional(),ZS=()=>n2().optional(),qS={string:e=>Xr.create({...e,coerce:!0}),number:e=>kn.create({...e,coerce:!0}),boolean:e=>jo.create({...e,coerce:!0}),bigint:e=>Cn.create({...e,coerce:!0}),date:e=>ns.create({...e,coerce:!0})},QS=De;var KS=Object.freeze({__proto__:null,defaultErrorMap:So,setErrorMap:tS,getErrorMap:Vc,makeIssue:Wc,EMPTY_PATH:rS,addIssueToContext:ke,ParseStatus:Gt,INVALID:De,DIRTY:Kb,OK:ir,isAborted:kf,isDirty:Cf,isValid:Ao,isAsync:$c,get util(){return Je},get objectUtil(){return wf},ZodParsedType:ye,getParsedType:Ji,ZodType:Xe,ZodString:Xr,ZodNumber:kn,ZodBigInt:Cn,ZodBoolean:jo,ZodDate:ns,ZodSymbol:Xc,ZodUndefined:No,ZodNull:Eo,ZodAny:ta,ZodUnknown:Qn,ZodNever:Ii,ZodVoid:Yc,ZodArray:qr,ZodObject:ft,ZodUnion:Lo,ZodDiscriminatedUnion:Hd,ZodIntersection:Po,ZodTuple:hi,ZodRecord:To,ZodMap:Uc,ZodSet:ss,ZodFunction:Vs,ZodLazy:Ro,ZodLiteral:Mo,ZodEnum:Sn,ZodNativeEnum:_o,ZodPromise:ra,ZodEffects:Kr,ZodTransformer:Kr,ZodOptional:Pi,ZodNullable:as,ZodDefault:Oo,ZodCatch:Gc,ZodNaN:Zc,BRAND:pS,ZodBranded:e2,ZodPipeline:qo,ZodReadonly:qc,custom:t2,Schema:Xe,ZodSchema:Xe,late:gS,get ZodFirstPartyTypeKind(){return Ie},coerce:qS,any:CS,array:NS,bigint:vS,boolean:n2,date:yS,discriminatedUnion:TS,effect:r0,enum:HS,function:zS,instanceof:mS,intersection:RS,lazy:FS,literal:DS,map:OS,nan:xS,nativeEnum:BS,never:AS,null:kS,nullable:$S,number:i2,object:ES,oboolean:ZS,onumber:GS,optional:WS,ostring:US,pipeline:YS,preprocess:XS,promise:VS,record:_S,set:IS,strictObject:LS,string:r2,symbol:bS,transformer:r0,tuple:MS,undefined:wS,union:PS,unknown:SS,void:jS,NEVER:QS,ZodIssueCode:he,quotelessJson:eS,ZodError:Zr}),h1=(e=>(e.HOBBY="hobby-tier",e.PRO="pro-tier",e.ENTERPRISE="enterprise-tier",e))(h1||{});const JS="https://docs.opensaas.sh",eA="https://docs.opensaas.sh/blog",tA="https://billing.stripe.com/p/login/test_aEU17i3Iz0XT5mUfYY",s2="https://billing.stripe.com/p/login/14kaGs1cL3FX1PidQQ",a2=s2;rA({customerPortalTestUrl:tA,customerPortalProdUrl:s2});function rA(e){const t=KS.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 o2(){const e=Jr(),[t,r]=Y.useState(!1),{data:s}=Or();async function o(c){if(!s)e.push("/login");else try{r(!0);let p=await Nb(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(h1.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 Af=({user:e,renderGoToChat:t})=>e?e.hasPaid?t?f.jsxs("a",{href:"/chat",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream 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:["Go to chat ",f.jsx("span",{"aria-hidden":"true",children:"→"})]}):f.jsx(f.Fragment,{}):f.jsx(o2,{}):f.jsx(rt,{to:"/signup",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream 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:"Create an account"}),Qc=[{name:"Home",href:"/"},{name:"Chat",href:"/chat"},{name:"Pricing",href:"/pricing"}],iA=[{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:""}],nA=[{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:""}],sA={app:[{name:"Documentation",href:JS},{name:"Blog",href:eA}],company:[{name:"Privacy Policy",href:"/privacy"},{name:"Terms & Conditions",href:"/toc"}]},aA=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:c1,alt:"Capt’n.ai"});function l2(){const[e,t]=Y.useState(!1),{data:r,isLoading:s}=Or();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:c1,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(qb,{className:"h-6 w-6","aria-hidden":"true"})]})}),f.jsx("div",{className:"hidden lg:flex lg:gap-x-12",children:Qc.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:f.jsx(Af,{user:r,renderGoToChat:!1})}),s?null:r?f.jsx("div",{className:"ml-4",children:f.jsx(u1,{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:["Sign in ",f.jsx(Bc,{size:"1.1rem",className:"ml-1 mt-[0.1rem]"})]})})]})]}),f.jsxs(Hc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Hc.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(aA,{})]}),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(Zb,{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:Qc.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(d1,{user:r,setMobileMenuOpen:t}):f.jsxs("div",{className:"text-right",children:[f.jsx(gn,{to:"/signup",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream 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:"Create an account"}),f.jsx(gn,{to:"/login",children:f.jsxs("div",{className:"mt-5 flex justify-end items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream text-sm",children:["Sign in ",f.jsx(Bc,{size:"1.1rem",className:"ml-1"})]})})]})})]})})]})]})]})}const c2="/assets/captn-logo-BNDZAGdh.png",d2=({loadingMessage:e="Loading...",bgColor:t="bg-captn-dark-blue",showLogo:r=!0})=>{const[s,o]=Y.useState(0),c=["—","\\","|","/"];return Y.useEffect(()=>{const p=setInterval(()=>{o(v=>(v+1)%c.length)},250);return()=>clearInterval(p)},[c.length]),f.jsx("div",{style:{minHeight:"85px"},className:`flex items-center px-5 group ${t} 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 ${t} `,children:[r&&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:c2,className:"w-full h-full",style:{borderRadius:"50%"}})}),f.jsxs("div",{className:"chat-conversations text-base flex flex-col gap-2",children:[e," ",c[s]]})]})})};function oA(){return f.jsx("div",{className:"server-error-component sticky top-0 z-999 flex w-full justify-center bg-captn-rose-quartz",children:f.jsx(d2,{loadingMessage:"Oops! Something went wrong. Our server is currently unavailable. Please do not refresh your browser. We're trying to reconnect...",showLogo:!1,bgColor:"bg-captn-rose-quartz"})})}const lA={display:"flex",alignItems:"center",justifyContent:"center",padding:"4rem"},cA={display:"flex",alignItems:"center",gap:".5rem",borderRadius:".5rem",padding:"1rem"},dA=()=>f.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-captn-dark-blue",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});function f1(){return f.jsx("div",{style:lA,children:f.jsx("div",{className:"bg-captn-light-cream text-captn-dark-blue",style:cA,children:f.jsx("div",{className:"relative rounded-xl overflow-auto p-8",children:f.jsx("div",{className:"flex items-center justify-center",children:f.jsxs("button",{type:"button",className:"inline-flex items-center px-4 py-2 leading-6 text-sm shadow rounded-md transition ease-in-out duration-150 cursor-not-allowed border border-captn-dark-blue",disabled:!0,children:[f.jsx(dA,{})," Loading..."]})})})})})}const{styled:ds,css:hP}=Zp({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 uA(e){return e==null?void 0:e.replace(/\/$/,"")}const hA=uA("https://backend.captn.ai")||"http://localhost:3001",fA={apiUrl:hA},pA=ds("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),gA=ds(pA,{background:"#bb6e90",color:"#eae4d9"}),u2=({tocChecked:e,handleTocChange:t,marketingEmailsChecked:r,handleMarketingEmailsChange:s,errorMessage:o})=>f.jsxs("div",{className:"toc-marketing-checkbox-wrapper text-captn-light-cream",children:[f.jsx("div",{className:"mt-4",children:f.jsxs("label",{className:"checkbox-container text-sm mb-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.jsx("input",{type:"checkbox",id:"toc",checked:e,onChange:t}),f.jsx("span",{className:"checkmark"})]})}),f.jsx("div",{children:f.jsxs("label",{className:"checkbox-container text-sm mb-2",htmlFor:"marketingEmails",children:["I agree to receiving marketing emails",f.jsx("input",{type:"checkbox",id:"marketingEmails",checked:r,onChange:s}),f.jsx("span",{className:"checkmark"})]})}),o&&f.jsx("div",{className:"text-sm",children:f.jsxs(gA,{style:{border:"1px solid #bb6e90"},children:[o.title,o.description&&": ",o.description]})})]}),mA=ds("div",{marginTop:"1.5rem",marginBottom:"1.5rem"}),xA=ds("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"}}}}),vA=`${fA.apiUrl}/auth/google/login`,h2={title:"To proceed, please ensure you've accepted our Terms & Conditions and Privacy Policy.",description:""},yA=({state:e,socialButtonsDirection:t="horizontal",additionalSignupFields:r,errorMessage:s})=>{const{isLoading:o,setErrorMessage:c,setSuccessMessage:p,setIsLoading:v}=Y.useContext(p1),[C,A]=Y.useState(!1),[E,P]=Y.useState(!1),[I,_]=Y.useState(e);F7(),Y.useEffect(()=>{C&&c(null)},[C]);const H=R=>{A(R.target.checked)},B=R=>{P(R.target.checked)},Z=()=>{localStorage.removeItem("hasAcceptedTos"),localStorage.removeItem("hasSubscribedToMarketingEmails"),localStorage.setItem("hasAcceptedTos",JSON.stringify(C)),localStorage.setItem("hasSubscribedToMarketingEmails",JSON.stringify(E))},W=(R,K)=>{R.preventDefault(),I===On.Login||C?(Z(),window.location.href=K):c(h2)},V=I===On.Login?"Sign in with Google":"Sign up with Google";return f.jsxs(f.Fragment,{children:[I===On.Signup&&f.jsx(u2,{tocChecked:C,handleTocChange:H,marketingEmailsChecked:E,handleMarketingEmailsChange:B,errorMessage:s}),f.jsx(mA,{children:f.jsx(xA,{gap:"large",direction:t,children:f.jsxs("button",{className:"gsi-material-button",onClick:R=>W(R,vA),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:V}),f.jsx("span",{style:{display:"none"},children:V})]})]})})}),f.jsx("div",{className:"flex items-center justify-center",children:f.jsxs("span",{className:"text-sm block",children:[I===On.Login?"Don't have an account? ":"Already have an account? ",f.jsx(gn,{to:I===On.Login?"/signup":"/login",className:"no-underline hover:underline cursor-pointer",children:I===On.Login?"Sign up":"Sign in"})]})})]})};var On=(e=>(e.Login="login",e.Signup="signup",e))(On||{});const bA=ds("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),wA=ds(bA,{background:"$successBackground",color:"$successText"}),kA={height:"6rem"};ds("div",{display:"flex",flexDirection:"column"});const p1=Y.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}}),i0={login:"Sign in to your account",signup:"Create an account"};function CA({state:e,appearance:t,logo:r,socialLayout:s="horizontal",additionalSignupFields:o}){const[c,p]=Y.useState(null),[v,C]=Y.useState(null),[A,E]=Y.useState(!1),P=m7(t??{}),I=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:kA,src:r,alt:"Capt’n.ai"}),f.jsx("p",{className:"mt-7 text-2xl",children:e==="signup"?i0.signup:i0.login})]}),v&&f.jsx(wA,{children:v}),f.jsx(p1.Provider,{value:{isLoading:A,setIsLoading:E,setErrorMessage:p,setSuccessMessage:C},children:(e==="login"||e==="signup")&&f.jsx(yA,{state:e,socialButtonsDirection:I,additionalSignupFields:o,errorMessage:c})})]})}const SA="Before accessing the application, please confirm your agreement to the Terms & Conditions and Privacy Policy.",n0=()=>{const e=Jr();Y.useContext(p1);const[t,r]=Y.useState(null),[s,o]=Y.useState(!1),[c,p]=Y.useState(!1);Y.useEffect(()=>{s&&r(null)},[s]);const v=P=>{o(P.target.checked)},C=P=>{p(P.target.checked)},A=P=>{P.preventDefault(),s?(r(null),eo({isSignUpComplete:!0,hasAcceptedTos:s,...c&&{hasSubscribedToMarketingEmails:c}}),e.push("/chat")):r(h2)},E=Y.useMemo(()=>location.pathname.startsWith("/account"),[location]);return f.jsxs(f.Fragment,{children:[!E&&f.jsx(l2,{}),f.jsx("div",{className:"flex items-center justify-center z-50 p-16 backdrop-blur-sm bg-captn-light-cream/30 mt-16",children:f.jsx("div",{className:"toc-marketing-container bg-captn-dark-blue rounded-lg shadow-lg p-8 m-4 max-w-xl mx-auto",children:f.jsxs("div",{className:"inner-wrapper",children:[f.jsx("h2",{className:"text-xl font-bold mb-4 text-captn-light-cream",children:"Almost there..."}),f.jsx("p",{className:"text-captn-light-cream",children:SA}),f.jsx(u2,{tocChecked:s,handleTocChange:v,marketingEmailsChecked:c,handleMarketingEmailsChange:C,errorMessage:t}),f.jsx("div",{className:"mt-6 text-right",children:f.jsx("button",{onClick:A,className:"mt-4 md:-mt-10 no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream 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:"Save"})})]})})})]})},AA=()=>f.jsx("div",{children:f.jsx("footer",{"aria-labelledby":"footer-heading",className:"relative mt-5 border-t border-gray-900/10",children:f.jsx("div",{className:"flex items-start justify-end mt-10 gap-20 mx-auto max-w-7xl sm:px-6 lg:px-8",children:f.jsx("div",{children:f.jsx("ul",{role:"list",className:"mt-6 space-y-4",children:sA.company.map(e=>f.jsx("li",{children:f.jsx("a",{href:e.href,className:"text-sm leading-6 text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",target:`${e.name==="airt"?"_blank":"_self"}`,children:e.name})},e.name))})})})})}),jA=()=>{document.body.classList.contains("server-error")||document.body.classList.add("server-error")},NA=()=>{document.body.classList.contains("server-error")&&document.body.classList.remove("server-error")};function EA({children:e}){const t=oa(),[r,s]=Y.useState(!1),{data:o,isError:c,isLoading:p}=Or(),v=Y.useMemo(()=>t.pathname!=="/",[t]),C=Y.useMemo(()=>t.pathname.startsWith("/admin"),[t]),A=Y.useMemo(()=>t.pathname.startsWith("/chat"),[t]),E=Y.useMemo(()=>t.pathname.startsWith("/checkout"),[t]),P=Y.useMemo(()=>t.pathname.startsWith("/account"),[t]);return Y.useEffect(()=>{if(o)if(o.isSignUpComplete){s(!1);const I=new Date(o.lastActiveTimestamp),_=new Date;_.getTime()-I.getTime()>5*60*1e3&&eo({lastActiveTimestamp:_})}else if(o.hasAcceptedTos)eo({isSignUpComplete:!0}),s(!1);else{const I=localStorage.getItem("hasAcceptedTos")==="true",_=localStorage.getItem("hasSubscribedToMarketingEmails")==="true";I?(eo({isSignUpComplete:!0,hasAcceptedTos:I,hasSubscribedToMarketingEmails:_}),s(!1)):s(!0)}},[o]),Y.useEffect(()=>{if(t.hash){const I=t.hash.replace("#",""),_=document.getElementById(I);_&&_.scrollIntoView()}},[t]),f.jsx(f.Fragment,{children:f.jsxs("div",{className:"min-h-screen dark:text-captn-light-cream dark:bg-boxdark-2 bg-captn-light-cream text-captn-dark-blue",children:[c&&(jA(),f.jsx(oA,{})),C||A?f.jsx(f.Fragment,{children:r?f.jsx(f.Fragment,{children:f.jsx(n0,{})}):e}):f.jsxs("div",{className:"relative flex flex-col min-h-screen justify-between",children:[v&&f.jsx(l2,{}),f.jsx("div",{className:"mx-auto max-w-7xl sm:px-6 lg:px-8 w-full",children:c?e:p?f.jsx(f1,{}):(NA(),r&&(E||P)?f.jsx(f.Fragment,{children:f.jsx(n0,{})}):e)}),f.jsxs("div",{children:[f.jsx(AA,{}),f.jsx("div",{className:"flex items-center h-20 ",children:f.jsxs("p",{className:"text-center w-full text-sm text-captn-dark-blue opacity-50",children:["© 2024"," ",f.jsx("a",{href:"https://airt.ai",className:"text-sm leading-6 hover:text-captn-light-blue text-captn-dark-blue underline",target:"_blank",children:"airt"}),". All rights reserved."]})})]})]})]})})}const Fr=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Or();return o?r?f.jsx(e,{...t,user:r}):f.jsx(Pd,{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."})},LA="/assets/agent-chat-BGsqR59C.png";function PA(){const[e,t]=Y.useState(!1),{data:r,isLoading:s}=Or(),o=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:c1,alt:"Capt’n.ai"});return Jr(),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(qb,{className:"h-6 w-6","aria-hidden":"true"})]})}),f.jsx("div",{className:"hidden lg:flex lg:gap-x-12",children:Qc.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:[f.jsx(Af,{user:r,renderGoToChat:!1}),s?null:r?f.jsx(u1,{user:r}):f.jsx(gn,{to:"/login",children:f.jsxs("div",{className:"text-sm font-semibold leading-6 ml-2 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:["Sign in ",f.jsx(Bc,{size:"1.1rem",className:"ml-1"})]})})]})})]}),f.jsxs(Hc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Hc.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(Zb,{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:Qc.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(d1,{user:r}):f.jsxs("div",{className:"text-right",children:[f.jsx(gn,{to:"/signup",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream 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:"Create an account"}),f.jsx(gn,{to:"/login",children:f.jsxs("div",{className:"mt-5 flex justify-end items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream text-sm",children:["Sign in ",f.jsx(Bc,{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:f.jsx(Af,{user:r,renderGoToChat:!0})})]}),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:LA,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:iA.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:nA.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))})]})]})]})}function f2({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 p2="/assets/captn-logo-large-Soxu_L3b.png";var g2=(e=>(e.Login="login",e.Signup="signup",e))(g2||{});function TA(){const e=Jr(),{data:t}=Or();return Y.useEffect(()=>{t&&e.push("/")},[t,e]),f.jsx(f2,{children:f.jsx(m2,{logo:p2,state:"login"})})}function m2({appearance:e,logo:t,socialLayout:r,state:s}){return f.jsx(CA,{appearance:e,logo:t,socialLayout:r,state:s})}function RA(){return f.jsx(f2,{children:f.jsx(m2,{logo:p2,state:g2.Signup})})}function MA(){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 _A(){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 fi=Object.create(null);fi.open="0";fi.close="1";fi.ping="2";fi.pong="3";fi.message="4";fi.upgrade="5";fi.noop="6";const Jl=Object.create(null);Object.keys(fi).forEach(e=>{Jl[fi[e]]=e});const jf={type:"error",data:"parser error"},x2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",v2=typeof ArrayBuffer=="function",y2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,g1=({type:e,data:t},r,s)=>x2&&t instanceof Blob?r?s(t):s0(t,s):v2&&(t instanceof ArrayBuffer||y2(t))?r?s(t):s0(new Blob([t]),s):s(fi[e]+(t||"")),s0=(e,t)=>{const r=new FileReader;return r.onload=function(){const s=r.result.split(",")[1];t("b"+(s||""))},r.readAsDataURL(e)};function a0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Xu;function OA(e,t){if(x2&&e.data instanceof Blob)return e.data.arrayBuffer().then(a0).then(t);if(v2&&(e.data instanceof ArrayBuffer||y2(e.data)))return t(a0(e.data));g1(e,!1,r=>{Xu||(Xu=new TextEncoder),t(Xu.encode(r))})}const o0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ba=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},zA=typeof ArrayBuffer=="function",m1=(e,t)=>{if(typeof e!="string")return{type:"message",data:b2(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:FA(e.substring(1),t)}:Jl[r]?e.length>1?{type:Jl[r],data:e.substring(1)}:{type:Jl[r]}:jf},FA=(e,t)=>{if(zA){const r=IA(e);return b2(r,t)}else return{base64:!0,data:e}},b2=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},w2="",DA=(e,t)=>{const r=e.length,s=new Array(r);let o=0;e.forEach((c,p)=>{g1(c,!1,v=>{s[p]=v,++o===r&&t(s.join(w2))})})},HA=(e,t)=>{const r=e.split(w2),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 Yu;function Nl(e){return e.reduce((t,r)=>t+r.length,0)}function El(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(jf);break}o=E*Math.pow(2,32)+A.getUint32(4),s=3}else{if(Nl(r)e){v.enqueue(jf);break}}}})}const k2=4;function Ft(e){if(e)return WA(e)}function WA(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 $A=jr.setTimeout,XA=jr.clearTimeout;function Bd(e,t){t.useNativeTimers?(e.setTimeoutFn=$A.bind(jr),e.clearTimeoutFn=XA.bind(jr)):(e.setTimeoutFn=jr.setTimeout.bind(jr),e.clearTimeoutFn=jr.clearTimeout.bind(jr))}const YA=1.33;function UA(e){return typeof e=="string"?GA(e):Math.ceil((e.byteLength||e.size)*YA)}function GA(e){let t=0,r=0;for(let s=0,o=e.length;s=57344?r+=3:(s++,r+=4);return r}function ZA(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function qA(e){let t={},r=e.split("&");for(let s=0,o=r.length;s0);return t}function A2(){const e=d0(+new Date);return e!==c0?(l0=0,c0=e):e+"."+d0(l0++)}for(;Ll{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)};HA(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,DA(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]=A2()),!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 li(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 li extends Ft{constructor(t,r){super(),Bd(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=C2(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const s=this.xhr=new N2(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=li.requestsCount++,li.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=ej,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete li.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()}}li.requestsCount=0;li.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",u0);else if(typeof addEventListener=="function"){const e="onpagehide"in jr?"pagehide":"unload";addEventListener(e,u0,!1)}}function u0(){for(let e in li.requests)li.requests.hasOwnProperty(e)&&li.requests[e].abort()}const v1=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),Pl=jr.WebSocket||jr.MozWebSocket,h0=!0,ij="arraybuffer",f0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class nj extends x1{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=f0?{}:C2(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=h0&&!f0?r?new Pl(t,r):new Pl(t):new Pl(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{h0&&this.ws.send(c)}catch{}o&&v1(()=>{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]=A2()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!Pl}}class sj extends x1{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=VA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(r).getReader(),o=BA();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&&v1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const aj={websocket:nj,webtransport:sj,polling:rj},oj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,lj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ef(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=oj.exec(e||""),c={},p=14;for(;p--;)c[lj[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=cj(c,c.path),c.queryKey=dj(c,c.query),c}function cj(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 dj(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,c){o&&(r[o]=c)}),r}let E2=class bs extends Ft{constructor(t,r={}){super(),this.binaryType=ij,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=Ef(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=Ef(r.host).host),Bd(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=qA(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=k2,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 aj[t](s)}open(){let t;if(this.opts.rememberUpgrade&&bs.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;bs.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;bs.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 I=new Error("probe error");I.transport=r.name,this.emitReserved("upgradeError",I)}}))};function c(){s||(s=!0,E(),r.close(),r=null)}const p=P=>{const I=new Error("probe error: "+P);I.transport=r.name,c(),this.emitReserved("upgradeError",I)};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",bs.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){bs.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,L2=Object.prototype.toString,gj=typeof Blob=="function"||typeof Blob<"u"&&L2.call(Blob)==="[object BlobConstructor]",mj=typeof File=="function"||typeof File<"u"&&L2.call(File)==="[object FileConstructor]";function y1(e){return fj&&(e instanceof ArrayBuffer||pj(e))||gj&&e instanceof Blob||mj&&e instanceof File}function ec(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}fa.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};fa.prototype.reset=function(){this.attempts=0};fa.prototype.setMin=function(e){this.ms=e};fa.prototype.setMax=function(e){this.max=e};fa.prototype.setJitter=function(e){this.jitter=e};class Tf 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,Bd(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 fa({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||Cj;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 E2(this.uri,this.opts);const r=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=Br(r,"open",function(){s.onopen(),t&&t()}),c=v=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",v),t?t(v):this.maybeReconnectOnOpen()},p=Br(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(Br(t,"ping",this.onping.bind(this)),Br(t,"data",this.ondata.bind(this)),Br(t,"error",this.onerror.bind(this)),Br(t,"close",this.onclose.bind(this)),Br(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){v1(()=>{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 P2(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 Pa={};function tc(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=uj(e,t.path||"/socket.io"),s=r.source,o=r.id,c=r.path,p=Pa[o]&&c in Pa[o].nsps,v=t.forceNew||t["force new connection"]||t.multiplex===!1||p;let C;return v?C=new Tf(s,t):(Pa[o]||(Pa[o]=new Tf(s,t)),C=Pa[o]),r.query&&!t.query&&(t.query=r.queryKey),C.socket(r.path,t)}Object.assign(tc,{Manager:Tf,Socket:P2,io:tc,connect:tc});const Wr=tc(Oy.apiUrl,{autoConnect:!0});function w1(){Wr.auth={sessionId:nb()},Wr.connected&&(Wr.disconnect(),Wr.connect())}w1();is.on("sessionId.set",w1);is.on("sessionId.clear",w1);const k1=Y.createContext({socket:Wr,isConnected:!1});function jj({children:e}){const[t,r]=Y.useState(Wr.connected);return Y.useEffect(()=>{function s(){r(!0)}function o(){r(!1)}return Wr.on("connect",s),Wr.on("disconnect",o),()=>{Wr.off("connect",s),Wr.off("disconnect",o)}},[]),f.jsx(k1.Provider,{value:{socket:Wr,isConnected:t},children:e})}function Nj(){return Y.useContext(k1)}function Kc(e,t){const{socket:r}=Y.useContext(k1);Y.useEffect(()=>(r.on(e,t),()=>{r.off(e,t)}),[e,t])}const T2=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(u1,{user:e.user})})]})}),R2="/assets/logo-for-dark-bg-B0Sa7V_h.png";function Ej(e){return cs({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 Lj=({chatId:e,chatName:t,onValueChange:r})=>{const[s,o]=Y.useState(!1),[c,p]=Y.useState(t),v=Y.useRef(null);Y.useEffect(()=>{var I;s&&((I=v.current)==null||I.focus())},[s]),Y.useEffect(()=>{p(t)},[t]);const C=I=>{I.preventDefault(),o(!0)},A=I=>{p(I.target.value)},E=I=>{I.preventDefault(),r(e,c),o(!1)},P=()=>{r(e,c),o(!1)};return f.jsxs("div",{className:"editable-chat-name",style:{width:"195px"},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-sm",onClick:C,"data-testid":"edit-button",children:f.jsx(Ej,{})})]})},Pj="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 Tj(e){return e.map(r=>({role:r.role,content:r.message}))}async function Rj(e,t,r){t&&r(),await di({id:e,data:{smartSuggestions:{suggestions:[""],type:""},userRespondedWithNextAction:t}})}async function Mj(e,t,r){let s;r?s=await ek(e):s=await rk({chatId:e,userQuery:t,role:"user"});const o=Tj(s);return await di({id:e,data:{showLoader:!0}}),o}async function _j(e,t,r){return await ik({chatId:e,userQuery:r?"":t,role:"assistant",isLoading:!0})}const Oj=async(e,t,r,s,o,c)=>{const p=t.chatType==="daily_analysis"?`default_team_${t.userId}_${t.id}`:t.team_name;e.emit("sendMessageToTeam",t,r.id,s,o,p),await di({id:c,data:{showLoader:!1,team_status:"inprogress"}})},Ij=async(e,t,r,s,o,c)=>{const p=await nk({chatId:e,messages:o});await zj(p,t,r,s,o,e,c)},zj=async(e,t,r,s,o,c,p)=>{e.customer_brief&&s.emit("sendMessageToTeam",t,r.id,e.customer_brief,o,e.team_name),e.content&&!e.is_exception_occured&&(s.emit("checkSmartSuggestionStatus",c),await di({id:c,data:{streamAgentResponse:!0,showLoader:!1,smartSuggestions:e.smart_suggestions}})),e.content&&await Eb({id:r.id,data:{isLoading:!1,message:e.content}});const v=t.isChatNameUpdated?null:e.conversation_name?e.conversation_name:null;await di({id:c,data:{showLoader:!1,team_id:e.team_id,team_name:e.team_name,team_status:e.team_status,smartSuggestions:e.smart_suggestions,isExceptionOccured:e.is_exception_occured||!1,customerBrief:e.customer_brief,...v&&{name:v,isChatNameUpdated:!0}}}),v&&p()},Fj=async(e,t,r,s)=>{await di({id:t,data:{showLoader:!1}}),console.log("Error: "+e.message),e.message==="No Subscription Found"?s.push("/pricing"):(await Eb({id:r.id,data:{isLoading:!1,message:Pj}}),await di({id:t,data:{showLoader:!1,smartSuggestions:{suggestions:["Let's try again"],type:"oneOf"},isExceptionOccured:!0}}))},Dj=e=>e.chatType!=="daily_analysis"||e.shouldShowChat,Hj=({sidebarOpen:e,setSidebarOpen:t,refetchAllChatDetails:r})=>{const s=Jr(),o=oa(),{pathname:c}=o,p=c.split("/").pop(),v=Y.useRef(null),C=Y.useRef(null),A=localStorage.getItem("sidebar-expanded"),[E,P]=Y.useState(A===null?!1:A==="true"),I=async(W,V)=>{try{await di({id:W,data:{name:V,isChatNameUpdated:!0}})}catch{console.log("Unable to update the chat name. Please try again later.")}},{data:_,isLoading:H,refetch:B}=Zn(lk);Y.useEffect(()=>{B()},[r]),Y.useEffect(()=>{const W=({target:V})=>{!C.current||!v.current||!e||C.current.contains(V)||v.current.contains(V)||t(!1)};return document.addEventListener("click",W),()=>document.removeEventListener("click",W)}),Y.useEffect(()=>{const W=({keyCode:V})=>{!e||V!==27||t(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)}),Y.useEffect(()=>{var W,V;localStorage.setItem("sidebar-expanded",E.toString()),E?(W=document.querySelector("body"))==null||W.classList.add("sidebar-expanded"):(V=document.querySelector("body"))==null||V.classList.remove("sidebar-expanded")},[E]);const Z=async W=>{try{const V=await K9();s.push(`/chat/${V.uuid}`)}catch(V){console.log("Error: "+V.message),V.message==="No Subscription Found"?s.push("/pricing"):window.alert("Error: Something went wrong. Please try again later.")}};return f.jsxs("aside",{ref:C,className:`border-r-2 absolute left-0 top-0 z-9999 flex h-screen w-75 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(ar,{to:"/",children:f.jsx("img",{src:R2,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:v,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:Z,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:_&&_.map((W,V)=>Dj(W)&&f.jsxs(ar,{to:`/chat/${W.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 ${c==="/"&&"bg-gray-700 dark:bg-meta-4"} ${W.uuid===p?"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",{children:f.jsx(Lj,{chatId:W.id,chatName:W.name?W.name:"",onValueChange:I})})]},W.id))})})]})})})]})};function Rf(){return Rf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[o]=e[o]);return r}var Vj=Y.useLayoutEffect,Wj=function(t){var r=Y.useRef(t);return Vj(function(){r.current=t}),r},g0=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},$j=function(t,r){var s=Y.useRef();return Y.useCallback(function(o){t.current=o,s.current&&g0(s.current,null),s.current=r,r&&g0(r,o)},[r])},m0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Xj=function(t){Object.keys(m0).forEach(function(r){t.style.setProperty(r,m0[r],"important")})},x0=Xj,Qt=null,v0=function(t,r){var s=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?s+r.borderSize:s-r.paddingSize};function Yj(e,t,r,s){r===void 0&&(r=1),s===void 0&&(s=1/0),Qt||(Qt=document.createElement("textarea"),Qt.setAttribute("tabindex","-1"),Qt.setAttribute("aria-hidden","true"),x0(Qt)),Qt.parentNode===null&&document.body.appendChild(Qt);var o=e.paddingSize,c=e.borderSize,p=e.sizingStyle,v=p.boxSizing;Object.keys(p).forEach(function(I){var _=I;Qt.style[_]=p[_]}),x0(Qt),Qt.value=t;var C=v0(Qt,e);Qt.value=t,C=v0(Qt,e),Qt.value="x";var A=Qt.scrollHeight-o,E=A*r;v==="border-box"&&(E=E+o+c),C=Math.max(E,C);var P=A*s;return v==="border-box"&&(P=P+o+c),C=Math.min(P,C),[C,A]}var y0=function(){},Uj=function(t,r){return t.reduce(function(s,o){return s[o]=r[o],s},{})},Gj=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Zj=!!document.documentElement.currentStyle,qj=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var s=Uj(Gj,r),o=s.boxSizing;if(o==="")return null;Zj&&o==="border-box"&&(s.width=parseFloat(s.width)+parseFloat(s.borderRightWidth)+parseFloat(s.borderLeftWidth)+parseFloat(s.paddingRight)+parseFloat(s.paddingLeft)+"px");var c=parseFloat(s.paddingBottom)+parseFloat(s.paddingTop),p=parseFloat(s.borderBottomWidth)+parseFloat(s.borderTopWidth);return{sizingStyle:s,paddingSize:c,borderSize:p}},Qj=qj;function M2(e,t,r){var s=Wj(r);Y.useLayoutEffect(function(){var o=function(p){return s.current(p)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var Kj=function(t){M2(window,"resize",t)},Jj=function(t){M2(document.fonts,"loadingdone",t)},eN=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],tN=function(t,r){var s=t.cacheMeasurements,o=t.maxRows,c=t.minRows,p=t.onChange,v=p===void 0?y0:p,C=t.onHeightChange,A=C===void 0?y0:C,E=Bj(t,eN),P=E.value!==void 0,I=Y.useRef(null),_=$j(I,r),H=Y.useRef(0),B=Y.useRef(),Z=function(){var R=I.current,K=s&&B.current?B.current:Qj(R);if(K){B.current=K;var ee=Yj(K,R.value||R.placeholder||"x",c,o),X=ee[0],Q=ee[1];H.current!==X&&(H.current=X,R.style.setProperty("height",X+"px","important"),A(X,{rowHeight:Q}))}},W=function(R){P||Z(),v(R)};return Y.useLayoutEffect(Z),Kj(Z),Jj(Z),Y.createElement("textarea",Rf({},E,{onChange:W,ref:_}))},rN=Y.forwardRef(tN);function iN({handleFormSubmit:e,currentChatDetails:t,triggerChatFormSubmitMsg:r}){const[s,o]=Y.useState(""),c=Y.useCallback(async v=>{v!==null&&r&&await e(r,!0)},[r]),p=async v=>{v.preventDefault(),t.showLoader||(o(""),e(s))};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(rN,{minRows:1,maxRows:4,style:{lineHeight:2,resize:"none"},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),onKeyDown:v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),p(v))}}),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 nN=({children:e,handleFormSubmit:t,currentChatDetails:r,triggerChatFormSubmitMsg:s,refetchAllChatDetails:o})=>{const[c,p]=Y.useState(!1),{data:v}=Or(),C=Y.useRef(null),A=Jr();Y.useEffect(()=>{v?!v.hasPaid&&v.isSignUpComplete&&A.push("/pricing"):A.push("/login")},[v,A]),Y.useEffect(()=>{const P=new MutationObserver(()=>{C.current&&C.current.scrollTo({top:C.current.scrollHeight,behavior:"smooth"})});return C.current&&P.observe(C.current,{childList:!0,subtree:!0}),()=>P.disconnect()},[]);const E=document.body.classList.contains("server-error")?"h-[calc(100vh-85px)]":"h-screen";return f.jsx("div",{className:"dark:bg-boxdark-2 dark:text-bodydark bg-captn-light-blue",children:f.jsxs("div",{className:`flex ${E} overflow-hidden`,children:[f.jsx(Hj,{sidebarOpen:c,setSidebarOpen:p,refetchAllChatDetails:o}),f.jsxs("div",{className:"relative flex flex-1 flex-col overflow-y-auto overflow-x-hidden",children:[f.jsx(T2,{sidebarOpen:c,setSidebarOpen:p,user:v}),f.jsx("main",{className:"flex-auto overflow-y-auto",ref:C,children:f.jsx("div",{children:e})}),r?f.jsx(iN,{handleFormSubmit:t,currentChatDetails:r,triggerChatFormSubmitMsg:s}):f.jsx(f.Fragment,{})]})]})})};function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),w0={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},aN=["style","script"],oN=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,lN=/mailto:/i,cN=/\n{2,}$/,_2=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,dN=/^ *> ?/gm,uN=/^ {2,}\n/,hN=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,O2=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,I2=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,fN=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,pN=/^(?:\n *)*\n/,gN=/\r\n?/g,mN=/^\[\^([^\]]+)](:.*)\n/,xN=/^\[\^([^\]]+)]/,vN=/\f/g,yN=/^\s*?\[(x|\s)\]/,z2=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,F2=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,D2=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Mf=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,bN=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,H2=/^)/,wN=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,_f=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,kN=/^\{.*\}$/,CN=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,SN=/^<([^ >]+@[^ >]+)>/,AN=/^<([^ >]+:\/[^ >]+)>/,jN=/-([a-z])?/gi,B2=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,NN=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,EN=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,LN=/^\[([^\]]*)\] ?\[([^\]]*)\]/,PN=/(\[|\])/g,TN=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,RN=/\t/g,MN=/^ *\| */,_N=/(^ *\||\| *$)/g,ON=/ *$/,IN=/^ *:-+: *$/,zN=/^ *:-+ *$/,FN=/^ *-+: *$/,DN=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,HN=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,BN=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,VN=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,WN=/^\\([^0-9A-Za-z\s])/,$N=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,XN=/^\n+/,YN=/^([ \t]*)/,UN=/\\([^\\])/g,k0=/ *\n+$/,GN=/(?:^|\n)( *)$/,C1="(?:\\d+\\.)",S1="(?:[*+-])";function V2(e){return"( *)("+(e===1?C1:S1)+") +"}const W2=V2(1),$2=V2(2);function X2(e){return new RegExp("^"+(e===1?W2:$2))}const ZN=X2(1),qN=X2(2);function Y2(e){return new RegExp("^"+(e===1?W2:$2)+"[^\\n]*(?:\\n(?!\\1"+(e===1?C1:S1)+" )[^\\n]*)*(\\n|$)","gm")}const U2=Y2(1),G2=Y2(2);function Z2(e){const t=e===1?C1:S1;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const q2=Z2(1),Q2=Z2(2);function C0(e,t){const r=t===1,s=r?q2:Q2,o=r?U2:G2,c=r?ZN:qN;return{t(p,v,C){const A=GN.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(cN,` +`));let I=Pk((o=E.props)==null?void 0:o.className,C.className),_=I?{className:I}:{};return Y.cloneElement(E,Object.assign({},Ob(E.props,Km(Bu(C,["ref"]))),P,A,Rk(E.ref,A.ref),_))}return Y.createElement(c,Object.assign({},Bu(C,["ref"]),c!==Y.Fragment&&A,c!==Y.Fragment&&P),E)}function Rk(...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 Ob(...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 mi(e){var t;return Object.assign(Y.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Km(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Bu(e,t=[]){let r=Object.assign({},e);for(let s of t)s in r&&delete r[s];return r}function Mk(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&&_k(r)?!1:s}function _k(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Ok="div";var Dc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Dc||{});function Ik(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 gi({ourProps:o,theirProps:s,slot:{},defaultTag:Ok,name:"Hidden"})}let xf=mi(Ik),Ib=Y.createContext(null);Ib.displayName="OpenClosedContext";var Da=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Da||{});function zk(){return Y.useContext(Ib)}var zb=(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))(zb||{});function o1(e,t){let r=Y.useRef([]),s=Er(e);Y.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 Fk(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Dk(e,t,r){let s=zd(t);Y.useEffect(()=>{function o(c){s.current(c)}return window.addEventListener(e,o,r),()=>window.removeEventListener(e,o,r)},[e,r])}var Ha=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ha||{});function Hk(){let e=Y.useRef(0);return Dk("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Fb(){let e=Y.useRef(!1);return Ln(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Dd(...e){return Y.useMemo(()=>Tb(...e),[...e])}function Db(e,t,r,s){let o=zd(r);Y.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 Hb(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 Bk="div";var Bb=(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))(Bb||{});function Vk(e,t){let r=Y.useRef(null),s=Di(r,t),{initialFocus:o,containers:c,features:p=30,...v}=e;Fd()||(p=1);let C=Dd(r);Xk({ownerDocument:C},!!(p&16));let A=Yk({ownerDocument:C,container:r,initialFocus:o},!!(p&2));Uk({ownerDocument:C,container:r,containers:c,previousActiveElement:A},!!(p&8));let E=Hk(),P=Er(B=>{let Z=r.current;Z&&(W=>W())(()=>{wn(E.current,{[Ha.Forwards]:()=>{Kl(Z,zn.First,{skipElements:[B.relatedTarget]})},[Ha.Backwards]:()=>{Kl(Z,zn.Last,{skipElements:[B.relatedTarget]})}})})}),I=wk(),_=Y.useRef(!1),H={ref:s,onKeyDown(B){B.key=="Tab"&&(_.current=!0,I.requestAnimationFrame(()=>{_.current=!1}))},onBlur(B){let Z=Hb(c);r.current instanceof HTMLElement&&Z.add(r.current);let W=B.relatedTarget;W instanceof HTMLElement&&W.dataset.headlessuiFocusGuard!=="true"&&(Vb(Z,W)||(_.current?Kl(r.current,wn(E.current,{[Ha.Forwards]:()=>zn.Next,[Ha.Backwards]:()=>zn.Previous})|zn.WrapAround,{relativeTo:B.target}):B.target instanceof HTMLElement&&qn(B.target)))}};return ge.createElement(ge.Fragment,null,!!(p&4)&&ge.createElement(xf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:Dc.Focusable}),gi({ourProps:H,theirProps:v,defaultTag:Bk,name:"FocusTrap"}),!!(p&4)&&ge.createElement(xf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:Dc.Focusable}))}let Wk=mi(Vk),Ea=Object.assign(Wk,{features:Bb}),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 $k(e=!0){let t=Y.useRef(Ki.slice());return o1(([r],[s])=>{s===!0&&r===!1&&Zo(()=>{t.current.splice(0)}),s===!1&&r===!0&&(t.current=Ki.slice())},[e,Ki,t]),Er(()=>{var r;return(r=t.current.find(s=>s!=null&&s.isConnected))!=null?r:null})}function Xk({ownerDocument:e},t){let r=$k(t);o1(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&qn(r())},[t]);let s=Y.useRef(!1);Y.useEffect(()=>(s.current=!1,()=>{s.current=!0,Zo(()=>{s.current&&qn(r())})}),[])}function Yk({ownerDocument:e,container:t,initialFocus:r},s){let o=Y.useRef(null),c=Fb();return o1(()=>{if(!s)return;let p=t.current;p&&Zo(()=>{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?qn(r.current):Kl(p,zn.First)===Rb.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[s]),o}function Uk({ownerDocument:e,container:t,containers:r,previousActiveElement:s},o){let c=Fb();Db(e==null?void 0:e.defaultView,"focus",p=>{if(!o||!c.current)return;let v=Hb(r);t.current instanceof HTMLElement&&v.add(t.current);let C=s.current;if(!C)return;let A=p.target;A&&A instanceof HTMLElement?Vb(v,A)?(s.current=A,qn(A)):(p.preventDefault(),p.stopPropagation(),qn(C)):qn(s.current)},!0)}function Vb(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let Wb=Y.createContext(!1);function Gk(){return Y.useContext(Wb)}function vf(e){return ge.createElement(Wb.Provider,{value:e.force},e.children)}function Zk(e){let t=Gk(),r=Y.useContext($b),s=Dd(e),[o,c]=Y.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 Y.useEffect(()=>{o!==null&&(s!=null&&s.body.contains(o)||s==null||s.body.appendChild(o))},[o,s]),Y.useEffect(()=>{t||r!==null&&c(r.current)},[r,c,t]),o}let qk=Y.Fragment;function Qk(e,t){let r=e,s=Y.useRef(null),o=Di(Lk(E=>{s.current=E}),t),c=Dd(s),p=Zk(s),[v]=Y.useState(()=>{var E;return Li.isServer?null:(E=c==null?void 0:c.createElement("div"))!=null?E:null}),C=Fd(),A=Y.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,Zo(()=>{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:Yv.createPortal(gi({ourProps:{ref:o},theirProps:r,defaultTag:qk,name:"Portal"}),v):null}let Kk=Y.Fragment,$b=Y.createContext(null);function Jk(e,t){let{target:r,...s}=e,o={ref:Di(t)};return ge.createElement($b.Provider,{value:r},gi({ourProps:o,theirProps:s,defaultTag:Kk,name:"Popover.Group"}))}let eC=mi(Qk),tC=mi(Jk),yf=Object.assign(eC,{Group:tC}),Xb=Y.createContext(null);function Yb(){let e=Y.useContext(Xb);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,Yb),t}return e}function rC(){let[e,t]=Y.useState([]);return[e.length>0?e.join(" "):void 0,Y.useMemo(()=>function(r){let s=Er(c=>(t(p=>[...p,c]),()=>t(p=>{let v=p.slice(),C=v.indexOf(c);return C!==-1&&v.splice(C,1),v}))),o=Y.useMemo(()=>({register:s,slot:r.slot,name:r.name,props:r.props}),[s,r.slot,r.name,r.props]);return ge.createElement(Xb.Provider,{value:o},r.children)},[t])]}let iC="p";function nC(e,t){let r=ha(),{id:s=`headlessui-description-${r}`,...o}=e,c=Yb(),p=Di(t);Ln(()=>c.register(s),[s,c.register]);let v={ref:p,...c.props,id:s};return gi({ourProps:v,theirProps:o,slot:c.slot||{},defaultTag:iC,name:c.name||"Description"})}let sC=mi(nC),aC=Object.assign(sC,{}),l1=Y.createContext(()=>{});l1.displayName="StackContext";var bf=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(bf||{});function oC(){return Y.useContext(l1)}function lC({children:e,onUpdate:t,type:r,element:s,enabled:o}){let c=oC(),p=Er((...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(l1.Provider,{value:p},e)}function cC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const dC=typeof Object.is=="function"?Object.is:cC,{useState:uC,useEffect:hC,useLayoutEffect:fC,useDebugValue:pC}=Ku;function gC(e,t,r){const s=t(),[{inst:o},c]=uC({inst:{value:s,getSnapshot:t}});return fC(()=>{o.value=s,o.getSnapshot=t,Vu(o)&&c({inst:o})},[e,s,t]),hC(()=>(Vu(o)&&c({inst:o}),e(()=>{Vu(o)&&c({inst:o})})),[e]),pC(s),s}function Vu(e){const t=e.getSnapshot,r=e.value;try{const s=t();return!dC(r,s)}catch{return!0}}function mC(e,t,r){return t()}const xC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vC=!xC,yC=vC?mC:gC,bC="useSyncExternalStore"in Ku?(e=>e.useSyncExternalStore)(Ku):yC;function wC(e){return bC(e.subscribe,e.getSnapshot,e.getSnapshot)}function kC(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 CC(){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 SC(){if(!Fk())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 AC(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function jC(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Wn=kC(()=>new Map,{PUSH(e,t){var r;let s=(r=this.get(e))!=null?r:{doc:e,count:0,d:a1(),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:jC(r)},o=[SC(),CC(),AC()];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)}});Wn.subscribe(()=>{let e=Wn.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)&&Wn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Wn.dispatch("TEARDOWN",r)}});function NC(e,t,r){let s=wC(Wn),o=e?s.get(e):void 0,c=o?o.count>0:!1;return Ln(()=>{if(!(!e||!t))return Wn.dispatch("PUSH",e,r),()=>Wn.dispatch("POP",e,r)},[t,e]),c}let Wu=new Map,La=new Map;function Jm(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=La.get(s))!=null?p:1;if(v===1?La.delete(s):La.set(s,v-1),v!==1)return;let C=Wu.get(s);C&&(C["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",C["aria-hidden"]),s.inert=C.inert,Wu.delete(s))}let c=(r=La.get(s))!=null?r:0;return La.set(s,c+1),c!==0||(Wu.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),o},[e,t])}var EC=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(EC||{}),LC=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(LC||{});let PC={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Hc=Y.createContext(null);Hc.displayName="DialogContext";function qo(e){let t=Y.useContext(Hc);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,qo),r}return t}function TC(e,t,r=()=>[document.body]){NC(e,t,s=>{var o;return{containers:[...(o=s.containers)!=null?o:[],r]}})}function RC(e,t){return wn(t.type,PC,e,t)}let MC="div",_C=mf.RenderStrategy|mf.Static;function OC(e,t){let r=ha(),{id:s=`headlessui-dialog-${r}`,open:o,onClose:c,initialFocus:p,__demoMode:v=!1,...C}=e,[A,E]=Y.useState(0),P=zk();o===void 0&&P!==null&&(o=(P&Da.Open)===Da.Open);let I=Y.useRef(null),_=Di(I,t),H=Y.useRef(null),B=Dd(I),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,[R,K]=Y.useReducer(RC,{titleId:null,descriptionId:null,panelRef:Y.createRef()}),ee=Er(()=>c(!1)),X=Er(He=>K({type:0,id:He})),Q=Fd()?v?!1:V===0:!1,J=A>1,fe=Y.useContext(Hc)!==null,le=J?"parent":"leaf",Ne=P!==null?(P&Da.Closing)===Da.Closing:!1,ve=fe||Ne?!1:Q,Le=Y.useCallback(()=>{var He,Be;return(Be=Array.from((He=B==null?void 0:B.querySelectorAll("body > *"))!=null?He:[]).find(_e=>_e.id==="headlessui-portal-root"?!1:_e.contains(H.current)&&_e instanceof HTMLElement))!=null?Be:null},[H]);Jm(Le,ve);let Fe=J?!0:Q,Re=Y.useCallback(()=>{var He,Be;return(Be=Array.from((He=B==null?void 0:B.querySelectorAll("[data-headlessui-portal]"))!=null?He:[]).find(_e=>_e.contains(H.current)&&_e instanceof HTMLElement))!=null?Be:null},[H]);Jm(Re,Fe);let qe=Er(()=>{var He,Be;return[...Array.from((He=B==null?void 0:B.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))!=null?He:[]).filter(_e=>!(_e===document.body||_e===document.head||!(_e instanceof HTMLElement)||_e.contains(H.current)||R.panelRef.current&&_e.contains(R.panelRef.current))),(Be=R.panelRef.current)!=null?Be:I.current]});Ek(()=>qe(),ee,!(!Q||J));let de=!(J||V!==0);Db(B==null?void 0:B.defaultView,"keydown",He=>{de&&(He.defaultPrevented||He.key===zb.Escape&&(He.preventDefault(),He.stopPropagation(),ee()))}),TC(B,!(Ne||V!==0||fe),qe),Y.useEffect(()=>{if(V!==0||!I.current)return;let He=new ResizeObserver(Be=>{for(let _e of Be){let Nt=_e.target.getBoundingClientRect();Nt.x===0&&Nt.y===0&&Nt.width===0&&Nt.height===0&&ee()}});return He.observe(I.current),()=>He.disconnect()},[V,I,ee]);let[oe,Ae]=rC(),je=Y.useMemo(()=>[{dialogState:V,close:ee,setTitleId:X},R],[V,R,ee,X]),ze=Y.useMemo(()=>({open:V===0}),[V]),Ue={ref:_,id:s,role:"dialog","aria-modal":V===0?!0:void 0,"aria-labelledby":R.titleId,"aria-describedby":oe};return ge.createElement(lC,{type:"Dialog",enabled:V===0,element:I,onUpdate:Er((He,Be)=>{Be==="Dialog"&&wn(He,{[bf.Add]:()=>E(_e=>_e+1),[bf.Remove]:()=>E(_e=>_e-1)})})},ge.createElement(vf,{force:!0},ge.createElement(yf,null,ge.createElement(Hc.Provider,{value:je},ge.createElement(yf.Group,{target:I},ge.createElement(vf,{force:!1},ge.createElement(Ae,{slot:ze,name:"Dialog.Description"},ge.createElement(Ea,{initialFocus:p,containers:qe,features:Q?wn(le,{parent:Ea.features.RestoreFocus,leaf:Ea.features.All&~Ea.features.FocusLock}):Ea.features.None},gi({ourProps:Ue,theirProps:C,slot:ze,defaultTag:MC,features:_C,visible:V===0,name:"Dialog"})))))))),ge.createElement(xf,{features:Dc.Hidden,ref:H}))}let IC="div";function zC(e,t){let r=ha(),{id:s=`headlessui-dialog-overlay-${r}`,...o}=e,[{dialogState:c,close:p}]=qo("Dialog.Overlay"),v=Di(t),C=Er(E=>{if(E.target===E.currentTarget){if(Mk(E.currentTarget))return E.preventDefault();E.preventDefault(),E.stopPropagation(),p()}}),A=Y.useMemo(()=>({open:c===0}),[c]);return gi({ourProps:{ref:v,id:s,"aria-hidden":!0,onClick:C},theirProps:o,slot:A,defaultTag:IC,name:"Dialog.Overlay"})}let FC="div";function DC(e,t){let r=ha(),{id:s=`headlessui-dialog-backdrop-${r}`,...o}=e,[{dialogState:c},p]=qo("Dialog.Backdrop"),v=Di(t);Y.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[p.panelRef]);let C=Y.useMemo(()=>({open:c===0}),[c]);return ge.createElement(vf,{force:!0},ge.createElement(yf,null,gi({ourProps:{ref:v,id:s,"aria-hidden":!0},theirProps:o,slot:C,defaultTag:FC,name:"Dialog.Backdrop"})))}let HC="div";function BC(e,t){let r=ha(),{id:s=`headlessui-dialog-panel-${r}`,...o}=e,[{dialogState:c},p]=qo("Dialog.Panel"),v=Di(t,p.panelRef),C=Y.useMemo(()=>({open:c===0}),[c]),A=Er(E=>{E.stopPropagation()});return gi({ourProps:{ref:v,id:s,onClick:A},theirProps:o,slot:C,defaultTag:HC,name:"Dialog.Panel"})}let VC="h2";function WC(e,t){let r=ha(),{id:s=`headlessui-dialog-title-${r}`,...o}=e,[{dialogState:c,setTitleId:p}]=qo("Dialog.Title"),v=Di(t);Y.useEffect(()=>(p(s),()=>p(null)),[s,p]);let C=Y.useMemo(()=>({open:c===0}),[c]);return gi({ourProps:{ref:v,id:s},theirProps:o,slot:C,defaultTag:VC,name:"Dialog.Title"})}let $C=mi(OC),XC=mi(DC),YC=mi(BC),UC=mi(zC),GC=mi(WC),Bc=Object.assign($C,{Backdrop:XC,Panel:YC,Overlay:UC,Title:GC,Description:aC});var Ub={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},e0=ge.createContext&&ge.createContext(Ub),mn=function(){return mn=Object.assign||function(e){for(var t,r=1,s=arguments.length;r{const r=window.location.pathname,s=()=>{t&&t(!1)},c=Y.useMemo(()=>location.pathname.startsWith("/chat"),[location])?"text-captn-light-cream":"text-captn-dark-blue";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(gn,{to:"/account",onClick:s,className:`${c} no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out lg: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(gn,{to:"/admin",onClick:s,className:`${c} no-underline flex items-center gap-3.5 text-sm font-medium duration-300 ease-in-out lg:text-captn-light-cream hover:text-captn-light-blue`,children:[f.jsx(JC,{size:"1.1rem"}),"Admin dashboard"]})})}),f.jsxs("button",{onClick:()=>Pb(),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:""})]}),"Sign out"]})]})},u1=({user:e})=>{const[t,r]=Y.useState(!1),s=Y.useRef(null),o=Y.useRef(null),c=()=>r(p=>!p);return Y.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)}),Y.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(KC,{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(d1,{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 wf;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(wf||(wf={}));const ye=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 ye.undefined;case"string":return ye.string;case"number":return isNaN(e)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(e)?ye.array:e===null?ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ye.promise:typeof Map<"u"&&e instanceof Map?ye.map:typeof Set<"u"&&e instanceof Set?ye.set:typeof Date<"u"&&e instanceof Date?ye.date:ye.object;default:return ye.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"]),eS=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Zr 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()}}Zr.create=e=>new Zr(e);const Ao=(e,t)=>{let r;switch(e.code){case he.invalid_type:e.received===ye.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 Qb=Ao;function tS(e){Qb=e}function Wc(){return Qb}const $c=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}},rS=[];function ke(e,t){const r=$c({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Wc(),Ao].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"}),Kb=e=>({status:"dirty",value:e}),ir=e=>({status:"valid",value:e}),kf=e=>e.status==="aborted",Cf=e=>e.status==="dirty",jo=e=>e.status==="valid",Xc=e=>typeof Promise<"u"&&e instanceof Promise;var Me;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Me||(Me={}));class ui{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 t0=(e,t)=>{if(jo(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 Zr(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(Xc(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 t0(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(Xc(o)?o:Promise.resolve(o));return t0(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 Kr({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 as.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qr.create(this,this._def)}promise(){return ra.create(this,this._def)}or(t){return Po.create([this,t],this._def)}and(t){return To.create(this,t,this._def)}transform(t){return new Kr({...$e(this._def),schema:this,typeName:Ie.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Io({...$e(this._def),innerType:this,defaultValue:r,typeName:Ie.ZodDefault})}brand(){return new e2({typeName:Ie.ZodBranded,type:this,...$e(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Zc({...$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 Qo.create(this,t)}readonly(){return Qc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const iS=/^c[^\s-]{8,}$/i,nS=/^[a-z][a-z0-9]*$/,sS=/^[0-9A-HJKMNP-TV-Z]{26}$/,aS=/^[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,oS=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $u;const cS=/^(((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}))$/,dS=/^(([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})))$/,uS=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 hS(e,t){return!!((t==="v4"||!t)&&cS.test(e)||(t==="v6"||!t)&&dS.test(e))}class Xr extends Xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ye.string){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ye.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,...Me.errToObj(s)})}_addCheck(t){return new Xr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Me.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Me.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Me.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Me.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Me.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Me.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Me.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Me.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,...Me.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Me.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Me.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Me.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Me.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Me.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Me.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Me.errToObj(r)})}nonempty(t){return this.min(1,Me.errToObj(t))}trim(){return new Xr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Xr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Xr({...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 Xr({checks:[],typeName:Ie.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};function fS(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 kn 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)!==ye.number){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ye.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"?fS(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,Me.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Me.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Me.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Me.toString(r))}setLimit(t,r,s,o){return new kn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:Me.toString(o)}]})}_addCheck(t){return new kn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Me.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Me.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Me.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Me.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Me.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Me.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Me.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Me.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Me.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 kn({checks:[],typeName:Ie.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class Cn 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)!==ye.bigint){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ye.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,Me.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Me.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Me.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Me.toString(r))}setLimit(t,r,s,o){return new Cn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:Me.toString(o)}]})}_addCheck(t){return new Cn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Me.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Me.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Me.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Me.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Me.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 Cn({checks:[],typeName:Ie.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};class No extends Xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ye.boolean){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.boolean,received:s.parsedType}),De}return ir(t.data)}}No.create=e=>new No({typeName:Ie.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class ns extends Xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ye.date){const c=this._getOrReturnCtx(t);return ke(c,{code:he.invalid_type,expected:ye.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 ns({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Me.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Me.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 ns({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ie.ZodDate,...$e(e)});class Yc extends Xe{_parse(t){if(this._getType(t)!==ye.symbol){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.symbol,received:s.parsedType}),De}return ir(t.data)}}Yc.create=e=>new Yc({typeName:Ie.ZodSymbol,...$e(e)});class Eo extends Xe{_parse(t){if(this._getType(t)!==ye.undefined){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.undefined,received:s.parsedType}),De}return ir(t.data)}}Eo.create=e=>new Eo({typeName:Ie.ZodUndefined,...$e(e)});class Lo extends Xe{_parse(t){if(this._getType(t)!==ye.null){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.null,received:s.parsedType}),De}return ir(t.data)}}Lo.create=e=>new Lo({typeName:Ie.ZodNull,...$e(e)});class ta extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return ir(t.data)}}ta.create=e=>new ta({typeName:Ie.ZodAny,...$e(e)});class Qn extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ir(t.data)}}Qn.create=e=>new Qn({typeName:Ie.ZodUnknown,...$e(e)});class Ii extends Xe{_parse(t){const r=this._getOrReturnCtx(t);return ke(r,{code:he.invalid_type,expected:ye.never,received:r.parsedType}),De}}Ii.create=e=>new Ii({typeName:Ie.ZodNever,...$e(e)});class Uc extends Xe{_parse(t){if(this._getType(t)!==ye.undefined){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.void,received:s.parsedType}),De}return ir(t.data)}}Uc.create=e=>new Uc({typeName:Ie.ZodVoid,...$e(e)});class qr extends Xe{_parse(t){const{ctx:r,status:s}=this._processInputParams(t),o=this._def;if(r.parsedType!==ye.array)return ke(r,{code:he.invalid_type,expected:ye.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 ui(r,p,r.path,v)))).then(p=>Gt.mergeArray(s,p));const c=[...r.data].map((p,v)=>o.type._parseSync(new ui(r,p,r.path,v)));return Gt.mergeArray(s,c)}get element(){return this._def.type}min(t,r){return new qr({...this._def,minLength:{value:t,message:Me.toString(r)}})}max(t,r){return new qr({...this._def,maxLength:{value:t,message:Me.toString(r)}})}length(t,r){return new qr({...this._def,exactLength:{value:t,message:Me.toString(r)}})}nonempty(t){return this.min(1,t)}}qr.create=(e,t)=>new qr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ie.ZodArray,...$e(t)});function ys(e){if(e instanceof ft){const t={};for(const r in e.shape){const s=e.shape[r];t[r]=Pi.create(ys(s))}return new ft({...e._def,shape:()=>t})}else return e instanceof qr?new qr({...e._def,type:ys(e.element)}):e instanceof Pi?Pi.create(ys(e.unwrap())):e instanceof as?as.create(ys(e.unwrap())):e instanceof hi?hi.create(e.items.map(t=>ys(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)!==ye.object){const A=this._getOrReturnCtx(t);return ke(A,{code:he.invalid_type,expected:ye.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 ui(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: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 E of v){const P=o.data[E];C.push({key:{status:"valid",value:E},value:A._parse(new ui(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 Me.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=Me.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 ys(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 Jb(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 Po 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 Zr(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},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 Zr(C));return ke(r,{code:he.invalid_union,unionErrors:v}),De}}get options(){return this._def.options}}Po.create=(e,t)=>new Po({options:e,typeName:Ie.ZodUnion,...$e(t)});const Jl=e=>e instanceof Mo?Jl(e.schema):e instanceof Kr?Jl(e.innerType()):e instanceof _o?[e.value]:e instanceof Sn?e.options:e instanceof Oo?Object.keys(e.enum):e instanceof Io?Jl(e._def.innerType):e instanceof Eo?[void 0]:e instanceof Lo?[null]:null;class Hd extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.object)return ke(r,{code:he.invalid_type,expected:ye.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=Jl(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 Hd({typeName:Ie.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...$e(s)})}}function Sf(e,t){const r=Ji(e),s=Ji(t);if(e===t)return{valid:!0,data:e};if(r===ye.object&&s===ye.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=Sf(e[v],t[v]);if(!C.valid)return{valid:!1};p[v]=C.data}return{valid:!0,data:p}}else if(r===ye.array&&s===ye.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let c=0;c{if(kf(c)||kf(p))return De;const v=Sf(c.value,p.value);return v.valid?((Cf(c)||Cf(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}))}}To.create=(e,t,r)=>new To({left:e,right:t,typeName:Ie.ZodIntersection,...$e(r)});class hi extends Xe{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ye.array)return ke(s,{code:he.invalid_type,expected:ye.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 ui(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 hi({...this._def,rest:t})}}hi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new hi({items:e,typeName:Ie.ZodTuple,rest:null,...$e(t)})};class Ro 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!==ye.object)return ke(s,{code:he.invalid_type,expected:ye.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 ui(s,v,s.path,v)),value:p._parse(new ui(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 Ro({keyType:t,valueType:r,typeName:Ie.ZodRecord,...$e(s)}):new Ro({keyType:Xr.create(),valueType:t,typeName:Ie.ZodRecord,...$e(r)})}}class Gc 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!==ye.map)return ke(s,{code:he.invalid_type,expected:ye.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 ui(s,v,s.path,[A,"key"])),value:c._parse(new ui(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}}}}Gc.create=(e,t,r)=>new Gc({valueType:t,keyType:e,typeName:Ie.ZodMap,...$e(r)});class ss extends Xe{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==ye.set)return ke(s,{code:he.invalid_type,expected:ye.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 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 ui(s,C,s.path,A)));return s.common.async?Promise.all(v).then(C=>p(C)):p(v)}min(t,r){return new ss({...this._def,minSize:{value:t,message:Me.toString(r)}})}max(t,r){return new ss({...this._def,maxSize:{value:t,message:Me.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}ss.create=(e,t)=>new ss({valueType:e,minSize:null,maxSize:null,typeName:Ie.ZodSet,...$e(t)});class Vs extends Xe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.function)return ke(r,{code:he.invalid_type,expected:ye.function,received:r.parsedType}),De;function s(v,C){return $c({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Wc(),Ao].filter(A=>!!A),issueData:{code:he.invalid_arguments,argumentsError:C}})}function o(v,C){return $c({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Wc(),Ao].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 ra){const v=this;return ir(async function(...C){const A=new Zr([]),E=await v._def.args.parseAsync(C,c).catch(_=>{throw A.addIssue(s(C,_)),A}),P=await Reflect.apply(p,this,E);return await v._def.returns._def.type.parseAsync(P,c).catch(_=>{throw A.addIssue(o(P,_)),A})})}else{const v=this;return ir(function(...C){const A=v._def.args.safeParse(C,c);if(!A.success)throw new Zr([s(C,A.error)]);const E=Reflect.apply(p,this,A.data),P=v._def.returns.safeParse(E,c);if(!P.success)throw new Zr([o(E,P.error)]);return P.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Vs({...this._def,args:hi.create(t).rest(Qn.create())})}returns(t){return new Vs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,s){return new Vs({args:t||hi.create([]).rest(Qn.create()),returns:r||Qn.create(),typeName:Ie.ZodFunction,...$e(s)})}}class Mo 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})}}Mo.create=(e,t)=>new Mo({getter:e,typeName:Ie.ZodLazy,...$e(t)});class _o 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}}_o.create=(e,t)=>new _o({value:e,typeName:Ie.ZodLiteral,...$e(t)});function Jb(e,t){return new Sn({values:e,typeName:Ie.ZodEnum,...$e(t)})}class Sn 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 ir(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 Sn.create(t)}exclude(t){return Sn.create(this.options.filter(r=>!t.includes(r)))}}Sn.create=Jb;class Oo extends Xe{_parse(t){const r=Je.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==ye.string&&s.parsedType!==ye.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 ir(t.data)}get enum(){return this._def.values}}Oo.create=(e,t)=>new Oo({values:e,typeName:Ie.ZodNativeEnum,...$e(t)});class ra extends Xe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.promise&&r.common.async===!1)return ke(r,{code:he.invalid_type,expected:ye.promise,received:r.parsedType}),De;const s=r.parsedType===ye.promise?r.data:Promise.resolve(r.data);return ir(s.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ra.create=(e,t)=>new ra({type:e,typeName:Ie.ZodPromise,...$e(t)});class Kr 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(!jo(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=>jo(p)?Promise.resolve(o.transform(p.value,c)).then(v=>({status:r.value,value:v})):p);Je.assertNever(o)}}Kr.create=(e,t,r)=>new Kr({schema:e,typeName:Ie.ZodEffects,effect:t,...$e(r)});Kr.createWithPreprocess=(e,t,r)=>new Kr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ie.ZodEffects,...$e(r)});class Pi extends Xe{_parse(t){return this._getType(t)===ye.undefined?ir(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 as extends Xe{_parse(t){return this._getType(t)===ye.null?ir(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}as.create=(e,t)=>new as({innerType:e,typeName:Ie.ZodNullable,...$e(t)});class Io extends Xe{_parse(t){const{ctx:r}=this._processInputParams(t);let s=r.data;return r.parsedType===ye.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Io.create=(e,t)=>new Io({innerType:e,typeName:Ie.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class Zc 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 Xc(o)?o.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Zr(s.common.issues)},input:s.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Zr(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Zc.create=(e,t)=>new Zc({innerType:e,typeName:Ie.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class qc extends Xe{_parse(t){if(this._getType(t)!==ye.nan){const s=this._getOrReturnCtx(t);return ke(s,{code:he.invalid_type,expected:ye.nan,received:s.parsedType}),De}return{status:"valid",value:t.data}}}qc.create=e=>new qc({typeName:Ie.ZodNaN,...$e(e)});const pS=Symbol("zod_brand");class e2 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 Qo 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(),Kb(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 Qo({in:t,out:r,typeName:Ie.ZodPipeline})}}class Qc extends Xe{_parse(t){const r=this._def.innerType._parse(t);return jo(r)&&(r.value=Object.freeze(r.value)),r}}Qc.create=(e,t)=>new Qc({innerType:e,typeName:Ie.ZodReadonly,...$e(t)});const t2=(e,t={},r)=>e?ta.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})}}):ta.create(),gS={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}`})=>t2(r=>r instanceof e,t),r2=Xr.create,i2=kn.create,xS=qc.create,vS=Cn.create,n2=No.create,yS=ns.create,bS=Yc.create,wS=Eo.create,kS=Lo.create,CS=ta.create,SS=Qn.create,AS=Ii.create,jS=Uc.create,NS=qr.create,ES=ft.create,LS=ft.strictCreate,PS=Po.create,TS=Hd.create,RS=To.create,MS=hi.create,_S=Ro.create,OS=Gc.create,IS=ss.create,zS=Vs.create,FS=Mo.create,DS=_o.create,HS=Sn.create,BS=Oo.create,VS=ra.create,r0=Kr.create,WS=Pi.create,$S=as.create,XS=Kr.createWithPreprocess,YS=Qo.create,US=()=>r2().optional(),GS=()=>i2().optional(),ZS=()=>n2().optional(),qS={string:e=>Xr.create({...e,coerce:!0}),number:e=>kn.create({...e,coerce:!0}),boolean:e=>No.create({...e,coerce:!0}),bigint:e=>Cn.create({...e,coerce:!0}),date:e=>ns.create({...e,coerce:!0})},QS=De;var KS=Object.freeze({__proto__:null,defaultErrorMap:Ao,setErrorMap:tS,getErrorMap:Wc,makeIssue:$c,EMPTY_PATH:rS,addIssueToContext:ke,ParseStatus:Gt,INVALID:De,DIRTY:Kb,OK:ir,isAborted:kf,isDirty:Cf,isValid:jo,isAsync:Xc,get util(){return Je},get objectUtil(){return wf},ZodParsedType:ye,getParsedType:Ji,ZodType:Xe,ZodString:Xr,ZodNumber:kn,ZodBigInt:Cn,ZodBoolean:No,ZodDate:ns,ZodSymbol:Yc,ZodUndefined:Eo,ZodNull:Lo,ZodAny:ta,ZodUnknown:Qn,ZodNever:Ii,ZodVoid:Uc,ZodArray:qr,ZodObject:ft,ZodUnion:Po,ZodDiscriminatedUnion:Hd,ZodIntersection:To,ZodTuple:hi,ZodRecord:Ro,ZodMap:Gc,ZodSet:ss,ZodFunction:Vs,ZodLazy:Mo,ZodLiteral:_o,ZodEnum:Sn,ZodNativeEnum:Oo,ZodPromise:ra,ZodEffects:Kr,ZodTransformer:Kr,ZodOptional:Pi,ZodNullable:as,ZodDefault:Io,ZodCatch:Zc,ZodNaN:qc,BRAND:pS,ZodBranded:e2,ZodPipeline:Qo,ZodReadonly:Qc,custom:t2,Schema:Xe,ZodSchema:Xe,late:gS,get ZodFirstPartyTypeKind(){return Ie},coerce:qS,any:CS,array:NS,bigint:vS,boolean:n2,date:yS,discriminatedUnion:TS,effect:r0,enum:HS,function:zS,instanceof:mS,intersection:RS,lazy:FS,literal:DS,map:OS,nan:xS,nativeEnum:BS,never:AS,null:kS,nullable:$S,number:i2,object:ES,oboolean:ZS,onumber:GS,optional:WS,ostring:US,pipeline:YS,preprocess:XS,promise:VS,record:_S,set:IS,strictObject:LS,string:r2,symbol:bS,transformer:r0,tuple:MS,undefined:wS,union:PS,unknown:SS,void:jS,NEVER:QS,ZodIssueCode:he,quotelessJson:eS,ZodError:Zr}),h1=(e=>(e.HOBBY="hobby-tier",e.PRO="pro-tier",e.ENTERPRISE="enterprise-tier",e))(h1||{});const JS="https://docs.opensaas.sh",eA="https://docs.opensaas.sh/blog",tA="https://billing.stripe.com/p/login/test_aEU17i3Iz0XT5mUfYY",s2="https://billing.stripe.com/p/login/14kaGs1cL3FX1PidQQ",a2=s2;rA({customerPortalTestUrl:tA,customerPortalProdUrl:s2});function rA(e){const t=KS.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 o2(){const e=Jr(),[t,r]=Y.useState(!1),{data:s}=Or();async function o(c){if(!s)e.push("/login");else try{r(!0);let p=await Nb(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(h1.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 Af=({user:e,renderGoToChat:t})=>e?e.hasPaid?t?f.jsxs("a",{href:"/chat",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream 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:["Go to chat ",f.jsx("span",{"aria-hidden":"true",children:"→"})]}):f.jsx(f.Fragment,{}):f.jsx(o2,{}):f.jsx(rt,{to:"/signup",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream 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:"Create an account"}),Kc=[{name:"Home",href:"/"},{name:"Chat",href:"/chat"},{name:"Pricing",href:"/pricing"}],iA=[{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:""}],nA=[{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:""}],sA={app:[{name:"Documentation",href:JS},{name:"Blog",href:eA}],company:[{name:"Privacy Policy",href:"/privacy"},{name:"Terms & Conditions",href:"/toc"}]},aA=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:c1,alt:"Capt’n.ai"});function l2(){const[e,t]=Y.useState(!1),{data:r,isLoading:s}=Or();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:c1,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(qb,{className:"h-6 w-6","aria-hidden":"true"})]})}),f.jsx("div",{className:"hidden lg:flex lg:gap-x-12",children:Kc.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:f.jsx(Af,{user:r,renderGoToChat:!1})}),s?null:r?f.jsx("div",{className:"ml-4",children:f.jsx(u1,{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:["Sign in ",f.jsx(Vc,{size:"1.1rem",className:"ml-1 mt-[0.1rem]"})]})})]})]}),f.jsxs(Bc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Bc.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(aA,{})]}),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(Zb,{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:Kc.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(d1,{user:r,setMobileMenuOpen:t}):f.jsxs("div",{className:"text-right",children:[f.jsx(gn,{to:"/signup",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream 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:"Create an account"}),f.jsx(gn,{to:"/login",children:f.jsxs("div",{className:"mt-5 flex justify-end items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream text-sm",children:["Sign in ",f.jsx(Vc,{size:"1.1rem",className:"ml-1"})]})})]})})]})})]})]})]})}const c2="/assets/captn-logo-BNDZAGdh.png",d2=({loadingMessage:e="Loading...",bgColor:t="bg-captn-dark-blue",showLogo:r=!0})=>{const[s,o]=Y.useState(0),c=["—","\\","|","/"];return Y.useEffect(()=>{const p=setInterval(()=>{o(v=>(v+1)%c.length)},250);return()=>clearInterval(p)},[c.length]),f.jsx("div",{style:{minHeight:"85px"},className:`flex items-center px-5 group ${t} 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 ${t} `,children:[r&&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:c2,className:"w-full h-full",style:{borderRadius:"50%"}})}),f.jsxs("div",{className:"chat-conversations text-base flex flex-col gap-2",children:[e," ",c[s]]})]})})};function oA(){return f.jsx("div",{className:"server-error-component sticky top-0 z-999 flex w-full justify-center bg-captn-rose-quartz",children:f.jsx(d2,{loadingMessage:"Oops! Something went wrong. Our server is currently unavailable. Please do not refresh your browser. We're trying to reconnect...",showLogo:!1,bgColor:"bg-captn-rose-quartz"})})}const lA={display:"flex",alignItems:"center",justifyContent:"center",padding:"4rem"},cA={display:"flex",alignItems:"center",gap:".5rem",borderRadius:".5rem",padding:"1rem"},dA=()=>f.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-captn-dark-blue",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});function f1(){return f.jsx("div",{style:lA,children:f.jsx("div",{className:"bg-captn-light-cream text-captn-dark-blue",style:cA,children:f.jsx("div",{className:"relative rounded-xl overflow-auto p-8",children:f.jsx("div",{className:"flex items-center justify-center",children:f.jsxs("button",{type:"button",className:"inline-flex items-center px-4 py-2 leading-6 text-sm shadow rounded-md transition ease-in-out duration-150 cursor-not-allowed border border-captn-dark-blue",disabled:!0,children:[f.jsx(dA,{})," Loading..."]})})})})})}const{styled:ds,css:hP}=Zp({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 uA(e){return e==null?void 0:e.replace(/\/$/,"")}const hA=uA("https://backend.captn.ai")||"http://localhost:3001",fA={apiUrl:hA},pA=ds("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),gA=ds(pA,{background:"#bb6e90",color:"#eae4d9"}),u2=({tocChecked:e,handleTocChange:t,marketingEmailsChecked:r,handleMarketingEmailsChange:s,errorMessage:o})=>f.jsxs("div",{className:"toc-marketing-checkbox-wrapper text-captn-light-cream",children:[f.jsx("div",{className:"mt-4",children:f.jsxs("label",{className:"checkbox-container text-sm mb-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.jsx("input",{type:"checkbox",id:"toc",checked:e,onChange:t}),f.jsx("span",{className:"checkmark"})]})}),f.jsx("div",{children:f.jsxs("label",{className:"checkbox-container text-sm mb-2",htmlFor:"marketingEmails",children:["I agree to receiving marketing emails",f.jsx("input",{type:"checkbox",id:"marketingEmails",checked:r,onChange:s}),f.jsx("span",{className:"checkmark"})]})}),o&&f.jsx("div",{className:"text-sm",children:f.jsxs(gA,{style:{border:"1px solid #bb6e90"},children:[o.title,o.description&&": ",o.description]})})]}),mA=ds("div",{marginTop:"1.5rem",marginBottom:"1.5rem"}),xA=ds("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"}}}}),vA=`${fA.apiUrl}/auth/google/login`,h2={title:"To proceed, please ensure you've accepted our Terms & Conditions and Privacy Policy.",description:""},yA=({state:e,socialButtonsDirection:t="horizontal",additionalSignupFields:r,errorMessage:s})=>{const{isLoading:o,setErrorMessage:c,setSuccessMessage:p,setIsLoading:v}=Y.useContext(p1),[C,A]=Y.useState(!1),[E,P]=Y.useState(!1),[I,_]=Y.useState(e);F7(),Y.useEffect(()=>{C&&c(null)},[C]);const H=R=>{A(R.target.checked)},B=R=>{P(R.target.checked)},Z=()=>{localStorage.removeItem("hasAcceptedTos"),localStorage.removeItem("hasSubscribedToMarketingEmails"),localStorage.setItem("hasAcceptedTos",JSON.stringify(C)),localStorage.setItem("hasSubscribedToMarketingEmails",JSON.stringify(E))},W=(R,K)=>{R.preventDefault(),I===On.Login||C?(Z(),window.location.href=K):c(h2)},V=I===On.Login?"Sign in with Google":"Sign up with Google";return f.jsxs(f.Fragment,{children:[I===On.Signup&&f.jsx(u2,{tocChecked:C,handleTocChange:H,marketingEmailsChecked:E,handleMarketingEmailsChange:B,errorMessage:s}),f.jsx(mA,{children:f.jsx(xA,{gap:"large",direction:t,children:f.jsxs("button",{className:"gsi-material-button",onClick:R=>W(R,vA),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:V}),f.jsx("span",{style:{display:"none"},children:V})]})]})})}),f.jsx("div",{className:"flex items-center justify-center",children:f.jsxs("span",{className:"text-sm block",children:[I===On.Login?"Don't have an account? ":"Already have an account? ",f.jsx(gn,{to:I===On.Login?"/signup":"/login",className:"no-underline hover:underline cursor-pointer",children:I===On.Login?"Sign up":"Sign in"})]})})]})};var On=(e=>(e.Login="login",e.Signup="signup",e))(On||{});const bA=ds("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),wA=ds(bA,{background:"$successBackground",color:"$successText"}),kA={height:"6rem"};ds("div",{display:"flex",flexDirection:"column"});const p1=Y.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}}),i0={login:"Sign in to your account",signup:"Create an account"};function CA({state:e,appearance:t,logo:r,socialLayout:s="horizontal",additionalSignupFields:o}){const[c,p]=Y.useState(null),[v,C]=Y.useState(null),[A,E]=Y.useState(!1),P=m7(t??{}),I=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:kA,src:r,alt:"Capt’n.ai"}),f.jsx("p",{className:"mt-7 text-2xl",children:e==="signup"?i0.signup:i0.login})]}),v&&f.jsx(wA,{children:v}),f.jsx(p1.Provider,{value:{isLoading:A,setIsLoading:E,setErrorMessage:p,setSuccessMessage:C},children:(e==="login"||e==="signup")&&f.jsx(yA,{state:e,socialButtonsDirection:I,additionalSignupFields:o,errorMessage:c})})]})}const SA="Before accessing the application, please confirm your agreement to the Terms & Conditions and Privacy Policy.",n0=()=>{const e=Jr();Y.useContext(p1);const[t,r]=Y.useState(null),[s,o]=Y.useState(!1),[c,p]=Y.useState(!1);Y.useEffect(()=>{s&&r(null)},[s]);const v=P=>{o(P.target.checked)},C=P=>{p(P.target.checked)},A=P=>{P.preventDefault(),s?(r(null),eo({isSignUpComplete:!0,hasAcceptedTos:s,...c&&{hasSubscribedToMarketingEmails:c}}),e.push("/chat")):r(h2)},E=Y.useMemo(()=>location.pathname.startsWith("/account"),[location]);return f.jsxs(f.Fragment,{children:[!E&&f.jsx(l2,{}),f.jsx("div",{className:"flex items-center justify-center z-50 p-16 backdrop-blur-sm bg-captn-light-cream/30 mt-16",children:f.jsx("div",{className:"toc-marketing-container bg-captn-dark-blue rounded-lg shadow-lg p-8 m-4 max-w-xl mx-auto",children:f.jsxs("div",{className:"inner-wrapper",children:[f.jsx("h2",{className:"text-xl font-bold mb-4 text-captn-light-cream",children:"Almost there..."}),f.jsx("p",{className:"text-captn-light-cream",children:SA}),f.jsx(u2,{tocChecked:s,handleTocChange:v,marketingEmailsChecked:c,handleMarketingEmailsChange:C,errorMessage:t}),f.jsx("div",{className:"mt-6 text-right",children:f.jsx("button",{onClick:A,className:"mt-4 md:-mt-10 no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream 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:"Save"})})]})})})]})},AA=()=>f.jsx("div",{children:f.jsx("footer",{"aria-labelledby":"footer-heading",className:"relative mt-5 border-t border-gray-900/10",children:f.jsx("div",{className:"flex items-start justify-end mt-10 gap-20 mx-auto max-w-7xl sm:px-6 lg:px-8",children:f.jsx("div",{children:f.jsx("ul",{role:"list",className:"mt-6 space-y-4",children:sA.company.map(e=>f.jsx("li",{children:f.jsx("a",{href:e.href,className:"text-sm leading-6 text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream",target:`${e.name==="airt"?"_blank":"_self"}`,children:e.name})},e.name))})})})})}),jA=()=>{document.body.classList.contains("server-error")||document.body.classList.add("server-error")},NA=()=>{document.body.classList.contains("server-error")&&document.body.classList.remove("server-error")};function EA({children:e}){const t=oa(),[r,s]=Y.useState(!1),{data:o,isError:c,isLoading:p}=Or(),v=Y.useMemo(()=>t.pathname!=="/",[t]),C=Y.useMemo(()=>t.pathname.startsWith("/admin"),[t]),A=Y.useMemo(()=>t.pathname.startsWith("/chat"),[t]),E=Y.useMemo(()=>t.pathname.startsWith("/checkout"),[t]),P=Y.useMemo(()=>t.pathname.startsWith("/account"),[t]);return Y.useEffect(()=>{if(o)if(o.isSignUpComplete){s(!1);const I=new Date(o.lastActiveTimestamp),_=new Date;_.getTime()-I.getTime()>5*60*1e3&&eo({lastActiveTimestamp:_})}else if(o.hasAcceptedTos)eo({isSignUpComplete:!0}),s(!1);else{const I=localStorage.getItem("hasAcceptedTos")==="true",_=localStorage.getItem("hasSubscribedToMarketingEmails")==="true";I?(eo({isSignUpComplete:!0,hasAcceptedTos:I,hasSubscribedToMarketingEmails:_}),s(!1)):s(!0)}},[o]),Y.useEffect(()=>{if(t.hash){const I=t.hash.replace("#",""),_=document.getElementById(I);_&&_.scrollIntoView()}},[t]),f.jsx(f.Fragment,{children:f.jsxs("div",{className:"min-h-screen dark:text-captn-light-cream dark:bg-boxdark-2 bg-captn-light-cream text-captn-dark-blue",children:[c&&(jA(),f.jsx(oA,{})),C||A?f.jsx(f.Fragment,{children:r?f.jsx(f.Fragment,{children:f.jsx(n0,{})}):e}):f.jsxs("div",{className:"relative flex flex-col min-h-screen justify-between",children:[v&&f.jsx(l2,{}),f.jsx("div",{className:"mx-auto max-w-7xl sm:px-6 lg:px-8 w-full",children:c?e:p?f.jsx(f1,{}):(NA(),r&&(E||P)?f.jsx(f.Fragment,{children:f.jsx(n0,{})}):e)}),f.jsxs("div",{children:[f.jsx(AA,{}),f.jsx("div",{className:"flex items-center h-20 ",children:f.jsxs("p",{className:"text-center w-full text-sm text-captn-dark-blue opacity-50",children:["© 2024"," ",f.jsx("a",{href:"https://airt.ai",className:"text-sm leading-6 hover:text-captn-light-blue text-captn-dark-blue underline",target:"_blank",children:"airt"}),". All rights reserved."]})})]})]})]})})}const Fr=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Or();return o?r?f.jsx(e,{...t,user:r}):f.jsx(Pd,{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."})},LA="/assets/agent-chat-BGsqR59C.png";function PA(){const[e,t]=Y.useState(!1),{data:r,isLoading:s}=Or(),o=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:c1,alt:"Capt’n.ai"});return Jr(),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(qb,{className:"h-6 w-6","aria-hidden":"true"})]})}),f.jsx("div",{className:"hidden lg:flex lg:gap-x-12",children:Kc.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:[f.jsx(Af,{user:r,renderGoToChat:!1}),s?null:r?f.jsx(u1,{user:r}):f.jsx(gn,{to:"/login",children:f.jsxs("div",{className:"text-sm font-semibold leading-6 ml-2 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:["Sign in ",f.jsx(Vc,{size:"1.1rem",className:"ml-1"})]})})]})})]}),f.jsxs(Bc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Bc.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(Zb,{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:Kc.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(d1,{user:r}):f.jsxs("div",{className:"text-right",children:[f.jsx(gn,{to:"/signup",className:"no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream 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:"Create an account"}),f.jsx(gn,{to:"/login",children:f.jsxs("div",{className:"mt-5 flex justify-end items-center duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue dark:text-captn-light-cream text-sm",children:["Sign in ",f.jsx(Vc,{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:f.jsx(Af,{user:r,renderGoToChat:!0})})]}),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:LA,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:iA.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:nA.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))})]})]})]})}function f2({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 p2="/assets/captn-logo-large-Soxu_L3b.png";var g2=(e=>(e.Login="login",e.Signup="signup",e))(g2||{});function TA(){const e=Jr(),{data:t}=Or();return Y.useEffect(()=>{t&&e.push("/")},[t,e]),f.jsx(f2,{children:f.jsx(m2,{logo:p2,state:"login"})})}function m2({appearance:e,logo:t,socialLayout:r,state:s}){return f.jsx(CA,{appearance:e,logo:t,socialLayout:r,state:s})}function RA(){return f.jsx(f2,{children:f.jsx(m2,{logo:p2,state:g2.Signup})})}function MA(){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 _A(){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 fi=Object.create(null);fi.open="0";fi.close="1";fi.ping="2";fi.pong="3";fi.message="4";fi.upgrade="5";fi.noop="6";const ec=Object.create(null);Object.keys(fi).forEach(e=>{ec[fi[e]]=e});const jf={type:"error",data:"parser error"},x2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",v2=typeof ArrayBuffer=="function",y2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,g1=({type:e,data:t},r,s)=>x2&&t instanceof Blob?r?s(t):s0(t,s):v2&&(t instanceof ArrayBuffer||y2(t))?r?s(t):s0(new Blob([t]),s):s(fi[e]+(t||"")),s0=(e,t)=>{const r=new FileReader;return r.onload=function(){const s=r.result.split(",")[1];t("b"+(s||""))},r.readAsDataURL(e)};function a0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Xu;function OA(e,t){if(x2&&e.data instanceof Blob)return e.data.arrayBuffer().then(a0).then(t);if(v2&&(e.data instanceof ArrayBuffer||y2(e.data)))return t(a0(e.data));g1(e,!1,r=>{Xu||(Xu=new TextEncoder),t(Xu.encode(r))})}const o0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ba=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},zA=typeof ArrayBuffer=="function",m1=(e,t)=>{if(typeof e!="string")return{type:"message",data:b2(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:FA(e.substring(1),t)}:ec[r]?e.length>1?{type:ec[r],data:e.substring(1)}:{type:ec[r]}:jf},FA=(e,t)=>{if(zA){const r=IA(e);return b2(r,t)}else return{base64:!0,data:e}},b2=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},w2="",DA=(e,t)=>{const r=e.length,s=new Array(r);let o=0;e.forEach((c,p)=>{g1(c,!1,v=>{s[p]=v,++o===r&&t(s.join(w2))})})},HA=(e,t)=>{const r=e.split(w2),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 Yu;function El(e){return e.reduce((t,r)=>t+r.length,0)}function Ll(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(jf);break}o=E*Math.pow(2,32)+A.getUint32(4),s=3}else{if(El(r)e){v.enqueue(jf);break}}}})}const k2=4;function Ft(e){if(e)return WA(e)}function WA(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 $A=jr.setTimeout,XA=jr.clearTimeout;function Bd(e,t){t.useNativeTimers?(e.setTimeoutFn=$A.bind(jr),e.clearTimeoutFn=XA.bind(jr)):(e.setTimeoutFn=jr.setTimeout.bind(jr),e.clearTimeoutFn=jr.clearTimeout.bind(jr))}const YA=1.33;function UA(e){return typeof e=="string"?GA(e):Math.ceil((e.byteLength||e.size)*YA)}function GA(e){let t=0,r=0;for(let s=0,o=e.length;s=57344?r+=3:(s++,r+=4);return r}function ZA(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function qA(e){let t={},r=e.split("&");for(let s=0,o=r.length;s0);return t}function A2(){const e=d0(+new Date);return e!==c0?(l0=0,c0=e):e+"."+d0(l0++)}for(;Pl{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)};HA(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,DA(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]=A2()),!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 li(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 li extends Ft{constructor(t,r){super(),Bd(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=C2(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const s=this.xhr=new N2(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=li.requestsCount++,li.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=ej,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete li.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()}}li.requestsCount=0;li.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",u0);else if(typeof addEventListener=="function"){const e="onpagehide"in jr?"pagehide":"unload";addEventListener(e,u0,!1)}}function u0(){for(let e in li.requests)li.requests.hasOwnProperty(e)&&li.requests[e].abort()}const v1=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),Tl=jr.WebSocket||jr.MozWebSocket,h0=!0,ij="arraybuffer",f0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class nj extends x1{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=f0?{}:C2(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=h0&&!f0?r?new Tl(t,r):new Tl(t):new Tl(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{h0&&this.ws.send(c)}catch{}o&&v1(()=>{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]=A2()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!Tl}}class sj extends x1{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=VA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(r).getReader(),o=BA();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&&v1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const aj={websocket:nj,webtransport:sj,polling:rj},oj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,lj=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ef(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=oj.exec(e||""),c={},p=14;for(;p--;)c[lj[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=cj(c,c.path),c.queryKey=dj(c,c.query),c}function cj(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 dj(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,c){o&&(r[o]=c)}),r}let E2=class bs extends Ft{constructor(t,r={}){super(),this.binaryType=ij,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=Ef(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=Ef(r.host).host),Bd(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=qA(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=k2,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 aj[t](s)}open(){let t;if(this.opts.rememberUpgrade&&bs.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;bs.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;bs.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 I=new Error("probe error");I.transport=r.name,this.emitReserved("upgradeError",I)}}))};function c(){s||(s=!0,E(),r.close(),r=null)}const p=P=>{const I=new Error("probe error: "+P);I.transport=r.name,c(),this.emitReserved("upgradeError",I)};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",bs.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){bs.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,L2=Object.prototype.toString,gj=typeof Blob=="function"||typeof Blob<"u"&&L2.call(Blob)==="[object BlobConstructor]",mj=typeof File=="function"||typeof File<"u"&&L2.call(File)==="[object FileConstructor]";function y1(e){return fj&&(e instanceof ArrayBuffer||pj(e))||gj&&e instanceof Blob||mj&&e instanceof File}function tc(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}fa.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};fa.prototype.reset=function(){this.attempts=0};fa.prototype.setMin=function(e){this.ms=e};fa.prototype.setMax=function(e){this.max=e};fa.prototype.setJitter=function(e){this.jitter=e};class Tf 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,Bd(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 fa({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||Cj;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 E2(this.uri,this.opts);const r=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=Br(r,"open",function(){s.onopen(),t&&t()}),c=v=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",v),t?t(v):this.maybeReconnectOnOpen()},p=Br(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(Br(t,"ping",this.onping.bind(this)),Br(t,"data",this.ondata.bind(this)),Br(t,"error",this.onerror.bind(this)),Br(t,"close",this.onclose.bind(this)),Br(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){v1(()=>{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 P2(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 Pa={};function rc(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=uj(e,t.path||"/socket.io"),s=r.source,o=r.id,c=r.path,p=Pa[o]&&c in Pa[o].nsps,v=t.forceNew||t["force new connection"]||t.multiplex===!1||p;let C;return v?C=new Tf(s,t):(Pa[o]||(Pa[o]=new Tf(s,t)),C=Pa[o]),r.query&&!t.query&&(t.query=r.queryKey),C.socket(r.path,t)}Object.assign(rc,{Manager:Tf,Socket:P2,io:rc,connect:rc});const Wr=rc(Oy.apiUrl,{autoConnect:!0});function w1(){Wr.auth={sessionId:nb()},Wr.connected&&(Wr.disconnect(),Wr.connect())}w1();is.on("sessionId.set",w1);is.on("sessionId.clear",w1);const k1=Y.createContext({socket:Wr,isConnected:!1});function jj({children:e}){const[t,r]=Y.useState(Wr.connected);return Y.useEffect(()=>{function s(){r(!0)}function o(){r(!1)}return Wr.on("connect",s),Wr.on("disconnect",o),()=>{Wr.off("connect",s),Wr.off("disconnect",o)}},[]),f.jsx(k1.Provider,{value:{socket:Wr,isConnected:t},children:e})}function Nj(){return Y.useContext(k1)}function Jc(e,t){const{socket:r}=Y.useContext(k1);Y.useEffect(()=>(r.on(e,t),()=>{r.off(e,t)}),[e,t])}const T2=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(u1,{user:e.user})})]})}),R2="/assets/logo-for-dark-bg-B0Sa7V_h.png";function Ej(e){return cs({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 Lj=({chatId:e,chatName:t,onValueChange:r})=>{const[s,o]=Y.useState(!1),[c,p]=Y.useState(t),v=Y.useRef(null);Y.useEffect(()=>{var I;s&&((I=v.current)==null||I.focus())},[s]),Y.useEffect(()=>{p(t)},[t]);const C=I=>{I.preventDefault(),o(!0)},A=I=>{p(I.target.value)},E=I=>{I.preventDefault(),r(e,c),o(!1)},P=()=>{r(e,c),o(!1)};return f.jsxs("div",{className:"editable-chat-name",style:{width:"195px"},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-sm",onClick:C,"data-testid":"edit-button",children:f.jsx(Ej,{})})]})},Pj="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 Tj(e){return e.map(r=>({role:r.role,content:r.message}))}async function Rj(e,t,r){t&&r(),await di({id:e,data:{smartSuggestions:{suggestions:[""],type:""},userRespondedWithNextAction:t}})}async function Mj(e,t,r){let s;r?s=await ek(e):s=await rk({chatId:e,userQuery:t,role:"user"});const o=Tj(s);return await di({id:e,data:{showLoader:!0}}),o}async function _j(e,t,r){return await ik({chatId:e,userQuery:r?"":t,role:"assistant",isLoading:!0})}const Oj=async(e,t,r,s,o,c)=>{const p=t.chatType==="daily_analysis"?`default_team_${t.userId}_${t.id}`:t.team_name;e.emit("sendMessageToTeam",t,r.id,s,o,p),await di({id:c,data:{showLoader:!1,team_status:"inprogress"}})},Ij=async(e,t,r,s,o,c)=>{const p=await nk({chatId:e,messages:o});await zj(p,t,r,s,o,e,c)},zj=async(e,t,r,s,o,c,p)=>{e.customer_brief&&s.emit("sendMessageToTeam",t,r.id,e.customer_brief,o,e.team_name),e.content&&!e.is_exception_occured&&(s.emit("checkSmartSuggestionStatus",c),await di({id:c,data:{streamAgentResponse:!0,showLoader:!1,smartSuggestions:e.smart_suggestions}})),e.content&&await Eb({id:r.id,data:{isLoading:!1,message:e.content}});const v=t.isChatNameUpdated?null:e.conversation_name?e.conversation_name:null;await di({id:c,data:{showLoader:!1,team_id:e.team_id,team_name:e.team_name,team_status:e.team_status,smartSuggestions:e.smart_suggestions,isExceptionOccured:e.is_exception_occured||!1,customerBrief:e.customer_brief,...v&&{name:v,isChatNameUpdated:!0}}}),v&&p()},Fj=async(e,t,r,s)=>{await di({id:t,data:{showLoader:!1}}),console.log("Error: "+e.message),e.message==="No Subscription Found"?s.push("/pricing"):(await Eb({id:r.id,data:{isLoading:!1,message:Pj}}),await di({id:t,data:{showLoader:!1,smartSuggestions:{suggestions:["Let's try again"],type:"oneOf"},isExceptionOccured:!0}}))},Dj=e=>e.chatType!=="daily_analysis"||e.shouldShowChat,Hj=({sidebarOpen:e,setSidebarOpen:t,refetchAllChatDetails:r})=>{const s=Jr(),o=oa(),{pathname:c}=o,p=c.split("/").pop(),v=Y.useRef(null),C=Y.useRef(null),A=localStorage.getItem("sidebar-expanded"),[E,P]=Y.useState(A===null?!1:A==="true"),I=async(W,V)=>{try{await di({id:W,data:{name:V,isChatNameUpdated:!0}})}catch{console.log("Unable to update the chat name. Please try again later.")}},{data:_,isLoading:H,refetch:B}=Zn(lk);Y.useEffect(()=>{B()},[r]),Y.useEffect(()=>{const W=({target:V})=>{!C.current||!v.current||!e||C.current.contains(V)||v.current.contains(V)||t(!1)};return document.addEventListener("click",W),()=>document.removeEventListener("click",W)}),Y.useEffect(()=>{const W=({keyCode:V})=>{!e||V!==27||t(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)}),Y.useEffect(()=>{var W,V;localStorage.setItem("sidebar-expanded",E.toString()),E?(W=document.querySelector("body"))==null||W.classList.add("sidebar-expanded"):(V=document.querySelector("body"))==null||V.classList.remove("sidebar-expanded")},[E]);const Z=async W=>{try{const V=await K9();s.push(`/chat/${V.uuid}`)}catch(V){console.log("Error: "+V.message),V.message==="No Subscription Found"?s.push("/pricing"):window.alert("Error: Something went wrong. Please try again later.")}};return f.jsxs("aside",{ref:C,className:`border-r-2 absolute left-0 top-0 z-9999 flex h-screen w-75 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(ar,{to:"/",children:f.jsx("img",{src:R2,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:v,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:Z,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:_&&_.map((W,V)=>Dj(W)&&f.jsxs(ar,{to:`/chat/${W.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 ${c==="/"&&"bg-gray-700 dark:bg-meta-4"} ${W.uuid===p?"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",{children:f.jsx(Lj,{chatId:W.id,chatName:W.name?W.name:"",onValueChange:I})})]},W.id))})})]})})})]})};function Rf(){return Rf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[o]=e[o]);return r}var Vj=Y.useLayoutEffect,Wj=function(t){var r=Y.useRef(t);return Vj(function(){r.current=t}),r},g0=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},$j=function(t,r){var s=Y.useRef();return Y.useCallback(function(o){t.current=o,s.current&&g0(s.current,null),s.current=r,r&&g0(r,o)},[r])},m0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Xj=function(t){Object.keys(m0).forEach(function(r){t.style.setProperty(r,m0[r],"important")})},x0=Xj,Qt=null,v0=function(t,r){var s=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?s+r.borderSize:s-r.paddingSize};function Yj(e,t,r,s){r===void 0&&(r=1),s===void 0&&(s=1/0),Qt||(Qt=document.createElement("textarea"),Qt.setAttribute("tabindex","-1"),Qt.setAttribute("aria-hidden","true"),x0(Qt)),Qt.parentNode===null&&document.body.appendChild(Qt);var o=e.paddingSize,c=e.borderSize,p=e.sizingStyle,v=p.boxSizing;Object.keys(p).forEach(function(I){var _=I;Qt.style[_]=p[_]}),x0(Qt),Qt.value=t;var C=v0(Qt,e);Qt.value=t,C=v0(Qt,e),Qt.value="x";var A=Qt.scrollHeight-o,E=A*r;v==="border-box"&&(E=E+o+c),C=Math.max(E,C);var P=A*s;return v==="border-box"&&(P=P+o+c),C=Math.min(P,C),[C,A]}var y0=function(){},Uj=function(t,r){return t.reduce(function(s,o){return s[o]=r[o],s},{})},Gj=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Zj=!!document.documentElement.currentStyle,qj=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var s=Uj(Gj,r),o=s.boxSizing;if(o==="")return null;Zj&&o==="border-box"&&(s.width=parseFloat(s.width)+parseFloat(s.borderRightWidth)+parseFloat(s.borderLeftWidth)+parseFloat(s.paddingRight)+parseFloat(s.paddingLeft)+"px");var c=parseFloat(s.paddingBottom)+parseFloat(s.paddingTop),p=parseFloat(s.borderBottomWidth)+parseFloat(s.borderTopWidth);return{sizingStyle:s,paddingSize:c,borderSize:p}},Qj=qj;function M2(e,t,r){var s=Wj(r);Y.useLayoutEffect(function(){var o=function(p){return s.current(p)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var Kj=function(t){M2(window,"resize",t)},Jj=function(t){M2(document.fonts,"loadingdone",t)},eN=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],tN=function(t,r){var s=t.cacheMeasurements,o=t.maxRows,c=t.minRows,p=t.onChange,v=p===void 0?y0:p,C=t.onHeightChange,A=C===void 0?y0:C,E=Bj(t,eN),P=E.value!==void 0,I=Y.useRef(null),_=$j(I,r),H=Y.useRef(0),B=Y.useRef(),Z=function(){var R=I.current,K=s&&B.current?B.current:Qj(R);if(K){B.current=K;var ee=Yj(K,R.value||R.placeholder||"x",c,o),X=ee[0],Q=ee[1];H.current!==X&&(H.current=X,R.style.setProperty("height",X+"px","important"),A(X,{rowHeight:Q}))}},W=function(R){P||Z(),v(R)};return Y.useLayoutEffect(Z),Kj(Z),Jj(Z),Y.createElement("textarea",Rf({},E,{onChange:W,ref:_}))},rN=Y.forwardRef(tN);function iN({handleFormSubmit:e,currentChatDetails:t,triggerChatFormSubmitMsg:r}){const[s,o]=Y.useState(""),c=Y.useCallback(async v=>{v!==null&&r&&await e(r,!0)},[r]),p=async v=>{v.preventDefault(),t.showLoader||(o(""),e(s))};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(rN,{minRows:1,maxRows:4,style:{lineHeight:2,resize:"none"},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),onKeyDown:v=>{v.key==="Enter"&&!v.shiftKey&&(v.preventDefault(),p(v))}}),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 nN=({children:e,handleFormSubmit:t,currentChatDetails:r,triggerChatFormSubmitMsg:s,refetchAllChatDetails:o})=>{const[c,p]=Y.useState(!1),{data:v}=Or(),C=Y.useRef(null),A=Jr();Y.useEffect(()=>{v?!v.hasPaid&&v.isSignUpComplete&&A.push("/pricing"):A.push("/login")},[v,A]),Y.useEffect(()=>{const P=new MutationObserver(()=>{C.current&&C.current.scrollTo({top:C.current.scrollHeight,behavior:"smooth"})});return C.current&&P.observe(C.current,{childList:!0,subtree:!0}),()=>P.disconnect()},[]);const E=document.body.classList.contains("server-error")?"h-[calc(100vh-85px)]":"h-screen";return f.jsx("div",{className:"dark:bg-boxdark-2 dark:text-bodydark bg-captn-light-blue",children:f.jsxs("div",{className:`flex ${E} overflow-hidden`,children:[f.jsx(Hj,{sidebarOpen:c,setSidebarOpen:p,refetchAllChatDetails:o}),f.jsxs("div",{className:"relative flex flex-1 flex-col overflow-y-auto overflow-x-hidden",children:[f.jsx(T2,{sidebarOpen:c,setSidebarOpen:p,user:v}),f.jsx("main",{className:"flex-auto overflow-y-auto",ref:C,children:f.jsx("div",{children:e})}),r?f.jsx(iN,{handleFormSubmit:t,currentChatDetails:r,triggerChatFormSubmitMsg:s}):f.jsx(f.Fragment,{})]})]})})};function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),w0={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},aN=["style","script"],oN=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,lN=/mailto:/i,cN=/\n{2,}$/,_2=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,dN=/^ *> ?/gm,uN=/^ {2,}\n/,hN=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,O2=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,I2=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,fN=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,pN=/^(?:\n *)*\n/,gN=/\r\n?/g,mN=/^\[\^([^\]]+)](:.*)\n/,xN=/^\[\^([^\]]+)]/,vN=/\f/g,yN=/^\s*?\[(x|\s)\]/,z2=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,F2=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,D2=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Mf=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,bN=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,H2=/^)/,wN=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,_f=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,kN=/^\{.*\}$/,CN=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,SN=/^<([^ >]+@[^ >]+)>/,AN=/^<([^ >]+:\/[^ >]+)>/,jN=/-([a-z])?/gi,B2=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,NN=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,EN=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,LN=/^\[([^\]]*)\] ?\[([^\]]*)\]/,PN=/(\[|\])/g,TN=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,RN=/\t/g,MN=/^ *\| */,_N=/(^ *\||\| *$)/g,ON=/ *$/,IN=/^ *:-+: *$/,zN=/^ *:-+ *$/,FN=/^ *-+: *$/,DN=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,HN=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,BN=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,VN=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,WN=/^\\([^0-9A-Za-z\s])/,$N=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,XN=/^\n+/,YN=/^([ \t]*)/,UN=/\\([^\\])/g,k0=/ *\n+$/,GN=/(?:^|\n)( *)$/,C1="(?:\\d+\\.)",S1="(?:[*+-])";function V2(e){return"( *)("+(e===1?C1:S1)+") +"}const W2=V2(1),$2=V2(2);function X2(e){return new RegExp("^"+(e===1?W2:$2))}const ZN=X2(1),qN=X2(2);function Y2(e){return new RegExp("^"+(e===1?W2:$2)+"[^\\n]*(?:\\n(?!\\1"+(e===1?C1:S1)+" )[^\\n]*)*(\\n|$)","gm")}const U2=Y2(1),G2=Y2(2);function Z2(e){const t=e===1?C1:S1;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const q2=Z2(1),Q2=Z2(2);function C0(e,t){const r=t===1,s=r?q2:Q2,o=r?U2:G2,c=r?ZN:qN;return{t(p,v,C){const A=GN.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(cN,` `).match(o);let P=!1;return{p:E.map(function(I,_){const H=c.exec(I)[0].length,B=new RegExp("^ {1,"+H+"}","gm"),Z=I.replace(B,"").replace(c,""),W=_===E.length-1,V=Z.indexOf(` `)!==-1||W&&P;P=V;const R=C._,K=C.o;let ee;C.o=!0,V?(C._=!1,ee=Z.replace(k0,` @@ -69,13 +69,14 @@ Error generating stack: `+c.message+` `).map(function(A){return S0(A,v,C)})}(e[3],t,r);return r._=!1,{S:o,A:c,L:s,type:"table"}}function A0(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 yi(e){return function(t,r){return r._||r.u?null:e.exec(t)}}function Ta(e){return function(t){return e.exec(t)}}function iE(e,t,r){if(t._||t.u||r&&!r.endsWith(` `))return null;let s="";e.split(` `).every(c=>!K2.some(p=>p.test(c))&&(s+=c+` -`,c.trim()));const o=s.trimEnd();return o==""?null:[s,o]}function vs(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 j0(e){return e.replace(UN,"$1")}function rc(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 nE(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 sE(e,t,r){return r._=!1,e(t,r)}const Uu=(e,t,r)=>({v:rc(t,e[1],r)});function Gu(){return{}}function Zu(){return null}function aE(...e){return e.filter(Boolean).join(" ")}function qu(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 oE(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||eE,t.namedCodesToUnicode=t.namedCodesToUnicode?Fn({},w0,t.namedCodesToUnicode):w0;const r=t.createElement||Y.createElement;function s(_,H,...B){const Z=qu(t.overrides,`${_}.props`,{});return r(function(W,V){const R=qu(V,W);return R?typeof R=="function"||typeof R=="object"&&"render"in R?R:qu(V,`${W}.component`,W):W}(_,t.overrides),Fn({},H,Z,{className:aE(H==null?void 0:H.className,Z.className)||void 0}),...B)}function o(_){let H=!1;t.forceInline?H=!0:t.forceBlock||(H=TN.test(_)===!1);const B=E(A(H?_:`${_.trimEnd().replace(XN,"")} +`,c.trim()));const o=s.trimEnd();return o==""?null:[s,o]}function vs(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 j0(e){return e.replace(UN,"$1")}function ic(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 nE(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 sE(e,t,r){return r._=!1,e(t,r)}const Uu=(e,t,r)=>({v:ic(t,e[1],r)});function Gu(){return{}}function Zu(){return null}function aE(...e){return e.filter(Boolean).join(" ")}function qu(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 oE(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||eE,t.namedCodesToUnicode=t.namedCodesToUnicode?Fn({},w0,t.namedCodesToUnicode):w0;const r=t.createElement||Y.createElement;function s(_,H,...B){const Z=qu(t.overrides,`${_}.props`,{});return r(function(W,V){const R=qu(V,W);return R?typeof R=="function"||typeof R=="object"&&"render"in R?R:qu(V,`${W}.component`,W):W}(_,t.overrides),Fn({},H,Z,{className:aE(H==null?void 0:H.className,Z.className)||void 0}),...B)}function o(_){let H=!1;t.forceInline?H=!0:t.forceBlock||(H=TN.test(_)===!1);const B=E(A(H?_:`${_.trimEnd().replace(XN,"")} -`,{_:H}));for(;typeof B[B.length-1]=="string"&&!B[B.length-1].trim();)B.pop();if(t.wrapper===null)return B;const Z=t.wrapper||(H?"span":"div");let W;if(B.length>1||t.forceWrapper)W=B;else{if(B.length===1)return W=B[0],typeof W=="string"?s("span",{key:"outer"},W):W;W=null}return Y.createElement(Z,{key:"outer"},W)}function c(_){const H=_.match(oN);return H?H.reduce(function(B,Z,W){const V=Z.indexOf("=");if(V!==-1){const R=function(Q){return Q.indexOf("-")!==-1&&Q.match(wN)===null&&(Q=Q.replace(jN,function(J,fe){return fe.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=b0[R]||R,X=B[ee]=function(Q,J){return Q==="style"?J.split(/;\s?/).reduce(function(fe,le){const Ne=le.slice(0,le.indexOf(":"));return fe[Ne.replace(/(-[a-z])/g,ve=>ve[1].toUpperCase())]=le.slice(Ne.length+1).trim(),fe},{}):Q==="href"?vs(J):(J.match(kN)&&(J=J.slice(1,J.length-1)),J==="true"||J!=="false"&&J)}(R,K);typeof X=="string"&&(Mf.test(X)||_f.test(X))&&(B[ee]=Y.cloneElement(o(X.trim()),{key:W}))}else Z!=="style"&&(B[b0[Z]||Z]=!0);return B},{}):null}const p=[],v={},C={blockQuote:{t:yi(_2),i:Ge.HIGH,l:(_,H,B)=>({v:H(_[0].replace(dN,""),B)}),h:(_,H,B)=>s("blockquote",{key:B.k},H(_.v,B))},breakLine:{t:Ta(uN),i:Ge.HIGH,l:Gu,h:(_,H,B)=>s("br",{key:B.k})},breakThematic:{t:yi(hN),i:Ge.HIGH,l:Gu,h:(_,H,B)=>s("hr",{key:B.k})},codeBlock:{t:yi(I2),i:Ge.MAX,l:_=>({v:_[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(_,H,B)=>s("pre",{key:B.k},s("code",Fn({},_.O,{className:_.M?`lang-${_.M}`:""}),_.v))},codeFenced:{t:yi(O2),i:Ge.MAX,l:_=>({O:c(_[3]||""),v:_[4],M:_[2]||void 0,type:"codeBlock"})},codeInline:{t:Yi(fN),i:Ge.LOW,l:_=>({v:_[2]}),h:(_,H,B)=>s("code",{key:B.k},_.v)},footnote:{t:yi(mN),i:Ge.MAX,l:_=>(p.push({I:_[2],j:_[1]}),{}),h:Zu},footnoteReference:{t:Xi(xN),i:Ge.HIGH,l:_=>({v:_[1],B:`#${t.slugify(_[1])}`}),h:(_,H,B)=>s("a",{key:B.k,href:vs(_.B)},s("sup",{key:B.k},_.v))},gfmTask:{t:Xi(yN),i:Ge.HIGH,l:_=>({R:_[1].toLowerCase()==="x"}),h:(_,H,B)=>s("input",{checked:_.R,key:B.k,readOnly:!0,type:"checkbox"})},heading:{t:yi(t.enforceAtxHeadings?F2:z2),i:Ge.HIGH,l:(_,H,B)=>({v:rc(H,_[2],B),T:t.slugify(_[2]),C:_[1].length}),h:(_,H,B)=>s(`h${_.C}`,{id:_.T,key:B.k},H(_.v,B))},headingSetext:{t:yi(D2),i:Ge.MAX,l:(_,H,B)=>({v:rc(H,_[1],B),C:_[2]==="="?1:2,type:"heading"})},htmlComment:{t:Ta(H2),i:Ge.HIGH,l:()=>({}),h:Zu},image:{t:Yi(KN),i:Ge.HIGH,l:_=>({D:_[1],B:j0(_[2]),F:_[3]}),h:(_,H,B)=>s("img",{key:B.k,alt:_.D||void 0,title:_.F||void 0,src:vs(_.B)})},link:{t:Xi(QN),i:Ge.LOW,l:(_,H,B)=>({v:nE(H,_[1],B),B:j0(_[2]),F:_[3]}),h:(_,H,B)=>s("a",{key:B.k,href:vs(_.B),title:_.F},H(_.v,B))},linkAngleBraceStyleDetector:{t:Xi(AN),i:Ge.MAX,l:_=>({v:[{v:_[1],type:"text"}],B:_[1],type:"link"})},linkBareUrlDetector:{t:(_,H)=>H.N?null:Xi(CN)(_,H),i:Ge.MAX,l:_=>({v:[{v:_[1],type:"text"}],B:_[1],F:void 0,type:"link"})},linkMailtoDetector:{t:Xi(SN),i:Ge.MAX,l(_){let H=_[1],B=_[1];return lN.test(B)||(B="mailto:"+B),{v:[{v:H.replace("mailto:",""),type:"text"}],B,type:"link"}}},orderedList:C0(s,1),unorderedList:C0(s,2),newlineCoalescer:{t:yi(pN),i:Ge.LOW,l:Gu,h:()=>` -`},paragraph:{t:iE,i:Ge.LOW,l:Uu,h:(_,H,B)=>s("p",{key:B.k},H(_.v,B))},ref:{t:Xi(NN),i:Ge.MAX,l:_=>(v[_[1]]={B:_[2],F:_[4]},{}),h:Zu},refImage:{t:Yi(EN),i:Ge.MAX,l:_=>({D:_[1]||void 0,P:_[2]}),h:(_,H,B)=>s("img",{key:B.k,alt:_.D,src:vs(v[_.P].B),title:v[_.P].F})},refLink:{t:Xi(LN),i:Ge.MAX,l:(_,H,B)=>({v:H(_[1],B),Z:H(_[0].replace(PN,"\\$1"),B),P:_[2]}),h:(_,H,B)=>v[_.P]?s("a",{key:B.k,href:vs(v[_.P].B),title:v[_.P].F},H(_.v,B)):s("span",{key:B.k},H(_.Z,B))},table:{t:yi(B2),i:Ge.HIGH,l:rE,h:(_,H,B)=>s("table",{key:B.k},s("thead",null,s("tr",null,_.L.map(function(Z,W){return s("th",{key:W,style:A0(_,W)},H(Z,B))}))),s("tbody",null,_.A.map(function(Z,W){return s("tr",{key:W},Z.map(function(V,R){return s("td",{key:R,style:A0(_,R)},H(V,B))}))})))},tableSeparator:{t:function(_,H){return H.$?(H._=!0,MN.exec(_)):null},i:Ge.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Ta($N),i:Ge.MIN,l:_=>({v:_[0].replace(bN,(H,B)=>t.namedCodesToUnicode[B]?t.namedCodesToUnicode[B]:H)}),h:_=>_.v},textBolded:{t:Yi(DN),i:Ge.MED,l:(_,H,B)=>({v:H(_[2],B)}),h:(_,H,B)=>s("strong",{key:B.k},H(_.v,B))},textEmphasized:{t:Yi(HN),i:Ge.LOW,l:(_,H,B)=>({v:H(_[2],B)}),h:(_,H,B)=>s("em",{key:B.k},H(_.v,B))},textEscaped:{t:Yi(WN),i:Ge.HIGH,l:_=>({v:_[1],type:"text"})},textMarked:{t:Yi(BN),i:Ge.LOW,l:Uu,h:(_,H,B)=>s("mark",{key:B.k},H(_.v,B))},textStrikethroughed:{t:Yi(VN),i:Ge.LOW,l:Uu,h:(_,H,B)=>s("del",{key:B.k},H(_.v,B))}};t.disableParsingRawHTML!==!0&&(C.htmlBlock={t:Ta(Mf),i:Ge.HIGH,l(_,H,B){const[,Z]=_[3].match(YN),W=new RegExp(`^${Z}`,"gm"),V=_[3].replace(W,""),R=(K=V,JN.some(J=>J.test(K))?sE:rc);var K;const ee=_[1].toLowerCase(),X=aN.indexOf(ee)!==-1;B.N=B.N||ee==="a";const Q=X?_[3]:R(H,V,B);return B.N=!1,{O:c(_[2]),v:Q,G:X,H:X?ee:_[1]}},h:(_,H,B)=>s(_.H,Fn({key:B.k},_.O),_.G?_.v:H(_.v,B))},C.htmlSelfClosing={t:Ta(_f),i:Ge.HIGH,l:_=>({O:c(_[2]||""),H:_[1]}),h:(_,H,B)=>s(_.H,Fn({},_.O,{key:B.k}))});const A=function(_){let H=Object.keys(_);function B(Z,W){let V=[],R="";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,sN);return Y.cloneElement(oE(t,r),s)};function lE({currentChatDetails:e,smartSuggestionOnClick:t}){const[r,s]=Y.useState(!0),o=Jr(),c=e.smartSuggestions.suggestions;async function p(v,C){if(e.isExceptionOccured)if(e.chatType==="daily_analysis"){const[A,E]=await J9(e);o.push(`/chat/${A.uuid}?msg=${E}`)}else if(e.team_name){const[A,E]=await tk(e.id);o.push(`/chat/${A.uuid}?msg=${E}`)}else s(!1),C(null,!1,!0);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(Jc,{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 cE=(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 B[B.length-1]=="string"&&!B[B.length-1].trim();)B.pop();if(t.wrapper===null)return B;const Z=t.wrapper||(H?"span":"div");let W;if(B.length>1||t.forceWrapper)W=B;else{if(B.length===1)return W=B[0],typeof W=="string"?s("span",{key:"outer"},W):W;W=null}return Y.createElement(Z,{key:"outer"},W)}function c(_){const H=_.match(oN);return H?H.reduce(function(B,Z,W){const V=Z.indexOf("=");if(V!==-1){const R=function(Q){return Q.indexOf("-")!==-1&&Q.match(wN)===null&&(Q=Q.replace(jN,function(J,fe){return fe.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=b0[R]||R,X=B[ee]=function(Q,J){return Q==="style"?J.split(/;\s?/).reduce(function(fe,le){const Ne=le.slice(0,le.indexOf(":"));return fe[Ne.replace(/(-[a-z])/g,ve=>ve[1].toUpperCase())]=le.slice(Ne.length+1).trim(),fe},{}):Q==="href"?vs(J):(J.match(kN)&&(J=J.slice(1,J.length-1)),J==="true"||J!=="false"&&J)}(R,K);typeof X=="string"&&(Mf.test(X)||_f.test(X))&&(B[ee]=Y.cloneElement(o(X.trim()),{key:W}))}else Z!=="style"&&(B[b0[Z]||Z]=!0);return B},{}):null}const p=[],v={},C={blockQuote:{t:yi(_2),i:Ge.HIGH,l:(_,H,B)=>({v:H(_[0].replace(dN,""),B)}),h:(_,H,B)=>s("blockquote",{key:B.k},H(_.v,B))},breakLine:{t:Ta(uN),i:Ge.HIGH,l:Gu,h:(_,H,B)=>s("br",{key:B.k})},breakThematic:{t:yi(hN),i:Ge.HIGH,l:Gu,h:(_,H,B)=>s("hr",{key:B.k})},codeBlock:{t:yi(I2),i:Ge.MAX,l:_=>({v:_[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(_,H,B)=>s("pre",{key:B.k},s("code",Fn({},_.O,{className:_.M?`lang-${_.M}`:""}),_.v))},codeFenced:{t:yi(O2),i:Ge.MAX,l:_=>({O:c(_[3]||""),v:_[4],M:_[2]||void 0,type:"codeBlock"})},codeInline:{t:Yi(fN),i:Ge.LOW,l:_=>({v:_[2]}),h:(_,H,B)=>s("code",{key:B.k},_.v)},footnote:{t:yi(mN),i:Ge.MAX,l:_=>(p.push({I:_[2],j:_[1]}),{}),h:Zu},footnoteReference:{t:Xi(xN),i:Ge.HIGH,l:_=>({v:_[1],B:`#${t.slugify(_[1])}`}),h:(_,H,B)=>s("a",{key:B.k,href:vs(_.B)},s("sup",{key:B.k},_.v))},gfmTask:{t:Xi(yN),i:Ge.HIGH,l:_=>({R:_[1].toLowerCase()==="x"}),h:(_,H,B)=>s("input",{checked:_.R,key:B.k,readOnly:!0,type:"checkbox"})},heading:{t:yi(t.enforceAtxHeadings?F2:z2),i:Ge.HIGH,l:(_,H,B)=>({v:ic(H,_[2],B),T:t.slugify(_[2]),C:_[1].length}),h:(_,H,B)=>s(`h${_.C}`,{id:_.T,key:B.k},H(_.v,B))},headingSetext:{t:yi(D2),i:Ge.MAX,l:(_,H,B)=>({v:ic(H,_[1],B),C:_[2]==="="?1:2,type:"heading"})},htmlComment:{t:Ta(H2),i:Ge.HIGH,l:()=>({}),h:Zu},image:{t:Yi(KN),i:Ge.HIGH,l:_=>({D:_[1],B:j0(_[2]),F:_[3]}),h:(_,H,B)=>s("img",{key:B.k,alt:_.D||void 0,title:_.F||void 0,src:vs(_.B)})},link:{t:Xi(QN),i:Ge.LOW,l:(_,H,B)=>({v:nE(H,_[1],B),B:j0(_[2]),F:_[3]}),h:(_,H,B)=>s("a",{key:B.k,href:vs(_.B),title:_.F},H(_.v,B))},linkAngleBraceStyleDetector:{t:Xi(AN),i:Ge.MAX,l:_=>({v:[{v:_[1],type:"text"}],B:_[1],type:"link"})},linkBareUrlDetector:{t:(_,H)=>H.N?null:Xi(CN)(_,H),i:Ge.MAX,l:_=>({v:[{v:_[1],type:"text"}],B:_[1],F:void 0,type:"link"})},linkMailtoDetector:{t:Xi(SN),i:Ge.MAX,l(_){let H=_[1],B=_[1];return lN.test(B)||(B="mailto:"+B),{v:[{v:H.replace("mailto:",""),type:"text"}],B,type:"link"}}},orderedList:C0(s,1),unorderedList:C0(s,2),newlineCoalescer:{t:yi(pN),i:Ge.LOW,l:Gu,h:()=>` +`},paragraph:{t:iE,i:Ge.LOW,l:Uu,h:(_,H,B)=>s("p",{key:B.k},H(_.v,B))},ref:{t:Xi(NN),i:Ge.MAX,l:_=>(v[_[1]]={B:_[2],F:_[4]},{}),h:Zu},refImage:{t:Yi(EN),i:Ge.MAX,l:_=>({D:_[1]||void 0,P:_[2]}),h:(_,H,B)=>s("img",{key:B.k,alt:_.D,src:vs(v[_.P].B),title:v[_.P].F})},refLink:{t:Xi(LN),i:Ge.MAX,l:(_,H,B)=>({v:H(_[1],B),Z:H(_[0].replace(PN,"\\$1"),B),P:_[2]}),h:(_,H,B)=>v[_.P]?s("a",{key:B.k,href:vs(v[_.P].B),title:v[_.P].F},H(_.v,B)):s("span",{key:B.k},H(_.Z,B))},table:{t:yi(B2),i:Ge.HIGH,l:rE,h:(_,H,B)=>s("table",{key:B.k},s("thead",null,s("tr",null,_.L.map(function(Z,W){return s("th",{key:W,style:A0(_,W)},H(Z,B))}))),s("tbody",null,_.A.map(function(Z,W){return s("tr",{key:W},Z.map(function(V,R){return s("td",{key:R,style:A0(_,R)},H(V,B))}))})))},tableSeparator:{t:function(_,H){return H.$?(H._=!0,MN.exec(_)):null},i:Ge.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Ta($N),i:Ge.MIN,l:_=>({v:_[0].replace(bN,(H,B)=>t.namedCodesToUnicode[B]?t.namedCodesToUnicode[B]:H)}),h:_=>_.v},textBolded:{t:Yi(DN),i:Ge.MED,l:(_,H,B)=>({v:H(_[2],B)}),h:(_,H,B)=>s("strong",{key:B.k},H(_.v,B))},textEmphasized:{t:Yi(HN),i:Ge.LOW,l:(_,H,B)=>({v:H(_[2],B)}),h:(_,H,B)=>s("em",{key:B.k},H(_.v,B))},textEscaped:{t:Yi(WN),i:Ge.HIGH,l:_=>({v:_[1],type:"text"})},textMarked:{t:Yi(BN),i:Ge.LOW,l:Uu,h:(_,H,B)=>s("mark",{key:B.k},H(_.v,B))},textStrikethroughed:{t:Yi(VN),i:Ge.LOW,l:Uu,h:(_,H,B)=>s("del",{key:B.k},H(_.v,B))}};t.disableParsingRawHTML!==!0&&(C.htmlBlock={t:Ta(Mf),i:Ge.HIGH,l(_,H,B){const[,Z]=_[3].match(YN),W=new RegExp(`^${Z}`,"gm"),V=_[3].replace(W,""),R=(K=V,JN.some(J=>J.test(K))?sE:ic);var K;const ee=_[1].toLowerCase(),X=aN.indexOf(ee)!==-1;B.N=B.N||ee==="a";const Q=X?_[3]:R(H,V,B);return B.N=!1,{O:c(_[2]),v:Q,G:X,H:X?ee:_[1]}},h:(_,H,B)=>s(_.H,Fn({key:B.k},_.O),_.G?_.v:H(_.v,B))},C.htmlSelfClosing={t:Ta(_f),i:Ge.HIGH,l:_=>({O:c(_[2]||""),H:_[1]}),h:(_,H,B)=>s(_.H,Fn({},_.O,{key:B.k}))});const A=function(_){let H=Object.keys(_);function B(Z,W){let V=[],R="";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,sN);return Y.cloneElement(oE(t,r),s)};function lE({currentChatDetails:e,smartSuggestionOnClick:t}){const[r,s]=Y.useState(!0),o=Jr(),c=e.smartSuggestions.suggestions;async function p(v,C){if(e.isExceptionOccured)if(e.chatType==="daily_analysis"){const[A,E]=await J9(e);o.push(`/chat/${A.uuid}?msg=${E}`)}else if(e.team_name){const[A,E]=await tk(e.id);o.push(`/chat/${A.uuid}?msg=${E}`)}else s(!1),C(null,!1,!0);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(to,{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 cE=(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 dE({suggestions:e,smartSuggestionOnClick:t,chatType:r,userSelectedActionMessage:s}){const[o,c]=Y.useState([]),p=v=>{const C=v.target.value;v.target.checked?c([...o,C]):c(o.filter(A=>A!==C))};return Y.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(),cE(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 uE=({sentence:e,speed:t=100,onStreamAnimationComplete:r})=>{const[s,o]=Y.useState("");return Y.useEffect(()=>{if(s.length{o(p=>e.substring(0,p.length+1))},t);return()=>clearTimeout(c)}else r&&r()},[s,e,t]),f.jsx(Jc,{children:s})},hE=({messages:e,maxHeight:t,isOpenOnLoad:r})=>{const[s,o]=Y.useState(!r),c=Y.useRef(null),[p,v]=Y.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,I=P.scrollHeight-P.scrollTop===P.clientHeight;v(I)};return Y.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)}})})]})},N0=({agentConversationHistory:e,initialState:t=!1,isAgentWindow:r=!1})=>(Y.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(hE,{messages:e,maxHeight:400,isOpenOnLoad:r})})}));function fE({conversations:e,currentChatDetails:t,handleFormSubmit:r,userSelectedActionMessage:s,onStreamAnimationComplete:o}){var P,I;const[c,p]=Y.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 Kc("newMessageFromTeam",_=>p(_)),Kc("streamFromTeamFinished",()=>p("")),f.jsxs("div",{"data-testid":"conversations-wrapper",className:"w-full",children:[e.map((_,H)=>{const B=_.role==="user",Z=B?"captn-light-blue":"captn-dark-blue",W=B?"captn-dark-blue":"captn-light-cream",V=B?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:c2,className:"w-full h-full",style:{borderRadius:"50%"}});return f.jsx("div",{children:_.isLoading?f.jsx(d2,{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 ${B?"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&&!B&&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(uE,{sentence:_.message,speed:5,onStreamAnimationComplete:o}):f.jsx(Jc,{children:_.message})}),(H!==E||H===E&&B)&&f.jsx("div",{className:"chat-conversations text-base flex flex-col gap-2",children:f.jsx(Jc,{children:_.message})}),_.agentConversationHistory&&f.jsx(N0,{agentConversationHistory:_.agentConversationHistory})]})})},H)}),(t==null?void 0:t.team_status)==="inprogress"&&c&&f.jsx(N0,{agentConversationHistory:c,initialState:!0,isAgentWindow:!0}),A&&!(t!=null&&t.streamAgentResponse)&&f.jsx("div",{"data-testid":"smart-suggestions",className:"fadeIn",children:((I=t.smartSuggestions)==null?void 0:I.type)=="oneOf"?f.jsx(lE,{currentChatDetails:t,smartSuggestionOnClick:r}):f.jsx(dE,{suggestions:t.smartSuggestions.suggestions,smartSuggestionOnClick:r,chatType:t.chatType,userSelectedActionMessage:s})})]})}const pE=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Or();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(Pd,{to:"/login"});else return c?f.jsx(f1,{}):s?f.jsx(f.Fragment,{children:f.jsx(e,{...t,user:r})}):f.jsx(f.Fragment,{children:f.jsx(e,{...t,user:r})})},gE=({user:e})=>{const[t,r]=Y.useState(!1),{socket:s}=Nj(),o=oa(),{pathname:c}=o,p=Jr(),v=new URLSearchParams(o.search),C=c.split("/").pop(),A=C==="chat"?null:C,{data:E}=Zn(dk,{chatUUID:A}),P=Number(E==null?void 0:E.id),{data:I,refetch:_}=Zn(ok,{chatId:P},{enabled:!!P}),{data:H,refetch:B}=Zn(ck,{chatId:P},{enabled:!!P});Y.useEffect(()=>{I&&I.chatType==="daily_analysis"&&di({id:P,data:{shouldShowChat:!0}})},[A,I]),Kc("smartSuggestionsAddedToDB",Z),Kc("streamFromTeamFinished",Z);function Z(){B(),_()}const W=()=>{p.push({search:""})},V=()=>{r(!t)},R=async(J,fe=!1,le=!1)=>{if(I.userId!==e.id)window.alert("Error: This chat does not belong to you.");else{let Ne;try{await Rj(P,fe,W);const ve=await Mj(P,J,le);Ne=await _j(P,J,le),I.customerBrief||I.chatType==="daily_analysis"?await Oj(s,I,Ne,J,ve,P):await Ij(P,I,Ne,s,ve,V)}catch(ve){await Fj(ve,P,Ne,p)}}},K=()=>{di({id:P,data:{streamAgentResponse:!1}})};let ee=v.get("msg");ee&&(I!=null&&I.userRespondedWithNextAction)&&(ee=null);const X=v.get("selected_user_action");let Q=null;return X&&(I!=null&&I.userRespondedWithNextAction||I!=null&&I.proposedUserAction&&(Q=I.proposedUserAction[Number(X)-1])),f.jsx(nN,{handleFormSubmit:R,currentChatDetails:I,triggerChatFormSubmitMsg:ee,refetchAllChatDetails:t,children:f.jsx("div",{className:"flex h-full flex-col",children:I?f.jsx("div",{className:"flex-1 overflow-hidden",children:H&&f.jsx(fE,{conversations:H,currentChatDetails:I,handleFormSubmit:R,userSelectedActionMessage:Q,onStreamAnimationComplete:K})}):f.jsx(xE,{})})})},mE=pE(gE);function xE(){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 vE=[{name:"Monthly Subscription",id:h1.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}],yE=()=>{const[e,t]=Y.useState(!1),{data:r,isLoading:s}=Or(),o=Jr();async function c(p){if(!r){o.push("/login");return}try{t(p);let v=await Nb(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:vE.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(QC,{className:"h-6 w-5 flex-none text-captn-cta-green","aria-hidden":"true"}),v]},v))})]}),r&&r.hasPaid?f.jsx("a",{href:a2,"aria-describedby":"manage-subscription",className:` +- `)}`;t(r)}};function dE({suggestions:e,smartSuggestionOnClick:t,chatType:r,userSelectedActionMessage:s}){const[o,c]=Y.useState([]),p=v=>{const C=v.target.value;v.target.checked?c([...o,C]):c(o.filter(A=>A!==C))};return Y.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(),cE(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 uE=({sentence:e,speed:t=100,onStreamAnimationComplete:r})=>{const[s,o]=Y.useState("");return Y.useEffect(()=>{if(s.length{o(p=>e.substring(0,p.length+1))},t);return()=>clearTimeout(c)}else r&&r()},[s,e,t]),f.jsx(to,{children:s})},hE=({messages:e,maxHeight:t,isOpenOnLoad:r})=>{const[s,o]=Y.useState(!r),c=Y.useRef(null),[p,v]=Y.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,I=P.scrollHeight-P.scrollTop===P.clientHeight;v(I)};return Y.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)}})})]})},N0=({agentConversationHistory:e,initialState:t=!1,isAgentWindow:r=!1})=>(Y.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(hE,{messages:e,maxHeight:400,isOpenOnLoad:r})})}));function fE({conversations:e,currentChatDetails:t,handleFormSubmit:r,userSelectedActionMessage:s,onStreamAnimationComplete:o}){var P,I;const[c,p]=Y.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 Jc("newMessageFromTeam",_=>p(_)),Jc("streamFromTeamFinished",()=>p("")),f.jsxs("div",{"data-testid":"conversations-wrapper",className:"w-full",children:[e.map((_,H)=>{const B=_.role==="user",Z=B?"captn-light-blue":"captn-dark-blue",W=B?"captn-dark-blue":"captn-light-cream",V=B?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:c2,className:"w-full h-full",style:{borderRadius:"50%"}});return f.jsx("div",{children:_.isLoading?f.jsx(d2,{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 ${B?"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&&!B&&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(uE,{sentence:_.message,speed:5,onStreamAnimationComplete:o}):f.jsx(to,{children:_.message})}),H!==E&&!B&&f.jsx("div",{className:"chat-conversations text-base flex flex-col gap-2",children:f.jsx(to,{children:_.message})}),B&&f.jsx("div",{className:"chat-conversations text-base flex flex-col gap-2",children:f.jsx(to,{children:`

${_.message.replaceAll(` +`,"
")}

`})}),_.agentConversationHistory&&f.jsx(N0,{agentConversationHistory:_.agentConversationHistory})]})})},H)}),(t==null?void 0:t.team_status)==="inprogress"&&c&&f.jsx(N0,{agentConversationHistory:c,initialState:!0,isAgentWindow:!0}),A&&!(t!=null&&t.streamAgentResponse)&&f.jsx("div",{"data-testid":"smart-suggestions",className:"fadeIn",children:((I=t.smartSuggestions)==null?void 0:I.type)=="oneOf"?f.jsx(lE,{currentChatDetails:t,smartSuggestionOnClick:r}):f.jsx(dE,{suggestions:t.smartSuggestions.suggestions,smartSuggestionOnClick:r,chatType:t.chatType,userSelectedActionMessage:s})})]})}const pE=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Or();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(Pd,{to:"/login"});else return c?f.jsx(f1,{}):s?f.jsx(f.Fragment,{children:f.jsx(e,{...t,user:r})}):f.jsx(f.Fragment,{children:f.jsx(e,{...t,user:r})})},gE=({user:e})=>{const[t,r]=Y.useState(!1),{socket:s}=Nj(),o=oa(),{pathname:c}=o,p=Jr(),v=new URLSearchParams(o.search),C=c.split("/").pop(),A=C==="chat"?null:C,{data:E}=Zn(dk,{chatUUID:A}),P=Number(E==null?void 0:E.id),{data:I,refetch:_}=Zn(ok,{chatId:P},{enabled:!!P}),{data:H,refetch:B}=Zn(ck,{chatId:P},{enabled:!!P});Y.useEffect(()=>{I&&I.chatType==="daily_analysis"&&di({id:P,data:{shouldShowChat:!0}})},[A,I]),Jc("smartSuggestionsAddedToDB",Z),Jc("streamFromTeamFinished",Z);function Z(){B(),_()}const W=()=>{p.push({search:""})},V=()=>{r(!t)},R=async(J,fe=!1,le=!1)=>{if(I.userId!==e.id)window.alert("Error: This chat does not belong to you.");else{let Ne;try{await Rj(P,fe,W);const ve=await Mj(P,J,le);Ne=await _j(P,J,le),I.customerBrief||I.chatType==="daily_analysis"?await Oj(s,I,Ne,J,ve,P):await Ij(P,I,Ne,s,ve,V)}catch(ve){await Fj(ve,P,Ne,p)}}},K=()=>{di({id:P,data:{streamAgentResponse:!1}})};let ee=v.get("msg");ee&&(I!=null&&I.userRespondedWithNextAction)&&(ee=null);const X=v.get("selected_user_action");let Q=null;return X&&(I!=null&&I.userRespondedWithNextAction||I!=null&&I.proposedUserAction&&(Q=I.proposedUserAction[Number(X)-1])),f.jsx(nN,{handleFormSubmit:R,currentChatDetails:I,triggerChatFormSubmitMsg:ee,refetchAllChatDetails:t,children:f.jsx("div",{className:"flex h-full flex-col",children:I?f.jsx("div",{className:"flex-1 overflow-hidden",children:H&&f.jsx(fE,{conversations:H,currentChatDetails:I,handleFormSubmit:R,userSelectedActionMessage:Q,onStreamAnimationComplete:K})}):f.jsx(xE,{})})})},mE=pE(gE);function xE(){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 vE=[{name:"Monthly Subscription",id:h1.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}],yE=()=>{const[e,t]=Y.useState(!1),{data:r,isLoading:s}=Or(),o=Jr();async function c(p){if(!r){o.push("/login");return}try{t(p);let v=await Nb(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:vE.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(QC,{className:"h-6 w-5 flex-none text-captn-cta-green","aria-hidden":"true"}),v]},v))})]}),r&&r.hasPaid?f.jsx("a",{href:a2,"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' @@ -98,7 +99,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
`);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(),R.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 R.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 R.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 R.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 Le,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=R.extend(u,T)}var z=R.extend(h,window.Apex);return u=R.extend(z,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 Le;(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=R.extend(i.yaxis,window.Apex.yaxis)),i.yaxis.constructor!==Array?i.yaxis=[R.extend(a.yAxis,i.yaxis)]:i.yaxis=R.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=R.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 Le;return i.annotations.yaxis=R.extendArray(i.annotations.yaxis!==void 0?i.annotations.yaxis:[],n.yAxisAnnotation),i}},{key:"extendXAxisAnnotations",value:function(i){var n=new Le;return i.annotations.xaxis=R.extendArray(i.annotations.xaxis!==void 0?i.annotations.xaxis:[],n.xAxisAnnotation),i}},{key:"extendPointAnnotations",value:function(i){var n=new Le;return i.annotations.points=R.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=R.extend({},i),n.initialSeries=R.clone(i.series),n.lastXAxis=R.clone(n.initialConfig.xaxis),n.lastYAxis=R.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=R.hexToRgba(h,x)):h.indexOf("rgba")>-1&&(x=R.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=R.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?R.rgb2hex(n):n):y.shadeColor(parseFloat(u.gradient.shadeIntensity),n.indexOf("rgb")>-1?R.rgb2hex(n):n);else if(u.gradient.gradientToColors[g.seriesNumber]){var L=u.gradient.gradientToColors[g.seriesNumber];h=L,L.indexOf("rgba")>-1&&(j=R.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=R.rgb2hex(w)),h.indexOf("rgb")>-1&&(h=R.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){R.isNumber(x.y[S])?L+=" w".concat(R.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 z=h.x[b],D=h.y[b];if(j=j||0,D!==null&&l.globals.series[u][w]!==void 0||(S=!1),S){var m=this.drawPoint(z,D,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,z=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&&(z=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:z,"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 D=g.config.chart.dropShadow;b.dropShadow(T,D,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,M,F,$=g.config.chart.animations.dynamicAnimation.speed;(F=g.globals.previousPaths[d]&&g.globals.previousPaths[d][h])!=null&&(k=F.x,N=F.y,M=F.r!==void 0?F.r:l);for(var U=0;Ug.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 z=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)&&(z=n.globals.dataLabels.style.colors[h]),typeof z=="function"&&(z=z({series:n.globals.series,seriesIndex:u,dataPointIndex:h,w:n})),S&&(z=S);var D=w.offsetX,m=w.offsetY;if(n.config.chart.type!=="bar"&&n.config.chart.type!=="rangeBar"||(D=0,m=0),T.drawnextLabel){var k=a.drawText({width:100,height:parseInt(w.style.fontSize,10),x:l+D,y:d+m,foreColor:z,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=R.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 _e(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 _e(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(R.parseNumber(i[n].data[u][4])):this.twoDSeries.push(R.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=B(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 R.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}(),fr=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,z;n.length>0?(T=n[l].unit,z=null,n.forEach(function(N){N.unit==="month"?z="year":N.unit==="day"?z="month":N.unit==="hour"?z="day":N.unit==="minute"&&(z="hour")}),S=z===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 D=new X(this.ctx),m={};m=g.globals.rotateXLabels&&h?D.getTextRects(y,parseInt(u,10),null,"rotate(".concat(g.config.xaxis.labels.rotate," 0 0)"),!1):D.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}(),us=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(!R.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&&R.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(M,F){return x.globals.collapsedSeriesIndices.indexOf(F)===-1?M:[]}),T=function(M){return x.config.xaxis.type==="datetime"&&String(M).length>=10},z=Math.max.apply(Math,B(a.map(function(M){return M.data?M.data.length:0}))),D=new Nt(this.ctx),m=new fr(this.ctx),k=function(M){var F="";if(x.globals.axisCharts){if(x.config.xaxis.type==="category"||x.config.xaxis.convertedCatToNumeric)if(x.globals.isBarHorizontal){var $=x.globals.yLabelFormatters[0],U=new _e(n.ctx).getActiveConfigSeriesIndex();F=$(x.globals.labels[M],{seriesIndex:U,dataPointIndex:M,w:x})}else F=m.getLabel(x.globals.labels,x.globals.timescaleLabels,0,M).text;x.config.xaxis.type==="datetime"&&(x.config.xaxis.categories.length?F=x.config.xaxis.categories[M]:x.config.labels.length&&(F=x.config.labels[M]))}else F=x.config.labels[M];return Array.isArray(F)&&(F=F.join(" ")),R.isNumber(F)?F:F.split(u).join("")},N=function(M,F){if(w.length&&F===0&&S.push(w.join(u)),M.data){M.data=M.data.length&&M.data||B(Array(z)).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,z=x.cssClass||w.config.xaxis.labels.style.cssClass,D=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),D=D+u(0,h)/2+w.config.xaxis.labels.offsetX}else h=w.globals.gridWidth/k,D=D+u(0,h)+w.config.xaxis.labels.offsetX;for(var M=function($){var U=D-u($,h)/2+w.config.xaxis.labels.offsetX;$===0&&m===1&&h/2===D&&k===1&&(U=w.globals.gridWidth/2);var G=g.axesUtils.getLabel(l,w.globals.timescaleLabels,U,$,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)),G=w.config.xaxis.tickAmount!==void 0&&w.config.xaxis.tickAmount!=="dataPoints"&&w.config.xaxis.type!=="datetime"?g.axesUtils.checkLabelBasedOnTickamount($,G,m):g.axesUtils.checkForOverflowingLabels($,G,m,y,b),w.config.xaxis.labels.show){var ne=n.drawText({x:G.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:G.text,textAnchor:"middle",fontWeight:G.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 ")+z});if(a.add(ne),ne.on("click",function(me){if(typeof w.config.chart.events.xAxisLabelClick=="function"){var we=Object.assign({},w,{labelIndex:$});w.config.chart.events.xAxisLabelClick(me,g.ctx,we)}}),i){var ie=document.createElementNS(w.globals.SVGNS,"title");ie.textContent=Array.isArray(G.text)?G.text.join(" "):G.text,ne.node.appendChild(ie),G.text!==""&&(y.push(G.text),b.push(G))}}$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}(),pa=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||!R.isNumber(i)&&!R.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,z=Math.abs(n-i);a.forceNiceScale&&(!d&&i>0&&i/z<.15&&(i=0,d=!0),!u&&n<0&&-n/z<.15&&(n=0,u=!0),z=Math.abs(n-i));var D=z/T,m=D,k=Math.floor(Math.log10(m)),N=Math.pow(10,k),M=Math.ceil(m/N);if(D=m=(M=y.niceScaleAllowedMagMsd[y.yValueDecimal===0?0:1][M])*N,y.isBarHorizontal&&a.stepSize&&a.type!=="datetime"?(D=a.stepSize,b=!0):b&&(D=a.stepSize),b&&a.forceNiceScale){var F=Math.floor(Math.log10(D));D*=Math.pow(10,k-F)}if(d&&u){var $=z/T;if(w)if(b)if(R.mod(z,D)!=0){var U=R.getGCD(D,$);D=$/U<10?U:$}else R.mod(D,$)==0?D=$:($=D,w=!1);else D=$;else if(b)R.mod(z,D)==0?$=D:D=$;else if(R.mod(z,D)==0)$=D;else{$=z/(T=Math.ceil(z/D));var G=R.getGCD(z,D);z/Gl&&(i=n-D*S,i+=D*Math.floor((te-i)/D))}else d&&(n=w?i+D*T:D*Math.ceil(n/D));else if(w){var ne=D/(n-i>n?1:2),ie=ne*Math.floor(i/ne);Math.abs(ie-i)<=ne/2?n=(i=ie)+D*T:i=(n=ne*Math.ceil(n/ne))-D*T}else i=D*Math.floor(i/D),n=D*Math.ceil(n/D);z=Math.abs(n-i),D=R.getGCD(z,D),T=Math.round(z/D)}if(w||d||u||(T=Math.ceil((z-g)/(D+g)))>16&&R.getPrimeFactors(T).length<2&&T++,y.isMultipleYAxis&&y.multiAxisTickAmount==0&&(y.multiAxisTickAmount=T),T>l&&(!w&&!b||a.forceNiceScale)){var me=R.getPrimeFactors(T),we=me.length-1,Pe=T;e:for(var Oe=0;OeIr);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&&R.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&&R.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,z){if(T.name===L){d[S].push(z),u[z]=S;var D=h.indexOf(z);h.splice(D,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(F){return Number.MIN_VALUE}),j=u.seriesX[x[0]].map(function(F){return Number.MIN_VALUE}),L=u.seriesX[x[0]].map(function(F){return Number.MIN_VALUE}),T=d.series[x[0]].type,z=0;z=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=B(new Set((w=[]).concat.apply(w,B(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,z=L;d.chart.type==="candlestick"?(T=u.seriesCandleL,z=u.seriesCandleH):d.chart.type==="boxPlot"?(T=u.seriesCandleO,z=u.seriesCandleC):u.isRangeData&&(T=u.seriesRangeStart,z=u.seriesRangeEnd);for(var D=i;DT[D][k]&&T[D][k]<0&&(g=T[D][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}(),Jo=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 fr(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 z=function(U){var G=L[U];G=j(G,U,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 we=l.drawText({x:te,y:S+b/10+me+1,text:G,textAnchor:ne,fontSize:u,fontFamily:h,fontWeight:g,maxWidth:a.config.yaxis[i].labels.maxWidth,foreColor:Array.isArray(ie)?ie[U]:ie,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+d.cssClass});U===b&&(T=we),y.add(we);var Pe=document.createElementNS(a.globals.SVGNS,"title");if(Pe.textContent=Array.isArray(G)?G.join(" "):G,we.node.appendChild(Pe),a.config.yaxis[i].labels.rotate!==0){var Oe=l.rotateAroundCenter(T.node),Ve=l.rotateAroundCenter(we.node);we.node.setAttribute("transform","rotate(".concat(a.config.yaxis[i].labels.rotate," ").concat(Oe.x," ").concat(Ve.y,")"))}S+=w},D=b;D>=0;D--)z(D);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 M=a.config.yaxis[i].axisBorder,F=31+M.offsetX;if(a.config.yaxis[i].opposite&&(F=-31-M.offsetX),M.show){var $=l.drawLine(F,a.globals.translateY+M.offsetY-2,F,a.globals.gridHeight+a.globals.translateY+M.offsetY+2,M.color,0,M.width);x.add($)}return a.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(F,b,M,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 z=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(z),z.tspan(j);var D=document.createElementNS(n.globals.SVGNS,"title");D.textContent=j,z.node.appendChild(D),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=R.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=R.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}(),N1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.documentEvent=R.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=R.extend(ve,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 Jo(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,z=d.opacity,D=i.config.xaxis.crosshairs.fill.color;if(i.config.xaxis.crosshairs.show){u==="gradient"&&(D=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;(!R.isNumber(k)||k<0)&&(k=0);var N=i.config.xaxis.crosshairs.width;(!R.isNumber(N)||N<0)&&(N=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:k,width:N,height:k,fill:D,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:z})),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=R.extend(w,x),x=R.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,B(l));a=n[l.indexOf(d)]}return a}}]),O}(),Te=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=R.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=R.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((F=String(b(N,g)))===null||F===void 0?void 0:F.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=R.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),z="rotate(".concat(u.labels.rotate," 0 0)"),D=T.getTextRects(S,u.labels.style.fontSize,u.labels.style.fontFamily,z,!1),m=D;S!==j&&(m=T.getTextRects(j,u.labels.style.fontSize,u.labels.style.fontFamily,z,!1)),a.push({width:(y>m.width||y>D.width?y:m.width>D.width?m.width:D.width)+l,height:m.height>D.height?m.height:D.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 fr(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 fr(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 Te(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 Jo(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(` +`:h,x=this.w;a||(a=x.config.series);var y,b,w=[],S=[],j="",L=x.globals.series.map(function(M,F){return x.globals.collapsedSeriesIndices.indexOf(F)===-1?M:[]}),T=function(M){return x.config.xaxis.type==="datetime"&&String(M).length>=10},z=Math.max.apply(Math,B(a.map(function(M){return M.data?M.data.length:0}))),D=new Nt(this.ctx),m=new fr(this.ctx),k=function(M){var F="";if(x.globals.axisCharts){if(x.config.xaxis.type==="category"||x.config.xaxis.convertedCatToNumeric)if(x.globals.isBarHorizontal){var $=x.globals.yLabelFormatters[0],U=new _e(n.ctx).getActiveConfigSeriesIndex();F=$(x.globals.labels[M],{seriesIndex:U,dataPointIndex:M,w:x})}else F=m.getLabel(x.globals.labels,x.globals.timescaleLabels,0,M).text;x.config.xaxis.type==="datetime"&&(x.config.xaxis.categories.length?F=x.config.xaxis.categories[M]:x.config.labels.length&&(F=x.config.labels[M]))}else F=x.config.labels[M];return Array.isArray(F)&&(F=F.join(" ")),R.isNumber(F)?F:F.split(u).join("")},N=function(M,F){if(w.length&&F===0&&S.push(w.join(u)),M.data){M.data=M.data.length&&M.data||B(Array(z)).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,z=x.cssClass||w.config.xaxis.labels.style.cssClass,D=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),D=D+u(0,h)/2+w.config.xaxis.labels.offsetX}else h=w.globals.gridWidth/k,D=D+u(0,h)+w.config.xaxis.labels.offsetX;for(var M=function($){var U=D-u($,h)/2+w.config.xaxis.labels.offsetX;$===0&&m===1&&h/2===D&&k===1&&(U=w.globals.gridWidth/2);var G=g.axesUtils.getLabel(l,w.globals.timescaleLabels,U,$,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)),G=w.config.xaxis.tickAmount!==void 0&&w.config.xaxis.tickAmount!=="dataPoints"&&w.config.xaxis.type!=="datetime"?g.axesUtils.checkLabelBasedOnTickamount($,G,m):g.axesUtils.checkForOverflowingLabels($,G,m,y,b),w.config.xaxis.labels.show){var ne=n.drawText({x:G.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:G.text,textAnchor:"middle",fontWeight:G.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 ")+z});if(a.add(ne),ne.on("click",function(me){if(typeof w.config.chart.events.xAxisLabelClick=="function"){var we=Object.assign({},w,{labelIndex:$});w.config.chart.events.xAxisLabelClick(me,g.ctx,we)}}),i){var ie=document.createElementNS(w.globals.SVGNS,"title");ie.textContent=Array.isArray(G.text)?G.text.join(" "):G.text,ne.node.appendChild(ie),G.text!==""&&(y.push(G.text),b.push(G))}}$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}(),pa=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||!R.isNumber(i)&&!R.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,z=Math.abs(n-i);a.forceNiceScale&&(!d&&i>0&&i/z<.15&&(i=0,d=!0),!u&&n<0&&-n/z<.15&&(n=0,u=!0),z=Math.abs(n-i));var D=z/T,m=D,k=Math.floor(Math.log10(m)),N=Math.pow(10,k),M=Math.ceil(m/N);if(D=m=(M=y.niceScaleAllowedMagMsd[y.yValueDecimal===0?0:1][M])*N,y.isBarHorizontal&&a.stepSize&&a.type!=="datetime"?(D=a.stepSize,b=!0):b&&(D=a.stepSize),b&&a.forceNiceScale){var F=Math.floor(Math.log10(D));D*=Math.pow(10,k-F)}if(d&&u){var $=z/T;if(w)if(b)if(R.mod(z,D)!=0){var U=R.getGCD(D,$);D=$/U<10?U:$}else R.mod(D,$)==0?D=$:($=D,w=!1);else D=$;else if(b)R.mod(z,D)==0?$=D:D=$;else if(R.mod(z,D)==0)$=D;else{$=z/(T=Math.ceil(z/D));var G=R.getGCD(z,D);z/Gl&&(i=n-D*S,i+=D*Math.floor((te-i)/D))}else d&&(n=w?i+D*T:D*Math.ceil(n/D));else if(w){var ne=D/(n-i>n?1:2),ie=ne*Math.floor(i/ne);Math.abs(ie-i)<=ne/2?n=(i=ie)+D*T:i=(n=ne*Math.ceil(n/ne))-D*T}else i=D*Math.floor(i/D),n=D*Math.ceil(n/D);z=Math.abs(n-i),D=R.getGCD(z,D),T=Math.round(z/D)}if(w||d||u||(T=Math.ceil((z-g)/(D+g)))>16&&R.getPrimeFactors(T).length<2&&T++,y.isMultipleYAxis&&y.multiAxisTickAmount==0&&(y.multiAxisTickAmount=T),T>l&&(!w&&!b||a.forceNiceScale)){var me=R.getPrimeFactors(T),we=me.length-1,Pe=T;e:for(var Oe=0;OeIr);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&&R.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&&R.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,z){if(T.name===L){d[S].push(z),u[z]=S;var D=h.indexOf(z);h.splice(D,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(F){return Number.MIN_VALUE}),j=u.seriesX[x[0]].map(function(F){return Number.MIN_VALUE}),L=u.seriesX[x[0]].map(function(F){return Number.MIN_VALUE}),T=d.series[x[0]].type,z=0;z=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=B(new Set((w=[]).concat.apply(w,B(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,z=L;d.chart.type==="candlestick"?(T=u.seriesCandleL,z=u.seriesCandleH):d.chart.type==="boxPlot"?(T=u.seriesCandleO,z=u.seriesCandleC):u.isRangeData&&(T=u.seriesRangeStart,z=u.seriesRangeEnd);for(var D=i;DT[D][k]&&T[D][k]<0&&(g=T[D][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}(),el=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 fr(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 z=function(U){var G=L[U];G=j(G,U,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 we=l.drawText({x:te,y:S+b/10+me+1,text:G,textAnchor:ne,fontSize:u,fontFamily:h,fontWeight:g,maxWidth:a.config.yaxis[i].labels.maxWidth,foreColor:Array.isArray(ie)?ie[U]:ie,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+d.cssClass});U===b&&(T=we),y.add(we);var Pe=document.createElementNS(a.globals.SVGNS,"title");if(Pe.textContent=Array.isArray(G)?G.join(" "):G,we.node.appendChild(Pe),a.config.yaxis[i].labels.rotate!==0){var Oe=l.rotateAroundCenter(T.node),Ve=l.rotateAroundCenter(we.node);we.node.setAttribute("transform","rotate(".concat(a.config.yaxis[i].labels.rotate," ").concat(Oe.x," ").concat(Ve.y,")"))}S+=w},D=b;D>=0;D--)z(D);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 M=a.config.yaxis[i].axisBorder,F=31+M.offsetX;if(a.config.yaxis[i].opposite&&(F=-31-M.offsetX),M.show){var $=l.drawLine(F,a.globals.translateY+M.offsetY-2,F,a.globals.gridHeight+a.globals.translateY+M.offsetY+2,M.color,0,M.width);x.add($)}return a.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(F,b,M,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 z=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(z),z.tspan(j);var D=document.createElementNS(n.globals.SVGNS,"title");D.textContent=j,z.node.appendChild(D),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=R.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=R.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}(),N1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.documentEvent=R.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=R.extend(ve,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 el(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,z=d.opacity,D=i.config.xaxis.crosshairs.fill.color;if(i.config.xaxis.crosshairs.show){u==="gradient"&&(D=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;(!R.isNumber(k)||k<0)&&(k=0);var N=i.config.xaxis.crosshairs.width;(!R.isNumber(N)||N<0)&&(N=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:k,width:N,height:k,fill:D,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:z})),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=R.extend(w,x),x=R.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,B(l));a=n[l.indexOf(d)]}return a}}]),O}(),Te=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=R.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=R.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((F=String(b(N,g)))===null||F===void 0?void 0:F.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=R.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),z="rotate(".concat(u.labels.rotate," 0 0)"),D=T.getTextRects(S,u.labels.style.fontSize,u.labels.style.fontFamily,z,!1),m=D;S!==j&&(m=T.getTextRects(j,u.labels.style.fontSize,u.labels.style.fontFamily,z,!1)),a.push({width:(y>m.width||y>D.width?y:m.width>D.width?m.width:D.width)+l,height:m.height>D.height?m.height:D.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 fr(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 fr(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 Te(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 el(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 +155,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=R.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}(),el=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(),R.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 _e(this.ctx).highlightRangeInSeries(i,i.target)}}else!i.target.classList.contains("apexcharts-inactive-legend")&&a&&new _e(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}(),fs=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=R.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}(),tl=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(),R.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 _e(this.ctx).highlightRangeInSeries(i,i.target)}}else!i.target.classList.contains("apexcharts-inactive-legend")&&a&&new _e(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}(),fs=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 +181,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 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(),z=g.node.getBoundingClientRect();u.globals.isRangeBar?(w=u.globals.yAxisScale[0].niceMin+(z.left-T.left)*h.invertedYRatio,S=u.globals.yAxisScale[0].niceMin+(z.right-T.left)*h.invertedYRatio,j=0,L=1):(w=u.globals.xAxisScale.niceMin+(z.left-T.left)*h.xRatio,S=u.globals.xAxisScale.niceMin+(z.right-T.left)*h.xRatio,j=u.globals.yAxisScale[0].niceMin+(T.bottom-z.bottom)*h.yRatio[0],L=u.globals.yAxisScale[0].niceMax-(z.top-T.top)*h.yRatio[0]);var D={xaxis:{min:w,max:S},yaxis:{min:j,max:L}};u.config.chart.events.selection(d.ctx,D),u.config.chart.brush.enabled&&u.config.chart.events.brushScrolled!==void 0&&u.config.chart.events.brushScrolled(d.ctx,D)},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(M,F){j.push(u.globals.yAxisScale[F].niceMax-g.yRatio[F]*h.startY),L.push(u.globals.yAxisScale[F].niceMax-g.yRatio[F]*h.endY)}),h.dragged&&(h.dragX>10||h.dragY>10)&&w!==S){if(u.globals.zoomEnabled){var T=R.clone(u.globals.initialConfig.yaxis),z=R.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"||(z={min:w,max:S}),d!=="xy"&&d!=="y"||T.forEach(function(M,F){T[F].min=L[F],T[F].max=j[F]}),x){var D=x.getBeforeZoomRange(z,T);D&&(z=D.xaxis?D.xaxis:z,T=D.yaxis?D.yaxis:T)}var m={xaxis:z};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(z,T)}else if(u.globals.selectionEnabled){var k,N=null;k={min:w,max:S},d!=="xy"&&d!=="y"||(N=R.clone(u.config.yaxis)).forEach(function(M,F){N[F].min=L[F],N[F].max=j[F]}),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=R.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}(),tl=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 z=null,D=null,m=u.globals.seriesXvalues.map(function($){return $.filter(function(U){return R.isNumber(U)})}),k=u.globals.seriesYvalues.map(function($){return $.filter(function(U){return R.isNumber(U)})});if(u.globals.isXNumeric){var N=this.ttCtx.getElGrid().getBoundingClientRect(),M=S*(N.width/g),F=j*(N.height/x);z=(D=this.closestInMultiArray(M,F,m,k)).index,L=D.j,z!==null&&(m=u.globals.seriesXvalues[z],L=(D=this.closestInArray(M,m)).index)}return u.globals.capturedSeriesIndex=z===null?-1:z,(!L||L<1)&&(L=0),u.globals.isBarHorizontal?u.globals.capturedDataPointIndex=T:u.globals.capturedDataPointIndex=L,{capturedSeries:z,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=B(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(G.attrs.name,""),U+="
".concat(G.val,"
")}),m.innerHTML=$+"",k.innerHTML=U+""};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 M=l[n].querySelector(".apexcharts-tooltip-marker"),F=l[n].querySelector(".apexcharts-tooltip-text");parseFloat(b)==0?(M.style.display="none",F.style.display="none"):(M.style.display="block",F.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}(),il=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 _e(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 _e(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(),z=g.node.getBoundingClientRect();u.globals.isRangeBar?(w=u.globals.yAxisScale[0].niceMin+(z.left-T.left)*h.invertedYRatio,S=u.globals.yAxisScale[0].niceMin+(z.right-T.left)*h.invertedYRatio,j=0,L=1):(w=u.globals.xAxisScale.niceMin+(z.left-T.left)*h.xRatio,S=u.globals.xAxisScale.niceMin+(z.right-T.left)*h.xRatio,j=u.globals.yAxisScale[0].niceMin+(T.bottom-z.bottom)*h.yRatio[0],L=u.globals.yAxisScale[0].niceMax-(z.top-T.top)*h.yRatio[0]);var D={xaxis:{min:w,max:S},yaxis:{min:j,max:L}};u.config.chart.events.selection(d.ctx,D),u.config.chart.brush.enabled&&u.config.chart.events.brushScrolled!==void 0&&u.config.chart.events.brushScrolled(d.ctx,D)},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(M,F){j.push(u.globals.yAxisScale[F].niceMax-g.yRatio[F]*h.startY),L.push(u.globals.yAxisScale[F].niceMax-g.yRatio[F]*h.endY)}),h.dragged&&(h.dragX>10||h.dragY>10)&&w!==S){if(u.globals.zoomEnabled){var T=R.clone(u.globals.initialConfig.yaxis),z=R.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"||(z={min:w,max:S}),d!=="xy"&&d!=="y"||T.forEach(function(M,F){T[F].min=L[F],T[F].max=j[F]}),x){var D=x.getBeforeZoomRange(z,T);D&&(z=D.xaxis?D.xaxis:z,T=D.yaxis?D.yaxis:T)}var m={xaxis:z};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(z,T)}else if(u.globals.selectionEnabled){var k,N=null;k={min:w,max:S},d!=="xy"&&d!=="y"||(N=R.clone(u.config.yaxis)).forEach(function(M,F){N[F].min=L[F],N[F].max=j[F]}),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=R.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}(),rl=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 z=null,D=null,m=u.globals.seriesXvalues.map(function($){return $.filter(function(U){return R.isNumber(U)})}),k=u.globals.seriesYvalues.map(function($){return $.filter(function(U){return R.isNumber(U)})});if(u.globals.isXNumeric){var N=this.ttCtx.getElGrid().getBoundingClientRect(),M=S*(N.width/g),F=j*(N.height/x);z=(D=this.closestInMultiArray(M,F,m,k)).index,L=D.j,z!==null&&(m=u.globals.seriesXvalues[z],L=(D=this.closestInArray(M,m)).index)}return u.globals.capturedSeriesIndex=z===null?-1:z,(!L||L<1)&&(L=0),u.globals.isBarHorizontal?u.globals.capturedDataPointIndex=T:u.globals.capturedDataPointIndex=L,{capturedSeries:z,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=B(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(G.attrs.name,""),U+="
".concat(G.val,"
")}),m.innerHTML=$+"",k.innerHTML=U+""};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 M=l[n].querySelector(".apexcharts-tooltip-marker"),F=l[n].querySelector(".apexcharts-tooltip-text");parseFloat(b)==0?(M.style.display="none",F.style.display="none"):(M.style.display="block",F.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}(),nl=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 _e(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 _e(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}(),nl=function(){function O(i){c(this,O),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx,this.tooltipPosition=new il(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=B(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}(),l5=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=R.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 z=h.getElGrid().getBoundingClientRect();b=h.e.clientY-z.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(),z=L.height;w=L.height;var D=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 M=j.getAttribute("data-range-y1"),F=j.getAttribute("data-range-y2");d.globals.comboCharts&&(g=parseInt(j.parentNode.getAttribute("data:realIndex"),10));var $=function(G){return d.globals.isXNumeric?m-D/2:n.isVerticalGroupedRangeBar?m+D/2:m-h.dataPointsDividedWidth+D/2},U=function(){return k-h.dataPointsDividedHeight+z/2-h.tooltipRect.ttHeight/2};h.tooltipLabels.drawSeriesTexts({ttItems:l.ttItems,i:g,j:u,y1:M?parseInt(M,10):null,y2:F?parseInt(F,10):null,shared:!h.showOnIntersect&&d.config.tooltip.shared,e:a}),d.config.tooltip.followCursor?d.globals.isBarHorizontal?(x=N-T.left+15,y=U()):(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}(),L1=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 tl(this),this.tooltipLabels=new rl(this),this.tooltipPosition=new il(this),this.marker=new nl(this),this.intersect=new l5(this),this.axesTooltip=new c5(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 _e(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(z){return z===!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,F=this.w,$=n;i.type==="mouseup"&&this.markerClick(i,a,l),M===null&&(M=this.tConfig.shared);var U=this.tooltipUtil.hasMarkers(a),G=this.tooltipUtil.getElBars();if(F.config.legend.tooltipHoverFormatter){var te=F.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(G),this.barSeriesHeight>0)){var We=new X(this.ctx),tt=F.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*F)),M&&(j=j+S.height/2-m/2-2);var U=this.barCtx.series[d][u]<0,G=x;switch(this.barCtx.isReversed&&(G=x-w+(U?2*w:0),x-=w),z.position){case"center":L=M?U?G-w/2+N:G+w/2-N:U?G-w/2+S.height/2+N:G+w/2+S.height/2-N;break;case"bottom":L=M?U?G-w+N:G+w-N:U?G-w+S.height+m+N:G+w-S.height/2+m-N;break;case"top":L=M?U?G+N:G-N:U?G-S.height/2-N:G+S.height+N}if(this.barCtx.lastActiveBarSerieIndex===h&&D.enabled){var te=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:h,j:u}),T.fontSize);n=U?G-te.height/2-N-D.offsetY+18:G+te.height+N+D.offsetY-18,a=j+D.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,z=i.offX,D=i.offY,m=n.globals.gridHeight/n.globals.dataPoints;y=Math.abs(y);var k,N,M=(g+=h!==-1?h*x:0)-(this.barCtx.isRangeBar?0:m)+x/2+b.height/2+D-3,F="start",$=this.barCtx.series[l][d]<0,U=a;switch(this.barCtx.isReversed&&(U=a+y-($?2*y:0),a=n.globals.gridWidth-y),L.position){case"center":w=$?U+y/2-z:Math.max(b.width/2,U-y/2)+z;break;case"bottom":w=$?U+y-S-Math.round(b.width/2)-z:U-y+S+Math.round(b.width/2)+z;break;case"top":w=$?U-S+Math.round(b.width/2)-z:U-S-Math.round(b.width/2)+z}if(this.barCtx.lastActiveBarSerieIndex===u&&T.enabled){var G=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:u,j:d}),j.fontSize);$?(k=U-S+Math.round(G.width/2)-z-T.offsetX-15,F="end"):k=U-S-Math.round(G.width/2)+z+T.offsetX+15,N=M+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:M,totalDataLabelsX:k,totalDataLabelsY:N,totalDataLabelsAnchor:F}}},{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,z=b.globals.collapsedSeriesIndices.indexOf(d)>-1;if(y.enabled&&!z){T=j.group({class:"apexcharts-data-labels",transform:w});var D="";l!==void 0&&(D=L(l,s(s({},b),{},{seriesIndex:d,dataPointIndex:u,w:b}))),!l&&b.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(D="");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)&&(D=""):h.height/1.6>Math.abs(g)&&(D=""));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:D,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}(),u5=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 _e(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,z=L+j;d+=.001,u+=.001;var D=S.move(T,d),m=S.move(T,d),k=S.line(z-h,d);if(w.globals.previousPaths.length>0&&(m=this.barCtx.getPreviousPath(x,b,!1)),D=D+S.line(T,u)+S.line(z-h,u)+S.line(z-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)&&(D=S.roundPathCorners(D,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:D,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,z=j+L;d+=.001,u+=.001;var D=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,z-h);if(D=D+S.line(u,T)+S.line(u,z-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)&&(D=S.roundPathCorners(D,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:D,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 R,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,R.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=z),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 M=l.group({class:"apexcharts-datalabels","data:realIndex":z});a.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");var F=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 U=0;U0){var me=this.barHelpers.drawBarShadow({color:typeof ie=="string"&&(ie==null?void 0:ie.indexOf("url"))===-1?ie:R.hexToRgba(a.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:te});me&&$.add(me)}this.pathArr.push(te);var we=this.barHelpers.drawGoalLine({barXPosition:te.barXPosition,barYPosition:te.barYPosition,goalX:te.goalX,goalY:te.goalY,barHeight:m,barWidth:k});we&&F.add(we),j=te.y,S=te.x,U>0&&T.push(S+k/2),L.push(j),this.renderSeries({realIndex:z,pathFill:ie,j:U,i:h,pathFrom:te.pathFrom,pathTo:te.pathTo,strokeWidth:G,elSeries:D,x:S,y:j,series:i,barHeight:te.barHeight?te.barHeight:m,barWidth:te.barWidth?te.barWidth:k,elDataLabelsWrap:M,elGoalsMarkers:F,elBarShadows:$,visibleSeries:this.visibleI,type:"bar"})}a.globals.seriesXvalues[z]=T,a.globals.seriesYvalues[z]=L,u.add(D)}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,z=i.barHeight,D=i.barWidth,m=i.barXPosition,k=i.barYPosition,N=i.elDataLabelsWrap,M=i.elGoalsMarkers,F=i.elBarShadows,$=i.visibleSeries,U=i.type,G=this.w,te=new X(this.ctx);l||(l=this.barOptions.distributed?G.globals.stroke.colors[d]:G.globals.stroke.colors[n]),G.config.series[u].data[d]&&G.config.series[u].data[d].strokeColor&&(l=G.config.series[u].data[d].strokeColor),this.isNullValue&&(a="none");var ne=d/G.config.chart.animations.animateGradually.delay*(G.config.chart.animations.speed/G.globals.dataPoints)/2.4,ie=te.renderPaths({i:u,j:d,realIndex:n,pathFrom:g,pathTo:x,stroke:l,strokeWidth:y,strokeLineCap:G.config.stroke.lineCap,fill:a,animationDelay:ne,initialSpeed:G.config.chart.animations.speed,dataChangeSpeed:G.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(U,"-area")});ie.attr("clip-path","url(#gridRectMask".concat(G.globals.cuid,")"));var me=G.config.forecastDataPoints;me.count>0&&d>=G.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 we=new d5(this).handleBarDataLabels({x:w,y:S,y1:j,y2:L,i:u,j:d,series:T,realIndex:n,groupIndex:h,barHeight:z,barWidth:D,barXPosition:m,barYPosition:k,renderedPath:ie,visibleSeries:$});return we.dataLabels!==null&&N.add(we.dataLabels),we.totalDataLabels&&N.add(we.totalDataLabels),b.add(N),M&&b.add(M),F&&b.add(F),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(z,D){z[S]&&j++,D0&&(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 z=this.barHelpers.getZeroValueEncounters({i:S,j}),D=z.nonZeroColumns,m=z.zeroEncounters;D>0&&(h=this.seriesLen*h/D),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}(),P1=function(O){A(n,ps);var i=_(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 ps(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,z=void 0,D=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=[],M=[],F=u.globals.comboCharts?l[j]:j;d.yRatio.length>1&&(d.yaxisIndex=F),d.isReversed=u.config.yaxis[d.yaxisIndex]&&u.config.yaxis[d.yaxisIndex].reversed;var $=d.graphics.group({class:"apexcharts-series",seriesName:R.escapeString(u.globals.seriesNames[F]),rel:j+1,"data:realIndex":F});d.ctx.series.addCollapsedClassToSeries($,F);var U=d.graphics.group({class:"apexcharts-datalabels","data:realIndex":F}),G=d.graphics.group({class:"apexcharts-bar-goals-markers"}),te=0,ne=0,ie=d.initialPositions(x,y,T,z,D,m);y=ie.y,te=ie.barHeight,z=ie.yDivision,m=ie.zeroW,x=ie.x,ne=ie.barWidth,T=ie.xDivision,D=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 D}),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),z=d.i,D=d.j,m=0,k=0;k0){var M=g;this.groupCtx.prevXVal[N-1][D]<0?M=this.series[z][D]>=0?this.groupCtx.prevX[N-1][D]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[N-1][D]:this.groupCtx.prevXVal[N-1][D]>=0&&(M=this.series[z][D]>=0?this.groupCtx.prevX[N-1][D]:this.groupCtx.prevX[N-1][D]-m+2*(this.isReversed?m:0)),l=M}else l=g;x=this.series[z][D]===null?l:l+this.series[z][D]/this.invertedYRatio-2*(this.isReversed?this.series[z][D]/this.invertedYRatio:0);var F=this.barHelpers.getBarpaths({barYPosition:T,barHeight:u,x1:l,x2:x,strokeWidth:h,series:this.series,realIndex:d.realIndex,seriesGroup:w,i:z,j:D,w:L});return this.barHelpers.barBackground({j:D,i:z,y1:T,y2:u,elSeries:j}),y+=S,{pathTo:F.pathTo,pathFrom:F.pathFrom,goalX:this.barHelpers.getGoalValues("x",g,null,z,D),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 z=S.globals.seriesX[j][L];z||(z=0),d=(z-S.globals.minX)/this.xRatio-g/2,S.globals.seriesGroups.length&&(d=(z-S.globals.minX)/this.xRatio-g/2*S.globals.seriesGroups.length)}for(var D,m=d+(y!==-1?y*g:0),k=0,N=0;N0&&!S.globals.isXNumeric||M>0&&S.globals.isXNumeric&&S.globals.seriesX[j-1][L]===S.globals.seriesX[j][L]){var F,$,U,G=Math.min(this.yRatio.length+1,j+1);if(this.groupCtx.prevY[M-1]!==void 0&&this.groupCtx.prevY[M-1].length)for(var te=1;te=0?U-k+2*(this.isReversed?k:0):U;break}if(((we=this.groupCtx.prevYVal[M-ie])===null||we===void 0?void 0:we[L])>=0){$=this.series[j][L]>=0?U:U+k-2*(this.isReversed?k:0);break}}$===void 0&&($=S.globals.gridHeight),D=(F=this.groupCtx.prevYF[0])!==null&&F!==void 0&&F.every(function(Oe){return Oe===0})&&this.groupCtx.prevYF.slice(1,M).every(function(Oe){return Oe.every(function(Ve){return isNaN(Ve)})})?x:$}else D=x;u=this.series[j][L]?D-this.series[j][L]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[j][L]/this.yRatio[this.yaxisIndex]:0):D;var Pe=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:g,y1:D,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:Pe.pathTo,pathFrom:Pe.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,x,j,L),barXPosition:m,x:S.globals.isXNumeric?d-h:d,y:u}}}]),n}(),Yd=function(O){A(n,ps);var i=_(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,z,D,m,k=void 0,N=void 0,M=[],F=[],$=h.globals.comboCharts?d[L]:L,U=g.group({class:"apexcharts-series",seriesName:R.escapeString(h.globals.seriesNames[$]),rel:L+1,"data:realIndex":$});u.ctx.series.addCollapsedClassToSeries(U,$),a[L].length>0&&(u.visibleI=u.visibleI+1);var G,te;u.yRatio.length>1&&(u.yaxisIndex=$);var ne=u.barHelpers.initialPositions();N=ne.y,G=ne.barHeight,z=ne.yDivision,m=ne.zeroW,k=ne.x,te=ne.barWidth,T=ne.xDivision,D=ne.zeroH,F.push(k+te/2);for(var ie=g.group({class:"apexcharts-datalabels","data:realIndex":$}),me=function(Pe){var Oe=u.barHelpers.getStrokeWidth(L,Pe,$),Ve=null,We={indexes:{i:L,j:Pe,realIndex:$},x:k,y:N,strokeWidth:Oe,elSeries:U};Ve=u.isHorizontal?u.drawHorizontalBoxPaths(s(s({},We),{},{yDivision:z,barHeight:G,zeroW:m})):u.drawVerticalBoxPaths(s(s({},We),{},{xDivision:T,barWidth:te,zeroH:D})),N=Ve.y,k=Ve.x,Pe>0&&F.push(k+te/2),M.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:Pe,color:Ve.color[ot],value:a[L][Pe]});u.renderSeries({realIndex:$,pathFill:Tt,lineFill:Zt,j:Pe,i:L,pathFrom:Ve.pathFrom,pathTo:tt,strokeWidth:Oe,elSeries:U,x:k,y:N,series:a,barHeight:G,barWidth:te,elDataLabelsWrap:ie,visibleSeries:u.visibleI,type:h.config.chart.type})})},we=0;wek.c&&(j=!1);var F=Math.min(k.o,k.c),$=Math.max(k.o,k.c),U=k.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[m][S]-y.globals.minX)/this.xRatio-h/2);var G=d+h*this.visibleI;this.series[w][S]===void 0||this.series[w][S]===null?(F=g,$=g):(F=g-F/D,$=g-$/D,N=g-k.h/D,M=g-k.l/D,U=g-k.m/D);var te=b.move(G,g),ne=b.move(G+h/2,F);return y.globals.previousPaths.length>0&&(ne=this.getPreviousPath(m,S,!0)),te=this.isBoxPlot?[b.move(G,F)+b.line(G+h/2,F)+b.line(G+h/2,N)+b.line(G+h/4,N)+b.line(G+h-h/4,N)+b.line(G+h/2,N)+b.line(G+h/2,F)+b.line(G+h,F)+b.line(G+h,U)+b.line(G,U)+b.line(G,F+x/2),b.move(G,U)+b.line(G+h,U)+b.line(G+h,$)+b.line(G+h/2,$)+b.line(G+h/2,M)+b.line(G+h-h/4,M)+b.line(G+h/4,M)+b.line(G+h/2,M)+b.line(G+h/2,$)+b.line(G,$)+b.line(G,U)+"z"]:[b.move(G,$)+b.line(G+h/2,$)+b.line(G+h/2,N)+b.line(G+h/2,$)+b.line(G+h,$)+b.line(G+h,F)+b.line(G+h/2,F)+b.line(G+h/2,M)+b.line(G+h/2,F)+b.line(G,F)+b.line(G,$-x/2)],ne+=b.move(G,F),y.globals.isXNumeric||(d+=u),{pathTo:te,pathFrom:ne,x:d,y:$,barXPosition:G,color:this.isBoxPlot?z: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,z=this.getOHLCValue(T,S),D=g,m=g,k=Math.min(z.o,z.c),N=Math.max(z.o,z.c),M=z.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[T][S]-y.globals.minX)/this.invertedXRatio-h/2);var F=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,D=g+z.h/L,m=g+z.l/L,M=g+z.m/L);var $=b.move(g,F),U=b.move(k,F+h/2);return y.globals.previousPaths.length>0&&(U=this.getPreviousPath(T,S,!0)),$=[b.move(k,F)+b.line(k,F+h/2)+b.line(D,F+h/2)+b.line(D,F+h/2-h/4)+b.line(D,F+h/2+h/4)+b.line(D,F+h/2)+b.line(k,F+h/2)+b.line(k,F+h)+b.line(M,F+h)+b.line(M,F)+b.line(k+x/2,F),b.move(M,F)+b.line(M,F+h)+b.line(N,F+h)+b.line(N,F+h/2)+b.line(m,F+h/2)+b.line(m,F+h-h/4)+b.line(m,F+h/4)+b.line(m,F+h/2)+b.line(N,F+h/2)+b.line(N,F)+b.line(M,F)+"z"],U+=b.move(k,F),y.globals.isXNumeric||(d+=u),{pathTo:$,pathFrom:U,x:N,y:d,barYPosition:F,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}(),T1=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 R;return d.config.plotOptions[i].enableShades&&(x=this.w.config.theme.mode==="dark"?R.hexToRgba(y.shadeColor(-1*u,g.color),d.config.fill.opacity):R.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,B(l.globals.series[n])),b=Math.max.apply(Math,B(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}(),h5=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 T1(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:R.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,M=m.y,F=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=R.polarToCartesian(a.centerX,a.centerY,a.donutSize,y),z=R.polarToCartesian(a.centerX,a.centerY,a.donutSize,g),D=d>180?1:0,m=["M",w,S,"A",u,u,0,D,1,j,L];return n=a.chartType==="donut"?[].concat(m,["L",T.x,T.y,"A",a.donutSize,a.donutSize,0,D,0,z.x,z.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 pa(this.ctx),l=new X(this.ctx),d=new R1(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}(),f5=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&&(M=n.getPreviousPath(z));for(var F=0;F=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 z=w.dropShadow;h.dropShadow(T,z)}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 z=!1;l.config.plotOptions.radialBar.inverseOrder&&(z=!0);for(var D=z?a.series.length-1:0;z?D>=0:D100?100:a.series[D])/100,$=Math.round(this.totalAngle*F)+this.startAngle,U=void 0;l.globals.dataChanged&&(M=this.startAngle,U=Math.round(this.totalAngle*R.negToZero(l.globals.previousPaths[D])/100)+M),Math.abs($)+Math.abs(N)>=360&&($-=.01),Math.abs(U)+Math.abs(M)>=360&&(U-=.01);var G=$-N,te=Array.isArray(l.config.stroke.dashArray)?l.config.stroke.dashArray[D]: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-"+D,strokeDashArray:te});if(X.setAttrs(ne.node,{"data:angle":G,"data:value":a.series[D]}),l.config.chart.dropShadow.enabled){var ie=l.config.chart.dropShadow;h.dropShadow(ne,ie,D)}if(h.setSelectionFilter(ne,0,D),this.addListeners(ne,this.radialDataLabels),m.add(ne),ne.attr({index:0,j:D}),this.barLabels.enabled){var me=R.polarToCartesian(a.centerX,a.centerY,a.size,N),we=this.barLabels.formatter(l.globals.seriesNames[D],{seriesIndex:D,w:l}),Pe=["apexcharts-radialbar-label"];this.barLabels.onClick||Pe.push("apexcharts-no-click");var Oe=this.barLabels.useSeriesColors?l.globals.colors[D]: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:we,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:Oe,cssClass:Pe.join(" ")});tt.on("click",this.onBarLabelClick),tt.attr({rel:D+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:U,prevStartAngle:M,size:a.size,i:D,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=R.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}(),g5=function(O){A(n,ps);var i=_(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 z=0,D=0;this.yRatio.length>1&&(this.yaxisIndex=L);var m=this.barHelpers.initialPositions();j=m.y,w=m.zeroW,S=m.x,D=m.barWidth,z=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"}),M=0;M0});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(z)>-1&&(u=(y=j.barHeight/T.length)*this.visibleI+w*(100-parseInt(this.barOptions.barHeight,10))/100/2+y*(this.visibleI+T.indexOf(z))+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(z)>-1&&(h=(b=j.barWidth/T.length)*this.visibleI+S*(100-parseInt(this.barOptions.barWidth,10))/100/2+b*(this.visibleI+T.indexOf(z))+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),z=Math.max(L.start,L.end);this.series[b][w]===void 0||this.series[b][w]===null?T=x:(T=x-T/S,z=x-z/S);var D=Math.abs(z-T),m=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:h,y1:T,y2:z,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:D,x:d,y:z,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}(),m5=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(R.isNumber(n[u][0])?g+x.config.markers.offsetY:null),y.push(l+x.config.markers.offsetX),b.push(R.isNumber(n[u][h+1])?d+x.config.markers.offsetY:null)}else y.push(l+x.config.markers.offsetX),b.push(R.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}(),x5=function(O){for(var i,n,a,l,d=function(y){for(var b=[],w=y[0],S=y[1],j=b[0]=Gd(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},Ud=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},_1=function(O){var i=x5(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&&(z=(u.globals.seriesX[S][0]-u.globals.minX)/this.xRatio),T.push(z);var D,m=z,k=void 0,N=m,M=this.zeroY,F=this.zeroY;M=this.lineHelpers.determineFirstPrevY({i:w,series:i,prevY:M,lineYPosition:0}).prevY,u.config.stroke.curve==="monotonCubic"&&i[w][0]===null?j.push(null):j.push(M),D=M,g==="rangeArea"&&(k=F=this.lineHelpers.determineFirstPrevY({i:w,series:l,prevY:F,lineYPosition:0}).prevY,L.push(F));var $={type:g,series:i,realIndex:S,i:w,x:z,y:1,pX:m,pY:D,pathsFrom:this._calculatePathsFrom({type:g,series:i,i:w,realIndex:S,prevX:N,prevY:M,prevY2:F}),linePaths:[],areaPaths:[],seriesIndex:a,lineYPosition:0,xArrj:T,yArrj:j,y2Arrj:L,seriesRangeEnd:l},U=this._iterateOverDataPoints(s(s({},$),{},{iterations:g==="rangeArea"?i[w].length-1:void 0,isRangeStart:!0}));if(g==="rangeArea"){var G=this._calculatePathsFrom({series:l,i:w,realIndex:S,prevX:N,prevY:F}),te=this._iterateOverDataPoints(s(s({},$),{},{series:l,pY:k,pathsFrom:G,iterations:l[w].length-1,isRangeStart:!1}));U.linePaths[0]=te.linePath+U.linePath,U.pathFromLine=te.pathFromLine+U.pathFromLine}this._handlePaths({type:g,realIndex:S,i:w,paths:U}),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,we){return Number(me.node.getAttribute("zIndex"))-Number(we.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:R.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 F=h.renderPaths(N);F.node.setAttribute("stroke-dasharray",x.dashArray),x.strokeWidth&&F.node.setAttribute("stroke-width",x.strokeWidth),this.elSeries.add(F),F.attr("clip-path","url(#forecastMask".concat(u.globals.cuid,")")),M.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,z=i.lineYPosition,D=i.xArrj,m=i.yArrj,k=i.y2Arrj,N=i.isRangeStart,M=i.seriesRangeEnd,F=this.w,$=new X(this.ctx),U=this.yRatio,G=S.prevY,te=S.linePath,ne=S.areaPath,ie=S.pathFromLine,me=S.pathFromArea,we=R.isNumber(F.globals.minYArr[h])?F.globals.minYArr[h]:F.globals.minY;u||(u=F.globals.dataPoints>1?F.globals.dataPoints-1:F.globals.dataPoints);for(var Pe=function(Ir,xi){return xi-Ir/U[a.yaxisIndex]+2*(a.isReversed?Ir/U[a.yaxisIndex]:0)},Oe=y,Ve=F.config.chart.stacked&&!F.globals.comboCharts||F.config.chart.stacked&&F.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&&F.globals.collapsedSeries.length-1){xi--;break}return xi>=0?xi:0}(g-1)][We+1]:z=this.zeroY:z=this.zeroY,tt?y=Pe(we,z):(y=Pe(d[g][We+1],z),l==="rangeArea"&&(Oe=Pe(M[g][We+1],z))),D.push(x),tt&&F.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:G}),Tt=this._createPaths({type:l,series:d,i:g,realIndex:h,j:We,x,y,y2:Oe,xArrj:D,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||F.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:D,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,z=i.linePaths,D=i.areaPaths,m=i.seriesIndex,k=i.isRangeStart,N=this.w,M=new X(this.ctx),F=N.config.stroke.curve,$=this.areaBottomY;if(Array.isArray(N.config.stroke.curve)&&(F=Array.isArray(m)?N.config.stroke.curve[m[l]]:N.config.stroke.curve[l]),n==="rangeArea"&&(N.globals.hasNullValues||N.config.forecastDataPoints.count>0)&&F==="monotoneCubic"&&(F="straight"),F==="monotoneCubic"){var U=n==="rangeArea"?x.length===N.globals.dataPoints:u===a[l].length-2,G=x.map(function(Ve,We){return[x[We],y[We]]}).filter(function(Ve){return Ve[1]!==null});if(U&&G.length>1){var te=_1(G);if(L+=Ud(te),a[l][0]===null?T=L:T+=Ud(te),n==="rangeArea"&&k){L+=M.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]]}),we=_1(me);T=L+=Ud(we)}else T+=M.line(G[G.length-1][0],$)+M.line(G[0][0],$)+M.move(G[0][0],G[0][1])+"z";z.push(L),D.push(T)}}else if(F==="smooth"){var Pe=.35*(h-S);N.globals.hasNullValues?(a[l][u]!==null&&(a[l][u+1]!==null?(L=M.move(S,j)+M.curve(S+Pe,j,h-Pe,g,h+1,g),T=M.move(S+1,j)+M.curve(S+Pe,j,h-Pe,g,h+1,g)+M.line(h,$)+M.line(S,$)+"z"):(L=M.move(S,j),T=M.move(S,j)+"z")),z.push(L),D.push(T)):(L+=M.curve(S+Pe,j,h-Pe,g,h,g),T+=M.curve(S+Pe,j,h-Pe,g,h,g)),S=h,j=g,u===a[l].length-2&&(T=T+M.curve(S,j,h,g,h,$)+M.move(h,g)+"z",n==="rangeArea"&&k?L=L+M.curve(S,j,h,g,h,b)+M.move(h,b)+"z":N.globals.hasNullValues||(z.push(L),D.push(T)))}else{if(a[l][u+1]===null){L+=M.move(h,g);var Oe=N.globals.isXNumeric?(N.globals.seriesX[d][u]-N.globals.minX)/this.xRatio:h-this.xDivision;T=T+M.line(Oe,$)+M.move(h,g)+"z"}a[l][u]===null&&(L+=M.move(h,g),T+=M.move(h,$)),F==="stepline"?(L=L+M.line(h,null,"H")+M.line(null,g,"V"),T=T+M.line(h,null,"H")+M.line(null,g,"V")):F==="straight"&&(L+=M.line(h,g),T+=M.line(h,g)),u===a[l].length-2&&(T=T+M.line(h,$)+M.move(h,g)+"z",n==="rangeArea"&&k?L=L+M.line(h,b)+M.move(h,b)+"z":(z.push(L),D.push(T)))}return{linePaths:z,areaPaths:D,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,z=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=[],z=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}(),y5=86400,b5=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*y5),L=Math.floor(u),T=Math.floor(u/30),z=Math.floor(u/365),D={minMillisecond:h.minMillisecond,minSecond:h.minSecond,minMinute:h.minMinute,minHour:h.minHour,minDate:h.minDate,minMonth:h.minMonth,minYear:h.minYear},m={firstVal:D,currentMillisecond:D.minMillisecond,currentSecond:D.minSecond,currentMinute:D.minMinute,currentHour:D.minHour,currentMonthDate:D.minDate,currentDate:D.minDate,currentMonth:D.minMonth,currentYear:D.minYear,daysWidthOnXAxis:g,hoursWidthOnXAxis:x,minutesWidthOnXAxis:y,secondsWidthOnXAxis:b,numberOfSeconds:j,numberOfMinutes:S,numberOfHours:w,numberOfDays:L,numberOfMonths:T,numberOfYears:z};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 M={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({},M),{},{day:1,value:N.value+1}):N.unit==="day"||N.unit==="hour"?s(s({},M),{},{value:N.value}):N.unit==="minute"?s(s({},M),{},{value:N.value,minute:N.value}):N.unit==="second"?s(s({},M),{},{value:N.value,minute:N.minute,second:N.second}):N});return k.filter(function(N){var M=1,F=Math.ceil(l.globals.gridWidth/120),$=N.value;l.config.xaxis.tickAmount!==void 0&&(F=l.config.xaxis.tickAmount),k.length>F&&(M=Math.floor(k.length/F));var U=!1,G=!1;switch(a.tickInterval){case"years":N.unit==="year"&&(U=!0);break;case"half_year":M=7,N.unit==="year"&&(U=!0);break;case"months":M=1,N.unit==="year"&&(U=!0);break;case"months_fortnight":M=15,N.unit!=="year"&&N.unit!=="month"||(U=!0),$===30&&(G=!0);break;case"months_days":M=10,N.unit==="month"&&(U=!0),$===30&&(G=!0);break;case"week_days":M=8,N.unit==="month"&&(U=!0);break;case"days":M=1,N.unit==="month"&&(U=!0);break;case"hours":N.unit==="day"&&(U=!0);break;case"minutes_fives":case"seconds_fives":$%5!=0&&(G=!0);break;case"seconds_tens":$%10!=0&&(G=!0)}if(a.tickInterval==="hours"||a.tickInterval==="minutes_fives"||a.tickInterval==="seconds_tens"||a.tickInterval==="seconds_fives"){if(!G)return!0}else if(($%M==0||U)&&!G)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:R.monthMod(a+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:g,value:h,unit:y,year:l,month:R.monthMod(a+1)});for(var w=h,S=g,j=0;j1){x=(y.determineDaysOfMonths(l+1,n.minYear)-a+1)*u,g=R.monthMod(l+1);var S=d+w,j=R.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:R.monthMod(l)});for(var T=g+1,z=x,D=0,m=1;Dh.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=R.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:R.monthMod(j),day:y});for(var L=w,T=0;Tg.determineDaysOfMonths(F+1,d)&&(T=1,F+=1),{month:F,date:T}},b=function(M,F){return M>g.determineDaysOfMonths(F+1,d)?F+=1:F},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 z=y(T,l).month;z=b(T,z),this.timeScaleArray.push({position:S,value:j,unit:x,day:T,hour:L,year:d,month:R.monthMod(z)}),L++;for(var D=S,m=0;m=24&&(L=0,x="day",z=y(T+=1,z).month,z=b(T,z));var k=this._getYear(d,z,0);D=60*u+D;var N=L===0?T:L;this.timeScaleArray.push({position:D,value:N,unit:x,hour:L,day:T,year:k,month:R.monthMod(z)}),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,z=(60-a-n/1e3)*y,D=0;D=60&&(w=0,(T+=1)===24&&(T=0)),this.timeScaleArray.push({position:z,value:w,unit:"minute",hour:T,minute:w,day:S,year:this._getYear(L,j,0),month:R.monthMod(j)}),z+=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,z=(1e3-n)/1e3*x,D=0;D=60&&(b=0,++w>=60&&(w=0,++T===24&&(T=0))),this.timeScaleArray.push({position:z,value:b,unit:"second",hour:T,minute:w,second:b,day:S,year:this._getYear(L,j,0),month:R.monthMod(j)}),z+=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}(),w5=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(F,$){var U=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(F),y.i.push($),U++,a.globals.columnSeries=y.series):i[$].type==="area"?(h.series.push(F),h.i.push($),U++):i[$].type==="line"?(u.series.push(F),u.i.push($),U++):i[$].type==="scatter"?(g.series.push(F),g.i.push($)):i[$].type==="bubble"?(x.series.push(F),x.i.push($),U++):i[$].type==="candlestick"?(b.series.push(F),b.i.push($),U++):i[$].type==="boxPlot"?(w.series.push(F),w.i.push($),U++):i[$].type==="rangeBar"?(S.series.push(F),S.i.push($),U++):i[$].type==="rangeArea"?(j.series.push(d.seriesRangeStart[$]),j.seriesRangeEnd.push(d.seriesRangeEnd[$]),j.i.push($),U++):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"),U>1&&(d.comboCharts=!0)):(u.series.push(F),u.i.push($))});var L=new Zd(this.ctx,n),T=new Yd(this.ctx,n);this.ctx.pie=new M1(this.ctx);var z=new p5(this.ctx);this.ctx.rangeBar=new g5(this.ctx,n);var D=new f5(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 P1(this.ctx,n);m.push(k.draw(y.series,y.i))}else this.ctx.bar=new ps(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 Zd(this.ctx,n,!0);m.push(N.draw(g.series,"scatter",g.i))}if(x.series.length>0){var M=new Zd(this.ctx,n,!0);m.push(M.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 P1(this.ctx,n).draw(d.series):(this.ctx.bar=new ps(this.ctx,n),m=this.ctx.bar.draw(d.series));break;case"candlestick":m=new Yd(this.ctx,n).draw(d.series,"candlestick");break;case"boxPlot":m=new Yd(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 h5(this.ctx,n).draw(d.series);break;case"treemap":m=new v5(this.ctx,n).draw(d.series);break;case"pie":case"donut":case"polarArea":m=this.ctx.pie.draw(d.series);break;case"radialBar":m=z.draw(d.series);break;case"radar":m=D.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=R.getDimensions(this.el),l=n.chart.width.toString().split(/[0-9]+/g).pop();l==="%"?R.isNumber(a[0])&&(a[0].width===0&&(a=R.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=R.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 el(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=R.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 hs(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 b5(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}(),k5=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=R.extend(b.config,i),u&&(b.globals.lastXAxis=i.xaxis?R.clone(i.xaxis):[],b.globals.lastYAxis=i.yaxis?R.clone(i.yaxis):[],b.globals.initialConfig=R.extend({},b.config),b.globals.initialSeries=R.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=R.clone(h.config.series),h.globals.initialSeries=R.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,sl=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 M in k)m[N].prototype[M]=k[M];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,M=[],F=0;F1?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;dU);return M},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,M=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 M=new n.Situation({duration:m||1e3,delay:N||0,ease:n.easing[k||"-"]||k});return this.queue(M),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 M=m.length;M--;)k.animations[N][M]instanceof n.Number&&(m[M]=new n.Number(m[M])),k.animations[N][M]=m[M].morph(k.animations[N][M])}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(M){M.detail.situation==k&&(m.call(this,k),this.off("finished.fx",N))}),this._callStart()},during:function(m){var k=this.last(),N=function(M){M.detail.situation==k&&m.call(this,M.detail.pos,n.morph(M.detail.pos),M.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(M){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,M;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&&$<=F&&(this.situation.once[$].call(this.target(),this.pos,F),delete this.situation.once[$]);return this.active&&this.target().fire("during",{pos:this.pos,eased:F,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=F,this):this},eachAt:function(){var m,k=this,N=this.target(),M=this.situation;for(var F in M.animations)m=[].concat(M.animations[F]).map(function(G){return typeof G!="string"&&G.at?G.at(M.ease(k.pos),k.pos):G}),N[F].apply(N,m);for(var F in M.attrs)m=[F].concat(M.attrs[F]).map(function(te){return typeof te!="string"&&te.at?te.at(M.ease(k.pos),k.pos):te}),N.attr.apply(N,m);for(var F in M.styles)m=[F].concat(M.styles[F]).map(function(te){return typeof te!="string"&&te.at?te.at(M.ease(k.pos),k.pos):te}),N.style.apply(N,m);if(M.transforms.length){m=M.initialTransformation,F=0;for(var $=M.transforms.length;F<$;F++){var U=M.transforms[F];U instanceof n.Matrix?m=U.relative?m.multiply(new n.Matrix().morph(U).at(M.ease(this.pos))):m.morph(U).at(M.ease(this.pos)):(U.relative||U.undo(m.extract()),m=m.multiply(U.at(M.ease(this.pos))))}N.matrix(m)}return this},once:function(m,k,N){var M=this.last();return N||(m=M.ease(m)),M.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 M in m)this.attr(M,m[M]);else this.add(m,k,"attrs");return this},plot:function(m,k,N,M){return arguments.length==4?this.plot([m,k,N,M]):this.add("plot",new(this.target()).morphArray(m))}}),n.Box=n.invent({create:function(m,k,N,M){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 F;arguments.length==4&&(this.x=m,this.y=k,this.width=N,this.height=M),(F=this).x==null&&(F.x=0,F.y=0,F.width=0,F.height=0),F.w=F.width,F.h=F.height,F.x2=F.x+F.width,F.y2=F.y+F.height,F.cx=F.x+F.width/2,F.cy=F.y+F.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 M=m.clone(n.parser.draw.instance).show();M&&M.node&&typeof M.node.getBBox=="function"&&(k=M.node.getBBox()),M&&typeof M.remove=="function"&&M.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=z.length-1;N>=0;--N)this[z[N]]=m[z[N]]!=null?m[z[N]]:k[z[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=z.length-1;k>=0;k--)m[z[k]]=this[z[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 M in m)this.attr(M,m[M]);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,M=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(),M=0,F=N.length;Ma.globals.gridHeight&&(x=a.globals.gridHeight),a.globals.isBarHorizontal||this.moveXCrosshairs(g),l.fixedTooltip||this.moveTooltip(g,x||a.globals.gridHeight)}}]),O}(),sl=function(){function O(i){c(this,O),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx,this.tooltipPosition=new nl(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=B(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}(),l5=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=R.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 z=h.getElGrid().getBoundingClientRect();b=h.e.clientY-z.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(),z=L.height;w=L.height;var D=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 M=j.getAttribute("data-range-y1"),F=j.getAttribute("data-range-y2");d.globals.comboCharts&&(g=parseInt(j.parentNode.getAttribute("data:realIndex"),10));var $=function(G){return d.globals.isXNumeric?m-D/2:n.isVerticalGroupedRangeBar?m+D/2:m-h.dataPointsDividedWidth+D/2},U=function(){return k-h.dataPointsDividedHeight+z/2-h.tooltipRect.ttHeight/2};h.tooltipLabels.drawSeriesTexts({ttItems:l.ttItems,i:g,j:u,y1:M?parseInt(M,10):null,y2:F?parseInt(F,10):null,shared:!h.showOnIntersect&&d.config.tooltip.shared,e:a}),d.config.tooltip.followCursor?d.globals.isBarHorizontal?(x=N-T.left+15,y=U()):(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}(),L1=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 rl(this),this.tooltipLabels=new il(this),this.tooltipPosition=new nl(this),this.marker=new sl(this),this.intersect=new l5(this),this.axesTooltip=new c5(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 _e(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(z){return z===!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,F=this.w,$=n;i.type==="mouseup"&&this.markerClick(i,a,l),M===null&&(M=this.tConfig.shared);var U=this.tooltipUtil.hasMarkers(a),G=this.tooltipUtil.getElBars();if(F.config.legend.tooltipHoverFormatter){var te=F.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(G),this.barSeriesHeight>0)){var We=new X(this.ctx),tt=F.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*F)),M&&(j=j+S.height/2-m/2-2);var U=this.barCtx.series[d][u]<0,G=x;switch(this.barCtx.isReversed&&(G=x-w+(U?2*w:0),x-=w),z.position){case"center":L=M?U?G-w/2+N:G+w/2-N:U?G-w/2+S.height/2+N:G+w/2+S.height/2-N;break;case"bottom":L=M?U?G-w+N:G+w-N:U?G-w+S.height+m+N:G+w-S.height/2+m-N;break;case"top":L=M?U?G+N:G-N:U?G-S.height/2-N:G+S.height+N}if(this.barCtx.lastActiveBarSerieIndex===h&&D.enabled){var te=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:h,j:u}),T.fontSize);n=U?G-te.height/2-N-D.offsetY+18:G+te.height+N+D.offsetY-18,a=j+D.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,z=i.offX,D=i.offY,m=n.globals.gridHeight/n.globals.dataPoints;y=Math.abs(y);var k,N,M=(g+=h!==-1?h*x:0)-(this.barCtx.isRangeBar?0:m)+x/2+b.height/2+D-3,F="start",$=this.barCtx.series[l][d]<0,U=a;switch(this.barCtx.isReversed&&(U=a+y-($?2*y:0),a=n.globals.gridWidth-y),L.position){case"center":w=$?U+y/2-z:Math.max(b.width/2,U-y/2)+z;break;case"bottom":w=$?U+y-S-Math.round(b.width/2)-z:U-y+S+Math.round(b.width/2)+z;break;case"top":w=$?U-S+Math.round(b.width/2)-z:U-S-Math.round(b.width/2)+z}if(this.barCtx.lastActiveBarSerieIndex===u&&T.enabled){var G=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:u,j:d}),j.fontSize);$?(k=U-S+Math.round(G.width/2)-z-T.offsetX-15,F="end"):k=U-S-Math.round(G.width/2)+z+T.offsetX+15,N=M+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:M,totalDataLabelsX:k,totalDataLabelsY:N,totalDataLabelsAnchor:F}}},{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,z=b.globals.collapsedSeriesIndices.indexOf(d)>-1;if(y.enabled&&!z){T=j.group({class:"apexcharts-data-labels",transform:w});var D="";l!==void 0&&(D=L(l,s(s({},b),{},{seriesIndex:d,dataPointIndex:u,w:b}))),!l&&b.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(D="");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)&&(D=""):h.height/1.6>Math.abs(g)&&(D=""));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:D,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}(),u5=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 _e(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,z=L+j;d+=.001,u+=.001;var D=S.move(T,d),m=S.move(T,d),k=S.line(z-h,d);if(w.globals.previousPaths.length>0&&(m=this.barCtx.getPreviousPath(x,b,!1)),D=D+S.line(T,u)+S.line(z-h,u)+S.line(z-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)&&(D=S.roundPathCorners(D,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:D,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,z=j+L;d+=.001,u+=.001;var D=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,z-h);if(D=D+S.line(u,T)+S.line(u,z-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)&&(D=S.roundPathCorners(D,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:D,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 R,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,R.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=z),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 M=l.group({class:"apexcharts-datalabels","data:realIndex":z});a.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");var F=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 U=0;U0){var me=this.barHelpers.drawBarShadow({color:typeof ie=="string"&&(ie==null?void 0:ie.indexOf("url"))===-1?ie:R.hexToRgba(a.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:te});me&&$.add(me)}this.pathArr.push(te);var we=this.barHelpers.drawGoalLine({barXPosition:te.barXPosition,barYPosition:te.barYPosition,goalX:te.goalX,goalY:te.goalY,barHeight:m,barWidth:k});we&&F.add(we),j=te.y,S=te.x,U>0&&T.push(S+k/2),L.push(j),this.renderSeries({realIndex:z,pathFill:ie,j:U,i:h,pathFrom:te.pathFrom,pathTo:te.pathTo,strokeWidth:G,elSeries:D,x:S,y:j,series:i,barHeight:te.barHeight?te.barHeight:m,barWidth:te.barWidth?te.barWidth:k,elDataLabelsWrap:M,elGoalsMarkers:F,elBarShadows:$,visibleSeries:this.visibleI,type:"bar"})}a.globals.seriesXvalues[z]=T,a.globals.seriesYvalues[z]=L,u.add(D)}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,z=i.barHeight,D=i.barWidth,m=i.barXPosition,k=i.barYPosition,N=i.elDataLabelsWrap,M=i.elGoalsMarkers,F=i.elBarShadows,$=i.visibleSeries,U=i.type,G=this.w,te=new X(this.ctx);l||(l=this.barOptions.distributed?G.globals.stroke.colors[d]:G.globals.stroke.colors[n]),G.config.series[u].data[d]&&G.config.series[u].data[d].strokeColor&&(l=G.config.series[u].data[d].strokeColor),this.isNullValue&&(a="none");var ne=d/G.config.chart.animations.animateGradually.delay*(G.config.chart.animations.speed/G.globals.dataPoints)/2.4,ie=te.renderPaths({i:u,j:d,realIndex:n,pathFrom:g,pathTo:x,stroke:l,strokeWidth:y,strokeLineCap:G.config.stroke.lineCap,fill:a,animationDelay:ne,initialSpeed:G.config.chart.animations.speed,dataChangeSpeed:G.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(U,"-area")});ie.attr("clip-path","url(#gridRectMask".concat(G.globals.cuid,")"));var me=G.config.forecastDataPoints;me.count>0&&d>=G.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 we=new d5(this).handleBarDataLabels({x:w,y:S,y1:j,y2:L,i:u,j:d,series:T,realIndex:n,groupIndex:h,barHeight:z,barWidth:D,barXPosition:m,barYPosition:k,renderedPath:ie,visibleSeries:$});return we.dataLabels!==null&&N.add(we.dataLabels),we.totalDataLabels&&N.add(we.totalDataLabels),b.add(N),M&&b.add(M),F&&b.add(F),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(z,D){z[S]&&j++,D0&&(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 z=this.barHelpers.getZeroValueEncounters({i:S,j}),D=z.nonZeroColumns,m=z.zeroEncounters;D>0&&(h=this.seriesLen*h/D),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}(),P1=function(O){A(n,ps);var i=_(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 ps(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,z=void 0,D=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=[],M=[],F=u.globals.comboCharts?l[j]:j;d.yRatio.length>1&&(d.yaxisIndex=F),d.isReversed=u.config.yaxis[d.yaxisIndex]&&u.config.yaxis[d.yaxisIndex].reversed;var $=d.graphics.group({class:"apexcharts-series",seriesName:R.escapeString(u.globals.seriesNames[F]),rel:j+1,"data:realIndex":F});d.ctx.series.addCollapsedClassToSeries($,F);var U=d.graphics.group({class:"apexcharts-datalabels","data:realIndex":F}),G=d.graphics.group({class:"apexcharts-bar-goals-markers"}),te=0,ne=0,ie=d.initialPositions(x,y,T,z,D,m);y=ie.y,te=ie.barHeight,z=ie.yDivision,m=ie.zeroW,x=ie.x,ne=ie.barWidth,T=ie.xDivision,D=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 D}),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),z=d.i,D=d.j,m=0,k=0;k0){var M=g;this.groupCtx.prevXVal[N-1][D]<0?M=this.series[z][D]>=0?this.groupCtx.prevX[N-1][D]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[N-1][D]:this.groupCtx.prevXVal[N-1][D]>=0&&(M=this.series[z][D]>=0?this.groupCtx.prevX[N-1][D]:this.groupCtx.prevX[N-1][D]-m+2*(this.isReversed?m:0)),l=M}else l=g;x=this.series[z][D]===null?l:l+this.series[z][D]/this.invertedYRatio-2*(this.isReversed?this.series[z][D]/this.invertedYRatio:0);var F=this.barHelpers.getBarpaths({barYPosition:T,barHeight:u,x1:l,x2:x,strokeWidth:h,series:this.series,realIndex:d.realIndex,seriesGroup:w,i:z,j:D,w:L});return this.barHelpers.barBackground({j:D,i:z,y1:T,y2:u,elSeries:j}),y+=S,{pathTo:F.pathTo,pathFrom:F.pathFrom,goalX:this.barHelpers.getGoalValues("x",g,null,z,D),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 z=S.globals.seriesX[j][L];z||(z=0),d=(z-S.globals.minX)/this.xRatio-g/2,S.globals.seriesGroups.length&&(d=(z-S.globals.minX)/this.xRatio-g/2*S.globals.seriesGroups.length)}for(var D,m=d+(y!==-1?y*g:0),k=0,N=0;N0&&!S.globals.isXNumeric||M>0&&S.globals.isXNumeric&&S.globals.seriesX[j-1][L]===S.globals.seriesX[j][L]){var F,$,U,G=Math.min(this.yRatio.length+1,j+1);if(this.groupCtx.prevY[M-1]!==void 0&&this.groupCtx.prevY[M-1].length)for(var te=1;te=0?U-k+2*(this.isReversed?k:0):U;break}if(((we=this.groupCtx.prevYVal[M-ie])===null||we===void 0?void 0:we[L])>=0){$=this.series[j][L]>=0?U:U+k-2*(this.isReversed?k:0);break}}$===void 0&&($=S.globals.gridHeight),D=(F=this.groupCtx.prevYF[0])!==null&&F!==void 0&&F.every(function(Oe){return Oe===0})&&this.groupCtx.prevYF.slice(1,M).every(function(Oe){return Oe.every(function(Ve){return isNaN(Ve)})})?x:$}else D=x;u=this.series[j][L]?D-this.series[j][L]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[j][L]/this.yRatio[this.yaxisIndex]:0):D;var Pe=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:g,y1:D,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:Pe.pathTo,pathFrom:Pe.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,x,j,L),barXPosition:m,x:S.globals.isXNumeric?d-h:d,y:u}}}]),n}(),Yd=function(O){A(n,ps);var i=_(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,z,D,m,k=void 0,N=void 0,M=[],F=[],$=h.globals.comboCharts?d[L]:L,U=g.group({class:"apexcharts-series",seriesName:R.escapeString(h.globals.seriesNames[$]),rel:L+1,"data:realIndex":$});u.ctx.series.addCollapsedClassToSeries(U,$),a[L].length>0&&(u.visibleI=u.visibleI+1);var G,te;u.yRatio.length>1&&(u.yaxisIndex=$);var ne=u.barHelpers.initialPositions();N=ne.y,G=ne.barHeight,z=ne.yDivision,m=ne.zeroW,k=ne.x,te=ne.barWidth,T=ne.xDivision,D=ne.zeroH,F.push(k+te/2);for(var ie=g.group({class:"apexcharts-datalabels","data:realIndex":$}),me=function(Pe){var Oe=u.barHelpers.getStrokeWidth(L,Pe,$),Ve=null,We={indexes:{i:L,j:Pe,realIndex:$},x:k,y:N,strokeWidth:Oe,elSeries:U};Ve=u.isHorizontal?u.drawHorizontalBoxPaths(s(s({},We),{},{yDivision:z,barHeight:G,zeroW:m})):u.drawVerticalBoxPaths(s(s({},We),{},{xDivision:T,barWidth:te,zeroH:D})),N=Ve.y,k=Ve.x,Pe>0&&F.push(k+te/2),M.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:Pe,color:Ve.color[ot],value:a[L][Pe]});u.renderSeries({realIndex:$,pathFill:Tt,lineFill:Zt,j:Pe,i:L,pathFrom:Ve.pathFrom,pathTo:tt,strokeWidth:Oe,elSeries:U,x:k,y:N,series:a,barHeight:G,barWidth:te,elDataLabelsWrap:ie,visibleSeries:u.visibleI,type:h.config.chart.type})})},we=0;wek.c&&(j=!1);var F=Math.min(k.o,k.c),$=Math.max(k.o,k.c),U=k.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[m][S]-y.globals.minX)/this.xRatio-h/2);var G=d+h*this.visibleI;this.series[w][S]===void 0||this.series[w][S]===null?(F=g,$=g):(F=g-F/D,$=g-$/D,N=g-k.h/D,M=g-k.l/D,U=g-k.m/D);var te=b.move(G,g),ne=b.move(G+h/2,F);return y.globals.previousPaths.length>0&&(ne=this.getPreviousPath(m,S,!0)),te=this.isBoxPlot?[b.move(G,F)+b.line(G+h/2,F)+b.line(G+h/2,N)+b.line(G+h/4,N)+b.line(G+h-h/4,N)+b.line(G+h/2,N)+b.line(G+h/2,F)+b.line(G+h,F)+b.line(G+h,U)+b.line(G,U)+b.line(G,F+x/2),b.move(G,U)+b.line(G+h,U)+b.line(G+h,$)+b.line(G+h/2,$)+b.line(G+h/2,M)+b.line(G+h-h/4,M)+b.line(G+h/4,M)+b.line(G+h/2,M)+b.line(G+h/2,$)+b.line(G,$)+b.line(G,U)+"z"]:[b.move(G,$)+b.line(G+h/2,$)+b.line(G+h/2,N)+b.line(G+h/2,$)+b.line(G+h,$)+b.line(G+h,F)+b.line(G+h/2,F)+b.line(G+h/2,M)+b.line(G+h/2,F)+b.line(G,F)+b.line(G,$-x/2)],ne+=b.move(G,F),y.globals.isXNumeric||(d+=u),{pathTo:te,pathFrom:ne,x:d,y:$,barXPosition:G,color:this.isBoxPlot?z: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,z=this.getOHLCValue(T,S),D=g,m=g,k=Math.min(z.o,z.c),N=Math.max(z.o,z.c),M=z.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[T][S]-y.globals.minX)/this.invertedXRatio-h/2);var F=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,D=g+z.h/L,m=g+z.l/L,M=g+z.m/L);var $=b.move(g,F),U=b.move(k,F+h/2);return y.globals.previousPaths.length>0&&(U=this.getPreviousPath(T,S,!0)),$=[b.move(k,F)+b.line(k,F+h/2)+b.line(D,F+h/2)+b.line(D,F+h/2-h/4)+b.line(D,F+h/2+h/4)+b.line(D,F+h/2)+b.line(k,F+h/2)+b.line(k,F+h)+b.line(M,F+h)+b.line(M,F)+b.line(k+x/2,F),b.move(M,F)+b.line(M,F+h)+b.line(N,F+h)+b.line(N,F+h/2)+b.line(m,F+h/2)+b.line(m,F+h-h/4)+b.line(m,F+h/4)+b.line(m,F+h/2)+b.line(N,F+h/2)+b.line(N,F)+b.line(M,F)+"z"],U+=b.move(k,F),y.globals.isXNumeric||(d+=u),{pathTo:$,pathFrom:U,x:N,y:d,barYPosition:F,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}(),T1=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 R;return d.config.plotOptions[i].enableShades&&(x=this.w.config.theme.mode==="dark"?R.hexToRgba(y.shadeColor(-1*u,g.color),d.config.fill.opacity):R.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,B(l.globals.series[n])),b=Math.max.apply(Math,B(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}(),h5=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 T1(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:R.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,M=m.y,F=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=R.polarToCartesian(a.centerX,a.centerY,a.donutSize,y),z=R.polarToCartesian(a.centerX,a.centerY,a.donutSize,g),D=d>180?1:0,m=["M",w,S,"A",u,u,0,D,1,j,L];return n=a.chartType==="donut"?[].concat(m,["L",T.x,T.y,"A",a.donutSize,a.donutSize,0,D,0,z.x,z.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 pa(this.ctx),l=new X(this.ctx),d=new R1(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}(),f5=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&&(M=n.getPreviousPath(z));for(var F=0;F=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 z=w.dropShadow;h.dropShadow(T,z)}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 z=!1;l.config.plotOptions.radialBar.inverseOrder&&(z=!0);for(var D=z?a.series.length-1:0;z?D>=0:D100?100:a.series[D])/100,$=Math.round(this.totalAngle*F)+this.startAngle,U=void 0;l.globals.dataChanged&&(M=this.startAngle,U=Math.round(this.totalAngle*R.negToZero(l.globals.previousPaths[D])/100)+M),Math.abs($)+Math.abs(N)>=360&&($-=.01),Math.abs(U)+Math.abs(M)>=360&&(U-=.01);var G=$-N,te=Array.isArray(l.config.stroke.dashArray)?l.config.stroke.dashArray[D]: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-"+D,strokeDashArray:te});if(X.setAttrs(ne.node,{"data:angle":G,"data:value":a.series[D]}),l.config.chart.dropShadow.enabled){var ie=l.config.chart.dropShadow;h.dropShadow(ne,ie,D)}if(h.setSelectionFilter(ne,0,D),this.addListeners(ne,this.radialDataLabels),m.add(ne),ne.attr({index:0,j:D}),this.barLabels.enabled){var me=R.polarToCartesian(a.centerX,a.centerY,a.size,N),we=this.barLabels.formatter(l.globals.seriesNames[D],{seriesIndex:D,w:l}),Pe=["apexcharts-radialbar-label"];this.barLabels.onClick||Pe.push("apexcharts-no-click");var Oe=this.barLabels.useSeriesColors?l.globals.colors[D]: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:we,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:Oe,cssClass:Pe.join(" ")});tt.on("click",this.onBarLabelClick),tt.attr({rel:D+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:U,prevStartAngle:M,size:a.size,i:D,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=R.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}(),g5=function(O){A(n,ps);var i=_(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 z=0,D=0;this.yRatio.length>1&&(this.yaxisIndex=L);var m=this.barHelpers.initialPositions();j=m.y,w=m.zeroW,S=m.x,D=m.barWidth,z=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"}),M=0;M0});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(z)>-1&&(u=(y=j.barHeight/T.length)*this.visibleI+w*(100-parseInt(this.barOptions.barHeight,10))/100/2+y*(this.visibleI+T.indexOf(z))+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(z)>-1&&(h=(b=j.barWidth/T.length)*this.visibleI+S*(100-parseInt(this.barOptions.barWidth,10))/100/2+b*(this.visibleI+T.indexOf(z))+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),z=Math.max(L.start,L.end);this.series[b][w]===void 0||this.series[b][w]===null?T=x:(T=x-T/S,z=x-z/S);var D=Math.abs(z-T),m=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:h,y1:T,y2:z,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:D,x:d,y:z,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}(),m5=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(R.isNumber(n[u][0])?g+x.config.markers.offsetY:null),y.push(l+x.config.markers.offsetX),b.push(R.isNumber(n[u][h+1])?d+x.config.markers.offsetY:null)}else y.push(l+x.config.markers.offsetX),b.push(R.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}(),x5=function(O){for(var i,n,a,l,d=function(y){for(var b=[],w=y[0],S=y[1],j=b[0]=Gd(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},Ud=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},_1=function(O){var i=x5(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&&(z=(u.globals.seriesX[S][0]-u.globals.minX)/this.xRatio),T.push(z);var D,m=z,k=void 0,N=m,M=this.zeroY,F=this.zeroY;M=this.lineHelpers.determineFirstPrevY({i:w,series:i,prevY:M,lineYPosition:0}).prevY,u.config.stroke.curve==="monotonCubic"&&i[w][0]===null?j.push(null):j.push(M),D=M,g==="rangeArea"&&(k=F=this.lineHelpers.determineFirstPrevY({i:w,series:l,prevY:F,lineYPosition:0}).prevY,L.push(F));var $={type:g,series:i,realIndex:S,i:w,x:z,y:1,pX:m,pY:D,pathsFrom:this._calculatePathsFrom({type:g,series:i,i:w,realIndex:S,prevX:N,prevY:M,prevY2:F}),linePaths:[],areaPaths:[],seriesIndex:a,lineYPosition:0,xArrj:T,yArrj:j,y2Arrj:L,seriesRangeEnd:l},U=this._iterateOverDataPoints(s(s({},$),{},{iterations:g==="rangeArea"?i[w].length-1:void 0,isRangeStart:!0}));if(g==="rangeArea"){var G=this._calculatePathsFrom({series:l,i:w,realIndex:S,prevX:N,prevY:F}),te=this._iterateOverDataPoints(s(s({},$),{},{series:l,pY:k,pathsFrom:G,iterations:l[w].length-1,isRangeStart:!1}));U.linePaths[0]=te.linePath+U.linePath,U.pathFromLine=te.pathFromLine+U.pathFromLine}this._handlePaths({type:g,realIndex:S,i:w,paths:U}),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,we){return Number(me.node.getAttribute("zIndex"))-Number(we.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:R.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 F=h.renderPaths(N);F.node.setAttribute("stroke-dasharray",x.dashArray),x.strokeWidth&&F.node.setAttribute("stroke-width",x.strokeWidth),this.elSeries.add(F),F.attr("clip-path","url(#forecastMask".concat(u.globals.cuid,")")),M.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,z=i.lineYPosition,D=i.xArrj,m=i.yArrj,k=i.y2Arrj,N=i.isRangeStart,M=i.seriesRangeEnd,F=this.w,$=new X(this.ctx),U=this.yRatio,G=S.prevY,te=S.linePath,ne=S.areaPath,ie=S.pathFromLine,me=S.pathFromArea,we=R.isNumber(F.globals.minYArr[h])?F.globals.minYArr[h]:F.globals.minY;u||(u=F.globals.dataPoints>1?F.globals.dataPoints-1:F.globals.dataPoints);for(var Pe=function(Ir,xi){return xi-Ir/U[a.yaxisIndex]+2*(a.isReversed?Ir/U[a.yaxisIndex]:0)},Oe=y,Ve=F.config.chart.stacked&&!F.globals.comboCharts||F.config.chart.stacked&&F.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&&F.globals.collapsedSeries.length-1){xi--;break}return xi>=0?xi:0}(g-1)][We+1]:z=this.zeroY:z=this.zeroY,tt?y=Pe(we,z):(y=Pe(d[g][We+1],z),l==="rangeArea"&&(Oe=Pe(M[g][We+1],z))),D.push(x),tt&&F.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:G}),Tt=this._createPaths({type:l,series:d,i:g,realIndex:h,j:We,x,y,y2:Oe,xArrj:D,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||F.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:D,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,z=i.linePaths,D=i.areaPaths,m=i.seriesIndex,k=i.isRangeStart,N=this.w,M=new X(this.ctx),F=N.config.stroke.curve,$=this.areaBottomY;if(Array.isArray(N.config.stroke.curve)&&(F=Array.isArray(m)?N.config.stroke.curve[m[l]]:N.config.stroke.curve[l]),n==="rangeArea"&&(N.globals.hasNullValues||N.config.forecastDataPoints.count>0)&&F==="monotoneCubic"&&(F="straight"),F==="monotoneCubic"){var U=n==="rangeArea"?x.length===N.globals.dataPoints:u===a[l].length-2,G=x.map(function(Ve,We){return[x[We],y[We]]}).filter(function(Ve){return Ve[1]!==null});if(U&&G.length>1){var te=_1(G);if(L+=Ud(te),a[l][0]===null?T=L:T+=Ud(te),n==="rangeArea"&&k){L+=M.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]]}),we=_1(me);T=L+=Ud(we)}else T+=M.line(G[G.length-1][0],$)+M.line(G[0][0],$)+M.move(G[0][0],G[0][1])+"z";z.push(L),D.push(T)}}else if(F==="smooth"){var Pe=.35*(h-S);N.globals.hasNullValues?(a[l][u]!==null&&(a[l][u+1]!==null?(L=M.move(S,j)+M.curve(S+Pe,j,h-Pe,g,h+1,g),T=M.move(S+1,j)+M.curve(S+Pe,j,h-Pe,g,h+1,g)+M.line(h,$)+M.line(S,$)+"z"):(L=M.move(S,j),T=M.move(S,j)+"z")),z.push(L),D.push(T)):(L+=M.curve(S+Pe,j,h-Pe,g,h,g),T+=M.curve(S+Pe,j,h-Pe,g,h,g)),S=h,j=g,u===a[l].length-2&&(T=T+M.curve(S,j,h,g,h,$)+M.move(h,g)+"z",n==="rangeArea"&&k?L=L+M.curve(S,j,h,g,h,b)+M.move(h,b)+"z":N.globals.hasNullValues||(z.push(L),D.push(T)))}else{if(a[l][u+1]===null){L+=M.move(h,g);var Oe=N.globals.isXNumeric?(N.globals.seriesX[d][u]-N.globals.minX)/this.xRatio:h-this.xDivision;T=T+M.line(Oe,$)+M.move(h,g)+"z"}a[l][u]===null&&(L+=M.move(h,g),T+=M.move(h,$)),F==="stepline"?(L=L+M.line(h,null,"H")+M.line(null,g,"V"),T=T+M.line(h,null,"H")+M.line(null,g,"V")):F==="straight"&&(L+=M.line(h,g),T+=M.line(h,g)),u===a[l].length-2&&(T=T+M.line(h,$)+M.move(h,g)+"z",n==="rangeArea"&&k?L=L+M.line(h,b)+M.move(h,b)+"z":(z.push(L),D.push(T)))}return{linePaths:z,areaPaths:D,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,z=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=[],z=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}(),y5=86400,b5=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*y5),L=Math.floor(u),T=Math.floor(u/30),z=Math.floor(u/365),D={minMillisecond:h.minMillisecond,minSecond:h.minSecond,minMinute:h.minMinute,minHour:h.minHour,minDate:h.minDate,minMonth:h.minMonth,minYear:h.minYear},m={firstVal:D,currentMillisecond:D.minMillisecond,currentSecond:D.minSecond,currentMinute:D.minMinute,currentHour:D.minHour,currentMonthDate:D.minDate,currentDate:D.minDate,currentMonth:D.minMonth,currentYear:D.minYear,daysWidthOnXAxis:g,hoursWidthOnXAxis:x,minutesWidthOnXAxis:y,secondsWidthOnXAxis:b,numberOfSeconds:j,numberOfMinutes:S,numberOfHours:w,numberOfDays:L,numberOfMonths:T,numberOfYears:z};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 M={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({},M),{},{day:1,value:N.value+1}):N.unit==="day"||N.unit==="hour"?s(s({},M),{},{value:N.value}):N.unit==="minute"?s(s({},M),{},{value:N.value,minute:N.value}):N.unit==="second"?s(s({},M),{},{value:N.value,minute:N.minute,second:N.second}):N});return k.filter(function(N){var M=1,F=Math.ceil(l.globals.gridWidth/120),$=N.value;l.config.xaxis.tickAmount!==void 0&&(F=l.config.xaxis.tickAmount),k.length>F&&(M=Math.floor(k.length/F));var U=!1,G=!1;switch(a.tickInterval){case"years":N.unit==="year"&&(U=!0);break;case"half_year":M=7,N.unit==="year"&&(U=!0);break;case"months":M=1,N.unit==="year"&&(U=!0);break;case"months_fortnight":M=15,N.unit!=="year"&&N.unit!=="month"||(U=!0),$===30&&(G=!0);break;case"months_days":M=10,N.unit==="month"&&(U=!0),$===30&&(G=!0);break;case"week_days":M=8,N.unit==="month"&&(U=!0);break;case"days":M=1,N.unit==="month"&&(U=!0);break;case"hours":N.unit==="day"&&(U=!0);break;case"minutes_fives":case"seconds_fives":$%5!=0&&(G=!0);break;case"seconds_tens":$%10!=0&&(G=!0)}if(a.tickInterval==="hours"||a.tickInterval==="minutes_fives"||a.tickInterval==="seconds_tens"||a.tickInterval==="seconds_fives"){if(!G)return!0}else if(($%M==0||U)&&!G)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:R.monthMod(a+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:g,value:h,unit:y,year:l,month:R.monthMod(a+1)});for(var w=h,S=g,j=0;j1){x=(y.determineDaysOfMonths(l+1,n.minYear)-a+1)*u,g=R.monthMod(l+1);var S=d+w,j=R.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:R.monthMod(l)});for(var T=g+1,z=x,D=0,m=1;Dh.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=R.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:R.monthMod(j),day:y});for(var L=w,T=0;Tg.determineDaysOfMonths(F+1,d)&&(T=1,F+=1),{month:F,date:T}},b=function(M,F){return M>g.determineDaysOfMonths(F+1,d)?F+=1:F},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 z=y(T,l).month;z=b(T,z),this.timeScaleArray.push({position:S,value:j,unit:x,day:T,hour:L,year:d,month:R.monthMod(z)}),L++;for(var D=S,m=0;m=24&&(L=0,x="day",z=y(T+=1,z).month,z=b(T,z));var k=this._getYear(d,z,0);D=60*u+D;var N=L===0?T:L;this.timeScaleArray.push({position:D,value:N,unit:x,hour:L,day:T,year:k,month:R.monthMod(z)}),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,z=(60-a-n/1e3)*y,D=0;D=60&&(w=0,(T+=1)===24&&(T=0)),this.timeScaleArray.push({position:z,value:w,unit:"minute",hour:T,minute:w,day:S,year:this._getYear(L,j,0),month:R.monthMod(j)}),z+=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,z=(1e3-n)/1e3*x,D=0;D=60&&(b=0,++w>=60&&(w=0,++T===24&&(T=0))),this.timeScaleArray.push({position:z,value:b,unit:"second",hour:T,minute:w,second:b,day:S,year:this._getYear(L,j,0),month:R.monthMod(j)}),z+=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}(),w5=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(F,$){var U=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(F),y.i.push($),U++,a.globals.columnSeries=y.series):i[$].type==="area"?(h.series.push(F),h.i.push($),U++):i[$].type==="line"?(u.series.push(F),u.i.push($),U++):i[$].type==="scatter"?(g.series.push(F),g.i.push($)):i[$].type==="bubble"?(x.series.push(F),x.i.push($),U++):i[$].type==="candlestick"?(b.series.push(F),b.i.push($),U++):i[$].type==="boxPlot"?(w.series.push(F),w.i.push($),U++):i[$].type==="rangeBar"?(S.series.push(F),S.i.push($),U++):i[$].type==="rangeArea"?(j.series.push(d.seriesRangeStart[$]),j.seriesRangeEnd.push(d.seriesRangeEnd[$]),j.i.push($),U++):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"),U>1&&(d.comboCharts=!0)):(u.series.push(F),u.i.push($))});var L=new Zd(this.ctx,n),T=new Yd(this.ctx,n);this.ctx.pie=new M1(this.ctx);var z=new p5(this.ctx);this.ctx.rangeBar=new g5(this.ctx,n);var D=new f5(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 P1(this.ctx,n);m.push(k.draw(y.series,y.i))}else this.ctx.bar=new ps(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 Zd(this.ctx,n,!0);m.push(N.draw(g.series,"scatter",g.i))}if(x.series.length>0){var M=new Zd(this.ctx,n,!0);m.push(M.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 P1(this.ctx,n).draw(d.series):(this.ctx.bar=new ps(this.ctx,n),m=this.ctx.bar.draw(d.series));break;case"candlestick":m=new Yd(this.ctx,n).draw(d.series,"candlestick");break;case"boxPlot":m=new Yd(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 h5(this.ctx,n).draw(d.series);break;case"treemap":m=new v5(this.ctx,n).draw(d.series);break;case"pie":case"donut":case"polarArea":m=this.ctx.pie.draw(d.series);break;case"radialBar":m=z.draw(d.series);break;case"radar":m=D.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=R.getDimensions(this.el),l=n.chart.width.toString().split(/[0-9]+/g).pop();l==="%"?R.isNumber(a[0])&&(a[0].width===0&&(a=R.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=R.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 tl(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=R.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 hs(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 b5(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}(),k5=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=R.extend(b.config,i),u&&(b.globals.lastXAxis=i.xaxis?R.clone(i.xaxis):[],b.globals.lastYAxis=i.yaxis?R.clone(i.yaxis):[],b.globals.initialConfig=R.extend({},b.config),b.globals.initialSeries=R.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=R.clone(h.config.series),h.globals.initialSeries=R.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,al=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 M in k)m[N].prototype[M]=k[M];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,M=[],F=0;F1?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;dU);return M},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,M=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 M=new n.Situation({duration:m||1e3,delay:N||0,ease:n.easing[k||"-"]||k});return this.queue(M),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 M=m.length;M--;)k.animations[N][M]instanceof n.Number&&(m[M]=new n.Number(m[M])),k.animations[N][M]=m[M].morph(k.animations[N][M])}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(M){M.detail.situation==k&&(m.call(this,k),this.off("finished.fx",N))}),this._callStart()},during:function(m){var k=this.last(),N=function(M){M.detail.situation==k&&m.call(this,M.detail.pos,n.morph(M.detail.pos),M.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(M){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,M;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&&$<=F&&(this.situation.once[$].call(this.target(),this.pos,F),delete this.situation.once[$]);return this.active&&this.target().fire("during",{pos:this.pos,eased:F,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=F,this):this},eachAt:function(){var m,k=this,N=this.target(),M=this.situation;for(var F in M.animations)m=[].concat(M.animations[F]).map(function(G){return typeof G!="string"&&G.at?G.at(M.ease(k.pos),k.pos):G}),N[F].apply(N,m);for(var F in M.attrs)m=[F].concat(M.attrs[F]).map(function(te){return typeof te!="string"&&te.at?te.at(M.ease(k.pos),k.pos):te}),N.attr.apply(N,m);for(var F in M.styles)m=[F].concat(M.styles[F]).map(function(te){return typeof te!="string"&&te.at?te.at(M.ease(k.pos),k.pos):te}),N.style.apply(N,m);if(M.transforms.length){m=M.initialTransformation,F=0;for(var $=M.transforms.length;F<$;F++){var U=M.transforms[F];U instanceof n.Matrix?m=U.relative?m.multiply(new n.Matrix().morph(U).at(M.ease(this.pos))):m.morph(U).at(M.ease(this.pos)):(U.relative||U.undo(m.extract()),m=m.multiply(U.at(M.ease(this.pos))))}N.matrix(m)}return this},once:function(m,k,N){var M=this.last();return N||(m=M.ease(m)),M.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 M in m)this.attr(M,m[M]);else this.add(m,k,"attrs");return this},plot:function(m,k,N,M){return arguments.length==4?this.plot([m,k,N,M]):this.add("plot",new(this.target()).morphArray(m))}}),n.Box=n.invent({create:function(m,k,N,M){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 F;arguments.length==4&&(this.x=m,this.y=k,this.width=N,this.height=M),(F=this).x==null&&(F.x=0,F.y=0,F.width=0,F.height=0),F.w=F.width,F.h=F.height,F.x2=F.x+F.width,F.y2=F.y+F.height,F.cx=F.x+F.width/2,F.cy=F.y+F.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 M=m.clone(n.parser.draw.instance).show();M&&M.node&&typeof M.node.getBBox=="function"&&(k=M.node.getBBox()),M&&typeof M.remove=="function"&&M.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=z.length-1;N>=0;--N)this[z[N]]=m[z[N]]!=null?m[z[N]]:k[z[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=z.length-1;k>=0;k--)m[z[k]]=this[z[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 M in m)this.attr(M,m[M]);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,M=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(),M=0,F=N.length;M=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 M=h[m].length-1;M>=0;M--)N[h[m][M]]!=null&&this.attr(h.prefix(m,h[m][M]),N[h[m][M]]);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(M){n.Set.prototype[M]=function(){for(var F=0,$=this.members.length;F<$;F++)this.members[F]&&typeof this.members[F][M]=="function"&&this.members[F][M].apply(this.members[F],arguments);return M=="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 M=0,F=this.set.members.length;M=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 M=(N||"").toString().match(n.regex.reference);if(M)return M[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 z="abcdef".split("");if(typeof O.CustomEvent!="function"){var D=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};D.prototype=O.Event.prototype,n.CustomEvent=D}else n.CustomEvent=O.CustomEvent;return n},o(t)==="object"?e.exports=Rn.document?sl(Rn,Rn.document):function(O){return sl(O,O.document)}:Rn.SVG=sl(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]),z=new SVG.Point(It.x-T.x,It.y-T.y),D=new SVG.Point(Vt.x-T.x,Vt.y-T.y),m=Math.acos(z.x/Math.sqrt(z.x*z.x+z.y*z.y)),z.y<0&&(m*=-1),k=Math.acos(D.x/Math.sqrt(D.x*D.x+D.y*D.y)),D.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 O1=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 w5(this.ctx.el,this.ctx),this.ctx.config=new oe({}),this.ctx.data=new Nt(this.ctx),this.ctx.grid=new Ko(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 N1(this.ctx),this.ctx.exports=new us(this.ctx),this.ctx.localization=new E1(this.ctx),this.ctx.options=new Le,this.ctx.responsive=new se(this.ctx),this.ctx.series=new _e(this.ctx),this.ctx.theme=new be(this.ctx),this.ctx.formatters=new qe(this.ctx),this.ctx.titleSubtitle=new xe(this.ctx),this.ctx.legend=new el(this.ctx),this.ctx.toolbar=new fs(this.ctx),this.ctx.tooltip=new L1(this.ctx),this.ctx.dimensions=new Pt(this.ctx),this.ctx.updateHelpers=new k5(this.ctx),this.ctx.zoomPanSelection=new ga(this.ctx),this.ctx.w.globals.tooltip=new L1(this.ctx)}}]),O}(),I1=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}(),qd=new WeakMap,C5=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=R.randomId(),this.w.globals.chartID=this.w.config.chart.id?R.escapeString(this.w.config.chart.id):this.w.globals.cuid,new O1(this).initModules(),this.create=R.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(z){j&&S.call(w,z),j=!0});w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(w.children).forEach(function(z){return T.observe(z)}):T.observe(w),qd.set(S,T)}(i.el.parentNode,i.parentResizeHandler),!i.css){var d=i.el.getRootNode&&i.el.getRootNode(),u=R.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,M){return N+M.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 M=m.bbox();k==null?k=M.width/M.height*N:N==null&&(N=M.height/M.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 M=h[m].length-1;M>=0;M--)N[h[m][M]]!=null&&this.attr(h.prefix(m,h[m][M]),N[h[m][M]]);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(M){n.Set.prototype[M]=function(){for(var F=0,$=this.members.length;F<$;F++)this.members[F]&&typeof this.members[F][M]=="function"&&this.members[F][M].apply(this.members[F],arguments);return M=="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 M=0,F=this.set.members.length;M=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 M=(N||"").toString().match(n.regex.reference);if(M)return M[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 z="abcdef".split("");if(typeof O.CustomEvent!="function"){var D=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};D.prototype=O.Event.prototype,n.CustomEvent=D}else n.CustomEvent=O.CustomEvent;return n},o(t)==="object"?e.exports=Rn.document?al(Rn,Rn.document):function(O){return al(O,O.document)}:Rn.SVG=al(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]),z=new SVG.Point(It.x-T.x,It.y-T.y),D=new SVG.Point(Vt.x-T.x,Vt.y-T.y),m=Math.acos(z.x/Math.sqrt(z.x*z.x+z.y*z.y)),z.y<0&&(m*=-1),k=Math.acos(D.x/Math.sqrt(D.x*D.x+D.y*D.y)),D.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 O1=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 w5(this.ctx.el,this.ctx),this.ctx.config=new oe({}),this.ctx.data=new Nt(this.ctx),this.ctx.grid=new Jo(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 N1(this.ctx),this.ctx.exports=new us(this.ctx),this.ctx.localization=new E1(this.ctx),this.ctx.options=new Le,this.ctx.responsive=new se(this.ctx),this.ctx.series=new _e(this.ctx),this.ctx.theme=new be(this.ctx),this.ctx.formatters=new qe(this.ctx),this.ctx.titleSubtitle=new xe(this.ctx),this.ctx.legend=new tl(this.ctx),this.ctx.toolbar=new fs(this.ctx),this.ctx.tooltip=new L1(this.ctx),this.ctx.dimensions=new Pt(this.ctx),this.ctx.updateHelpers=new k5(this.ctx),this.ctx.zoomPanSelection=new ga(this.ctx),this.ctx.w.globals.tooltip=new L1(this.ctx)}}]),O}(),I1=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}(),qd=new WeakMap,C5=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=R.randomId(),this.w.globals.chartID=this.w.config.chart.id?R.escapeString(this.w.config.chart.id):this.w.globals.cuid,new O1(this).initModules(),this.create=R.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(z){j&&S.call(w,z),j=!0});w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(w.children).forEach(function(z){return T.observe(z)}):T.observe(w),qd.set(S,T)}(i.el.parentNode,i.parentResizeHandler),!i.css){var d=i.el.getRootNode&&i.el.getRootNode(),u=R.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 +788,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 O1(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 Ko(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=qd.get(i))&&(n.disconnect(),qd.delete(i));var a=this.w.config.chart.id;a&&Apex._chartInstances.forEach(function(l,d){l.id===R.escapeString(a)&&Apex._chartInstances.splice(d,1)}),new I1(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 hs(this.ctx).getMinYMaxY(i).highestY}},{key:"getLowestValueInSeries",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new hs(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 us(this.ctx).dataURI(i)}},{key:"exportToCSV",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new us(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=R.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=Y.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=Y.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]=Y.useState({series:[{name:"Profit",data:[4,7,10,11,13,14,17]}]}),[p,v]=Y.useState(Tl);return Y.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]),Y.useEffect(()=>{s&&(s==null?void 0:s.length)>0&&r&&(r==null?void 0:r.length)>0&&v({...Tl,xaxis:{...Tl.xaxis,categories:s},yaxis:{...Tl.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(Wd,{options:p,series:o.series,type:"area",height:350})})})]})},GE=({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"})})]})]}),L0=({children:e,activeCondition:t})=>{const[r,s]=Y.useState(t),o=()=>{s(!r)};return f.jsx("li",{children:e(o,r)})},ZE=({sidebarOpen:e,setSidebarOpen:t})=>{const r=oa(),{pathname:s}=r,o=Y.useRef(null),c=Y.useRef(null),p=localStorage.getItem("sidebar-expanded"),[v,C]=Y.useState(p===null?!1:p==="true");return Y.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)}),Y.useEffect(()=>{const A=({keyCode:E})=>{!e||E!==27||t(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)}),Y.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-75 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(ar,{to:"/",children:f.jsx("img",{src:R2,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(ar,{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(ar,{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(ar,{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(ar,{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(L0,{activeCondition:s==="/forms"||s.includes("forms"),children:(A,E)=>f.jsxs(ge.Fragment,{children:[f.jsxs(ar,{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(ar,{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(ar,{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(ar,{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(L0,{activeCondition:s==="/ui"||s.includes("ui"),children:(A,E)=>f.jsxs(ge.Fragment,{children:[f.jsxs(ar,{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(ar,{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(ar,{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]=Y.useState(!1),{data:s}=Or();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(T2,{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})})]})]})})},qE=({user:e})=>{var c;const t=Jr();e.isAdmin||t.push("/");const{data:r,isLoading:s,error:o}=Zn(sk);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(EE,{totalPageViews:r==null?void 0:r.dailyStats.totalViews,prevDayViewsChangePercent:r==null?void 0:r.dailyStats.prevDayViewsChangePercent}),f.jsx(PE,{dailyStats:r==null?void 0:r.dailyStats,weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx(LE,{dailyStats:r==null?void 0:r.dailyStats,isLoading:s}),f.jsx(NE,{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(UE,{weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx("div",{className:"col-span-12 xl:col-span-8",children:f.jsx(GE,{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})]})})]}),QE=()=>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"})}),KE=()=>{const[e,t]=Y.useState(!1),r=Y.useRef(null),s=Y.useRef(null);return Y.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)}),Y.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"]})]})]})},JE=()=>{var _;const[e,t]=Y.useState(0),[r,s]=Y.useState(1),[o,c]=Y.useState(void 0),[p,v]=Y.useState([]),[C,A]=Y.useState(void 0),{data:E,isLoading:P,error:I}=Zn(ak,{skip:e,hasPaidFilter:C,emailContains:o,subscriptionStatus:(p==null?void 0:p.length)>0?p:void 0});return Y.useEffect(()=>{s(1)},[o,p]),Y.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,B)=>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(B=>B!=null&&B.includes(H.target.value)?B==null?void 0:B.filter(Z=>Z!==H.target.value):B&&[...B,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(QE,{})}),!!(E!=null&&E.users)&&((_=E==null?void 0:E.users)==null?void 0:_.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(KE,{})})]},H.id))]})})},eL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Users"}),f.jsx("div",{className:"flex flex-col gap-10",children:f.jsx(JE,{})})]});let tL={data:""},rL=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||tL,iL=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,nL=/\/\*[^]*?\*\/| +/g,P0=/\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},wi={},s5=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+s5(e[r]);return t}return e},sL=(e,t,r,s,o)=>{let c=s5(e),p=wi[c]||(wi[c]=(C=>{let A=0,E=11;for(;A>>0;return"go"+E})(c));if(!wi[p]){let C=c!==e?e:(A=>{let E,P,I=[{}];for(;E=iL.exec(A.replace(nL,""));)E[4]?I.shift():E[3]?(P=E[3].replace(P0," ").trim(),I.unshift(I[0][P]=I[0][P]||{})):I[0][E[1]]=E[2].replace(P0," ").trim();return I[0]})(e);wi[p]=en(o?{["@keyframes "+p]:C}:C,r?"":"."+p)}let v=r&&wi.g?wi.g:null;return r&&(wi.g=wi[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)})(wi[p],t,s,v),p},aL=(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 $d(e){let t=this||{},r=e.call?e(t.p):e;return sL(r.unshift?r.raw?aL(r,[].slice.call(arguments,1),t.p):r.reduce((s,o)=>Object.assign(s,o&&o.call?o(t.p):o),{}):r,rL(t.target),t.g,t.o,t.k)}let a5,If,zf;$d.bind({g:1});let zi=$d.bind({k:1});function oL(e,t,r,s){en.p=t,a5=e,If=r,zf=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:If&&If()},v),r.o=/ *go\d+/.test(C),v.className=$d.apply(r,s)+(C?" "+C:"");let A=e;return e[0]&&(A=v.as||e,delete v.as),zf&&A[0]&&zf(v),a5(A,v)}return o}}var lL=e=>typeof e=="function",Ff=(e,t)=>lL(e)?e(t):e,cL=(()=>{let e=0;return()=>(++e).toString()})(),dL=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),uL=20,ic=new Map,hL=1e3,T0=e=>{if(ic.has(e))return;let t=setTimeout(()=>{ic.delete(e),Xd({type:4,toastId:e})},hL);ic.set(e,t)},fL=e=>{let t=ic.get(e);t&&clearTimeout(t)},Df=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,uL)};case 1:return t.toast.id&&fL(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)?Df(e,{type:1,toast:r}):Df(e,{type:0,toast:r});case 3:let{toastId:s}=t;return s?T0(s):e.toasts.forEach(c=>{T0(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}))}}},pL=[],Qu={toasts:[],pausedAt:void 0},Xd=e=>{Qu=Df(Qu,e),pL.forEach(t=>{t(Qu)})},gL=(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)||cL()}),Qo=e=>(t,r)=>{let s=gL(t,e,r);return Xd({type:2,toast:s}),s.id},Yr=(e,t)=>Qo("blank")(e,t);Yr.error=Qo("error");Yr.success=Qo("success");Yr.loading=Qo("loading");Yr.custom=Qo("custom");Yr.dismiss=e=>{Xd({type:3,toastId:e})};Yr.remove=e=>Xd({type:4,toastId:e});Yr.promise=(e,t,r)=>{let s=Yr.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(o=>(Yr.success(Ff(t.success,o),{id:s,...r,...r==null?void 0:r.success}),o)).catch(o=>{Yr.error(Ff(t.error,o),{id:s,...r,...r==null?void 0:r.error})}),e};var mL=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 O1(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 Jo(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=qd.get(i))&&(n.disconnect(),qd.delete(i));var a=this.w.config.chart.id;a&&Apex._chartInstances.forEach(function(l,d){l.id===R.escapeString(a)&&Apex._chartInstances.splice(d,1)}),new I1(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 hs(this.ctx).getMinYMaxY(i).highestY}},{key:"getLowestValueInSeries",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new hs(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 us(this.ctx).dataURI(i)}},{key:"exportToCSV",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new us(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=R.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=Y.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=Y.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]=Y.useState({series:[{name:"Profit",data:[4,7,10,11,13,14,17]}]}),[p,v]=Y.useState(Rl);return Y.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]),Y.useEffect(()=>{s&&(s==null?void 0:s.length)>0&&r&&(r==null?void 0:r.length)>0&&v({...Rl,xaxis:{...Rl.xaxis,categories:s},yaxis:{...Rl.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(Wd,{options:p,series:o.series,type:"area",height:350})})})]})},GE=({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"})})]})]}),L0=({children:e,activeCondition:t})=>{const[r,s]=Y.useState(t),o=()=>{s(!r)};return f.jsx("li",{children:e(o,r)})},ZE=({sidebarOpen:e,setSidebarOpen:t})=>{const r=oa(),{pathname:s}=r,o=Y.useRef(null),c=Y.useRef(null),p=localStorage.getItem("sidebar-expanded"),[v,C]=Y.useState(p===null?!1:p==="true");return Y.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)}),Y.useEffect(()=>{const A=({keyCode:E})=>{!e||E!==27||t(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)}),Y.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-75 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(ar,{to:"/",children:f.jsx("img",{src:R2,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(ar,{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(ar,{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(ar,{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(ar,{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(L0,{activeCondition:s==="/forms"||s.includes("forms"),children:(A,E)=>f.jsxs(ge.Fragment,{children:[f.jsxs(ar,{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(ar,{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(ar,{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(ar,{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(L0,{activeCondition:s==="/ui"||s.includes("ui"),children:(A,E)=>f.jsxs(ge.Fragment,{children:[f.jsxs(ar,{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(ar,{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(ar,{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]=Y.useState(!1),{data:s}=Or();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(T2,{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})})]})]})})},qE=({user:e})=>{var c;const t=Jr();e.isAdmin||t.push("/");const{data:r,isLoading:s,error:o}=Zn(sk);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(EE,{totalPageViews:r==null?void 0:r.dailyStats.totalViews,prevDayViewsChangePercent:r==null?void 0:r.dailyStats.prevDayViewsChangePercent}),f.jsx(PE,{dailyStats:r==null?void 0:r.dailyStats,weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx(LE,{dailyStats:r==null?void 0:r.dailyStats,isLoading:s}),f.jsx(NE,{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(UE,{weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx("div",{className:"col-span-12 xl:col-span-8",children:f.jsx(GE,{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})]})})]}),QE=()=>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"})}),KE=()=>{const[e,t]=Y.useState(!1),r=Y.useRef(null),s=Y.useRef(null);return Y.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)}),Y.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"]})]})]})},JE=()=>{var _;const[e,t]=Y.useState(0),[r,s]=Y.useState(1),[o,c]=Y.useState(void 0),[p,v]=Y.useState([]),[C,A]=Y.useState(void 0),{data:E,isLoading:P,error:I}=Zn(ak,{skip:e,hasPaidFilter:C,emailContains:o,subscriptionStatus:(p==null?void 0:p.length)>0?p:void 0});return Y.useEffect(()=>{s(1)},[o,p]),Y.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,B)=>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(B=>B!=null&&B.includes(H.target.value)?B==null?void 0:B.filter(Z=>Z!==H.target.value):B&&[...B,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(QE,{})}),!!(E!=null&&E.users)&&((_=E==null?void 0:E.users)==null?void 0:_.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(KE,{})})]},H.id))]})})},eL=()=>f.jsxs(Hi,{children:[f.jsx(Pn,{pageName:"Users"}),f.jsx("div",{className:"flex flex-col gap-10",children:f.jsx(JE,{})})]});let tL={data:""},rL=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||tL,iL=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,nL=/\/\*[^]*?\*\/| +/g,P0=/\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},wi={},s5=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+s5(e[r]);return t}return e},sL=(e,t,r,s,o)=>{let c=s5(e),p=wi[c]||(wi[c]=(C=>{let A=0,E=11;for(;A>>0;return"go"+E})(c));if(!wi[p]){let C=c!==e?e:(A=>{let E,P,I=[{}];for(;E=iL.exec(A.replace(nL,""));)E[4]?I.shift():E[3]?(P=E[3].replace(P0," ").trim(),I.unshift(I[0][P]=I[0][P]||{})):I[0][E[1]]=E[2].replace(P0," ").trim();return I[0]})(e);wi[p]=en(o?{["@keyframes "+p]:C}:C,r?"":"."+p)}let v=r&&wi.g?wi.g:null;return r&&(wi.g=wi[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)})(wi[p],t,s,v),p},aL=(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 $d(e){let t=this||{},r=e.call?e(t.p):e;return sL(r.unshift?r.raw?aL(r,[].slice.call(arguments,1),t.p):r.reduce((s,o)=>Object.assign(s,o&&o.call?o(t.p):o),{}):r,rL(t.target),t.g,t.o,t.k)}let a5,If,zf;$d.bind({g:1});let zi=$d.bind({k:1});function oL(e,t,r,s){en.p=t,a5=e,If=r,zf=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:If&&If()},v),r.o=/ *go\d+/.test(C),v.className=$d.apply(r,s)+(C?" "+C:"");let A=e;return e[0]&&(A=v.as||e,delete v.as),zf&&A[0]&&zf(v),a5(A,v)}return o}}var lL=e=>typeof e=="function",Ff=(e,t)=>lL(e)?e(t):e,cL=(()=>{let e=0;return()=>(++e).toString()})(),dL=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),uL=20,nc=new Map,hL=1e3,T0=e=>{if(nc.has(e))return;let t=setTimeout(()=>{nc.delete(e),Xd({type:4,toastId:e})},hL);nc.set(e,t)},fL=e=>{let t=nc.get(e);t&&clearTimeout(t)},Df=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,uL)};case 1:return t.toast.id&&fL(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)?Df(e,{type:1,toast:r}):Df(e,{type:0,toast:r});case 3:let{toastId:s}=t;return s?T0(s):e.toasts.forEach(c=>{T0(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}))}}},pL=[],Qu={toasts:[],pausedAt:void 0},Xd=e=>{Qu=Df(Qu,e),pL.forEach(t=>{t(Qu)})},gL=(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)||cL()}),Ko=e=>(t,r)=>{let s=gL(t,e,r);return Xd({type:2,toast:s}),s.id},Yr=(e,t)=>Ko("blank")(e,t);Yr.error=Ko("error");Yr.success=Ko("success");Yr.loading=Ko("loading");Yr.custom=Ko("custom");Yr.dismiss=e=>{Xd({type:3,toastId:e})};Yr.remove=e=>Xd({type:4,toastId:e});Yr.promise=(e,t,r)=>{let s=Yr.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(o=>(Yr.success(Ff(t.success,o),{id:s,...r,...r==null?void 0:r.success}),o)).catch(o=>{Yr.error(Ff(t.error,o),{id:s,...r,...r==null?void 0:r.error})}),e};var mL=zi` from { transform: scale(0) rotate(45deg); opacity: 0; diff --git a/assets/index-CKbZvW8t.css b/assets/index-CKbZvW8t.css deleted file mode 100644 index 59e2292..0000000 --- a/assets/index-CKbZvW8t.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 375px){.container{max-width:375px}}@media (min-width: 425px){.container{max-width:425px}}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}@media (min-width: 2000px){.container{max-width:2000px}}.form-radio:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}.form-checkbox,.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}.form-radio{border-radius:100%}.form-checkbox:focus,.form-radio:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.form-checkbox:checked,.form-radio:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}.form-radio:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-radio:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:checked:hover,.form-checkbox:checked:focus,.form-radio:checked:hover,.form-radio:checked:focus{border-color:transparent;background-color:currentColor}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.\!right-1{right:.25rem!important}.\!right-\[3px\]{right:3px!important}.-right-0{right:-0px}.-right-0\.5{right:-.125rem}.-top-0{top:-0px}.-top-0\.5{top:-.125rem}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-4\.5{left:1.125rem}.left-\[3px\]{left:3px}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-4{top:1rem}.top-\[calc\(100\%-40rem\)\]{top:calc(100% - 40rem)}.top-full{top:100%}.isolate{isolation:isolate}.-z-1{z-index:-1}.-z-10{z-index:-10}.z-1{z-index:1}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-99{z-index:99}.z-999{z-index:999}.z-9999{z-index:9999}.z-99999{z-index:99999}.col-span-1{grid-column:span 1 / span 1}.col-span-12{grid-column:span 12 / span 12}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-5{grid-column:span 5 / span 5}.-m-1{margin:-.25rem}.-m-1\.5{margin:-.375rem}.-m-2{margin:-.5rem}.-m-2\.5{margin:-.625rem}.m-0{margin:0}.m-1{margin:.25rem}.m-1\.5{margin:.375rem}.m-4{margin:1rem}.-mx-3{margin-left:-.75rem;margin-right:-.75rem}.-mx-8{margin-left:-2rem;margin-right:-2rem}.-my-6{margin-top:-1.5rem;margin-bottom:-1.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-8{margin-left:2rem;margin-right:2rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-ml-1{margin-left:-.25rem}.-ml-2{margin-left:-.5rem}.-ml-5{margin-left:-1.25rem}.-mt-1{margin-top:-.25rem}.-mt-2{margin-top:-.5rem}.-mt-40{margin-top:-10rem}.-mt-8{margin-top:-2rem}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-4\.5{margin-bottom:1.125rem}.mb-5{margin-bottom:1.25rem}.mb-5\.5{margin-bottom:1.375rem}.mb-6{margin-bottom:1.5rem}.mb-7{margin-bottom:1.75rem}.mb-7\.5{margin-bottom:1.875rem}.mb-8{margin-bottom:2rem}.me-4{margin-inline-end:1rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-14{margin-top:3.5rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-32{margin-top:8rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.mt-\[0\.1rem\]{margin-top:.1rem}.box-content{box-sizing:content-box}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.aspect-\[1020\/880\]{aspect-ratio:1020/880}.\!h-0{height:0px!important}.h-0{height:0px}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-11\.5{height:2.875rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-15{height:3.75rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-5\.5{height:1.375rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-7\.5{height:1.875rem}.h-8{height:2rem}.h-8\.5{height:2.125rem}.h-9{height:2.25rem}.h-\[calc\(100vh-85px\)\]{height:calc(100vh - 85px)}.h-full{height:100%}.h-screen{height:100vh}.max-h-12{max-height:3rem}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.\!w-full{width:100%!important}.w-0{width:0px}.w-0\.5{width:.125rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-11\.5{width:2.875rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-5\.5{width:1.375rem}.w-5\/6{width:83.333333%}.w-6{width:1.5rem}.w-62\.5{width:15.625rem}.w-75{width:18.75rem}.w-8{width:2rem}.w-8\.5{width:2.125rem}.w-9{width:2.25rem}.w-\[200\%\]{width:200%}.w-\[300\%\]{width:300%}.w-\[55rem\]{width:55rem}.w-\[72\.1875rem\]{width:72.1875rem}.w-auto{width:auto}.w-full{width:100%}.min-w-47\.5{min-width:11.875rem}.max-w-2{max-width:.5rem}.max-w-2\.5{max-width:.625rem}.max-w-270{max-width:67.5rem}.max-w-2xl{max-width:42rem}.max-w-3{max-width:.75rem}.max-w-4{max-width:1rem}.max-w-45{max-width:11.25rem}.max-w-4xl{max-width:56rem}.max-w-60{max-width:15rem}.max-w-7xl{max-width:80rem}.max-w-\[36px\]{max-width:36px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-screen-2xl{max-width:1536px}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.\!translate-x-full{--tw-translate-x: 100% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-wait{cursor:wait}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-20{gap:5rem}.gap-3{gap:.75rem}.gap-3\.5{gap:.875rem}.gap-4{gap:1rem}.gap-4\.5{gap:1.125rem}.gap-5{gap:1.25rem}.gap-5\.5{gap:1.375rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.gap-7\.5{gap:1.875rem}.gap-8{gap:2rem}.gap-9{gap:2.25rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-10{row-gap:2.5rem}.gap-y-12{row-gap:3rem}.gap-y-3{row-gap:.75rem}.gap-y-6{row-gap:1.5rem}.gap-y-8{row-gap:2rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-500\/10>:not([hidden])~:not([hidden]){border-color:#6b72801a}.divide-gray-900\/10>:not([hidden])~:not([hidden]){border-color:#1118271a}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-sm{border-top-left-radius:.125rem;border-top-right-radius:.125rem}.rounded-tl-sm{border-top-left-radius:.125rem}.rounded-tr-sm{border-top-right-radius:.125rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\[\.5px\],.border-\[0\.5px\]{border-width:.5px}.border-\[1\.5px\]{border-width:1.5px}.border-b{border-bottom-width:1px}.border-l-6{border-left-width:6px}.border-l-\[3px\]{border-left-width:3px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-\[\#34D399\]{--tw-border-opacity: 1;border-color:rgb(52 211 153 / var(--tw-border-opacity))}.border-\[\#F87171\]{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.border-captn-dark-blue{--tw-border-opacity: 1;border-color:rgb(0 56 81 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-900\/10{border-color:#1118271a}.border-meta-3{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.border-primary{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}.border-secondary{--tw-border-opacity: 1;border-color:rgb(128 202 238 / var(--tw-border-opacity))}.border-stroke{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-warning{--tw-border-opacity: 1;border-color:rgb(255 167 11 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.\!bg-primary{--tw-bg-opacity: 1 !important;background-color:rgb(60 80 224 / var(--tw-bg-opacity))!important}.bg-\[\#0FADCF\]{--tw-bg-opacity: 1;background-color:rgb(15 173 207 / var(--tw-bg-opacity))}.bg-\[\#34D399\]{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity))}.bg-\[\#6577F3\]{--tw-bg-opacity: 1;background-color:rgb(101 119 243 / var(--tw-bg-opacity))}.bg-\[\#8FD0EF\]{--tw-bg-opacity: 1;background-color:rgb(143 208 239 / var(--tw-bg-opacity))}.bg-\[\#F87171\]{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-captn-cta-green{--tw-bg-opacity: 1;background-color:rgb(113 173 61 / var(--tw-bg-opacity))}.bg-captn-cta-red{--tw-bg-opacity: 1;background-color:rgb(194 40 40 / var(--tw-bg-opacity))}.bg-captn-dark-blue{--tw-bg-opacity: 1;background-color:rgb(0 56 81 / var(--tw-bg-opacity))}.bg-captn-light-blue{--tw-bg-opacity: 1;background-color:rgb(111 170 188 / var(--tw-bg-opacity))}.bg-captn-light-cream{--tw-bg-opacity: 1;background-color:rgb(234 228 217 / var(--tw-bg-opacity))}.bg-captn-light-cream\/30{background-color:#eae4d94d}.bg-captn-rose-quartz{--tw-bg-opacity: 1;background-color:rgb(187 110 144 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-100\/40{background-color:#f3f4f666}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-500\/5{background-color:#6b72800d}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-meta-1{--tw-bg-opacity: 1;background-color:rgb(220 53 69 / var(--tw-bg-opacity))}.bg-meta-2{--tw-bg-opacity: 1;background-color:rgb(239 242 247 / var(--tw-bg-opacity))}.bg-meta-3{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity))}.bg-meta-9{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(128 202 238 / var(--tw-bg-opacity))}.bg-stroke{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-warning{--tw-bg-opacity: 1;background-color:rgb(255 167 11 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-whiter{--tw-bg-opacity: 1;background-color:rgb(245 247 253 / var(--tw-bg-opacity))}.bg-yellow-400\/20{background-color:#facc1533}.bg-opacity-30{--tw-bg-opacity: .3}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-\[15\%\]{--tw-bg-opacity: 15%}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-tr{background-image:linear-gradient(to top right,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from: #fbbf24 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-purple-300{--tw-gradient-to: #d8b4fe var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-meta-3{fill:#10b981}.fill-meta-5{fill:#259ae6}.fill-primary{fill:#3c50e0}.fill-white{fill:#fff}.stroke-current{stroke:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-6\.5{padding:1.625rem}.p-7{padding:1.75rem}.p-7\.5{padding:1.875rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-4\.5{padding-left:1.125rem;padding-right:1.125rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-6\.5{padding-left:1.625rem;padding-right:1.625rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-7\.5{padding-left:1.875rem;padding-right:1.875rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-4\.5{padding-top:1.125rem;padding-bottom:1.125rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-5\.5{padding-top:1.375rem;padding-bottom:1.375rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-2\.5{padding-bottom:.625rem}.pb-24{padding-bottom:6rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-8{padding-bottom:2rem}.pl-10{padding-left:2.5rem}.pl-11{padding-left:2.75rem}.pl-11\.5{padding-left:2.875rem}.pl-16{padding-left:4rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.pr-4\.5{padding-right:1.125rem}.pr-5{padding-right:1.25rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-0\.5{padding-top:.125rem}.pt-10{padding-top:2.5rem}.pt-14{padding-top:3.5rem}.pt-2{padding-top:.5rem}.pt-6{padding-top:1.5rem}.pt-7{padding-top:1.75rem}.pt-7\.5{padding-top:1.875rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-title-md{font-size:24px;line-height:30px}.text-title-md2{font-size:26px;line-height:30px}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-10{line-height:2.5rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-8{line-height:2rem}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.text-\[\#9D5425\]{--tw-text-opacity: 1;color:rgb(157 84 37 / var(--tw-text-opacity))}.text-\[\#B45454\]{--tw-text-opacity: 1;color:rgb(180 84 84 / var(--tw-text-opacity))}.text-\[\#CD5D5D\]{--tw-text-opacity: 1;color:rgb(205 93 93 / var(--tw-text-opacity))}.text-\[\#D0915C\]{--tw-text-opacity: 1;color:rgb(208 145 92 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-body{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-bodydark1{--tw-text-opacity: 1;color:rgb(222 228 238 / var(--tw-text-opacity))}.text-bodydark2{--tw-text-opacity: 1;color:rgb(138 153 175 / var(--tw-text-opacity))}.text-captn-cta-green{--tw-text-opacity: 1;color:rgb(113 173 61 / var(--tw-text-opacity))}.text-captn-dark-blue{--tw-text-opacity: 1;color:rgb(0 56 81 / var(--tw-text-opacity))}.text-captn-light-blue{--tw-text-opacity: 1;color:rgb(111 170 188 / var(--tw-text-opacity))}.text-captn-light-cream{--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-meta-1{--tw-text-opacity: 1;color:rgb(220 53 69 / var(--tw-text-opacity))}.text-meta-3{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.text-meta-5{--tw-text-opacity: 1;color:rgb(37 154 230 / var(--tw-text-opacity))}.text-meta-8{--tw-text-opacity: 1;color:rgb(240 149 12 / var(--tw-text-opacity))}.text-primary{--tw-text-opacity: 1;color:rgb(60 80 224 / var(--tw-text-opacity))}.text-secondary{--tw-text-opacity: 1;color:rgb(128 202 238 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.accent-captn-cta-green{accent-color:#71ad3d}.accent-pink-300{accent-color:#f9a8d4}.\!opacity-100{opacity:1!important}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-card{--tw-shadow: 0px 1px 3px rgba(0, 0, 0, .12);--tw-shadow-colored: 0px 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-default{--tw-shadow: 0px 8px 13px -3px rgba(0, 0, 0, .07);--tw-shadow-colored: 0px 8px 13px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-switcher{--tw-shadow: 0px 2px 4px rgba(0, 0, 0, .2), inset 0px 2px 2px #FFFFFF, inset 0px -1px 1px rgba(0, 0, 0, .1);--tw-shadow-colored: 0px 2px 4px var(--tw-shadow-color), inset 0px 2px 2px var(--tw-shadow-color), inset 0px -1px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.ring-gray-900\/10{--tw-ring-color: rgb(17 24 39 / .1)}.ring-purple-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(233 213 255 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.\!delay-200{transition-delay:.2s!important}.\!delay-\[0\]{transition-delay:0!important}.delay-150{transition-delay:.15s}.delay-200{transition-delay:.2s}.delay-300{transition-delay:.3s}.delay-500{transition-delay:.5s}.delay-\[0\]{transition-delay:0}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-75{transition-duration:75ms}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}@font-face{font-family:Panton-SemiBold;src:url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.eot);src:url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.eot?#iefix) format("embedded-opentype"),url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.woff2) format("woff2"),url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.woff) format("woff"),url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.ttf) format("truetype"),url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.svg#Panton-SemiBold) format("svg")}body{margin:0;font-family:Panton-SemiBold;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}a{color:#6faabc;text-decoration:underline}.user-conversation-container a{color:#003851}.chat-conversations ol,.chat-conversations ul,.chat-conversations li{list-style:auto;margin:10px}.chat-conversations .captn-daily-analysis h2{margin-bottom:10px}.chat-conversations .captn-daily-analysis p{margin:10px auto}.chat-conversations .captn-daily-analysis ul>li{list-style:disc}.toc-marketing-checkbox-wrapper .checkbox-container{padding-left:22px;display:block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.toc-marketing-checkbox-wrapper input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.toc-marketing-checkbox-wrapper .checkmark{position:absolute;top:2px;left:0;height:13px;width:13px;background-color:#eae4d9}.toc-marketing-checkbox-wrapper.light .checkmark{background-color:#fff}.toc-marketing-checkbox-wrapper .checkbox-container:hover input~.checkmark{background-color:#eae4d9}.toc-marketing-checkbox-wrapper.light .checkbox-container:hover input~.checkmark{background-color:#fff}.toc-marketing-checkbox-wrapper .checkbox-container input:checked~.checkmark{background-color:#6faabc}.toc-marketing-checkbox-wrapper.light .checkbox-container input:checked~.checkmark{background-color:#fff}.toc-marketing-checkbox-wrapper .checkmark:after{content:"";position:absolute;display:none}.toc-marketing-checkbox-wrapper .checkbox-container input:checked~.checkmark:after{display:block}.toc-marketing-checkbox-wrapper .checkbox-container .checkmark:after{left:4px;top:0;width:6px;height:11px;border:solid #eae4d9;border-width:0 3px 3px 0;transform:rotate(45deg)}.toc-marketing-checkbox-wrapper.light .checkbox-container .checkmark:after{border:solid #6faabc;border-width:0 3px 3px 0;transform:rotate(45deg)}.toc-marketing-container{transition:max-height .5s;overflow:hidden}.custom-auth-wrapper div>a{background:#eae4d9}.chat-link .editable-chat-name .edit-button{position:absolute;visibility:hidden}.chat-link:hover .editable-chat-name .edit-button{visibility:visible}.gsi-material-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-webkit-appearance:none;background-color:#fff;background-image:none;border:1px solid #747775;border-radius:4px;box-sizing:border-box;color:#1f1f1f;cursor:pointer;font-family:Roboto,arial,sans-serif;font-size:14px;height:40px;letter-spacing:.25px;outline:none;overflow:hidden;padding:0 12px;position:relative;text-align:center;transition:background-color .218s,border-color .218s,box-shadow .218s;vertical-align:middle;white-space:nowrap;width:auto;max-width:400px;min-width:-moz-min-content;min-width:min-content}.gsi-material-button .gsi-material-button-icon{height:20px;margin-right:12px;min-width:20px;width:20px}.gsi-material-button .gsi-material-button-content-wrapper{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;height:100%;justify-content:center;position:relative;width:100%}.gsi-material-button .gsi-material-button-contents{flex-grow:0;font-family:Roboto,arial,sans-serif;font-weight:500;overflow:hidden;text-overflow:ellipsis;vertical-align:top}.gsi-material-button .gsi-material-button-state{transition:opacity .218s;bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.gsi-material-button:disabled{cursor:default;background-color:#ffffff61;border-color:#1f1f1f1f}.gsi-material-button:disabled .gsi-material-button-contents{opacity:38%}.gsi-material-button:disabled .gsi-material-button-icon{opacity:38%}.gsi-material-button:not(:disabled):active .gsi-material-button-state,.gsi-material-button:not(:disabled):focus .gsi-material-button-state{background-color:#303030;opacity:12%}.gsi-material-button:not(:disabled):hover{box-shadow:0 1px 2px #3c40434d,0 1px 3px 1px #3c404326}.gsi-material-button:not(:disabled):hover .gsi-material-button-state{background-color:#303030;opacity:8%}.accordion-wrapper{border-radius:5px;margin-bottom:10px;margin-top:10px}.accordion-title{padding:10px 15px;cursor:pointer}.accordion-item{max-height:0;overflow:hidden;transition:max-height .3s ease-in-out}.accordion-item.collapsed{max-height:100vh}.accordion-content{padding:10px 15px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{opacity:0;animation:.25s ease-in .25s fadeIn;animation-fill-mode:both}.chat-bubble{background-color:#eae4d9;padding:16px 28px;-webkit-border-radius:20px;-webkit-border-bottom-left-radius:2px;-moz-border-radius:20px;-moz-border-radius-bottomleft:2px;border-radius:20px 20px 20px 2px;display:inline-block}.typing{align-items:center;display:flex;height:17px}.typing .dot{animation:mercuryTypingAnimation 1.8s infinite ease-in-out;background-color:#6faabc;border-radius:50%;height:7px;margin-right:4px;vertical-align:middle;width:7px;display:inline-block}.typing .dot:nth-child(1){animation-delay:.2s}.typing .dot:nth-child(2){animation-delay:.3s}.typing .dot:nth-child(3){animation-delay:.4s}.typing .dot:last-child{margin-right:0}@keyframes mercuryTypingAnimation{0%{transform:translateY(0);background-color:#6faabc}28%{transform:translateY(-7px);background-color:#94b3bc}44%{transform:translateY(0);background-color:#b8d4dc}}.tableCheckbox:checked~div span{opacity:1}.tableCheckbox:checked~div{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity))}.apexcharts-legend-text{--tw-text-opacity: 1 !important;color:rgb(100 116 139 / var(--tw-text-opacity))!important}:is(.dark .apexcharts-legend-text){--tw-text-opacity: 1 !important;color:rgb(174 183 192 / var(--tw-text-opacity))!important}.apexcharts-text{fill:#64748b!important}:is(.dark .apexcharts-text){fill:#aeb7c0!important}.apexcharts-xcrosshairs{fill:#e2e8f0!important}:is(.dark .apexcharts-xcrosshairs){fill:#2e3a47!important}.apexcharts-gridline{stroke:#e2e8f0!important}:is(.dark .apexcharts-gridline){stroke:#2e3a47!important}:is(.dark .apexcharts-series.apexcharts-pie-series path){stroke:transparent!important}.apexcharts-legend-series{display:inline-flex!important;gap:.375rem}:is(.dark .apexcharts-tooltip.apexcharts-theme-light){--tw-border-opacity: 1 !important;border-color:rgb(46 58 71 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(36 48 63 / var(--tw-bg-opacity))!important}:is(.dark .apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title){--tw-border-opacity: 1 !important;border-color:rgb(46 58 71 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(49 61 74 / var(--tw-bg-opacity))!important}:is(.dark .apexcharts-xaxistooltip),:is(.dark .apexcharts-yaxistooltip){--tw-border-opacity: 1 !important;border-color:rgb(49 61 74 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(49 61 74 / var(--tw-bg-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(222 228 238 / var(--tw-text-opacity))!important}:is(.dark .apexcharts-xaxistooltip-bottom):after{--tw-border-opacity: 1 !important;border-bottom-color:rgb(49 61 74 / var(--tw-border-opacity))!important}:is(.dark .apexcharts-xaxistooltip-bottom):before{--tw-border-opacity: 1 !important;border-bottom-color:rgb(49 61 74 / var(--tw-border-opacity))!important}.flatpickr-day.selected,.flatpickr-day.selected:hover{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity))}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#3c50e0}:is(.dark .flatpickr-calendar.arrowTop):before{--tw-border-opacity: 1 !important;border-bottom-color:rgb(36 48 63 / var(--tw-border-opacity))!important}:is(.dark .flatpickr-calendar.arrowTop):after{--tw-border-opacity: 1 !important;border-bottom-color:rgb(36 48 63 / var(--tw-border-opacity))!important}.flatpickr-calendar{padding:1.5rem!important}:is(.dark .flatpickr-calendar){--tw-bg-opacity: 1 !important;background-color:rgb(36 48 63 / var(--tw-bg-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(174 183 192 / var(--tw-text-opacity))!important;--tw-shadow: 1px 0 0 #313D4A, -1px 0 0 #313D4A, 0 1px 0 #313D4A, 0 -1px 0 #313D4A, 0 3px 13px rgb(0 0 0 / 8%) !important;--tw-shadow-colored: 1px 0 0 var(--tw-shadow-color), -1px 0 0 var(--tw-shadow-color), 0 1px 0 var(--tw-shadow-color), 0 -1px 0 var(--tw-shadow-color), 0 3px 13px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}@media (min-width: 375px){.flatpickr-calendar{width:auto!important}}:is(.dark .flatpickr-day){--tw-text-opacity: 1 !important;color:rgb(174 183 192 / var(--tw-text-opacity))!important}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{top:1.75rem!important}:is(.dark .flatpickr-months .flatpickr-prev-month),:is(.dark .flatpickr-months .flatpickr-next-month){fill:#fff!important;--tw-text-opacity: 1 !important;color:rgb(234 228 217 / var(--tw-text-opacity))!important}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:1.75rem!important}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:1.75rem!important}:is(.dark span.flatpickr-weekday),:is(.dark .flatpickr-months .flatpickr-month){fill:#fff!important;--tw-text-opacity: 1 !important;color:rgb(234 228 217 / var(--tw-text-opacity))!important}:is(.dark .flatpickr-day.inRange){--tw-border-opacity: 1 !important;border-color:rgb(49 61 74 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(49 61 74 / var(--tw-bg-opacity))!important;--tw-shadow: -5px 0 0 #313D4A, 5px 0 0 #313D4A !important;--tw-shadow-colored: -5px 0 0 var(--tw-shadow-color), 5px 0 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}:is(.dark .flatpickr-day.selected),:is(.dark .flatpickr-day.startRange),:is(.dark .flatpickr-day.endRange){--tw-text-opacity: 1 !important;color:rgb(234 228 217 / var(--tw-text-opacity))!important}.map-btn .jvm-zoom-btn{display:flex;height:1.875rem;width:1.875rem;align-items:center;justify-content:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding-left:0;padding-right:0;padding-top:0;padding-bottom:.125rem;font-size:1.5rem;line-height:2rem;line-height:1;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.map-btn .jvm-zoom-btn:hover{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}:is(.dark .map-btn .jvm-zoom-btn){--tw-border-opacity: 1;border-color:rgb(46 58 71 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(174 183 192 / var(--tw-text-opacity))}:is(.dark .map-btn .jvm-zoom-btn:hover){--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}.mapOne .jvm-zoom-btn{left:auto;top:auto;bottom:0}.mapOne .jvm-zoom-btn.jvm-zoomin{right:2.5rem}.mapOne .jvm-zoom-btn.jvm-zoomout{right:0}.mapTwo .jvm-zoom-btn{top:auto;bottom:0}.mapTwo .jvm-zoom-btn.jvm-zoomin{left:0}.mapTwo .jvm-zoom-btn.jvm-zoomout{left:2.5rem}.taskCheckbox:checked~.box span{opacity:1}.taskCheckbox:checked~p{text-decoration-line:line-through}.taskCheckbox:checked~.box{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity))}:is(.dark .taskCheckbox:checked~.box){--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}.custom-input-date::-webkit-calendar-picker-indicator{background-position:center;background-repeat:no-repeat;background-size:20px}.custom-input-date-1::-webkit-calendar-picker-indicator{background-image:url(./images/icon/icon-calendar.svg)}.custom-input-date-2::-webkit-calendar-picker-indicator{background-image:url(./images/icon/icon-arrow-down.svg)}[x-cloak]{display:none!important}.file\:mr-4::file-selector-button{margin-right:1rem}.file\:mr-5::file-selector-button{margin-right:1.25rem}.file\:border-collapse::file-selector-button{border-collapse:collapse}.file\:cursor-pointer::file-selector-button{cursor:pointer}.file\:rounded::file-selector-button{border-radius:.25rem}.file\:border-0::file-selector-button{border-width:0px}.file\:border-\[0\.5px\]::file-selector-button{border-width:.5px}.file\:border-r::file-selector-button{border-right-width:1px}.file\:border-solid::file-selector-button{border-style:solid}.file\:border-stroke::file-selector-button{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.file\:bg-\[\#EEEEEE\]::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(238 238 238 / var(--tw-bg-opacity))}.file\:bg-whiter::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(245 247 253 / var(--tw-bg-opacity))}.file\:px-2::file-selector-button{padding-left:.5rem;padding-right:.5rem}.file\:px-2\.5::file-selector-button{padding-left:.625rem;padding-right:.625rem}.file\:px-5::file-selector-button{padding-left:1.25rem;padding-right:1.25rem}.file\:py-1::file-selector-button{padding-top:.25rem;padding-bottom:.25rem}.file\:py-3::file-selector-button{padding-top:.75rem;padding-bottom:.75rem}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.hover\:bg-captn-cta-green-hover:hover{--tw-bg-opacity: 1;background-color:rgb(154 196 117 / var(--tw-bg-opacity))}.hover\:bg-captn-light-blue:hover{--tw-bg-opacity: 1;background-color:rgb(111 170 188 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-500:hover{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-opacity-70:hover{--tw-bg-opacity: .7}.hover\:bg-opacity-90:hover{--tw-bg-opacity: .9}.hover\:text-captn-dark-blue:hover{--tw-text-opacity: 1;color:rgb(0 56 81 / var(--tw-text-opacity))}.hover\:text-captn-light-blue:hover{--tw-text-opacity: 1;color:rgb(111 170 188 / var(--tw-text-opacity))}.hover\:text-captn-light-cream:hover{--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}.hover\:text-danger:hover{--tw-text-opacity: 1;color:rgb(211 64 83 / var(--tw-text-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity))}.hover\:text-primary:hover{--tw-text-opacity: 1;color:rgb(60 80 224 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-1:hover{--tw-shadow: 0px 1px 3px rgba(0, 0, 0, .08);--tw-shadow-colored: 0px 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-card:hover{--tw-shadow: 0px 1px 3px rgba(0, 0, 0, .12);--tw-shadow-colored: 0px 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:ring-purple-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(192 132 252 / var(--tw-ring-opacity))}.file\:hover\:bg-primary:hover::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity))}.file\:hover\:bg-opacity-10:hover::file-selector-button{--tw-bg-opacity: .1}.focus\:border-captn-light-blue:focus{--tw-border-opacity: 1;border-color:rgb(111 170 188 / var(--tw-border-opacity))}.focus\:border-primary:focus{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.file\:focus\:border-primary:focus::file-selector-button{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-captn-light-blue:focus-visible{outline-color:#6faabc}.focus-visible\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.focus-visible\:outline-yellow-400:focus-visible{outline-color:#facc15}.active\:border-primary:active{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}.disabled\:cursor-default:disabled{cursor:default}.disabled\:bg-whiter:disabled{--tw-bg-opacity: 1;background-color:rgb(245 247 253 / var(--tw-bg-opacity))}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:text-primary{--tw-text-opacity: 1;color:rgb(60 80 224 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}:is(.dark .dark\:inline-block){display:inline-block}:is(.dark .dark\:hidden){display:none}:is(.dark .dark\:divide-gray-200\/10)>:not([hidden])~:not([hidden]){border-color:#e5e7eb1a}:is(.dark .dark\:border-form-strokedark){--tw-border-opacity: 1;border-color:rgb(61 77 96 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-200\/10){border-color:#e5e7eb1a}:is(.dark .dark\:border-strokedark){--tw-border-opacity: 1;border-color:rgb(46 58 71 / var(--tw-border-opacity))}:is(.dark .dark\:\!bg-white){--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}:is(.dark .dark\:bg-\[\#1B1B24\]){--tw-bg-opacity: 1;background-color:rgb(27 27 36 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#5A616B\]){--tw-bg-opacity: 1;background-color:rgb(90 97 107 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-boxdark){--tw-bg-opacity: 1;background-color:rgb(36 48 63 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-boxdark-2){--tw-bg-opacity: 1;background-color:rgb(26 34 44 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-captn-dark-blue){--tw-bg-opacity: 1;background-color:rgb(0 56 81 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-form-input){--tw-bg-opacity: 1;background-color:rgb(29 42 57 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-400){--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-700\/50){background-color:#37415180}:is(.dark .dark\:bg-meta-4){--tw-bg-opacity: 1;background-color:rgb(49 61 74 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-transparent){background-color:transparent}:is(.dark .dark\:bg-white){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-white\/30){background-color:#ffffff4d}:is(.dark .dark\:bg-opacity-30){--tw-bg-opacity: .3}:is(.dark .dark\:fill-black){fill:#000}:is(.dark .dark\:fill-white){fill:#fff}:is(.dark .dark\:text-\[\#34D399\]){--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity))}:is(.dark .dark\:text-bodydark){--tw-text-opacity: 1;color:rgb(174 183 192 / var(--tw-text-opacity))}:is(.dark .dark\:text-captn-light-cream){--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-50){--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:opacity-80){opacity:.8}:is(.dark .dark\:drop-shadow-none){--tw-drop-shadow: drop-shadow(0 0 #0000);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:file\:border-form-strokedark)::file-selector-button{--tw-border-opacity: 1;border-color:rgb(61 77 96 / var(--tw-border-opacity))}:is(.dark .dark\:file\:border-strokedark)::file-selector-button{--tw-border-opacity: 1;border-color:rgb(46 58 71 / var(--tw-border-opacity))}:is(.dark .dark\:file\:bg-white\/30)::file-selector-button{background-color:#ffffff4d}:is(.dark .dark\:file\:text-white)::file-selector-button{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:bg-boxdark:hover){--tw-bg-opacity: 1;background-color:rgb(36 48 63 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-boxdark-2:hover){--tw-bg-opacity: 1;background-color:rgb(26 34 44 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-meta-4:hover){--tw-bg-opacity: 1;background-color:rgb(49 61 74 / var(--tw-bg-opacity))}:is(.dark .hover\:dark\:bg-boxdark-2):hover{--tw-bg-opacity: 1;background-color:rgb(26 34 44 / var(--tw-bg-opacity))}:is(.dark .dark\:focus\:border-primary:focus){--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}:is(.dark .dark\:disabled\:bg-black:disabled){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}@media (min-width: 375px){.\32xsm\:gap-4{gap:1rem}.\32xsm\:gap-7{gap:1.75rem}}@media (min-width: 425px){.xsm\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 640px){.sm\:-left-3\/4{left:-75%}.sm\:left-5{left:1.25rem}.sm\:right-1\/4{right:25%}.sm\:right-5{right:1.25rem}.sm\:top-0{top:0}.sm\:top-5{top:1.25rem}.sm\:top-\[calc\(100\%-65rem\)\]{top:calc(100% - 65rem)}.sm\:col-span-1{grid-column:span 1 / span 1}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:mt-0{margin-top:0}.sm\:mt-14{margin-top:3.5rem}.sm\:mt-20{margin-top:5rem}.sm\:mt-5{margin-top:1.25rem}.sm\:mt-56{margin-top:14rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:w-1\/2{width:50%}.sm\:w-full{width:100%}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:translate-x-1\/2{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:translate-x-1\/4{--tw-translate-x: 25%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-4{gap:1rem}.sm\:gap-5{gap:1.25rem}.sm\:gap-x-10{-moz-column-gap:2.5rem;column-gap:2.5rem}.sm\:gap-y-14{row-gap:3.5rem}.sm\:divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.sm\:divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.sm\:rounded-lg{border-radius:.5rem}.sm\:rounded-xl{border-radius:.75rem}.sm\:border-b-0{border-bottom-width:0px}.sm\:p-0{padding:0}.sm\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:px-7{padding-left:1.75rem;padding-right:1.75rem}.sm\:px-7\.5{padding-left:1.875rem;padding-right:1.875rem}.sm\:py-16{padding-top:4rem;padding-bottom:4rem}.sm\:py-32{padding-top:8rem;padding-bottom:8rem}.sm\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.sm\:py-7{padding-top:1.75rem;padding-bottom:1.75rem}.sm\:py-7\.5{padding-top:1.875rem;padding-bottom:1.875rem}.sm\:pb-0{padding-bottom:0}.sm\:pb-24{padding-bottom:6rem}.sm\:pb-32{padding-bottom:8rem}.sm\:pt-12{padding-top:3rem}.sm\:text-5xl{font-size:3rem;line-height:1}.sm\:text-6xl{font-size:3.75rem;line-height:1}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:leading-8{line-height:2rem}.sm\:ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.sm\:ring-gray-900\/10{--tw-ring-color: rgb(17 24 39 / .1)}}@media (min-width: 768px){.md\:visible{visibility:visible}.md\:-mt-10{margin-top:-2.5rem}.md\:ml-4{margin-left:1rem}.md\:mt-6{margin-top:1.5rem}.md\:hidden{display:none}.md\:h-25{height:6.25rem}.md\:h-30{height:7.5rem}.md\:w-\[190\%\]{width:190%}.md\:w-\[290\%\]{width:290%}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:gap-6{gap:1.5rem}.md\:p-6{padding:1.5rem}.md\:p-9{padding:2.25rem}.md\:px-12{padding-left:3rem;padding-right:3rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-title-lg{font-size:28px;line-height:35px}.md\:opacity-100{opacity:1}}@media (min-width: 1024px){.lg\:static{position:static}.lg\:col-span-5{grid-column:span 5 / span 5}.lg\:col-span-7{grid-column:span 7 / span 7}.lg\:-m-4{margin:-1rem}.lg\:m-8{margin:2rem}.lg\:mx-0{margin-left:0;margin-right:0}.lg\:mb-18{margin-bottom:4.5rem}.lg\:mt-0{margin-top:0}.lg\:mt-10{margin-top:2.5rem}.lg\:mt-24{margin-top:6rem}.lg\:mt-8{margin-top:2rem}.lg\:mt-9{margin-top:2.25rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:w-1\/4{width:25%}.lg\:max-w-4xl{max-width:56rem}.lg\:max-w-7xl{max-width:80rem}.lg\:max-w-none{max-width:none}.lg\:flex-1{flex:1 1 0%}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:justify-end{justify-content:flex-end}.lg\:gap-8{gap:2rem}.lg\:gap-x-12{-moz-column-gap:3rem;column-gap:3rem}.lg\:gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.lg\:gap-y-16{row-gap:4rem}.lg\:rounded-2xl{border-radius:1rem}.lg\:p-4{padding:1rem}.lg\:px-20{padding-left:5rem;padding-right:5rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-3{padding-top:.75rem;padding-bottom:.75rem}.lg\:py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.lg\:py-32{padding-top:8rem;padding-bottom:8rem}.lg\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.lg\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.lg\:py-6\.5{padding-top:1.625rem;padding-bottom:1.625rem}.lg\:pl-5{padding-left:1.25rem}.lg\:text-captn-light-cream{--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}.lg\:ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.lg\:ring-yellow-500\/50{--tw-ring-color: rgb(234 179 8 / .5)}}@media (min-width: 1280px){.xl\:col-span-2{grid-column:span 2 / span 2}.xl\:col-span-3{grid-column:span 3 / span 3}.xl\:col-span-5{grid-column:span 5 / span 5}.xl\:col-span-8{grid-column:span 8 / span 8}.xl\:h-31{height:7.75rem}.xl\:w-1\/2{width:50%}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:flex-row{flex-direction:row}.xl\:gap-0{gap:0px}.xl\:gap-20{gap:5rem}.xl\:gap-7{gap:1.75rem}.xl\:gap-7\.5{gap:1.875rem}.xl\:border-b-0{border-bottom-width:0px}.xl\:border-r{border-right-width:1px}.xl\:p-10{padding:2.5rem}.xl\:p-5{padding:1.25rem}.xl\:p-9{padding:2.25rem}.xl\:px-10{padding-left:2.5rem;padding-right:2.5rem}.xl\:pb-0{padding-bottom:0}.xl\:pb-1{padding-bottom:.25rem}}@media (min-width: 1536px){.\32xl\:mt-7{margin-top:1.75rem}.\32xl\:mt-7\.5{margin-top:1.875rem}.\32xl\:gap-7{gap:1.75rem}.\32xl\:gap-7\.5{gap:1.875rem}.\32xl\:p-10{padding:2.5rem}} diff --git a/assets/index-M1ZQcW5_.css b/assets/index-M1ZQcW5_.css new file mode 100644 index 0000000..1ff0a80 --- /dev/null +++ b/assets/index-M1ZQcW5_.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 375px){.container{max-width:375px}}@media (min-width: 425px){.container{max-width:425px}}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}@media (min-width: 2000px){.container{max-width:2000px}}.form-radio:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}.form-checkbox,.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}.form-radio{border-radius:100%}.form-checkbox:focus,.form-radio:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.form-checkbox:checked,.form-radio:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}.form-radio:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){.form-radio:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}.form-checkbox:checked:hover,.form-checkbox:checked:focus,.form-radio:checked:hover,.form-radio:checked:focus{border-color:transparent;background-color:currentColor}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.\!right-1{right:.25rem!important}.\!right-\[3px\]{right:3px!important}.-right-0{right:-0px}.-right-0\.5{right:-.125rem}.-top-0{top:-0px}.-top-0\.5{top:-.125rem}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-4\.5{left:1.125rem}.left-\[3px\]{left:3px}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-4{top:1rem}.top-\[calc\(100\%-40rem\)\]{top:calc(100% - 40rem)}.top-full{top:100%}.isolate{isolation:isolate}.-z-1{z-index:-1}.-z-10{z-index:-10}.z-1{z-index:1}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-99{z-index:99}.z-999{z-index:999}.z-9999{z-index:9999}.z-99999{z-index:99999}.col-span-1{grid-column:span 1 / span 1}.col-span-12{grid-column:span 12 / span 12}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-5{grid-column:span 5 / span 5}.-m-1{margin:-.25rem}.-m-1\.5{margin:-.375rem}.-m-2{margin:-.5rem}.-m-2\.5{margin:-.625rem}.m-0{margin:0}.m-1{margin:.25rem}.m-1\.5{margin:.375rem}.m-4{margin:1rem}.-mx-3{margin-left:-.75rem;margin-right:-.75rem}.-mx-8{margin-left:-2rem;margin-right:-2rem}.-my-6{margin-top:-1.5rem;margin-bottom:-1.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-8{margin-left:2rem;margin-right:2rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-ml-1{margin-left:-.25rem}.-ml-2{margin-left:-.5rem}.-ml-5{margin-left:-1.25rem}.-mt-1{margin-top:-.25rem}.-mt-2{margin-top:-.5rem}.-mt-40{margin-top:-10rem}.-mt-8{margin-top:-2rem}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-4\.5{margin-bottom:1.125rem}.mb-5{margin-bottom:1.25rem}.mb-5\.5{margin-bottom:1.375rem}.mb-6{margin-bottom:1.5rem}.mb-7{margin-bottom:1.75rem}.mb-7\.5{margin-bottom:1.875rem}.mb-8{margin-bottom:2rem}.me-4{margin-inline-end:1rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.ml-6{margin-left:1.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-14{margin-top:3.5rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-32{margin-top:8rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.mt-\[0\.1rem\]{margin-top:.1rem}.box-content{box-sizing:content-box}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.aspect-\[1020\/880\]{aspect-ratio:1020/880}.\!h-0{height:0px!important}.h-0{height:0px}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-11\.5{height:2.875rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-15{height:3.75rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-5\.5{height:1.375rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-7\.5{height:1.875rem}.h-8{height:2rem}.h-8\.5{height:2.125rem}.h-9{height:2.25rem}.h-\[calc\(100vh-85px\)\]{height:calc(100vh - 85px)}.h-full{height:100%}.h-screen{height:100vh}.max-h-12{max-height:3rem}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.\!w-full{width:100%!important}.w-0{width:0px}.w-0\.5{width:.125rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-11\.5{width:2.875rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-5\.5{width:1.375rem}.w-5\/6{width:83.333333%}.w-6{width:1.5rem}.w-62\.5{width:15.625rem}.w-75{width:18.75rem}.w-8{width:2rem}.w-8\.5{width:2.125rem}.w-9{width:2.25rem}.w-\[200\%\]{width:200%}.w-\[300\%\]{width:300%}.w-\[55rem\]{width:55rem}.w-\[72\.1875rem\]{width:72.1875rem}.w-auto{width:auto}.w-full{width:100%}.min-w-47\.5{min-width:11.875rem}.max-w-2{max-width:.5rem}.max-w-2\.5{max-width:.625rem}.max-w-270{max-width:67.5rem}.max-w-2xl{max-width:42rem}.max-w-3{max-width:.75rem}.max-w-4{max-width:1rem}.max-w-45{max-width:11.25rem}.max-w-4xl{max-width:56rem}.max-w-60{max-width:15rem}.max-w-7xl{max-width:80rem}.max-w-\[36px\]{max-width:36px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-screen-2xl{max-width:1536px}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.\!translate-x-full{--tw-translate-x: 100% !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-wait{cursor:wait}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-20{gap:5rem}.gap-3{gap:.75rem}.gap-3\.5{gap:.875rem}.gap-4{gap:1rem}.gap-4\.5{gap:1.125rem}.gap-5{gap:1.25rem}.gap-5\.5{gap:1.375rem}.gap-6{gap:1.5rem}.gap-7{gap:1.75rem}.gap-7\.5{gap:1.875rem}.gap-8{gap:2rem}.gap-9{gap:2.25rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.gap-y-10{row-gap:2.5rem}.gap-y-12{row-gap:3rem}.gap-y-3{row-gap:.75rem}.gap-y-6{row-gap:1.5rem}.gap-y-8{row-gap:2rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-500\/10>:not([hidden])~:not([hidden]){border-color:#6b72801a}.divide-gray-900\/10>:not([hidden])~:not([hidden]){border-color:#1118271a}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-t-sm{border-top-left-radius:.125rem;border-top-right-radius:.125rem}.rounded-tl-sm{border-top-left-radius:.125rem}.rounded-tr-sm{border-top-right-radius:.125rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\[\.5px\],.border-\[0\.5px\]{border-width:.5px}.border-\[1\.5px\]{border-width:1.5px}.border-b{border-bottom-width:1px}.border-l-6{border-left-width:6px}.border-l-\[3px\]{border-left-width:3px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-t-4{border-top-width:4px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-\[\#34D399\]{--tw-border-opacity: 1;border-color:rgb(52 211 153 / var(--tw-border-opacity))}.border-\[\#F87171\]{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.border-captn-dark-blue{--tw-border-opacity: 1;border-color:rgb(0 56 81 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-900\/10{border-color:#1118271a}.border-meta-3{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity))}.border-primary{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}.border-secondary{--tw-border-opacity: 1;border-color:rgb(128 202 238 / var(--tw-border-opacity))}.border-stroke{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-warning{--tw-border-opacity: 1;border-color:rgb(255 167 11 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.\!bg-primary{--tw-bg-opacity: 1 !important;background-color:rgb(60 80 224 / var(--tw-bg-opacity))!important}.bg-\[\#0FADCF\]{--tw-bg-opacity: 1;background-color:rgb(15 173 207 / var(--tw-bg-opacity))}.bg-\[\#34D399\]{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity))}.bg-\[\#6577F3\]{--tw-bg-opacity: 1;background-color:rgb(101 119 243 / var(--tw-bg-opacity))}.bg-\[\#8FD0EF\]{--tw-bg-opacity: 1;background-color:rgb(143 208 239 / var(--tw-bg-opacity))}.bg-\[\#F87171\]{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-captn-cta-green{--tw-bg-opacity: 1;background-color:rgb(113 173 61 / var(--tw-bg-opacity))}.bg-captn-cta-red{--tw-bg-opacity: 1;background-color:rgb(194 40 40 / var(--tw-bg-opacity))}.bg-captn-dark-blue{--tw-bg-opacity: 1;background-color:rgb(0 56 81 / var(--tw-bg-opacity))}.bg-captn-light-blue{--tw-bg-opacity: 1;background-color:rgb(111 170 188 / var(--tw-bg-opacity))}.bg-captn-light-cream{--tw-bg-opacity: 1;background-color:rgb(234 228 217 / var(--tw-bg-opacity))}.bg-captn-light-cream\/30{background-color:#eae4d94d}.bg-captn-rose-quartz{--tw-bg-opacity: 1;background-color:rgb(187 110 144 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-100\/40{background-color:#f3f4f666}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-500\/5{background-color:#6b72800d}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-meta-1{--tw-bg-opacity: 1;background-color:rgb(220 53 69 / var(--tw-bg-opacity))}.bg-meta-2{--tw-bg-opacity: 1;background-color:rgb(239 242 247 / var(--tw-bg-opacity))}.bg-meta-3{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity))}.bg-meta-9{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(128 202 238 / var(--tw-bg-opacity))}.bg-stroke{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-warning{--tw-bg-opacity: 1;background-color:rgb(255 167 11 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-whiter{--tw-bg-opacity: 1;background-color:rgb(245 247 253 / var(--tw-bg-opacity))}.bg-yellow-400\/20{background-color:#facc1533}.bg-opacity-30{--tw-bg-opacity: .3}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-\[15\%\]{--tw-bg-opacity: 15%}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-tr{background-image:linear-gradient(to top right,var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from: #fbbf24 var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-purple-300{--tw-gradient-to: #d8b4fe var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-meta-3{fill:#10b981}.fill-meta-5{fill:#259ae6}.fill-primary{fill:#3c50e0}.fill-white{fill:#fff}.stroke-current{stroke:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-6\.5{padding:1.625rem}.p-7{padding:1.75rem}.p-7\.5{padding:1.875rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-4\.5{padding-left:1.125rem;padding-right:1.125rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-6\.5{padding-left:1.625rem;padding-right:1.625rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-7\.5{padding-left:1.875rem;padding-right:1.875rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-4\.5{padding-top:1.125rem;padding-bottom:1.125rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-5\.5{padding-top:1.375rem;padding-bottom:1.375rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-2\.5{padding-bottom:.625rem}.pb-24{padding-bottom:6rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-8{padding-bottom:2rem}.pl-10{padding-left:2.5rem}.pl-11{padding-left:2.75rem}.pl-11\.5{padding-left:2.875rem}.pl-16{padding-left:4rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.pr-4\.5{padding-right:1.125rem}.pr-5{padding-right:1.25rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-0\.5{padding-top:.125rem}.pt-10{padding-top:2.5rem}.pt-14{padding-top:3.5rem}.pt-2{padding-top:.5rem}.pt-6{padding-top:1.5rem}.pt-7{padding-top:1.75rem}.pt-7\.5{padding-top:1.875rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-title-md{font-size:24px;line-height:30px}.text-title-md2{font-size:26px;line-height:30px}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-10{line-height:2.5rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-8{line-height:2rem}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.\!text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity))!important}.text-\[\#9D5425\]{--tw-text-opacity: 1;color:rgb(157 84 37 / var(--tw-text-opacity))}.text-\[\#B45454\]{--tw-text-opacity: 1;color:rgb(180 84 84 / var(--tw-text-opacity))}.text-\[\#CD5D5D\]{--tw-text-opacity: 1;color:rgb(205 93 93 / var(--tw-text-opacity))}.text-\[\#D0915C\]{--tw-text-opacity: 1;color:rgb(208 145 92 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-body{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-bodydark1{--tw-text-opacity: 1;color:rgb(222 228 238 / var(--tw-text-opacity))}.text-bodydark2{--tw-text-opacity: 1;color:rgb(138 153 175 / var(--tw-text-opacity))}.text-captn-cta-green{--tw-text-opacity: 1;color:rgb(113 173 61 / var(--tw-text-opacity))}.text-captn-dark-blue{--tw-text-opacity: 1;color:rgb(0 56 81 / var(--tw-text-opacity))}.text-captn-light-blue{--tw-text-opacity: 1;color:rgb(111 170 188 / var(--tw-text-opacity))}.text-captn-light-cream{--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-meta-1{--tw-text-opacity: 1;color:rgb(220 53 69 / var(--tw-text-opacity))}.text-meta-3{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.text-meta-5{--tw-text-opacity: 1;color:rgb(37 154 230 / var(--tw-text-opacity))}.text-meta-8{--tw-text-opacity: 1;color:rgb(240 149 12 / var(--tw-text-opacity))}.text-primary{--tw-text-opacity: 1;color:rgb(60 80 224 / var(--tw-text-opacity))}.text-secondary{--tw-text-opacity: 1;color:rgb(128 202 238 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.accent-captn-cta-green{accent-color:#71ad3d}.accent-pink-300{accent-color:#f9a8d4}.\!opacity-100{opacity:1!important}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-card{--tw-shadow: 0px 1px 3px rgba(0, 0, 0, .12);--tw-shadow-colored: 0px 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-default{--tw-shadow: 0px 8px 13px -3px rgba(0, 0, 0, .07);--tw-shadow-colored: 0px 8px 13px -3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-switcher{--tw-shadow: 0px 2px 4px rgba(0, 0, 0, .2), inset 0px 2px 2px #FFFFFF, inset 0px -1px 1px rgba(0, 0, 0, .1);--tw-shadow-colored: 0px 2px 4px var(--tw-shadow-color), inset 0px 2px 2px var(--tw-shadow-color), inset 0px -1px 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-gray-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(229 231 235 / var(--tw-ring-opacity))}.ring-gray-900\/10{--tw-ring-color: rgb(17 24 39 / .1)}.ring-purple-200{--tw-ring-opacity: 1;--tw-ring-color: rgb(233 213 255 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.\!delay-200{transition-delay:.2s!important}.\!delay-\[0\]{transition-delay:0!important}.delay-150{transition-delay:.15s}.delay-200{transition-delay:.2s}.delay-300{transition-delay:.3s}.delay-500{transition-delay:.5s}.delay-\[0\]{transition-delay:0}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-75{transition-duration:75ms}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}@font-face{font-family:Panton-SemiBold;src:url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.eot);src:url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.eot?#iefix) format("embedded-opentype"),url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.woff2) format("woff2"),url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.woff) format("woff"),url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.ttf) format("truetype"),url(/fonts/47a8ea40a6adb66d377bd4931fa3e394.svg#Panton-SemiBold) format("svg")}body{margin:0;font-family:Panton-SemiBold;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}a{color:#6faabc;text-decoration:underline}.user-conversation-container a{color:#003851}.chat-conversations ol,.chat-conversations ul,.chat-conversations li{list-style:auto;margin:10px}.chat-conversations .captn-daily-analysis h2{margin-bottom:10px}.chat-conversations .captn-daily-analysis p{margin:10px auto}.chat-conversations .captn-daily-analysis ul>li{list-style:disc}.toc-marketing-checkbox-wrapper .checkbox-container{padding-left:22px;display:block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.toc-marketing-checkbox-wrapper input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.toc-marketing-checkbox-wrapper .checkmark{position:absolute;top:2px;left:0;height:13px;width:13px;background-color:#eae4d9}.toc-marketing-checkbox-wrapper.light .checkmark{background-color:#fff}.toc-marketing-checkbox-wrapper .checkbox-container:hover input~.checkmark{background-color:#eae4d9}.toc-marketing-checkbox-wrapper.light .checkbox-container:hover input~.checkmark{background-color:#fff}.toc-marketing-checkbox-wrapper .checkbox-container input:checked~.checkmark{background-color:#6faabc}.toc-marketing-checkbox-wrapper.light .checkbox-container input:checked~.checkmark{background-color:#fff}.toc-marketing-checkbox-wrapper .checkmark:after{content:"";position:absolute;display:none}.toc-marketing-checkbox-wrapper .checkbox-container input:checked~.checkmark:after{display:block}.toc-marketing-checkbox-wrapper .checkbox-container .checkmark:after{left:4px;top:0;width:6px;height:11px;border:solid #eae4d9;border-width:0 3px 3px 0;transform:rotate(45deg)}.toc-marketing-checkbox-wrapper.light .checkbox-container .checkmark:after{border:solid #6faabc;border-width:0 3px 3px 0;transform:rotate(45deg)}.toc-marketing-container{transition:max-height .5s;overflow:hidden}.custom-auth-wrapper div>a{background:#eae4d9}.chat-link .editable-chat-name .edit-button{position:absolute;visibility:hidden}.chat-link:hover .editable-chat-name .edit-button{visibility:visible}.gsi-material-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-webkit-appearance:none;background-color:#fff;background-image:none;border:1px solid #747775;border-radius:4px;box-sizing:border-box;color:#1f1f1f;cursor:pointer;font-family:Roboto,arial,sans-serif;font-size:14px;height:40px;letter-spacing:.25px;outline:none;overflow:hidden;padding:0 12px;position:relative;text-align:center;transition:background-color .218s,border-color .218s,box-shadow .218s;vertical-align:middle;white-space:nowrap;width:auto;max-width:400px;min-width:-moz-min-content;min-width:min-content}.gsi-material-button .gsi-material-button-icon{height:20px;margin-right:12px;min-width:20px;width:20px}.gsi-material-button .gsi-material-button-content-wrapper{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;height:100%;justify-content:center;position:relative;width:100%}.gsi-material-button .gsi-material-button-contents{flex-grow:0;font-family:Roboto,arial,sans-serif;font-weight:500;overflow:hidden;text-overflow:ellipsis;vertical-align:top}.gsi-material-button .gsi-material-button-state{transition:opacity .218s;bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.gsi-material-button:disabled{cursor:default;background-color:#ffffff61;border-color:#1f1f1f1f}.gsi-material-button:disabled .gsi-material-button-contents{opacity:38%}.gsi-material-button:disabled .gsi-material-button-icon{opacity:38%}.gsi-material-button:not(:disabled):active .gsi-material-button-state,.gsi-material-button:not(:disabled):focus .gsi-material-button-state{background-color:#303030;opacity:12%}.gsi-material-button:not(:disabled):hover{box-shadow:0 1px 2px #3c40434d,0 1px 3px 1px #3c404326}.gsi-material-button:not(:disabled):hover .gsi-material-button-state{background-color:#303030;opacity:8%}.accordion-wrapper{border-radius:5px;margin-bottom:10px;margin-top:10px}.accordion-title{padding:10px 15px;cursor:pointer}.accordion-item{max-height:0;overflow:hidden;transition:max-height .3s ease-in-out}.accordion-item.collapsed{max-height:100vh}.accordion-content{padding:10px 15px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{opacity:0;animation:.25s ease-in .25s fadeIn;animation-fill-mode:both}.chat-bubble{background-color:#eae4d9;padding:16px 28px;-webkit-border-radius:20px;-webkit-border-bottom-left-radius:2px;-moz-border-radius:20px;-moz-border-radius-bottomleft:2px;border-radius:20px 20px 20px 2px;display:inline-block}.typing{align-items:center;display:flex;height:17px}.typing .dot{animation:mercuryTypingAnimation 1.8s infinite ease-in-out;background-color:#6faabc;border-radius:50%;height:7px;margin-right:4px;vertical-align:middle;width:7px;display:inline-block}.typing .dot:nth-child(1){animation-delay:.2s}.typing .dot:nth-child(2){animation-delay:.3s}.typing .dot:nth-child(3){animation-delay:.4s}.typing .dot:last-child{margin-right:0}@keyframes mercuryTypingAnimation{0%{transform:translateY(0);background-color:#6faabc}28%{transform:translateY(-7px);background-color:#94b3bc}44%{transform:translateY(0);background-color:#b8d4dc}}.tableCheckbox:checked~div span{opacity:1}.tableCheckbox:checked~div{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity))}.apexcharts-legend-text{--tw-text-opacity: 1 !important;color:rgb(100 116 139 / var(--tw-text-opacity))!important}:is(.dark .apexcharts-legend-text){--tw-text-opacity: 1 !important;color:rgb(174 183 192 / var(--tw-text-opacity))!important}.apexcharts-text{fill:#64748b!important}:is(.dark .apexcharts-text){fill:#aeb7c0!important}.apexcharts-xcrosshairs{fill:#e2e8f0!important}:is(.dark .apexcharts-xcrosshairs){fill:#2e3a47!important}.apexcharts-gridline{stroke:#e2e8f0!important}:is(.dark .apexcharts-gridline){stroke:#2e3a47!important}:is(.dark .apexcharts-series.apexcharts-pie-series path){stroke:transparent!important}.apexcharts-legend-series{display:inline-flex!important;gap:.375rem}:is(.dark .apexcharts-tooltip.apexcharts-theme-light){--tw-border-opacity: 1 !important;border-color:rgb(46 58 71 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(36 48 63 / var(--tw-bg-opacity))!important}:is(.dark .apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title){--tw-border-opacity: 1 !important;border-color:rgb(46 58 71 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(49 61 74 / var(--tw-bg-opacity))!important}:is(.dark .apexcharts-xaxistooltip),:is(.dark .apexcharts-yaxistooltip){--tw-border-opacity: 1 !important;border-color:rgb(49 61 74 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(49 61 74 / var(--tw-bg-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(222 228 238 / var(--tw-text-opacity))!important}:is(.dark .apexcharts-xaxistooltip-bottom):after{--tw-border-opacity: 1 !important;border-bottom-color:rgb(49 61 74 / var(--tw-border-opacity))!important}:is(.dark .apexcharts-xaxistooltip-bottom):before{--tw-border-opacity: 1 !important;border-bottom-color:rgb(49 61 74 / var(--tw-border-opacity))!important}.flatpickr-day.selected,.flatpickr-day.selected:hover{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity))}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#3c50e0}:is(.dark .flatpickr-calendar.arrowTop):before{--tw-border-opacity: 1 !important;border-bottom-color:rgb(36 48 63 / var(--tw-border-opacity))!important}:is(.dark .flatpickr-calendar.arrowTop):after{--tw-border-opacity: 1 !important;border-bottom-color:rgb(36 48 63 / var(--tw-border-opacity))!important}.flatpickr-calendar{padding:1.5rem!important}:is(.dark .flatpickr-calendar){--tw-bg-opacity: 1 !important;background-color:rgb(36 48 63 / var(--tw-bg-opacity))!important;--tw-text-opacity: 1 !important;color:rgb(174 183 192 / var(--tw-text-opacity))!important;--tw-shadow: 1px 0 0 #313D4A, -1px 0 0 #313D4A, 0 1px 0 #313D4A, 0 -1px 0 #313D4A, 0 3px 13px rgb(0 0 0 / 8%) !important;--tw-shadow-colored: 1px 0 0 var(--tw-shadow-color), -1px 0 0 var(--tw-shadow-color), 0 1px 0 var(--tw-shadow-color), 0 -1px 0 var(--tw-shadow-color), 0 3px 13px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}@media (min-width: 375px){.flatpickr-calendar{width:auto!important}}:is(.dark .flatpickr-day){--tw-text-opacity: 1 !important;color:rgb(174 183 192 / var(--tw-text-opacity))!important}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{top:1.75rem!important}:is(.dark .flatpickr-months .flatpickr-prev-month),:is(.dark .flatpickr-months .flatpickr-next-month){fill:#fff!important;--tw-text-opacity: 1 !important;color:rgb(234 228 217 / var(--tw-text-opacity))!important}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:1.75rem!important}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:1.75rem!important}:is(.dark span.flatpickr-weekday),:is(.dark .flatpickr-months .flatpickr-month){fill:#fff!important;--tw-text-opacity: 1 !important;color:rgb(234 228 217 / var(--tw-text-opacity))!important}:is(.dark .flatpickr-day.inRange){--tw-border-opacity: 1 !important;border-color:rgb(49 61 74 / var(--tw-border-opacity))!important;--tw-bg-opacity: 1 !important;background-color:rgb(49 61 74 / var(--tw-bg-opacity))!important;--tw-shadow: -5px 0 0 #313D4A, 5px 0 0 #313D4A !important;--tw-shadow-colored: -5px 0 0 var(--tw-shadow-color), 5px 0 0 var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}:is(.dark .flatpickr-day.selected),:is(.dark .flatpickr-day.startRange),:is(.dark .flatpickr-day.endRange){--tw-text-opacity: 1 !important;color:rgb(234 228 217 / var(--tw-text-opacity))!important}.map-btn .jvm-zoom-btn{display:flex;height:1.875rem;width:1.875rem;align-items:center;justify-content:center;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding-left:0;padding-right:0;padding-top:0;padding-bottom:.125rem;font-size:1.5rem;line-height:2rem;line-height:1;--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.map-btn .jvm-zoom-btn:hover{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}:is(.dark .map-btn .jvm-zoom-btn){--tw-border-opacity: 1;border-color:rgb(46 58 71 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(174 183 192 / var(--tw-text-opacity))}:is(.dark .map-btn .jvm-zoom-btn:hover){--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity));--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}.mapOne .jvm-zoom-btn{left:auto;top:auto;bottom:0}.mapOne .jvm-zoom-btn.jvm-zoomin{right:2.5rem}.mapOne .jvm-zoom-btn.jvm-zoomout{right:0}.mapTwo .jvm-zoom-btn{top:auto;bottom:0}.mapTwo .jvm-zoom-btn.jvm-zoomin{left:0}.mapTwo .jvm-zoom-btn.jvm-zoomout{left:2.5rem}.taskCheckbox:checked~.box span{opacity:1}.taskCheckbox:checked~p{text-decoration-line:line-through}.taskCheckbox:checked~.box{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity))}:is(.dark .taskCheckbox:checked~.box){--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}.custom-input-date::-webkit-calendar-picker-indicator{background-position:center;background-repeat:no-repeat;background-size:20px}.custom-input-date-1::-webkit-calendar-picker-indicator{background-image:url(./images/icon/icon-calendar.svg)}.custom-input-date-2::-webkit-calendar-picker-indicator{background-image:url(./images/icon/icon-arrow-down.svg)}[x-cloak]{display:none!important}.file\:mr-4::file-selector-button{margin-right:1rem}.file\:mr-5::file-selector-button{margin-right:1.25rem}.file\:border-collapse::file-selector-button{border-collapse:collapse}.file\:cursor-pointer::file-selector-button{cursor:pointer}.file\:rounded::file-selector-button{border-radius:.25rem}.file\:border-0::file-selector-button{border-width:0px}.file\:border-\[0\.5px\]::file-selector-button{border-width:.5px}.file\:border-r::file-selector-button{border-right-width:1px}.file\:border-solid::file-selector-button{border-style:solid}.file\:border-stroke::file-selector-button{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.file\:bg-\[\#EEEEEE\]::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(238 238 238 / var(--tw-bg-opacity))}.file\:bg-whiter::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(245 247 253 / var(--tw-bg-opacity))}.file\:px-2::file-selector-button{padding-left:.5rem;padding-right:.5rem}.file\:px-2\.5::file-selector-button{padding-left:.625rem;padding-right:.625rem}.file\:px-5::file-selector-button{padding-left:1.25rem;padding-right:1.25rem}.file\:py-1::file-selector-button{padding-top:.25rem;padding-bottom:.25rem}.file\:py-3::file-selector-button{padding-top:.75rem;padding-bottom:.75rem}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.hover\:bg-captn-cta-green-hover:hover{--tw-bg-opacity: 1;background-color:rgb(154 196 117 / var(--tw-bg-opacity))}.hover\:bg-captn-light-blue:hover{--tw-bg-opacity: 1;background-color:rgb(111 170 188 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-gray-500:hover{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.hover\:bg-opacity-70:hover{--tw-bg-opacity: .7}.hover\:bg-opacity-90:hover{--tw-bg-opacity: .9}.hover\:text-captn-dark-blue:hover{--tw-text-opacity: 1;color:rgb(0 56 81 / var(--tw-text-opacity))}.hover\:text-captn-light-blue:hover{--tw-text-opacity: 1;color:rgb(111 170 188 / var(--tw-text-opacity))}.hover\:text-captn-light-cream:hover{--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}.hover\:text-danger:hover{--tw-text-opacity: 1;color:rgb(211 64 83 / var(--tw-text-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity))}.hover\:text-primary:hover{--tw-text-opacity: 1;color:rgb(60 80 224 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:text-yellow-600:hover{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-1:hover{--tw-shadow: 0px 1px 3px rgba(0, 0, 0, .08);--tw-shadow-colored: 0px 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-card:hover{--tw-shadow: 0px 1px 3px rgba(0, 0, 0, .12);--tw-shadow-colored: 0px 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:ring-purple-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(192 132 252 / var(--tw-ring-opacity))}.file\:hover\:bg-primary:hover::file-selector-button{--tw-bg-opacity: 1;background-color:rgb(60 80 224 / var(--tw-bg-opacity))}.file\:hover\:bg-opacity-10:hover::file-selector-button{--tw-bg-opacity: .1}.focus\:border-captn-light-blue:focus{--tw-border-opacity: 1;border-color:rgb(111 170 188 / var(--tw-border-opacity))}.focus\:border-primary:focus{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.file\:focus\:border-primary:focus::file-selector-button{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-captn-light-blue:focus-visible{outline-color:#6faabc}.focus-visible\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.focus-visible\:outline-yellow-400:focus-visible{outline-color:#facc15}.active\:border-primary:active{--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}.disabled\:cursor-default:disabled{cursor:default}.disabled\:bg-whiter:disabled{--tw-bg-opacity: 1;background-color:rgb(245 247 253 / var(--tw-bg-opacity))}.group:hover .group-hover\:visible{visibility:visible}.group:hover .group-hover\:text-primary{--tw-text-opacity: 1;color:rgb(60 80 224 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}:is(.dark .dark\:inline-block){display:inline-block}:is(.dark .dark\:hidden){display:none}:is(.dark .dark\:divide-gray-200\/10)>:not([hidden])~:not([hidden]){border-color:#e5e7eb1a}:is(.dark .dark\:border-form-strokedark){--tw-border-opacity: 1;border-color:rgb(61 77 96 / var(--tw-border-opacity))}:is(.dark .dark\:border-gray-200\/10){border-color:#e5e7eb1a}:is(.dark .dark\:border-strokedark){--tw-border-opacity: 1;border-color:rgb(46 58 71 / var(--tw-border-opacity))}:is(.dark .dark\:\!bg-white){--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}:is(.dark .dark\:bg-\[\#1B1B24\]){--tw-bg-opacity: 1;background-color:rgb(27 27 36 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#5A616B\]){--tw-bg-opacity: 1;background-color:rgb(90 97 107 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-boxdark){--tw-bg-opacity: 1;background-color:rgb(36 48 63 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-boxdark-2){--tw-bg-opacity: 1;background-color:rgb(26 34 44 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-captn-dark-blue){--tw-bg-opacity: 1;background-color:rgb(0 56 81 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-form-input){--tw-bg-opacity: 1;background-color:rgb(29 42 57 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-400){--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-700\/50){background-color:#37415180}:is(.dark .dark\:bg-meta-4){--tw-bg-opacity: 1;background-color:rgb(49 61 74 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-transparent){background-color:transparent}:is(.dark .dark\:bg-white){--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-white\/30){background-color:#ffffff4d}:is(.dark .dark\:bg-opacity-30){--tw-bg-opacity: .3}:is(.dark .dark\:fill-black){fill:#000}:is(.dark .dark\:fill-white){fill:#fff}:is(.dark .dark\:text-\[\#34D399\]){--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity))}:is(.dark .dark\:text-bodydark){--tw-text-opacity: 1;color:rgb(174 183 192 / var(--tw-text-opacity))}:is(.dark .dark\:text-captn-light-cream){--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}:is(.dark .dark\:text-gray-50){--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:opacity-80){opacity:.8}:is(.dark .dark\:drop-shadow-none){--tw-drop-shadow: drop-shadow(0 0 #0000);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:is(.dark .dark\:file\:border-form-strokedark)::file-selector-button{--tw-border-opacity: 1;border-color:rgb(61 77 96 / var(--tw-border-opacity))}:is(.dark .dark\:file\:border-strokedark)::file-selector-button{--tw-border-opacity: 1;border-color:rgb(46 58 71 / var(--tw-border-opacity))}:is(.dark .dark\:file\:bg-white\/30)::file-selector-button{background-color:#ffffff4d}:is(.dark .dark\:file\:text-white)::file-selector-button{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}:is(.dark .dark\:hover\:bg-boxdark:hover){--tw-bg-opacity: 1;background-color:rgb(36 48 63 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-boxdark-2:hover){--tw-bg-opacity: 1;background-color:rgb(26 34 44 / var(--tw-bg-opacity))}:is(.dark .dark\:hover\:bg-meta-4:hover){--tw-bg-opacity: 1;background-color:rgb(49 61 74 / var(--tw-bg-opacity))}:is(.dark .hover\:dark\:bg-boxdark-2):hover{--tw-bg-opacity: 1;background-color:rgb(26 34 44 / var(--tw-bg-opacity))}:is(.dark .dark\:focus\:border-primary:focus){--tw-border-opacity: 1;border-color:rgb(60 80 224 / var(--tw-border-opacity))}:is(.dark .dark\:disabled\:bg-black:disabled){--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}@media (min-width: 375px){.\32xsm\:gap-4{gap:1rem}.\32xsm\:gap-7{gap:1.75rem}}@media (min-width: 425px){.xsm\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 640px){.sm\:-left-3\/4{left:-75%}.sm\:left-5{left:1.25rem}.sm\:right-1\/4{right:25%}.sm\:right-5{right:1.25rem}.sm\:top-0{top:0}.sm\:top-5{top:1.25rem}.sm\:top-\[calc\(100\%-65rem\)\]{top:calc(100% - 65rem)}.sm\:col-span-1{grid-column:span 1 / span 1}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:mt-0{margin-top:0}.sm\:mt-14{margin-top:3.5rem}.sm\:mt-20{margin-top:5rem}.sm\:mt-5{margin-top:1.25rem}.sm\:mt-56{margin-top:14rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:w-1\/2{width:50%}.sm\:w-full{width:100%}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:translate-x-1\/2{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:translate-x-1\/4{--tw-translate-x: 25%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-4{gap:1rem}.sm\:gap-5{gap:1.25rem}.sm\:gap-x-10{-moz-column-gap:2.5rem;column-gap:2.5rem}.sm\:gap-y-14{row-gap:3.5rem}.sm\:divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.sm\:divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.sm\:rounded-lg{border-radius:.5rem}.sm\:rounded-xl{border-radius:.75rem}.sm\:border-b-0{border-bottom-width:0px}.sm\:p-0{padding:0}.sm\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:px-7{padding-left:1.75rem;padding-right:1.75rem}.sm\:px-7\.5{padding-left:1.875rem;padding-right:1.875rem}.sm\:py-16{padding-top:4rem;padding-bottom:4rem}.sm\:py-32{padding-top:8rem;padding-bottom:8rem}.sm\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.sm\:py-7{padding-top:1.75rem;padding-bottom:1.75rem}.sm\:py-7\.5{padding-top:1.875rem;padding-bottom:1.875rem}.sm\:pb-0{padding-bottom:0}.sm\:pb-24{padding-bottom:6rem}.sm\:pb-32{padding-bottom:8rem}.sm\:pt-12{padding-top:3rem}.sm\:text-5xl{font-size:3rem;line-height:1}.sm\:text-6xl{font-size:3.75rem;line-height:1}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:leading-8{line-height:2rem}.sm\:ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.sm\:ring-gray-900\/10{--tw-ring-color: rgb(17 24 39 / .1)}}@media (min-width: 768px){.md\:visible{visibility:visible}.md\:-mt-10{margin-top:-2.5rem}.md\:ml-4{margin-left:1rem}.md\:mt-6{margin-top:1.5rem}.md\:hidden{display:none}.md\:h-25{height:6.25rem}.md\:h-30{height:7.5rem}.md\:w-\[190\%\]{width:190%}.md\:w-\[290\%\]{width:290%}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:gap-6{gap:1.5rem}.md\:p-6{padding:1.5rem}.md\:p-9{padding:2.25rem}.md\:px-12{padding-left:3rem;padding-right:3rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-title-lg{font-size:28px;line-height:35px}.md\:opacity-100{opacity:1}}@media (min-width: 1024px){.lg\:static{position:static}.lg\:col-span-5{grid-column:span 5 / span 5}.lg\:col-span-7{grid-column:span 7 / span 7}.lg\:-m-4{margin:-1rem}.lg\:m-8{margin:2rem}.lg\:mx-0{margin-left:0;margin-right:0}.lg\:mb-18{margin-bottom:4.5rem}.lg\:mt-0{margin-top:0}.lg\:mt-10{margin-top:2.5rem}.lg\:mt-24{margin-top:6rem}.lg\:mt-8{margin-top:2rem}.lg\:mt-9{margin-top:2.25rem}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:w-1\/4{width:25%}.lg\:max-w-4xl{max-width:56rem}.lg\:max-w-7xl{max-width:80rem}.lg\:max-w-none{max-width:none}.lg\:flex-1{flex:1 1 0%}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:justify-end{justify-content:flex-end}.lg\:gap-8{gap:2rem}.lg\:gap-x-12{-moz-column-gap:3rem;column-gap:3rem}.lg\:gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.lg\:gap-y-16{row-gap:4rem}.lg\:rounded-2xl{border-radius:1rem}.lg\:p-4{padding:1rem}.lg\:px-20{padding-left:5rem;padding-right:5rem}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-3{padding-top:.75rem;padding-bottom:.75rem}.lg\:py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.lg\:py-32{padding-top:8rem;padding-bottom:8rem}.lg\:py-5{padding-top:1.25rem;padding-bottom:1.25rem}.lg\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.lg\:py-6\.5{padding-top:1.625rem;padding-bottom:1.625rem}.lg\:pl-5{padding-left:1.25rem}.lg\:text-captn-light-cream{--tw-text-opacity: 1;color:rgb(234 228 217 / var(--tw-text-opacity))}.lg\:ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.lg\:ring-yellow-500\/50{--tw-ring-color: rgb(234 179 8 / .5)}}@media (min-width: 1280px){.xl\:col-span-2{grid-column:span 2 / span 2}.xl\:col-span-3{grid-column:span 3 / span 3}.xl\:col-span-5{grid-column:span 5 / span 5}.xl\:col-span-8{grid-column:span 8 / span 8}.xl\:h-31{height:7.75rem}.xl\:w-1\/2{width:50%}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:flex-row{flex-direction:row}.xl\:gap-0{gap:0px}.xl\:gap-20{gap:5rem}.xl\:gap-7{gap:1.75rem}.xl\:gap-7\.5{gap:1.875rem}.xl\:border-b-0{border-bottom-width:0px}.xl\:border-r{border-right-width:1px}.xl\:p-10{padding:2.5rem}.xl\:p-5{padding:1.25rem}.xl\:p-9{padding:2.25rem}.xl\:px-10{padding-left:2.5rem;padding-right:2.5rem}.xl\:pb-0{padding-bottom:0}.xl\:pb-1{padding-bottom:.25rem}}@media (min-width: 1536px){.\32xl\:mt-7{margin-top:1.75rem}.\32xl\:mt-7\.5{margin-top:1.875rem}.\32xl\:gap-7{gap:1.75rem}.\32xl\:gap-7\.5{gap:1.875rem}.\32xl\:p-10{padding:2.5rem}} diff --git a/index.html b/index.html index 0c5d70a..e210cf1 100644 --- a/index.html +++ b/index.html @@ -28,8 +28,8 @@ Capt’n.ai - - + +