From 12bcfc015cd6e76d41fe9a6965c5018f046e141a Mon Sep 17 00:00:00 2001 From: "github-merge-queue[bot]" Date: Sun, 12 May 2024 07:07:22 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20airtai/c?= =?UTF-8?q?aptn-web-ui@8efdbbca8330c864d8bdfd2bdf0f3f4e2d8fe458=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-F2exTMyo.js => index-CSHNBex3.js} | 46 +++++++++---------- index.html | 14 ++++-- 2 files changed, 32 insertions(+), 28 deletions(-) rename assets/{index-F2exTMyo.js => index-CSHNBex3.js} (84%) diff --git a/assets/index-F2exTMyo.js b/assets/index-CSHNBex3.js similarity index 84% rename from assets/index-F2exTMyo.js rename to assets/index-CSHNBex3.js index 12b15ca..16a5588 100644 --- a/assets/index-F2exTMyo.js +++ b/assets/index-CSHNBex3.js @@ -1,4 +1,4 @@ -function x5(e,t){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const p of c.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&s(p)}).observe(document,{childList:!0,subtree:!0});function r(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(o){if(o.ep)return;o.ep=!0;const c=r(o);fetch(o.href,c)}})();function Ff(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var N0={exports:{}},Jc={},E0={exports:{}},Ye={};/** +function m5(e,t){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const p of c.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&s(p)}).observe(document,{childList:!0,subtree:!0});function r(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(o){if(o.ep)return;o.ep=!0;const c=r(o);fetch(o.href,c)}})();function Ff(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var N0={exports:{}},Jc={},E0={exports:{}},Ye={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function x5(e,t){for(var r=0;r>>1,je=de[Ae];if(0>>1;Aeo(He,oe))Beo(Me,He)?(de[Ae]=Me,de[Be]=oe,Ae=Be):(de[Ae]=He,de[Ue]=oe,Ae=Ue);else if(Beo(Me,oe))de[Ae]=Me,de[Be]=oe,Ae=Be;else break e}}return ce}function o(de,ce){var oe=de.sortIndex-ce.sortIndex;return oe!==0?oe:de.id-ce.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var p=Date,v=p.now();e.unstable_now=function(){return p.now()-v}}var C=[],A=[],L=1,P=null,z=3,M=!1,H=!1,B=!1,q=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(de){for(var ce=r(A);ce!==null;){if(ce.callback===null)s(A);else if(ce.startTime<=de)s(A),ce.sortIndex=ce.expirationTime,t(C,ce);else break;ce=r(A)}}function K(de){if(B=!1,_(de),!H)if(r(C)!==null)H=!0,qe(ee);else{var ce=r(A);ce!==null&&it(K,ce.startTime-de)}}function ee(de,ce){H=!1,B&&(B=!1,W(J),J=-1),M=!0;var oe=z;try{for(_(ce),P=r(C);P!==null&&(!(P.expirationTime>ce)||de&&!Ne());){var Ae=P.callback;if(typeof Ae=="function"){P.callback=null,z=P.priorityLevel;var je=Ae(P.expirationTime<=ce);ce=e.unstable_now(),typeof je=="function"?P.callback=je:P===r(C)&&s(C),_(ce)}else s(C);P=r(C)}if(P!==null)var ze=!0;else{var Ue=r(A);Ue!==null&&it(K,Ue.startTime-ce),ze=!1}return ze}finally{P=null,z=oe,M=!1}}var X=!1,Q=null,J=-1,fe=5,le=-1;function Ne(){return!(e.unstable_now()-lede||125Ae?(de.sortIndex=oe,t(A,de),r(C)===null&&de===r(A)&&(B?(W(J),J=-1):B=!0,it(K,oe-Ae))):(de.sortIndex=je,t(C,de),H||M||(H=!0,qe(ee))),de},e.unstable_shouldYield=Ne,e.unstable_wrapCallback=function(de){var ce=z;return function(){var oe=z;z=ce;try{return de.apply(this,arguments)}finally{z=oe}}}})(D0);F0.exports=D0;var D5=F0.exports;/** + */(function(e){function t(de,ce){var oe=de.length;de.push(ce);e:for(;0>>1,je=de[Ae];if(0>>1;Aeo(He,oe))Beo(Me,He)?(de[Ae]=Me,de[Be]=oe,Ae=Be):(de[Ae]=He,de[Ue]=oe,Ae=Ue);else if(Beo(Me,oe))de[Ae]=Me,de[Be]=oe,Ae=Be;else break e}}return ce}function o(de,ce){var oe=de.sortIndex-ce.sortIndex;return oe!==0?oe:de.id-ce.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var p=Date,v=p.now();e.unstable_now=function(){return p.now()-v}}var C=[],A=[],L=1,P=null,z=3,M=!1,H=!1,B=!1,q=typeof setTimeout=="function"?setTimeout:null,W=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(de){for(var ce=r(A);ce!==null;){if(ce.callback===null)s(A);else if(ce.startTime<=de)s(A),ce.sortIndex=ce.expirationTime,t(C,ce);else break;ce=r(A)}}function K(de){if(B=!1,_(de),!H)if(r(C)!==null)H=!0,qe(ee);else{var ce=r(A);ce!==null&&it(K,ce.startTime-de)}}function ee(de,ce){H=!1,B&&(B=!1,W(J),J=-1),M=!0;var oe=z;try{for(_(ce),P=r(C);P!==null&&(!(P.expirationTime>ce)||de&&!Ne());){var Ae=P.callback;if(typeof Ae=="function"){P.callback=null,z=P.priorityLevel;var je=Ae(P.expirationTime<=ce);ce=e.unstable_now(),typeof je=="function"?P.callback=je:P===r(C)&&s(C),_(ce)}else s(C);P=r(C)}if(P!==null)var ze=!0;else{var Ue=r(A);Ue!==null&&it(K,Ue.startTime-ce),ze=!1}return ze}finally{P=null,z=oe,M=!1}}var X=!1,Q=null,J=-1,fe=5,le=-1;function Ne(){return!(e.unstable_now()-lede||125Ae?(de.sortIndex=oe,t(A,de),r(C)===null&&de===r(A)&&(B?(W(J),J=-1):B=!0,it(K,oe-Ae))):(de.sortIndex=je,t(C,de),H||M||(H=!0,qe(ee))),de},e.unstable_shouldYield=Ne,e.unstable_wrapCallback=function(de){var ce=z;return function(){var oe=z;z=ce;try{return de.apply(this,arguments)}finally{z=oe}}}})(H0);D0.exports=H0;var F5=D0.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function x5(e,t){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ju=Object.prototype.hasOwnProperty,H5=/^[: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]*$/,D1={},H1={};function B5(e){return Ju.call(H1,e)?!0:Ju.call(D1,e)?!1:H5.test(e)?H1[e]=!0:(D1[e]=!0,!1)}function V5(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 W5(e,t,r,s){if(t===null||typeof t>"u"||V5(e,t,r,s))return!0;if(s)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function nr(e,t,r,s,o,c,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=p}var Ht={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ht[e]=new nr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ht[t]=new nr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ht[e]=new nr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ht[e]=new nr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ht[e]=new nr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ht[e]=new nr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ht[e]=new nr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ht[e]=new nr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ht[e]=new nr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wf=/[\-:]([a-z])/g;function $f(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(Wf,$f);Ht[t]=new nr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wf,$f);Ht[t]=new nr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wf,$f);Ht[t]=new nr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ht[e]=new nr(e,1,!1,e.toLowerCase(),null,!1,!1)});Ht.xlinkHref=new nr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ht[e]=new nr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xf(e,t,r,s){var o=Ht.hasOwnProperty(t)?Ht[t]:null;(o!==null?o.type!==0:s||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ju=Object.prototype.hasOwnProperty,H5=/^[: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]*$/,D1={},H1={};function B5(e){return Ju.call(H1,e)?!0:Ju.call(D1,e)?!1:H5.test(e)?H1[e]=!0:(D1[e]=!0,!1)}function V5(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 W5(e,t,r,s){if(t===null||typeof t>"u"||V5(e,t,r,s))return!0;if(s)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function nr(e,t,r,s,o,c,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=p}var Ht={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ht[e]=new nr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ht[t]=new nr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ht[e]=new nr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ht[e]=new nr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ht[e]=new nr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ht[e]=new nr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ht[e]=new nr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ht[e]=new nr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ht[e]=new nr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wf=/[\-:]([a-z])/g;function $f(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(Wf,$f);Ht[t]=new nr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wf,$f);Ht[t]=new nr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wf,$f);Ht[t]=new nr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ht[e]=new nr(e,1,!1,e.toLowerCase(),null,!1,!1)});Ht.xlinkHref=new nr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ht[e]=new nr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xf(e,t,r,s){var o=Ht.hasOwnProperty(t)?Ht[t]:null;(o!==null?o.type!==0:s||!(2v||o[p]!==c[v]){var C=` `+o[p].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),C}while(1<=p&&0<=v);break}}}finally{Kd=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ra(e):""}function $5(e){switch(e.tag){case 5:return Ra(e.type);case 16:return Ra("Lazy");case 13:return Ra("Suspense");case 19:return Ra("SuspenseList");case 0:case 2:case 15:return e=Jd(e.type,!1),e;case 11:return e=Jd(e.type.render,!1),e;case 1:return e=Jd(e.type,!0),e;default:return""}}function ih(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ws:return"Fragment";case bs:return"Portal";case eh:return"Profiler";case Yf:return"StrictMode";case th:return"Suspense";case rh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case W0:return(e.displayName||"Context")+".Consumer";case V0:return(e._context.displayName||"Context")+".Provider";case Uf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gf:return t=e.displayName||null,t!==null?t:ih(e.type)||"Memo";case Yi:t=e._payload,e=e._init;try{return ih(e(t))}catch{}}return null}function X5(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ih(t);case 8:return t===Yf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function mn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function X0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Y5(e){var t=X0(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 ol(e){e._valueTracker||(e._valueTracker=Y5(e))}function Y0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),s="";return e&&(s=X0(e)?e.checked?"true":"false":e.value),e=s,e!==r?(t.setValue(e),!0):!1}function ic(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function nh(e,t){var r=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function V1(e,t){var r=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;r=mn(t.value!=null?t.value:r),e._wrapperState={initialChecked:s,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function U0(e,t){t=t.checked,t!=null&&Xf(e,"checked",t,!1)}function sh(e,t){U0(e,t);var r=mn(t.value),s=t.type;if(r!=null)s==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ah(e,t.type,r):t.hasOwnProperty("defaultValue")&&ah(e,t.type,mn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function W1(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ah(e,t,r){(t!=="number"||ic(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var _a=Array.isArray;function Os(e,t,r,s){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=ll.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function to(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ba={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},U5=["Webkit","ms","Moz","O"];Object.keys(Ba).forEach(function(e){U5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ba[t]=Ba[e]})});function Q0(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ba.hasOwnProperty(e)&&Ba[e]?(""+t).trim():t+"px"}function K0(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var s=r.indexOf("--")===0,o=Q0(r,t[r],s);r==="float"&&(r="cssFloat"),s?e.setProperty(r,o):e[r]=o}}var G5=mt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ch(e,t){if(t){if(G5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ue(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ue(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ue(62))}}function dh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var uh=null;function Zf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hh=null,Is=null,zs=null;function Y1(e){if(e=Fo(e)){if(typeof hh!="function")throw Error(ue(280));var t=e.stateNode;t&&(t=nd(t),hh(e.stateNode,e.type,t))}}function J0(e){Is?zs?zs.push(e):zs=[e]:Is=e}function ex(){if(Is){var e=Is,t=zs;if(zs=Is=null,Y1(e),t)for(e=0;e>>=0,e===0?32:31-(s3(e)/a3|0)|0}var cl=64,dl=4194304;function Ma(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 oc(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=Ma(v):(c&=p,c!==0&&(s=Ma(c)))}else p=r&~o,p!==0?s=Ma(p):c!==0&&(s=Ma(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 Io(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yr(t),e[t]=r}function d3(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=Wa),tg=" ",rg=!1;function bx(e,t){switch(e){case"keyup":return F3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wx(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ks=!1;function H3(e,t){switch(e){case"compositionend":return wx(t);case"keypress":return t.which!==32?null:(rg=!0,tg);case"textInput":return e=t.data,e===tg&&rg?null:e;default:return null}}function B3(e,t){if(ks)return e==="compositionend"||!ip&&bx(e,t)?(e=vx(),Ml=ep=en=null,ks=!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=ag(r)}}function Ax(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ax(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jx(){for(var e=window,t=ic();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ic(e.document)}return t}function np(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function q3(e){var t=jx(),r=e.focusedElem,s=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Ax(r.ownerDocument.documentElement,r)){if(s!==null&&np(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=og(r,c);var p=og(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,Cs=null,vh=null,Xa=null,yh=!1;function lg(e,t,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;yh||Cs==null||Cs!==ic(s)||(s=Cs,"selectionStart"in s&&np(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}),Xa&&oo(Xa,s)||(Xa=s,s=dc(vh,"onSelect"),0js||(e.current=Ah[js],Ah[js]=null,js--)}function lt(e,t){js++,Ah[js]=e.current,e.current=t}var xn={},Ut=An(xn),cr=An(!1),Qn=xn;function Ws(e,t){var r=e.type.contextTypes;if(!r)return xn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var o={},c;for(c in r)o[c]=t[c];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function dr(e){return e=e.childContextTypes,e!=null}function hc(){ut(cr),ut(Ut)}function gg(e,t,r){if(Ut.current!==xn)throw Error(ue(168));lt(Ut,t),lt(cr,r)}function Ox(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,X5(e)||"Unknown",o));return mt({},r,s)}function fc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,Qn=Ut.current,lt(Ut,e),lt(cr,cr.current),!0}function mg(e,t,r){var s=e.stateNode;if(!s)throw Error(ue(169));r?(e=Ox(e,t,Qn),s.__reactInternalMemoizedMergedChildContext=e,ut(cr),ut(Ut),lt(Ut,e)):ut(cr),lt(cr,r)}var ki=null,sd=!1,fu=!1;function Ix(e){ki===null?ki=[e]:ki.push(e)}function l4(e){sd=!0,Ix(e)}function jn(){if(!fu&&ki!==null){fu=!0;var e=0,t=nt;try{var r=ki;for(nt=1;e>=p,o-=p,Ai=1<<32-Yr(t)+o|r<J?(fe=Q,Q=null):fe=Q.sibling;var le=z(W,Q,_[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===_.length)return r(W,Q),ht&&Rn(W,J),ee;if(Q===null){for(;J<_.length;J++)Q=P(W,_[J],K),Q!==null&&(V=c(Q,V,J),X===null?ee=Q:X.sibling=Q,X=Q);return ht&&Rn(W,J),ee}for(Q=s(W,Q);J<_.length;J++)fe=M(Q,W,J,_[J],K),fe!==null&&(e&&fe.alternate!==null&&Q.delete(fe.key===null?J:fe.key),V=c(fe,V,J),X===null?ee=fe:X.sibling=fe,X=fe);return e&&Q.forEach(function(Ne){return t(W,Ne)}),ht&&Rn(W,J),ee}function B(W,V,_,K){var ee=ga(_);if(typeof ee!="function")throw Error(ue(150));if(_=ee.call(_),_==null)throw Error(ue(151));for(var X=ee=null,Q=V,J=V=0,fe=null,le=_.next();Q!==null&&!le.done;J++,le=_.next()){Q.index>J?(fe=Q,Q=null):fe=Q.sibling;var Ne=z(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&&Rn(W,J),ee;if(Q===null){for(;!le.done;J++,le=_.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&&Rn(W,J),ee}for(Q=s(W,Q);!le.done;J++,le=_.next())le=M(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&&Rn(W,J),ee}function q(W,V,_,K){if(typeof _=="object"&&_!==null&&_.type===ws&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case al:e:{for(var ee=_.key,X=V;X!==null;){if(X.key===ee){if(ee=_.type,ee===ws){if(X.tag===7){r(W,X.sibling),V=o(X,_.props.children),V.return=W,W=V;break e}}else if(X.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Yi&&Cg(ee)===X.type){r(W,X.sibling),V=o(X,_.props),V.ref=ba(W,X,_),V.return=W,W=V;break e}r(W,X);break}else t(W,X);X=X.sibling}_.type===ws?(V=$n(_.props.children,W.mode,K,_.key),V.return=W,W=V):(K=Vl(_.type,_.key,_.props,null,W.mode,K),K.ref=ba(W,V,_),K.return=W,W=K)}return p(W);case bs:e:{for(X=_.key;V!==null;){if(V.key===X)if(V.tag===4&&V.stateNode.containerInfo===_.containerInfo&&V.stateNode.implementation===_.implementation){r(W,V.sibling),V=o(V,_.children||[]),V.return=W,W=V;break e}else{r(W,V);break}else t(W,V);V=V.sibling}V=wu(_,W.mode,K),V.return=W,W=V}return p(W);case Yi:return X=_._init,q(W,V,X(_._payload),K)}if(_a(_))return H(W,V,_,K);if(ga(_))return B(W,V,_,K);xl(W,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,V!==null&&V.tag===6?(r(W,V.sibling),V=o(V,_),V.return=W,W=V):(r(W,V),V=bu(_,W.mode,K),V.return=W,W=V),p(W)):r(W,V)}return q}var Xs=$x(!0),Xx=$x(!1),Do={},ai=An(Do),ho=An(Do),fo=An(Do);function Hn(e){if(e===Do)throw Error(ue(174));return e}function fp(e,t){switch(lt(fo,t),lt(ho,e),lt(ai,Do),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:lh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=lh(t,e)}ut(ai),lt(ai,t)}function Ys(){ut(ai),ut(ho),ut(fo)}function Yx(e){Hn(fo.current);var t=Hn(ai.current),r=lh(t,e.type);t!==r&&(lt(ho,e),lt(ai,r))}function pp(e){ho.current===e&&(ut(ai),ut(ho))}var pt=An(0);function yc(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var pu=[];function gp(){for(var e=0;er?r:4,e(!0);var s=gu.transition;gu.transition={};try{e(!1),t()}finally{nt=r,gu.transition=s}}function lv(){return Rr().memoizedState}function h4(e,t,r){var s=hn(e);if(r={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null},cv(e))dv(t,r);else if(r=Hx(e,t,r,s),r!==null){var o=tr();Ur(r,e,s,o),uv(r,t,s)}}function f4(e,t,r){var s=hn(e),o={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null};if(cv(e))dv(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,up(t)):(o.next=C.next,C.next=o),t.interleaved=o;return}}catch{}finally{}r=Hx(e,t,o,s),r!==null&&(o=tr(),Ur(r,e,s,o),uv(r,t,s))}}function cv(e){var t=e.alternate;return e===gt||t!==null&&t===gt}function dv(e,t){Ya=bc=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function uv(e,t,r){if(r&4194240){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,Qf(e,r)}}var wc={readContext:Tr,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},p4={readContext:Tr,useCallback:function(e,t){return ti().memoizedState=[e,t===void 0?null:t],e},useContext:Tr,useEffect:Ag,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Fl(4194308,4,iv.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fl(4,2,e,t)},useMemo:function(e,t){var r=ti();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var s=ti();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=h4.bind(null,gt,e),[s.memoizedState,e]},useRef:function(e){var t=ti();return e={current:e},t.memoizedState=e},useState:Sg,useDebugValue:bp,useDeferredValue:function(e){return ti().memoizedState=e},useTransition:function(){var e=Sg(!1),t=e[0];return e=u4.bind(null,e[1]),ti().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var s=gt,o=ti();if(ht){if(r===void 0)throw Error(ue(407));r=r()}else{if(r=t(),Mt===null)throw Error(ue(349));Jn&30||Zx(s,t,r)}o.memoizedState=r;var c={value:r,getSnapshot:t};return o.queue=c,Ag(Qx.bind(null,s,c,e),[e]),s.flags|=2048,mo(9,qx.bind(null,s,c,r,t),void 0,null),r},useId:function(){var e=ti(),t=Mt.identifierPrefix;if(ht){var r=ji,s=Ai;r=(s&~(1<<32-Yr(s)-1)).toString(32)+r,t=":"+t+"R"+r,r=po++,0js||(e.current=Ah[js],Ah[js]=null,js--)}function lt(e,t){js++,Ah[js]=e.current,e.current=t}var xn={},Ut=An(xn),cr=An(!1),Qn=xn;function Ws(e,t){var r=e.type.contextTypes;if(!r)return xn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var o={},c;for(c in r)o[c]=t[c];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function dr(e){return e=e.childContextTypes,e!=null}function hc(){ut(cr),ut(Ut)}function gg(e,t,r){if(Ut.current!==xn)throw Error(ue(168));lt(Ut,t),lt(cr,r)}function Ox(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,X5(e)||"Unknown",o));return mt({},r,s)}function fc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xn,Qn=Ut.current,lt(Ut,e),lt(cr,cr.current),!0}function mg(e,t,r){var s=e.stateNode;if(!s)throw Error(ue(169));r?(e=Ox(e,t,Qn),s.__reactInternalMemoizedMergedChildContext=e,ut(cr),ut(Ut),lt(Ut,e)):ut(cr),lt(cr,r)}var ki=null,sd=!1,fu=!1;function Ix(e){ki===null?ki=[e]:ki.push(e)}function l4(e){sd=!0,Ix(e)}function jn(){if(!fu&&ki!==null){fu=!0;var e=0,t=nt;try{var r=ki;for(nt=1;e>=p,o-=p,Ai=1<<32-Yr(t)+o|r<J?(fe=Q,Q=null):fe=Q.sibling;var le=z(W,Q,_[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===_.length)return r(W,Q),ht&&Rn(W,J),ee;if(Q===null){for(;J<_.length;J++)Q=P(W,_[J],K),Q!==null&&(V=c(Q,V,J),X===null?ee=Q:X.sibling=Q,X=Q);return ht&&Rn(W,J),ee}for(Q=s(W,Q);J<_.length;J++)fe=M(Q,W,J,_[J],K),fe!==null&&(e&&fe.alternate!==null&&Q.delete(fe.key===null?J:fe.key),V=c(fe,V,J),X===null?ee=fe:X.sibling=fe,X=fe);return e&&Q.forEach(function(Ne){return t(W,Ne)}),ht&&Rn(W,J),ee}function B(W,V,_,K){var ee=ga(_);if(typeof ee!="function")throw Error(ue(150));if(_=ee.call(_),_==null)throw Error(ue(151));for(var X=ee=null,Q=V,J=V=0,fe=null,le=_.next();Q!==null&&!le.done;J++,le=_.next()){Q.index>J?(fe=Q,Q=null):fe=Q.sibling;var Ne=z(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&&Rn(W,J),ee;if(Q===null){for(;!le.done;J++,le=_.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&&Rn(W,J),ee}for(Q=s(W,Q);!le.done;J++,le=_.next())le=M(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&&Rn(W,J),ee}function q(W,V,_,K){if(typeof _=="object"&&_!==null&&_.type===ws&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case al:e:{for(var ee=_.key,X=V;X!==null;){if(X.key===ee){if(ee=_.type,ee===ws){if(X.tag===7){r(W,X.sibling),V=o(X,_.props.children),V.return=W,W=V;break e}}else if(X.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===Yi&&yg(ee)===X.type){r(W,X.sibling),V=o(X,_.props),V.ref=ba(W,X,_),V.return=W,W=V;break e}r(W,X);break}else t(W,X);X=X.sibling}_.type===ws?(V=$n(_.props.children,W.mode,K,_.key),V.return=W,W=V):(K=Vl(_.type,_.key,_.props,null,W.mode,K),K.ref=ba(W,V,_),K.return=W,W=K)}return p(W);case bs:e:{for(X=_.key;V!==null;){if(V.key===X)if(V.tag===4&&V.stateNode.containerInfo===_.containerInfo&&V.stateNode.implementation===_.implementation){r(W,V.sibling),V=o(V,_.children||[]),V.return=W,W=V;break e}else{r(W,V);break}else t(W,V);V=V.sibling}V=wu(_,W.mode,K),V.return=W,W=V}return p(W);case Yi:return X=_._init,q(W,V,X(_._payload),K)}if(_a(_))return H(W,V,_,K);if(ga(_))return B(W,V,_,K);xl(W,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,V!==null&&V.tag===6?(r(W,V.sibling),V=o(V,_),V.return=W,W=V):(r(W,V),V=bu(_,W.mode,K),V.return=W,W=V),p(W)):r(W,V)}return q}var Xs=Hx(!0),Bx=Hx(!1),mc=An(null),xc=null,Ls=null,lp=null;function cp(){lp=Ls=xc=null}function dp(e){var t=mc.current;ut(mc),e._currentValue=t}function Eh(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 Ds(e,t){xc=e,lp=Ls=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(lr=!0),e.firstContext=null)}function Tr(e){var t=e._currentValue;if(lp!==e)if(e={context:e,memoizedValue:t,next:null},Ls===null){if(xc===null)throw Error(ue(308));Ls=e,xc.dependencies={lanes:0,firstContext:e}}else Ls=Ls.next=e;return t}var Dn=null;function up(e){Dn===null?Dn=[e]:Dn.push(e)}function Vx(e,t,r,s){var o=t.interleaved;return o===null?(r.next=r,up(t)):(r.next=o.next,o.next=r),t.interleaved=r,Ri(e,s)}function Ri(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 Ui=!1;function hp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Wx(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 Ni(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function dn(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,Ri(e,r)}return o=s.interleaved,o===null?(t.next=t,up(s)):(t.next=o.next,o.next=t),s.interleaved=t,Ri(e,r)}function Il(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,Qf(e,r)}}function bg(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 vc(e,t,r,s){var o=e.updateQueue;Ui=!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 L=e.alternate;L!==null&&(L=L.updateQueue,v=L.lastBaseUpdate,v!==p&&(v===null?L.firstBaseUpdate=A:v.next=A,L.lastBaseUpdate=C))}if(c!==null){var P=o.baseState;p=0,L=A=C=null,v=c;do{var z=v.lane,M=v.eventTime;if((s&z)===z){L!==null&&(L=L.next={eventTime:M,lane:0,tag:v.tag,payload:v.payload,callback:v.callback,next:null});e:{var H=e,B=v;switch(z=t,M=r,B.tag){case 1:if(H=B.payload,typeof H=="function"){P=H.call(M,P,z);break e}P=H;break e;case 3:H.flags=H.flags&-65537|128;case 0:if(H=B.payload,z=typeof H=="function"?H.call(M,P,z):H,z==null)break e;P=mt({},P,z);break e;case 2:Ui=!0}}v.callback!==null&&v.lane!==0&&(e.flags|=64,z=o.effects,z===null?o.effects=[v]:z.push(v))}else M={eventTime:M,lane:z,tag:v.tag,payload:v.payload,callback:v.callback,next:null},L===null?(A=L=M,C=P):L=L.next=M,p|=z;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;z=v,v=z.next,z.next=null,o.lastBaseUpdate=z,o.shared.pending=null}}while(!0);if(L===null&&(C=P),o.baseState=C,o.firstBaseUpdate=A,o.lastBaseUpdate=L,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);es|=p,e.lanes=p,e.memoizedState=P}}function wg(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var s=gu.transition;gu.transition={};try{e(!1),t()}finally{nt=r,gu.transition=s}}function av(){return Rr().memoizedState}function h4(e,t,r){var s=hn(e);if(r={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null},ov(e))lv(t,r);else if(r=Vx(e,t,r,s),r!==null){var o=tr();Ur(r,e,s,o),cv(r,t,s)}}function f4(e,t,r){var s=hn(e),o={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null};if(ov(e))lv(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,up(t)):(o.next=C.next,C.next=o),t.interleaved=o;return}}catch{}finally{}r=Vx(e,t,o,s),r!==null&&(o=tr(),Ur(r,e,s,o),cv(r,t,s))}}function ov(e){var t=e.alternate;return e===gt||t!==null&&t===gt}function lv(e,t){Ya=bc=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function cv(e,t,r){if(r&4194240){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,Qf(e,r)}}var wc={readContext:Tr,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},p4={readContext:Tr,useCallback:function(e,t){return ti().memoizedState=[e,t===void 0?null:t],e},useContext:Tr,useEffect:Cg,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Fl(4194308,4,tv.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fl(4,2,e,t)},useMemo:function(e,t){var r=ti();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var s=ti();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=h4.bind(null,gt,e),[s.memoizedState,e]},useRef:function(e){var t=ti();return e={current:e},t.memoizedState=e},useState:kg,useDebugValue:bp,useDeferredValue:function(e){return ti().memoizedState=e},useTransition:function(){var e=kg(!1),t=e[0];return e=u4.bind(null,e[1]),ti().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var s=gt,o=ti();if(ht){if(r===void 0)throw Error(ue(407));r=r()}else{if(r=t(),Mt===null)throw Error(ue(349));Jn&30||Ux(s,t,r)}o.memoizedState=r;var c={value:r,getSnapshot:t};return o.queue=c,Cg(Zx.bind(null,s,c,e),[e]),s.flags|=2048,mo(9,Gx.bind(null,s,c,r,t),void 0,null),r},useId:function(){var e=ti(),t=Mt.identifierPrefix;if(ht){var r=ji,s=Ai;r=(s&~(1<<32-Yr(s)-1)).toString(32)+r,t=":"+t+"R"+r,r=po++,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[ri]=t,e[uo]=s,bv(e,t,!1,!1),t.stateNode=e;e:{switch(p=dh(r,s),r){case"dialog":ct("cancel",e),ct("close",e),o=s;break;case"iframe":case"object":case"embed":ct("load",e),o=s;break;case"video":case"audio":for(o=0;oGs&&(t.flags|=128,s=!0,wa(c,!1),t.lanes=4194304)}else{if(!s)if(e=yc(p),e!==null){if(t.flags|=128,s=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),wa(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!ht)return $t(t),null}else 2*yt()-c.renderingStartTime>Gs&&r!==1073741824&&(t.flags|=128,s=!0,wa(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 jp(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?fr&1073741824&&($t(t),t.subtreeFlags&6&&(t.flags|=8192)):$t(t),null;case 24:return null;case 25:return null}throw Error(ue(156,t.tag))}function k4(e,t){switch(ap(t),t.tag){case 1:return dr(t.type)&&hc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ys(),ut(cr),ut(Ut),gp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return pp(t),null;case 13:if(ut(pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));$s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ut(pt),null;case 4:return Ys(),null;case 10:return dp(t.type._context),null;case 22:case 23:return jp(),null;case 24:return null;default:return null}}var yl=!1,Xt=!1,C4=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function Ps(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(s){xt(e,t,s)}else r.current=null}function zh(e,t,r){try{r()}catch(s){xt(e,t,s)}}var Mg=!1;function S4(e,t){if(bh=lc,e=jx(),np(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var o=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{r.nodeType,c.nodeType}catch{r=null;break e}var p=0,v=-1,C=-1,A=0,L=0,P=e,z=null;t:for(;;){for(var M;P!==r||o!==0&&P.nodeType!==3||(v=p+o),P!==c||s!==0&&P.nodeType!==3||(C=p+s),P.nodeType===3&&(p+=P.nodeValue.length),(M=P.firstChild)!==null;)z=P,P=M;for(;;){if(P===e)break t;if(z===r&&++A===o&&(v=p),z===c&&++L===s&&(C=p),(M=P.nextSibling)!==null)break;P=z,z=P.parentNode}P=M}r=v===-1||C===-1?null:{start:v,end:C}}else r=null}r=r||{start:0,end:0}}else r=null;for(wh={focusedElem:e,selectionRange:r},lc=!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,q=H.memoizedState,W=t.stateNode,V=W.getSnapshotBeforeUpdate(t.elementType===t.type?B:Fr(t.type,B),q);W.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(K){xt(t,t.return,K)}if(e=t.sibling,e!==null){e.return=t.return,Ce=e;break}Ce=t.return}return H=Mg,Mg=!1,H}function Ua(e,t,r){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var o=s=s.next;do{if((o.tag&e)===e){var c=o.destroy;o.destroy=void 0,c!==void 0&&zh(t,r,c)}o=o.next}while(o!==s)}}function ld(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var s=r.create;r.destroy=s()}r=r.next}while(r!==t)}}function Fh(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Cv(e){var t=e.alternate;t!==null&&(e.alternate=null,Cv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ri],delete t[uo],delete t[Sh],delete t[a4],delete t[o4])),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 Sv(e){return e.tag===5||e.tag===3||e.tag===4}function Og(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Dh(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=uc));else if(s!==4&&(e=e.child,e!==null))for(Dh(e,t,r),e=e.sibling;e!==null;)Dh(e,t,r),e=e.sibling}function Hh(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Hh(e,t,r),e=e.sibling;e!==null;)Hh(e,t,r),e=e.sibling}var zt=null,Dr=!1;function Vi(e,t,r){for(r=r.child;r!==null;)Av(e,t,r),r=r.sibling}function Av(e,t,r){if(si&&typeof si.onCommitFiberUnmount=="function")try{si.onCommitFiberUnmount(ed,r)}catch{}switch(r.tag){case 5:Xt||Ps(r,t);case 6:var s=zt,o=Dr;zt=null,Vi(e,t,r),zt=s,Dr=o,zt!==null&&(Dr?(e=zt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):zt.removeChild(r.stateNode));break;case 18:zt!==null&&(Dr?(e=zt,r=r.stateNode,e.nodeType===8?hu(e.parentNode,r):e.nodeType===1&&hu(e,r),so(e)):hu(zt,r.stateNode));break;case 4:s=zt,o=Dr,zt=r.stateNode.containerInfo,Dr=!0,Vi(e,t,r),zt=s,Dr=o;break;case 0:case 11:case 14:case 15:if(!Xt&&(s=r.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){o=s=s.next;do{var c=o,p=c.destroy;c=c.tag,p!==void 0&&(c&2||c&4)&&zh(r,t,p),o=o.next}while(o!==s)}Vi(e,t,r);break;case 1:if(!Xt&&(Ps(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)}Vi(e,t,r);break;case 21:Vi(e,t,r);break;case 22:r.mode&1?(Xt=(s=Xt)||r.memoizedState!==null,Vi(e,t,r),Xt=s):Vi(e,t,r);break;default:Vi(e,t,r)}}function Ig(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new C4),t.forEach(function(s){var o=_4.bind(null,e,s);r.has(s)||(r.add(s),s.then(o,o))})}}function Ir(e,t){var r=t.deletions;if(r!==null)for(var s=0;so&&(o=p),s&=~c}if(s=o,s=yt()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*j4(s/1960))-s,10e?16:e,tn===null)var s=!1;else{if(e=tn,tn=null,Sc=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()-Sp?Wn(e,0):Cp|=r),ur(e,t)}function _v(e,t){t===0&&(e.mode&1?(t=dl,dl<<=1,!(dl&130023424)&&(dl=4194304)):t=1);var r=tr();e=Ri(e,t),e!==null&&(Io(e,t,r),ur(e,r))}function R4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),_v(e,r)}function _4(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),_v(e,r)}var Mv;Mv=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||cr.current)lr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return lr=!1,b4(e,t,r);lr=!!(e.flags&131072)}else lr=!1,ht&&t.flags&1048576&&zx(t,gc,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Dl(e,t),e=t.pendingProps;var o=Ws(t,Ut.current);Ds(t,r),o=xp(null,t,s,e,o,r);var c=vp();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dr(s)?(c=!0,fc(t)):c=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,hp(t),o.updater=ad,t.stateNode=o,o._reactInternals=t,Ph(t,s,e,r),t=_h(null,t,s,!0,c,r)):(t.tag=0,ht&&c&&sp(t),Qt(null,t,o,r),t=t.child),t;case 16:s=t.elementType;e:{switch(Dl(e,t),e=t.pendingProps,o=s._init,s=o(s._payload),t.type=s,o=t.tag=O4(s),e=Fr(s,e),o){case 0:t=Rh(null,t,s,e,r);break e;case 1:t=Tg(null,t,s,e,r);break e;case 11:t=Lg(null,t,s,e,r);break e;case 14:t=Pg(null,t,s,Fr(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:Fr(s,o),Rh(e,t,s,o,r);case 1:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Fr(s,o),Tg(e,t,s,o,r);case 3:e:{if(xv(t),e===null)throw Error(ue(387));s=t.pendingProps,c=t.memoizedState,o=c.element,Bx(e,t),vc(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=Us(Error(ue(423)),t),t=Rg(e,t,s,r,o);break e}else if(s!==o){o=Us(Error(ue(424)),t),t=Rg(e,t,s,r,o);break e}else for(pr=cn(t.stateNode.containerInfo.firstChild),gr=t,ht=!0,Br=null,r=Xx(t,null,s,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if($s(),s===o){t=_i(e,t,r);break e}Qt(e,t,s,r)}t=t.child}return t;case 5:return Yx(t),e===null&&Nh(t),s=t.type,o=t.pendingProps,c=e!==null?e.memoizedProps:null,p=o.children,kh(s,o)?p=null:c!==null&&kh(s,c)&&(t.flags|=32),mv(e,t),Qt(e,t,p,r),t.child;case 6:return e===null&&Nh(t),null;case 13:return vv(e,t,r);case 4:return fp(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Xs(t,null,s,r):Qt(e,t,s,r),t.child;case 11:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Fr(s,o),Lg(e,t,s,o,r);case 7:return Qt(e,t,t.pendingProps,r),t.child;case 8:return Qt(e,t,t.pendingProps.children,r),t.child;case 12:return Qt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(s=t.type._context,o=t.pendingProps,c=t.memoizedProps,p=o.value,lt(mc,s._currentValue),s._currentValue=p,c!==null)if(qr(c.value,p)){if(c.children===o.children&&!cr.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=Ni(-1,r&-r),C.tag=2;var A=c.updateQueue;if(A!==null){A=A.shared;var L=A.pending;L===null?C.next=C:(C.next=L.next,L.next=C),A.pending=C}}c.lanes|=r,C=c.alternate,C!==null&&(C.lanes|=r),Eh(c.return,r,t),v.lanes|=r;break}C=C.next}}else if(c.tag===10)p=c.type===t.type?null:c.child;else if(c.tag===18){if(p=c.return,p===null)throw Error(ue(341));p.lanes|=r,v=p.alternate,v!==null&&(v.lanes|=r),Eh(p,r,t),p=c.sibling}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===t){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}Qt(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,s=t.pendingProps.children,Ds(t,r),o=Tr(o),s=s(o),t.flags|=1,Qt(e,t,s,r),t.child;case 14:return s=t.type,o=Fr(s,t.pendingProps),o=Fr(s.type,o),Pg(e,t,s,o,r);case 15:return pv(e,t,t.type,t.pendingProps,r);case 17:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Fr(s,o),Dl(e,t),t.tag=1,dr(s)?(e=!0,fc(t)):e=!1,Ds(t,r),Wx(t,s,o),Ph(t,s,o,r),_h(null,t,s,!0,e,r);case 19:return yv(e,t,r);case 22:return gv(e,t,r)}throw Error(ue(156,t.tag))};function Ov(e,t){return ox(e,t)}function M4(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 jr(e,t,r,s){return new M4(e,t,r,s)}function Ep(e){return e=e.prototype,!(!e||!e.isReactComponent)}function O4(e){if(typeof e=="function")return Ep(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uf)return 11;if(e===Gf)return 14}return 2}function fn(e,t){var r=e.alternate;return r===null?(r=jr(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 Vl(e,t,r,s,o,c){var p=2;if(s=e,typeof e=="function")Ep(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case ws:return $n(r.children,o,c,t);case Yf:p=8,o|=8;break;case eh:return e=jr(12,r,t,o|2),e.elementType=eh,e.lanes=c,e;case th:return e=jr(13,r,t,o),e.elementType=th,e.lanes=c,e;case rh:return e=jr(19,r,t,o),e.elementType=rh,e.lanes=c,e;case $0:return dd(r,o,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V0:p=10;break e;case W0:p=9;break e;case Uf:p=11;break e;case Gf:p=14;break e;case Yi:p=16,s=null;break e}throw Error(ue(130,e==null?e:typeof e,""))}return t=jr(p,r,t,o),t.elementType=e,t.type=s,t.lanes=c,t}function $n(e,t,r,s){return e=jr(7,e,s,t),e.lanes=r,e}function dd(e,t,r,s){return e=jr(22,e,s,t),e.elementType=$0,e.lanes=r,e.stateNode={isHidden:!1},e}function bu(e,t,r){return e=jr(6,e,null,t),e.lanes=r,e}function wu(e,t,r){return t=jr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function I4(e,t,r,s,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=tu(0),this.expirationTimes=tu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tu(0),this.identifierPrefix=s,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Lp(e,t,r,s,o,c,p,v,C){return e=new I4(e,t,r,v,C),t===1?(t=1,c===!0&&(t|=8)):t=0,c=jr(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:s,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},hp(c),e}function z4(e,t,r){var s=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dv)}catch(e){console.error(e)}}Dv(),z0.exports=xr;var Hv=z0.exports,$g=Hv;Ku.createRoot=$g.createRoot,Ku.hydrateRoot=$g.hydrateRoot;class Ho{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 vo=typeof window>"u"||"Deno"in window;function wr(){}function V4(e,t){return typeof e=="function"?e(t):e}function Xh(e){return typeof e=="number"&&e>=0&&e!==1/0}function Bv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ia(e,t,r){return gd(e)?typeof t=="function"?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Gi(e,t,r){return gd(e)?[{...t,queryKey:e},r]:[e||{},t]}function Xg(e,t){const{type:r="all",exact:s,fetchStatus:o,predicate:c,queryKey:p,stale:v}=e;if(gd(p)){if(s){if(t.queryHash!==_p(p,t.options))return!1}else if(!Nc(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 Yg(e,t){const{exact:r,fetching:s,predicate:o,mutationKey:c}=e;if(gd(c)){if(!t.options.mutationKey)return!1;if(r){if(rn(t.options.mutationKey)!==rn(c))return!1}else if(!Nc(t.options.mutationKey,c))return!1}return!(typeof s=="boolean"&&t.state.status==="loading"!==s||o&&!o(t))}function _p(e,t){return((t==null?void 0:t.queryKeyHashFn)||rn)(e)}function rn(e){return JSON.stringify(e,(t,r)=>Uh(r)?Object.keys(r).sort().reduce((s,o)=>(s[o]=r[o],s),{}):r)}function Nc(e,t){return Vv(e,t)}function Vv(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!Vv(e[r],t[r])):!1}function Wv(e,t){if(e===t)return e;const r=Ug(e)&&Ug(t);if(r||Uh(e)&&Uh(t)){const s=r?e.length:Object.keys(e).length,o=r?t:Object.keys(t),c=o.length,p=r?[]:{};let v=0;for(let C=0;C"u")return!0;const r=t.prototype;return!(!Gg(r)||!r.hasOwnProperty("isPrototypeOf"))}function Gg(e){return Object.prototype.toString.call(e)==="[object Object]"}function gd(e){return Array.isArray(e)}function $v(e){return new Promise(t=>{setTimeout(t,e)})}function Zg(e){$v(0).then(e)}function W4(){if(typeof AbortController=="function")return new AbortController}function Gh(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Wv(e,t):t}class $4 extends Ho{constructor(){super(),this.setup=t=>{if(!vo&&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 Ec=new $4,qg=["online","offline"];class X4 extends Ho{constructor(){super(),this.setup=t=>{if(!vo&&window.addEventListener){const r=()=>t();return qg.forEach(s=>{window.addEventListener(s,r,!1)}),()=>{qg.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 Lc=new X4;function Y4(e){return Math.min(1e3*2**e,3e4)}function md(e){return(e??"online")==="online"?Lc.isOnline():!0}class Xv{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Wl(e){return e instanceof Xv}function Yv(e){let t=!1,r=0,s=!1,o,c,p;const v=new Promise((q,W)=>{c=q,p=W}),C=q=>{s||(M(new Xv(q)),e.abort==null||e.abort())},A=()=>{t=!0},L=()=>{t=!1},P=()=>!Ec.isFocused()||e.networkMode!=="always"&&!Lc.isOnline(),z=q=>{s||(s=!0,e.onSuccess==null||e.onSuccess(q),o==null||o(),c(q))},M=q=>{s||(s=!0,e.onError==null||e.onError(q),o==null||o(),p(q))},H=()=>new Promise(q=>{o=W=>{const V=s||!P();return V&&q(W),V},e.onPause==null||e.onPause()}).then(()=>{o=void 0,s||e.onContinue==null||e.onContinue()}),B=()=>{if(s)return;let q;try{q=e.fn()}catch(W){q=Promise.reject(W)}Promise.resolve(q).then(z).catch(W=>{var V,_;if(s)return;const K=(V=e.retry)!=null?V:3,ee=(_=e.retryDelay)!=null?_:Y4,X=typeof ee=="function"?ee(r,W):ee,Q=K===!0||typeof K=="number"&&r{if(P())return H()}).then(()=>{t?M(W):B()})})};return md(e.networkMode)?B():H().then(B),{promise:v,cancel:C,continue:()=>(o==null?void 0:o())?v:Promise.resolve(),cancelRetry:A,continueRetry:L}}const Mp=console;function U4(){let e=[],t=0,r=L=>{L()},s=L=>{L()};const o=L=>{let P;t++;try{P=L()}finally{t--,t||v()}return P},c=L=>{t?e.push(L):Zg(()=>{r(L)})},p=L=>(...P)=>{c(()=>{L(...P)})},v=()=>{const L=e;e=[],L.length&&Zg(()=>{s(()=>{L.forEach(P=>{r(P)})})})};return{batch:o,batchCalls:p,schedule:c,setNotifyFunction:L=>{r=L},setBatchNotifyFunction:L=>{s=L}}}const Ct=U4();class Uv{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Xh(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(vo?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class G4 extends Uv{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Mp,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||Z4(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,r){const s=Gh(this.state.data,t,this.options);return this.dispatch({data:s,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),s}setState(t,r){this.dispatch({type:"setState",state:t,setStateOptions:r})}cancel(t){var r;const s=this.promise;return(r=this.retryer)==null||r.cancel(t),s?s.then(wr).catch(wr):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||!Bv(this.state.dataUpdatedAt,t)}onFocus(){var t;const r=this.observers.find(s=>s.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const r=this.observers.find(s=>s.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,r){var s,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var c;return(c=this.retryer)==null||c.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const M=this.observers.find(H=>H.options.queryFn);M&&this.setOptions(M.options)}const p=W4(),v={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},C=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>{if(p)return this.abortSignalConsumed=!0,p.signal}})};C(v);const A=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(v)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),L={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:A};if(C(L),(s=this.options.behavior)==null||s.onFetch(L),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=L.fetchOptions)==null?void 0:o.meta)){var P;this.dispatch({type:"fetch",meta:(P=L.fetchOptions)==null?void 0:P.meta})}const z=M=>{if(Wl(M)&&M.silent||this.dispatch({type:"error",error:M}),!Wl(M)){var H,B,q,W;(H=(B=this.cache.config).onError)==null||H.call(B,M,this),(q=(W=this.cache.config).onSettled)==null||q.call(W,this.state.data,M,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Yv({fn:L.fetchFn,abort:p==null?void 0:p.abort.bind(p),onSuccess:M=>{var H,B,q,W;if(typeof M>"u"){z(new Error(this.queryHash+" data is undefined"));return}this.setData(M),(H=(B=this.cache.config).onSuccess)==null||H.call(B,M,this),(q=(W=this.cache.config).onSettled)==null||q.call(W,M,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:z,onFail:(M,H)=>{this.dispatch({type:"failed",failureCount:M,error:H})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:L.options.retry,retryDelay:L.options.retryDelay,networkMode:L.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const r=s=>{var o,c;switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:md(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 Wl(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 Z4(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t<"u",s=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class q4 extends Ho{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:_p(c,r);let v=this.get(p);return v||(v=new G4({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]=Gi(t,r);return typeof s.exact>"u"&&(s.exact=!0),this.queries.find(o=>Xg(s,o))}findAll(t,r){const[s]=Gi(t,r);return Object.keys(s).length>0?this.queries.filter(o=>Xg(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 Q4 extends Uv{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Mp,this.observers=[],this.state=t.state||K4(),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=Yv({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,L;if(!r){var P,z,M,H;this.dispatch({type:"loading",variables:this.options.variables}),await((P=(z=this.mutationCache.config).onMutate)==null?void 0:P.call(z,this.state.variables,this));const J=await((M=(H=this.options).onMutate)==null?void 0:M.call(H,this.state.variables));J!==this.state.context&&this.dispatch({type:"loading",context:J,variables:this.state.variables})}const Q=await t();return await((s=(o=this.mutationCache.config).onSuccess)==null?void 0:s.call(o,Q,this.state.variables,this.state.context,this)),await((c=(p=this.options).onSuccess)==null?void 0:c.call(p,Q,this.state.variables,this.state.context)),await((v=(C=this.mutationCache.config).onSettled)==null?void 0:v.call(C,Q,null,this.state.variables,this.state.context,this)),await((A=(L=this.options).onSettled)==null?void 0:A.call(L,Q,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:Q}),Q}catch(Q){try{var B,q,W,V,_,K,ee,X;throw await((B=(q=this.mutationCache.config).onError)==null?void 0:B.call(q,Q,this.state.variables,this.state.context,this)),await((W=(V=this.options).onError)==null?void 0:W.call(V,Q,this.state.variables,this.state.context)),await((_=(K=this.mutationCache.config).onSettled)==null?void 0:_.call(K,void 0,Q,this.state.variables,this.state.context,this)),await((ee=(X=this.options).onSettled)==null?void 0:ee.call(X,void 0,Q,this.state.variables,this.state.context)),Q}finally{this.dispatch({type:"error",error:Q})}}}dispatch(t){const r=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"loading":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!md(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 K4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class J4 extends Ho{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,s){const o=new Q4({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=>Yg(t,r))}findAll(t){return this.mutations.filter(r=>Yg(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(wr)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function ew(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,s,o,c,p;const v=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,C=(s=e.fetchOptions)==null||(o=s.meta)==null?void 0:o.fetchMore,A=C==null?void 0:C.pageParam,L=(C==null?void 0:C.direction)==="forward",P=(C==null?void 0:C.direction)==="backward",z=((c=e.state.data)==null?void 0:c.pages)||[],M=((p=e.state.data)==null?void 0:p.pageParams)||[];let H=M,B=!1;const q=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]),_=(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};q(le);const Ne=W(le);return Promise.resolve(Ne).then(Le=>V(X,J,Le,fe))};let K;if(!z.length)K=_([]);else if(L){const X=typeof A<"u",Q=X?A:Qg(e.options,z);K=_(z,X,Q)}else if(P){const X=typeof A<"u",Q=X?A:tw(e.options,z);K=_(z,X,Q,!0)}else{H=[];const X=typeof e.options.getNextPageParam>"u";K=(v&&z[0]?v(z[0],0,z):!0)?_([],X,M[0]):Promise.resolve(V([],M[0],z[0]));for(let J=1;J{if(v&&z[J]?v(z[J],J,z):!0){const Ne=X?M[J]:Qg(e.options,fe);return _(fe,X,Ne)}return Promise.resolve(V(fe,M[J],z[J]))})}return K.then(X=>({pages:X,pageParams:H}))}}}}function Qg(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function tw(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class rw{constructor(t={}){this.queryCache=t.queryCache||new q4,this.mutationCache=t.mutationCache||new J4,this.logger=t.logger||Mp,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Ec.subscribe(()=>{Ec.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Lc.subscribe(()=>{Lc.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]=Gi(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=Ia(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=V4(r,c);if(typeof p>"u")return;const v=Ia(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]=Gi(t,r),o=this.queryCache;Ct.batch(()=>{o.findAll(s).forEach(c=>{o.remove(c)})})}resetQueries(t,r,s){const[o,c]=Gi(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={}]=Gi(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(wr).catch(wr)}invalidateQueries(t,r,s){const[o,c]=Gi(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]=Gi(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(wr);return c!=null&&c.throwOnError||(v=v.catch(wr)),v}fetchQuery(t,r,s){const o=Ia(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(wr).catch(wr)}fetchInfiniteQuery(t,r,s){const o=Ia(t,r,s);return o.behavior=ew(),this.fetchQuery(o)}prefetchInfiniteQuery(t,r,s){return this.fetchInfiniteQuery(t,r,s).then(wr).catch(wr)}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=>rn(t)===rn(o.queryKey));s?s.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(s=>Nc(t,s.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(t,r){const s=this.mutationDefaults.find(o=>rn(t)===rn(o.mutationKey));s?s.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(s=>Nc(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=_p(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 iw extends Ho{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),Kg(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zh(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zh(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,r){const s=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),Yh(s,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();const c=this.hasListeners();c&&Jg(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 sw(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(wr)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),vo||this.currentResult.isStale||!Xh(this.options.staleTime))return;const r=Bv(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,!(vo||this.options.enabled===!1||!Xh(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ec.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,r){const s=this.currentQuery,o=this.options,c=this.currentResult,p=this.currentResultState,v=this.currentResultOptions,C=t!==s,A=C?t.state:this.currentQueryInitialState,L=C?this.currentResult:this.previousQueryResult,{state:P}=t;let{dataUpdatedAt:z,error:M,errorUpdatedAt:H,fetchStatus:B,status:q}=P,W=!1,V=!1,_;if(r._optimisticResults){const J=this.hasListeners(),fe=!J&&Kg(t,r),le=J&&Jg(t,s,r,o);(fe||le)&&(B=md(t.options.networkMode)?"fetching":"paused",z||(q="loading")),r._optimisticResults==="isRestoring"&&(B="idle")}if(r.keepPreviousData&&!P.dataUpdatedAt&&L!=null&&L.isSuccess&&q!=="error")_=L.data,z=L.dataUpdatedAt,q=L.status,W=!0;else if(r.select&&typeof P.data<"u")if(c&&P.data===(p==null?void 0:p.data)&&r.select===this.selectFn)_=this.selectResult;else try{this.selectFn=r.select,_=r.select(P.data),_=Gh(c==null?void 0:c.data,_,r),this.selectResult=_,this.selectError=null}catch(J){this.selectError=J}else _=P.data;if(typeof r.placeholderData<"u"&&typeof _>"u"&&q==="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"&&(q="success",_=Gh(c==null?void 0:c.data,J,r),V=!0)}this.selectError&&(M=this.selectError,_=this.selectResult,H=Date.now(),q="error");const K=B==="fetching",ee=q==="loading",X=q==="error";return{status:q,fetchStatus:B,isLoading:ee,isSuccess:q==="success",isError:X,isInitialLoading:ee&&K,data:_,dataUpdatedAt:z,error:M,errorUpdatedAt:H,failureCount:P.fetchFailureCount,failureReason:P.fetchFailureReason,errorUpdateCount:P.errorUpdateCount,isFetched:P.dataUpdateCount>0||P.errorUpdateCount>0,isFetchedAfterMount:P.dataUpdateCount>A.dataUpdateCount||P.errorUpdateCount>A.errorUpdateCount,isFetching:K,isRefetching:K&&!ee,isLoadingError:X&&P.dataUpdatedAt===0,isPaused:B==="paused",isPlaceholderData:V,isPreviousData:W,isRefetchError:X&&P.dataUpdatedAt!==0,isStale:Op(t,r),refetch:this.refetch,remove:this.remove}}updateResult(t){const r=this.currentResult,s=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Yh(s,r))return;this.currentResult=s;const o={cache:!0},c=()=>{if(!r)return!0;const{notifyOnChangeProps:p}=this.options,v=typeof p=="function"?p():p;if(v==="all"||!v&&!this.trackedProps.size)return!0;const C=new Set(v??this.trackedProps);return this.options.useErrorBoundary&&C.add("error"),Object.keys(this.currentResult).some(A=>{const L=A;return this.currentResult[L]!==r[L]&&C.has(L)})};(t==null?void 0:t.listeners)!==!1&&c()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const r={};t.type==="success"?r.onSuccess=!t.manual:t.type==="error"&&!Wl(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){Ct.batch(()=>{if(t.onSuccess){var r,s,o,c;(r=(s=this.options).onSuccess)==null||r.call(s,this.currentResult.data),(o=(c=this.options).onSettled)==null||o.call(c,this.currentResult.data,null)}else if(t.onError){var p,v,C,A;(p=(v=this.options).onError)==null||p.call(v,this.currentResult.error),(C=(A=this.options).onSettled)==null||C.call(A,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:L})=>{L(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function nw(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Kg(e,t){return nw(e,t)||e.state.dataUpdatedAt>0&&Zh(e,t,t.refetchOnMount)}function Zh(e,t,r){if(t.enabled!==!1){const s=typeof r=="function"?r(e):r;return s==="always"||s!==!1&&Op(e,t)}return!1}function Jg(e,t,r,s){return r.enabled!==!1&&(e!==t||s.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&Op(e,r)}function Op(e,t){return e.isStaleByTime(t.staleTime)}function sw(e,t,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?t.isPlaceholderData:!Yh(e.getCurrentResult(),t)}var Gv={exports:{}},Zv={};/** +`+c.stack}return{value:e,source:t,stack:o,digest:null}}function vu(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Th(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var x4=typeof WeakMap=="function"?WeakMap:Map;function uv(e,t,r){r=Ni(-1,r),r.tag=3,r.payload={element:null};var s=t.value;return r.callback=function(){Cc||(Cc=!0,Bh=s),Th(e,t)},r}function hv(e,t,r){r=Ni(-1,r),r.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var o=t.value;r.payload=function(){return s(o)},r.callback=function(){Th(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(r.callback=function(){Th(e,t),typeof s!="function"&&(un===null?un=new Set([this]):un.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),r}function jg(e,t,r){var s=e.pingCache;if(s===null){s=e.pingCache=new x4;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=T4.bind(null,e,t,r),t.then(e,e))}function Ng(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 Eg(e,t,r,s,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Ni(-1,1),t.tag=2,dn(r,t,1))),r.lanes|=1),e)}var v4=zi.ReactCurrentOwner,lr=!1;function Qt(e,t,r,s){t.child=e===null?Bx(t,null,r,s):Xs(t,e.child,r,s)}function Lg(e,t,r,s,o){r=r.render;var c=t.ref;return Ds(t,o),s=xp(e,t,r,s,c,o),r=vp(),e!==null&&!lr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,_i(e,t,o)):(ht&&r&&sp(t),t.flags|=1,Qt(e,t,s,o),t.child)}function Pg(e,t,r,s,o){if(e===null){var c=r.type;return typeof c=="function"&&!Ep(c)&&c.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=c,fv(e,t,c,s,o)):(e=Vl(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:oo,r(p,s)&&e.ref===t.ref)return _i(e,t,o)}return t.flags|=1,e=fn(c,s),e.ref=t.ref,e.return=t,t.child=e}function fv(e,t,r,s,o){if(e!==null){var c=e.memoizedProps;if(oo(c,s)&&e.ref===t.ref)if(lr=!1,t.pendingProps=s=c,(e.lanes&o)!==0)e.flags&131072&&(lr=!0);else return t.lanes=e.lanes,_i(e,t,o)}return Rh(e,t,r,s,o)}function pv(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(Ts,fr),fr|=r;else{if(!(r&1073741824))return e=c!==null?c.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,lt(Ts,fr),fr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=c!==null?c.baseLanes:r,lt(Ts,fr),fr|=s}else c!==null?(s=c.baseLanes|r,t.memoizedState=null):s=r,lt(Ts,fr),fr|=s;return Qt(e,t,o,r),t.child}function gv(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Rh(e,t,r,s,o){var c=dr(r)?Qn:Ut.current;return c=Ws(t,c),Ds(t,o),r=xp(e,t,r,s,c,o),s=vp(),e!==null&&!lr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,_i(e,t,o)):(ht&&s&&sp(t),t.flags|=1,Qt(e,t,r,o),t.child)}function Tg(e,t,r,s,o){if(dr(r)){var c=!0;fc(t)}else c=!1;if(Ds(t,o),t.stateNode===null)Dl(e,t),dv(t,r,s),Ph(t,r,s,o),s=!0;else if(e===null){var p=t.stateNode,v=t.memoizedProps;p.props=v;var C=p.context,A=r.contextType;typeof A=="object"&&A!==null?A=Tr(A):(A=dr(r)?Qn:Ut.current,A=Ws(t,A));var L=r.getDerivedStateFromProps,P=typeof L=="function"||typeof p.getSnapshotBeforeUpdate=="function";P||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==s||C!==A)&&Ag(t,p,s,A),Ui=!1;var z=t.memoizedState;p.state=z,vc(t,s,p,o),C=t.memoizedState,v!==s||z!==C||cr.current||Ui?(typeof L=="function"&&(Lh(t,r,L,s),C=t.memoizedState),(v=Ui||Sg(t,r,v,s,z,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,Wx(e,t),v=t.memoizedProps,A=t.type===t.elementType?v:Fr(t.type,v),p.props=A,P=t.pendingProps,z=p.context,C=r.contextType,typeof C=="object"&&C!==null?C=Tr(C):(C=dr(r)?Qn:Ut.current,C=Ws(t,C));var M=r.getDerivedStateFromProps;(L=typeof M=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==P||z!==C)&&Ag(t,p,s,C),Ui=!1,z=t.memoizedState,p.state=z,vc(t,s,p,o);var H=t.memoizedState;v!==P||z!==H||cr.current||Ui?(typeof M=="function"&&(Lh(t,r,M,s),H=t.memoizedState),(A=Ui||Sg(t,r,A,s,z,H,C)||!1)?(L||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&&z===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&z===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&&z===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),s=!1)}return _h(e,t,r,s,c,o)}function _h(e,t,r,s,o,c){gv(e,t);var p=(t.flags&128)!==0;if(!s&&!p)return o&&mg(t,r,!1),_i(e,t,c);s=t.stateNode,v4.current=t;var v=p&&typeof r.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&p?(t.child=Xs(t,e.child,null,c),t.child=Xs(t,null,v,c)):Qt(e,t,v,c),t.memoizedState=s.state,o&&mg(t,r,!0),t.child}function mv(e){var t=e.stateNode;t.pendingContext?gg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&gg(e,t.context,!1),fp(e,t.containerInfo)}function Rg(e,t,r,s,o){return $s(),op(o),t.flags|=256,Qt(e,t,r,s),t.child}var Mh={dehydrated:null,treeContext:null,retryLane:0};function Oh(e){return{baseLanes:e,cachePool:null,transitions:null}}function xv(e,t,r){var s=t.pendingProps,o=pt.current,c=!1,p=(t.flags&128)!==0,v;if((v=p)||(v=e!==null&&e.memoizedState===null?!1:(o&2)!==0),v?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),lt(pt,o&1),e===null)return Nh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(p=s.children,e=s.fallback,c?(s=t.mode,c=t.child,p={mode:"hidden",children:p},!(s&1)&&c!==null?(c.childLanes=0,c.pendingProps=p):c=dd(p,s,0,null),e=$n(e,s,r,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=Oh(r),t.memoizedState=Mh,e):wp(t,p));if(o=e.memoizedState,o!==null&&(v=o.dehydrated,v!==null))return y4(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=fn(o,C),s.subtreeFlags=o.subtreeFlags&14680064),v!==null?c=fn(v,c):(c=$n(c,p,r,null),c.flags|=2),c.return=t,s.return=t,s.sibling=c,t.child=s,s=c,c=t.child,p=e.child.memoizedState,p=p===null?Oh(r):{baseLanes:p.baseLanes|r,cachePool:null,transitions:p.transitions},c.memoizedState=p,c.childLanes=e.childLanes&~r,t.memoizedState=Mh,s}return c=e.child,e=c.sibling,s=fn(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 wp(e,t){return t=dd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function vl(e,t,r,s){return s!==null&&op(s),Xs(t,e.child,null,r),e=wp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function y4(e,t,r,s,o,c,p){if(r)return t.flags&256?(t.flags&=-257,s=vu(Error(ue(422))),vl(e,t,p,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=s.fallback,o=t.mode,s=dd({mode:"visible",children:s.children},o,0,null),c=$n(c,o,p,null),c.flags|=2,s.return=t,c.return=t,s.sibling=c,t.child=s,t.mode&1&&Xs(t,e.child,null,p),t.child.memoizedState=Oh(p),t.memoizedState=Mh,c);if(!(t.mode&1))return vl(e,t,p,null);if(o.data==="$!"){if(s=o.nextSibling&&o.nextSibling.dataset,s)var v=s.dgst;return s=v,c=Error(ue(419)),s=vu(c,s,void 0),vl(e,t,p,s)}if(v=(p&e.childLanes)!==0,lr||v){if(s=Mt,s!==null){switch(p&-p){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(s.suspendedLanes|p)?0:o,o!==0&&o!==c.retryLane&&(c.retryLane=o,Ri(e,o),Ur(s,e,o,-1))}return Np(),s=vu(Error(ue(421))),vl(e,t,p,s)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=R4.bind(null,e),o._reactRetry=t,null):(e=c.treeContext,pr=cn(o.nextSibling),gr=t,ht=!0,Br=null,e!==null&&(Cr[Sr++]=Ai,Cr[Sr++]=ji,Cr[Sr++]=Kn,Ai=e.id,ji=e.overflow,Kn=t),t=wp(t,s.children),t.flags|=4096,t)}function _g(e,t,r){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Eh(e.return,t,r)}function yu(e,t,r,s,o){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:r,tailMode:o}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=s,c.tail=r,c.tailMode=o)}function vv(e,t,r){var s=t.pendingProps,o=s.revealOrder,c=s.tail;if(Qt(e,t,s.children,r),s=pt.current,s&2)s=s&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_g(e,r,t);else if(e.tag===19)_g(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&&yc(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),yu(t,!1,o,r,c);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&yc(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}yu(t,!0,r,null,c);break;case"together":yu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Dl(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),es|=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=fn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=fn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function b4(e,t,r){switch(t.tag){case 3:mv(t),$s();break;case 5:$x(t);break;case 1:dr(t.type)&&fc(t);break;case 4:fp(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,o=t.memoizedProps.value;lt(mc,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?xv(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 vv(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,pv(e,t,r)}return _i(e,t,r)}var yv,Ih,bv,wv;yv=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Ih=function(){};bv=function(e,t,r,s){var o=e.memoizedProps;if(o!==s){e=t.stateNode,Hn(ai.current);var c=null;switch(r){case"input":o=nh(e,o),s=nh(e,s),c=[];break;case"select":o=mt({},o,{value:void 0}),s=mt({},s,{value:void 0}),c=[];break;case"textarea":o=oh(e,o),s=oh(e,s),c=[];break;default:typeof o.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=uc)}ch(r,s);var p;r=null;for(A in o)if(!s.hasOwnProperty(A)&&o.hasOwnProperty(A)&&o[A]!=null)if(A==="style"){var v=o[A];for(p in v)v.hasOwnProperty(p)&&(r||(r={}),r[p]="")}else A!=="dangerouslySetInnerHTML"&&A!=="children"&&A!=="suppressContentEditableWarning"&&A!=="suppressHydrationWarning"&&A!=="autoFocus"&&(eo.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"&&(eo.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)}};wv=function(e,t,r,s){r!==s&&(t.flags|=4)};function wa(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 w4(e,t,r){var s=t.pendingProps;switch(ap(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(t),null;case 1:return dr(t.type)&&hc(),$t(t),null;case 3:return s=t.stateNode,Ys(),ut(cr),ut(Ut),gp(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ml(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Br!==null&&($h(Br),Br=null))),Ih(e,t),$t(t),null;case 5:pp(t);var o=Hn(fo.current);if(r=t.type,e!==null&&t.stateNode!=null)bv(e,t,r,s,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(ue(166));return $t(t),null}if(e=Hn(ai.current),ml(t)){s=t.stateNode,r=t.type;var c=t.memoizedProps;switch(s[ri]=t,s[uo]=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[ri]=t,e[uo]=s,yv(e,t,!1,!1),t.stateNode=e;e:{switch(p=dh(r,s),r){case"dialog":ct("cancel",e),ct("close",e),o=s;break;case"iframe":case"object":case"embed":ct("load",e),o=s;break;case"video":case"audio":for(o=0;oGs&&(t.flags|=128,s=!0,wa(c,!1),t.lanes=4194304)}else{if(!s)if(e=yc(p),e!==null){if(t.flags|=128,s=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),wa(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!ht)return $t(t),null}else 2*yt()-c.renderingStartTime>Gs&&r!==1073741824&&(t.flags|=128,s=!0,wa(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 jp(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?fr&1073741824&&($t(t),t.subtreeFlags&6&&(t.flags|=8192)):$t(t),null;case 24:return null;case 25:return null}throw Error(ue(156,t.tag))}function k4(e,t){switch(ap(t),t.tag){case 1:return dr(t.type)&&hc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ys(),ut(cr),ut(Ut),gp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return pp(t),null;case 13:if(ut(pt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ue(340));$s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ut(pt),null;case 4:return Ys(),null;case 10:return dp(t.type._context),null;case 22:case 23:return jp(),null;case 24:return null;default:return null}}var yl=!1,Xt=!1,C4=typeof WeakSet=="function"?WeakSet:Set,Ce=null;function Ps(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(s){xt(e,t,s)}else r.current=null}function zh(e,t,r){try{r()}catch(s){xt(e,t,s)}}var Mg=!1;function S4(e,t){if(bh=lc,e=jx(),np(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var o=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{r.nodeType,c.nodeType}catch{r=null;break e}var p=0,v=-1,C=-1,A=0,L=0,P=e,z=null;t:for(;;){for(var M;P!==r||o!==0&&P.nodeType!==3||(v=p+o),P!==c||s!==0&&P.nodeType!==3||(C=p+s),P.nodeType===3&&(p+=P.nodeValue.length),(M=P.firstChild)!==null;)z=P,P=M;for(;;){if(P===e)break t;if(z===r&&++A===o&&(v=p),z===c&&++L===s&&(C=p),(M=P.nextSibling)!==null)break;P=z,z=P.parentNode}P=M}r=v===-1||C===-1?null:{start:v,end:C}}else r=null}r=r||{start:0,end:0}}else r=null;for(wh={focusedElem:e,selectionRange:r},lc=!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,q=H.memoizedState,W=t.stateNode,V=W.getSnapshotBeforeUpdate(t.elementType===t.type?B:Fr(t.type,B),q);W.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ue(163))}}catch(K){xt(t,t.return,K)}if(e=t.sibling,e!==null){e.return=t.return,Ce=e;break}Ce=t.return}return H=Mg,Mg=!1,H}function Ua(e,t,r){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var o=s=s.next;do{if((o.tag&e)===e){var c=o.destroy;o.destroy=void 0,c!==void 0&&zh(t,r,c)}o=o.next}while(o!==s)}}function ld(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var s=r.create;r.destroy=s()}r=r.next}while(r!==t)}}function Fh(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function kv(e){var t=e.alternate;t!==null&&(e.alternate=null,kv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ri],delete t[uo],delete t[Sh],delete t[a4],delete t[o4])),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 Cv(e){return e.tag===5||e.tag===3||e.tag===4}function Og(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Dh(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=uc));else if(s!==4&&(e=e.child,e!==null))for(Dh(e,t,r),e=e.sibling;e!==null;)Dh(e,t,r),e=e.sibling}function Hh(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Hh(e,t,r),e=e.sibling;e!==null;)Hh(e,t,r),e=e.sibling}var zt=null,Dr=!1;function Vi(e,t,r){for(r=r.child;r!==null;)Sv(e,t,r),r=r.sibling}function Sv(e,t,r){if(si&&typeof si.onCommitFiberUnmount=="function")try{si.onCommitFiberUnmount(ed,r)}catch{}switch(r.tag){case 5:Xt||Ps(r,t);case 6:var s=zt,o=Dr;zt=null,Vi(e,t,r),zt=s,Dr=o,zt!==null&&(Dr?(e=zt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):zt.removeChild(r.stateNode));break;case 18:zt!==null&&(Dr?(e=zt,r=r.stateNode,e.nodeType===8?hu(e.parentNode,r):e.nodeType===1&&hu(e,r),so(e)):hu(zt,r.stateNode));break;case 4:s=zt,o=Dr,zt=r.stateNode.containerInfo,Dr=!0,Vi(e,t,r),zt=s,Dr=o;break;case 0:case 11:case 14:case 15:if(!Xt&&(s=r.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){o=s=s.next;do{var c=o,p=c.destroy;c=c.tag,p!==void 0&&(c&2||c&4)&&zh(r,t,p),o=o.next}while(o!==s)}Vi(e,t,r);break;case 1:if(!Xt&&(Ps(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)}Vi(e,t,r);break;case 21:Vi(e,t,r);break;case 22:r.mode&1?(Xt=(s=Xt)||r.memoizedState!==null,Vi(e,t,r),Xt=s):Vi(e,t,r);break;default:Vi(e,t,r)}}function Ig(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new C4),t.forEach(function(s){var o=_4.bind(null,e,s);r.has(s)||(r.add(s),s.then(o,o))})}}function Ir(e,t){var r=t.deletions;if(r!==null)for(var s=0;so&&(o=p),s&=~c}if(s=o,s=yt()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*j4(s/1960))-s,10e?16:e,tn===null)var s=!1;else{if(e=tn,tn=null,Sc=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()-Sp?Wn(e,0):Cp|=r),ur(e,t)}function Rv(e,t){t===0&&(e.mode&1?(t=dl,dl<<=1,!(dl&130023424)&&(dl=4194304)):t=1);var r=tr();e=Ri(e,t),e!==null&&(Io(e,t,r),ur(e,r))}function R4(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Rv(e,r)}function _4(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),Rv(e,r)}var _v;_v=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||cr.current)lr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return lr=!1,b4(e,t,r);lr=!!(e.flags&131072)}else lr=!1,ht&&t.flags&1048576&&zx(t,gc,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Dl(e,t),e=t.pendingProps;var o=Ws(t,Ut.current);Ds(t,r),o=xp(null,t,s,e,o,r);var c=vp();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dr(s)?(c=!0,fc(t)):c=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,hp(t),o.updater=od,t.stateNode=o,o._reactInternals=t,Ph(t,s,e,r),t=_h(null,t,s,!0,c,r)):(t.tag=0,ht&&c&&sp(t),Qt(null,t,o,r),t=t.child),t;case 16:s=t.elementType;e:{switch(Dl(e,t),e=t.pendingProps,o=s._init,s=o(s._payload),t.type=s,o=t.tag=O4(s),e=Fr(s,e),o){case 0:t=Rh(null,t,s,e,r);break e;case 1:t=Tg(null,t,s,e,r);break e;case 11:t=Lg(null,t,s,e,r);break e;case 14:t=Pg(null,t,s,Fr(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:Fr(s,o),Rh(e,t,s,o,r);case 1:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Fr(s,o),Tg(e,t,s,o,r);case 3:e:{if(mv(t),e===null)throw Error(ue(387));s=t.pendingProps,c=t.memoizedState,o=c.element,Wx(e,t),vc(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=Us(Error(ue(423)),t),t=Rg(e,t,s,r,o);break e}else if(s!==o){o=Us(Error(ue(424)),t),t=Rg(e,t,s,r,o);break e}else for(pr=cn(t.stateNode.containerInfo.firstChild),gr=t,ht=!0,Br=null,r=Bx(t,null,s,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if($s(),s===o){t=_i(e,t,r);break e}Qt(e,t,s,r)}t=t.child}return t;case 5:return $x(t),e===null&&Nh(t),s=t.type,o=t.pendingProps,c=e!==null?e.memoizedProps:null,p=o.children,kh(s,o)?p=null:c!==null&&kh(s,c)&&(t.flags|=32),gv(e,t),Qt(e,t,p,r),t.child;case 6:return e===null&&Nh(t),null;case 13:return xv(e,t,r);case 4:return fp(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Xs(t,null,s,r):Qt(e,t,s,r),t.child;case 11:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Fr(s,o),Lg(e,t,s,o,r);case 7:return Qt(e,t,t.pendingProps,r),t.child;case 8:return Qt(e,t,t.pendingProps.children,r),t.child;case 12:return Qt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(s=t.type._context,o=t.pendingProps,c=t.memoizedProps,p=o.value,lt(mc,s._currentValue),s._currentValue=p,c!==null)if(qr(c.value,p)){if(c.children===o.children&&!cr.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=Ni(-1,r&-r),C.tag=2;var A=c.updateQueue;if(A!==null){A=A.shared;var L=A.pending;L===null?C.next=C:(C.next=L.next,L.next=C),A.pending=C}}c.lanes|=r,C=c.alternate,C!==null&&(C.lanes|=r),Eh(c.return,r,t),v.lanes|=r;break}C=C.next}}else if(c.tag===10)p=c.type===t.type?null:c.child;else if(c.tag===18){if(p=c.return,p===null)throw Error(ue(341));p.lanes|=r,v=p.alternate,v!==null&&(v.lanes|=r),Eh(p,r,t),p=c.sibling}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===t){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}Qt(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,s=t.pendingProps.children,Ds(t,r),o=Tr(o),s=s(o),t.flags|=1,Qt(e,t,s,r),t.child;case 14:return s=t.type,o=Fr(s,t.pendingProps),o=Fr(s.type,o),Pg(e,t,s,o,r);case 15:return fv(e,t,t.type,t.pendingProps,r);case 17:return s=t.type,o=t.pendingProps,o=t.elementType===s?o:Fr(s,o),Dl(e,t),t.tag=1,dr(s)?(e=!0,fc(t)):e=!1,Ds(t,r),dv(t,s,o),Ph(t,s,o,r),_h(null,t,s,!0,e,r);case 19:return vv(e,t,r);case 22:return pv(e,t,r)}throw Error(ue(156,t.tag))};function Mv(e,t){return ox(e,t)}function M4(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 jr(e,t,r,s){return new M4(e,t,r,s)}function Ep(e){return e=e.prototype,!(!e||!e.isReactComponent)}function O4(e){if(typeof e=="function")return Ep(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uf)return 11;if(e===Gf)return 14}return 2}function fn(e,t){var r=e.alternate;return r===null?(r=jr(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 Vl(e,t,r,s,o,c){var p=2;if(s=e,typeof e=="function")Ep(e)&&(p=1);else if(typeof e=="string")p=5;else e:switch(e){case ws:return $n(r.children,o,c,t);case Yf:p=8,o|=8;break;case eh:return e=jr(12,r,t,o|2),e.elementType=eh,e.lanes=c,e;case th:return e=jr(13,r,t,o),e.elementType=th,e.lanes=c,e;case rh:return e=jr(19,r,t,o),e.elementType=rh,e.lanes=c,e;case $0:return dd(r,o,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V0:p=10;break e;case W0:p=9;break e;case Uf:p=11;break e;case Gf:p=14;break e;case Yi:p=16,s=null;break e}throw Error(ue(130,e==null?e:typeof e,""))}return t=jr(p,r,t,o),t.elementType=e,t.type=s,t.lanes=c,t}function $n(e,t,r,s){return e=jr(7,e,s,t),e.lanes=r,e}function dd(e,t,r,s){return e=jr(22,e,s,t),e.elementType=$0,e.lanes=r,e.stateNode={isHidden:!1},e}function bu(e,t,r){return e=jr(6,e,null,t),e.lanes=r,e}function wu(e,t,r){return t=jr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function I4(e,t,r,s,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=tu(0),this.expirationTimes=tu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tu(0),this.identifierPrefix=s,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Lp(e,t,r,s,o,c,p,v,C){return e=new I4(e,t,r,v,C),t===1?(t=1,c===!0&&(t|=8)):t=0,c=jr(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:s,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},hp(c),e}function z4(e,t,r){var s=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Fv)}catch(e){console.error(e)}}Fv(),F0.exports=xr;var Dv=F0.exports,$g=Dv;Ku.createRoot=$g.createRoot,Ku.hydrateRoot=$g.hydrateRoot;class Ho{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 vo=typeof window>"u"||"Deno"in window;function wr(){}function V4(e,t){return typeof e=="function"?e(t):e}function Xh(e){return typeof e=="number"&&e>=0&&e!==1/0}function Hv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ia(e,t,r){return gd(e)?typeof t=="function"?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Gi(e,t,r){return gd(e)?[{...t,queryKey:e},r]:[e||{},t]}function Xg(e,t){const{type:r="all",exact:s,fetchStatus:o,predicate:c,queryKey:p,stale:v}=e;if(gd(p)){if(s){if(t.queryHash!==_p(p,t.options))return!1}else if(!Nc(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 Yg(e,t){const{exact:r,fetching:s,predicate:o,mutationKey:c}=e;if(gd(c)){if(!t.options.mutationKey)return!1;if(r){if(rn(t.options.mutationKey)!==rn(c))return!1}else if(!Nc(t.options.mutationKey,c))return!1}return!(typeof s=="boolean"&&t.state.status==="loading"!==s||o&&!o(t))}function _p(e,t){return((t==null?void 0:t.queryKeyHashFn)||rn)(e)}function rn(e){return JSON.stringify(e,(t,r)=>Uh(r)?Object.keys(r).sort().reduce((s,o)=>(s[o]=r[o],s),{}):r)}function Nc(e,t){return Bv(e,t)}function Bv(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!Bv(e[r],t[r])):!1}function Vv(e,t){if(e===t)return e;const r=Ug(e)&&Ug(t);if(r||Uh(e)&&Uh(t)){const s=r?e.length:Object.keys(e).length,o=r?t:Object.keys(t),c=o.length,p=r?[]:{};let v=0;for(let C=0;C"u")return!0;const r=t.prototype;return!(!Gg(r)||!r.hasOwnProperty("isPrototypeOf"))}function Gg(e){return Object.prototype.toString.call(e)==="[object Object]"}function gd(e){return Array.isArray(e)}function Wv(e){return new Promise(t=>{setTimeout(t,e)})}function Zg(e){Wv(0).then(e)}function W4(){if(typeof AbortController=="function")return new AbortController}function Gh(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Vv(e,t):t}class $4 extends Ho{constructor(){super(),this.setup=t=>{if(!vo&&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 Ec=new $4,qg=["online","offline"];class X4 extends Ho{constructor(){super(),this.setup=t=>{if(!vo&&window.addEventListener){const r=()=>t();return qg.forEach(s=>{window.addEventListener(s,r,!1)}),()=>{qg.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 Lc=new X4;function Y4(e){return Math.min(1e3*2**e,3e4)}function md(e){return(e??"online")==="online"?Lc.isOnline():!0}class $v{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Wl(e){return e instanceof $v}function Xv(e){let t=!1,r=0,s=!1,o,c,p;const v=new Promise((q,W)=>{c=q,p=W}),C=q=>{s||(M(new $v(q)),e.abort==null||e.abort())},A=()=>{t=!0},L=()=>{t=!1},P=()=>!Ec.isFocused()||e.networkMode!=="always"&&!Lc.isOnline(),z=q=>{s||(s=!0,e.onSuccess==null||e.onSuccess(q),o==null||o(),c(q))},M=q=>{s||(s=!0,e.onError==null||e.onError(q),o==null||o(),p(q))},H=()=>new Promise(q=>{o=W=>{const V=s||!P();return V&&q(W),V},e.onPause==null||e.onPause()}).then(()=>{o=void 0,s||e.onContinue==null||e.onContinue()}),B=()=>{if(s)return;let q;try{q=e.fn()}catch(W){q=Promise.reject(W)}Promise.resolve(q).then(z).catch(W=>{var V,_;if(s)return;const K=(V=e.retry)!=null?V:3,ee=(_=e.retryDelay)!=null?_:Y4,X=typeof ee=="function"?ee(r,W):ee,Q=K===!0||typeof K=="number"&&r{if(P())return H()}).then(()=>{t?M(W):B()})})};return md(e.networkMode)?B():H().then(B),{promise:v,cancel:C,continue:()=>(o==null?void 0:o())?v:Promise.resolve(),cancelRetry:A,continueRetry:L}}const Mp=console;function U4(){let e=[],t=0,r=L=>{L()},s=L=>{L()};const o=L=>{let P;t++;try{P=L()}finally{t--,t||v()}return P},c=L=>{t?e.push(L):Zg(()=>{r(L)})},p=L=>(...P)=>{c(()=>{L(...P)})},v=()=>{const L=e;e=[],L.length&&Zg(()=>{s(()=>{L.forEach(P=>{r(P)})})})};return{batch:o,batchCalls:p,schedule:c,setNotifyFunction:L=>{r=L},setBatchNotifyFunction:L=>{s=L}}}const Ct=U4();class Yv{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Xh(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(vo?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class G4 extends Yv{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Mp,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||Z4(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,r){const s=Gh(this.state.data,t,this.options);return this.dispatch({data:s,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),s}setState(t,r){this.dispatch({type:"setState",state:t,setStateOptions:r})}cancel(t){var r;const s=this.promise;return(r=this.retryer)==null||r.cancel(t),s?s.then(wr).catch(wr):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||!Hv(this.state.dataUpdatedAt,t)}onFocus(){var t;const r=this.observers.find(s=>s.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const r=this.observers.find(s=>s.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,r){var s,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var c;return(c=this.retryer)==null||c.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const M=this.observers.find(H=>H.options.queryFn);M&&this.setOptions(M.options)}const p=W4(),v={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},C=M=>{Object.defineProperty(M,"signal",{enumerable:!0,get:()=>{if(p)return this.abortSignalConsumed=!0,p.signal}})};C(v);const A=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(v)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),L={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:A};if(C(L),(s=this.options.behavior)==null||s.onFetch(L),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=L.fetchOptions)==null?void 0:o.meta)){var P;this.dispatch({type:"fetch",meta:(P=L.fetchOptions)==null?void 0:P.meta})}const z=M=>{if(Wl(M)&&M.silent||this.dispatch({type:"error",error:M}),!Wl(M)){var H,B,q,W;(H=(B=this.cache.config).onError)==null||H.call(B,M,this),(q=(W=this.cache.config).onSettled)==null||q.call(W,this.state.data,M,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Xv({fn:L.fetchFn,abort:p==null?void 0:p.abort.bind(p),onSuccess:M=>{var H,B,q,W;if(typeof M>"u"){z(new Error(this.queryHash+" data is undefined"));return}this.setData(M),(H=(B=this.cache.config).onSuccess)==null||H.call(B,M,this),(q=(W=this.cache.config).onSettled)==null||q.call(W,M,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:z,onFail:(M,H)=>{this.dispatch({type:"failed",failureCount:M,error:H})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:L.options.retry,retryDelay:L.options.retryDelay,networkMode:L.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const r=s=>{var o,c;switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:md(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 Wl(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 Z4(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t<"u",s=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class q4 extends Ho{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:_p(c,r);let v=this.get(p);return v||(v=new G4({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]=Gi(t,r);return typeof s.exact>"u"&&(s.exact=!0),this.queries.find(o=>Xg(s,o))}findAll(t,r){const[s]=Gi(t,r);return Object.keys(s).length>0?this.queries.filter(o=>Xg(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 Q4 extends Yv{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Mp,this.observers=[],this.state=t.state||K4(),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=Xv({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,L;if(!r){var P,z,M,H;this.dispatch({type:"loading",variables:this.options.variables}),await((P=(z=this.mutationCache.config).onMutate)==null?void 0:P.call(z,this.state.variables,this));const J=await((M=(H=this.options).onMutate)==null?void 0:M.call(H,this.state.variables));J!==this.state.context&&this.dispatch({type:"loading",context:J,variables:this.state.variables})}const Q=await t();return await((s=(o=this.mutationCache.config).onSuccess)==null?void 0:s.call(o,Q,this.state.variables,this.state.context,this)),await((c=(p=this.options).onSuccess)==null?void 0:c.call(p,Q,this.state.variables,this.state.context)),await((v=(C=this.mutationCache.config).onSettled)==null?void 0:v.call(C,Q,null,this.state.variables,this.state.context,this)),await((A=(L=this.options).onSettled)==null?void 0:A.call(L,Q,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:Q}),Q}catch(Q){try{var B,q,W,V,_,K,ee,X;throw await((B=(q=this.mutationCache.config).onError)==null?void 0:B.call(q,Q,this.state.variables,this.state.context,this)),await((W=(V=this.options).onError)==null?void 0:W.call(V,Q,this.state.variables,this.state.context)),await((_=(K=this.mutationCache.config).onSettled)==null?void 0:_.call(K,void 0,Q,this.state.variables,this.state.context,this)),await((ee=(X=this.options).onSettled)==null?void 0:ee.call(X,void 0,Q,this.state.variables,this.state.context)),Q}finally{this.dispatch({type:"error",error:Q})}}}dispatch(t){const r=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"loading":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!md(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 K4(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class J4 extends Ho{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,s){const o=new Q4({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=>Yg(t,r))}findAll(t){return this.mutations.filter(r=>Yg(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(wr)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function ew(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,s,o,c,p;const v=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,C=(s=e.fetchOptions)==null||(o=s.meta)==null?void 0:o.fetchMore,A=C==null?void 0:C.pageParam,L=(C==null?void 0:C.direction)==="forward",P=(C==null?void 0:C.direction)==="backward",z=((c=e.state.data)==null?void 0:c.pages)||[],M=((p=e.state.data)==null?void 0:p.pageParams)||[];let H=M,B=!1;const q=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]),_=(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};q(le);const Ne=W(le);return Promise.resolve(Ne).then(Le=>V(X,J,Le,fe))};let K;if(!z.length)K=_([]);else if(L){const X=typeof A<"u",Q=X?A:Qg(e.options,z);K=_(z,X,Q)}else if(P){const X=typeof A<"u",Q=X?A:tw(e.options,z);K=_(z,X,Q,!0)}else{H=[];const X=typeof e.options.getNextPageParam>"u";K=(v&&z[0]?v(z[0],0,z):!0)?_([],X,M[0]):Promise.resolve(V([],M[0],z[0]));for(let J=1;J{if(v&&z[J]?v(z[J],J,z):!0){const Ne=X?M[J]:Qg(e.options,fe);return _(fe,X,Ne)}return Promise.resolve(V(fe,M[J],z[J]))})}return K.then(X=>({pages:X,pageParams:H}))}}}}function Qg(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function tw(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class rw{constructor(t={}){this.queryCache=t.queryCache||new q4,this.mutationCache=t.mutationCache||new J4,this.logger=t.logger||Mp,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Ec.subscribe(()=>{Ec.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Lc.subscribe(()=>{Lc.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]=Gi(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=Ia(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=V4(r,c);if(typeof p>"u")return;const v=Ia(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]=Gi(t,r),o=this.queryCache;Ct.batch(()=>{o.findAll(s).forEach(c=>{o.remove(c)})})}resetQueries(t,r,s){const[o,c]=Gi(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={}]=Gi(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(wr).catch(wr)}invalidateQueries(t,r,s){const[o,c]=Gi(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]=Gi(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(wr);return c!=null&&c.throwOnError||(v=v.catch(wr)),v}fetchQuery(t,r,s){const o=Ia(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(wr).catch(wr)}fetchInfiniteQuery(t,r,s){const o=Ia(t,r,s);return o.behavior=ew(),this.fetchQuery(o)}prefetchInfiniteQuery(t,r,s){return this.fetchInfiniteQuery(t,r,s).then(wr).catch(wr)}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=>rn(t)===rn(o.queryKey));s?s.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(s=>Nc(t,s.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(t,r){const s=this.mutationDefaults.find(o=>rn(t)===rn(o.mutationKey));s?s.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(s=>Nc(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=_p(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 iw extends Ho{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),Kg(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zh(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zh(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,r){const s=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),Yh(s,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();const c=this.hasListeners();c&&Jg(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 sw(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(wr)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),vo||this.currentResult.isStale||!Xh(this.options.staleTime))return;const r=Hv(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,!(vo||this.options.enabled===!1||!Xh(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ec.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,r){const s=this.currentQuery,o=this.options,c=this.currentResult,p=this.currentResultState,v=this.currentResultOptions,C=t!==s,A=C?t.state:this.currentQueryInitialState,L=C?this.currentResult:this.previousQueryResult,{state:P}=t;let{dataUpdatedAt:z,error:M,errorUpdatedAt:H,fetchStatus:B,status:q}=P,W=!1,V=!1,_;if(r._optimisticResults){const J=this.hasListeners(),fe=!J&&Kg(t,r),le=J&&Jg(t,s,r,o);(fe||le)&&(B=md(t.options.networkMode)?"fetching":"paused",z||(q="loading")),r._optimisticResults==="isRestoring"&&(B="idle")}if(r.keepPreviousData&&!P.dataUpdatedAt&&L!=null&&L.isSuccess&&q!=="error")_=L.data,z=L.dataUpdatedAt,q=L.status,W=!0;else if(r.select&&typeof P.data<"u")if(c&&P.data===(p==null?void 0:p.data)&&r.select===this.selectFn)_=this.selectResult;else try{this.selectFn=r.select,_=r.select(P.data),_=Gh(c==null?void 0:c.data,_,r),this.selectResult=_,this.selectError=null}catch(J){this.selectError=J}else _=P.data;if(typeof r.placeholderData<"u"&&typeof _>"u"&&q==="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"&&(q="success",_=Gh(c==null?void 0:c.data,J,r),V=!0)}this.selectError&&(M=this.selectError,_=this.selectResult,H=Date.now(),q="error");const K=B==="fetching",ee=q==="loading",X=q==="error";return{status:q,fetchStatus:B,isLoading:ee,isSuccess:q==="success",isError:X,isInitialLoading:ee&&K,data:_,dataUpdatedAt:z,error:M,errorUpdatedAt:H,failureCount:P.fetchFailureCount,failureReason:P.fetchFailureReason,errorUpdateCount:P.errorUpdateCount,isFetched:P.dataUpdateCount>0||P.errorUpdateCount>0,isFetchedAfterMount:P.dataUpdateCount>A.dataUpdateCount||P.errorUpdateCount>A.errorUpdateCount,isFetching:K,isRefetching:K&&!ee,isLoadingError:X&&P.dataUpdatedAt===0,isPaused:B==="paused",isPlaceholderData:V,isPreviousData:W,isRefetchError:X&&P.dataUpdatedAt!==0,isStale:Op(t,r),refetch:this.refetch,remove:this.remove}}updateResult(t){const r=this.currentResult,s=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Yh(s,r))return;this.currentResult=s;const o={cache:!0},c=()=>{if(!r)return!0;const{notifyOnChangeProps:p}=this.options,v=typeof p=="function"?p():p;if(v==="all"||!v&&!this.trackedProps.size)return!0;const C=new Set(v??this.trackedProps);return this.options.useErrorBoundary&&C.add("error"),Object.keys(this.currentResult).some(A=>{const L=A;return this.currentResult[L]!==r[L]&&C.has(L)})};(t==null?void 0:t.listeners)!==!1&&c()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const r={};t.type==="success"?r.onSuccess=!t.manual:t.type==="error"&&!Wl(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){Ct.batch(()=>{if(t.onSuccess){var r,s,o,c;(r=(s=this.options).onSuccess)==null||r.call(s,this.currentResult.data),(o=(c=this.options).onSettled)==null||o.call(c,this.currentResult.data,null)}else if(t.onError){var p,v,C,A;(p=(v=this.options).onError)==null||p.call(v,this.currentResult.error),(C=(A=this.options).onSettled)==null||C.call(A,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:L})=>{L(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function nw(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Kg(e,t){return nw(e,t)||e.state.dataUpdatedAt>0&&Zh(e,t,t.refetchOnMount)}function Zh(e,t,r){if(t.enabled!==!1){const s=typeof r=="function"?r(e):r;return s==="always"||s!==!1&&Op(e,t)}return!1}function Jg(e,t,r,s){return r.enabled!==!1&&(e!==t||s.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&Op(e,r)}function Op(e,t){return e.isStaleByTime(t.staleTime)}function sw(e,t,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?t.isPlaceholderData:!Yh(e.getCurrentResult(),t)}var Uv={exports:{}},Gv={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -45,37 +45,37 @@ Error generating stack: `+c.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Zs=G;function aw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ow=typeof Object.is=="function"?Object.is:aw,lw=Zs.useState,cw=Zs.useEffect,dw=Zs.useLayoutEffect,uw=Zs.useDebugValue;function hw(e,t){var r=t(),s=lw({inst:{value:r,getSnapshot:t}}),o=s[0].inst,c=s[1];return dw(function(){o.value=r,o.getSnapshot=t,ku(o)&&c({inst:o})},[e,r,t]),cw(function(){return ku(o)&&c({inst:o}),e(function(){ku(o)&&c({inst:o})})},[e]),uw(r),r}function ku(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ow(e,r)}catch{return!0}}function fw(e,t){return t()}var pw=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?fw:hw;Zv.useSyncExternalStore=Zs.useSyncExternalStore!==void 0?Zs.useSyncExternalStore:pw;Gv.exports=Zv;var gw=Gv.exports;const mw=gw.useSyncExternalStore,em=G.createContext(void 0),qv=G.createContext(!1);function Qv(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=em),window.ReactQueryClientContext):em)}const xw=({context:e}={})=>{const t=G.useContext(Qv(e,G.useContext(qv)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vw=({client:e,children:t,context:r,contextSharing:s=!1})=>{G.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=Qv(r,s);return G.createElement(qv.Provider,{value:!r&&s},G.createElement(o.Provider,{value:e},t))},Kv=G.createContext(!1),yw=()=>G.useContext(Kv);Kv.Provider;function bw(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const ww=G.createContext(bw()),kw=()=>G.useContext(ww);function Cw(e,t){return typeof e=="function"?e(...t):!!e}const Sw=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Aw=e=>{G.useEffect(()=>{e.clearReset()},[e])},jw=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:s})=>e.isError&&!t.isReset()&&!e.isFetching&&Cw(r,[e.error,s]),Nw=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Ew=(e,t)=>e.isLoading&&e.isFetching&&!t,Lw=(e,t,r)=>(e==null?void 0:e.suspense)&&Ew(t,r),Pw=(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 Tw(e,t){const r=xw({context:e.context}),s=yw(),o=kw(),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)),Nw(c),Sw(c,o),Aw(o);const[p]=G.useState(()=>new t(r,c)),v=p.getOptimisticResult(c);if(mw(G.useCallback(C=>{const A=s?()=>{}:p.subscribe(Ct.batchCalls(C));return p.updateResult(),A},[p,s]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),G.useEffect(()=>{p.setOptions(c,{listeners:!1})},[c,p]),Lw(c,v,s))throw Pw(c,p,o);if(jw({result:v,errorResetBoundary:o,useErrorBoundary:c.useErrorBoundary,query:p.getCurrentQuery()}))throw v.error;return c.notifyOnChangeProps?v:p.trackResult(v)}function Rw(e,t,r){const s=Ia(e,t,r);return Tw(s,iw)}function qh(e,t){return qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,o){return s.__proto__=o,s},qh(e,t)}function li(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,qh(e,t)}var Jv={exports:{}},_w="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Mw=_w,Ow=Mw;function ey(){}function ty(){}ty.resetWarningCache=ey;var Iw=function(){function e(s,o,c,p,v,C){if(C!==Ow){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:ty,resetWarningCache:ey};return r.PropTypes=r,r};Jv.exports=Iw();var zw=Jv.exports;const tm=Ff(zw);function Bt(){return Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;L--){var P=s[L];P==="."?Cu(s,L):P===".."?(Cu(s,L),A++):A&&(Cu(s,L),A--)}if(!p)for(;A--;A)s.unshift("..");p&&s[0]!==""&&(!s[0]||!kl(s[0]))&&s.unshift("");var z=s.join("/");return v&&z.substr(-1)!=="/"&&(z+="/"),z}function rm(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}function $l(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 $l(o,t[c])});if(typeof e=="object"||typeof t=="object"){var r=rm(e),s=rm(t);return r!==e||s!==t?$l(r,s):Object.keys(Object.assign({},e,t)).every(function(o){return $l(e[o],t[o])})}return!1}var Dw="Invariant failed";function Nn(e,t){throw new Error(Dw)}function qa(e){return e.charAt(0)==="/"?e:"/"+e}function im(e){return e.charAt(0)==="/"?e.substr(1):e}function Hw(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function ry(e,t){return Hw(e,t)?e.substr(t.length):e}function iy(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function Bw(e){var t=e||"/",r="",s="",o=t.indexOf("#");o!==-1&&(s=t.substr(o),t=t.substr(0,o));var c=t.indexOf("?");return c!==-1&&(r=t.substr(c),t=t.substr(0,c)),{pathname:t,search:r==="?"?"":r,hash:s==="#"?"":s}}function ar(e){var t=e.pathname,r=e.search,s=e.hash,o=t||"/";return r&&r!=="?"&&(o+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(o+=s.charAt(0)==="#"?s:"#"+s),o}function Jt(e,t,r,s){var o;typeof e=="string"?(o=Bw(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=Fw(o.pathname,s.pathname)):o.pathname=s.pathname:o.pathname||(o.pathname="/"),o}function Vw(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&$l(e.state,t.state)}function Ip(){var e=null;function t(p){return e=p,function(){e===p&&(e=null)}}function r(p,v,C,A){if(e!=null){var L=typeof e=="function"?e(p,v):e;typeof L=="string"?typeof C=="function"?C(L,A):A(!0):A(L!==!1)}else A(!0)}var s=[];function o(p){var v=!0;function C(){v&&p.apply(void 0,arguments)}return s.push(C),function(){v=!1,s=s.filter(function(A){return A!==C})}}function c(){for(var p=arguments.length,v=new Array(p),C=0;CFe?Re.splice(Fe,Re.length-Fe,Ne):Re.push(Ne),L({action:le,location:Ne,index:Fe,entries:Re})}})}function q(J,fe){var le="REPLACE",Ne=Jt(J,fe,P(),Q.location);A.confirmTransitionTo(Ne,le,r,function(ve){ve&&(Q.entries[Q.index]=Ne,L({action:le,location:Ne}))})}function W(J){var fe=lm(Q.index+J,0,Q.entries.length-1),le="POP",Ne=Q.entries[fe];A.confirmTransitionTo(Ne,le,r,function(ve){ve?L({action:le,location:Ne,index:fe}):L()})}function V(){W(-1)}function _(){W(1)}function K(J){var fe=Q.index+J;return fe>=0&&fe"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?fw:hw;Gv.useSyncExternalStore=Zs.useSyncExternalStore!==void 0?Zs.useSyncExternalStore:pw;Uv.exports=Gv;var gw=Uv.exports;const mw=gw.useSyncExternalStore,em=G.createContext(void 0),Zv=G.createContext(!1);function qv(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=em),window.ReactQueryClientContext):em)}const xw=({context:e}={})=>{const t=G.useContext(qv(e,G.useContext(Zv)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vw=({client:e,children:t,context:r,contextSharing:s=!1})=>{G.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=qv(r,s);return G.createElement(Zv.Provider,{value:!r&&s},G.createElement(o.Provider,{value:e},t))},Qv=G.createContext(!1),yw=()=>G.useContext(Qv);Qv.Provider;function bw(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const ww=G.createContext(bw()),kw=()=>G.useContext(ww);function Cw(e,t){return typeof e=="function"?e(...t):!!e}const Sw=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Aw=e=>{G.useEffect(()=>{e.clearReset()},[e])},jw=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:s})=>e.isError&&!t.isReset()&&!e.isFetching&&Cw(r,[e.error,s]),Nw=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Ew=(e,t)=>e.isLoading&&e.isFetching&&!t,Lw=(e,t,r)=>(e==null?void 0:e.suspense)&&Ew(t,r),Pw=(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 Tw(e,t){const r=xw({context:e.context}),s=yw(),o=kw(),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)),Nw(c),Sw(c,o),Aw(o);const[p]=G.useState(()=>new t(r,c)),v=p.getOptimisticResult(c);if(mw(G.useCallback(C=>{const A=s?()=>{}:p.subscribe(Ct.batchCalls(C));return p.updateResult(),A},[p,s]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),G.useEffect(()=>{p.setOptions(c,{listeners:!1})},[c,p]),Lw(c,v,s))throw Pw(c,p,o);if(jw({result:v,errorResetBoundary:o,useErrorBoundary:c.useErrorBoundary,query:p.getCurrentQuery()}))throw v.error;return c.notifyOnChangeProps?v:p.trackResult(v)}function Rw(e,t,r){const s=Ia(e,t,r);return Tw(s,iw)}function qh(e,t){return qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,o){return s.__proto__=o,s},qh(e,t)}function li(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,qh(e,t)}var Kv={exports:{}},_w="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Mw=_w,Ow=Mw;function Jv(){}function ey(){}ey.resetWarningCache=Jv;var Iw=function(){function e(s,o,c,p,v,C){if(C!==Ow){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:ey,resetWarningCache:Jv};return r.PropTypes=r,r};Kv.exports=Iw();var zw=Kv.exports;const tm=Ff(zw);function Bt(){return Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0;L--){var P=s[L];P==="."?Cu(s,L):P===".."?(Cu(s,L),A++):A&&(Cu(s,L),A--)}if(!p)for(;A--;A)s.unshift("..");p&&s[0]!==""&&(!s[0]||!kl(s[0]))&&s.unshift("");var z=s.join("/");return v&&z.substr(-1)!=="/"&&(z+="/"),z}function rm(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}function $l(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 $l(o,t[c])});if(typeof e=="object"||typeof t=="object"){var r=rm(e),s=rm(t);return r!==e||s!==t?$l(r,s):Object.keys(Object.assign({},e,t)).every(function(o){return $l(e[o],t[o])})}return!1}var Dw="Invariant failed";function Nn(e,t){throw new Error(Dw)}function qa(e){return e.charAt(0)==="/"?e:"/"+e}function im(e){return e.charAt(0)==="/"?e.substr(1):e}function Hw(e,t){return e.toLowerCase().indexOf(t.toLowerCase())===0&&"/?#".indexOf(e.charAt(t.length))!==-1}function ty(e,t){return Hw(e,t)?e.substr(t.length):e}function ry(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e}function Bw(e){var t=e||"/",r="",s="",o=t.indexOf("#");o!==-1&&(s=t.substr(o),t=t.substr(0,o));var c=t.indexOf("?");return c!==-1&&(r=t.substr(c),t=t.substr(0,c)),{pathname:t,search:r==="?"?"":r,hash:s==="#"?"":s}}function ar(e){var t=e.pathname,r=e.search,s=e.hash,o=t||"/";return r&&r!=="?"&&(o+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(o+=s.charAt(0)==="#"?s:"#"+s),o}function Jt(e,t,r,s){var o;typeof e=="string"?(o=Bw(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=Fw(o.pathname,s.pathname)):o.pathname=s.pathname:o.pathname||(o.pathname="/"),o}function Vw(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&$l(e.state,t.state)}function Ip(){var e=null;function t(p){return e=p,function(){e===p&&(e=null)}}function r(p,v,C,A){if(e!=null){var L=typeof e=="function"?e(p,v):e;typeof L=="string"?typeof C=="function"?C(L,A):A(!0):A(L!==!1)}else A(!0)}var s=[];function o(p){var v=!0;function C(){v&&p.apply(void 0,arguments)}return s.push(C),function(){v=!1,s=s.filter(function(A){return A!==C})}}function c(){for(var p=arguments.length,v=new Array(p),C=0;CFe?Re.splice(Fe,Re.length-Fe,Ne):Re.push(Ne),L({action:le,location:Ne,index:Fe,entries:Re})}})}function q(J,fe){var le="REPLACE",Ne=Jt(J,fe,P(),Q.location);A.confirmTransitionTo(Ne,le,r,function(ve){ve&&(Q.entries[Q.index]=Ne,L({action:le,location:Ne}))})}function W(J){var fe=lm(Q.index+J,0,Q.entries.length-1),le="POP",Ne=Q.entries[fe];A.confirmTransitionTo(Ne,le,r,function(ve){ve?L({action:le,location:Ne,index:fe}):L()})}function V(){W(-1)}function _(){W(1)}function K(J){var fe=Q.index+J;return fe>=0&&fe=0)&&(r[o]=e[o]);return r}var fy=f8,p8={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},g8={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},py={};py[fy.ForwardRef]=p8;py[fy.Memo]=g8;var Au=1073741823,cm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{};function m8(){var e="__global_unique_id__";return cm[e]=(cm[e]||0)+1}function x8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function v8(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 y8(e){return Array.isArray(e)?e[0]:e}function b8(e,t){var r,s,o="__create-react-context-"+m8()+"__",c=function(v){li(C,v);function C(){for(var L,P=arguments.length,z=new Array(P),M=0;M"u"&&(qs=Xp);function R8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var _8=qs(function(e,t){var r=e.innerRef,s=e.navigate,o=e.onClick,c=Nd(e,["innerRef","navigate","onClick"]),p=c.target,v=Bt({},c,{onClick:function(A){try{o&&o(A)}catch(L){throw A.preventDefault(),L}!A.defaultPrevented&&A.button===0&&(!p||p==="_self")&&!R8(A)&&(A.preventDefault(),s())}});return Xp!==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?_8:r,o=e.replace,c=e.to,p=e.innerRef,v=Nd(e,["component","replace","to","innerRef"]);return ge.createElement(vn.Consumer,null,function(C){C||Nn();var A=C.history,L=Kh(Qh(c,C.location),C.location),P=L?A.createHref(L):"",z=Bt({},v,{href:P,navigate:function(){var H=Qh(c,C.location),B=ar(C.location)===ar(Kh(H)),q=o||B?A.replace:A.push;q(H)}});return Xp!==qs?z.ref=t||p:z.innerRef=p,ge.createElement(s,z)})}),vy=function(t){return t},Tc=ge.forwardRef;typeof Tc>"u"&&(Tc=vy);function M8(){for(var e=arguments.length,t=new Array(e),r=0;rtypeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,oa=()=>{const e=Object.create(null);return(t,r,...s)=>{const o=(c=>JSON.stringify(c,I8))(t);return o in e?e[o]:e[o]=r(t,...s)}},Xn=Symbol.for("sxs.internal"),Yp=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),xm=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:z8}=Object.prototype,Jh=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),F8=/\s+(?![^()]*\))/,gs=e=>t=>e(...typeof t=="string"?String(t).split(F8):[t]),vm={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:gs((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:gs((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:gs((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:gs((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:gs((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:gs((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},Eu=/([\d.]+)([^]*)/,D8=(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,H8=(e,t)=>e in B8&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(r,s,o,c)=>s+(o==="stretch"?`-moz-available${c};${Jh(e)}:${s}-webkit-fill-available`:`-moz-fit-content${c};${Jh(e)}:${s}fit-content`)+c):String(t),B8={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},Mi=e=>e?e+"-":"",yy=(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==="$"?Mi(t)+(v.includes("$")?"":Mi(r))+v.replace(/\$/g,"-"):v)+")"+(o||p=="--"?"*"+(o||"")+(c||"1")+")":"")),V8=/\s*,\s*(?![^()]*\))/,W8=Object.prototype.toString,Rs=(e,t,r,s,o)=>{let c,p,v;const C=(A,L,P)=>{let z,M;const H=B=>{for(z in B){const V=z.charCodeAt(0)===64,_=V&&Array.isArray(B[z])?B[z]:[B[z]];for(M of _){const K=/[A-Z]/.test(W=z)?W:W.replace(/-[^]/g,X=>X[1].toUpperCase()),ee=typeof M=="object"&&M&&M.toString===W8&&(!s.utils[K]||!L.length);if(K in s.utils&&!ee){const X=s.utils[K];if(X!==p){p=X,H(X(M)),p=null;continue}}else if(K in vm){const X=vm[K];if(X!==v){v=X,H(X(M)),v=null;continue}}if(V&&(q=z.slice(1)in s.media?"@media "+s.media[z.slice(1)]:z,z=q.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(X,Q,J,fe,le,Ne)=>{const ve=Eu.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(Eu,(qe,it,de)=>Number(it)+Le*(J===">"?1:-1)+de):Re)+(le?") and ("+(le[0]===">"?"min-":"max-")+Fe+":"+(le.length===1?Ne.replace(Eu,(qe,it,de)=>Number(it)+Le*(le===">"?-1:1)+de):Ne):"")+")"})),ee){const X=V?P.concat(z):[...P],Q=V?[...L]:D8(L,z.split(V8));c!==void 0&&o(ym(...c)),c=void 0,C(M,Q,X)}else c===void 0&&(c=[[],L,P]),z=V||z.charCodeAt(0)!==36?z:`--${Mi(s.prefix)}${z.slice(1).replace(/\$/g,"-")}`,M=ee?M:typeof M=="number"?M&&K in $8?String(M)+"px":String(M):yy(H8(K,M??""),s.prefix,s.themeMap[K]),c[0].push(`${V?`${z} `:`${Jh(z)}:`}${M}`)}}var q,W};H(A),c!==void 0&&o(ym(...c)),c=void 0};C(e,t,r)},ym=(e,t,r)=>`${r.map(s=>`${s}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(r.length?r.length+1:0).join("}")}`,$8={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},bm=e=>String.fromCharCode(e+(e>25?39:97)),Yn=e=>(t=>{let r,s="";for(r=Math.abs(t);r>52;r=r/52|0)s=bm(r%52)+s;return bm(r%52)+s})(((t,r)=>{let s=r.length;for(;s;)t=33*t^r.charCodeAt(--s);return t})(5381,JSON.stringify(e))>>>0),za=["themed","global","styled","onevar","resonevar","allvar","inline"],X8=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},Y8=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(X8(v)){for(let C=0,A=v.cssRules;A[C];++C){const L=Object(A[C]);if(L.type!==1)continue;const P=Object(A[C+1]);if(P.type!==4)continue;++C;const{cssText:z}=L;if(!z.startsWith("--sxs"))continue;const M=z.slice(14,-3).trim().split(/\s+/),H=za[M[0]];H&&(t||(t={sheet:v,reset:s,rules:{},toString:r}),t.rules[H]={group:P,index:C,cache:new Set(M)})}if(t)break}if(!t){const v=(C,A)=>({type:A,cssRules:[],insertRule(L,P){this.cssRules.splice(P,0,v(L,{import:3,undefined:1}[(L.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return C==="@media{}"?`@media{${[].map.call(this.cssRules,L=>L.cssText).join("")}}`:C}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:v("","text/css"),rules:{},reset:s,toString:r}}const{sheet:c,rules:p}=t;for(let v=za.length-1;v>=0;--v){const C=za[v];if(!p[C]){const A=za[v+1],L=p[A]?p[A].index:c.cssRules.length;c.insertRule("@media{}",L),c.insertRule(`--sxs{--sxs:${v}}`,L),p[C]={group:c.cssRules[L+1],index:L,cache:new Set([v])}}U8(p[C])}};return s(),t},U8=e=>{const t=e.group;let r=t.cssRules.length;e.apply=s=>{try{t.insertRule(s,r),++r}catch{}}},Sa=Symbol(),G8=oa(),wm=(e,t)=>G8(e,()=>(...r)=>{let s={type:null,composers:new Set};for(const o of r)if(o!=null)if(o[Xn]){s.type==null&&(s.type=o[Xn].type);for(const c of o[Xn].composers)s.composers.add(c)}else o.constructor!==Object||o.$$typeof?s.type==null&&(s.type=o):s.composers.add(Z8(o,e));return s.type==null&&(s.type="span"),s.composers.size||s.composers.add(["PJLV",{},[],[],{},[]]),q8(e,s,t)}),Z8=({variants:e,compoundVariants:t,defaultVariants:r,...s},o)=>{const c=`${Mi(o.prefix)}c-${Yn(s)}`,p=[],v=[],C=Object.create(null),A=[];for(const z in r)C[z]=String(r[z]);if(typeof e=="object"&&e)for(const z in e){L=C,P=z,z8.call(L,P)||(C[z]="undefined");const M=e[z];for(const H in M){const B={[z]:String(H)};String(H)==="undefined"&&A.push(z);const q=M[H],W=[B,q,!xm(q)];p.push(W)}}var L,P;if(typeof t=="object"&&t)for(const z of t){let{css:M,...H}=z;M=typeof M=="object"&&M||{};for(const q in H)H[q]=String(H[q]);const B=[H,M,!xm(M)];v.push(B)}return[c,s,p,v,C,A]},q8=(e,t,r)=>{const[s,o,c,p]=Q8(t.composers),v=typeof t.type=="function"||t.type.$$typeof?(P=>{function z(){for(let M=0;Mz.rules[M]={apply:H=>z[Sa].push([M,H])}),z})(r):null,C=(v||r).rules,A=`.${s}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,L=P=>{P=typeof P=="object"&&P||K8;const{css:z,...M}=P,H={};for(const W in c)if(delete M[W],W in P){let V=P[W];typeof V=="object"&&V?H[W]={"@initial":c[W],...V}:(V=String(V),H[W]=V!=="undefined"||p.has(W)?V:c[W])}else H[W]=c[W];const B=new Set([...o]);for(const[W,V,_,K]of t.composers){r.rules.styled.cache.has(W)||(r.rules.styled.cache.add(W),Rs(V,[`.${W}`],[],e,Q=>{C.styled.apply(Q)}));const ee=km(_,H,e.media),X=km(K,H,e.media,!0);for(const Q of ee)if(Q!==void 0)for(const[J,fe,le]of Q){const Ne=`${W}-${Yn(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),Rs(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}-${Yn(fe)}-${J}`;B.add(le),r.rules.allvar.cache.has(le)||(r.rules.allvar.cache.add(le),Rs(fe,[`.${le}`],[],e,Ne=>{C.allvar.apply(Ne)}))}}if(typeof z=="object"&&z){const W=`${s}-i${Yn(z)}-css`;B.add(W),r.rules.inline.cache.has(W)||(r.rules.inline.cache.add(W),Rs(z,[`.${W}`],[],e,V=>{C.inline.apply(V)}))}for(const W of String(P.className||"").trim().split(/\s+/))W&&B.add(W);const q=M.className=[...B].join(" ");return{type:t.type,className:q,selector:A,props:M,toString:()=>q,deferredInjector:v}};return Yp(L,{className:s,selector:A,[Xn]:t,toString:()=>(r.rules.styled.cache.has(s)||L(),s)})},Q8=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)]},km=(e,t,r,s)=>{const o=[];e:for(let[c,p,v]of e){if(v)continue;let C,A=0,L=!1;for(C in c){const P=c[C];let z=t[C];if(z!==P){if(typeof z!="object"||!z)continue e;{let M,H,B=0;for(const q in z){if(P===String(z[q])){if(q!=="@initial"){const W=q.slice(1);(H=H||[]).push(W in r?r[W]:q.replace(/^@media ?/,"")),L=!0}A+=B,M=!0}++B}if(H&&H.length&&(p={["@media "+H.join(", ")]:p}),!M)continue e}}}(o[A]=o[A]||[]).push([s?"cv":`${C}-${c[C]}`,p,L])}return o},K8={},J8=oa(),e7=(e,t)=>J8(e,()=>(...r)=>{const s=()=>{for(let o of r){o=typeof o=="object"&&o||{};let c=Yn(o);if(!t.rules.global.cache.has(c)){if(t.rules.global.cache.add(c),"@import"in o){let p=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let v of[].concat(o["@import"]))v=v.includes('"')||v.includes("'")?v:`"${v}"`,t.sheet.insertRule(`@import ${v};`,p++);delete o["@import"]}Rs(o,[],[],e,p=>{t.rules.global.apply(p)})}}return""};return Yp(s,{toString:s})}),t7=oa(),r7=(e,t)=>t7(e,()=>r=>{const s=`${Mi(e.prefix)}k-${Yn(r)}`,o=()=>{if(!t.rules.global.cache.has(s)){t.rules.global.cache.add(s);const c=[];Rs(r,[],[],e,v=>c.push(v));const p=`@keyframes ${s}{${c.join("")}}`;t.rules.global.apply(p)}return s};return Yp(o,{get name(){return o()},toString:o})}),i7=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"--"+Mi(this.prefix)+Mi(this.scale)+this.token}toString(){return this.computedValue}},n7=oa(),s7=(e,t)=>n7(e,()=>(r,s)=>{s=typeof r=="object"&&r||Object(s);const o=`.${r=(r=typeof r=="string"?r:"")||`${Mi(e.prefix)}t-${Yn(s)}`}`,c={},p=[];for(const C in s){c[C]={};for(const A in s[C]){const L=`--${Mi(e.prefix)}${C}-${A}`,P=yy(String(s[C][A]),e.prefix,C);c[C][A]=new i7(A,P,C,e.prefix),p.push(`${L}:${P}`)}}const v=()=>{if(p.length&&!t.rules.themed.cache.has(r)){t.rules.themed.cache.add(r);const C=`${s===e.theme?":root,":""}.${r}{${p.join(";")}}`;t.rules.themed.apply(C)}return r};return{...c,get className(){return v()},selector:o,toString:v}}),a7=oa(),Cm,o7=oa(),Up=e=>{const t=(r=>{let s=!1;const o=a7(r,c=>{s=!0;const p="prefix"in(c=typeof c=="object"&&c||{})?String(c.prefix):"",v=typeof c.media=="object"&&c.media||{},C=typeof c.root=="object"?c.root||null:globalThis.document||null,A=typeof c.theme=="object"&&c.theme||{},L={prefix:p,media:v,theme:A,themeMap:typeof c.themeMap=="object"&&c.themeMap||{...O8},utils:typeof c.utils=="object"&&c.utils||{}},P=Y8(C),z={css:wm(L,P),globalCss:e7(L,P),keyframes:r7(L,P),createTheme:s7(L,P),reset(){P.reset(),z.theme.toString()},theme:{},sheet:P,config:L,prefix:p,getCssText:P.toString,toString:P.toString};return String(z.theme=z.createTheme(A)),z});return s||o.reset(),o})(e);return t.styled=(({config:r,sheet:s})=>o7(r,()=>{const o=wm(r,s);return(...c)=>{const p=o(...c),v=p[Xn].type,C=ge.forwardRef((A,L)=>{const P=A&&A.as||v,{props:z,deferredInjector:M}=p(A);return delete z.as,z.ref=L,M?ge.createElement(ge.Fragment,null,ge.createElement(P,z),ge.createElement(M,null)):ge.createElement(P,z)});return C.className=p.className,C.displayName=`Styled.${v.displayName||v.name||v}`,C.selector=p.selector,C.toString=()=>p.selector,C[Xn]=p[Xn],C}}))(t),t},by=()=>Cm||(Cm=Up()),l7=(...e)=>by().createTheme(...e),c7=(...e)=>by().css(...e);const{styled:bt,css:HL}=Up({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 Bo=e=>e.type==="checkbox",_s=e=>e instanceof Date,Kt=e=>e==null;const wy=e=>typeof e=="object";var At=e=>!Kt(e)&&!Array.isArray(e)&&wy(e)&&!_s(e),d7=e=>At(e)&&e.target?Bo(e.target)?e.target.checked:e.target.value:e,u7=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,h7=(e,t)=>e.has(u7(t)),f7=e=>{const t=e.constructor&&e.constructor.prototype;return At(t)&&t.hasOwnProperty("isPrototypeOf")},Gp=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function br(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(!(Gp&&(e instanceof Blob||e instanceof FileList))&&(r||At(e)))if(t=r?[]:{},!r&&!f7(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=br(e[s]));else return e;return t}var Vo=e=>Array.isArray(e)?e.filter(Boolean):[],vt=e=>e===void 0,Ee=(e,t,r)=>{if(!t||!At(e))return r;const s=Vo(t.split(/[,[\].]+?/)).reduce((o,c)=>Kt(o)?o:o[c],e);return vt(s)||s===e?vt(e[t])?r:e[t]:s},Ci=e=>typeof e=="boolean";const Sm={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Wr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},xi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ge.createContext(null);var p7=(e,t,r,s=!0)=>{const o={defaultValues:t._defaultValues};for(const c in e)Object.defineProperty(o,c,{get:()=>{const p=c;return t._proxyFormState[p]!==Wr.all&&(t._proxyFormState[p]=!s||Wr.all),e[p]}});return o},kr=e=>At(e)&&!Object.keys(e).length,g7=(e,t,r,s)=>{r(e);const{name:o,...c}=e;return kr(c)||Object.keys(c).length>=Object.keys(t).length||Object.keys(c).find(p=>t[p]===Wr.all)},Lu=e=>Array.isArray(e)?e:[e];function m7(e){const t=ge.useRef(e);t.current=e,ge.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var ii=e=>typeof e=="string",x7=(e,t,r,s,o)=>ii(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),Zp=e=>/^\w*$/.test(e),ky=e=>Vo(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dt=(e,t,r)=>{let s=-1;const o=Zp(t)?[t]:ky(t),c=o.length,p=c-1;for(;++st?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[s]:o||!0}}:{},Am=e=>({isOnSubmit:!e||e===Wr.onSubmit,isOnBlur:e===Wr.onBlur,isOnChange:e===Wr.onChange,isOnAll:e===Wr.all,isOnTouch:e===Wr.onTouched}),jm=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Qa=(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;Qa(v,t)}else At(v)&&Qa(v,t)}}};var y7=(e,t,r)=>{const s=Vo(Ee(e,r));return dt(s,"root",t[r]),dt(e,r,s),e},qp=e=>e.type==="file",nn=e=>typeof e=="function",Rc=e=>{if(!Gp)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Yl=e=>ii(e),Qp=e=>e.type==="radio",_c=e=>e instanceof RegExp;const Nm={value:!1,isValid:!1},Em={value:!0,isValid:!0};var Cy=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===""?Em:{value:e[0].value,isValid:!0}:Em:Nm}return Nm};const Lm={isValid:!1,value:null};var Sy=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Lm):Lm;function Pm(e,t,r="validate"){if(Yl(e)||Array.isArray(e)&&e.every(Yl)||Ci(e)&&!e)return{type:r,message:Yl(e)?e:"",ref:t}}var ms=e=>At(e)&&!_c(e)?e:{value:e,message:""},Tm=async(e,t,r,s,o)=>{const{ref:c,refs:p,required:v,maxLength:C,minLength:A,min:L,max:P,pattern:z,validate:M,name:H,valueAsNumber:B,mount:q,disabled:W}=e._f,V=Ee(t,H);if(!q||W)return{};const _=p?p[0]:c,K=ve=>{s&&_.reportValidity&&(_.setCustomValidity(Ci(ve)?"":ve||""),_.reportValidity())},ee={},X=Qp(c),Q=Bo(c),J=X||Q,fe=(B||qp(c))&&vt(c.value)&&vt(V)||Rc(c)&&c.value===""||V===""||Array.isArray(V)&&!V.length,le=v7.bind(null,H,r,ee),Ne=(ve,Le,Fe,Re=xi.maxLength,qe=xi.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||Kt(V))||Ci(V)&&!V||Q&&!Cy(p).isValid||X&&!Sy(p).isValid)){const{value:ve,message:Le}=Yl(v)?{value:!!v,message:v}:ms(v);if(ve&&(ee[H]={type:xi.required,message:Le,ref:_,...le(xi.required,Le)},!r))return K(Le),ee}if(!fe&&(!Kt(L)||!Kt(P))){let ve,Le;const Fe=ms(P),Re=ms(L);if(!Kt(V)&&!isNaN(V)){const qe=c.valueAsNumber||V&&+V;Kt(Fe.value)||(ve=qe>Fe.value),Kt(Re.value)||(Le=qenew Date(new Date().toDateString()+" "+oe),de=c.type=="time",ce=c.type=="week";ii(Fe.value)&&V&&(ve=de?it(V)>it(Fe.value):ce?V>Fe.value:qe>new Date(Fe.value)),ii(Re.value)&&V&&(Le=de?it(V)+ve.value,Re=!Kt(Le.value)&&V.length<+Le.value;if((Fe||Re)&&(Ne(Fe,ve.message,Le.message),!r))return K(ee[H].message),ee}if(z&&!fe&&ii(V)){const{value:ve,message:Le}=ms(z);if(_c(ve)&&!V.match(ve)&&(ee[H]={type:xi.pattern,message:Le,ref:c,...le(xi.pattern,Le)},!r))return K(Le),ee}if(M){if(nn(M)){const ve=await M(V,t),Le=Pm(ve,_);if(Le&&(ee[H]={...Le,...le(xi.validate,Le.message)},!r))return K(Le.message),ee}else if(At(M)){let ve={};for(const Le in M){if(!kr(ve)&&!r)break;const Fe=Pm(await M[Le](V,t),_,Le);Fe&&(ve={...Fe,...le(Le,Fe.message)},K(Fe.message),r&&(ee[H]=ve))}if(!kr(ve)&&(ee[H]={ref:_,...ve},!r))return ee}}return K(!0),ee};function b7(e,t){const r=t.slice(0,-1).length;let s=0;for(;s{let e=[];return{get observers(){return e},next:o=>{for(const c of e)c.next&&c.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(c=>c!==o)}}),unsubscribe:()=>{e=[]}}},Mc=e=>Kt(e)||!wy(e);function Bn(e,t){if(Mc(e)||Mc(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)?!Bn(c,p):c!==p)return!1}}return!0}var Ay=e=>e.type==="select-multiple",k7=e=>Qp(e)||Bo(e),Tu=e=>Rc(e)&&e.isConnected,C7=e=>At(e)&&Object.values(e).some(t=>t),jy=e=>{for(const t in e)if(nn(e[t]))return!0;return!1};function Oc(e,t={}){const r=Array.isArray(e);if(At(e)||r)for(const s in e)Array.isArray(e[s])||At(e[s])&&!jy(e[s])?(t[s]=Array.isArray(e[s])?[]:{},Oc(e[s],t[s])):Kt(e[s])||(t[s]=!0);return t}function Ny(e,t,r){const s=Array.isArray(e);if(At(e)||s)for(const o in e)Array.isArray(e[o])||At(e[o])&&!jy(e[o])?vt(t)||Mc(r[o])?r[o]=Array.isArray(e[o])?Oc(e[o],[]):{...Oc(e[o])}:Ny(e[o],Kt(t)?{}:t[o],r[o]):r[o]=!Bn(e[o],t[o]);return r}var Cl=(e,t)=>Ny(e,t,Oc(t)),Ey=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:s})=>vt(e)?e:t?e===""?NaN:e&&+e:r&&ii(e)?new Date(e):s?s(e):e;function Ru(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return qp(t)?t.files:Qp(t)?Sy(e.refs).value:Ay(t)?[...t.selectedOptions].map(({value:r})=>r):Bo(t)?Cy(e.refs).value:Ey(vt(t.value)?e.ref.value:t.value,e)}var S7=(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}},Aa=e=>vt(e)?e:_c(e)?e.source:At(e)?_c(e.value)?e.value.source:e.value:e,A7=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Rm(e,t,r){const s=Ee(e,r);if(s||Zp(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 j7=(e,t,r,s,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?s.isOnBlur:o.isOnBlur)?!e:(r?s.isOnChange:o.isOnChange)?e:!0,N7=(e,t)=>!Vo(Ee(e,t)).length&&Rt(e,t);const E7={mode:Wr.onSubmit,reValidateMode:Wr.onChange,shouldFocusError:!0};function L7(e={}){let t={...E7,...e},r={submitCount:0,isDirty:!1,isLoading:nn(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)?br(t.defaultValues||t.values)||{}:{},c=t.shouldUnregister?{}:br(o),p={action:!1,mount:!1,watch:!1},v={mount:new Set,unMount:new Set,array:new Set,watch:new Set},C,A=0;const L={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},P={values:Pu(),array:Pu(),state:Pu()},z=Am(t.mode),M=Am(t.reValidateMode),H=t.criteriaMode===Wr.all,B=Z=>re=>{clearTimeout(A),A=setTimeout(Z,re)},q=async Z=>{if(L.isValid||Z){const re=t.resolver?kr((await J()).errors):await le(s,!0);re!==r.isValid&&P.state.next({isValid:re})}},W=(Z,re)=>{(L.isValidating||L.validatingFields)&&(re.forEach(se=>{dt(r.validatingFields,se,Z)}),r.isValidating=C7(r.validatingFields),P.state.next({validatingFields:r.validatingFields,isValidating:r.isValidating}))},V=(Z,re=[],se,be,xe=!0,pe=!0)=>{if(be&&se){if(p.action=!0,pe&&Array.isArray(Ee(s,Z))){const Te=se(Ee(s,Z),be.argA,be.argB);xe&&dt(s,Z,Te)}if(pe&&Array.isArray(Ee(r.errors,Z))){const Te=se(Ee(r.errors,Z),be.argA,be.argB);xe&&dt(r.errors,Z,Te),N7(r.errors,Z)}if(L.touchedFields&&pe&&Array.isArray(Ee(r.touchedFields,Z))){const Te=se(Ee(r.touchedFields,Z),be.argA,be.argB);xe&&dt(r.touchedFields,Z,Te)}L.dirtyFields&&(r.dirtyFields=Cl(o,c)),P.state.next({name:Z,isDirty:ve(Z,re),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else dt(c,Z,re)},_=(Z,re)=>{dt(r.errors,Z,re),P.state.next({errors:r.errors})},K=Z=>{r.errors=Z,P.state.next({errors:r.errors,isValid:!1})},ee=(Z,re,se,be)=>{const xe=Ee(s,Z);if(xe){const pe=Ee(c,Z,vt(se)?Ee(o,Z):se);vt(pe)||be&&be.defaultChecked||re?dt(c,Z,re?pe:Ru(xe._f)):Re(Z,pe),p.mount&&q()}},X=(Z,re,se,be,xe)=>{let pe=!1,Te=!1;const et={name:Z},wt=!!(Ee(s,Z)&&Ee(s,Z)._f.disabled);if(!se||be){L.isDirty&&(Te=r.isDirty,r.isDirty=et.isDirty=ve(),pe=Te!==et.isDirty);const Pt=wt||Bn(Ee(o,Z),re);Te=!!(!wt&&Ee(r.dirtyFields,Z)),Pt||wt?Rt(r.dirtyFields,Z):dt(r.dirtyFields,Z,!0),et.dirtyFields=r.dirtyFields,pe=pe||L.dirtyFields&&Te!==!Pt}if(se){const Pt=Ee(r.touchedFields,Z);Pt||(dt(r.touchedFields,Z,se),et.touchedFields=r.touchedFields,pe=pe||L.touchedFields&&Pt!==se)}return pe&&xe&&P.state.next(et),pe?et:{}},Q=(Z,re,se,be)=>{const xe=Ee(r.errors,Z),pe=L.isValid&&Ci(re)&&r.isValid!==re;if(e.delayError&&se?(C=B(()=>_(Z,se)),C(e.delayError)):(clearTimeout(A),C=null,se?dt(r.errors,Z,se):Rt(r.errors,Z)),(se?!Bn(xe,se):xe)||!kr(be)||pe){const Te={...be,...pe&&Ci(re)?{isValid:re}:{},errors:r.errors,name:Z};r={...r,...Te},P.state.next(Te)}W(!1,Object.keys(r.validatingFields).filter(Te=>Te===Z))},J=async Z=>t.resolver(c,t.context,S7(Z||v.mount,s,t.criteriaMode,t.shouldUseNativeValidation)),fe=async Z=>{const{errors:re}=await J(Z);if(Z)for(const se of Z){const be=Ee(re,se);be?dt(r.errors,se,be):Rt(r.errors,se)}else r.errors=re;return re},le=async(Z,re,se={valid:!0})=>{for(const be in Z){const xe=Z[be];if(xe){const{_f:pe,...Te}=xe;if(pe){const et=v.array.has(pe.name),wt=await Tm(xe,c,H,t.shouldUseNativeValidation&&!re,et);if(wt[pe.name]&&(se.valid=!1,re))break;!re&&(Ee(wt,pe.name)?et?y7(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 Z of v.unMount){const re=Ee(s,Z);re&&(re._f.refs?re._f.refs.every(se=>!Tu(se)):!Tu(re._f.ref))&&Be(Z)}v.unMount=new Set},ve=(Z,re)=>(Z&&re&&dt(c,Z,re),!Bn(Ae(),o)),Le=(Z,re,se)=>x7(Z,v,{...p.mount?c:vt(re)?o:ii(Z)?{[Z]:re}:re},se,re),Fe=Z=>Vo(Ee(p.mount?c:o,Z,e.shouldUnregister?Ee(o,Z,[]):[])),Re=(Z,re,se={})=>{const be=Ee(s,Z);let xe=re;if(be){const pe=be._f;pe&&(!pe.disabled&&dt(c,Z,Ey(re,pe)),xe=Rc(pe.ref)&&Kt(re)?"":re,Ay(pe.ref)?[...pe.ref.options].forEach(Te=>Te.selected=xe.includes(Te.value)):pe.refs?Bo(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):qp(pe.ref)?pe.ref.value="":(pe.ref.value=xe,pe.ref.type||P.values.next({name:Z,values:{...c}})))}(se.shouldDirty||se.shouldTouch)&&X(Z,xe,se.shouldTouch,se.shouldDirty,!0),se.shouldValidate&&oe(Z)},qe=(Z,re,se)=>{for(const be in re){const xe=re[be],pe=`${Z}.${be}`,Te=Ee(s,pe);(v.array.has(Z)||!Mc(xe)||Te&&!Te._f)&&!_s(xe)?qe(pe,xe,se):Re(pe,xe,se)}},it=(Z,re,se={})=>{const be=Ee(s,Z),xe=v.array.has(Z),pe=br(re);dt(c,Z,pe),xe?(P.array.next({name:Z,values:{...c}}),(L.isDirty||L.dirtyFields)&&se.shouldDirty&&P.state.next({name:Z,dirtyFields:Cl(o,c),isDirty:ve(Z,pe)})):be&&!be._f&&!Kt(pe)?qe(Z,pe,se):Re(Z,pe,se),jm(Z,v)&&P.state.next({...r}),P.values.next({name:p.mount?Z:void 0,values:{...c}})},de=async Z=>{const re=Z.target;let se=re.name,be=!0;const xe=Ee(s,se),pe=()=>re.type?Ru(xe._f):d7(Z),Te=et=>{be=Number.isNaN(et)||et===Ee(c,se,et)};if(xe){let et,wt;const Pt=pe(),Bi=Z.type===Sm.BLUR||Z.type===Sm.FOCUS_OUT,Jo=!A7(xe._f)&&!t.resolver&&!Ee(r.errors,se)&&!xe._f.deps||j7(Bi,Ee(r.touchedFields,se),r.isSubmitted,M,z),hs=jm(se,v,Bi);dt(c,se,Pt),Bi?(xe._f.onBlur&&xe._f.onBlur(Z),C&&C(0)):xe._f.onChange&&xe._f.onChange(Z);const pa=X(se,Pt,Bi,!1),el=!kr(pa)||hs;if(!Bi&&P.values.next({name:se,type:Z.type,values:{...c}}),Jo)return L.isValid&&q(),el&&P.state.next({name:se,...hs?{}:pa});if(!Bi&&hs&&P.state.next({...r}),W(!0,[se]),t.resolver){const{errors:tl}=await J([se]);if(Te(Pt),be){const rl=Rm(r.errors,s,se),il=Rm(tl,s,rl.name||se);et=il.error,se=il.name,wt=kr(tl)}}else et=(await Tm(xe,c,H,t.shouldUseNativeValidation))[se],Te(Pt),be&&(et?wt=!1:L.isValid&&(wt=await le(s,!0)));be&&(xe._f.deps&&oe(xe._f.deps),Q(se,wt,et,pa))}},ce=(Z,re)=>{if(Ee(r.errors,re)&&Z.focus)return Z.focus(),1},oe=async(Z,re={})=>{let se,be;const xe=Lu(Z);if(W(!0,xe),t.resolver){const pe=await fe(vt(Z)?Z:xe);se=kr(pe),be=Z?!xe.some(Te=>Ee(pe,Te)):se}else Z?(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)&&q()):be=se=await le(s);return P.state.next({...!ii(Z)||L.isValid&&se!==r.isValid?{}:{name:Z},...t.resolver||!Z?{isValid:se}:{},errors:r.errors,isValidating:!1}),re.shouldFocus&&!be&&Qa(s,ce,Z?xe:v.mount),be},Ae=Z=>{const re={...o,...p.mount?c:{}};return vt(Z)?re:ii(Z)?Ee(re,Z):Z.map(se=>Ee(re,se))},je=(Z,re)=>({invalid:!!Ee((re||r).errors,Z),isDirty:!!Ee((re||r).dirtyFields,Z),isTouched:!!Ee((re||r).touchedFields,Z),isValidating:!!Ee((re||r).validatingFields,Z),error:Ee((re||r).errors,Z)}),ze=Z=>{Z&&Lu(Z).forEach(re=>Rt(r.errors,re)),P.state.next({errors:Z?r.errors:{}})},Ue=(Z,re,se)=>{const be=(Ee(s,Z,{_f:{}})._f||{}).ref;dt(r.errors,Z,{...re,ref:be}),P.state.next({name:Z,errors:r.errors,isValid:!1}),se&&se.shouldFocus&&be&&be.focus&&be.focus()},He=(Z,re)=>nn(Z)?P.values.subscribe({next:se=>Z(Le(void 0,re),se)}):Le(Z,re,!0),Be=(Z,re={})=>{for(const se of Z?Lu(Z):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&&q()},Me=({disabled:Z,name:re,field:se,fields:be,value:xe})=>{if(Ci(Z)){const pe=Z?void 0:vt(xe)?Ru(se?se._f:Ee(be,re)._f):xe;dt(c,re,pe),X(re,pe,!1,!1,!0)}},Nt=(Z,re={})=>{let se=Ee(s,Z);const be=Ci(re.disabled);return dt(s,Z,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:Z}},name:Z,mount:!0,...re}}),v.mount.add(Z),se?Me({field:se,disabled:re.disabled,name:Z,value:re.value}):ee(Z,!0,re.value),{...be?{disabled:re.disabled}:{},...t.progressive?{required:!!re.required,min:Aa(re.min),max:Aa(re.max),minLength:Aa(re.minLength),maxLength:Aa(re.maxLength),pattern:Aa(re.pattern)}:{},name:Z,onChange:de,onBlur:de,ref:xe=>{if(xe){Nt(Z,re),se=Ee(s,Z);const pe=vt(xe.value)&&xe.querySelectorAll&&xe.querySelectorAll("input,select,textarea")[0]||xe,Te=k7(pe),et=se._f.refs||[];if(Te?et.find(wt=>wt===pe):pe===se._f.ref)return;dt(s,Z,{_f:{...se._f,...Te?{refs:[...et.filter(Tu),pe,...Array.isArray(Ee(o,Z))?[{}]:[]],ref:{type:pe.type,name:Z}}:{ref:pe}}}),ee(Z,!1,void 0,pe)}else se=Ee(s,Z,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||re.shouldUnregister)&&!(h7(v.array,Z)&&p.action)&&v.unMount.add(Z)}}},hr=()=>t.shouldFocusError&&Qa(s,ce,v.mount),ds=Z=>{Ci(Z)&&(P.state.next({disabled:Z}),Qa(s,(re,se)=>{let be=Z;const xe=Ee(s,se);xe&&Ci(xe._f.disabled)&&(be||(be=xe._f.disabled)),re.disabled=be},0,!1))},Hi=(Z,re)=>async se=>{let be;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let xe=br(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"),kr(r.errors)){P.state.next({errors:{}});try{await Z(xe,se)}catch(pe){be=pe}}else re&&await re({...r.errors},se),hr(),setTimeout(hr);if(P.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:kr(r.errors)&&!be,submitCount:r.submitCount+1,errors:r.errors}),be)throw be},Qo=(Z,re={})=>{Ee(s,Z)&&(vt(re.defaultValue)?it(Z,br(Ee(o,Z))):(it(Z,re.defaultValue),dt(o,Z,br(re.defaultValue))),re.keepTouched||Rt(r.touchedFields,Z),re.keepDirty||(Rt(r.dirtyFields,Z),r.isDirty=re.defaultValue?ve(Z,br(Ee(o,Z))):ve()),re.keepError||(Rt(r.errors,Z),L.isValid&&q()),P.state.next({...r}))},fa=(Z,re={})=>{const se=Z?br(Z):o,be=br(se),xe=kr(Z),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(Gp&&vt(Z))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(Rc(wt)){const Pt=wt.closest("form");if(Pt){Pt.reset();break}}}}s={}}c=e.shouldUnregister?re.keepDefaultValues?br(o):{}:br(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=!L.isValid||!!re.keepIsValid||!!re.keepDirtyValues,p.watch=!!e.shouldUnregister,P.state.next({submitCount:re.keepSubmitCount?r.submitCount:0,isDirty:xe?!1:re.keepDirty?r.isDirty:!!(re.keepDefaultValues&&!Bn(Z,o)),isSubmitted:re.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:xe?[]:re.keepDirtyValues?re.keepDefaultValues&&c?Cl(o,c):r.dirtyFields:re.keepDefaultValues&&Z?Cl(o,Z):{},touchedFields:re.keepTouched?r.touchedFields:{},errors:re.keepErrors?r.errors:{},isSubmitSuccessful:re.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},us=(Z,re)=>fa(nn(Z)?Z(c):Z,re);return{control:{register:Nt,unregister:Be,getFieldState:je,handleSubmit:Hi,setError:Ue,_executeSchema:J,_getWatch:Le,_getDirty:ve,_updateValid:q,_removeUnmounted:Ne,_updateFieldArray:V,_updateDisabledField:Me,_getFieldArray:Fe,_reset:fa,_resetDefaultValues:()=>nn(t.defaultValues)&&t.defaultValues().then(Z=>{us(Z,t.resetOptions),P.state.next({isLoading:!1})}),_updateFormState:Z=>{r={...r,...Z}},_disableForm:ds,_subjects:P,_proxyFormState:L,_setErrors:K,get _fields(){return s},get _formValues(){return c},get _state(){return p},set _state(Z){p=Z},get _defaultValues(){return o},get _names(){return v},set _names(Z){v=Z},get _formState(){return r},set _formState(Z){r=Z},get _options(){return t},set _options(Z){t={...t,...Z}}},trigger:oe,register:Nt,handleSubmit:Hi,watch:He,setValue:it,getValues:Ae,reset:us,resetField:Qo,clearErrors:ze,unregister:Be,setError:Ue,setFocus:(Z,re={})=>{const se=Ee(s,Z),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 P7(e={}){const t=ge.useRef(),r=ge.useRef(),[s,o]=ge.useState({isDirty:!1,isValidating:!1,isLoading:nn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:nn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...L7(e),formState:s});const c=t.current.control;return c._options=e,m7({subject:c._subjects.state,next:p=>{g7(p,c._proxyFormState,c._updateFormState)&&o({...c._formState})}}),ge.useEffect(()=>c._disableForm(e.disabled),[c,e.disabled]),ge.useEffect(()=>{if(c._proxyFormState.isDirty){const p=c._getDirty();p!==s.isDirty&&c._subjects.state.next({isDirty:p})}},[c,s.isDirty]),ge.useEffect(()=>{e.values&&!Bn(e.values,r.current)?(c._reset(e.values,c._options.resetOptions),r.current=e.values,o(p=>({...p}))):c._resetDefaultValues()},[e.values,c]),ge.useEffect(()=>{e.errors&&c._setErrors(e.errors)},[e.errors,c]),ge.useEffect(()=>{c._state.mount||(c._updateValid(),c._state.mount=!0),c._state.watch&&(c._state.watch=!1,c._subjects.state.next({...c._formState})),c._removeUnmounted()}),ge.useEffect(()=>{e.shouldUnregister&&c._subjects.values.next({values:c._getWatch()})},[e.shouldUnregister,c]),t.current.formState=p7(s,c),t.current}function T7(e){return e.replace(/\/$/,"")}const R7=T7("https://backend.captn.ai")||"http://localhost:3001",Ly={apiUrl:R7};var Ic;(function(e){e.Get="GET",e.Post="POST",e.Put="PUT",e.Delete="DELETE"})(Ic||(Ic={}));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 Py={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",Py);bt("textarea",Py);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"});c7({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 Ty(e,t){return function(){return e.apply(t,arguments)}}const{toString:_7}=Object.prototype,{getPrototypeOf:Kp}=Object,Pd=(e=>t=>{const r=_7.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),fi=e=>(e=e.toLowerCase(),t=>Pd(t)===e),Td=e=>t=>typeof t===e,{isArray:la}=Array,yo=Td("undefined");function M7(e){return e!==null&&!yo(e)&&e.constructor!==null&&!yo(e.constructor)&&Lr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ry=fi("ArrayBuffer");function O7(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ry(e.buffer),t}const I7=Td("string"),Lr=Td("function"),_y=Td("number"),Rd=e=>e!==null&&typeof e=="object",z7=e=>e===!0||e===!1,Ul=e=>{if(Pd(e)!=="object")return!1;const t=Kp(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},F7=fi("Date"),D7=fi("File"),H7=fi("Blob"),B7=fi("FileList"),V7=e=>Rd(e)&&Lr(e.pipe),W7=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Lr(e.append)&&((t=Pd(e))==="formdata"||t==="object"&&Lr(e.toString)&&e.toString()==="[object FormData]"))},$7=fi("URLSearchParams"),X7=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Wo(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),la(e))for(s=0,o=e.length;s0;)if(o=r[s],t===o.toLowerCase())return o;return null}const Oy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Iy=e=>!yo(e)&&e!==Oy;function ef(){const{caseless:e}=Iy(this)&&this||{},t={},r=(s,o)=>{const c=e&&My(t,o)||o;Ul(t[c])&&Ul(s)?t[c]=ef(t[c],s):Ul(s)?t[c]=ef({},s):la(s)?t[c]=s.slice():t[c]=s};for(let s=0,o=arguments.length;s(Wo(t,(o,c)=>{r&&Lr(o)?e[c]=Ty(o,r):e[c]=o},{allOwnKeys:s}),e),U7=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),G7=(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)},Z7=(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&&Kp(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},q7=(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},Q7=e=>{if(!e)return null;if(la(e))return e;let t=e.length;if(!_y(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},K7=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Kp(Uint8Array)),J7=(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])}},e6=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},t6=fi("HTMLFormElement"),r6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,o){return s.toUpperCase()+o}),_m=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),i6=fi("RegExp"),zy=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};Wo(r,(o,c)=>{let p;(p=t(o,c,e))!==!1&&(s[c]=p||o)}),Object.defineProperties(e,s)},n6=e=>{zy(e,(t,r)=>{if(Lr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(Lr(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+"'")})}})},s6=(e,t)=>{const r={},s=o=>{o.forEach(c=>{r[c]=!0})};return la(e)?s(e):s(String(e).split(t)),r},a6=()=>{},o6=(e,t)=>(e=+e,Number.isFinite(e)?e:t),_u="abcdefghijklmnopqrstuvwxyz",Mm="0123456789",Fy={DIGIT:Mm,ALPHA:_u,ALPHA_DIGIT:_u+_u.toUpperCase()+Mm},l6=(e=16,t=Fy.ALPHA_DIGIT)=>{let r="";const{length:s}=t;for(;e--;)r+=t[Math.random()*s|0];return r};function c6(e){return!!(e&&Lr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const d6=e=>{const t=new Array(10),r=(s,o)=>{if(Rd(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[o]=s;const c=la(s)?[]:{};return Wo(s,(p,v)=>{const C=r(p,o+1);!yo(C)&&(c[v]=C)}),t[o]=void 0,c}}return s};return r(e,0)},u6=fi("AsyncFunction"),h6=e=>e&&(Rd(e)||Lr(e))&&Lr(e.then)&&Lr(e.catch),ae={isArray:la,isArrayBuffer:Ry,isBuffer:M7,isFormData:W7,isArrayBufferView:O7,isString:I7,isNumber:_y,isBoolean:z7,isObject:Rd,isPlainObject:Ul,isUndefined:yo,isDate:F7,isFile:D7,isBlob:H7,isRegExp:i6,isFunction:Lr,isStream:V7,isURLSearchParams:$7,isTypedArray:K7,isFileList:B7,forEach:Wo,merge:ef,extend:Y7,trim:X7,stripBOM:U7,inherits:G7,toFlatObject:Z7,kindOf:Pd,kindOfTest:fi,endsWith:q7,toArray:Q7,forEachEntry:J7,matchAll:e6,isHTMLForm:t6,hasOwnProperty:_m,hasOwnProp:_m,reduceDescriptors:zy,freezeMethods:n6,toObjectSet:s6,toCamelCase:r6,noop:a6,toFiniteNumber:o6,findKey:My,global:Oy,isContextDefined:Iy,ALPHABET:Fy,generateString:l6,isSpecCompliantForm:c6,toJSONObject:d6,isAsyncFn:u6,isThenable:h6};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 Dy=Qe.prototype,Hy={};["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=>{Hy[e]={value:e}});Object.defineProperties(Qe,Hy);Object.defineProperty(Dy,"isAxiosError",{value:!0});Qe.from=(e,t,r,s,o,c)=>{const p=Object.create(Dy);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 f6=null;function tf(e){return ae.isPlainObject(e)||ae.isArray(e)}function By(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function Om(e,t,r){return e?e.concat(t).map(function(o,c){return o=By(o),!r&&c?"["+o+"]":o}).join(r?".":""):t}function p6(e){return ae.isArray(e)&&!e.some(tf)}const g6=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,q){return!ae.isUndefined(q[B])});const s=r.metaTokens,o=r.visitor||L,c=r.dots,p=r.indexes,C=(r.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(t);if(!ae.isFunction(o))throw new TypeError("visitor must be a function");function A(H){if(H===null)return"";if(ae.isDate(H))return H.toISOString();if(!C&&ae.isBlob(H))throw new Qe("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(H)||ae.isTypedArray(H)?C&&typeof Blob=="function"?new Blob([H]):Buffer.from(H):H}function L(H,B,q){let W=H;if(H&&!q&&typeof H=="object"){if(ae.endsWith(B,"{}"))B=s?B:B.slice(0,-2),H=JSON.stringify(H);else if(ae.isArray(H)&&p6(H)||(ae.isFileList(H)||ae.endsWith(B,"[]"))&&(W=ae.toArray(H)))return B=By(B),W.forEach(function(_,K){!(ae.isUndefined(_)||_===null)&&t.append(p===!0?Om([B],K,c):p===null?B:B+"[]",A(_))}),!1}return tf(H)?!0:(t.append(Om(q,B,c),A(H)),!1)}const P=[],z=Object.assign(g6,{defaultVisitor:L,convertValue:A,isVisitable:tf});function M(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,z))===!0&&M(W,B?B.concat(V):[V])}),P.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return M(e),t}function Im(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function Jp(e,t){this._pairs=[],e&&_d(e,this,t)}const Vy=Jp.prototype;Vy.append=function(t,r){this._pairs.push([t,r])};Vy.toString=function(t){const r=t?function(s){return t.call(this,s,Im)}:Im;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function m6(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wy(e,t,r){if(!t)return e;const s=r&&r.encode||m6,o=r&&r.serialize;let c;if(o?c=o(t,r):c=ae.isURLSearchParams(t)?t.toString():new Jp(t,r).toString(s),c){const p=e.indexOf("#");p!==-1&&(e=e.slice(0,p)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class zm{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 $y={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},x6=typeof URLSearchParams<"u"?URLSearchParams:Jp,v6=typeof FormData<"u"?FormData:null,y6=typeof Blob<"u"?Blob:null,b6={isBrowser:!0,classes:{URLSearchParams:x6,FormData:v6,Blob:y6},protocols:["http","https","file","blob","url","data"]},Xy=typeof window<"u"&&typeof document<"u",w6=(e=>Xy&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),k6=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",C6=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xy,hasStandardBrowserEnv:w6,hasStandardBrowserWebWorkerEnv:k6},Symbol.toStringTag,{value:"Module"})),ni={...C6,...b6};function S6(e,t){return _d(e,new ni.classes.URLSearchParams,Object.assign({visitor:function(r,s,o,c){return ni.isNode&&ae.isBuffer(r)?(this.append(s,r.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)}},t))}function A6(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function j6(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]=j6(o[p])),!v)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const r={};return ae.forEachEntry(e,(s,o)=>{t(A6(s),o,r,0)}),r}return null}function N6(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(0,JSON.stringify)(e)}const $o={transitional:$y,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(Yy(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 S6(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),N6(t)):t}],transformResponse:[function(t){const r=this.transitional||$o.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:ni.classes.FormData,Blob:ni.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=>{$o.headers[e]={}});const E6=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"]),L6=e=>{const t={};let r,s,o;return e&&e.split(` + */var Ot=typeof Symbol=="function"&&Symbol.for,Hp=Ot?Symbol.for("react.element"):60103,Bp=Ot?Symbol.for("react.portal"):60106,xd=Ot?Symbol.for("react.fragment"):60107,vd=Ot?Symbol.for("react.strict_mode"):60108,yd=Ot?Symbol.for("react.profiler"):60114,bd=Ot?Symbol.for("react.provider"):60109,wd=Ot?Symbol.for("react.context"):60110,Vp=Ot?Symbol.for("react.async_mode"):60111,kd=Ot?Symbol.for("react.concurrent_mode"):60111,Cd=Ot?Symbol.for("react.forward_ref"):60112,Sd=Ot?Symbol.for("react.suspense"):60113,l8=Ot?Symbol.for("react.suspense_list"):60120,Ad=Ot?Symbol.for("react.memo"):60115,jd=Ot?Symbol.for("react.lazy"):60116,c8=Ot?Symbol.for("react.block"):60121,d8=Ot?Symbol.for("react.fundamental"):60117,u8=Ot?Symbol.for("react.responder"):60118,h8=Ot?Symbol.for("react.scope"):60119;function yr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Hp:switch(e=e.type,e){case Vp:case kd:case xd:case yd:case vd:case Sd:return e;default:switch(e=e&&e.$$typeof,e){case wd:case Cd:case jd:case Ad:case bd:return e;default:return t}}case Bp:return t}}}function uy(e){return yr(e)===kd}st.AsyncMode=Vp;st.ConcurrentMode=kd;st.ContextConsumer=wd;st.ContextProvider=bd;st.Element=Hp;st.ForwardRef=Cd;st.Fragment=xd;st.Lazy=jd;st.Memo=Ad;st.Portal=Bp;st.Profiler=yd;st.StrictMode=vd;st.Suspense=Sd;st.isAsyncMode=function(e){return uy(e)||yr(e)===Vp};st.isConcurrentMode=uy;st.isContextConsumer=function(e){return yr(e)===wd};st.isContextProvider=function(e){return yr(e)===bd};st.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Hp};st.isForwardRef=function(e){return yr(e)===Cd};st.isFragment=function(e){return yr(e)===xd};st.isLazy=function(e){return yr(e)===jd};st.isMemo=function(e){return yr(e)===Ad};st.isPortal=function(e){return yr(e)===Bp};st.isProfiler=function(e){return yr(e)===yd};st.isStrictMode=function(e){return yr(e)===vd};st.isSuspense=function(e){return yr(e)===Sd};st.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xd||e===kd||e===yd||e===vd||e===Sd||e===l8||typeof e=="object"&&e!==null&&(e.$$typeof===jd||e.$$typeof===Ad||e.$$typeof===bd||e.$$typeof===wd||e.$$typeof===Cd||e.$$typeof===d8||e.$$typeof===u8||e.$$typeof===h8||e.$$typeof===c8)};st.typeOf=yr;dy.exports=st;var f8=dy.exports;function Nd(e,t){if(e==null)return{};var r={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;r[s]=e[s]}return r}var hy=f8,p8={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},g8={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},fy={};fy[hy.ForwardRef]=p8;fy[hy.Memo]=g8;var Au=1073741823,cm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:{};function m8(){var e="__global_unique_id__";return cm[e]=(cm[e]||0)+1}function x8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function v8(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 y8(e){return Array.isArray(e)?e[0]:e}function b8(e,t){var r,s,o="__create-react-context-"+m8()+"__",c=function(v){li(C,v);function C(){for(var L,P=arguments.length,z=new Array(P),M=0;M"u"&&(qs=Xp);function R8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var _8=qs(function(e,t){var r=e.innerRef,s=e.navigate,o=e.onClick,c=Nd(e,["innerRef","navigate","onClick"]),p=c.target,v=Bt({},c,{onClick:function(A){try{o&&o(A)}catch(L){throw A.preventDefault(),L}!A.defaultPrevented&&A.button===0&&(!p||p==="_self")&&!R8(A)&&(A.preventDefault(),s())}});return Xp!==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?_8:r,o=e.replace,c=e.to,p=e.innerRef,v=Nd(e,["component","replace","to","innerRef"]);return ge.createElement(vn.Consumer,null,function(C){C||Nn();var A=C.history,L=Kh(Qh(c,C.location),C.location),P=L?A.createHref(L):"",z=Bt({},v,{href:P,navigate:function(){var H=Qh(c,C.location),B=ar(C.location)===ar(Kh(H)),q=o||B?A.replace:A.push;q(H)}});return Xp!==qs?z.ref=t||p:z.innerRef=p,ge.createElement(s,z)})}),xy=function(t){return t},Tc=ge.forwardRef;typeof Tc>"u"&&(Tc=xy);function M8(){for(var e=arguments.length,t=new Array(e),r=0;rtypeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,oa=()=>{const e=Object.create(null);return(t,r,...s)=>{const o=(c=>JSON.stringify(c,I8))(t);return o in e?e[o]:e[o]=r(t,...s)}},Xn=Symbol.for("sxs.internal"),Yp=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),xm=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:z8}=Object.prototype,Jh=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),F8=/\s+(?![^()]*\))/,gs=e=>t=>e(...typeof t=="string"?String(t).split(F8):[t]),vm={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:gs((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:gs((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:gs((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:gs((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:gs((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:gs((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},Eu=/([\d.]+)([^]*)/,D8=(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,H8=(e,t)=>e in B8&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(r,s,o,c)=>s+(o==="stretch"?`-moz-available${c};${Jh(e)}:${s}-webkit-fill-available`:`-moz-fit-content${c};${Jh(e)}:${s}fit-content`)+c):String(t),B8={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},Mi=e=>e?e+"-":"",vy=(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==="$"?Mi(t)+(v.includes("$")?"":Mi(r))+v.replace(/\$/g,"-"):v)+")"+(o||p=="--"?"*"+(o||"")+(c||"1")+")":"")),V8=/\s*,\s*(?![^()]*\))/,W8=Object.prototype.toString,Rs=(e,t,r,s,o)=>{let c,p,v;const C=(A,L,P)=>{let z,M;const H=B=>{for(z in B){const V=z.charCodeAt(0)===64,_=V&&Array.isArray(B[z])?B[z]:[B[z]];for(M of _){const K=/[A-Z]/.test(W=z)?W:W.replace(/-[^]/g,X=>X[1].toUpperCase()),ee=typeof M=="object"&&M&&M.toString===W8&&(!s.utils[K]||!L.length);if(K in s.utils&&!ee){const X=s.utils[K];if(X!==p){p=X,H(X(M)),p=null;continue}}else if(K in vm){const X=vm[K];if(X!==v){v=X,H(X(M)),v=null;continue}}if(V&&(q=z.slice(1)in s.media?"@media "+s.media[z.slice(1)]:z,z=q.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(X,Q,J,fe,le,Ne)=>{const ve=Eu.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(Eu,(qe,it,de)=>Number(it)+Le*(J===">"?1:-1)+de):Re)+(le?") and ("+(le[0]===">"?"min-":"max-")+Fe+":"+(le.length===1?Ne.replace(Eu,(qe,it,de)=>Number(it)+Le*(le===">"?-1:1)+de):Ne):"")+")"})),ee){const X=V?P.concat(z):[...P],Q=V?[...L]:D8(L,z.split(V8));c!==void 0&&o(ym(...c)),c=void 0,C(M,Q,X)}else c===void 0&&(c=[[],L,P]),z=V||z.charCodeAt(0)!==36?z:`--${Mi(s.prefix)}${z.slice(1).replace(/\$/g,"-")}`,M=ee?M:typeof M=="number"?M&&K in $8?String(M)+"px":String(M):vy(H8(K,M??""),s.prefix,s.themeMap[K]),c[0].push(`${V?`${z} `:`${Jh(z)}:`}${M}`)}}var q,W};H(A),c!==void 0&&o(ym(...c)),c=void 0};C(e,t,r)},ym=(e,t,r)=>`${r.map(s=>`${s}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(r.length?r.length+1:0).join("}")}`,$8={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},bm=e=>String.fromCharCode(e+(e>25?39:97)),Yn=e=>(t=>{let r,s="";for(r=Math.abs(t);r>52;r=r/52|0)s=bm(r%52)+s;return bm(r%52)+s})(((t,r)=>{let s=r.length;for(;s;)t=33*t^r.charCodeAt(--s);return t})(5381,JSON.stringify(e))>>>0),za=["themed","global","styled","onevar","resonevar","allvar","inline"],X8=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},Y8=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(X8(v)){for(let C=0,A=v.cssRules;A[C];++C){const L=Object(A[C]);if(L.type!==1)continue;const P=Object(A[C+1]);if(P.type!==4)continue;++C;const{cssText:z}=L;if(!z.startsWith("--sxs"))continue;const M=z.slice(14,-3).trim().split(/\s+/),H=za[M[0]];H&&(t||(t={sheet:v,reset:s,rules:{},toString:r}),t.rules[H]={group:P,index:C,cache:new Set(M)})}if(t)break}if(!t){const v=(C,A)=>({type:A,cssRules:[],insertRule(L,P){this.cssRules.splice(P,0,v(L,{import:3,undefined:1}[(L.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return C==="@media{}"?`@media{${[].map.call(this.cssRules,L=>L.cssText).join("")}}`:C}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:v("","text/css"),rules:{},reset:s,toString:r}}const{sheet:c,rules:p}=t;for(let v=za.length-1;v>=0;--v){const C=za[v];if(!p[C]){const A=za[v+1],L=p[A]?p[A].index:c.cssRules.length;c.insertRule("@media{}",L),c.insertRule(`--sxs{--sxs:${v}}`,L),p[C]={group:c.cssRules[L+1],index:L,cache:new Set([v])}}U8(p[C])}};return s(),t},U8=e=>{const t=e.group;let r=t.cssRules.length;e.apply=s=>{try{t.insertRule(s,r),++r}catch{}}},Sa=Symbol(),G8=oa(),wm=(e,t)=>G8(e,()=>(...r)=>{let s={type:null,composers:new Set};for(const o of r)if(o!=null)if(o[Xn]){s.type==null&&(s.type=o[Xn].type);for(const c of o[Xn].composers)s.composers.add(c)}else o.constructor!==Object||o.$$typeof?s.type==null&&(s.type=o):s.composers.add(Z8(o,e));return s.type==null&&(s.type="span"),s.composers.size||s.composers.add(["PJLV",{},[],[],{},[]]),q8(e,s,t)}),Z8=({variants:e,compoundVariants:t,defaultVariants:r,...s},o)=>{const c=`${Mi(o.prefix)}c-${Yn(s)}`,p=[],v=[],C=Object.create(null),A=[];for(const z in r)C[z]=String(r[z]);if(typeof e=="object"&&e)for(const z in e){L=C,P=z,z8.call(L,P)||(C[z]="undefined");const M=e[z];for(const H in M){const B={[z]:String(H)};String(H)==="undefined"&&A.push(z);const q=M[H],W=[B,q,!xm(q)];p.push(W)}}var L,P;if(typeof t=="object"&&t)for(const z of t){let{css:M,...H}=z;M=typeof M=="object"&&M||{};for(const q in H)H[q]=String(H[q]);const B=[H,M,!xm(M)];v.push(B)}return[c,s,p,v,C,A]},q8=(e,t,r)=>{const[s,o,c,p]=Q8(t.composers),v=typeof t.type=="function"||t.type.$$typeof?(P=>{function z(){for(let M=0;Mz.rules[M]={apply:H=>z[Sa].push([M,H])}),z})(r):null,C=(v||r).rules,A=`.${s}${o.length>1?`:where(.${o.slice(1).join(".")})`:""}`,L=P=>{P=typeof P=="object"&&P||K8;const{css:z,...M}=P,H={};for(const W in c)if(delete M[W],W in P){let V=P[W];typeof V=="object"&&V?H[W]={"@initial":c[W],...V}:(V=String(V),H[W]=V!=="undefined"||p.has(W)?V:c[W])}else H[W]=c[W];const B=new Set([...o]);for(const[W,V,_,K]of t.composers){r.rules.styled.cache.has(W)||(r.rules.styled.cache.add(W),Rs(V,[`.${W}`],[],e,Q=>{C.styled.apply(Q)}));const ee=km(_,H,e.media),X=km(K,H,e.media,!0);for(const Q of ee)if(Q!==void 0)for(const[J,fe,le]of Q){const Ne=`${W}-${Yn(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),Rs(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}-${Yn(fe)}-${J}`;B.add(le),r.rules.allvar.cache.has(le)||(r.rules.allvar.cache.add(le),Rs(fe,[`.${le}`],[],e,Ne=>{C.allvar.apply(Ne)}))}}if(typeof z=="object"&&z){const W=`${s}-i${Yn(z)}-css`;B.add(W),r.rules.inline.cache.has(W)||(r.rules.inline.cache.add(W),Rs(z,[`.${W}`],[],e,V=>{C.inline.apply(V)}))}for(const W of String(P.className||"").trim().split(/\s+/))W&&B.add(W);const q=M.className=[...B].join(" ");return{type:t.type,className:q,selector:A,props:M,toString:()=>q,deferredInjector:v}};return Yp(L,{className:s,selector:A,[Xn]:t,toString:()=>(r.rules.styled.cache.has(s)||L(),s)})},Q8=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)]},km=(e,t,r,s)=>{const o=[];e:for(let[c,p,v]of e){if(v)continue;let C,A=0,L=!1;for(C in c){const P=c[C];let z=t[C];if(z!==P){if(typeof z!="object"||!z)continue e;{let M,H,B=0;for(const q in z){if(P===String(z[q])){if(q!=="@initial"){const W=q.slice(1);(H=H||[]).push(W in r?r[W]:q.replace(/^@media ?/,"")),L=!0}A+=B,M=!0}++B}if(H&&H.length&&(p={["@media "+H.join(", ")]:p}),!M)continue e}}}(o[A]=o[A]||[]).push([s?"cv":`${C}-${c[C]}`,p,L])}return o},K8={},J8=oa(),e7=(e,t)=>J8(e,()=>(...r)=>{const s=()=>{for(let o of r){o=typeof o=="object"&&o||{};let c=Yn(o);if(!t.rules.global.cache.has(c)){if(t.rules.global.cache.add(c),"@import"in o){let p=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let v of[].concat(o["@import"]))v=v.includes('"')||v.includes("'")?v:`"${v}"`,t.sheet.insertRule(`@import ${v};`,p++);delete o["@import"]}Rs(o,[],[],e,p=>{t.rules.global.apply(p)})}}return""};return Yp(s,{toString:s})}),t7=oa(),r7=(e,t)=>t7(e,()=>r=>{const s=`${Mi(e.prefix)}k-${Yn(r)}`,o=()=>{if(!t.rules.global.cache.has(s)){t.rules.global.cache.add(s);const c=[];Rs(r,[],[],e,v=>c.push(v));const p=`@keyframes ${s}{${c.join("")}}`;t.rules.global.apply(p)}return s};return Yp(o,{get name(){return o()},toString:o})}),i7=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"--"+Mi(this.prefix)+Mi(this.scale)+this.token}toString(){return this.computedValue}},n7=oa(),s7=(e,t)=>n7(e,()=>(r,s)=>{s=typeof r=="object"&&r||Object(s);const o=`.${r=(r=typeof r=="string"?r:"")||`${Mi(e.prefix)}t-${Yn(s)}`}`,c={},p=[];for(const C in s){c[C]={};for(const A in s[C]){const L=`--${Mi(e.prefix)}${C}-${A}`,P=vy(String(s[C][A]),e.prefix,C);c[C][A]=new i7(A,P,C,e.prefix),p.push(`${L}:${P}`)}}const v=()=>{if(p.length&&!t.rules.themed.cache.has(r)){t.rules.themed.cache.add(r);const C=`${s===e.theme?":root,":""}.${r}{${p.join(";")}}`;t.rules.themed.apply(C)}return r};return{...c,get className(){return v()},selector:o,toString:v}}),a7=oa(),Cm,o7=oa(),Up=e=>{const t=(r=>{let s=!1;const o=a7(r,c=>{s=!0;const p="prefix"in(c=typeof c=="object"&&c||{})?String(c.prefix):"",v=typeof c.media=="object"&&c.media||{},C=typeof c.root=="object"?c.root||null:globalThis.document||null,A=typeof c.theme=="object"&&c.theme||{},L={prefix:p,media:v,theme:A,themeMap:typeof c.themeMap=="object"&&c.themeMap||{...O8},utils:typeof c.utils=="object"&&c.utils||{}},P=Y8(C),z={css:wm(L,P),globalCss:e7(L,P),keyframes:r7(L,P),createTheme:s7(L,P),reset(){P.reset(),z.theme.toString()},theme:{},sheet:P,config:L,prefix:p,getCssText:P.toString,toString:P.toString};return String(z.theme=z.createTheme(A)),z});return s||o.reset(),o})(e);return t.styled=(({config:r,sheet:s})=>o7(r,()=>{const o=wm(r,s);return(...c)=>{const p=o(...c),v=p[Xn].type,C=ge.forwardRef((A,L)=>{const P=A&&A.as||v,{props:z,deferredInjector:M}=p(A);return delete z.as,z.ref=L,M?ge.createElement(ge.Fragment,null,ge.createElement(P,z),ge.createElement(M,null)):ge.createElement(P,z)});return C.className=p.className,C.displayName=`Styled.${v.displayName||v.name||v}`,C.selector=p.selector,C.toString=()=>p.selector,C[Xn]=p[Xn],C}}))(t),t},yy=()=>Cm||(Cm=Up()),l7=(...e)=>yy().createTheme(...e),c7=(...e)=>yy().css(...e);const{styled:bt,css:HL}=Up({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 Bo=e=>e.type==="checkbox",_s=e=>e instanceof Date,Kt=e=>e==null;const by=e=>typeof e=="object";var At=e=>!Kt(e)&&!Array.isArray(e)&&by(e)&&!_s(e),d7=e=>At(e)&&e.target?Bo(e.target)?e.target.checked:e.target.value:e,u7=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,h7=(e,t)=>e.has(u7(t)),f7=e=>{const t=e.constructor&&e.constructor.prototype;return At(t)&&t.hasOwnProperty("isPrototypeOf")},Gp=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function br(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(!(Gp&&(e instanceof Blob||e instanceof FileList))&&(r||At(e)))if(t=r?[]:{},!r&&!f7(e))t=e;else for(const s in e)e.hasOwnProperty(s)&&(t[s]=br(e[s]));else return e;return t}var Vo=e=>Array.isArray(e)?e.filter(Boolean):[],vt=e=>e===void 0,Ee=(e,t,r)=>{if(!t||!At(e))return r;const s=Vo(t.split(/[,[\].]+?/)).reduce((o,c)=>Kt(o)?o:o[c],e);return vt(s)||s===e?vt(e[t])?r:e[t]:s},Ci=e=>typeof e=="boolean";const Sm={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Wr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},xi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ge.createContext(null);var p7=(e,t,r,s=!0)=>{const o={defaultValues:t._defaultValues};for(const c in e)Object.defineProperty(o,c,{get:()=>{const p=c;return t._proxyFormState[p]!==Wr.all&&(t._proxyFormState[p]=!s||Wr.all),e[p]}});return o},kr=e=>At(e)&&!Object.keys(e).length,g7=(e,t,r,s)=>{r(e);const{name:o,...c}=e;return kr(c)||Object.keys(c).length>=Object.keys(t).length||Object.keys(c).find(p=>t[p]===Wr.all)},Lu=e=>Array.isArray(e)?e:[e];function m7(e){const t=ge.useRef(e);t.current=e,ge.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var ii=e=>typeof e=="string",x7=(e,t,r,s,o)=>ii(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),Zp=e=>/^\w*$/.test(e),wy=e=>Vo(e.replace(/["|']|\]/g,"").split(/\.|\[/)),dt=(e,t,r)=>{let s=-1;const o=Zp(t)?[t]:wy(t),c=o.length,p=c-1;for(;++st?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[s]:o||!0}}:{},Am=e=>({isOnSubmit:!e||e===Wr.onSubmit,isOnBlur:e===Wr.onBlur,isOnChange:e===Wr.onChange,isOnAll:e===Wr.all,isOnTouch:e===Wr.onTouched}),jm=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Qa=(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;Qa(v,t)}else At(v)&&Qa(v,t)}}};var y7=(e,t,r)=>{const s=Vo(Ee(e,r));return dt(s,"root",t[r]),dt(e,r,s),e},qp=e=>e.type==="file",nn=e=>typeof e=="function",Rc=e=>{if(!Gp)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Yl=e=>ii(e),Qp=e=>e.type==="radio",_c=e=>e instanceof RegExp;const Nm={value:!1,isValid:!1},Em={value:!0,isValid:!0};var ky=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===""?Em:{value:e[0].value,isValid:!0}:Em:Nm}return Nm};const Lm={isValid:!1,value:null};var Cy=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Lm):Lm;function Pm(e,t,r="validate"){if(Yl(e)||Array.isArray(e)&&e.every(Yl)||Ci(e)&&!e)return{type:r,message:Yl(e)?e:"",ref:t}}var ms=e=>At(e)&&!_c(e)?e:{value:e,message:""},Tm=async(e,t,r,s,o)=>{const{ref:c,refs:p,required:v,maxLength:C,minLength:A,min:L,max:P,pattern:z,validate:M,name:H,valueAsNumber:B,mount:q,disabled:W}=e._f,V=Ee(t,H);if(!q||W)return{};const _=p?p[0]:c,K=ve=>{s&&_.reportValidity&&(_.setCustomValidity(Ci(ve)?"":ve||""),_.reportValidity())},ee={},X=Qp(c),Q=Bo(c),J=X||Q,fe=(B||qp(c))&&vt(c.value)&&vt(V)||Rc(c)&&c.value===""||V===""||Array.isArray(V)&&!V.length,le=v7.bind(null,H,r,ee),Ne=(ve,Le,Fe,Re=xi.maxLength,qe=xi.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||Kt(V))||Ci(V)&&!V||Q&&!ky(p).isValid||X&&!Cy(p).isValid)){const{value:ve,message:Le}=Yl(v)?{value:!!v,message:v}:ms(v);if(ve&&(ee[H]={type:xi.required,message:Le,ref:_,...le(xi.required,Le)},!r))return K(Le),ee}if(!fe&&(!Kt(L)||!Kt(P))){let ve,Le;const Fe=ms(P),Re=ms(L);if(!Kt(V)&&!isNaN(V)){const qe=c.valueAsNumber||V&&+V;Kt(Fe.value)||(ve=qe>Fe.value),Kt(Re.value)||(Le=qenew Date(new Date().toDateString()+" "+oe),de=c.type=="time",ce=c.type=="week";ii(Fe.value)&&V&&(ve=de?it(V)>it(Fe.value):ce?V>Fe.value:qe>new Date(Fe.value)),ii(Re.value)&&V&&(Le=de?it(V)+ve.value,Re=!Kt(Le.value)&&V.length<+Le.value;if((Fe||Re)&&(Ne(Fe,ve.message,Le.message),!r))return K(ee[H].message),ee}if(z&&!fe&&ii(V)){const{value:ve,message:Le}=ms(z);if(_c(ve)&&!V.match(ve)&&(ee[H]={type:xi.pattern,message:Le,ref:c,...le(xi.pattern,Le)},!r))return K(Le),ee}if(M){if(nn(M)){const ve=await M(V,t),Le=Pm(ve,_);if(Le&&(ee[H]={...Le,...le(xi.validate,Le.message)},!r))return K(Le.message),ee}else if(At(M)){let ve={};for(const Le in M){if(!kr(ve)&&!r)break;const Fe=Pm(await M[Le](V,t),_,Le);Fe&&(ve={...Fe,...le(Le,Fe.message)},K(Fe.message),r&&(ee[H]=ve))}if(!kr(ve)&&(ee[H]={ref:_,...ve},!r))return ee}}return K(!0),ee};function b7(e,t){const r=t.slice(0,-1).length;let s=0;for(;s{let e=[];return{get observers(){return e},next:o=>{for(const c of e)c.next&&c.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(c=>c!==o)}}),unsubscribe:()=>{e=[]}}},Mc=e=>Kt(e)||!by(e);function Bn(e,t){if(Mc(e)||Mc(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)?!Bn(c,p):c!==p)return!1}}return!0}var Sy=e=>e.type==="select-multiple",k7=e=>Qp(e)||Bo(e),Tu=e=>Rc(e)&&e.isConnected,C7=e=>At(e)&&Object.values(e).some(t=>t),Ay=e=>{for(const t in e)if(nn(e[t]))return!0;return!1};function Oc(e,t={}){const r=Array.isArray(e);if(At(e)||r)for(const s in e)Array.isArray(e[s])||At(e[s])&&!Ay(e[s])?(t[s]=Array.isArray(e[s])?[]:{},Oc(e[s],t[s])):Kt(e[s])||(t[s]=!0);return t}function jy(e,t,r){const s=Array.isArray(e);if(At(e)||s)for(const o in e)Array.isArray(e[o])||At(e[o])&&!Ay(e[o])?vt(t)||Mc(r[o])?r[o]=Array.isArray(e[o])?Oc(e[o],[]):{...Oc(e[o])}:jy(e[o],Kt(t)?{}:t[o],r[o]):r[o]=!Bn(e[o],t[o]);return r}var Cl=(e,t)=>jy(e,t,Oc(t)),Ny=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:s})=>vt(e)?e:t?e===""?NaN:e&&+e:r&&ii(e)?new Date(e):s?s(e):e;function Ru(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return qp(t)?t.files:Qp(t)?Cy(e.refs).value:Sy(t)?[...t.selectedOptions].map(({value:r})=>r):Bo(t)?ky(e.refs).value:Ny(vt(t.value)?e.ref.value:t.value,e)}var S7=(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}},Aa=e=>vt(e)?e:_c(e)?e.source:At(e)?_c(e.value)?e.value.source:e.value:e,A7=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Rm(e,t,r){const s=Ee(e,r);if(s||Zp(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 j7=(e,t,r,s,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?s.isOnBlur:o.isOnBlur)?!e:(r?s.isOnChange:o.isOnChange)?e:!0,N7=(e,t)=>!Vo(Ee(e,t)).length&&Rt(e,t);const E7={mode:Wr.onSubmit,reValidateMode:Wr.onChange,shouldFocusError:!0};function L7(e={}){let t={...E7,...e},r={submitCount:0,isDirty:!1,isLoading:nn(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)?br(t.defaultValues||t.values)||{}:{},c=t.shouldUnregister?{}:br(o),p={action:!1,mount:!1,watch:!1},v={mount:new Set,unMount:new Set,array:new Set,watch:new Set},C,A=0;const L={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},P={values:Pu(),array:Pu(),state:Pu()},z=Am(t.mode),M=Am(t.reValidateMode),H=t.criteriaMode===Wr.all,B=Z=>re=>{clearTimeout(A),A=setTimeout(Z,re)},q=async Z=>{if(L.isValid||Z){const re=t.resolver?kr((await J()).errors):await le(s,!0);re!==r.isValid&&P.state.next({isValid:re})}},W=(Z,re)=>{(L.isValidating||L.validatingFields)&&(re.forEach(se=>{dt(r.validatingFields,se,Z)}),r.isValidating=C7(r.validatingFields),P.state.next({validatingFields:r.validatingFields,isValidating:r.isValidating}))},V=(Z,re=[],se,be,xe=!0,pe=!0)=>{if(be&&se){if(p.action=!0,pe&&Array.isArray(Ee(s,Z))){const Te=se(Ee(s,Z),be.argA,be.argB);xe&&dt(s,Z,Te)}if(pe&&Array.isArray(Ee(r.errors,Z))){const Te=se(Ee(r.errors,Z),be.argA,be.argB);xe&&dt(r.errors,Z,Te),N7(r.errors,Z)}if(L.touchedFields&&pe&&Array.isArray(Ee(r.touchedFields,Z))){const Te=se(Ee(r.touchedFields,Z),be.argA,be.argB);xe&&dt(r.touchedFields,Z,Te)}L.dirtyFields&&(r.dirtyFields=Cl(o,c)),P.state.next({name:Z,isDirty:ve(Z,re),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else dt(c,Z,re)},_=(Z,re)=>{dt(r.errors,Z,re),P.state.next({errors:r.errors})},K=Z=>{r.errors=Z,P.state.next({errors:r.errors,isValid:!1})},ee=(Z,re,se,be)=>{const xe=Ee(s,Z);if(xe){const pe=Ee(c,Z,vt(se)?Ee(o,Z):se);vt(pe)||be&&be.defaultChecked||re?dt(c,Z,re?pe:Ru(xe._f)):Re(Z,pe),p.mount&&q()}},X=(Z,re,se,be,xe)=>{let pe=!1,Te=!1;const et={name:Z},wt=!!(Ee(s,Z)&&Ee(s,Z)._f.disabled);if(!se||be){L.isDirty&&(Te=r.isDirty,r.isDirty=et.isDirty=ve(),pe=Te!==et.isDirty);const Pt=wt||Bn(Ee(o,Z),re);Te=!!(!wt&&Ee(r.dirtyFields,Z)),Pt||wt?Rt(r.dirtyFields,Z):dt(r.dirtyFields,Z,!0),et.dirtyFields=r.dirtyFields,pe=pe||L.dirtyFields&&Te!==!Pt}if(se){const Pt=Ee(r.touchedFields,Z);Pt||(dt(r.touchedFields,Z,se),et.touchedFields=r.touchedFields,pe=pe||L.touchedFields&&Pt!==se)}return pe&&xe&&P.state.next(et),pe?et:{}},Q=(Z,re,se,be)=>{const xe=Ee(r.errors,Z),pe=L.isValid&&Ci(re)&&r.isValid!==re;if(e.delayError&&se?(C=B(()=>_(Z,se)),C(e.delayError)):(clearTimeout(A),C=null,se?dt(r.errors,Z,se):Rt(r.errors,Z)),(se?!Bn(xe,se):xe)||!kr(be)||pe){const Te={...be,...pe&&Ci(re)?{isValid:re}:{},errors:r.errors,name:Z};r={...r,...Te},P.state.next(Te)}W(!1,Object.keys(r.validatingFields).filter(Te=>Te===Z))},J=async Z=>t.resolver(c,t.context,S7(Z||v.mount,s,t.criteriaMode,t.shouldUseNativeValidation)),fe=async Z=>{const{errors:re}=await J(Z);if(Z)for(const se of Z){const be=Ee(re,se);be?dt(r.errors,se,be):Rt(r.errors,se)}else r.errors=re;return re},le=async(Z,re,se={valid:!0})=>{for(const be in Z){const xe=Z[be];if(xe){const{_f:pe,...Te}=xe;if(pe){const et=v.array.has(pe.name),wt=await Tm(xe,c,H,t.shouldUseNativeValidation&&!re,et);if(wt[pe.name]&&(se.valid=!1,re))break;!re&&(Ee(wt,pe.name)?et?y7(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 Z of v.unMount){const re=Ee(s,Z);re&&(re._f.refs?re._f.refs.every(se=>!Tu(se)):!Tu(re._f.ref))&&Be(Z)}v.unMount=new Set},ve=(Z,re)=>(Z&&re&&dt(c,Z,re),!Bn(Ae(),o)),Le=(Z,re,se)=>x7(Z,v,{...p.mount?c:vt(re)?o:ii(Z)?{[Z]:re}:re},se,re),Fe=Z=>Vo(Ee(p.mount?c:o,Z,e.shouldUnregister?Ee(o,Z,[]):[])),Re=(Z,re,se={})=>{const be=Ee(s,Z);let xe=re;if(be){const pe=be._f;pe&&(!pe.disabled&&dt(c,Z,Ny(re,pe)),xe=Rc(pe.ref)&&Kt(re)?"":re,Sy(pe.ref)?[...pe.ref.options].forEach(Te=>Te.selected=xe.includes(Te.value)):pe.refs?Bo(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):qp(pe.ref)?pe.ref.value="":(pe.ref.value=xe,pe.ref.type||P.values.next({name:Z,values:{...c}})))}(se.shouldDirty||se.shouldTouch)&&X(Z,xe,se.shouldTouch,se.shouldDirty,!0),se.shouldValidate&&oe(Z)},qe=(Z,re,se)=>{for(const be in re){const xe=re[be],pe=`${Z}.${be}`,Te=Ee(s,pe);(v.array.has(Z)||!Mc(xe)||Te&&!Te._f)&&!_s(xe)?qe(pe,xe,se):Re(pe,xe,se)}},it=(Z,re,se={})=>{const be=Ee(s,Z),xe=v.array.has(Z),pe=br(re);dt(c,Z,pe),xe?(P.array.next({name:Z,values:{...c}}),(L.isDirty||L.dirtyFields)&&se.shouldDirty&&P.state.next({name:Z,dirtyFields:Cl(o,c),isDirty:ve(Z,pe)})):be&&!be._f&&!Kt(pe)?qe(Z,pe,se):Re(Z,pe,se),jm(Z,v)&&P.state.next({...r}),P.values.next({name:p.mount?Z:void 0,values:{...c}})},de=async Z=>{const re=Z.target;let se=re.name,be=!0;const xe=Ee(s,se),pe=()=>re.type?Ru(xe._f):d7(Z),Te=et=>{be=Number.isNaN(et)||et===Ee(c,se,et)};if(xe){let et,wt;const Pt=pe(),Bi=Z.type===Sm.BLUR||Z.type===Sm.FOCUS_OUT,Jo=!A7(xe._f)&&!t.resolver&&!Ee(r.errors,se)&&!xe._f.deps||j7(Bi,Ee(r.touchedFields,se),r.isSubmitted,M,z),hs=jm(se,v,Bi);dt(c,se,Pt),Bi?(xe._f.onBlur&&xe._f.onBlur(Z),C&&C(0)):xe._f.onChange&&xe._f.onChange(Z);const pa=X(se,Pt,Bi,!1),el=!kr(pa)||hs;if(!Bi&&P.values.next({name:se,type:Z.type,values:{...c}}),Jo)return L.isValid&&q(),el&&P.state.next({name:se,...hs?{}:pa});if(!Bi&&hs&&P.state.next({...r}),W(!0,[se]),t.resolver){const{errors:tl}=await J([se]);if(Te(Pt),be){const rl=Rm(r.errors,s,se),il=Rm(tl,s,rl.name||se);et=il.error,se=il.name,wt=kr(tl)}}else et=(await Tm(xe,c,H,t.shouldUseNativeValidation))[se],Te(Pt),be&&(et?wt=!1:L.isValid&&(wt=await le(s,!0)));be&&(xe._f.deps&&oe(xe._f.deps),Q(se,wt,et,pa))}},ce=(Z,re)=>{if(Ee(r.errors,re)&&Z.focus)return Z.focus(),1},oe=async(Z,re={})=>{let se,be;const xe=Lu(Z);if(W(!0,xe),t.resolver){const pe=await fe(vt(Z)?Z:xe);se=kr(pe),be=Z?!xe.some(Te=>Ee(pe,Te)):se}else Z?(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)&&q()):be=se=await le(s);return P.state.next({...!ii(Z)||L.isValid&&se!==r.isValid?{}:{name:Z},...t.resolver||!Z?{isValid:se}:{},errors:r.errors,isValidating:!1}),re.shouldFocus&&!be&&Qa(s,ce,Z?xe:v.mount),be},Ae=Z=>{const re={...o,...p.mount?c:{}};return vt(Z)?re:ii(Z)?Ee(re,Z):Z.map(se=>Ee(re,se))},je=(Z,re)=>({invalid:!!Ee((re||r).errors,Z),isDirty:!!Ee((re||r).dirtyFields,Z),isTouched:!!Ee((re||r).touchedFields,Z),isValidating:!!Ee((re||r).validatingFields,Z),error:Ee((re||r).errors,Z)}),ze=Z=>{Z&&Lu(Z).forEach(re=>Rt(r.errors,re)),P.state.next({errors:Z?r.errors:{}})},Ue=(Z,re,se)=>{const be=(Ee(s,Z,{_f:{}})._f||{}).ref;dt(r.errors,Z,{...re,ref:be}),P.state.next({name:Z,errors:r.errors,isValid:!1}),se&&se.shouldFocus&&be&&be.focus&&be.focus()},He=(Z,re)=>nn(Z)?P.values.subscribe({next:se=>Z(Le(void 0,re),se)}):Le(Z,re,!0),Be=(Z,re={})=>{for(const se of Z?Lu(Z):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&&q()},Me=({disabled:Z,name:re,field:se,fields:be,value:xe})=>{if(Ci(Z)){const pe=Z?void 0:vt(xe)?Ru(se?se._f:Ee(be,re)._f):xe;dt(c,re,pe),X(re,pe,!1,!1,!0)}},Nt=(Z,re={})=>{let se=Ee(s,Z);const be=Ci(re.disabled);return dt(s,Z,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:Z}},name:Z,mount:!0,...re}}),v.mount.add(Z),se?Me({field:se,disabled:re.disabled,name:Z,value:re.value}):ee(Z,!0,re.value),{...be?{disabled:re.disabled}:{},...t.progressive?{required:!!re.required,min:Aa(re.min),max:Aa(re.max),minLength:Aa(re.minLength),maxLength:Aa(re.maxLength),pattern:Aa(re.pattern)}:{},name:Z,onChange:de,onBlur:de,ref:xe=>{if(xe){Nt(Z,re),se=Ee(s,Z);const pe=vt(xe.value)&&xe.querySelectorAll&&xe.querySelectorAll("input,select,textarea")[0]||xe,Te=k7(pe),et=se._f.refs||[];if(Te?et.find(wt=>wt===pe):pe===se._f.ref)return;dt(s,Z,{_f:{...se._f,...Te?{refs:[...et.filter(Tu),pe,...Array.isArray(Ee(o,Z))?[{}]:[]],ref:{type:pe.type,name:Z}}:{ref:pe}}}),ee(Z,!1,void 0,pe)}else se=Ee(s,Z,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||re.shouldUnregister)&&!(h7(v.array,Z)&&p.action)&&v.unMount.add(Z)}}},hr=()=>t.shouldFocusError&&Qa(s,ce,v.mount),ds=Z=>{Ci(Z)&&(P.state.next({disabled:Z}),Qa(s,(re,se)=>{let be=Z;const xe=Ee(s,se);xe&&Ci(xe._f.disabled)&&(be||(be=xe._f.disabled)),re.disabled=be},0,!1))},Hi=(Z,re)=>async se=>{let be;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let xe=br(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"),kr(r.errors)){P.state.next({errors:{}});try{await Z(xe,se)}catch(pe){be=pe}}else re&&await re({...r.errors},se),hr(),setTimeout(hr);if(P.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:kr(r.errors)&&!be,submitCount:r.submitCount+1,errors:r.errors}),be)throw be},Qo=(Z,re={})=>{Ee(s,Z)&&(vt(re.defaultValue)?it(Z,br(Ee(o,Z))):(it(Z,re.defaultValue),dt(o,Z,br(re.defaultValue))),re.keepTouched||Rt(r.touchedFields,Z),re.keepDirty||(Rt(r.dirtyFields,Z),r.isDirty=re.defaultValue?ve(Z,br(Ee(o,Z))):ve()),re.keepError||(Rt(r.errors,Z),L.isValid&&q()),P.state.next({...r}))},fa=(Z,re={})=>{const se=Z?br(Z):o,be=br(se),xe=kr(Z),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(Gp&&vt(Z))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(Rc(wt)){const Pt=wt.closest("form");if(Pt){Pt.reset();break}}}}s={}}c=e.shouldUnregister?re.keepDefaultValues?br(o):{}:br(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=!L.isValid||!!re.keepIsValid||!!re.keepDirtyValues,p.watch=!!e.shouldUnregister,P.state.next({submitCount:re.keepSubmitCount?r.submitCount:0,isDirty:xe?!1:re.keepDirty?r.isDirty:!!(re.keepDefaultValues&&!Bn(Z,o)),isSubmitted:re.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:xe?[]:re.keepDirtyValues?re.keepDefaultValues&&c?Cl(o,c):r.dirtyFields:re.keepDefaultValues&&Z?Cl(o,Z):{},touchedFields:re.keepTouched?r.touchedFields:{},errors:re.keepErrors?r.errors:{},isSubmitSuccessful:re.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},us=(Z,re)=>fa(nn(Z)?Z(c):Z,re);return{control:{register:Nt,unregister:Be,getFieldState:je,handleSubmit:Hi,setError:Ue,_executeSchema:J,_getWatch:Le,_getDirty:ve,_updateValid:q,_removeUnmounted:Ne,_updateFieldArray:V,_updateDisabledField:Me,_getFieldArray:Fe,_reset:fa,_resetDefaultValues:()=>nn(t.defaultValues)&&t.defaultValues().then(Z=>{us(Z,t.resetOptions),P.state.next({isLoading:!1})}),_updateFormState:Z=>{r={...r,...Z}},_disableForm:ds,_subjects:P,_proxyFormState:L,_setErrors:K,get _fields(){return s},get _formValues(){return c},get _state(){return p},set _state(Z){p=Z},get _defaultValues(){return o},get _names(){return v},set _names(Z){v=Z},get _formState(){return r},set _formState(Z){r=Z},get _options(){return t},set _options(Z){t={...t,...Z}}},trigger:oe,register:Nt,handleSubmit:Hi,watch:He,setValue:it,getValues:Ae,reset:us,resetField:Qo,clearErrors:ze,unregister:Be,setError:Ue,setFocus:(Z,re={})=>{const se=Ee(s,Z),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 P7(e={}){const t=ge.useRef(),r=ge.useRef(),[s,o]=ge.useState({isDirty:!1,isValidating:!1,isLoading:nn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:nn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...L7(e),formState:s});const c=t.current.control;return c._options=e,m7({subject:c._subjects.state,next:p=>{g7(p,c._proxyFormState,c._updateFormState)&&o({...c._formState})}}),ge.useEffect(()=>c._disableForm(e.disabled),[c,e.disabled]),ge.useEffect(()=>{if(c._proxyFormState.isDirty){const p=c._getDirty();p!==s.isDirty&&c._subjects.state.next({isDirty:p})}},[c,s.isDirty]),ge.useEffect(()=>{e.values&&!Bn(e.values,r.current)?(c._reset(e.values,c._options.resetOptions),r.current=e.values,o(p=>({...p}))):c._resetDefaultValues()},[e.values,c]),ge.useEffect(()=>{e.errors&&c._setErrors(e.errors)},[e.errors,c]),ge.useEffect(()=>{c._state.mount||(c._updateValid(),c._state.mount=!0),c._state.watch&&(c._state.watch=!1,c._subjects.state.next({...c._formState})),c._removeUnmounted()}),ge.useEffect(()=>{e.shouldUnregister&&c._subjects.values.next({values:c._getWatch()})},[e.shouldUnregister,c]),t.current.formState=p7(s,c),t.current}function T7(e){return e.replace(/\/$/,"")}const R7=T7("https://backend.captn.ai")||"http://localhost:3001",Ey={apiUrl:R7};var Ic;(function(e){e.Get="GET",e.Post="POST",e.Put="PUT",e.Delete="DELETE"})(Ic||(Ic={}));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 Ly={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",Ly);bt("textarea",Ly);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"});c7({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 Py(e,t){return function(){return e.apply(t,arguments)}}const{toString:_7}=Object.prototype,{getPrototypeOf:Kp}=Object,Pd=(e=>t=>{const r=_7.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),fi=e=>(e=e.toLowerCase(),t=>Pd(t)===e),Td=e=>t=>typeof t===e,{isArray:la}=Array,yo=Td("undefined");function M7(e){return e!==null&&!yo(e)&&e.constructor!==null&&!yo(e.constructor)&&Lr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ty=fi("ArrayBuffer");function O7(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ty(e.buffer),t}const I7=Td("string"),Lr=Td("function"),Ry=Td("number"),Rd=e=>e!==null&&typeof e=="object",z7=e=>e===!0||e===!1,Ul=e=>{if(Pd(e)!=="object")return!1;const t=Kp(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},F7=fi("Date"),D7=fi("File"),H7=fi("Blob"),B7=fi("FileList"),V7=e=>Rd(e)&&Lr(e.pipe),W7=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Lr(e.append)&&((t=Pd(e))==="formdata"||t==="object"&&Lr(e.toString)&&e.toString()==="[object FormData]"))},$7=fi("URLSearchParams"),X7=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Wo(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),la(e))for(s=0,o=e.length;s0;)if(o=r[s],t===o.toLowerCase())return o;return null}const My=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Oy=e=>!yo(e)&&e!==My;function ef(){const{caseless:e}=Oy(this)&&this||{},t={},r=(s,o)=>{const c=e&&_y(t,o)||o;Ul(t[c])&&Ul(s)?t[c]=ef(t[c],s):Ul(s)?t[c]=ef({},s):la(s)?t[c]=s.slice():t[c]=s};for(let s=0,o=arguments.length;s(Wo(t,(o,c)=>{r&&Lr(o)?e[c]=Py(o,r):e[c]=o},{allOwnKeys:s}),e),U7=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),G7=(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)},Z7=(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&&Kp(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},q7=(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},Q7=e=>{if(!e)return null;if(la(e))return e;let t=e.length;if(!Ry(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},K7=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Kp(Uint8Array)),J7=(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])}},e6=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},t6=fi("HTMLFormElement"),r6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,o){return s.toUpperCase()+o}),_m=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),i6=fi("RegExp"),Iy=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};Wo(r,(o,c)=>{let p;(p=t(o,c,e))!==!1&&(s[c]=p||o)}),Object.defineProperties(e,s)},n6=e=>{Iy(e,(t,r)=>{if(Lr(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(Lr(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+"'")})}})},s6=(e,t)=>{const r={},s=o=>{o.forEach(c=>{r[c]=!0})};return la(e)?s(e):s(String(e).split(t)),r},a6=()=>{},o6=(e,t)=>(e=+e,Number.isFinite(e)?e:t),_u="abcdefghijklmnopqrstuvwxyz",Mm="0123456789",zy={DIGIT:Mm,ALPHA:_u,ALPHA_DIGIT:_u+_u.toUpperCase()+Mm},l6=(e=16,t=zy.ALPHA_DIGIT)=>{let r="";const{length:s}=t;for(;e--;)r+=t[Math.random()*s|0];return r};function c6(e){return!!(e&&Lr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const d6=e=>{const t=new Array(10),r=(s,o)=>{if(Rd(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[o]=s;const c=la(s)?[]:{};return Wo(s,(p,v)=>{const C=r(p,o+1);!yo(C)&&(c[v]=C)}),t[o]=void 0,c}}return s};return r(e,0)},u6=fi("AsyncFunction"),h6=e=>e&&(Rd(e)||Lr(e))&&Lr(e.then)&&Lr(e.catch),ae={isArray:la,isArrayBuffer:Ty,isBuffer:M7,isFormData:W7,isArrayBufferView:O7,isString:I7,isNumber:Ry,isBoolean:z7,isObject:Rd,isPlainObject:Ul,isUndefined:yo,isDate:F7,isFile:D7,isBlob:H7,isRegExp:i6,isFunction:Lr,isStream:V7,isURLSearchParams:$7,isTypedArray:K7,isFileList:B7,forEach:Wo,merge:ef,extend:Y7,trim:X7,stripBOM:U7,inherits:G7,toFlatObject:Z7,kindOf:Pd,kindOfTest:fi,endsWith:q7,toArray:Q7,forEachEntry:J7,matchAll:e6,isHTMLForm:t6,hasOwnProperty:_m,hasOwnProp:_m,reduceDescriptors:Iy,freezeMethods:n6,toObjectSet:s6,toCamelCase:r6,noop:a6,toFiniteNumber:o6,findKey:_y,global:My,isContextDefined:Oy,ALPHABET:zy,generateString:l6,isSpecCompliantForm:c6,toJSONObject:d6,isAsyncFn:u6,isThenable:h6};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 Fy=Qe.prototype,Dy={};["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=>{Dy[e]={value:e}});Object.defineProperties(Qe,Dy);Object.defineProperty(Fy,"isAxiosError",{value:!0});Qe.from=(e,t,r,s,o,c)=>{const p=Object.create(Fy);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 f6=null;function tf(e){return ae.isPlainObject(e)||ae.isArray(e)}function Hy(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function Om(e,t,r){return e?e.concat(t).map(function(o,c){return o=Hy(o),!r&&c?"["+o+"]":o}).join(r?".":""):t}function p6(e){return ae.isArray(e)&&!e.some(tf)}const g6=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,q){return!ae.isUndefined(q[B])});const s=r.metaTokens,o=r.visitor||L,c=r.dots,p=r.indexes,C=(r.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(t);if(!ae.isFunction(o))throw new TypeError("visitor must be a function");function A(H){if(H===null)return"";if(ae.isDate(H))return H.toISOString();if(!C&&ae.isBlob(H))throw new Qe("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(H)||ae.isTypedArray(H)?C&&typeof Blob=="function"?new Blob([H]):Buffer.from(H):H}function L(H,B,q){let W=H;if(H&&!q&&typeof H=="object"){if(ae.endsWith(B,"{}"))B=s?B:B.slice(0,-2),H=JSON.stringify(H);else if(ae.isArray(H)&&p6(H)||(ae.isFileList(H)||ae.endsWith(B,"[]"))&&(W=ae.toArray(H)))return B=Hy(B),W.forEach(function(_,K){!(ae.isUndefined(_)||_===null)&&t.append(p===!0?Om([B],K,c):p===null?B:B+"[]",A(_))}),!1}return tf(H)?!0:(t.append(Om(q,B,c),A(H)),!1)}const P=[],z=Object.assign(g6,{defaultVisitor:L,convertValue:A,isVisitable:tf});function M(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,z))===!0&&M(W,B?B.concat(V):[V])}),P.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return M(e),t}function Im(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function Jp(e,t){this._pairs=[],e&&_d(e,this,t)}const By=Jp.prototype;By.append=function(t,r){this._pairs.push([t,r])};By.toString=function(t){const r=t?function(s){return t.call(this,s,Im)}:Im;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function m6(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vy(e,t,r){if(!t)return e;const s=r&&r.encode||m6,o=r&&r.serialize;let c;if(o?c=o(t,r):c=ae.isURLSearchParams(t)?t.toString():new Jp(t,r).toString(s),c){const p=e.indexOf("#");p!==-1&&(e=e.slice(0,p)),e+=(e.indexOf("?")===-1?"?":"&")+c}return e}class zm{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 Wy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},x6=typeof URLSearchParams<"u"?URLSearchParams:Jp,v6=typeof FormData<"u"?FormData:null,y6=typeof Blob<"u"?Blob:null,b6={isBrowser:!0,classes:{URLSearchParams:x6,FormData:v6,Blob:y6},protocols:["http","https","file","blob","url","data"]},$y=typeof window<"u"&&typeof document<"u",w6=(e=>$y&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),k6=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",C6=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$y,hasStandardBrowserEnv:w6,hasStandardBrowserWebWorkerEnv:k6},Symbol.toStringTag,{value:"Module"})),ni={...C6,...b6};function S6(e,t){return _d(e,new ni.classes.URLSearchParams,Object.assign({visitor:function(r,s,o,c){return ni.isNode&&ae.isBuffer(r)?(this.append(s,r.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)}},t))}function A6(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function j6(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]=j6(o[p])),!v)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const r={};return ae.forEachEntry(e,(s,o)=>{t(A6(s),o,r,0)}),r}return null}function N6(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 $o={transitional:Wy,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(Xy(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 S6(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),N6(t)):t}],transformResponse:[function(t){const r=this.transitional||$o.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:ni.classes.FormData,Blob:ni.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=>{$o.headers[e]={}});const E6=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"]),L6=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]&&E6[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t},Fm=Symbol("internals");function ja(e){return e&&String(e).trim().toLowerCase()}function Gl(e){return e===!1||e==null?e:ae.isArray(e)?e.map(Gl):String(e)}function P6(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 T6=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Mu(e,t,r,s,o){if(ae.isFunction(s))return s.call(this,t,r);if(o&&(t=r),!!ae.isString(t)){if(ae.isString(s))return t.indexOf(s)!==-1;if(ae.isRegExp(s))return s.test(t)}}function R6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function _6(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 Pr{constructor(t){t&&this.set(t)}set(t,r,s){const o=this;function c(v,C,A){const L=ja(C);if(!L)throw new Error("header name must be a non-empty string");const P=ae.findKey(o,L);(!P||o[P]===void 0||A===!0||A===void 0&&o[P]!==!1)&&(o[P||C]=Gl(v))}const p=(v,C)=>ae.forEach(v,(A,L)=>c(A,L,C));return ae.isPlainObject(t)||t instanceof this.constructor?p(t,r):ae.isString(t)&&(t=t.trim())&&!T6(t)?p(L6(t),r):t!=null&&c(r,t,s),this}get(t,r){if(t=ja(t),t){const s=ae.findKey(this,t);if(s){const o=this[s];if(!r)return o;if(r===!0)return P6(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=ja(t),t){const s=ae.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||Mu(this,this[s],s,r)))}return!1}delete(t,r){const s=this;let o=!1;function c(p){if(p=ja(p),p){const v=ae.findKey(s,p);v&&(!r||Mu(s,s[v],v,r))&&(delete s[v],o=!0)}}return ae.isArray(t)?t.forEach(c):c(t),o}clear(t){const r=Object.keys(this);let s=r.length,o=!1;for(;s--;){const c=r[s];(!t||Mu(this,this[c],c,t,!0))&&(delete this[c],o=!0)}return o}normalize(t){const r=this,s={};return ae.forEach(this,(o,c)=>{const p=ae.findKey(s,c);if(p){r[p]=Gl(o),delete r[c];return}const v=t?R6(c):String(c).trim();v!==c&&delete r[c],r[v]=Gl(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[Fm]=this[Fm]={accessors:{}}).accessors,o=this.prototype;function c(p){const v=ja(p);s[v]||(_6(o,p),s[v]=!0)}return ae.isArray(t)?t.forEach(c):c(t),this}}Pr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(Pr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});ae.freezeMethods(Pr);function Ou(e,t){const r=this||$o,s=t||r,o=Pr.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 Uy(e){return!!(e&&e.__CANCEL__)}function Xo(e,t,r){Qe.call(this,e??"canceled",Qe.ERR_CANCELED,t,r),this.name="CanceledError"}ae.inherits(Xo,Qe,{__CANCEL__:!0});function M6(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 O6=ni.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 I6(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function z6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Gy(e,t){return e&&!I6(t)?z6(e,t):t}const F6=ni.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 D6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function H6(e,t){e=e||10;const r=new Array(e),s=new Array(e);let o=0,c=0,p;return t=t!==void 0?t:1e3,function(C){const A=Date.now(),L=s[c];p||(p=A),r[o]=C,s[o]=A;let P=c,z=0;for(;P!==o;)z+=r[P++],P=P%e;if(o=(o+1)%e,o===c&&(c=(c+1)%e),A-p{const c=o.loaded,p=o.lengthComputable?o.total:void 0,v=c-r,C=s(v),A=c<=p;r=c;const L={loaded:c,total:p,progress:p?c/p:void 0,bytes:v,rate:C||void 0,estimated:C&&p&&A?(p-c)/C:void 0,event:o};L[t?"download":"upload"]=!0,e(L)}}const B6=typeof XMLHttpRequest<"u",V6=B6&&function(e){return new Promise(function(r,s){let o=e.data;const c=Pr.from(e.headers).normalize();let{responseType:p,withXSRFToken:v}=e,C;function A(){e.cancelToken&&e.cancelToken.unsubscribe(C),e.signal&&e.signal.removeEventListener("abort",C)}let L;if(ae.isFormData(o)){if(ni.hasStandardBrowserEnv||ni.hasStandardBrowserWebWorkerEnv)c.setContentType(!1);else if((L=c.getContentType())!==!1){const[B,...q]=L?L.split(";").map(W=>W.trim()).filter(Boolean):[];c.setContentType([B||"multipart/form-data",...q].join("; "))}}let P=new XMLHttpRequest;if(e.auth){const B=e.auth.username||"",q=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";c.set("Authorization","Basic "+btoa(B+":"+q))}const z=Gy(e.baseURL,e.url);P.open(e.method.toUpperCase(),Wy(z,e.params,e.paramsSerializer),!0),P.timeout=e.timeout;function M(){if(!P)return;const B=Pr.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};M6(function(_){r(_),A()},function(_){s(_),A()},W),P=null}if("onloadend"in P?P.onloadend=M:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(M)},P.onabort=function(){P&&(s(new Qe("Request aborted",Qe.ECONNABORTED,e,P)),P=null)},P.onerror=function(){s(new Qe("Network Error",Qe.ERR_NETWORK,e,P)),P=null},P.ontimeout=function(){let q=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const W=e.transitional||$y;e.timeoutErrorMessage&&(q=e.timeoutErrorMessage),s(new Qe(q,W.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,e,P)),P=null},ni.hasStandardBrowserEnv&&(v&&ae.isFunction(v)&&(v=v(e)),v||v!==!1&&F6(z))){const B=e.xsrfHeaderName&&e.xsrfCookieName&&O6.read(e.xsrfCookieName);B&&c.set(e.xsrfHeaderName,B)}o===void 0&&c.setContentType(null),"setRequestHeader"in P&&ae.forEach(c.toJSON(),function(q,W){P.setRequestHeader(W,q)}),ae.isUndefined(e.withCredentials)||(P.withCredentials=!!e.withCredentials),p&&p!=="json"&&(P.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&P.addEventListener("progress",Dm(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&P.upload&&P.upload.addEventListener("progress",Dm(e.onUploadProgress)),(e.cancelToken||e.signal)&&(C=B=>{P&&(s(!B||B.type?new Xo(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=D6(z);if(H&&ni.protocols.indexOf(H)===-1){s(new Qe("Unsupported protocol "+H+":",Qe.ERR_BAD_REQUEST,e));return}P.send(o||null)})},rf={http:f6,xhr:V6};ae.forEach(rf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Hm=e=>`- ${e}`,W6=e=>ae.isFunction(e)||e===null||e===!1,Zy={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 : +`)}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[Fm]=this[Fm]={accessors:{}}).accessors,o=this.prototype;function c(p){const v=ja(p);s[v]||(_6(o,p),s[v]=!0)}return ae.isArray(t)?t.forEach(c):c(t),this}}Pr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(Pr.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});ae.freezeMethods(Pr);function Ou(e,t){const r=this||$o,s=t||r,o=Pr.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 Yy(e){return!!(e&&e.__CANCEL__)}function Xo(e,t,r){Qe.call(this,e??"canceled",Qe.ERR_CANCELED,t,r),this.name="CanceledError"}ae.inherits(Xo,Qe,{__CANCEL__:!0});function M6(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 O6=ni.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 I6(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function z6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Uy(e,t){return e&&!I6(t)?z6(e,t):t}const F6=ni.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 D6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function H6(e,t){e=e||10;const r=new Array(e),s=new Array(e);let o=0,c=0,p;return t=t!==void 0?t:1e3,function(C){const A=Date.now(),L=s[c];p||(p=A),r[o]=C,s[o]=A;let P=c,z=0;for(;P!==o;)z+=r[P++],P=P%e;if(o=(o+1)%e,o===c&&(c=(c+1)%e),A-p{const c=o.loaded,p=o.lengthComputable?o.total:void 0,v=c-r,C=s(v),A=c<=p;r=c;const L={loaded:c,total:p,progress:p?c/p:void 0,bytes:v,rate:C||void 0,estimated:C&&p&&A?(p-c)/C:void 0,event:o};L[t?"download":"upload"]=!0,e(L)}}const B6=typeof XMLHttpRequest<"u",V6=B6&&function(e){return new Promise(function(r,s){let o=e.data;const c=Pr.from(e.headers).normalize();let{responseType:p,withXSRFToken:v}=e,C;function A(){e.cancelToken&&e.cancelToken.unsubscribe(C),e.signal&&e.signal.removeEventListener("abort",C)}let L;if(ae.isFormData(o)){if(ni.hasStandardBrowserEnv||ni.hasStandardBrowserWebWorkerEnv)c.setContentType(!1);else if((L=c.getContentType())!==!1){const[B,...q]=L?L.split(";").map(W=>W.trim()).filter(Boolean):[];c.setContentType([B||"multipart/form-data",...q].join("; "))}}let P=new XMLHttpRequest;if(e.auth){const B=e.auth.username||"",q=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";c.set("Authorization","Basic "+btoa(B+":"+q))}const z=Uy(e.baseURL,e.url);P.open(e.method.toUpperCase(),Vy(z,e.params,e.paramsSerializer),!0),P.timeout=e.timeout;function M(){if(!P)return;const B=Pr.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};M6(function(_){r(_),A()},function(_){s(_),A()},W),P=null}if("onloadend"in P?P.onloadend=M:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(M)},P.onabort=function(){P&&(s(new Qe("Request aborted",Qe.ECONNABORTED,e,P)),P=null)},P.onerror=function(){s(new Qe("Network Error",Qe.ERR_NETWORK,e,P)),P=null},P.ontimeout=function(){let q=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const W=e.transitional||Wy;e.timeoutErrorMessage&&(q=e.timeoutErrorMessage),s(new Qe(q,W.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,e,P)),P=null},ni.hasStandardBrowserEnv&&(v&&ae.isFunction(v)&&(v=v(e)),v||v!==!1&&F6(z))){const B=e.xsrfHeaderName&&e.xsrfCookieName&&O6.read(e.xsrfCookieName);B&&c.set(e.xsrfHeaderName,B)}o===void 0&&c.setContentType(null),"setRequestHeader"in P&&ae.forEach(c.toJSON(),function(q,W){P.setRequestHeader(W,q)}),ae.isUndefined(e.withCredentials)||(P.withCredentials=!!e.withCredentials),p&&p!=="json"&&(P.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&P.addEventListener("progress",Dm(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&P.upload&&P.upload.addEventListener("progress",Dm(e.onUploadProgress)),(e.cancelToken||e.signal)&&(C=B=>{P&&(s(!B||B.type?new Xo(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=D6(z);if(H&&ni.protocols.indexOf(H)===-1){s(new Qe("Unsupported protocol "+H+":",Qe.ERR_BAD_REQUEST,e));return}P.send(o||null)})},rf={http:f6,xhr:V6};ae.forEach(rf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Hm=e=>`- ${e}`,W6=e=>ae.isFunction(e)||e===null||e===!1,Gy={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(Hm).join(` -`):" "+Hm(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:rf};function Iu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xo(null,e)}function Bm(e){return Iu(e),e.headers=Pr.from(e.headers),e.data=Ou.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Zy.getAdapter(e.adapter||$o.adapter)(e).then(function(s){return Iu(e),s.data=Ou.call(e,e.transformResponse,s),s.headers=Pr.from(s.headers),s},function(s){return Uy(s)||(Iu(e),s&&s.response&&(s.response.data=Ou.call(e,e.transformResponse,s.response),s.response.headers=Pr.from(s.response.headers))),Promise.reject(s)})}const Vm=e=>e instanceof Pr?e.toJSON():e;function Qs(e,t){t=t||{};const r={};function s(A,L,P){return ae.isPlainObject(A)&&ae.isPlainObject(L)?ae.merge.call({caseless:P},A,L):ae.isPlainObject(L)?ae.merge({},L):ae.isArray(L)?L.slice():L}function o(A,L,P){if(ae.isUndefined(L)){if(!ae.isUndefined(A))return s(void 0,A,P)}else return s(A,L,P)}function c(A,L){if(!ae.isUndefined(L))return s(void 0,L)}function p(A,L){if(ae.isUndefined(L)){if(!ae.isUndefined(A))return s(void 0,A)}else return s(void 0,L)}function v(A,L,P){if(P in t)return s(A,L);if(P in e)return s(void 0,A)}const C={url:c,method:c,data:c,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:v,headers:(A,L)=>o(Vm(A),Vm(L),!0)};return ae.forEach(Object.keys(Object.assign({},e,t)),function(L){const P=C[L]||o,z=P(e[L],t[L],L);ae.isUndefined(z)&&P!==v||(r[L]=z)}),r}const qy="1.6.7",e1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{e1[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Wm={};e1.transitional=function(t,r,s){function o(c,p){return"[Axios v"+qy+"] 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&&!Wm[p]&&(Wm[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 $6(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 nf={assertOptions:$6,validators:e1},Wi=nf.validators;class Un{constructor(t){this.defaults=t,this.interceptors={request:new zm,response:new zm}}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=Qs(this.defaults,r);const{transitional:s,paramsSerializer:o,headers:c}=r;s!==void 0&&nf.assertOptions(s,{silentJSONParsing:Wi.transitional(Wi.boolean),forcedJSONParsing:Wi.transitional(Wi.boolean),clarifyTimeoutError:Wi.transitional(Wi.boolean)},!1),o!=null&&(ae.isFunction(o)?r.paramsSerializer={serialize:o}:nf.assertOptions(o,{encode:Wi.function,serialize:Wi.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=Pr.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 L,P=0,z;if(!C){const H=[Bm.bind(this),void 0];for(H.unshift.apply(H,v),H.push.apply(H,A),z=H.length,L=Promise.resolve(r);P{if(!s._listeners)return;let c=s._listeners.length;for(;c-- >0;)s._listeners[c](o);s._listeners=null}),this.promise.then=o=>{let c;const p=new Promise(v=>{s.subscribe(v),c=v}).then(o);return p.cancel=function(){s.unsubscribe(c)},p},t(function(c,p,v){s.reason||(s.reason=new Xo(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 t1(function(o){t=o}),cancel:t}}}function X6(e){return function(r){return e.apply(null,r)}}function Y6(e){return ae.isObject(e)&&e.isAxiosError===!0}const sf={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(sf).forEach(([e,t])=>{sf[t]=e});function Qy(e){const t=new Un(e),r=Ty(Un.prototype.request,t);return ae.extend(r,Un.prototype,t,{allOwnKeys:!0}),ae.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return Qy(Qs(e,o))},r}const jt=Qy($o);jt.Axios=Un;jt.CanceledError=Xo;jt.CancelToken=t1;jt.isCancel=Uy;jt.VERSION=qy;jt.toFormData=_d;jt.AxiosError=Qe;jt.Cancel=jt.CanceledError;jt.all=function(t){return Promise.all(t)};jt.spread=X6;jt.isAxiosError=Y6;jt.mergeConfig=Qs;jt.AxiosHeaders=Pr;jt.formToJSON=e=>Yy(ae.isHTMLForm(e)?new FormData(e):e);jt.getAdapter=Zy.getAdapter;jt.HttpStatusCode=sf;jt.default=jt;function U6(e){function t(r){return`${e}:${r}`}return{getPrefixedKey:t,set(r,s){Sl(),localStorage.setItem(t(r),JSON.stringify(s))},get(r){Sl();const s=localStorage.getItem(t(r));try{return s?JSON.parse(s):void 0}catch{return}},remove(r){Sl(),localStorage.removeItem(t(r))},clear(){Sl(),Object.keys(localStorage).forEach(r=>{r.startsWith(e)&&localStorage.removeItem(r)})}}}const Yo=U6("wasp");function Sl(){if(!window.localStorage)throw new Error("Local storage is not available.")}function G6(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 rs=G6(),ca=jt.create({baseURL:Ly.apiUrl}),Md="sessionId";let Ks=Yo.get(Md);function Z6(e){Ks=e,Yo.set(Md,e),rs.emit("sessionId.set")}function Ky(){return Ks}function q6(){Ks=void 0,Yo.remove(Md),rs.emit("sessionId.clear")}function Q6(){Ks=void 0,Yo.clear(),rs.emit("sessionId.clear")}ca.interceptors.request.use(e=>{const t=Ky();return t&&(e.headers.Authorization=`Bearer ${t}`),e});ca.interceptors.response.use(void 0,e=>{var t;return((t=e.response)===null||t===void 0?void 0:t.status)===401&&q6(),Promise.reject(e)});window.addEventListener("storage",e=>{e.key===Yo.getPrefixedKey(Md)&&(e.newValue?(Ks=e.newValue,rs.emit("sessionId.set")):(Ks=void 0,rs.emit("sessionId.clear")))});function Jy(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 K6(o,(r=s==null?void 0:s.message)!==null&&r!==void 0?r:e.message,s)}else throw e}class K6 extends Error{constructor(t,r,s){super(r),this.statusCode=t,this.data=s}}const J6={};let eb;const r1=new Promise(e=>{eb=e});function e9(){const e=new rw(J6);eb(e)}function t9(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 af=new Map,i1=t9(rn);function r9(e,t){for(const r of t){let s=af.get(r);s||(s=new Set,af.set(r,s)),s.add(e)}}function i9(e){e.forEach(({queryKey:t,updateQuery:r})=>i1.add(t,r))}async function n9(e,t){t.forEach(({queryKey:r})=>i1.remove(r)),await a9(e)}function s9(e){return i1.getUpdateHandlers(e)}async function tb(){const e=await r1;e.resetQueries(),e.removeQueries()}async function a9(e){const t=await r1;l9(e).forEach(s=>t.invalidateQueries(s))}function o9(e){return Array.from(af.get(e)||[])}function l9(e){return Array.from(new Set(e.flatMap(o9)))}async function c9(e){Z6(e),await tb()}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 rb=bt("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"});bt(rb,{background:"$errorBackground",color:"$errorText"});bt(rb,{background:"$successBackground",color:"$successText"});bt("div",{display:"flex",flexDirection:"column"});bt("h2",{fontSize:"1.875rem !important",fontWeight:"700 !important",marginTop:"1.5rem !important"});G.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}});var $m;(function(e){e.Login="login",e.Signup="signup"})($m||($m={}));var d9=function(){function e(){this.keyToValue=new Map,this.valueToKey=new Map}return e.prototype.set=function(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)},e.prototype.getByKey=function(t){return this.keyToValue.get(t)},e.prototype.getByValue=function(t){return this.valueToKey.get(t)},e.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},e}(),ib=function(){function e(t){this.generateIdentifier=t,this.kv=new d9}return e.prototype.register=function(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))},e.prototype.clear=function(){this.kv.clear()},e.prototype.getIdentifier=function(t){return this.kv.getByValue(t)},e.prototype.getValue=function(t){return this.kv.getByKey(t)},e}(),u9=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)}}(),h9=function(e){u9(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}(ib),f9=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 p9(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 g9(e,t){var r=p9(e);if("find"in r)return r.find(t);for(var s=r,o=0;o"u"},v9=function(e){return e===null},bo=function(e){return typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype},of=function(e){return bo(e)&&Object.keys(e).length===0},yn=function(e){return Array.isArray(e)},y9=function(e){return typeof e=="string"},b9=function(e){return typeof e=="number"&&!isNaN(e)},w9=function(e){return typeof e=="boolean"},k9=function(e){return e instanceof RegExp},wo=function(e){return e instanceof Map},ko=function(e){return e instanceof Set},sb=function(e){return x9(e)==="Symbol"},C9=function(e){return e instanceof Date&&!isNaN(e.valueOf())},S9=function(e){return e instanceof Error},Ym=function(e){return typeof e=="number"&&isNaN(e)},A9=function(e){return w9(e)||v9(e)||nb(e)||b9(e)||y9(e)||sb(e)},j9=function(e){return typeof e=="bigint"},N9=function(e){return e===1/0||e===-1/0},E9=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},L9=function(e){return e instanceof URL},ab=function(e){return e.replace(/\./g,"\\.")},zu=function(e){return e.map(String).map(ab).join(".")},Ka=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},df=function(e,t){for(var r=0,s=t.length,o=e.length;r0?"Infinity":"-Infinity"},Number),ei(function(e){return e===0&&1/e===-1/0},"number",function(){return"-0"},Number),ei(L9,"URL",function(e){return e.toString()},function(e){return new URL(e)})];function Od(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}var lb=Od(function(e,t){if(sb(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}),P9=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),cb=Od(E9,function(e){return["typed-array",e.constructor.name]},function(e){return df([],cf(e))},function(e,t){var r=P9[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function db(e,t){if(e!=null&&e.constructor){var r=!!t.classRegistry.getIdentifier(e.constructor);return r}return!1}var ub=Od(db,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 lf({},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)}),hb=Od(function(e,t){return!!t.customTransformerRegistry.findApplicable(e)},function(e,t){var r=t.customTransformerRegistry.findApplicable(e);return["custom",r.name]},function(e,t){var r=t.customTransformerRegistry.findApplicable(e);return r.serialize(e)},function(e,t,r){var s=r.customTransformerRegistry.findByName(t[1]);if(!s)throw new Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),T9=[ub,lb,hb,cb],Um=function(e,t){var r=Xm(T9,function(o){return o.isApplicable(e,t)});if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};var s=Xm(ob,function(o){return o.isApplicable(e,t)});if(s)return{value:s.transform(e,t),type:s.annotation}},fb={};ob.forEach(function(e){fb[e.annotation]=e});var R9=function(e,t,r){if(yn(t))switch(t[0]){case"symbol":return lb.untransform(e,t,r);case"class":return ub.untransform(e,t,r);case"custom":return hb.untransform(e,t,r);case"typed-array":return cb.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{var s=fb[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,r)}},Ms=function(e,t){for(var r=e.keys();t>0;)r.next(),t--;return r.next().value};function pb(e){if(Zl(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Zl(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Zl(e,"constructor"))throw new Error("constructor is not allowed as a property")}var _9=function(e,t){pb(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},sn=function(e,t){for(var r=0,s=t.length,o=e.length;rff(o,t));if(!D9(e))return e;const r=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...r,...s].reduce((o,c)=>{if(Gm(t.props)&&!t.props.includes(c))return o;const p=e[c],v=ff(p,t);return H9(o,c,v,e,t.nonenumerable),o},{})}var On=function(){return On=Object.assign||function(e){for(var t,r=1,s=arguments.length;r0)&&!(o=s.next()).done;)c.push(o.value)}catch(v){p={error:v}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(p)throw p.error}}return c},V9=function(e,t){for(var r=0,s=t.length,o=e.length;rs(c,[]);return o.internal=s,o}const wb=_r("operations/stripe-payment",["User"]),Ja=_r("operations/update-current-user",["User"]);_r("operations/update-user-by-id",["User"]);const $9=_r("operations/create-new-chat",["Chat","Conversation"]),X9=_r("operations/create-new-daily-analysis-chat",["Chat","Conversation"]),ci=_r("operations/update-current-chat",["Chat"]),kb=_r("operations/update-current-conversation",["Conversation"]),Y9=_r("operations/delete-last-conversation-in-chat",["Conversation"]),U9=_r("operations/retry-team-chat",["Chat","Conversation"]),G9=_r("operations/create-new-and-return-all-conversations",["Conversation"]),Z9=_r("operations/create-new-and-return-last-conversation",["Conversation"]),q9=_r("operations/get-agent-response",["Chat","Conversation"]);function da(e,t){const r=bb(e);async function s(o,c){const p=await yb(r,c);return s9(o).reduce((v,C)=>C(v),p)}return Cb(s,{relativeQueryPath:e,queryRoute:r,entitiesUsed:t}),s}function Cb(e,{relativeQueryPath:t,queryRoute:r,entitiesUsed:s}){e.queryCacheKey=[t],e.route=r,r9(e.queryCacheKey,s)}const Q9=da("operations/get-daily-stats",["User","DailyStats"]),K9=da("operations/get-paginated-users",["User"]),J9=da("operations/get-chat",["Chat"]),ek=da("operations/get-chats",["Chat"]),tk=da("operations/get-conversations",["Conversation"]),rk=da("operations/get-chat-from-uuid",["Chat"]);function Gn(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 Rw(Object.assign({queryKey:s,queryFn:()=>e(s,t)},r))}const ik=nk();function Mr(e,t){return Gn(ik,e,t)}function nk(){const e="auth/me",t={method:Ic.Get,path:`/${e}`};async function r(){var s;try{const o=await ca.get(t.path);return vb(o.data)}catch(o){if(((s=o.response)===null||s===void 0?void 0:s.status)===401)return null;Jy(o)}}return Cb(r,{relativeQueryPath:e,queryRoute:t,entitiesUsed:["User"]}),r}async function Sb(){try{await ca.post("/auth/logout")}finally{Q6(),await tb()}}function kt(e,t,r,s){const o=t?sk(e,t):e,c=r?`?${new URLSearchParams(r).toString()}`:"",p=s?`#${s}`:"";return o+c+p}function sk(e,t){function r(o){if(o.startsWith(":")){const c=ok(o);return t[c]}return o}const s=e.split("/").map(r).filter(ak).join("/");return e.startsWith("/")?`/${s}`:s}function ak(e){return!!e}function ok(e){return e.endsWith("?")?e.slice(1,-1):e.slice(1)}var lk=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 ck={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 dk=Object.defineProperty,uk=(e,t,r)=>t in e?dk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fu=(e,t,r)=>(uk(e,typeof t!="symbol"?t+"":t,r),r);let hk=class{constructor(){Fu(this,"current",this.detect()),Fu(this,"handoffState","pending"),Fu(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ei=new hk,En=(e,t)=>{Ei.isServer?G.useEffect(e,t):G.useLayoutEffect(e,t)};function Id(e){let t=G.useRef(e);return En(()=>{t.current=e},[e]),t}function Uo(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function n1(){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 Uo(()=>{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=n1();return r(s),this.add(()=>s.dispose())},add(r){return e.push(r),()=>{let s=e.indexOf(r);if(s>=0)for(let o of e.splice(s,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function fk(){let[e]=G.useState(n1);return G.useEffect(()=>()=>e.dispose(),[e]),e}let Nr=function(e){let t=Id(e);return ge.useCallback((...r)=>t.current(...r),[t])};function zd(){let[e,t]=G.useState(Ei.isHandoffComplete);return e&&Ei.isHandoffComplete===!1&&t(!1),G.useEffect(()=>{e!==!0&&t(!0)},[e]),G.useEffect(()=>Ei.handoff(),[]),e}var Zm;let ua=(Zm=ge.useId)!=null?Zm:function(){let e=zd(),[t,r]=ge.useState(e?()=>Ei.nextId():null);return En(()=>{t===null&&r(Ei.nextId())},[t]),t!=null?""+t:void 0};function bn(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let s=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,bn),s}function Ab(e){return Ei.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let pf=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var In=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(In||{}),jb=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(jb||{}),pk=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(pk||{});function gk(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(pf)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Nb=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Nb||{});function mk(e,t=0){var r;return e===((r=Ab(e))==null?void 0:r.body)?!1:bn(t,{0(){return e.matches(pf)},1(){let s=e;for(;s!==null;){if(s.matches(pf))return!0;s=s.parentElement}return!1}})}function Zn(e){e==null||e.focus({preventScroll:!0})}let xk=["textarea","input"].join(",");function vk(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,xk))!=null?r:!1}function yk(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?yk(e):e:gk(e);o.length>0&&p.length>1&&(p=p.filter(M=>!o.includes(M))),s=s??c.activeElement;let v=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),C=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,p.indexOf(s))-1;if(t&4)return Math.max(0,p.indexOf(s))+1;if(t&8)return p.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),A=t&32?{preventScroll:!0}:{},L=0,P=p.length,z;do{if(L>=P||L+P<=0)return 0;let M=C+L;if(t&16)M=(M+P)%P;else{if(M<0)return 3;if(M>=P)return 1}z=p[M],z==null||z.focus(A),L+=v}while(z!==c.activeElement);return t&6&&vk(z)&&z.select(),z.hasAttribute("tabindex")||z.setAttribute("tabindex","0"),2}function Du(e,t,r){let s=Id(t);G.useEffect(()=>{function o(c){s.current(c)}return document.addEventListener(e,o,r),()=>document.removeEventListener(e,o,r)},[e,r])}function bk(e,t,r=!0){let s=G.useRef(!1);G.useEffect(()=>{requestAnimationFrame(()=>{s.current=r})},[r]);function o(p,v){if(!s.current||p.defaultPrevented)return;let C=function L(P){return typeof P=="function"?L(P()):Array.isArray(P)||P instanceof Set?P:[P]}(e),A=v(p);if(A!==null&&A.getRootNode().contains(A)){for(let L of C){if(L===null)continue;let P=L instanceof HTMLElement?L:L.current;if(P!=null&&P.contains(A)||p.composed&&p.composedPath().includes(P))return}return!mk(A,Nb.Loose)&&A.tabIndex!==-1&&p.preventDefault(),t(p,A)}}let c=G.useRef(null);Du("mousedown",p=>{var v,C;s.current&&(c.current=((C=(v=p.composedPath)==null?void 0:v.call(p))==null?void 0:C[0])||p.target)},!0),Du("click",p=>{c.current&&(o(p,()=>c.current),c.current=null)},!0),Du("blur",p=>o(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let Eb=Symbol();function wk(e,t=!0){return Object.assign(e,{[Eb]:t})}function Fi(...e){let t=G.useRef(e);G.useEffect(()=>{t.current=e},[e]);let r=Nr(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[Eb]))?void 0:r}function kk(...e){return e.filter(Boolean).join(" ")}var gf=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(gf||{}),Ck=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ck||{});function pi({ourProps:e,theirProps:t,slot:r,defaultTag:s,features:o,visible:c=!0,name:p}){let v=Lb(t,e);if(c)return Al(v,r,s,p);let C=o??0;if(C&2){let{static:A=!1,...L}=v;if(A)return Al(L,r,s,p)}if(C&1){let{unmount:A=!0,...L}=v;return bn(A?0:1,{0(){return null},1(){return Al({...L,hidden:!0,style:{display:"none"}},r,s,p)}})}return Al(v,r,s,p)}function Al(e,t={},r,s){var o;let{as:c=r,children:p,refName:v="ref",...C}=Hu(e,["unmount","static"]),A=e.ref!==void 0?{[v]:e.ref}:{},L=typeof p=="function"?p(t):p;"className"in C&&C.className&&typeof C.className=="function"&&(C.className=C.className(t));let P={};if(t){let z=!1,M=[];for(let[H,B]of Object.entries(t))typeof B=="boolean"&&(z=!0),B===!0&&M.push(H);z&&(P["data-headlessui-state"]=M.join(" "))}if(c===G.Fragment&&Object.keys(qm(C)).length>0){if(!G.isValidElement(L)||Array.isArray(L)&&L.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${s} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(C).map(H=>` - ${H}`).join(` +`):" "+Hm(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:rf};function Iu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xo(null,e)}function Bm(e){return Iu(e),e.headers=Pr.from(e.headers),e.data=Ou.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Gy.getAdapter(e.adapter||$o.adapter)(e).then(function(s){return Iu(e),s.data=Ou.call(e,e.transformResponse,s),s.headers=Pr.from(s.headers),s},function(s){return Yy(s)||(Iu(e),s&&s.response&&(s.response.data=Ou.call(e,e.transformResponse,s.response),s.response.headers=Pr.from(s.response.headers))),Promise.reject(s)})}const Vm=e=>e instanceof Pr?e.toJSON():e;function Qs(e,t){t=t||{};const r={};function s(A,L,P){return ae.isPlainObject(A)&&ae.isPlainObject(L)?ae.merge.call({caseless:P},A,L):ae.isPlainObject(L)?ae.merge({},L):ae.isArray(L)?L.slice():L}function o(A,L,P){if(ae.isUndefined(L)){if(!ae.isUndefined(A))return s(void 0,A,P)}else return s(A,L,P)}function c(A,L){if(!ae.isUndefined(L))return s(void 0,L)}function p(A,L){if(ae.isUndefined(L)){if(!ae.isUndefined(A))return s(void 0,A)}else return s(void 0,L)}function v(A,L,P){if(P in t)return s(A,L);if(P in e)return s(void 0,A)}const C={url:c,method:c,data:c,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:v,headers:(A,L)=>o(Vm(A),Vm(L),!0)};return ae.forEach(Object.keys(Object.assign({},e,t)),function(L){const P=C[L]||o,z=P(e[L],t[L],L);ae.isUndefined(z)&&P!==v||(r[L]=z)}),r}const Zy="1.6.7",e1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{e1[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Wm={};e1.transitional=function(t,r,s){function o(c,p){return"[Axios v"+Zy+"] 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&&!Wm[p]&&(Wm[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 $6(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 nf={assertOptions:$6,validators:e1},Wi=nf.validators;class Un{constructor(t){this.defaults=t,this.interceptors={request:new zm,response:new zm}}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=Qs(this.defaults,r);const{transitional:s,paramsSerializer:o,headers:c}=r;s!==void 0&&nf.assertOptions(s,{silentJSONParsing:Wi.transitional(Wi.boolean),forcedJSONParsing:Wi.transitional(Wi.boolean),clarifyTimeoutError:Wi.transitional(Wi.boolean)},!1),o!=null&&(ae.isFunction(o)?r.paramsSerializer={serialize:o}:nf.assertOptions(o,{encode:Wi.function,serialize:Wi.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=Pr.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 L,P=0,z;if(!C){const H=[Bm.bind(this),void 0];for(H.unshift.apply(H,v),H.push.apply(H,A),z=H.length,L=Promise.resolve(r);P{if(!s._listeners)return;let c=s._listeners.length;for(;c-- >0;)s._listeners[c](o);s._listeners=null}),this.promise.then=o=>{let c;const p=new Promise(v=>{s.subscribe(v),c=v}).then(o);return p.cancel=function(){s.unsubscribe(c)},p},t(function(c,p,v){s.reason||(s.reason=new Xo(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 t1(function(o){t=o}),cancel:t}}}function X6(e){return function(r){return e.apply(null,r)}}function Y6(e){return ae.isObject(e)&&e.isAxiosError===!0}const sf={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(sf).forEach(([e,t])=>{sf[t]=e});function qy(e){const t=new Un(e),r=Py(Un.prototype.request,t);return ae.extend(r,Un.prototype,t,{allOwnKeys:!0}),ae.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return qy(Qs(e,o))},r}const jt=qy($o);jt.Axios=Un;jt.CanceledError=Xo;jt.CancelToken=t1;jt.isCancel=Yy;jt.VERSION=Zy;jt.toFormData=_d;jt.AxiosError=Qe;jt.Cancel=jt.CanceledError;jt.all=function(t){return Promise.all(t)};jt.spread=X6;jt.isAxiosError=Y6;jt.mergeConfig=Qs;jt.AxiosHeaders=Pr;jt.formToJSON=e=>Xy(ae.isHTMLForm(e)?new FormData(e):e);jt.getAdapter=Gy.getAdapter;jt.HttpStatusCode=sf;jt.default=jt;function U6(e){function t(r){return`${e}:${r}`}return{getPrefixedKey:t,set(r,s){Sl(),localStorage.setItem(t(r),JSON.stringify(s))},get(r){Sl();const s=localStorage.getItem(t(r));try{return s?JSON.parse(s):void 0}catch{return}},remove(r){Sl(),localStorage.removeItem(t(r))},clear(){Sl(),Object.keys(localStorage).forEach(r=>{r.startsWith(e)&&localStorage.removeItem(r)})}}}const Yo=U6("wasp");function Sl(){if(!window.localStorage)throw new Error("Local storage is not available.")}function G6(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 rs=G6(),ca=jt.create({baseURL:Ey.apiUrl}),Md="sessionId";let Ks=Yo.get(Md);function Z6(e){Ks=e,Yo.set(Md,e),rs.emit("sessionId.set")}function Qy(){return Ks}function q6(){Ks=void 0,Yo.remove(Md),rs.emit("sessionId.clear")}function Q6(){Ks=void 0,Yo.clear(),rs.emit("sessionId.clear")}ca.interceptors.request.use(e=>{const t=Qy();return t&&(e.headers.Authorization=`Bearer ${t}`),e});ca.interceptors.response.use(void 0,e=>{var t;return((t=e.response)===null||t===void 0?void 0:t.status)===401&&q6(),Promise.reject(e)});window.addEventListener("storage",e=>{e.key===Yo.getPrefixedKey(Md)&&(e.newValue?(Ks=e.newValue,rs.emit("sessionId.set")):(Ks=void 0,rs.emit("sessionId.clear")))});function Ky(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 K6(o,(r=s==null?void 0:s.message)!==null&&r!==void 0?r:e.message,s)}else throw e}class K6 extends Error{constructor(t,r,s){super(r),this.statusCode=t,this.data=s}}const J6={};let Jy;const r1=new Promise(e=>{Jy=e});function e9(){const e=new rw(J6);Jy(e)}function t9(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 af=new Map,i1=t9(rn);function r9(e,t){for(const r of t){let s=af.get(r);s||(s=new Set,af.set(r,s)),s.add(e)}}function i9(e){e.forEach(({queryKey:t,updateQuery:r})=>i1.add(t,r))}async function n9(e,t){t.forEach(({queryKey:r})=>i1.remove(r)),await a9(e)}function s9(e){return i1.getUpdateHandlers(e)}async function eb(){const e=await r1;e.resetQueries(),e.removeQueries()}async function a9(e){const t=await r1;l9(e).forEach(s=>t.invalidateQueries(s))}function o9(e){return Array.from(af.get(e)||[])}function l9(e){return Array.from(new Set(e.flatMap(o9)))}async function c9(e){Z6(e),await eb()}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 tb=bt("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"});bt(tb,{background:"$errorBackground",color:"$errorText"});bt(tb,{background:"$successBackground",color:"$successText"});bt("div",{display:"flex",flexDirection:"column"});bt("h2",{fontSize:"1.875rem !important",fontWeight:"700 !important",marginTop:"1.5rem !important"});G.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}});var $m;(function(e){e.Login="login",e.Signup="signup"})($m||($m={}));var d9=function(){function e(){this.keyToValue=new Map,this.valueToKey=new Map}return e.prototype.set=function(t,r){this.keyToValue.set(t,r),this.valueToKey.set(r,t)},e.prototype.getByKey=function(t){return this.keyToValue.get(t)},e.prototype.getByValue=function(t){return this.valueToKey.get(t)},e.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},e}(),rb=function(){function e(t){this.generateIdentifier=t,this.kv=new d9}return e.prototype.register=function(t,r){this.kv.getByValue(t)||(r||(r=this.generateIdentifier(t)),this.kv.set(r,t))},e.prototype.clear=function(){this.kv.clear()},e.prototype.getIdentifier=function(t){return this.kv.getByValue(t)},e.prototype.getValue=function(t){return this.kv.getByKey(t)},e}(),u9=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)}}(),h9=function(e){u9(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}(rb),f9=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 p9(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 g9(e,t){var r=p9(e);if("find"in r)return r.find(t);for(var s=r,o=0;o"u"},v9=function(e){return e===null},bo=function(e){return typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype},of=function(e){return bo(e)&&Object.keys(e).length===0},yn=function(e){return Array.isArray(e)},y9=function(e){return typeof e=="string"},b9=function(e){return typeof e=="number"&&!isNaN(e)},w9=function(e){return typeof e=="boolean"},k9=function(e){return e instanceof RegExp},wo=function(e){return e instanceof Map},ko=function(e){return e instanceof Set},nb=function(e){return x9(e)==="Symbol"},C9=function(e){return e instanceof Date&&!isNaN(e.valueOf())},S9=function(e){return e instanceof Error},Ym=function(e){return typeof e=="number"&&isNaN(e)},A9=function(e){return w9(e)||v9(e)||ib(e)||b9(e)||y9(e)||nb(e)},j9=function(e){return typeof e=="bigint"},N9=function(e){return e===1/0||e===-1/0},E9=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},L9=function(e){return e instanceof URL},sb=function(e){return e.replace(/\./g,"\\.")},zu=function(e){return e.map(String).map(sb).join(".")},Ka=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},df=function(e,t){for(var r=0,s=t.length,o=e.length;r0?"Infinity":"-Infinity"},Number),ei(function(e){return e===0&&1/e===-1/0},"number",function(){return"-0"},Number),ei(L9,"URL",function(e){return e.toString()},function(e){return new URL(e)})];function Od(e,t,r,s){return{isApplicable:e,annotation:t,transform:r,untransform:s}}var ob=Od(function(e,t){if(nb(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}),P9=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),lb=Od(E9,function(e){return["typed-array",e.constructor.name]},function(e){return df([],cf(e))},function(e,t){var r=P9[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function cb(e,t){if(e!=null&&e.constructor){var r=!!t.classRegistry.getIdentifier(e.constructor);return r}return!1}var db=Od(cb,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 lf({},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)}),ub=Od(function(e,t){return!!t.customTransformerRegistry.findApplicable(e)},function(e,t){var r=t.customTransformerRegistry.findApplicable(e);return["custom",r.name]},function(e,t){var r=t.customTransformerRegistry.findApplicable(e);return r.serialize(e)},function(e,t,r){var s=r.customTransformerRegistry.findByName(t[1]);if(!s)throw new Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),T9=[db,ob,ub,lb],Um=function(e,t){var r=Xm(T9,function(o){return o.isApplicable(e,t)});if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};var s=Xm(ab,function(o){return o.isApplicable(e,t)});if(s)return{value:s.transform(e,t),type:s.annotation}},hb={};ab.forEach(function(e){hb[e.annotation]=e});var R9=function(e,t,r){if(yn(t))switch(t[0]){case"symbol":return ob.untransform(e,t,r);case"class":return db.untransform(e,t,r);case"custom":return ub.untransform(e,t,r);case"typed-array":return lb.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}else{var s=hb[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,r)}},Ms=function(e,t){for(var r=e.keys();t>0;)r.next(),t--;return r.next().value};function fb(e){if(Zl(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Zl(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Zl(e,"constructor"))throw new Error("constructor is not allowed as a property")}var _9=function(e,t){fb(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},sn=function(e,t){for(var r=0,s=t.length,o=e.length;rff(o,t));if(!D9(e))return e;const r=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...r,...s].reduce((o,c)=>{if(Gm(t.props)&&!t.props.includes(c))return o;const p=e[c],v=ff(p,t);return H9(o,c,v,e,t.nonenumerable),o},{})}var On=function(){return On=Object.assign||function(e){for(var t,r=1,s=arguments.length;r0)&&!(o=s.next()).done;)c.push(o.value)}catch(v){p={error:v}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(p)throw p.error}}return c},V9=function(e,t){for(var r=0,s=t.length,o=e.length;rs(c,[]);return o.internal=s,o}const bb=_r("operations/stripe-payment",["User"]),Ja=_r("operations/update-current-user",["User"]);_r("operations/update-user-by-id",["User"]);const $9=_r("operations/create-new-chat",["Chat","Conversation"]),X9=_r("operations/create-new-daily-analysis-chat",["Chat","Conversation"]),ci=_r("operations/update-current-chat",["Chat"]),wb=_r("operations/update-current-conversation",["Conversation"]),Y9=_r("operations/delete-last-conversation-in-chat",["Conversation"]),U9=_r("operations/retry-team-chat",["Chat","Conversation"]),G9=_r("operations/create-new-and-return-all-conversations",["Conversation"]),Z9=_r("operations/create-new-and-return-last-conversation",["Conversation"]),q9=_r("operations/get-agent-response",["Chat","Conversation"]);function da(e,t){const r=yb(e);async function s(o,c){const p=await vb(r,c);return s9(o).reduce((v,C)=>C(v),p)}return kb(s,{relativeQueryPath:e,queryRoute:r,entitiesUsed:t}),s}function kb(e,{relativeQueryPath:t,queryRoute:r,entitiesUsed:s}){e.queryCacheKey=[t],e.route=r,r9(e.queryCacheKey,s)}const Q9=da("operations/get-daily-stats",["User","DailyStats"]),K9=da("operations/get-paginated-users",["User"]),J9=da("operations/get-chat",["Chat"]),ek=da("operations/get-chats",["Chat"]),tk=da("operations/get-conversations",["Conversation"]),rk=da("operations/get-chat-from-uuid",["Chat"]);function Gn(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 Rw(Object.assign({queryKey:s,queryFn:()=>e(s,t)},r))}const ik=nk();function Mr(e,t){return Gn(ik,e,t)}function nk(){const e="auth/me",t={method:Ic.Get,path:`/${e}`};async function r(){var s;try{const o=await ca.get(t.path);return xb(o.data)}catch(o){if(((s=o.response)===null||s===void 0?void 0:s.status)===401)return null;Ky(o)}}return kb(r,{relativeQueryPath:e,queryRoute:t,entitiesUsed:["User"]}),r}async function Cb(){try{await ca.post("/auth/logout")}finally{Q6(),await eb()}}function kt(e,t,r,s){const o=t?sk(e,t):e,c=r?`?${new URLSearchParams(r).toString()}`:"",p=s?`#${s}`:"";return o+c+p}function sk(e,t){function r(o){if(o.startsWith(":")){const c=ok(o);return t[c]}return o}const s=e.split("/").map(r).filter(ak).join("/");return e.startsWith("/")?`/${s}`:s}function ak(e){return!!e}function ok(e){return e.endsWith("?")?e.slice(1,-1):e.slice(1)}var lk=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 ck={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 dk=Object.defineProperty,uk=(e,t,r)=>t in e?dk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fu=(e,t,r)=>(uk(e,typeof t!="symbol"?t+"":t,r),r);let hk=class{constructor(){Fu(this,"current",this.detect()),Fu(this,"handoffState","pending"),Fu(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Ei=new hk,En=(e,t)=>{Ei.isServer?G.useEffect(e,t):G.useLayoutEffect(e,t)};function Id(e){let t=G.useRef(e);return En(()=>{t.current=e},[e]),t}function Uo(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function n1(){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 Uo(()=>{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=n1();return r(s),this.add(()=>s.dispose())},add(r){return e.push(r),()=>{let s=e.indexOf(r);if(s>=0)for(let o of e.splice(s,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function fk(){let[e]=G.useState(n1);return G.useEffect(()=>()=>e.dispose(),[e]),e}let Nr=function(e){let t=Id(e);return ge.useCallback((...r)=>t.current(...r),[t])};function zd(){let[e,t]=G.useState(Ei.isHandoffComplete);return e&&Ei.isHandoffComplete===!1&&t(!1),G.useEffect(()=>{e!==!0&&t(!0)},[e]),G.useEffect(()=>Ei.handoff(),[]),e}var Zm;let ua=(Zm=ge.useId)!=null?Zm:function(){let e=zd(),[t,r]=ge.useState(e?()=>Ei.nextId():null);return En(()=>{t===null&&r(Ei.nextId())},[t]),t!=null?""+t:void 0};function bn(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let s=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(s,bn),s}function Sb(e){return Ei.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let pf=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var In=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(In||{}),Ab=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Ab||{}),pk=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(pk||{});function gk(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(pf)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var jb=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(jb||{});function mk(e,t=0){var r;return e===((r=Sb(e))==null?void 0:r.body)?!1:bn(t,{0(){return e.matches(pf)},1(){let s=e;for(;s!==null;){if(s.matches(pf))return!0;s=s.parentElement}return!1}})}function Zn(e){e==null||e.focus({preventScroll:!0})}let xk=["textarea","input"].join(",");function vk(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,xk))!=null?r:!1}function yk(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?yk(e):e:gk(e);o.length>0&&p.length>1&&(p=p.filter(M=>!o.includes(M))),s=s??c.activeElement;let v=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),C=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,p.indexOf(s))-1;if(t&4)return Math.max(0,p.indexOf(s))+1;if(t&8)return p.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),A=t&32?{preventScroll:!0}:{},L=0,P=p.length,z;do{if(L>=P||L+P<=0)return 0;let M=C+L;if(t&16)M=(M+P)%P;else{if(M<0)return 3;if(M>=P)return 1}z=p[M],z==null||z.focus(A),L+=v}while(z!==c.activeElement);return t&6&&vk(z)&&z.select(),z.hasAttribute("tabindex")||z.setAttribute("tabindex","0"),2}function Du(e,t,r){let s=Id(t);G.useEffect(()=>{function o(c){s.current(c)}return document.addEventListener(e,o,r),()=>document.removeEventListener(e,o,r)},[e,r])}function bk(e,t,r=!0){let s=G.useRef(!1);G.useEffect(()=>{requestAnimationFrame(()=>{s.current=r})},[r]);function o(p,v){if(!s.current||p.defaultPrevented)return;let C=function L(P){return typeof P=="function"?L(P()):Array.isArray(P)||P instanceof Set?P:[P]}(e),A=v(p);if(A!==null&&A.getRootNode().contains(A)){for(let L of C){if(L===null)continue;let P=L instanceof HTMLElement?L:L.current;if(P!=null&&P.contains(A)||p.composed&&p.composedPath().includes(P))return}return!mk(A,jb.Loose)&&A.tabIndex!==-1&&p.preventDefault(),t(p,A)}}let c=G.useRef(null);Du("mousedown",p=>{var v,C;s.current&&(c.current=((C=(v=p.composedPath)==null?void 0:v.call(p))==null?void 0:C[0])||p.target)},!0),Du("click",p=>{c.current&&(o(p,()=>c.current),c.current=null)},!0),Du("blur",p=>o(p,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let Nb=Symbol();function wk(e,t=!0){return Object.assign(e,{[Nb]:t})}function Fi(...e){let t=G.useRef(e);G.useEffect(()=>{t.current=e},[e]);let r=Nr(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[Nb]))?void 0:r}function kk(...e){return e.filter(Boolean).join(" ")}var gf=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(gf||{}),Ck=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ck||{});function pi({ourProps:e,theirProps:t,slot:r,defaultTag:s,features:o,visible:c=!0,name:p}){let v=Eb(t,e);if(c)return Al(v,r,s,p);let C=o??0;if(C&2){let{static:A=!1,...L}=v;if(A)return Al(L,r,s,p)}if(C&1){let{unmount:A=!0,...L}=v;return bn(A?0:1,{0(){return null},1(){return Al({...L,hidden:!0,style:{display:"none"}},r,s,p)}})}return Al(v,r,s,p)}function Al(e,t={},r,s){var o;let{as:c=r,children:p,refName:v="ref",...C}=Hu(e,["unmount","static"]),A=e.ref!==void 0?{[v]:e.ref}:{},L=typeof p=="function"?p(t):p;"className"in C&&C.className&&typeof C.className=="function"&&(C.className=C.className(t));let P={};if(t){let z=!1,M=[];for(let[H,B]of Object.entries(t))typeof B=="boolean"&&(z=!0),B===!0&&M.push(H);z&&(P["data-headlessui-state"]=M.join(" "))}if(c===G.Fragment&&Object.keys(qm(C)).length>0){if(!G.isValidElement(L)||Array.isArray(L)&&L.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${s} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(C).map(H=>` - ${H}`).join(` `),"","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 z=kk((o=L.props)==null?void 0:o.className,C.className),M=z?{className:z}:{};return G.cloneElement(L,Object.assign({},Lb(L.props,qm(Hu(C,["ref"]))),P,A,Sk(L.ref,A.ref),M))}return G.createElement(c,Object.assign({},Hu(C,["ref"]),c!==G.Fragment&&A,c!==G.Fragment&&P),L)}function Sk(...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 Lb(...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 gi(e){var t;return Object.assign(G.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function qm(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Hu(e,t=[]){let r=Object.assign({},e);for(let s of t)s in r&&delete r[s];return r}function Ak(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&&jk(r)?!1:s}function jk(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Nk="div";var zc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(zc||{});function Ek(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 pi({ourProps:o,theirProps:s,slot:{},defaultTag:Nk,name:"Hidden"})}let mf=gi(Ek),Pb=G.createContext(null);Pb.displayName="OpenClosedContext";var Fa=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Fa||{});function Lk(){return G.useContext(Pb)}var Tb=(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))(Tb||{});function s1(e,t){let r=G.useRef([]),s=Nr(e);G.useEffect(()=>{let o=[...r.current];for(let[c,p]of t.entries())if(r.current[c]!==p){let v=s(t,o);return r.current=t,v}},[s,...t])}function Pk(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Tk(e,t,r){let s=Id(t);G.useEffect(()=>{function o(c){s.current(c)}return window.addEventListener(e,o,r),()=>window.removeEventListener(e,o,r)},[e,r])}var Da=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Da||{});function Rk(){let e=G.useRef(0);return Tk("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Rb(){let e=G.useRef(!1);return En(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Fd(...e){return G.useMemo(()=>Ab(...e),[...e])}function _b(e,t,r,s){let o=Id(r);G.useEffect(()=>{e=e??window;function c(p){o.current(p)}return e.addEventListener(t,c,s),()=>e.removeEventListener(t,c,s)},[e,t,s])}function Mb(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 _k="div";var Ob=(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))(Ob||{});function Mk(e,t){let r=G.useRef(null),s=Fi(r,t),{initialFocus:o,containers:c,features:p=30,...v}=e;zd()||(p=1);let C=Fd(r);zk({ownerDocument:C},!!(p&16));let A=Fk({ownerDocument:C,container:r,initialFocus:o},!!(p&2));Dk({ownerDocument:C,container:r,containers:c,previousActiveElement:A},!!(p&8));let L=Rk(),P=Nr(B=>{let q=r.current;q&&(W=>W())(()=>{bn(L.current,{[Da.Forwards]:()=>{ql(q,In.First,{skipElements:[B.relatedTarget]})},[Da.Backwards]:()=>{ql(q,In.Last,{skipElements:[B.relatedTarget]})}})})}),z=fk(),M=G.useRef(!1),H={ref:s,onKeyDown(B){B.key=="Tab"&&(M.current=!0,z.requestAnimationFrame(()=>{M.current=!1}))},onBlur(B){let q=Mb(c);r.current instanceof HTMLElement&&q.add(r.current);let W=B.relatedTarget;W instanceof HTMLElement&&W.dataset.headlessuiFocusGuard!=="true"&&(Ib(q,W)||(M.current?ql(r.current,bn(L.current,{[Da.Forwards]:()=>In.Next,[Da.Backwards]:()=>In.Previous})|In.WrapAround,{relativeTo:B.target}):B.target instanceof HTMLElement&&Zn(B.target)))}};return ge.createElement(ge.Fragment,null,!!(p&4)&&ge.createElement(mf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:zc.Focusable}),pi({ourProps:H,theirProps:v,defaultTag:_k,name:"FocusTrap"}),!!(p&4)&&ge.createElement(mf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:zc.Focusable}))}let Ok=gi(Mk),Na=Object.assign(Ok,{features:Ob}),Qi=[];if(typeof window<"u"&&typeof document<"u"){let e=function(t){t.target instanceof HTMLElement&&t.target!==document.body&&Qi[0]!==t.target&&(Qi.unshift(t.target),Qi=Qi.filter(r=>r!=null&&r.isConnected),Qi.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 Ik(e=!0){let t=G.useRef(Qi.slice());return s1(([r],[s])=>{s===!0&&r===!1&&Uo(()=>{t.current.splice(0)}),s===!1&&r===!0&&(t.current=Qi.slice())},[e,Qi,t]),Nr(()=>{var r;return(r=t.current.find(s=>s!=null&&s.isConnected))!=null?r:null})}function zk({ownerDocument:e},t){let r=Ik(t);s1(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Zn(r())},[t]);let s=G.useRef(!1);G.useEffect(()=>(s.current=!1,()=>{s.current=!0,Uo(()=>{s.current&&Zn(r())})}),[])}function Fk({ownerDocument:e,container:t,initialFocus:r},s){let o=G.useRef(null),c=Rb();return s1(()=>{if(!s)return;let p=t.current;p&&Uo(()=>{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?Zn(r.current):ql(p,In.First)===jb.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[s]),o}function Dk({ownerDocument:e,container:t,containers:r,previousActiveElement:s},o){let c=Rb();_b(e==null?void 0:e.defaultView,"focus",p=>{if(!o||!c.current)return;let v=Mb(r);t.current instanceof HTMLElement&&v.add(t.current);let C=s.current;if(!C)return;let A=p.target;A&&A instanceof HTMLElement?Ib(v,A)?(s.current=A,Zn(A)):(p.preventDefault(),p.stopPropagation(),Zn(C)):Zn(s.current)},!0)}function Ib(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let zb=G.createContext(!1);function Hk(){return G.useContext(zb)}function xf(e){return ge.createElement(zb.Provider,{value:e.force},e.children)}function Bk(e){let t=Hk(),r=G.useContext(Fb),s=Fd(e),[o,c]=G.useState(()=>{if(!t&&r!==null||Ei.isServer)return null;let p=s==null?void 0:s.getElementById("headlessui-portal-root");if(p)return p;if(s===null)return null;let v=s.createElement("div");return v.setAttribute("id","headlessui-portal-root"),s.body.appendChild(v)});return G.useEffect(()=>{o!==null&&(s!=null&&s.body.contains(o)||s==null||s.body.appendChild(o))},[o,s]),G.useEffect(()=>{t||r!==null&&c(r.current)},[r,c,t]),o}let Vk=G.Fragment;function Wk(e,t){let r=e,s=G.useRef(null),o=Fi(wk(L=>{s.current=L}),t),c=Fd(s),p=Bk(s),[v]=G.useState(()=>{var L;return Ei.isServer?null:(L=c==null?void 0:c.createElement("div"))!=null?L:null}),C=zd(),A=G.useRef(!1);return En(()=>{if(A.current=!1,!(!p||!v))return p.contains(v)||(v.setAttribute("data-headlessui-portal",""),p.appendChild(v)),()=>{A.current=!0,Uo(()=>{var L;A.current&&(!p||!v||(v instanceof Node&&p.contains(v)&&p.removeChild(v),p.childNodes.length<=0&&((L=p.parentElement)==null||L.removeChild(p))))})}},[p,v]),C?!p||!v?null:Hv.createPortal(pi({ourProps:{ref:o},theirProps:r,defaultTag:Vk,name:"Portal"}),v):null}let $k=G.Fragment,Fb=G.createContext(null);function Xk(e,t){let{target:r,...s}=e,o={ref:Fi(t)};return ge.createElement(Fb.Provider,{value:r},pi({ourProps:o,theirProps:s,defaultTag:$k,name:"Popover.Group"}))}let Yk=gi(Wk),Uk=gi(Xk),vf=Object.assign(Yk,{Group:Uk}),Db=G.createContext(null);function Hb(){let e=G.useContext(Db);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,Hb),t}return e}function Gk(){let[e,t]=G.useState([]);return[e.length>0?e.join(" "):void 0,G.useMemo(()=>function(r){let s=Nr(c=>(t(p=>[...p,c]),()=>t(p=>{let v=p.slice(),C=v.indexOf(c);return C!==-1&&v.splice(C,1),v}))),o=G.useMemo(()=>({register:s,slot:r.slot,name:r.name,props:r.props}),[s,r.slot,r.name,r.props]);return ge.createElement(Db.Provider,{value:o},r.children)},[t])]}let Zk="p";function qk(e,t){let r=ua(),{id:s=`headlessui-description-${r}`,...o}=e,c=Hb(),p=Fi(t);En(()=>c.register(s),[s,c.register]);let v={ref:p,...c.props,id:s};return pi({ourProps:v,theirProps:o,slot:c.slot||{},defaultTag:Zk,name:c.name||"Description"})}let Qk=gi(qk),Kk=Object.assign(Qk,{}),a1=G.createContext(()=>{});a1.displayName="StackContext";var yf=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(yf||{});function Jk(){return G.useContext(a1)}function eC({children:e,onUpdate:t,type:r,element:s,enabled:o}){let c=Jk(),p=Nr((...v)=>{t==null||t(...v),c(...v)});return En(()=>{let v=o===void 0||o===!0;return v&&p(0,r,s),()=>{v&&p(1,r,s)}},[p,r,s,o]),ge.createElement(a1.Provider,{value:p},e)}function tC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const rC=typeof Object.is=="function"?Object.is:tC,{useState:iC,useEffect:nC,useLayoutEffect:sC,useDebugValue:aC}=Qu;function oC(e,t,r){const s=t(),[{inst:o},c]=iC({inst:{value:s,getSnapshot:t}});return sC(()=>{o.value=s,o.getSnapshot=t,Bu(o)&&c({inst:o})},[e,s,t]),nC(()=>(Bu(o)&&c({inst:o}),e(()=>{Bu(o)&&c({inst:o})})),[e]),aC(s),s}function Bu(e){const t=e.getSnapshot,r=e.value;try{const s=t();return!rC(r,s)}catch{return!0}}function lC(e,t,r){return t()}const cC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dC=!cC,uC=dC?lC:oC,hC="useSyncExternalStore"in Qu?(e=>e.useSyncExternalStore)(Qu):uC;function fC(e){return hC(e.subscribe,e.getSnapshot,e.getSnapshot)}function pC(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 gC(){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 mC(){if(!Pk())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 xC(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function vC(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Vn=pC(()=>new Map,{PUSH(e,t){var r;let s=(r=this.get(e))!=null?r:{doc:e,count:0,d:n1(),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:vC(r)},o=[mC(),gC(),xC()];o.forEach(({before:c})=>c==null?void 0:c(s)),o.forEach(({after:c})=>c==null?void 0:c(s))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Vn.subscribe(()=>{let e=Vn.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let s=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!s||!o&&s)&&Vn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Vn.dispatch("TEARDOWN",r)}});function yC(e,t,r){let s=fC(Vn),o=e?s.get(e):void 0,c=o?o.count>0:!1;return En(()=>{if(!(!e||!t))return Vn.dispatch("PUSH",e,r),()=>Vn.dispatch("POP",e,r)},[t,e]),c}let Vu=new Map,Ea=new Map;function Qm(e,t=!0){En(()=>{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=Ea.get(s))!=null?p:1;if(v===1?Ea.delete(s):Ea.set(s,v-1),v!==1)return;let C=Vu.get(s);C&&(C["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",C["aria-hidden"]),s.inert=C.inert,Vu.delete(s))}let c=(r=Ea.get(s))!=null?r:0;return Ea.set(s,c+1),c!==0||(Vu.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),o},[e,t])}var bC=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(bC||{}),wC=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(wC||{});let kC={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Fc=G.createContext(null);Fc.displayName="DialogContext";function Go(e){let t=G.useContext(Fc);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Go),r}return t}function CC(e,t,r=()=>[document.body]){yC(e,t,s=>{var o;return{containers:[...(o=s.containers)!=null?o:[],r]}})}function SC(e,t){return bn(t.type,kC,e,t)}let AC="div",jC=gf.RenderStrategy|gf.Static;function NC(e,t){let r=ua(),{id:s=`headlessui-dialog-${r}`,open:o,onClose:c,initialFocus:p,__demoMode:v=!1,...C}=e,[A,L]=G.useState(0),P=Lk();o===void 0&&P!==null&&(o=(P&Fa.Open)===Fa.Open);let z=G.useRef(null),M=Fi(z,t),H=G.useRef(null),B=Fd(z),q=e.hasOwnProperty("open")||P!==null,W=e.hasOwnProperty("onClose");if(!q&&!W)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!q)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!W)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof c!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${c}`);let V=o?0:1,[_,K]=G.useReducer(SC,{titleId:null,descriptionId:null,panelRef:G.createRef()}),ee=Nr(()=>c(!1)),X=Nr(He=>K({type:0,id:He})),Q=zd()?v?!1:V===0:!1,J=A>1,fe=G.useContext(Fc)!==null,le=J?"parent":"leaf",Ne=P!==null?(P&Fa.Closing)===Fa.Closing:!1,ve=fe||Ne?!1:Q,Le=G.useCallback(()=>{var He,Be;return(Be=Array.from((He=B==null?void 0:B.querySelectorAll("body > *"))!=null?He:[]).find(Me=>Me.id==="headlessui-portal-root"?!1:Me.contains(H.current)&&Me instanceof HTMLElement))!=null?Be:null},[H]);Qm(Le,ve);let Fe=J?!0:Q,Re=G.useCallback(()=>{var He,Be;return(Be=Array.from((He=B==null?void 0:B.querySelectorAll("[data-headlessui-portal]"))!=null?He:[]).find(Me=>Me.contains(H.current)&&Me instanceof HTMLElement))!=null?Be:null},[H]);Qm(Re,Fe);let qe=Nr(()=>{var He,Be;return[...Array.from((He=B==null?void 0:B.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))!=null?He:[]).filter(Me=>!(Me===document.body||Me===document.head||!(Me instanceof HTMLElement)||Me.contains(H.current)||_.panelRef.current&&Me.contains(_.panelRef.current))),(Be=_.panelRef.current)!=null?Be:z.current]});bk(()=>qe(),ee,!(!Q||J));let de=!(J||V!==0);_b(B==null?void 0:B.defaultView,"keydown",He=>{de&&(He.defaultPrevented||He.key===Tb.Escape&&(He.preventDefault(),He.stopPropagation(),ee()))}),CC(B,!(Ne||V!==0||fe),qe),G.useEffect(()=>{if(V!==0||!z.current)return;let He=new ResizeObserver(Be=>{for(let Me of Be){let Nt=Me.target.getBoundingClientRect();Nt.x===0&&Nt.y===0&&Nt.width===0&&Nt.height===0&&ee()}});return He.observe(z.current),()=>He.disconnect()},[V,z,ee]);let[oe,Ae]=Gk(),je=G.useMemo(()=>[{dialogState:V,close:ee,setTitleId:X},_],[V,_,ee,X]),ze=G.useMemo(()=>({open:V===0}),[V]),Ue={ref:M,id:s,role:"dialog","aria-modal":V===0?!0:void 0,"aria-labelledby":_.titleId,"aria-describedby":oe};return ge.createElement(eC,{type:"Dialog",enabled:V===0,element:z,onUpdate:Nr((He,Be)=>{Be==="Dialog"&&bn(He,{[yf.Add]:()=>L(Me=>Me+1),[yf.Remove]:()=>L(Me=>Me-1)})})},ge.createElement(xf,{force:!0},ge.createElement(vf,null,ge.createElement(Fc.Provider,{value:je},ge.createElement(vf.Group,{target:z},ge.createElement(xf,{force:!1},ge.createElement(Ae,{slot:ze,name:"Dialog.Description"},ge.createElement(Na,{initialFocus:p,containers:qe,features:Q?bn(le,{parent:Na.features.RestoreFocus,leaf:Na.features.All&~Na.features.FocusLock}):Na.features.None},pi({ourProps:Ue,theirProps:C,slot:ze,defaultTag:AC,features:jC,visible:V===0,name:"Dialog"})))))))),ge.createElement(mf,{features:zc.Hidden,ref:H}))}let EC="div";function LC(e,t){let r=ua(),{id:s=`headlessui-dialog-overlay-${r}`,...o}=e,[{dialogState:c,close:p}]=Go("Dialog.Overlay"),v=Fi(t),C=Nr(L=>{if(L.target===L.currentTarget){if(Ak(L.currentTarget))return L.preventDefault();L.preventDefault(),L.stopPropagation(),p()}}),A=G.useMemo(()=>({open:c===0}),[c]);return pi({ourProps:{ref:v,id:s,"aria-hidden":!0,onClick:C},theirProps:o,slot:A,defaultTag:EC,name:"Dialog.Overlay"})}let PC="div";function TC(e,t){let r=ua(),{id:s=`headlessui-dialog-backdrop-${r}`,...o}=e,[{dialogState:c},p]=Go("Dialog.Backdrop"),v=Fi(t);G.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[p.panelRef]);let C=G.useMemo(()=>({open:c===0}),[c]);return ge.createElement(xf,{force:!0},ge.createElement(vf,null,pi({ourProps:{ref:v,id:s,"aria-hidden":!0},theirProps:o,slot:C,defaultTag:PC,name:"Dialog.Backdrop"})))}let RC="div";function _C(e,t){let r=ua(),{id:s=`headlessui-dialog-panel-${r}`,...o}=e,[{dialogState:c},p]=Go("Dialog.Panel"),v=Fi(t,p.panelRef),C=G.useMemo(()=>({open:c===0}),[c]),A=Nr(L=>{L.stopPropagation()});return pi({ourProps:{ref:v,id:s,onClick:A},theirProps:o,slot:C,defaultTag:RC,name:"Dialog.Panel"})}let MC="h2";function OC(e,t){let r=ua(),{id:s=`headlessui-dialog-title-${r}`,...o}=e,[{dialogState:c,setTitleId:p}]=Go("Dialog.Title"),v=Fi(t);G.useEffect(()=>(p(s),()=>p(null)),[s,p]);let C=G.useMemo(()=>({open:c===0}),[c]);return pi({ourProps:{ref:v,id:s},theirProps:o,slot:C,defaultTag:MC,name:"Dialog.Title"})}let IC=gi(NC),zC=gi(TC),FC=gi(_C),DC=gi(LC),HC=gi(OC),Dc=Object.assign(IC,{Backdrop:zC,Panel:FC,Overlay:DC,Title:HC,Description:Kk});var Bb={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Km=ge.createContext&&ge.createContext(Bb),gn=function(){return gn=Object.assign||function(e){for(var t,r=1,s=arguments.length;r{const r=window.location.pathname,s=()=>{t&&t(!1)},c=G.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(pn,{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(pn,{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(XC,{size:"1.1rem"}),"Admin dashboard"]})})}),f.jsxs("button",{onClick:()=>Sb(),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"]})]})},c1=({user:e})=>{const[t,r]=G.useState(!1),s=G.useRef(null),o=G.useRef(null),c=()=>r(p=>!p);return G.useEffect(()=>{const p=({target:v})=>{o.current&&(!t||o.current.contains(v)||s.current.contains(v)||r(!1))};return document.addEventListener("click",p),()=>document.removeEventListener("click",p)}),G.useEffect(()=>{const p=({keyCode:v})=>{!t||v!==27||r(!1)};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}),f.jsxs("div",{className:"relative",children:[f.jsxs("button",{ref:s,onClick:c,className:"flex items-center gap-4 duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue",children:[f.jsx("span",{className:"hidden text-right lg:block",children:f.jsx("span",{className:"block text-sm font-medium dark:text-captn-light-cream",children:e.username})}),f.jsx($C,{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(l1,{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 bf;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(bf||(bf={}));const ye=Je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ki=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"]),YC=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Gr 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()}}Gr.create=e=>new Gr(e);const Co=(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 Xb=Co;function UC(e){Xb=e}function Bc(){return Xb}const Vc=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}},GC=[];function ke(e,t){const r=Vc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Bc(),Co].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"}),Yb=e=>({status:"dirty",value:e}),rr=e=>({status:"valid",value:e}),wf=e=>e.status==="aborted",kf=e=>e.status==="dirty",So=e=>e.status==="valid",Wc=e=>typeof Promise<"u"&&e instanceof Promise;var _e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_e||(_e={}));class di{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 Jm=(e,t)=>{if(So(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 Gr(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 Ki(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ki(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:Ki(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Wc(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:Ki(t)},c=this._parseSync({data:t,path:o.path,parent:o});return Jm(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:Ki(t)},o=this._parse({data:t,path:s.path,parent:s}),c=await(Wc(o)?o:Promise.resolve(o));return Jm(s,c)}refine(t,r){const s=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,c)=>{const p=t(o),v=()=>c.addIssue({code:he.custom,...s(o)});return typeof Promise<"u"&&p instanceof Promise?p.then(C=>C?!0:(v(),!1)):p?!0:(v(),!1)})}refinement(t,r){return this._refinement((s,o)=>t(s)?!0:(o.addIssue(typeof r=="function"?r(s,o):r),!1))}_refinement(t){return new Qr({schema:this,typeName:Ie.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Li.create(this,this._def)}nullable(){return ss.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Zr.create(this,this._def)}promise(){return ta.create(this,this._def)}or(t){return Eo.create([this,t],this._def)}and(t){return Lo.create(this,t,this._def)}transform(t){return new Qr({...$e(this._def),schema:this,typeName:Ie.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Mo({...$e(this._def),innerType:this,defaultValue:r,typeName:Ie.ZodDefault})}brand(){return new Gb({typeName:Ie.ZodBranded,type:this,...$e(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Uc({...$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 Zo.create(this,t)}readonly(){return Zc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ZC=/^c[^\s-]{8,}$/i,qC=/^[a-z][a-z0-9]*$/,QC=/^[0-9A-HJKMNP-TV-Z]{26}$/,KC=/^[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,JC=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wu;const tS=/^(((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}))$/,rS=/^(([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})))$/,iS=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 nS(e,t){return!!((t==="v4"||!t)&&tS.test(e)||(t==="v6"||!t)&&rS.test(e))}class $r 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,..._e.errToObj(s)})}_addCheck(t){return new $r({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._e.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._e.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._e.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._e.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._e.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._e.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._e.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._e.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,..._e.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._e.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._e.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._e.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._e.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._e.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._e.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._e.errToObj(r)})}nonempty(t){return this.min(1,_e.errToObj(t))}trim(){return new $r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new $r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new $r({...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 $r({checks:[],typeName:Ie.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};function sS(e,t){const r=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,o=r>s?r:s,c=parseInt(e.toFixed(o).replace(".","")),p=parseInt(t.toFixed(o).replace(".",""));return c%p/Math.pow(10,o)}class wn extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==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"?sS(t.data,c.value)!==0&&(s=this._getOrReturnCtx(t,s),ke(s,{code:he.not_multiple_of,multipleOf:c.value,message:c.message}),o.dirty()):c.kind==="finite"?Number.isFinite(t.data)||(s=this._getOrReturnCtx(t,s),ke(s,{code:he.not_finite,message:c.message}),o.dirty()):Je.assertNever(c);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_e.toString(r))}setLimit(t,r,s,o){return new wn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:_e.toString(o)}]})}_addCheck(t){return new wn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_e.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_e.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&Je.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(r===null||s.value>r)&&(r=s.value):s.kind==="max"&&(t===null||s.valuenew wn({checks:[],typeName:Ie.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class kn extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==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,_e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_e.toString(r))}setLimit(t,r,s,o){return new kn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:_e.toString(o)}]})}_addCheck(t){return new kn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_e.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new kn({checks:[],typeName:Ie.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};class Ao 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 rr(t.data)}}Ao.create=e=>new Ao({typeName:Ie.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class is 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 is({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_e.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_e.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew is({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ie.ZodDate,...$e(e)});class $c 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 rr(t.data)}}$c.create=e=>new $c({typeName:Ie.ZodSymbol,...$e(e)});class jo 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 rr(t.data)}}jo.create=e=>new jo({typeName:Ie.ZodUndefined,...$e(e)});class No 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 rr(t.data)}}No.create=e=>new No({typeName:Ie.ZodNull,...$e(e)});class ea extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return rr(t.data)}}ea.create=e=>new ea({typeName:Ie.ZodAny,...$e(e)});class qn extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return rr(t.data)}}qn.create=e=>new qn({typeName:Ie.ZodUnknown,...$e(e)});class Oi extends Xe{_parse(t){const r=this._getOrReturnCtx(t);return ke(r,{code:he.invalid_type,expected:ye.never,received:r.parsedType}),De}}Oi.create=e=>new Oi({typeName:Ie.ZodNever,...$e(e)});class Xc 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 rr(t.data)}}Xc.create=e=>new Xc({typeName:Ie.ZodVoid,...$e(e)});class Zr 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 di(r,p,r.path,v)))).then(p=>Gt.mergeArray(s,p));const c=[...r.data].map((p,v)=>o.type._parseSync(new di(r,p,r.path,v)));return Gt.mergeArray(s,c)}get element(){return this._def.type}min(t,r){return new Zr({...this._def,minLength:{value:t,message:_e.toString(r)}})}max(t,r){return new Zr({...this._def,maxLength:{value:t,message:_e.toString(r)}})}length(t,r){return new Zr({...this._def,exactLength:{value:t,message:_e.toString(r)}})}nonempty(t){return this.min(1,t)}}Zr.create=(e,t)=>new Zr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ie.ZodArray,...$e(t)});function vs(e){if(e instanceof ft){const t={};for(const r in e.shape){const s=e.shape[r];t[r]=Li.create(vs(s))}return new ft({...e._def,shape:()=>t})}else return e instanceof Zr?new Zr({...e._def,type:vs(e.element)}):e instanceof Li?Li.create(vs(e.unwrap())):e instanceof ss?ss.create(vs(e.unwrap())):e instanceof ui?ui.create(e.items.map(t=>vs(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 Oi&&this._def.unknownKeys==="strip"))for(const A in o.data)p.includes(A)||v.push(A);const C=[];for(const A of p){const L=c[A],P=o.data[A];C.push({key:{status:"valid",value:A},value:L._parse(new di(o,P,o.path,A)),alwaysSet:A in o.data})}if(this._def.catchall instanceof Oi){const A=this._def.unknownKeys;if(A==="passthrough")for(const L of v)C.push({key:{status:"valid",value:L},value:{status:"valid",value:o.data[L]}});else if(A==="strict")v.length>0&&(ke(o,{code:he.unrecognized_keys,keys:v}),s.dirty());else if(A!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const A=this._def.catchall;for(const L of v){const P=o.data[L];C.push({key:{status:"valid",value:L},value:A._parse(new di(o,P,o.path,L)),alwaysSet:L in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const A=[];for(const L of C){const P=await L.key;A.push({key:P,value:await L.value,alwaysSet:L.alwaysSet})}return A}).then(A=>Gt.mergeObjectSync(s,A)):Gt.mergeObjectSync(s,C)}get shape(){return this._def.shape()}strict(t){return _e.errToObj,new ft({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,s)=>{var o,c,p,v;const C=(p=(c=(o=this._def).errorMap)===null||c===void 0?void 0:c.call(o,r,s).message)!==null&&p!==void 0?p:s.defaultError;return r.code==="unrecognized_keys"?{message:(v=_e.errToObj(t).message)!==null&&v!==void 0?v:C}:{message:C}}}:{}})}strip(){return new ft({...this._def,unknownKeys:"strip"})}passthrough(){return new ft({...this._def,unknownKeys:"passthrough"})}extend(t){return new ft({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ft({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ie.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new ft({...this._def,catchall:t})}pick(t){const r={};return Je.objectKeys(t).forEach(s=>{t[s]&&this.shape[s]&&(r[s]=this.shape[s])}),new ft({...this._def,shape:()=>r})}omit(t){const r={};return Je.objectKeys(this.shape).forEach(s=>{t[s]||(r[s]=this.shape[s])}),new ft({...this._def,shape:()=>r})}deepPartial(){return vs(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 Li;)c=c._def.innerType;r[s]=c}}),new ft({...this._def,shape:()=>r})}keyof(){return Ub(Je.objectKeys(this.shape))}}ft.create=(e,t)=>new ft({shape:()=>e,unknownKeys:"strip",catchall:Oi.create(),typeName:Ie.ZodObject,...$e(t)});ft.strictCreate=(e,t)=>new ft({shape:()=>e,unknownKeys:"strict",catchall:Oi.create(),typeName:Ie.ZodObject,...$e(t)});ft.lazycreate=(e,t)=>new ft({shape:e,unknownKeys:"strip",catchall:Oi.create(),typeName:Ie.ZodObject,...$e(t)});class Eo 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 Gr(v.ctx.common.issues));return ke(r,{code:he.invalid_union,unionErrors:p}),De}if(r.common.async)return Promise.all(s.map(async c=>{const p={...r,common:{...r.common,issues:[]},parent:null};return{result:await c._parseAsync({data:r.data,path:r.path,parent:p}),ctx:p}})).then(o);{let c;const p=[];for(const C of s){const A={...r,common:{...r.common,issues:[]},parent:null},L=C._parseSync({data:r.data,path:r.path,parent:A});if(L.status==="valid")return L;L.status==="dirty"&&!c&&(c={result:L,ctx:A}),A.common.issues.length&&p.push(A.common.issues)}if(c)return r.common.issues.push(...c.ctx.common.issues),c.result;const v=p.map(C=>new Gr(C));return ke(r,{code:he.invalid_union,unionErrors:v}),De}}get options(){return this._def.options}}Eo.create=(e,t)=>new Eo({options:e,typeName:Ie.ZodUnion,...$e(t)});const Ql=e=>e instanceof To?Ql(e.schema):e instanceof Qr?Ql(e.innerType()):e instanceof Ro?[e.value]:e instanceof Cn?e.options:e instanceof _o?Object.keys(e.enum):e instanceof Mo?Ql(e._def.innerType):e instanceof jo?[void 0]:e instanceof No?[null]:null;class Dd 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=Ql(c.shape[t]);if(!p)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const v of p){if(o.has(v))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(v)}`);o.set(v,c)}}return new Dd({typeName:Ie.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...$e(s)})}}function Cf(e,t){const r=Ki(e),s=Ki(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=Cf(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(wf(c)||wf(p))return De;const v=Cf(c.value,p.value);return v.valid?((kf(c)||kf(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}))}}Lo.create=(e,t,r)=>new Lo({left:e,right:t,typeName:Ie.ZodIntersection,...$e(r)});class ui 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 di(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 ui({...this._def,rest:t})}}ui.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ui({items:e,typeName:Ie.ZodTuple,rest:null,...$e(t)})};class Po 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 di(s,v,s.path,v)),value:p._parse(new di(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 Po({keyType:t,valueType:r,typeName:Ie.ZodRecord,...$e(s)}):new Po({keyType:$r.create(),valueType:t,typeName:Ie.ZodRecord,...$e(r)})}}class Yc 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 di(s,v,s.path,[A,"key"])),value:c._parse(new di(s,C,s.path,[A,"value"]))}));if(s.common.async){const v=new Map;return Promise.resolve().then(async()=>{for(const C of p){const A=await C.key,L=await C.value;if(A.status==="aborted"||L.status==="aborted")return De;(A.status==="dirty"||L.status==="dirty")&&r.dirty(),v.set(A.value,L.value)}return{status:r.value,value:v}})}else{const v=new Map;for(const C of p){const A=C.key,L=C.value;if(A.status==="aborted"||L.status==="aborted")return De;(A.status==="dirty"||L.status==="dirty")&&r.dirty(),v.set(A.value,L.value)}return{status:r.value,value:v}}}}Yc.create=(e,t,r)=>new Yc({valueType:t,keyType:e,typeName:Ie.ZodMap,...$e(r)});class ns 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 L of C){if(L.status==="aborted")return De;L.status==="dirty"&&r.dirty(),A.add(L.value)}return{status:r.value,value:A}}const v=[...s.data.values()].map((C,A)=>c._parse(new di(s,C,s.path,A)));return s.common.async?Promise.all(v).then(C=>p(C)):p(v)}min(t,r){return new ns({...this._def,minSize:{value:t,message:_e.toString(r)}})}max(t,r){return new ns({...this._def,maxSize:{value:t,message:_e.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}ns.create=(e,t)=>new ns({valueType:e,minSize:null,maxSize:null,typeName:Ie.ZodSet,...$e(t)});class Bs 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 Vc({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Bc(),Co].filter(A=>!!A),issueData:{code:he.invalid_arguments,argumentsError:C}})}function o(v,C){return Vc({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Bc(),Co].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 ta){const v=this;return rr(async function(...C){const A=new Gr([]),L=await v._def.args.parseAsync(C,c).catch(M=>{throw A.addIssue(s(C,M)),A}),P=await Reflect.apply(p,this,L);return await v._def.returns._def.type.parseAsync(P,c).catch(M=>{throw A.addIssue(o(P,M)),A})})}else{const v=this;return rr(function(...C){const A=v._def.args.safeParse(C,c);if(!A.success)throw new Gr([s(C,A.error)]);const L=Reflect.apply(p,this,A.data),P=v._def.returns.safeParse(L,c);if(!P.success)throw new Gr([o(L,P.error)]);return P.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Bs({...this._def,args:ui.create(t).rest(qn.create())})}returns(t){return new Bs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,s){return new Bs({args:t||ui.create([]).rest(qn.create()),returns:r||qn.create(),typeName:Ie.ZodFunction,...$e(s)})}}class To 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})}}To.create=(e,t)=>new To({getter:e,typeName:Ie.ZodLazy,...$e(t)});class Ro 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}}Ro.create=(e,t)=>new Ro({value:e,typeName:Ie.ZodLiteral,...$e(t)});function Ub(e,t){return new Cn({values:e,typeName:Ie.ZodEnum,...$e(t)})}class Cn extends Xe{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),s=this._def.values;return ke(r,{expected:Je.joinValues(s),received:r.parsedType,code:he.invalid_type}),De}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),s=this._def.values;return ke(r,{received:r.data,code:he.invalid_enum_value,options:s}),De}return rr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t){return Cn.create(t)}exclude(t){return Cn.create(this.options.filter(r=>!t.includes(r)))}}Cn.create=Ub;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 rr(t.data)}get enum(){return this._def.values}}_o.create=(e,t)=>new _o({values:e,typeName:Ie.ZodNativeEnum,...$e(t)});class ta 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 rr(s.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ta.create=(e,t)=>new ta({type:e,typeName:Ie.ZodPromise,...$e(t)});class Qr extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ie.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:s}=this._processInputParams(t),o=this._def.effect||null,c={addIssue:p=>{ke(s,p),p.fatal?r.abort():r.dirty()},get path(){return s.path}};if(c.addIssue=c.addIssue.bind(c),o.type==="preprocess"){const p=o.transform(s.data,c);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(p).then(v=>this._def.schema._parseAsync({data:v,path:s.path,parent:s})):this._def.schema._parseSync({data:p,path:s.path,parent:s})}if(o.type==="refinement"){const p=v=>{const C=o.refinement(v,c);if(s.common.async)return Promise.resolve(C);if(C instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return v};if(s.common.async===!1){const v=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return v.status==="aborted"?De:(v.status==="dirty"&&r.dirty(),p(v.value),{status:r.value,value:v.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(v=>v.status==="aborted"?De:(v.status==="dirty"&&r.dirty(),p(v.value).then(()=>({status:r.value,value:v.value}))))}if(o.type==="transform")if(s.common.async===!1){const p=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!So(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=>So(p)?Promise.resolve(o.transform(p.value,c)).then(v=>({status:r.value,value:v})):p);Je.assertNever(o)}}Qr.create=(e,t,r)=>new Qr({schema:e,typeName:Ie.ZodEffects,effect:t,...$e(r)});Qr.createWithPreprocess=(e,t,r)=>new Qr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ie.ZodEffects,...$e(r)});class Li extends Xe{_parse(t){return this._getType(t)===ye.undefined?rr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Li.create=(e,t)=>new Li({innerType:e,typeName:Ie.ZodOptional,...$e(t)});class ss extends Xe{_parse(t){return this._getType(t)===ye.null?rr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ss.create=(e,t)=>new ss({innerType:e,typeName:Ie.ZodNullable,...$e(t)});class Mo 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}}Mo.create=(e,t)=>new Mo({innerType:e,typeName:Ie.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class Uc 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 Wc(o)?o.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Gr(s.common.issues)},input:s.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Gr(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Uc.create=(e,t)=>new Uc({innerType:e,typeName:Ie.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class Gc 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}}}Gc.create=e=>new Gc({typeName:Ie.ZodNaN,...$e(e)});const aS=Symbol("zod_brand");class Gb 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 Zo 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(),Yb(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 Zo({in:t,out:r,typeName:Ie.ZodPipeline})}}class Zc extends Xe{_parse(t){const r=this._def.innerType._parse(t);return So(r)&&(r.value=Object.freeze(r.value)),r}}Zc.create=(e,t)=>new Zc({innerType:e,typeName:Ie.ZodReadonly,...$e(t)});const Zb=(e,t={},r)=>e?ea.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})}}):ea.create(),oS={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 lS=(e,t={message:`Input not instance of ${e.name}`})=>Zb(r=>r instanceof e,t),qb=$r.create,Qb=wn.create,cS=Gc.create,dS=kn.create,Kb=Ao.create,uS=is.create,hS=$c.create,fS=jo.create,pS=No.create,gS=ea.create,mS=qn.create,xS=Oi.create,vS=Xc.create,yS=Zr.create,bS=ft.create,wS=ft.strictCreate,kS=Eo.create,CS=Dd.create,SS=Lo.create,AS=ui.create,jS=Po.create,NS=Yc.create,ES=ns.create,LS=Bs.create,PS=To.create,TS=Ro.create,RS=Cn.create,_S=_o.create,MS=ta.create,e0=Qr.create,OS=Li.create,IS=ss.create,zS=Qr.createWithPreprocess,FS=Zo.create,DS=()=>qb().optional(),HS=()=>Qb().optional(),BS=()=>Kb().optional(),VS={string:e=>$r.create({...e,coerce:!0}),number:e=>wn.create({...e,coerce:!0}),boolean:e=>Ao.create({...e,coerce:!0}),bigint:e=>kn.create({...e,coerce:!0}),date:e=>is.create({...e,coerce:!0})},WS=De;var $S=Object.freeze({__proto__:null,defaultErrorMap:Co,setErrorMap:UC,getErrorMap:Bc,makeIssue:Vc,EMPTY_PATH:GC,addIssueToContext:ke,ParseStatus:Gt,INVALID:De,DIRTY:Yb,OK:rr,isAborted:wf,isDirty:kf,isValid:So,isAsync:Wc,get util(){return Je},get objectUtil(){return bf},ZodParsedType:ye,getParsedType:Ki,ZodType:Xe,ZodString:$r,ZodNumber:wn,ZodBigInt:kn,ZodBoolean:Ao,ZodDate:is,ZodSymbol:$c,ZodUndefined:jo,ZodNull:No,ZodAny:ea,ZodUnknown:qn,ZodNever:Oi,ZodVoid:Xc,ZodArray:Zr,ZodObject:ft,ZodUnion:Eo,ZodDiscriminatedUnion:Dd,ZodIntersection:Lo,ZodTuple:ui,ZodRecord:Po,ZodMap:Yc,ZodSet:ns,ZodFunction:Bs,ZodLazy:To,ZodLiteral:Ro,ZodEnum:Cn,ZodNativeEnum:_o,ZodPromise:ta,ZodEffects:Qr,ZodTransformer:Qr,ZodOptional:Li,ZodNullable:ss,ZodDefault:Mo,ZodCatch:Uc,ZodNaN:Gc,BRAND:aS,ZodBranded:Gb,ZodPipeline:Zo,ZodReadonly:Zc,custom:Zb,Schema:Xe,ZodSchema:Xe,late:oS,get ZodFirstPartyTypeKind(){return Ie},coerce:VS,any:gS,array:yS,bigint:dS,boolean:Kb,date:uS,discriminatedUnion:CS,effect:e0,enum:RS,function:LS,instanceof:lS,intersection:SS,lazy:PS,literal:TS,map:NS,nan:cS,nativeEnum:_S,never:xS,null:pS,nullable:IS,number:Qb,object:bS,oboolean:BS,onumber:HS,optional:OS,ostring:DS,pipeline:FS,preprocess:zS,promise:MS,record:jS,set:ES,strictObject:wS,string:qb,symbol:hS,transformer:e0,tuple:AS,undefined:fS,union:kS,unknown:mS,void:vS,NEVER:WS,ZodIssueCode:he,quotelessJson:YC,ZodError:Gr}),d1=(e=>(e.HOBBY="hobby-tier",e.PRO="pro-tier",e.ENTERPRISE="enterprise-tier",e))(d1||{});const XS="https://docs.opensaas.sh",YS="https://docs.opensaas.sh/blog",US="https://billing.stripe.com/p/login/test_aEU17i3Iz0XT5mUfYY",Jb="https://billing.stripe.com/p/login/14kaGs1cL3FX1PidQQ",e2=Jb;GS({customerPortalTestUrl:US,customerPortalProdUrl:Jb});function GS(e){const t=$S.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 t2(){const e=Kr(),[t,r]=G.useState(!1),{data:s}=Mr();async function o(c){if(!s)e.push("/login");else try{r(!0);let p=await wb(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(d1.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 Sf=({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(t2,{}):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"}],ZS=[{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:""}],qS=[{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:""}],QS={app:[{name:"Documentation",href:XS},{name:"Blog",href:YS}],company:[{name:"Privacy Policy",href:"/privacy"},{name:"Terms & Conditions",href:"/toc"}]},KS=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:o1,alt:"Capt’n.ai"});function r2(){const[e,t]=G.useState(!1),{data:r,isLoading:s}=Mr();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:o1,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($b,{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(Sf,{user:r,renderGoToChat:!1})}),s?null:r?f.jsx("div",{className:"ml-4",children:f.jsx(c1,{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(Hc,{size:"1.1rem",className:"ml-1 mt-[0.1rem]"})]})})]})]}),f.jsxs(Dc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Dc.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(KS,{})]}),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(Wb,{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(l1,{user:r,setMobileMenuOpen:t}):f.jsxs("div",{className:"text-right",children:[f.jsx(pn,{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(pn,{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(Hc,{size:"1.1rem",className:"ml-1"})]})})]})})]})})]})]})]})}const i2="/assets/captn-logo-BNDZAGdh.png",n2=({loadingMessage:e="Loading...",bgColor:t="bg-captn-dark-blue",showLogo:r=!0})=>{const[s,o]=G.useState(0),c=["—","\\","|","/"];return G.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:i2,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 JS(){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(n2,{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 eA={display:"flex",alignItems:"center",justifyContent:"center",padding:"4rem"},tA={display:"flex",alignItems:"center",gap:".5rem",borderRadius:".5rem",padding:"1rem"},rA=()=>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 u1(){return f.jsx("div",{style:eA,children:f.jsx("div",{className:"bg-captn-light-cream text-captn-dark-blue",style:tA,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(rA,{})," Loading..."]})})})})})}const{styled:cs,css:VL}=Up({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 iA(e){return e==null?void 0:e.replace(/\/$/,"")}const nA=iA("https://backend.captn.ai")||"http://localhost:3001",sA={apiUrl:nA},aA=cs("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),oA=cs(aA,{background:"#bb6e90",color:"#eae4d9"}),s2=({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(oA,{style:{border:"1px solid #bb6e90"},children:[o.title,o.description&&": ",o.description]})})]}),lA=cs("div",{marginTop:"1.5rem",marginBottom:"1.5rem"}),cA=cs("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"}}}}),dA=`${sA.apiUrl}/auth/google/login`,a2={title:"To proceed, please ensure you've accepted our Terms & Conditions and Privacy Policy.",description:""},uA=({state:e,socialButtonsDirection:t="horizontal",additionalSignupFields:r,errorMessage:s})=>{const{isLoading:o,setErrorMessage:c,setSuccessMessage:p,setIsLoading:v}=G.useContext(h1),[C,A]=G.useState(!1),[L,P]=G.useState(!1),[z,M]=G.useState(e);P7(),G.useEffect(()=>{C&&c(null)},[C]);const H=_=>{A(_.target.checked)},B=_=>{P(_.target.checked)},q=()=>{localStorage.removeItem("hasAcceptedTos"),localStorage.removeItem("hasSubscribedToMarketingEmails"),localStorage.setItem("hasAcceptedTos",JSON.stringify(C)),localStorage.setItem("hasSubscribedToMarketingEmails",JSON.stringify(L))},W=(_,K)=>{_.preventDefault(),z===Mn.Login||C?(q(),window.location.href=K):c(a2)},V=z===Mn.Login?"Sign in with Google":"Sign up with Google";return f.jsxs(f.Fragment,{children:[z===Mn.Signup&&f.jsx(s2,{tocChecked:C,handleTocChange:H,marketingEmailsChecked:L,handleMarketingEmailsChange:B,errorMessage:s}),f.jsx(lA,{children:f.jsx(cA,{gap:"large",direction:t,children:f.jsxs("button",{className:"gsi-material-button",onClick:_=>W(_,dA),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:[z===Mn.Login?"Don't have an account? ":"Already have an account? ",f.jsx(pn,{to:z===Mn.Login?"/signup":"/login",className:"no-underline hover:underline cursor-pointer",children:z===Mn.Login?"Sign up":"Sign in"})]})})]})};var Mn=(e=>(e.Login="login",e.Signup="signup",e))(Mn||{});const hA=cs("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),fA=cs(hA,{background:"$successBackground",color:"$successText"}),pA={height:"6rem"};cs("div",{display:"flex",flexDirection:"column"});const h1=G.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}}),t0={login:"Sign in to your account",signup:"Create an account"};function gA({state:e,appearance:t,logo:r,socialLayout:s="horizontal",additionalSignupFields:o}){const[c,p]=G.useState(null),[v,C]=G.useState(null),[A,L]=G.useState(!1),P=l7(t??{}),z=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:pA,src:r,alt:"Capt’n.ai"}),f.jsx("p",{className:"mt-7 text-2xl",children:e==="signup"?t0.signup:t0.login})]}),v&&f.jsx(fA,{children:v}),f.jsx(h1.Provider,{value:{isLoading:A,setIsLoading:L,setErrorMessage:p,setSuccessMessage:C},children:(e==="login"||e==="signup")&&f.jsx(uA,{state:e,socialButtonsDirection:z,additionalSignupFields:o,errorMessage:c})})]})}const mA="Before accessing the application, please confirm your agreement to the Terms & Conditions and Privacy Policy.",r0=()=>{const e=Kr();G.useContext(h1);const[t,r]=G.useState(null),[s,o]=G.useState(!1),[c,p]=G.useState(!1);G.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),Ja({isSignUpComplete:!0,hasAcceptedTos:s,...c&&{hasSubscribedToMarketingEmails:c}}),e.push("/chat")):r(a2)},L=G.useMemo(()=>location.pathname.startsWith("/account"),[location]);return f.jsxs(f.Fragment,{children:[!L&&f.jsx(r2,{}),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:mA}),f.jsx(s2,{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"})})]})})})]})},xA=()=>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:QS.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))})})})})}),vA=()=>{document.body.classList.contains("server-error")||document.body.classList.add("server-error")},yA=()=>{document.body.classList.contains("server-error")&&document.body.classList.remove("server-error")};function bA({children:e}){const t=aa(),[r,s]=G.useState(!1),{data:o,isError:c,isLoading:p}=Mr(),v=G.useMemo(()=>t.pathname!=="/",[t]),C=G.useMemo(()=>t.pathname.startsWith("/admin"),[t]),A=G.useMemo(()=>t.pathname.startsWith("/chat"),[t]),L=G.useMemo(()=>t.pathname.startsWith("/checkout"),[t]),P=G.useMemo(()=>t.pathname.startsWith("/account"),[t]);return G.useEffect(()=>{if(o)if(o.isSignUpComplete){s(!1);const z=new Date(o.lastActiveTimestamp),M=new Date;M.getTime()-z.getTime()>5*60*1e3&&Ja({lastActiveTimestamp:M})}else if(o.hasAcceptedTos)Ja({isSignUpComplete:!0}),s(!1);else{const z=localStorage.getItem("hasAcceptedTos")==="true",M=localStorage.getItem("hasSubscribedToMarketingEmails")==="true";z?(Ja({isSignUpComplete:!0,hasAcceptedTos:z,hasSubscribedToMarketingEmails:M}),s(!1)):s(!0)}},[o]),G.useEffect(()=>{if(t.hash){const z=t.hash.replace("#",""),M=document.getElementById(z);M&&M.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&&(vA(),f.jsx(JS,{})),C||A?f.jsx(f.Fragment,{children:r?f.jsx(f.Fragment,{children:f.jsx(r0,{})}):e}):f.jsxs("div",{className:"relative flex flex-col min-h-screen justify-between",children:[v&&f.jsx(r2,{}),f.jsx("div",{className:"mx-auto max-w-7xl sm:px-6 lg:px-8 w-full",children:c?e:p?f.jsx(u1,{}):(yA(),r&&(L||P)?f.jsx(f.Fragment,{children:f.jsx(r0,{})}):e)}),f.jsxs("div",{children:[f.jsx(xA,{}),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 zr=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Mr();return o?r?f.jsx(e,{...t,user:r}):f.jsx(Ld,{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."})},wA="/assets/agent-chat-BGsqR59C.png";function kA(){const[e,t]=G.useState(!1),{data:r,isLoading:s}=Mr(),o=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:o1,alt:"Capt’n.ai"});return Kr(),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($b,{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(Sf,{user:r,renderGoToChat:!1}),s?null:r?f.jsx(c1,{user:r}):f.jsx(pn,{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(Hc,{size:"1.1rem",className:"ml-1"})]})})]})})]}),f.jsxs(Dc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Dc.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(Wb,{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(l1,{user:r}):f.jsxs("div",{className:"text-right",children:[f.jsx(pn,{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(pn,{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(Hc,{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(Sf,{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:wA,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:ZS.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:qS.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 o2({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 l2="/assets/captn-logo-large-Soxu_L3b.png";var c2=(e=>(e.Login="login",e.Signup="signup",e))(c2||{});function CA(){const e=Kr(),{data:t}=Mr();return G.useEffect(()=>{t&&e.push("/")},[t,e]),f.jsx(o2,{children:f.jsx(d2,{logo:l2,state:"login"})})}function d2({appearance:e,logo:t,socialLayout:r,state:s}){return f.jsx(gA,{appearance:e,logo:t,socialLayout:r,state:s})}function SA(){return f.jsx(o2,{children:f.jsx(d2,{logo:l2,state:c2.Signup})})}function AA(){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 jA(){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 hi=Object.create(null);hi.open="0";hi.close="1";hi.ping="2";hi.pong="3";hi.message="4";hi.upgrade="5";hi.noop="6";const Kl=Object.create(null);Object.keys(hi).forEach(e=>{Kl[hi[e]]=e});const Af={type:"error",data:"parser error"},u2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",h2=typeof ArrayBuffer=="function",f2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,f1=({type:e,data:t},r,s)=>u2&&t instanceof Blob?r?s(t):i0(t,s):h2&&(t instanceof ArrayBuffer||f2(t))?r?s(t):i0(new Blob([t]),s):s(hi[e]+(t||"")),i0=(e,t)=>{const r=new FileReader;return r.onload=function(){const s=r.result.split(",")[1];t("b"+(s||""))},r.readAsDataURL(e)};function n0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let $u;function NA(e,t){if(u2&&e.data instanceof Blob)return e.data.arrayBuffer().then(n0).then(t);if(h2&&(e.data instanceof ArrayBuffer||f2(e.data)))return t(n0(e.data));f1(e,!1,r=>{$u||($u=new TextEncoder),t($u.encode(r))})}const s0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ha=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,r=e.length,s,o=0,c,p,v,C;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const A=new ArrayBuffer(t),L=new Uint8Array(A);for(s=0;s>4,L[o++]=(p&15)<<4|v>>2,L[o++]=(v&3)<<6|C&63;return A},LA=typeof ArrayBuffer=="function",p1=(e,t)=>{if(typeof e!="string")return{type:"message",data:p2(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:PA(e.substring(1),t)}:Kl[r]?e.length>1?{type:Kl[r],data:e.substring(1)}:{type:Kl[r]}:Af},PA=(e,t)=>{if(LA){const r=EA(e);return p2(r,t)}else return{base64:!0,data:e}},p2=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},g2="",TA=(e,t)=>{const r=e.length,s=new Array(r);let o=0;e.forEach((c,p)=>{f1(c,!1,v=>{s[p]=v,++o===r&&t(s.join(g2))})})},RA=(e,t)=>{const r=e.split(g2),s=[];for(let o=0;o{const s=r.length;let o;if(s<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,s);else if(s<65536){o=new Uint8Array(3);const c=new DataView(o.buffer);c.setUint8(0,126),c.setUint16(1,s)}else{o=new Uint8Array(9);const c=new DataView(o.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(s))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(r)})}})}let Xu;function jl(e){return e.reduce((t,r)=>t+r.length,0)}function Nl(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(Af);break}o=L*Math.pow(2,32)+A.getUint32(4),s=3}else{if(jl(r)e){v.enqueue(Af);break}}}})}const m2=4;function Ft(e){if(e)return OA(e)}function OA(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 IA=Ar.setTimeout,zA=Ar.clearTimeout;function Hd(e,t){t.useNativeTimers?(e.setTimeoutFn=IA.bind(Ar),e.clearTimeoutFn=zA.bind(Ar)):(e.setTimeoutFn=Ar.setTimeout.bind(Ar),e.clearTimeoutFn=Ar.clearTimeout.bind(Ar))}const FA=1.33;function DA(e){return typeof e=="string"?HA(e):Math.ceil((e.byteLength||e.size)*FA)}function HA(e){let t=0,r=0;for(let s=0,o=e.length;s=57344?r+=3:(s++,r+=4);return r}function BA(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function VA(e){let t={},r=e.split("&");for(let s=0,o=r.length;s0);return t}function y2(){const e=l0(+new Date);return e!==o0?(a0=0,o0=e):e+"."+l0(a0++)}for(;El{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)};RA(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,TA(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=y2()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new oi(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 oi extends Ft{constructor(t,r){super(),Hd(this,r),this.opts=r,this.method=r.method||"GET",this.uri=t,this.data=r.data!==void 0?r.data:null,this.create()}create(){var t;const r=x2(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const s=this.xhr=new w2(r);try{s.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(s.timeout=this.opts.requestTimeout),s.onreadystatechange=()=>{var o;s.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(s)),s.readyState===4&&(s.status===200||s.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof s.status=="number"?s.status:0)},0))},s.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=oi.requestsCount++,oi.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=YA,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete oi.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()}}oi.requestsCount=0;oi.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",c0);else if(typeof addEventListener=="function"){const e="onpagehide"in Ar?"pagehide":"unload";addEventListener(e,c0,!1)}}function c0(){for(let e in oi.requests)oi.requests.hasOwnProperty(e)&&oi.requests[e].abort()}const m1=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),Ll=Ar.WebSocket||Ar.MozWebSocket,d0=!0,ZA="arraybuffer",u0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class qA extends g1{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=u0?{}:x2(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=d0&&!u0?r?new Ll(t,r):new Ll(t):new Ll(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{d0&&this.ws.send(c)}catch{}o&&m1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=y2()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!Ll}}class QA extends g1{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=MA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(r).getReader(),o=_A();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&&m1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const KA={websocket:qA,webtransport:QA,polling:GA},JA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ej=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Nf(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=JA.exec(e||""),c={},p=14;for(;p--;)c[ej[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=tj(c,c.path),c.queryKey=rj(c,c.query),c}function tj(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 rj(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,c){o&&(r[o]=c)}),r}let k2=class ys extends Ft{constructor(t,r={}){super(),this.binaryType=ZA,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=Nf(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=Nf(r.host).host),Hd(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=VA(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=m2,r.transport=t,this.id&&(r.sid=this.id);const s=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new KA[t](s)}open(){let t;if(this.opts.rememberUpgrade&&ys.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;ys.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;ys.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(L(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const z=new Error("probe error");z.transport=r.name,this.emitReserved("upgradeError",z)}}))};function c(){s||(s=!0,L(),r.close(),r=null)}const p=P=>{const z=new Error("probe error: "+P);z.transport=r.name,c(),this.emitReserved("upgradeError",z)};function v(){p("transport closed")}function C(){p("socket closed")}function A(P){r&&P.name!==r.name&&c()}const L=()=>{r.removeListener("open",o),r.removeListener("error",p),r.removeListener("close",v),this.off("close",C),this.off("upgrading",A)};r.once("open",o),r.once("error",p),r.once("close",v),this.once("close",C),this.once("upgrading",A),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||r.open()},200):r.open()}onOpen(){if(this.readyState="open",ys.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){ys.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,r){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const r=[];let s=0;const o=t.length;for(;stypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,C2=Object.prototype.toString,oj=typeof Blob=="function"||typeof Blob<"u"&&C2.call(Blob)==="[object BlobConstructor]",lj=typeof File=="function"||typeof File<"u"&&C2.call(File)==="[object FileConstructor]";function x1(e){return sj&&(e instanceof ArrayBuffer||aj(e))||oj&&e instanceof Blob||lj&&e instanceof File}function Jl(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}ha.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};ha.prototype.reset=function(){this.attempts=0};ha.prototype.setMin=function(e){this.ms=e};ha.prototype.setMax=function(e){this.max=e};ha.prototype.setJitter=function(e){this.jitter=e};class Pf extends Yt{constructor(t,r){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Hd(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((s=r.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new ha({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||gj;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new k2(this.uri,this.opts);const r=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=Hr(r,"open",function(){s.onopen(),t&&t()}),c=v=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",v),t?t(v):this.maybeReconnectOnOpen()},p=Hr(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(Hr(t,"ping",this.onping.bind(this)),Hr(t,"data",this.ondata.bind(this)),Hr(t,"error",this.onerror.bind(this)),Hr(t,"close",this.onclose.bind(this)),Hr(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){m1(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new S2(this,t,r),this.nsps[t]=s),s}_destroy(t){const r=Object.keys(this.nsps);for(const s of r)if(this.nsps[s].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let s=0;st()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,r){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},r);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const La={};function ec(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=ij(e,t.path||"/socket.io"),s=r.source,o=r.id,c=r.path,p=La[o]&&c in La[o].nsps,v=t.forceNew||t["force new connection"]||t.multiplex===!1||p;let C;return v?C=new Pf(s,t):(La[o]||(La[o]=new Pf(s,t)),C=La[o]),r.query&&!t.query&&(t.query=r.queryKey),C.socket(r.path,t)}Object.assign(ec,{Manager:Pf,Socket:S2,io:ec,connect:ec});const Vr=ec(Ly.apiUrl,{autoConnect:!0});function y1(){Vr.auth={sessionId:Ky()},Vr.connected&&(Vr.disconnect(),Vr.connect())}y1();rs.on("sessionId.set",y1);rs.on("sessionId.clear",y1);const b1=G.createContext({socket:Vr,isConnected:!1});function vj({children:e}){const[t,r]=G.useState(Vr.connected);return G.useEffect(()=>{function s(){r(!0)}function o(){r(!1)}return Vr.on("connect",s),Vr.on("disconnect",o),()=>{Vr.off("connect",s),Vr.off("disconnect",o)}},[]),f.jsx(b1.Provider,{value:{socket:Vr,isConnected:t},children:e})}function yj(){return G.useContext(b1)}function Qc(e,t){const{socket:r}=G.useContext(b1);G.useEffect(()=>(r.on(e,t),()=>{r.off(e,t)}),[e,t])}const A2=e=>f.jsx("header",{className:"sticky top-0 z-999 flex w-full bg-captn-light-cream dark:bg-boxdark dark:drop-shadow-none",children:f.jsxs("div",{className:"flex flex-grow items-center justify-between sm:justify-end sm:gap-5 px-8 py-5 shadow ",children:[f.jsx("div",{className:"flex items-center gap-2 sm:gap-4 lg:hidden",children:f.jsx("button",{"aria-controls":"sidebar",onClick:t=>{t.stopPropagation(),e.setSidebarOpen(!e.sidebarOpen)},className:"z-99999 block rounded-sm border border-stroke bg-captn-light-cream p-1.5 shadow-sm dark:border-strokedark dark:bg-boxdark lg:hidden",children:f.jsxs("span",{className:"relative block h-5.5 w-5.5 cursor-pointer",children:[f.jsxs("span",{className:"du-block absolute right-0 h-full w-full",children:[f.jsx("span",{className:`relative top-0 left-0 my-1 block h-0.5 w-0 rounded-sm bg-black delay-[0] duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!w-full delay-300"}`}),f.jsx("span",{className:`relative top-0 left-0 my-1 block h-0.5 w-0 rounded-sm bg-black delay-150 duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"delay-400 !w-full"}`}),f.jsx("span",{className:`relative top-0 left-0 my-1 block h-0.5 w-0 rounded-sm bg-black delay-200 duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!w-full delay-500"}`})]}),f.jsxs("span",{className:"absolute right-0 h-full w-full rotate-45",children:[f.jsx("span",{className:`absolute left-2.5 top-0 block h-full w-0.5 rounded-sm bg-black delay-300 duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!h-0 !delay-[0]"}`}),f.jsx("span",{className:`delay-400 absolute left-0 top-2.5 block h-0.5 w-full rounded-sm bg-black duration-200 ease-in-out dark:bg-white ${!e.sidebarOpen&&"!h-0 !delay-200"}`})]})]})})}),f.jsx("ul",{className:"flex items-center gap-2 2xsm:gap-4"}),f.jsx("div",{className:"flex items-center gap-3 2xsm:gap-7",children:!!e.user&&f.jsx(c1,{user:e.user})})]})}),j2="/assets/logo-for-dark-bg-B0Sa7V_h.png";function bj(e){return ls({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 wj=({chatId:e,chatName:t,onValueChange:r})=>{const[s,o]=G.useState(!1),[c,p]=G.useState(t),v=G.useRef(null);G.useEffect(()=>{var z;s&&((z=v.current)==null||z.focus())},[s]),G.useEffect(()=>{p(t)},[t]);const C=z=>{z.preventDefault(),o(!0)},A=z=>{p(z.target.value)},L=z=>{z.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:L,"data-testid":"edit-form",children:f.jsx("input",{ref:v,type:"text",onChange:A,onBlur:P,value:c,className:"w-5/6 focus:outline-none focus:ring-0 focus:border-captn-light-blue bg-captn-light-cream text-captn-dark-blue",style:{height:"23px",paddingLeft:"5px",marginLeft:"-5px"}})}),!s&&f.jsx("button",{className:"edit-button absolute right-3 top-3 text-sm",onClick:C,"data-testid":"edit-button",children:f.jsx(bj,{})})]})},kj="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 Cj(e){return e.map(r=>({role:r.role,content:r.message}))}async function Sj(e,t,r){t&&r(),await ci({id:e,data:{smartSuggestions:{suggestions:[""],type:""},userRespondedWithNextAction:t}})}async function Aj(e,t,r){let s;r?s=await Y9(e):s=await G9({chatId:e,userQuery:t,role:"user"});const o=Cj(s);return await ci({id:e,data:{showLoader:!0}}),o}async function jj(e,t,r){return await Z9({chatId:e,userQuery:r?"":t,role:"assistant",isLoading:!0})}const Nj=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 ci({id:c,data:{showLoader:!1,team_status:"inprogress"}})},Ej=async(e,t,r,s,o,c)=>{const p=await q9({chatId:e,messages:o});await Lj(p,t,r,s,o,e,c)},Lj=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 ci({id:c,data:{streamAgentResponse:!0,showLoader:!1,smartSuggestions:e.smart_suggestions}})),e.content&&await kb({id:r.id,data:{isLoading:!1,message:e.content}});const v=t.isChatNameUpdated?null:e.conversation_name?e.conversation_name:null;await ci({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()},Pj=async(e,t,r,s)=>{await ci({id:t,data:{showLoader:!1}}),console.log("Error: "+e.message),e.message==="No Subscription Found"?s.push("/pricing"):(await kb({id:r.id,data:{isLoading:!1,message:kj}}),await ci({id:t,data:{showLoader:!1,smartSuggestions:{suggestions:["Let's try again"],type:"oneOf"},isExceptionOccured:!0}}))},Tj=e=>e.chatType!=="daily_analysis"||e.shouldShowChat,Rj=({sidebarOpen:e,setSidebarOpen:t,refetchAllChatDetails:r})=>{const s=Kr(),o=aa(),{pathname:c}=o,p=c.split("/").pop(),v=G.useRef(null),C=G.useRef(null),A=localStorage.getItem("sidebar-expanded"),[L,P]=G.useState(A===null?!1:A==="true"),z=async(W,V)=>{try{await ci({id:W,data:{name:V,isChatNameUpdated:!0}})}catch{console.log("Unable to update the chat name. Please try again later.")}},{data:M,isLoading:H,refetch:B}=Gn(ek);G.useEffect(()=>{B()},[r]),G.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)}),G.useEffect(()=>{const W=({keyCode:V})=>{!e||V!==27||t(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)}),G.useEffect(()=>{var W,V;localStorage.setItem("sidebar-expanded",L.toString()),L?(W=document.querySelector("body"))==null||W.classList.add("sidebar-expanded"):(V=document.querySelector("body"))==null||V.classList.remove("sidebar-expanded")},[L]);const q=async W=>{try{const V=await $9();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(sr,{to:"/",children:f.jsx("img",{src:j2,alt:"Logo",className:"h-10 w-auto mt-2"})}),f.jsx("span",{className:"mt-2 text-sm font-semibold leading-6 dark:text-captn-light-cream",children:f.jsx("sup",{className:"text-base text-captn-light-blue",children:"βeta"})})]}),f.jsx("button",{ref: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:q,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:M&&M.map((W,V)=>Tj(W)&&f.jsxs(sr,{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(wj,{chatId:W.id,chatName:W.name?W.name:"",onValueChange:z})})]},W.id))})})]})})})]})};function _j({handleFormSubmit:e,currentChatDetails:t,triggerChatFormSubmitMsg:r}){const[s,o]=G.useState(""),c=G.useCallback(async v=>{v!==null&&r&&await e(r,!0)},[r]),p=async v=>{if(v.preventDefault(),!t.showLoader){const A=v.target.userQuery.value;o(""),e(A)}};return f.jsx("div",{"data-testid":"chat-form",className:"mt-2 mb-2",children:f.jsxs("form",{onSubmit:p,className:"",children:[f.jsx("label",{htmlFor:"search",className:"mb-2 text-sm font-medium text-captn-dark-blue sr-only dark:text-captn-light-cream",children:"Search"}),f.jsxs("div",{className:"relative bottom-0 left-0 right-0 flex items-center justify-between m-1",children:[f.jsx("input",{type:"search",id:"userQuery",name:"search",className:"block rounded-lg w-full h-12 text-sm text-captn-light-cream bg-captn-dark-blue focus:outline-none focus:ring-0 focus:border-captn-light-blue",placeholder:"Message Capt’n...",required:!0,ref:c,value:s,onChange:v=>o(v.target.value)}),f.jsx("button",{type:"submit",className:"text-captn-light-cream bg-captn-cta-green hover:bg-captn-cta-green-hover absolute right-2 font-medium rounded-lg text-sm px-1.5 py-1.5",children:f.jsx("span",{className:"",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-captn-light-cream",children:f.jsx("path",{d:"M7 11L12 6L17 11M12 18V7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]})})}const Mj=({children:e,handleFormSubmit:t,currentChatDetails:r,triggerChatFormSubmitMsg:s,refetchAllChatDetails:o})=>{const[c,p]=G.useState(!1),{data:v}=Mr(),C=G.useRef(null),A=Kr();G.useEffect(()=>{v?!v.hasPaid&&v.isSignUpComplete&&A.push("/pricing"):A.push("/login")},[v,A]),G.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 L=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 ${L} overflow-hidden`,children:[f.jsx(Rj,{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(A2,{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(_j,{handleFormSubmit:t,currentChatDetails:r,triggerChatFormSubmitMsg:s}):f.jsx(f.Fragment,{})]})]})})};function zn(){return zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),p0={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Ij=["style","script"],zj=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Fj=/mailto:/i,Dj=/\n{2,}$/,N2=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,Hj=/^ *> ?/gm,Bj=/^ {2,}\n/,Vj=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,E2=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,L2=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Wj=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,$j=/^(?:\n *)*\n/,Xj=/\r\n?/g,Yj=/^\[\^([^\]]+)](:.*)\n/,Uj=/^\[\^([^\]]+)]/,Gj=/\f/g,Zj=/^\s*?\[(x|\s)\]/,P2=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,T2=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,R2=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Tf=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,qj=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,_2=/^)/,Qj=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Rf=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Kj=/^\{.*\}$/,Jj=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,eN=/^<([^ >]+@[^ >]+)>/,tN=/^<([^ >]+:\/[^ >]+)>/,rN=/-([a-z])?/gi,M2=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,iN=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,nN=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,sN=/^\[([^\]]*)\] ?\[([^\]]*)\]/,aN=/(\[|\])/g,oN=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,lN=/\t/g,cN=/^ *\| */,dN=/(^ *\||\| *$)/g,uN=/ *$/,hN=/^ *:-+: *$/,fN=/^ *:-+ *$/,pN=/^ *-+: *$/,gN=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,mN=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,xN=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,vN=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,yN=/^\\([^0-9A-Za-z\s])/,bN=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,wN=/^\n+/,kN=/^([ \t]*)/,CN=/\\([^\\])/g,g0=/ *\n+$/,SN=/(?:^|\n)( *)$/,w1="(?:\\d+\\.)",k1="(?:[*+-])";function O2(e){return"( *)("+(e===1?w1:k1)+") +"}const I2=O2(1),z2=O2(2);function F2(e){return new RegExp("^"+(e===1?I2:z2))}const AN=F2(1),jN=F2(2);function D2(e){return new RegExp("^"+(e===1?I2:z2)+"[^\\n]*(?:\\n(?!\\1"+(e===1?w1:k1)+" )[^\\n]*)*(\\n|$)","gm")}const H2=D2(1),B2=D2(2);function V2(e){const t=e===1?w1:k1;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const W2=V2(1),$2=V2(2);function m0(e,t){const r=t===1,s=r?W2:$2,o=r?H2:B2,c=r?AN:jN;return{t(p,v,C){const A=SN.exec(C);return A&&(v.o||!v._&&!v.u)?s.exec(p=A[1]+p):null},i:Ge.HIGH,l(p,v,C){const A=r?+p[2]:void 0,L=p[0].replace(Dj,` +`));let z=kk((o=L.props)==null?void 0:o.className,C.className),M=z?{className:z}:{};return G.cloneElement(L,Object.assign({},Eb(L.props,qm(Hu(C,["ref"]))),P,A,Sk(L.ref,A.ref),M))}return G.createElement(c,Object.assign({},Hu(C,["ref"]),c!==G.Fragment&&A,c!==G.Fragment&&P),L)}function Sk(...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 Eb(...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 gi(e){var t;return Object.assign(G.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function qm(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Hu(e,t=[]){let r=Object.assign({},e);for(let s of t)s in r&&delete r[s];return r}function Ak(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&&jk(r)?!1:s}function jk(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Nk="div";var zc=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(zc||{});function Ek(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 pi({ourProps:o,theirProps:s,slot:{},defaultTag:Nk,name:"Hidden"})}let mf=gi(Ek),Lb=G.createContext(null);Lb.displayName="OpenClosedContext";var Fa=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Fa||{});function Lk(){return G.useContext(Lb)}var Pb=(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))(Pb||{});function s1(e,t){let r=G.useRef([]),s=Nr(e);G.useEffect(()=>{let o=[...r.current];for(let[c,p]of t.entries())if(r.current[c]!==p){let v=s(t,o);return r.current=t,v}},[s,...t])}function Pk(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Tk(e,t,r){let s=Id(t);G.useEffect(()=>{function o(c){s.current(c)}return window.addEventListener(e,o,r),()=>window.removeEventListener(e,o,r)},[e,r])}var Da=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Da||{});function Rk(){let e=G.useRef(0);return Tk("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Tb(){let e=G.useRef(!1);return En(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Fd(...e){return G.useMemo(()=>Sb(...e),[...e])}function Rb(e,t,r,s){let o=Id(r);G.useEffect(()=>{e=e??window;function c(p){o.current(p)}return e.addEventListener(t,c,s),()=>e.removeEventListener(t,c,s)},[e,t,s])}function _b(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 _k="div";var Mb=(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))(Mb||{});function Mk(e,t){let r=G.useRef(null),s=Fi(r,t),{initialFocus:o,containers:c,features:p=30,...v}=e;zd()||(p=1);let C=Fd(r);zk({ownerDocument:C},!!(p&16));let A=Fk({ownerDocument:C,container:r,initialFocus:o},!!(p&2));Dk({ownerDocument:C,container:r,containers:c,previousActiveElement:A},!!(p&8));let L=Rk(),P=Nr(B=>{let q=r.current;q&&(W=>W())(()=>{bn(L.current,{[Da.Forwards]:()=>{ql(q,In.First,{skipElements:[B.relatedTarget]})},[Da.Backwards]:()=>{ql(q,In.Last,{skipElements:[B.relatedTarget]})}})})}),z=fk(),M=G.useRef(!1),H={ref:s,onKeyDown(B){B.key=="Tab"&&(M.current=!0,z.requestAnimationFrame(()=>{M.current=!1}))},onBlur(B){let q=_b(c);r.current instanceof HTMLElement&&q.add(r.current);let W=B.relatedTarget;W instanceof HTMLElement&&W.dataset.headlessuiFocusGuard!=="true"&&(Ob(q,W)||(M.current?ql(r.current,bn(L.current,{[Da.Forwards]:()=>In.Next,[Da.Backwards]:()=>In.Previous})|In.WrapAround,{relativeTo:B.target}):B.target instanceof HTMLElement&&Zn(B.target)))}};return ge.createElement(ge.Fragment,null,!!(p&4)&&ge.createElement(mf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:zc.Focusable}),pi({ourProps:H,theirProps:v,defaultTag:_k,name:"FocusTrap"}),!!(p&4)&&ge.createElement(mf,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:P,features:zc.Focusable}))}let Ok=gi(Mk),Na=Object.assign(Ok,{features:Mb}),Qi=[];if(typeof window<"u"&&typeof document<"u"){let e=function(t){t.target instanceof HTMLElement&&t.target!==document.body&&Qi[0]!==t.target&&(Qi.unshift(t.target),Qi=Qi.filter(r=>r!=null&&r.isConnected),Qi.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 Ik(e=!0){let t=G.useRef(Qi.slice());return s1(([r],[s])=>{s===!0&&r===!1&&Uo(()=>{t.current.splice(0)}),s===!1&&r===!0&&(t.current=Qi.slice())},[e,Qi,t]),Nr(()=>{var r;return(r=t.current.find(s=>s!=null&&s.isConnected))!=null?r:null})}function zk({ownerDocument:e},t){let r=Ik(t);s1(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Zn(r())},[t]);let s=G.useRef(!1);G.useEffect(()=>(s.current=!1,()=>{s.current=!0,Uo(()=>{s.current&&Zn(r())})}),[])}function Fk({ownerDocument:e,container:t,initialFocus:r},s){let o=G.useRef(null),c=Tb();return s1(()=>{if(!s)return;let p=t.current;p&&Uo(()=>{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?Zn(r.current):ql(p,In.First)===Ab.Error&&console.warn("There are no focusable elements inside the "),o.current=e==null?void 0:e.activeElement})},[s]),o}function Dk({ownerDocument:e,container:t,containers:r,previousActiveElement:s},o){let c=Tb();Rb(e==null?void 0:e.defaultView,"focus",p=>{if(!o||!c.current)return;let v=_b(r);t.current instanceof HTMLElement&&v.add(t.current);let C=s.current;if(!C)return;let A=p.target;A&&A instanceof HTMLElement?Ob(v,A)?(s.current=A,Zn(A)):(p.preventDefault(),p.stopPropagation(),Zn(C)):Zn(s.current)},!0)}function Ob(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let Ib=G.createContext(!1);function Hk(){return G.useContext(Ib)}function xf(e){return ge.createElement(Ib.Provider,{value:e.force},e.children)}function Bk(e){let t=Hk(),r=G.useContext(zb),s=Fd(e),[o,c]=G.useState(()=>{if(!t&&r!==null||Ei.isServer)return null;let p=s==null?void 0:s.getElementById("headlessui-portal-root");if(p)return p;if(s===null)return null;let v=s.createElement("div");return v.setAttribute("id","headlessui-portal-root"),s.body.appendChild(v)});return G.useEffect(()=>{o!==null&&(s!=null&&s.body.contains(o)||s==null||s.body.appendChild(o))},[o,s]),G.useEffect(()=>{t||r!==null&&c(r.current)},[r,c,t]),o}let Vk=G.Fragment;function Wk(e,t){let r=e,s=G.useRef(null),o=Fi(wk(L=>{s.current=L}),t),c=Fd(s),p=Bk(s),[v]=G.useState(()=>{var L;return Ei.isServer?null:(L=c==null?void 0:c.createElement("div"))!=null?L:null}),C=zd(),A=G.useRef(!1);return En(()=>{if(A.current=!1,!(!p||!v))return p.contains(v)||(v.setAttribute("data-headlessui-portal",""),p.appendChild(v)),()=>{A.current=!0,Uo(()=>{var L;A.current&&(!p||!v||(v instanceof Node&&p.contains(v)&&p.removeChild(v),p.childNodes.length<=0&&((L=p.parentElement)==null||L.removeChild(p))))})}},[p,v]),C?!p||!v?null:Dv.createPortal(pi({ourProps:{ref:o},theirProps:r,defaultTag:Vk,name:"Portal"}),v):null}let $k=G.Fragment,zb=G.createContext(null);function Xk(e,t){let{target:r,...s}=e,o={ref:Fi(t)};return ge.createElement(zb.Provider,{value:r},pi({ourProps:o,theirProps:s,defaultTag:$k,name:"Popover.Group"}))}let Yk=gi(Wk),Uk=gi(Xk),vf=Object.assign(Yk,{Group:Uk}),Fb=G.createContext(null);function Db(){let e=G.useContext(Fb);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,Db),t}return e}function Gk(){let[e,t]=G.useState([]);return[e.length>0?e.join(" "):void 0,G.useMemo(()=>function(r){let s=Nr(c=>(t(p=>[...p,c]),()=>t(p=>{let v=p.slice(),C=v.indexOf(c);return C!==-1&&v.splice(C,1),v}))),o=G.useMemo(()=>({register:s,slot:r.slot,name:r.name,props:r.props}),[s,r.slot,r.name,r.props]);return ge.createElement(Fb.Provider,{value:o},r.children)},[t])]}let Zk="p";function qk(e,t){let r=ua(),{id:s=`headlessui-description-${r}`,...o}=e,c=Db(),p=Fi(t);En(()=>c.register(s),[s,c.register]);let v={ref:p,...c.props,id:s};return pi({ourProps:v,theirProps:o,slot:c.slot||{},defaultTag:Zk,name:c.name||"Description"})}let Qk=gi(qk),Kk=Object.assign(Qk,{}),a1=G.createContext(()=>{});a1.displayName="StackContext";var yf=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(yf||{});function Jk(){return G.useContext(a1)}function eC({children:e,onUpdate:t,type:r,element:s,enabled:o}){let c=Jk(),p=Nr((...v)=>{t==null||t(...v),c(...v)});return En(()=>{let v=o===void 0||o===!0;return v&&p(0,r,s),()=>{v&&p(1,r,s)}},[p,r,s,o]),ge.createElement(a1.Provider,{value:p},e)}function tC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const rC=typeof Object.is=="function"?Object.is:tC,{useState:iC,useEffect:nC,useLayoutEffect:sC,useDebugValue:aC}=Qu;function oC(e,t,r){const s=t(),[{inst:o},c]=iC({inst:{value:s,getSnapshot:t}});return sC(()=>{o.value=s,o.getSnapshot=t,Bu(o)&&c({inst:o})},[e,s,t]),nC(()=>(Bu(o)&&c({inst:o}),e(()=>{Bu(o)&&c({inst:o})})),[e]),aC(s),s}function Bu(e){const t=e.getSnapshot,r=e.value;try{const s=t();return!rC(r,s)}catch{return!0}}function lC(e,t,r){return t()}const cC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dC=!cC,uC=dC?lC:oC,hC="useSyncExternalStore"in Qu?(e=>e.useSyncExternalStore)(Qu):uC;function fC(e){return hC(e.subscribe,e.getSnapshot,e.getSnapshot)}function pC(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 gC(){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 mC(){if(!Pk())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 xC(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function vC(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Vn=pC(()=>new Map,{PUSH(e,t){var r;let s=(r=this.get(e))!=null?r:{doc:e,count:0,d:n1(),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:vC(r)},o=[mC(),gC(),xC()];o.forEach(({before:c})=>c==null?void 0:c(s)),o.forEach(({after:c})=>c==null?void 0:c(s))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Vn.subscribe(()=>{let e=Vn.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let s=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!s||!o&&s)&&Vn.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Vn.dispatch("TEARDOWN",r)}});function yC(e,t,r){let s=fC(Vn),o=e?s.get(e):void 0,c=o?o.count>0:!1;return En(()=>{if(!(!e||!t))return Vn.dispatch("PUSH",e,r),()=>Vn.dispatch("POP",e,r)},[t,e]),c}let Vu=new Map,Ea=new Map;function Qm(e,t=!0){En(()=>{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=Ea.get(s))!=null?p:1;if(v===1?Ea.delete(s):Ea.set(s,v-1),v!==1)return;let C=Vu.get(s);C&&(C["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",C["aria-hidden"]),s.inert=C.inert,Vu.delete(s))}let c=(r=Ea.get(s))!=null?r:0;return Ea.set(s,c+1),c!==0||(Vu.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0),o},[e,t])}var bC=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(bC||{}),wC=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(wC||{});let kC={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Fc=G.createContext(null);Fc.displayName="DialogContext";function Go(e){let t=G.useContext(Fc);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Go),r}return t}function CC(e,t,r=()=>[document.body]){yC(e,t,s=>{var o;return{containers:[...(o=s.containers)!=null?o:[],r]}})}function SC(e,t){return bn(t.type,kC,e,t)}let AC="div",jC=gf.RenderStrategy|gf.Static;function NC(e,t){let r=ua(),{id:s=`headlessui-dialog-${r}`,open:o,onClose:c,initialFocus:p,__demoMode:v=!1,...C}=e,[A,L]=G.useState(0),P=Lk();o===void 0&&P!==null&&(o=(P&Fa.Open)===Fa.Open);let z=G.useRef(null),M=Fi(z,t),H=G.useRef(null),B=Fd(z),q=e.hasOwnProperty("open")||P!==null,W=e.hasOwnProperty("onClose");if(!q&&!W)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!q)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!W)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof c!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${c}`);let V=o?0:1,[_,K]=G.useReducer(SC,{titleId:null,descriptionId:null,panelRef:G.createRef()}),ee=Nr(()=>c(!1)),X=Nr(He=>K({type:0,id:He})),Q=zd()?v?!1:V===0:!1,J=A>1,fe=G.useContext(Fc)!==null,le=J?"parent":"leaf",Ne=P!==null?(P&Fa.Closing)===Fa.Closing:!1,ve=fe||Ne?!1:Q,Le=G.useCallback(()=>{var He,Be;return(Be=Array.from((He=B==null?void 0:B.querySelectorAll("body > *"))!=null?He:[]).find(Me=>Me.id==="headlessui-portal-root"?!1:Me.contains(H.current)&&Me instanceof HTMLElement))!=null?Be:null},[H]);Qm(Le,ve);let Fe=J?!0:Q,Re=G.useCallback(()=>{var He,Be;return(Be=Array.from((He=B==null?void 0:B.querySelectorAll("[data-headlessui-portal]"))!=null?He:[]).find(Me=>Me.contains(H.current)&&Me instanceof HTMLElement))!=null?Be:null},[H]);Qm(Re,Fe);let qe=Nr(()=>{var He,Be;return[...Array.from((He=B==null?void 0:B.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))!=null?He:[]).filter(Me=>!(Me===document.body||Me===document.head||!(Me instanceof HTMLElement)||Me.contains(H.current)||_.panelRef.current&&Me.contains(_.panelRef.current))),(Be=_.panelRef.current)!=null?Be:z.current]});bk(()=>qe(),ee,!(!Q||J));let de=!(J||V!==0);Rb(B==null?void 0:B.defaultView,"keydown",He=>{de&&(He.defaultPrevented||He.key===Pb.Escape&&(He.preventDefault(),He.stopPropagation(),ee()))}),CC(B,!(Ne||V!==0||fe),qe),G.useEffect(()=>{if(V!==0||!z.current)return;let He=new ResizeObserver(Be=>{for(let Me of Be){let Nt=Me.target.getBoundingClientRect();Nt.x===0&&Nt.y===0&&Nt.width===0&&Nt.height===0&&ee()}});return He.observe(z.current),()=>He.disconnect()},[V,z,ee]);let[oe,Ae]=Gk(),je=G.useMemo(()=>[{dialogState:V,close:ee,setTitleId:X},_],[V,_,ee,X]),ze=G.useMemo(()=>({open:V===0}),[V]),Ue={ref:M,id:s,role:"dialog","aria-modal":V===0?!0:void 0,"aria-labelledby":_.titleId,"aria-describedby":oe};return ge.createElement(eC,{type:"Dialog",enabled:V===0,element:z,onUpdate:Nr((He,Be)=>{Be==="Dialog"&&bn(He,{[yf.Add]:()=>L(Me=>Me+1),[yf.Remove]:()=>L(Me=>Me-1)})})},ge.createElement(xf,{force:!0},ge.createElement(vf,null,ge.createElement(Fc.Provider,{value:je},ge.createElement(vf.Group,{target:z},ge.createElement(xf,{force:!1},ge.createElement(Ae,{slot:ze,name:"Dialog.Description"},ge.createElement(Na,{initialFocus:p,containers:qe,features:Q?bn(le,{parent:Na.features.RestoreFocus,leaf:Na.features.All&~Na.features.FocusLock}):Na.features.None},pi({ourProps:Ue,theirProps:C,slot:ze,defaultTag:AC,features:jC,visible:V===0,name:"Dialog"})))))))),ge.createElement(mf,{features:zc.Hidden,ref:H}))}let EC="div";function LC(e,t){let r=ua(),{id:s=`headlessui-dialog-overlay-${r}`,...o}=e,[{dialogState:c,close:p}]=Go("Dialog.Overlay"),v=Fi(t),C=Nr(L=>{if(L.target===L.currentTarget){if(Ak(L.currentTarget))return L.preventDefault();L.preventDefault(),L.stopPropagation(),p()}}),A=G.useMemo(()=>({open:c===0}),[c]);return pi({ourProps:{ref:v,id:s,"aria-hidden":!0,onClick:C},theirProps:o,slot:A,defaultTag:EC,name:"Dialog.Overlay"})}let PC="div";function TC(e,t){let r=ua(),{id:s=`headlessui-dialog-backdrop-${r}`,...o}=e,[{dialogState:c},p]=Go("Dialog.Backdrop"),v=Fi(t);G.useEffect(()=>{if(p.panelRef.current===null)throw new Error("A component is being used, but a component is missing.")},[p.panelRef]);let C=G.useMemo(()=>({open:c===0}),[c]);return ge.createElement(xf,{force:!0},ge.createElement(vf,null,pi({ourProps:{ref:v,id:s,"aria-hidden":!0},theirProps:o,slot:C,defaultTag:PC,name:"Dialog.Backdrop"})))}let RC="div";function _C(e,t){let r=ua(),{id:s=`headlessui-dialog-panel-${r}`,...o}=e,[{dialogState:c},p]=Go("Dialog.Panel"),v=Fi(t,p.panelRef),C=G.useMemo(()=>({open:c===0}),[c]),A=Nr(L=>{L.stopPropagation()});return pi({ourProps:{ref:v,id:s,onClick:A},theirProps:o,slot:C,defaultTag:RC,name:"Dialog.Panel"})}let MC="h2";function OC(e,t){let r=ua(),{id:s=`headlessui-dialog-title-${r}`,...o}=e,[{dialogState:c,setTitleId:p}]=Go("Dialog.Title"),v=Fi(t);G.useEffect(()=>(p(s),()=>p(null)),[s,p]);let C=G.useMemo(()=>({open:c===0}),[c]);return pi({ourProps:{ref:v,id:s},theirProps:o,slot:C,defaultTag:MC,name:"Dialog.Title"})}let IC=gi(NC),zC=gi(TC),FC=gi(_C),DC=gi(LC),HC=gi(OC),Dc=Object.assign(IC,{Backdrop:zC,Panel:FC,Overlay:DC,Title:HC,Description:Kk});var Hb={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Km=ge.createContext&&ge.createContext(Hb),gn=function(){return gn=Object.assign||function(e){for(var t,r=1,s=arguments.length;r{const r=window.location.pathname,s=()=>{t&&t(!1)},c=G.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(pn,{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(pn,{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(XC,{size:"1.1rem"}),"Admin dashboard"]})})}),f.jsxs("button",{onClick:()=>Cb(),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"]})]})},c1=({user:e})=>{const[t,r]=G.useState(!1),s=G.useRef(null),o=G.useRef(null),c=()=>r(p=>!p);return G.useEffect(()=>{const p=({target:v})=>{o.current&&(!t||o.current.contains(v)||s.current.contains(v)||r(!1))};return document.addEventListener("click",p),()=>document.removeEventListener("click",p)}),G.useEffect(()=>{const p=({keyCode:v})=>{!t||v!==27||r(!1)};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)}),f.jsxs("div",{className:"relative",children:[f.jsxs("button",{ref:s,onClick:c,className:"flex items-center gap-4 duration-300 ease-in-out text-captn-dark-blue hover:text-captn-light-blue",children:[f.jsx("span",{className:"hidden text-right lg:block",children:f.jsx("span",{className:"block text-sm font-medium dark:text-captn-light-cream",children:e.username})}),f.jsx($C,{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(l1,{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 bf;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(bf||(bf={}));const ye=Je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ki=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"]),YC=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Gr 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()}}Gr.create=e=>new Gr(e);const Co=(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 $b=Co;function UC(e){$b=e}function Bc(){return $b}const Vc=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}},GC=[];function ke(e,t){const r=Vc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Bc(),Co].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"}),Xb=e=>({status:"dirty",value:e}),rr=e=>({status:"valid",value:e}),wf=e=>e.status==="aborted",kf=e=>e.status==="dirty",So=e=>e.status==="valid",Wc=e=>typeof Promise<"u"&&e instanceof Promise;var _e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_e||(_e={}));class di{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 Jm=(e,t)=>{if(So(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 Gr(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 Ki(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:Ki(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:Ki(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Wc(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:Ki(t)},c=this._parseSync({data:t,path:o.path,parent:o});return Jm(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:Ki(t)},o=this._parse({data:t,path:s.path,parent:s}),c=await(Wc(o)?o:Promise.resolve(o));return Jm(s,c)}refine(t,r){const s=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,c)=>{const p=t(o),v=()=>c.addIssue({code:he.custom,...s(o)});return typeof Promise<"u"&&p instanceof Promise?p.then(C=>C?!0:(v(),!1)):p?!0:(v(),!1)})}refinement(t,r){return this._refinement((s,o)=>t(s)?!0:(o.addIssue(typeof r=="function"?r(s,o):r),!1))}_refinement(t){return new Qr({schema:this,typeName:Ie.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Li.create(this,this._def)}nullable(){return ss.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Zr.create(this,this._def)}promise(){return ta.create(this,this._def)}or(t){return Eo.create([this,t],this._def)}and(t){return Lo.create(this,t,this._def)}transform(t){return new Qr({...$e(this._def),schema:this,typeName:Ie.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Mo({...$e(this._def),innerType:this,defaultValue:r,typeName:Ie.ZodDefault})}brand(){return new Ub({typeName:Ie.ZodBranded,type:this,...$e(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Uc({...$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 Zo.create(this,t)}readonly(){return Zc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ZC=/^c[^\s-]{8,}$/i,qC=/^[a-z][a-z0-9]*$/,QC=/^[0-9A-HJKMNP-TV-Z]{26}$/,KC=/^[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,JC=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wu;const tS=/^(((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}))$/,rS=/^(([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})))$/,iS=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 nS(e,t){return!!((t==="v4"||!t)&&tS.test(e)||(t==="v6"||!t)&&rS.test(e))}class $r 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,..._e.errToObj(s)})}_addCheck(t){return new $r({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",..._e.errToObj(t)})}url(t){return this._addCheck({kind:"url",..._e.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",..._e.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",..._e.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",..._e.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",..._e.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",..._e.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",..._e.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,..._e.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._e.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._e.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._e.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._e.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._e.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._e.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._e.errToObj(r)})}nonempty(t){return this.min(1,_e.errToObj(t))}trim(){return new $r({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new $r({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new $r({...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 $r({checks:[],typeName:Ie.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};function sS(e,t){const r=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,o=r>s?r:s,c=parseInt(e.toFixed(o).replace(".","")),p=parseInt(t.toFixed(o).replace(".",""));return c%p/Math.pow(10,o)}class wn extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==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"?sS(t.data,c.value)!==0&&(s=this._getOrReturnCtx(t,s),ke(s,{code:he.not_multiple_of,multipleOf:c.value,message:c.message}),o.dirty()):c.kind==="finite"?Number.isFinite(t.data)||(s=this._getOrReturnCtx(t,s),ke(s,{code:he.not_finite,message:c.message}),o.dirty()):Je.assertNever(c);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_e.toString(r))}setLimit(t,r,s,o){return new wn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:_e.toString(o)}]})}_addCheck(t){return new wn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_e.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_e.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&Je.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(r===null||s.value>r)&&(r=s.value):s.kind==="max"&&(t===null||s.valuenew wn({checks:[],typeName:Ie.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class kn extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==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,_e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_e.toString(r))}setLimit(t,r,s,o){return new kn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:_e.toString(o)}]})}_addCheck(t){return new kn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_e.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new kn({checks:[],typeName:Ie.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$e(e)})};class Ao 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 rr(t.data)}}Ao.create=e=>new Ao({typeName:Ie.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$e(e)});class is 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 is({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_e.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_e.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew is({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ie.ZodDate,...$e(e)});class $c 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 rr(t.data)}}$c.create=e=>new $c({typeName:Ie.ZodSymbol,...$e(e)});class jo 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 rr(t.data)}}jo.create=e=>new jo({typeName:Ie.ZodUndefined,...$e(e)});class No 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 rr(t.data)}}No.create=e=>new No({typeName:Ie.ZodNull,...$e(e)});class ea extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return rr(t.data)}}ea.create=e=>new ea({typeName:Ie.ZodAny,...$e(e)});class qn extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return rr(t.data)}}qn.create=e=>new qn({typeName:Ie.ZodUnknown,...$e(e)});class Oi extends Xe{_parse(t){const r=this._getOrReturnCtx(t);return ke(r,{code:he.invalid_type,expected:ye.never,received:r.parsedType}),De}}Oi.create=e=>new Oi({typeName:Ie.ZodNever,...$e(e)});class Xc 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 rr(t.data)}}Xc.create=e=>new Xc({typeName:Ie.ZodVoid,...$e(e)});class Zr 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 di(r,p,r.path,v)))).then(p=>Gt.mergeArray(s,p));const c=[...r.data].map((p,v)=>o.type._parseSync(new di(r,p,r.path,v)));return Gt.mergeArray(s,c)}get element(){return this._def.type}min(t,r){return new Zr({...this._def,minLength:{value:t,message:_e.toString(r)}})}max(t,r){return new Zr({...this._def,maxLength:{value:t,message:_e.toString(r)}})}length(t,r){return new Zr({...this._def,exactLength:{value:t,message:_e.toString(r)}})}nonempty(t){return this.min(1,t)}}Zr.create=(e,t)=>new Zr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ie.ZodArray,...$e(t)});function vs(e){if(e instanceof ft){const t={};for(const r in e.shape){const s=e.shape[r];t[r]=Li.create(vs(s))}return new ft({...e._def,shape:()=>t})}else return e instanceof Zr?new Zr({...e._def,type:vs(e.element)}):e instanceof Li?Li.create(vs(e.unwrap())):e instanceof ss?ss.create(vs(e.unwrap())):e instanceof ui?ui.create(e.items.map(t=>vs(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 Oi&&this._def.unknownKeys==="strip"))for(const A in o.data)p.includes(A)||v.push(A);const C=[];for(const A of p){const L=c[A],P=o.data[A];C.push({key:{status:"valid",value:A},value:L._parse(new di(o,P,o.path,A)),alwaysSet:A in o.data})}if(this._def.catchall instanceof Oi){const A=this._def.unknownKeys;if(A==="passthrough")for(const L of v)C.push({key:{status:"valid",value:L},value:{status:"valid",value:o.data[L]}});else if(A==="strict")v.length>0&&(ke(o,{code:he.unrecognized_keys,keys:v}),s.dirty());else if(A!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const A=this._def.catchall;for(const L of v){const P=o.data[L];C.push({key:{status:"valid",value:L},value:A._parse(new di(o,P,o.path,L)),alwaysSet:L in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const A=[];for(const L of C){const P=await L.key;A.push({key:P,value:await L.value,alwaysSet:L.alwaysSet})}return A}).then(A=>Gt.mergeObjectSync(s,A)):Gt.mergeObjectSync(s,C)}get shape(){return this._def.shape()}strict(t){return _e.errToObj,new ft({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,s)=>{var o,c,p,v;const C=(p=(c=(o=this._def).errorMap)===null||c===void 0?void 0:c.call(o,r,s).message)!==null&&p!==void 0?p:s.defaultError;return r.code==="unrecognized_keys"?{message:(v=_e.errToObj(t).message)!==null&&v!==void 0?v:C}:{message:C}}}:{}})}strip(){return new ft({...this._def,unknownKeys:"strip"})}passthrough(){return new ft({...this._def,unknownKeys:"passthrough"})}extend(t){return new ft({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ft({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ie.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new ft({...this._def,catchall:t})}pick(t){const r={};return Je.objectKeys(t).forEach(s=>{t[s]&&this.shape[s]&&(r[s]=this.shape[s])}),new ft({...this._def,shape:()=>r})}omit(t){const r={};return Je.objectKeys(this.shape).forEach(s=>{t[s]||(r[s]=this.shape[s])}),new ft({...this._def,shape:()=>r})}deepPartial(){return vs(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 Li;)c=c._def.innerType;r[s]=c}}),new ft({...this._def,shape:()=>r})}keyof(){return Yb(Je.objectKeys(this.shape))}}ft.create=(e,t)=>new ft({shape:()=>e,unknownKeys:"strip",catchall:Oi.create(),typeName:Ie.ZodObject,...$e(t)});ft.strictCreate=(e,t)=>new ft({shape:()=>e,unknownKeys:"strict",catchall:Oi.create(),typeName:Ie.ZodObject,...$e(t)});ft.lazycreate=(e,t)=>new ft({shape:e,unknownKeys:"strip",catchall:Oi.create(),typeName:Ie.ZodObject,...$e(t)});class Eo 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 Gr(v.ctx.common.issues));return ke(r,{code:he.invalid_union,unionErrors:p}),De}if(r.common.async)return Promise.all(s.map(async c=>{const p={...r,common:{...r.common,issues:[]},parent:null};return{result:await c._parseAsync({data:r.data,path:r.path,parent:p}),ctx:p}})).then(o);{let c;const p=[];for(const C of s){const A={...r,common:{...r.common,issues:[]},parent:null},L=C._parseSync({data:r.data,path:r.path,parent:A});if(L.status==="valid")return L;L.status==="dirty"&&!c&&(c={result:L,ctx:A}),A.common.issues.length&&p.push(A.common.issues)}if(c)return r.common.issues.push(...c.ctx.common.issues),c.result;const v=p.map(C=>new Gr(C));return ke(r,{code:he.invalid_union,unionErrors:v}),De}}get options(){return this._def.options}}Eo.create=(e,t)=>new Eo({options:e,typeName:Ie.ZodUnion,...$e(t)});const Ql=e=>e instanceof To?Ql(e.schema):e instanceof Qr?Ql(e.innerType()):e instanceof Ro?[e.value]:e instanceof Cn?e.options:e instanceof _o?Object.keys(e.enum):e instanceof Mo?Ql(e._def.innerType):e instanceof jo?[void 0]:e instanceof No?[null]:null;class Dd 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=Ql(c.shape[t]);if(!p)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const v of p){if(o.has(v))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(v)}`);o.set(v,c)}}return new Dd({typeName:Ie.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...$e(s)})}}function Cf(e,t){const r=Ki(e),s=Ki(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=Cf(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(wf(c)||wf(p))return De;const v=Cf(c.value,p.value);return v.valid?((kf(c)||kf(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}))}}Lo.create=(e,t,r)=>new Lo({left:e,right:t,typeName:Ie.ZodIntersection,...$e(r)});class ui 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 di(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 ui({...this._def,rest:t})}}ui.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ui({items:e,typeName:Ie.ZodTuple,rest:null,...$e(t)})};class Po 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 di(s,v,s.path,v)),value:p._parse(new di(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 Po({keyType:t,valueType:r,typeName:Ie.ZodRecord,...$e(s)}):new Po({keyType:$r.create(),valueType:t,typeName:Ie.ZodRecord,...$e(r)})}}class Yc 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 di(s,v,s.path,[A,"key"])),value:c._parse(new di(s,C,s.path,[A,"value"]))}));if(s.common.async){const v=new Map;return Promise.resolve().then(async()=>{for(const C of p){const A=await C.key,L=await C.value;if(A.status==="aborted"||L.status==="aborted")return De;(A.status==="dirty"||L.status==="dirty")&&r.dirty(),v.set(A.value,L.value)}return{status:r.value,value:v}})}else{const v=new Map;for(const C of p){const A=C.key,L=C.value;if(A.status==="aborted"||L.status==="aborted")return De;(A.status==="dirty"||L.status==="dirty")&&r.dirty(),v.set(A.value,L.value)}return{status:r.value,value:v}}}}Yc.create=(e,t,r)=>new Yc({valueType:t,keyType:e,typeName:Ie.ZodMap,...$e(r)});class ns 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 L of C){if(L.status==="aborted")return De;L.status==="dirty"&&r.dirty(),A.add(L.value)}return{status:r.value,value:A}}const v=[...s.data.values()].map((C,A)=>c._parse(new di(s,C,s.path,A)));return s.common.async?Promise.all(v).then(C=>p(C)):p(v)}min(t,r){return new ns({...this._def,minSize:{value:t,message:_e.toString(r)}})}max(t,r){return new ns({...this._def,maxSize:{value:t,message:_e.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}ns.create=(e,t)=>new ns({valueType:e,minSize:null,maxSize:null,typeName:Ie.ZodSet,...$e(t)});class Bs 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 Vc({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Bc(),Co].filter(A=>!!A),issueData:{code:he.invalid_arguments,argumentsError:C}})}function o(v,C){return Vc({data:v,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Bc(),Co].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 ta){const v=this;return rr(async function(...C){const A=new Gr([]),L=await v._def.args.parseAsync(C,c).catch(M=>{throw A.addIssue(s(C,M)),A}),P=await Reflect.apply(p,this,L);return await v._def.returns._def.type.parseAsync(P,c).catch(M=>{throw A.addIssue(o(P,M)),A})})}else{const v=this;return rr(function(...C){const A=v._def.args.safeParse(C,c);if(!A.success)throw new Gr([s(C,A.error)]);const L=Reflect.apply(p,this,A.data),P=v._def.returns.safeParse(L,c);if(!P.success)throw new Gr([o(L,P.error)]);return P.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Bs({...this._def,args:ui.create(t).rest(qn.create())})}returns(t){return new Bs({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,s){return new Bs({args:t||ui.create([]).rest(qn.create()),returns:r||qn.create(),typeName:Ie.ZodFunction,...$e(s)})}}class To 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})}}To.create=(e,t)=>new To({getter:e,typeName:Ie.ZodLazy,...$e(t)});class Ro 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}}Ro.create=(e,t)=>new Ro({value:e,typeName:Ie.ZodLiteral,...$e(t)});function Yb(e,t){return new Cn({values:e,typeName:Ie.ZodEnum,...$e(t)})}class Cn extends Xe{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),s=this._def.values;return ke(r,{expected:Je.joinValues(s),received:r.parsedType,code:he.invalid_type}),De}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),s=this._def.values;return ke(r,{received:r.data,code:he.invalid_enum_value,options:s}),De}return rr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t){return Cn.create(t)}exclude(t){return Cn.create(this.options.filter(r=>!t.includes(r)))}}Cn.create=Yb;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 rr(t.data)}get enum(){return this._def.values}}_o.create=(e,t)=>new _o({values:e,typeName:Ie.ZodNativeEnum,...$e(t)});class ta 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 rr(s.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ta.create=(e,t)=>new ta({type:e,typeName:Ie.ZodPromise,...$e(t)});class Qr extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ie.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:s}=this._processInputParams(t),o=this._def.effect||null,c={addIssue:p=>{ke(s,p),p.fatal?r.abort():r.dirty()},get path(){return s.path}};if(c.addIssue=c.addIssue.bind(c),o.type==="preprocess"){const p=o.transform(s.data,c);return s.common.issues.length?{status:"dirty",value:s.data}:s.common.async?Promise.resolve(p).then(v=>this._def.schema._parseAsync({data:v,path:s.path,parent:s})):this._def.schema._parseSync({data:p,path:s.path,parent:s})}if(o.type==="refinement"){const p=v=>{const C=o.refinement(v,c);if(s.common.async)return Promise.resolve(C);if(C instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return v};if(s.common.async===!1){const v=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return v.status==="aborted"?De:(v.status==="dirty"&&r.dirty(),p(v.value),{status:r.value,value:v.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(v=>v.status==="aborted"?De:(v.status==="dirty"&&r.dirty(),p(v.value).then(()=>({status:r.value,value:v.value}))))}if(o.type==="transform")if(s.common.async===!1){const p=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!So(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=>So(p)?Promise.resolve(o.transform(p.value,c)).then(v=>({status:r.value,value:v})):p);Je.assertNever(o)}}Qr.create=(e,t,r)=>new Qr({schema:e,typeName:Ie.ZodEffects,effect:t,...$e(r)});Qr.createWithPreprocess=(e,t,r)=>new Qr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ie.ZodEffects,...$e(r)});class Li extends Xe{_parse(t){return this._getType(t)===ye.undefined?rr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Li.create=(e,t)=>new Li({innerType:e,typeName:Ie.ZodOptional,...$e(t)});class ss extends Xe{_parse(t){return this._getType(t)===ye.null?rr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ss.create=(e,t)=>new ss({innerType:e,typeName:Ie.ZodNullable,...$e(t)});class Mo 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}}Mo.create=(e,t)=>new Mo({innerType:e,typeName:Ie.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$e(t)});class Uc 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 Wc(o)?o.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Gr(s.common.issues)},input:s.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Gr(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Uc.create=(e,t)=>new Uc({innerType:e,typeName:Ie.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$e(t)});class Gc 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}}}Gc.create=e=>new Gc({typeName:Ie.ZodNaN,...$e(e)});const aS=Symbol("zod_brand");class Ub 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 Zo 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(),Xb(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 Zo({in:t,out:r,typeName:Ie.ZodPipeline})}}class Zc extends Xe{_parse(t){const r=this._def.innerType._parse(t);return So(r)&&(r.value=Object.freeze(r.value)),r}}Zc.create=(e,t)=>new Zc({innerType:e,typeName:Ie.ZodReadonly,...$e(t)});const Gb=(e,t={},r)=>e?ea.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})}}):ea.create(),oS={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 lS=(e,t={message:`Input not instance of ${e.name}`})=>Gb(r=>r instanceof e,t),Zb=$r.create,qb=wn.create,cS=Gc.create,dS=kn.create,Qb=Ao.create,uS=is.create,hS=$c.create,fS=jo.create,pS=No.create,gS=ea.create,mS=qn.create,xS=Oi.create,vS=Xc.create,yS=Zr.create,bS=ft.create,wS=ft.strictCreate,kS=Eo.create,CS=Dd.create,SS=Lo.create,AS=ui.create,jS=Po.create,NS=Yc.create,ES=ns.create,LS=Bs.create,PS=To.create,TS=Ro.create,RS=Cn.create,_S=_o.create,MS=ta.create,e0=Qr.create,OS=Li.create,IS=ss.create,zS=Qr.createWithPreprocess,FS=Zo.create,DS=()=>Zb().optional(),HS=()=>qb().optional(),BS=()=>Qb().optional(),VS={string:e=>$r.create({...e,coerce:!0}),number:e=>wn.create({...e,coerce:!0}),boolean:e=>Ao.create({...e,coerce:!0}),bigint:e=>kn.create({...e,coerce:!0}),date:e=>is.create({...e,coerce:!0})},WS=De;var $S=Object.freeze({__proto__:null,defaultErrorMap:Co,setErrorMap:UC,getErrorMap:Bc,makeIssue:Vc,EMPTY_PATH:GC,addIssueToContext:ke,ParseStatus:Gt,INVALID:De,DIRTY:Xb,OK:rr,isAborted:wf,isDirty:kf,isValid:So,isAsync:Wc,get util(){return Je},get objectUtil(){return bf},ZodParsedType:ye,getParsedType:Ki,ZodType:Xe,ZodString:$r,ZodNumber:wn,ZodBigInt:kn,ZodBoolean:Ao,ZodDate:is,ZodSymbol:$c,ZodUndefined:jo,ZodNull:No,ZodAny:ea,ZodUnknown:qn,ZodNever:Oi,ZodVoid:Xc,ZodArray:Zr,ZodObject:ft,ZodUnion:Eo,ZodDiscriminatedUnion:Dd,ZodIntersection:Lo,ZodTuple:ui,ZodRecord:Po,ZodMap:Yc,ZodSet:ns,ZodFunction:Bs,ZodLazy:To,ZodLiteral:Ro,ZodEnum:Cn,ZodNativeEnum:_o,ZodPromise:ta,ZodEffects:Qr,ZodTransformer:Qr,ZodOptional:Li,ZodNullable:ss,ZodDefault:Mo,ZodCatch:Uc,ZodNaN:Gc,BRAND:aS,ZodBranded:Ub,ZodPipeline:Zo,ZodReadonly:Zc,custom:Gb,Schema:Xe,ZodSchema:Xe,late:oS,get ZodFirstPartyTypeKind(){return Ie},coerce:VS,any:gS,array:yS,bigint:dS,boolean:Qb,date:uS,discriminatedUnion:CS,effect:e0,enum:RS,function:LS,instanceof:lS,intersection:SS,lazy:PS,literal:TS,map:NS,nan:cS,nativeEnum:_S,never:xS,null:pS,nullable:IS,number:qb,object:bS,oboolean:BS,onumber:HS,optional:OS,ostring:DS,pipeline:FS,preprocess:zS,promise:MS,record:jS,set:ES,strictObject:wS,string:Zb,symbol:hS,transformer:e0,tuple:AS,undefined:fS,union:kS,unknown:mS,void:vS,NEVER:WS,ZodIssueCode:he,quotelessJson:YC,ZodError:Gr}),d1=(e=>(e.HOBBY="hobby-tier",e.PRO="pro-tier",e.ENTERPRISE="enterprise-tier",e))(d1||{});const XS="https://docs.opensaas.sh",YS="https://docs.opensaas.sh/blog",US="https://billing.stripe.com/p/login/test_aEU17i3Iz0XT5mUfYY",Kb="https://billing.stripe.com/p/login/14kaGs1cL3FX1PidQQ",Jb=Kb;GS({customerPortalTestUrl:US,customerPortalProdUrl:Kb});function GS(e){const t=$S.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 e2(){const e=Kr(),[t,r]=G.useState(!1),{data:s}=Mr();async function o(c){if(!s)e.push("/login");else try{r(!0);let p=await bb(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(d1.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 Sf=({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(e2,{}):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"}],ZS=[{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:""}],qS=[{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:""}],QS={app:[{name:"Documentation",href:XS},{name:"Blog",href:YS}],company:[{name:"Privacy Policy",href:"/privacy"},{name:"Terms & Conditions",href:"/toc"}]},KS=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:o1,alt:"Capt’n.ai"});function t2(){const[e,t]=G.useState(!1),{data:r,isLoading:s}=Mr();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:o1,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(Wb,{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(Sf,{user:r,renderGoToChat:!1})}),s?null:r?f.jsx("div",{className:"ml-4",children:f.jsx(c1,{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(Hc,{size:"1.1rem",className:"ml-1 mt-[0.1rem]"})]})})]})]}),f.jsxs(Dc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Dc.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(KS,{})]}),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(Vb,{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(l1,{user:r,setMobileMenuOpen:t}):f.jsxs("div",{className:"text-right",children:[f.jsx(pn,{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(pn,{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(Hc,{size:"1.1rem",className:"ml-1"})]})})]})})]})})]})]})]})}const r2="/assets/captn-logo-BNDZAGdh.png",i2=({loadingMessage:e="Loading...",bgColor:t="bg-captn-dark-blue",showLogo:r=!0})=>{const[s,o]=G.useState(0),c=["—","\\","|","/"];return G.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:r2,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 JS(){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(i2,{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 eA={display:"flex",alignItems:"center",justifyContent:"center",padding:"4rem"},tA={display:"flex",alignItems:"center",gap:".5rem",borderRadius:".5rem",padding:"1rem"},rA=()=>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 u1(){return f.jsx("div",{style:eA,children:f.jsx("div",{className:"bg-captn-light-cream text-captn-dark-blue",style:tA,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(rA,{})," Loading..."]})})})})})}const{styled:cs,css:VL}=Up({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 iA(e){return e==null?void 0:e.replace(/\/$/,"")}const nA=iA("https://backend.captn.ai")||"http://localhost:3001",sA={apiUrl:nA},aA=cs("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),oA=cs(aA,{background:"#bb6e90",color:"#eae4d9"}),n2=({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(oA,{style:{border:"1px solid #bb6e90"},children:[o.title,o.description&&": ",o.description]})})]}),lA=cs("div",{marginTop:"1.5rem",marginBottom:"1.5rem"}),cA=cs("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"}}}}),dA=`${sA.apiUrl}/auth/google/login`,s2={title:"To proceed, please ensure you've accepted our Terms & Conditions and Privacy Policy.",description:""},uA=({state:e,socialButtonsDirection:t="horizontal",additionalSignupFields:r,errorMessage:s})=>{const{isLoading:o,setErrorMessage:c,setSuccessMessage:p,setIsLoading:v}=G.useContext(h1),[C,A]=G.useState(!1),[L,P]=G.useState(!1),[z,M]=G.useState(e);P7(),G.useEffect(()=>{C&&c(null)},[C]);const H=_=>{A(_.target.checked)},B=_=>{P(_.target.checked)},q=()=>{localStorage.removeItem("hasAcceptedTos"),localStorage.removeItem("hasSubscribedToMarketingEmails"),localStorage.setItem("hasAcceptedTos",JSON.stringify(C)),localStorage.setItem("hasSubscribedToMarketingEmails",JSON.stringify(L))},W=(_,K)=>{_.preventDefault(),z===Mn.Login||C?(q(),window.location.href=K):c(s2)},V=z===Mn.Login?"Sign in with Google":"Sign up with Google";return f.jsxs(f.Fragment,{children:[z===Mn.Signup&&f.jsx(n2,{tocChecked:C,handleTocChange:H,marketingEmailsChecked:L,handleMarketingEmailsChange:B,errorMessage:s}),f.jsx(lA,{children:f.jsx(cA,{gap:"large",direction:t,children:f.jsxs("button",{className:"gsi-material-button",onClick:_=>W(_,dA),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:[z===Mn.Login?"Don't have an account? ":"Already have an account? ",f.jsx(pn,{to:z===Mn.Login?"/signup":"/login",className:"no-underline hover:underline cursor-pointer",children:z===Mn.Login?"Sign up":"Sign in"})]})})]})};var Mn=(e=>(e.Login="login",e.Signup="signup",e))(Mn||{});const hA=cs("div",{padding:"0.5rem 0.75rem",borderRadius:"0.375rem",marginTop:"1rem",background:"$gray400"}),fA=cs(hA,{background:"$successBackground",color:"$successText"}),pA={height:"6rem"};cs("div",{display:"flex",flexDirection:"column"});const h1=G.createContext({isLoading:!1,setIsLoading:e=>{},setErrorMessage:e=>{},setSuccessMessage:e=>{}}),t0={login:"Sign in to your account",signup:"Create an account"};function gA({state:e,appearance:t,logo:r,socialLayout:s="horizontal",additionalSignupFields:o}){const[c,p]=G.useState(null),[v,C]=G.useState(null),[A,L]=G.useState(!1),P=l7(t??{}),z=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:pA,src:r,alt:"Capt’n.ai"}),f.jsx("p",{className:"mt-7 text-2xl",children:e==="signup"?t0.signup:t0.login})]}),v&&f.jsx(fA,{children:v}),f.jsx(h1.Provider,{value:{isLoading:A,setIsLoading:L,setErrorMessage:p,setSuccessMessage:C},children:(e==="login"||e==="signup")&&f.jsx(uA,{state:e,socialButtonsDirection:z,additionalSignupFields:o,errorMessage:c})})]})}const mA="Before accessing the application, please confirm your agreement to the Terms & Conditions and Privacy Policy.",r0=()=>{const e=Kr();G.useContext(h1);const[t,r]=G.useState(null),[s,o]=G.useState(!1),[c,p]=G.useState(!1);G.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),Ja({isSignUpComplete:!0,hasAcceptedTos:s,...c&&{hasSubscribedToMarketingEmails:c}}),e.push("/chat")):r(s2)},L=G.useMemo(()=>location.pathname.startsWith("/account"),[location]);return f.jsxs(f.Fragment,{children:[!L&&f.jsx(t2,{}),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:mA}),f.jsx(n2,{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"})})]})})})]})},xA=()=>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:QS.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))})})})})}),vA=()=>{document.body.classList.contains("server-error")||document.body.classList.add("server-error")},yA=()=>{document.body.classList.contains("server-error")&&document.body.classList.remove("server-error")};function bA({children:e}){const t=aa(),[r,s]=G.useState(!1),{data:o,isError:c,isLoading:p}=Mr(),v=G.useMemo(()=>t.pathname!=="/",[t]),C=G.useMemo(()=>t.pathname.startsWith("/admin"),[t]),A=G.useMemo(()=>t.pathname.startsWith("/chat"),[t]),L=G.useMemo(()=>t.pathname.startsWith("/checkout"),[t]),P=G.useMemo(()=>t.pathname.startsWith("/account"),[t]);return G.useEffect(()=>{if(o)if(o.isSignUpComplete){s(!1);const z=new Date(o.lastActiveTimestamp),M=new Date;M.getTime()-z.getTime()>5*60*1e3&&Ja({lastActiveTimestamp:M})}else if(o.hasAcceptedTos)Ja({isSignUpComplete:!0}),s(!1);else{const z=localStorage.getItem("hasAcceptedTos")==="true",M=localStorage.getItem("hasSubscribedToMarketingEmails")==="true";z?(Ja({isSignUpComplete:!0,hasAcceptedTos:z,hasSubscribedToMarketingEmails:M}),s(!1)):s(!0)}},[o]),G.useEffect(()=>{if(t.hash){const z=t.hash.replace("#",""),M=document.getElementById(z);M&&M.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&&(vA(),f.jsx(JS,{})),C||A?f.jsx(f.Fragment,{children:r?f.jsx(f.Fragment,{children:f.jsx(r0,{})}):e}):f.jsxs("div",{className:"relative flex flex-col min-h-screen justify-between",children:[v&&f.jsx(t2,{}),f.jsx("div",{className:"mx-auto max-w-7xl sm:px-6 lg:px-8 w-full",children:c?e:p?f.jsx(u1,{}):(yA(),r&&(L||P)?f.jsx(f.Fragment,{children:f.jsx(r0,{})}):e)}),f.jsxs("div",{children:[f.jsx(xA,{}),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 zr=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Mr();return o?r?f.jsx(e,{...t,user:r}):f.jsx(Ld,{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."})},wA="/assets/agent-chat-BGsqR59C.png";function kA(){const[e,t]=G.useState(!1),{data:r,isLoading:s}=Mr(),o=()=>f.jsx("img",{className:"h-10 w-auto -ml-2",src:o1,alt:"Capt’n.ai"});return Kr(),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(Wb,{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(Sf,{user:r,renderGoToChat:!1}),s?null:r?f.jsx(c1,{user:r}):f.jsx(pn,{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(Hc,{size:"1.1rem",className:"ml-1"})]})})]})})]}),f.jsxs(Dc,{as:"div",className:"lg:hidden",open:e,onClose:t,children:[f.jsx("div",{className:"fixed inset-0 z-50"}),f.jsxs(Dc.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(Vb,{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(l1,{user:r}):f.jsxs("div",{className:"text-right",children:[f.jsx(pn,{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(pn,{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(Hc,{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(Sf,{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:wA,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:ZS.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:qS.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 a2({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 o2="/assets/captn-logo-large-Soxu_L3b.png";var l2=(e=>(e.Login="login",e.Signup="signup",e))(l2||{});function CA(){const e=Kr(),{data:t}=Mr();return G.useEffect(()=>{t&&e.push("/")},[t,e]),f.jsx(a2,{children:f.jsx(c2,{logo:o2,state:"login"})})}function c2({appearance:e,logo:t,socialLayout:r,state:s}){return f.jsx(gA,{appearance:e,logo:t,socialLayout:r,state:s})}function SA(){return f.jsx(a2,{children:f.jsx(c2,{logo:o2,state:l2.Signup})})}function AA(){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 jA(){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 hi=Object.create(null);hi.open="0";hi.close="1";hi.ping="2";hi.pong="3";hi.message="4";hi.upgrade="5";hi.noop="6";const Kl=Object.create(null);Object.keys(hi).forEach(e=>{Kl[hi[e]]=e});const Af={type:"error",data:"parser error"},d2=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",u2=typeof ArrayBuffer=="function",h2=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,f1=({type:e,data:t},r,s)=>d2&&t instanceof Blob?r?s(t):i0(t,s):u2&&(t instanceof ArrayBuffer||h2(t))?r?s(t):i0(new Blob([t]),s):s(hi[e]+(t||"")),i0=(e,t)=>{const r=new FileReader;return r.onload=function(){const s=r.result.split(",")[1];t("b"+(s||""))},r.readAsDataURL(e)};function n0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let $u;function NA(e,t){if(d2&&e.data instanceof Blob)return e.data.arrayBuffer().then(n0).then(t);if(u2&&(e.data instanceof ArrayBuffer||h2(e.data)))return t(n0(e.data));f1(e,!1,r=>{$u||($u=new TextEncoder),t($u.encode(r))})}const s0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ha=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,r=e.length,s,o=0,c,p,v,C;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const A=new ArrayBuffer(t),L=new Uint8Array(A);for(s=0;s>4,L[o++]=(p&15)<<4|v>>2,L[o++]=(v&3)<<6|C&63;return A},LA=typeof ArrayBuffer=="function",p1=(e,t)=>{if(typeof e!="string")return{type:"message",data:f2(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:PA(e.substring(1),t)}:Kl[r]?e.length>1?{type:Kl[r],data:e.substring(1)}:{type:Kl[r]}:Af},PA=(e,t)=>{if(LA){const r=EA(e);return f2(r,t)}else return{base64:!0,data:e}},f2=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},p2="",TA=(e,t)=>{const r=e.length,s=new Array(r);let o=0;e.forEach((c,p)=>{f1(c,!1,v=>{s[p]=v,++o===r&&t(s.join(p2))})})},RA=(e,t)=>{const r=e.split(p2),s=[];for(let o=0;o{const s=r.length;let o;if(s<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,s);else if(s<65536){o=new Uint8Array(3);const c=new DataView(o.buffer);c.setUint8(0,126),c.setUint16(1,s)}else{o=new Uint8Array(9);const c=new DataView(o.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(s))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(r)})}})}let Xu;function jl(e){return e.reduce((t,r)=>t+r.length,0)}function Nl(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(Af);break}o=L*Math.pow(2,32)+A.getUint32(4),s=3}else{if(jl(r)e){v.enqueue(Af);break}}}})}const g2=4;function Ft(e){if(e)return OA(e)}function OA(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 IA=Ar.setTimeout,zA=Ar.clearTimeout;function Hd(e,t){t.useNativeTimers?(e.setTimeoutFn=IA.bind(Ar),e.clearTimeoutFn=zA.bind(Ar)):(e.setTimeoutFn=Ar.setTimeout.bind(Ar),e.clearTimeoutFn=Ar.clearTimeout.bind(Ar))}const FA=1.33;function DA(e){return typeof e=="string"?HA(e):Math.ceil((e.byteLength||e.size)*FA)}function HA(e){let t=0,r=0;for(let s=0,o=e.length;s=57344?r+=3:(s++,r+=4);return r}function BA(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function VA(e){let t={},r=e.split("&");for(let s=0,o=r.length;s0);return t}function v2(){const e=l0(+new Date);return e!==o0?(a0=0,o0=e):e+"."+l0(a0++)}for(;El{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)};RA(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,TA(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]=v2()),!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 oi(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 oi extends Ft{constructor(t,r){super(),Hd(this,r),this.opts=r,this.method=r.method||"GET",this.uri=t,this.data=r.data!==void 0?r.data:null,this.create()}create(){var t;const r=m2(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const s=this.xhr=new b2(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=oi.requestsCount++,oi.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=YA,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete oi.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()}}oi.requestsCount=0;oi.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",c0);else if(typeof addEventListener=="function"){const e="onpagehide"in Ar?"pagehide":"unload";addEventListener(e,c0,!1)}}function c0(){for(let e in oi.requests)oi.requests.hasOwnProperty(e)&&oi.requests[e].abort()}const m1=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0),Ll=Ar.WebSocket||Ar.MozWebSocket,d0=!0,ZA="arraybuffer",u0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class qA extends g1{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=u0?{}:m2(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=d0&&!u0?r?new Ll(t,r):new Ll(t):new Ll(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{d0&&this.ws.send(c)}catch{}o&&m1(()=>{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]=v2()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!Ll}}class QA extends g1{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=MA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(r).getReader(),o=_A();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&&m1(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const KA={websocket:qA,webtransport:QA,polling:GA},JA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ej=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Nf(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=JA.exec(e||""),c={},p=14;for(;p--;)c[ej[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=tj(c,c.path),c.queryKey=rj(c,c.query),c}function tj(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 rj(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,c){o&&(r[o]=c)}),r}let w2=class ys extends Ft{constructor(t,r={}){super(),this.binaryType=ZA,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=Nf(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=Nf(r.host).host),Hd(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=VA(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=g2,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 KA[t](s)}open(){let t;if(this.opts.rememberUpgrade&&ys.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;ys.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;ys.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(L(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const z=new Error("probe error");z.transport=r.name,this.emitReserved("upgradeError",z)}}))};function c(){s||(s=!0,L(),r.close(),r=null)}const p=P=>{const z=new Error("probe error: "+P);z.transport=r.name,c(),this.emitReserved("upgradeError",z)};function v(){p("transport closed")}function C(){p("socket closed")}function A(P){r&&P.name!==r.name&&c()}const L=()=>{r.removeListener("open",o),r.removeListener("error",p),r.removeListener("close",v),this.off("close",C),this.off("upgrading",A)};r.once("open",o),r.once("error",p),r.once("close",v),this.once("close",C),this.once("upgrading",A),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||r.open()},200):r.open()}onOpen(){if(this.readyState="open",ys.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){ys.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,k2=Object.prototype.toString,oj=typeof Blob=="function"||typeof Blob<"u"&&k2.call(Blob)==="[object BlobConstructor]",lj=typeof File=="function"||typeof File<"u"&&k2.call(File)==="[object FileConstructor]";function x1(e){return sj&&(e instanceof ArrayBuffer||aj(e))||oj&&e instanceof Blob||lj&&e instanceof File}function Jl(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}ha.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};ha.prototype.reset=function(){this.attempts=0};ha.prototype.setMin=function(e){this.ms=e};ha.prototype.setMax=function(e){this.max=e};ha.prototype.setJitter=function(e){this.jitter=e};class Pf extends Yt{constructor(t,r){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Hd(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((s=r.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new ha({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||gj;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 w2(this.uri,this.opts);const r=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=Hr(r,"open",function(){s.onopen(),t&&t()}),c=v=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",v),t?t(v):this.maybeReconnectOnOpen()},p=Hr(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(Hr(t,"ping",this.onping.bind(this)),Hr(t,"data",this.ondata.bind(this)),Hr(t,"error",this.onerror.bind(this)),Hr(t,"close",this.onclose.bind(this)),Hr(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){m1(()=>{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 C2(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 La={};function ec(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=ij(e,t.path||"/socket.io"),s=r.source,o=r.id,c=r.path,p=La[o]&&c in La[o].nsps,v=t.forceNew||t["force new connection"]||t.multiplex===!1||p;let C;return v?C=new Pf(s,t):(La[o]||(La[o]=new Pf(s,t)),C=La[o]),r.query&&!t.query&&(t.query=r.queryKey),C.socket(r.path,t)}Object.assign(ec,{Manager:Pf,Socket:C2,io:ec,connect:ec});const Vr=ec(Ey.apiUrl,{autoConnect:!0});function y1(){Vr.auth={sessionId:Qy()},Vr.connected&&(Vr.disconnect(),Vr.connect())}y1();rs.on("sessionId.set",y1);rs.on("sessionId.clear",y1);const b1=G.createContext({socket:Vr,isConnected:!1});function vj({children:e}){const[t,r]=G.useState(Vr.connected);return G.useEffect(()=>{function s(){r(!0)}function o(){r(!1)}return Vr.on("connect",s),Vr.on("disconnect",o),()=>{Vr.off("connect",s),Vr.off("disconnect",o)}},[]),f.jsx(b1.Provider,{value:{socket:Vr,isConnected:t},children:e})}function yj(){return G.useContext(b1)}function Qc(e,t){const{socket:r}=G.useContext(b1);G.useEffect(()=>(r.on(e,t),()=>{r.off(e,t)}),[e,t])}const S2=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(c1,{user:e.user})})]})}),A2="/assets/logo-for-dark-bg-B0Sa7V_h.png";function bj(e){return ls({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 wj=({chatId:e,chatName:t,onValueChange:r})=>{const[s,o]=G.useState(!1),[c,p]=G.useState(t),v=G.useRef(null);G.useEffect(()=>{var z;s&&((z=v.current)==null||z.focus())},[s]),G.useEffect(()=>{p(t)},[t]);const C=z=>{z.preventDefault(),o(!0)},A=z=>{p(z.target.value)},L=z=>{z.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:L,"data-testid":"edit-form",children:f.jsx("input",{ref:v,type:"text",onChange:A,onBlur:P,value:c,className:"w-5/6 focus:outline-none focus:ring-0 focus:border-captn-light-blue bg-captn-light-cream text-captn-dark-blue",style:{height:"23px",paddingLeft:"5px",marginLeft:"-5px"}})}),!s&&f.jsx("button",{className:"edit-button absolute right-3 top-3 text-sm",onClick:C,"data-testid":"edit-button",children:f.jsx(bj,{})})]})},kj="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 Cj(e){return e.map(r=>({role:r.role,content:r.message}))}async function Sj(e,t,r){t&&r(),await ci({id:e,data:{smartSuggestions:{suggestions:[""],type:""},userRespondedWithNextAction:t}})}async function Aj(e,t,r){let s;r?s=await Y9(e):s=await G9({chatId:e,userQuery:t,role:"user"});const o=Cj(s);return await ci({id:e,data:{showLoader:!0}}),o}async function jj(e,t,r){return await Z9({chatId:e,userQuery:r?"":t,role:"assistant",isLoading:!0})}const Nj=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 ci({id:c,data:{showLoader:!1,team_status:"inprogress"}})},Ej=async(e,t,r,s,o,c)=>{const p=await q9({chatId:e,messages:o});await Lj(p,t,r,s,o,e,c)},Lj=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 ci({id:c,data:{streamAgentResponse:!0,showLoader:!1,smartSuggestions:e.smart_suggestions}})),e.content&&await wb({id:r.id,data:{isLoading:!1,message:e.content}});const v=t.isChatNameUpdated?null:e.conversation_name?e.conversation_name:null;await ci({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()},Pj=async(e,t,r,s)=>{await ci({id:t,data:{showLoader:!1}}),console.log("Error: "+e.message),e.message==="No Subscription Found"?s.push("/pricing"):(await wb({id:r.id,data:{isLoading:!1,message:kj}}),await ci({id:t,data:{showLoader:!1,smartSuggestions:{suggestions:["Let's try again"],type:"oneOf"},isExceptionOccured:!0}}))},Tj=e=>e.chatType!=="daily_analysis"||e.shouldShowChat,Rj=({sidebarOpen:e,setSidebarOpen:t,refetchAllChatDetails:r})=>{const s=Kr(),o=aa(),{pathname:c}=o,p=c.split("/").pop(),v=G.useRef(null),C=G.useRef(null),A=localStorage.getItem("sidebar-expanded"),[L,P]=G.useState(A===null?!1:A==="true"),z=async(W,V)=>{try{await ci({id:W,data:{name:V,isChatNameUpdated:!0}})}catch{console.log("Unable to update the chat name. Please try again later.")}},{data:M,isLoading:H,refetch:B}=Gn(ek);G.useEffect(()=>{B()},[r]),G.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)}),G.useEffect(()=>{const W=({keyCode:V})=>{!e||V!==27||t(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)}),G.useEffect(()=>{var W,V;localStorage.setItem("sidebar-expanded",L.toString()),L?(W=document.querySelector("body"))==null||W.classList.add("sidebar-expanded"):(V=document.querySelector("body"))==null||V.classList.remove("sidebar-expanded")},[L]);const q=async W=>{try{const V=await $9();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(sr,{to:"/",children:f.jsx("img",{src:A2,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:q,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:M&&M.map((W,V)=>Tj(W)&&f.jsxs(sr,{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(wj,{chatId:W.id,chatName:W.name?W.name:"",onValueChange:z})})]},W.id))})})]})})})]})};function _j({handleFormSubmit:e,currentChatDetails:t,triggerChatFormSubmitMsg:r}){const[s,o]=G.useState(""),c=G.useCallback(async v=>{v!==null&&r&&await e(r,!0)},[r]),p=async v=>{if(v.preventDefault(),!t.showLoader){const A=v.target.userQuery.value;o(""),e(A)}};return f.jsx("div",{"data-testid":"chat-form",className:"mt-2 mb-2",children:f.jsxs("form",{onSubmit:p,className:"",children:[f.jsx("label",{htmlFor:"search",className:"mb-2 text-sm font-medium text-captn-dark-blue sr-only dark:text-captn-light-cream",children:"Search"}),f.jsxs("div",{className:"relative bottom-0 left-0 right-0 flex items-center justify-between m-1",children:[f.jsx("input",{type:"search",id:"userQuery",name:"search",className:"block rounded-lg w-full h-12 text-sm text-captn-light-cream bg-captn-dark-blue focus:outline-none focus:ring-0 focus:border-captn-light-blue",placeholder:"Message Capt’n...",required:!0,ref:c,value:s,onChange:v=>o(v.target.value)}),f.jsx("button",{type:"submit",className:"text-captn-light-cream bg-captn-cta-green hover:bg-captn-cta-green-hover absolute right-2 font-medium rounded-lg text-sm px-1.5 py-1.5",children:f.jsx("span",{className:"",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"text-captn-light-cream",children:f.jsx("path",{d:"M7 11L12 6L17 11M12 18V7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]})]})})}const Mj=({children:e,handleFormSubmit:t,currentChatDetails:r,triggerChatFormSubmitMsg:s,refetchAllChatDetails:o})=>{const[c,p]=G.useState(!1),{data:v}=Mr(),C=G.useRef(null),A=Kr();G.useEffect(()=>{v?!v.hasPaid&&v.isSignUpComplete&&A.push("/pricing"):A.push("/login")},[v,A]),G.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 L=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 ${L} overflow-hidden`,children:[f.jsx(Rj,{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(S2,{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(_j,{handleFormSubmit:t,currentChatDetails:r,triggerChatFormSubmitMsg:s}):f.jsx(f.Fragment,{})]})]})})};function zn(){return zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),p0={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Ij=["style","script"],zj=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Fj=/mailto:/i,Dj=/\n{2,}$/,j2=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,Hj=/^ *> ?/gm,Bj=/^ {2,}\n/,Vj=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,N2=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,E2=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Wj=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,$j=/^(?:\n *)*\n/,Xj=/\r\n?/g,Yj=/^\[\^([^\]]+)](:.*)\n/,Uj=/^\[\^([^\]]+)]/,Gj=/\f/g,Zj=/^\s*?\[(x|\s)\]/,L2=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,P2=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,T2=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Tf=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,qj=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,R2=/^)/,Qj=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Rf=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,Kj=/^\{.*\}$/,Jj=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,eN=/^<([^ >]+@[^ >]+)>/,tN=/^<([^ >]+:\/[^ >]+)>/,rN=/-([a-z])?/gi,_2=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,iN=/^\[([^\]]*)\]:\s+]+)>?\s*("([^"]*)")?/,nN=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,sN=/^\[([^\]]*)\] ?\[([^\]]*)\]/,aN=/(\[|\])/g,oN=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,lN=/\t/g,cN=/^ *\| */,dN=/(^ *\||\| *$)/g,uN=/ *$/,hN=/^ *:-+: *$/,fN=/^ *:-+ *$/,pN=/^ *-+: *$/,gN=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,mN=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,xN=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,vN=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,yN=/^\\([^0-9A-Za-z\s])/,bN=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,wN=/^\n+/,kN=/^([ \t]*)/,CN=/\\([^\\])/g,g0=/ *\n+$/,SN=/(?:^|\n)( *)$/,w1="(?:\\d+\\.)",k1="(?:[*+-])";function M2(e){return"( *)("+(e===1?w1:k1)+") +"}const O2=M2(1),I2=M2(2);function z2(e){return new RegExp("^"+(e===1?O2:I2))}const AN=z2(1),jN=z2(2);function F2(e){return new RegExp("^"+(e===1?O2:I2)+"[^\\n]*(?:\\n(?!\\1"+(e===1?w1:k1)+" )[^\\n]*)*(\\n|$)","gm")}const D2=F2(1),H2=F2(2);function B2(e){const t=e===1?w1:k1;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const V2=B2(1),W2=B2(2);function m0(e,t){const r=t===1,s=r?V2:W2,o=r?D2:H2,c=r?AN:jN;return{t(p,v,C){const A=SN.exec(C);return A&&(v.o||!v._&&!v.u)?s.exec(p=A[1]+p):null},i:Ge.HIGH,l(p,v,C){const A=r?+p[2]:void 0,L=p[0].replace(Dj,` `).match(o);let P=!1;return{p:L.map(function(z,M){const H=c.exec(z)[0].length,B=new RegExp("^ {1,"+H+"}","gm"),q=z.replace(B,"").replace(c,""),W=M===L.length-1,V=q.indexOf(` `)!==-1||W&&P;P=V;const _=C._,K=C.o;let ee;C.o=!0,V?(C._=!1,ee=q.replace(g0,` -`)):(C._=!0,ee=q.replace(g0,""));const X=v(ee,C);return C._=_,C.o=K,X}),m:r,g:A}},h:(p,v,C)=>e(p.m?"ol":"ul",{key:C.k,start:p.g},p.p.map(function(A,L){return e("li",{key:L},v(A,C))}))}}const NN=/^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,EN=/^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,X2=[N2,E2,L2,P2,R2,T2,_2,M2,H2,W2,B2,$2],LN=[...X2,/^[^\n]+(?: \n|\n{2,})/,Tf,Rf];function PN(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function TN(e){return pN.test(e)?"right":hN.test(e)?"center":fN.test(e)?"left":null}function x0(e,t,r){const s=r.$;r.$=!0;const o=t(e.trim(),r);r.$=s;let c=[[]];return o.forEach(function(p,v){p.type==="tableSeparator"?v!==0&&v!==o.length-1&&c.push([]):(p.type!=="text"||o[v+1]!=null&&o[v+1].type!=="tableSeparator"||(p.v=p.v.replace(uN,"")),c[c.length-1].push(p))}),c}function RN(e,t,r){r._=!0;const s=x0(e[1],t,r),o=e[2].replace(dN,"").split("|").map(TN),c=function(p,v,C){return p.trim().split(` +`)):(C._=!0,ee=q.replace(g0,""));const X=v(ee,C);return C._=_,C.o=K,X}),m:r,g:A}},h:(p,v,C)=>e(p.m?"ol":"ul",{key:C.k,start:p.g},p.p.map(function(A,L){return e("li",{key:L},v(A,C))}))}}const NN=/^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,EN=/^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,$2=[j2,N2,E2,L2,T2,P2,R2,_2,D2,V2,H2,W2],LN=[...$2,/^[^\n]+(?: \n|\n{2,})/,Tf,Rf];function PN(e){return e.replace(/[ÀÁÂÃÄÅàáâãäåæÆ]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function TN(e){return pN.test(e)?"right":hN.test(e)?"center":fN.test(e)?"left":null}function x0(e,t,r){const s=r.$;r.$=!0;const o=t(e.trim(),r);r.$=s;let c=[[]];return o.forEach(function(p,v){p.type==="tableSeparator"?v!==0&&v!==o.length-1&&c.push([]):(p.type!=="text"||o[v+1]!=null&&o[v+1].type!=="tableSeparator"||(p.v=p.v.replace(uN,"")),c[c.length-1].push(p))}),c}function RN(e,t,r){r._=!0;const s=x0(e[1],t,r),o=e[2].replace(dN,"").split("|").map(TN),c=function(p,v,C){return p.trim().split(` `).map(function(A){return x0(A,v,C)})}(e[3],t,r);return r._=!1,{S:o,A:c,L:s,type:"table"}}function v0(e,t){return e.S[t]==null?{}:{textAlign:e.S[t]}}function $i(e){return function(t,r){return r._?e.exec(t):null}}function Xi(e){return function(t,r){return r._||r.u?e.exec(t):null}}function vi(e){return function(t,r){return r._||r.u?null:e.exec(t)}}function Pa(e){return function(t){return e.exec(t)}}function _N(e,t,r){if(t._||t.u||r&&!r.endsWith(` `))return null;let s="";e.split(` -`).every(c=>!X2.some(p=>p.test(c))&&(s+=c+` +`).every(c=>!$2.some(p=>p.test(c))&&(s+=c+` `,c.trim()));const o=s.trimEnd();return o==""?null:[s,o]}function xs(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 y0(e){return e.replace(CN,"$1")}function tc(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 MN(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 ON(e,t,r){return r._=!1,e(t,r)}const Yu=(e,t,r)=>({v:tc(t,e[1],r)});function Uu(){return{}}function Gu(){return null}function IN(...e){return e.filter(Boolean).join(" ")}function Zu(e,t,r){let s=e;const o=t.split(".");for(;o.length&&(s=s[o[0]],s!==void 0);)o.shift();return s||r}var Ge;function zN(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||PN,t.namedCodesToUnicode=t.namedCodesToUnicode?zn({},p0,t.namedCodesToUnicode):p0;const r=t.createElement||G.createElement;function s(M,H,...B){const q=Zu(t.overrides,`${M}.props`,{});return r(function(W,V){const _=Zu(V,W);return _?typeof _=="function"||typeof _=="object"&&"render"in _?_:Zu(V,`${W}.component`,W):W}(M,t.overrides),zn({},H,q,{className:IN(H==null?void 0:H.className,q.className)||void 0}),...B)}function o(M){let H=!1;t.forceInline?H=!0:t.forceBlock||(H=oN.test(M)===!1);const B=L(A(H?M:`${M.trimEnd().replace(wN,"")} -`,{_:H}));for(;typeof B[B.length-1]=="string"&&!B[B.length-1].trim();)B.pop();if(t.wrapper===null)return B;const q=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 G.createElement(q,{key:"outer"},W)}function c(M){const H=M.match(zj);return H?H.reduce(function(B,q,W){const V=q.indexOf("=");if(V!==-1){const _=function(Q){return Q.indexOf("-")!==-1&&Q.match(Qj)===null&&(Q=Q.replace(rN,function(J,fe){return fe.toUpperCase()})),Q}(q.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}(q.slice(V+1).trim()),ee=f0[_]||_,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"?xs(J):(J.match(Kj)&&(J=J.slice(1,J.length-1)),J==="true"||J!=="false"&&J)}(_,K);typeof X=="string"&&(Tf.test(X)||Rf.test(X))&&(B[ee]=G.cloneElement(o(X.trim()),{key:W}))}else q!=="style"&&(B[f0[q]||q]=!0);return B},{}):null}const p=[],v={},C={blockQuote:{t:vi(N2),i:Ge.HIGH,l:(M,H,B)=>({v:H(M[0].replace(Hj,""),B)}),h:(M,H,B)=>s("blockquote",{key:B.k},H(M.v,B))},breakLine:{t:Pa(Bj),i:Ge.HIGH,l:Uu,h:(M,H,B)=>s("br",{key:B.k})},breakThematic:{t:vi(Vj),i:Ge.HIGH,l:Uu,h:(M,H,B)=>s("hr",{key:B.k})},codeBlock:{t:vi(L2),i:Ge.MAX,l:M=>({v:M[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(M,H,B)=>s("pre",{key:B.k},s("code",zn({},M.O,{className:M.M?`lang-${M.M}`:""}),M.v))},codeFenced:{t:vi(E2),i:Ge.MAX,l:M=>({O:c(M[3]||""),v:M[4],M:M[2]||void 0,type:"codeBlock"})},codeInline:{t:Xi(Wj),i:Ge.LOW,l:M=>({v:M[2]}),h:(M,H,B)=>s("code",{key:B.k},M.v)},footnote:{t:vi(Yj),i:Ge.MAX,l:M=>(p.push({I:M[2],j:M[1]}),{}),h:Gu},footnoteReference:{t:$i(Uj),i:Ge.HIGH,l:M=>({v:M[1],B:`#${t.slugify(M[1])}`}),h:(M,H,B)=>s("a",{key:B.k,href:xs(M.B)},s("sup",{key:B.k},M.v))},gfmTask:{t:$i(Zj),i:Ge.HIGH,l:M=>({R:M[1].toLowerCase()==="x"}),h:(M,H,B)=>s("input",{checked:M.R,key:B.k,readOnly:!0,type:"checkbox"})},heading:{t:vi(t.enforceAtxHeadings?T2:P2),i:Ge.HIGH,l:(M,H,B)=>({v:tc(H,M[2],B),T:t.slugify(M[2]),C:M[1].length}),h:(M,H,B)=>s(`h${M.C}`,{id:M.T,key:B.k},H(M.v,B))},headingSetext:{t:vi(R2),i:Ge.MAX,l:(M,H,B)=>({v:tc(H,M[1],B),C:M[2]==="="?1:2,type:"heading"})},htmlComment:{t:Pa(_2),i:Ge.HIGH,l:()=>({}),h:Gu},image:{t:Xi(EN),i:Ge.HIGH,l:M=>({D:M[1],B:y0(M[2]),F:M[3]}),h:(M,H,B)=>s("img",{key:B.k,alt:M.D||void 0,title:M.F||void 0,src:xs(M.B)})},link:{t:$i(NN),i:Ge.LOW,l:(M,H,B)=>({v:MN(H,M[1],B),B:y0(M[2]),F:M[3]}),h:(M,H,B)=>s("a",{key:B.k,href:xs(M.B),title:M.F},H(M.v,B))},linkAngleBraceStyleDetector:{t:$i(tN),i:Ge.MAX,l:M=>({v:[{v:M[1],type:"text"}],B:M[1],type:"link"})},linkBareUrlDetector:{t:(M,H)=>H.N?null:$i(Jj)(M,H),i:Ge.MAX,l:M=>({v:[{v:M[1],type:"text"}],B:M[1],F:void 0,type:"link"})},linkMailtoDetector:{t:$i(eN),i:Ge.MAX,l(M){let H=M[1],B=M[1];return Fj.test(B)||(B="mailto:"+B),{v:[{v:H.replace("mailto:",""),type:"text"}],B,type:"link"}}},orderedList:m0(s,1),unorderedList:m0(s,2),newlineCoalescer:{t:vi($j),i:Ge.LOW,l:Uu,h:()=>` -`},paragraph:{t:_N,i:Ge.LOW,l:Yu,h:(M,H,B)=>s("p",{key:B.k},H(M.v,B))},ref:{t:$i(iN),i:Ge.MAX,l:M=>(v[M[1]]={B:M[2],F:M[4]},{}),h:Gu},refImage:{t:Xi(nN),i:Ge.MAX,l:M=>({D:M[1]||void 0,P:M[2]}),h:(M,H,B)=>s("img",{key:B.k,alt:M.D,src:xs(v[M.P].B),title:v[M.P].F})},refLink:{t:$i(sN),i:Ge.MAX,l:(M,H,B)=>({v:H(M[1],B),Z:H(M[0].replace(aN,"\\$1"),B),P:M[2]}),h:(M,H,B)=>v[M.P]?s("a",{key:B.k,href:xs(v[M.P].B),title:v[M.P].F},H(M.v,B)):s("span",{key:B.k},H(M.Z,B))},table:{t:vi(M2),i:Ge.HIGH,l:RN,h:(M,H,B)=>s("table",{key:B.k},s("thead",null,s("tr",null,M.L.map(function(q,W){return s("th",{key:W,style:v0(M,W)},H(q,B))}))),s("tbody",null,M.A.map(function(q,W){return s("tr",{key:W},q.map(function(V,_){return s("td",{key:_,style:v0(M,_)},H(V,B))}))})))},tableSeparator:{t:function(M,H){return H.$?(H._=!0,cN.exec(M)):null},i:Ge.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Pa(bN),i:Ge.MIN,l:M=>({v:M[0].replace(qj,(H,B)=>t.namedCodesToUnicode[B]?t.namedCodesToUnicode[B]:H)}),h:M=>M.v},textBolded:{t:Xi(gN),i:Ge.MED,l:(M,H,B)=>({v:H(M[2],B)}),h:(M,H,B)=>s("strong",{key:B.k},H(M.v,B))},textEmphasized:{t:Xi(mN),i:Ge.LOW,l:(M,H,B)=>({v:H(M[2],B)}),h:(M,H,B)=>s("em",{key:B.k},H(M.v,B))},textEscaped:{t:Xi(yN),i:Ge.HIGH,l:M=>({v:M[1],type:"text"})},textMarked:{t:Xi(xN),i:Ge.LOW,l:Yu,h:(M,H,B)=>s("mark",{key:B.k},H(M.v,B))},textStrikethroughed:{t:Xi(vN),i:Ge.LOW,l:Yu,h:(M,H,B)=>s("del",{key:B.k},H(M.v,B))}};t.disableParsingRawHTML!==!0&&(C.htmlBlock={t:Pa(Tf),i:Ge.HIGH,l(M,H,B){const[,q]=M[3].match(kN),W=new RegExp(`^${q}`,"gm"),V=M[3].replace(W,""),_=(K=V,LN.some(J=>J.test(K))?ON:tc);var K;const ee=M[1].toLowerCase(),X=Ij.indexOf(ee)!==-1;B.N=B.N||ee==="a";const Q=X?M[3]:_(H,V,B);return B.N=!1,{O:c(M[2]),v:Q,G:X,H:X?ee:M[1]}},h:(M,H,B)=>s(M.H,zn({key:B.k},M.O),M.G?M.v:H(M.v,B))},C.htmlSelfClosing={t:Pa(Rf),i:Ge.HIGH,l:M=>({O:c(M[2]||""),H:M[1]}),h:(M,H,B)=>s(M.H,zn({},M.O,{key:B.k}))});const A=function(M){let H=Object.keys(M);function B(q,W){let V=[],_="";for(;q;){let K=0;for(;K1||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 G.createElement(q,{key:"outer"},W)}function c(M){const H=M.match(zj);return H?H.reduce(function(B,q,W){const V=q.indexOf("=");if(V!==-1){const _=function(Q){return Q.indexOf("-")!==-1&&Q.match(Qj)===null&&(Q=Q.replace(rN,function(J,fe){return fe.toUpperCase()})),Q}(q.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}(q.slice(V+1).trim()),ee=f0[_]||_,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"?xs(J):(J.match(Kj)&&(J=J.slice(1,J.length-1)),J==="true"||J!=="false"&&J)}(_,K);typeof X=="string"&&(Tf.test(X)||Rf.test(X))&&(B[ee]=G.cloneElement(o(X.trim()),{key:W}))}else q!=="style"&&(B[f0[q]||q]=!0);return B},{}):null}const p=[],v={},C={blockQuote:{t:vi(j2),i:Ge.HIGH,l:(M,H,B)=>({v:H(M[0].replace(Hj,""),B)}),h:(M,H,B)=>s("blockquote",{key:B.k},H(M.v,B))},breakLine:{t:Pa(Bj),i:Ge.HIGH,l:Uu,h:(M,H,B)=>s("br",{key:B.k})},breakThematic:{t:vi(Vj),i:Ge.HIGH,l:Uu,h:(M,H,B)=>s("hr",{key:B.k})},codeBlock:{t:vi(E2),i:Ge.MAX,l:M=>({v:M[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(M,H,B)=>s("pre",{key:B.k},s("code",zn({},M.O,{className:M.M?`lang-${M.M}`:""}),M.v))},codeFenced:{t:vi(N2),i:Ge.MAX,l:M=>({O:c(M[3]||""),v:M[4],M:M[2]||void 0,type:"codeBlock"})},codeInline:{t:Xi(Wj),i:Ge.LOW,l:M=>({v:M[2]}),h:(M,H,B)=>s("code",{key:B.k},M.v)},footnote:{t:vi(Yj),i:Ge.MAX,l:M=>(p.push({I:M[2],j:M[1]}),{}),h:Gu},footnoteReference:{t:$i(Uj),i:Ge.HIGH,l:M=>({v:M[1],B:`#${t.slugify(M[1])}`}),h:(M,H,B)=>s("a",{key:B.k,href:xs(M.B)},s("sup",{key:B.k},M.v))},gfmTask:{t:$i(Zj),i:Ge.HIGH,l:M=>({R:M[1].toLowerCase()==="x"}),h:(M,H,B)=>s("input",{checked:M.R,key:B.k,readOnly:!0,type:"checkbox"})},heading:{t:vi(t.enforceAtxHeadings?P2:L2),i:Ge.HIGH,l:(M,H,B)=>({v:tc(H,M[2],B),T:t.slugify(M[2]),C:M[1].length}),h:(M,H,B)=>s(`h${M.C}`,{id:M.T,key:B.k},H(M.v,B))},headingSetext:{t:vi(T2),i:Ge.MAX,l:(M,H,B)=>({v:tc(H,M[1],B),C:M[2]==="="?1:2,type:"heading"})},htmlComment:{t:Pa(R2),i:Ge.HIGH,l:()=>({}),h:Gu},image:{t:Xi(EN),i:Ge.HIGH,l:M=>({D:M[1],B:y0(M[2]),F:M[3]}),h:(M,H,B)=>s("img",{key:B.k,alt:M.D||void 0,title:M.F||void 0,src:xs(M.B)})},link:{t:$i(NN),i:Ge.LOW,l:(M,H,B)=>({v:MN(H,M[1],B),B:y0(M[2]),F:M[3]}),h:(M,H,B)=>s("a",{key:B.k,href:xs(M.B),title:M.F},H(M.v,B))},linkAngleBraceStyleDetector:{t:$i(tN),i:Ge.MAX,l:M=>({v:[{v:M[1],type:"text"}],B:M[1],type:"link"})},linkBareUrlDetector:{t:(M,H)=>H.N?null:$i(Jj)(M,H),i:Ge.MAX,l:M=>({v:[{v:M[1],type:"text"}],B:M[1],F:void 0,type:"link"})},linkMailtoDetector:{t:$i(eN),i:Ge.MAX,l(M){let H=M[1],B=M[1];return Fj.test(B)||(B="mailto:"+B),{v:[{v:H.replace("mailto:",""),type:"text"}],B,type:"link"}}},orderedList:m0(s,1),unorderedList:m0(s,2),newlineCoalescer:{t:vi($j),i:Ge.LOW,l:Uu,h:()=>` +`},paragraph:{t:_N,i:Ge.LOW,l:Yu,h:(M,H,B)=>s("p",{key:B.k},H(M.v,B))},ref:{t:$i(iN),i:Ge.MAX,l:M=>(v[M[1]]={B:M[2],F:M[4]},{}),h:Gu},refImage:{t:Xi(nN),i:Ge.MAX,l:M=>({D:M[1]||void 0,P:M[2]}),h:(M,H,B)=>s("img",{key:B.k,alt:M.D,src:xs(v[M.P].B),title:v[M.P].F})},refLink:{t:$i(sN),i:Ge.MAX,l:(M,H,B)=>({v:H(M[1],B),Z:H(M[0].replace(aN,"\\$1"),B),P:M[2]}),h:(M,H,B)=>v[M.P]?s("a",{key:B.k,href:xs(v[M.P].B),title:v[M.P].F},H(M.v,B)):s("span",{key:B.k},H(M.Z,B))},table:{t:vi(_2),i:Ge.HIGH,l:RN,h:(M,H,B)=>s("table",{key:B.k},s("thead",null,s("tr",null,M.L.map(function(q,W){return s("th",{key:W,style:v0(M,W)},H(q,B))}))),s("tbody",null,M.A.map(function(q,W){return s("tr",{key:W},q.map(function(V,_){return s("td",{key:_,style:v0(M,_)},H(V,B))}))})))},tableSeparator:{t:function(M,H){return H.$?(H._=!0,cN.exec(M)):null},i:Ge.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Pa(bN),i:Ge.MIN,l:M=>({v:M[0].replace(qj,(H,B)=>t.namedCodesToUnicode[B]?t.namedCodesToUnicode[B]:H)}),h:M=>M.v},textBolded:{t:Xi(gN),i:Ge.MED,l:(M,H,B)=>({v:H(M[2],B)}),h:(M,H,B)=>s("strong",{key:B.k},H(M.v,B))},textEmphasized:{t:Xi(mN),i:Ge.LOW,l:(M,H,B)=>({v:H(M[2],B)}),h:(M,H,B)=>s("em",{key:B.k},H(M.v,B))},textEscaped:{t:Xi(yN),i:Ge.HIGH,l:M=>({v:M[1],type:"text"})},textMarked:{t:Xi(xN),i:Ge.LOW,l:Yu,h:(M,H,B)=>s("mark",{key:B.k},H(M.v,B))},textStrikethroughed:{t:Xi(vN),i:Ge.LOW,l:Yu,h:(M,H,B)=>s("del",{key:B.k},H(M.v,B))}};t.disableParsingRawHTML!==!0&&(C.htmlBlock={t:Pa(Tf),i:Ge.HIGH,l(M,H,B){const[,q]=M[3].match(kN),W=new RegExp(`^${q}`,"gm"),V=M[3].replace(W,""),_=(K=V,LN.some(J=>J.test(K))?ON:tc);var K;const ee=M[1].toLowerCase(),X=Ij.indexOf(ee)!==-1;B.N=B.N||ee==="a";const Q=X?M[3]:_(H,V,B);return B.N=!1,{O:c(M[2]),v:Q,G:X,H:X?ee:M[1]}},h:(M,H,B)=>s(M.H,zn({key:B.k},M.O),M.G?M.v:H(M.v,B))},C.htmlSelfClosing={t:Pa(Rf),i:Ge.HIGH,l:M=>({O:c(M[2]||""),H:M[1]}),h:(M,H,B)=>s(M.H,zn({},M.O,{key:B.k}))});const A=function(M){let H=Object.keys(M);function B(q,W){let V=[],_="";for(;q;){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,Oj);return G.cloneElement(zN(t,r),s)};function FN({currentChatDetails:e,smartSuggestionOnClick:t}){const[r,s]=G.useState(!0),o=Kr(),c=e.smartSuggestions.suggestions;async function p(v,C){if(e.isExceptionOccured)if(e.chatType==="daily_analysis"){const[A,L]=await X9(e);o.push(`/chat/${A.uuid}?msg=${L}`)}else if(e.team_name){const[A,L]=await U9(e.id);o.push(`/chat/${A.uuid}?msg=${L}`)}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(Kc,{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 DN=(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 HN({suggestions:e,smartSuggestionOnClick:t,chatType:r,userSelectedActionMessage:s}){const[o,c]=G.useState([]),p=v=>{const C=v.target.value;v.target.checked?c([...o,C]):c(o.filter(A=>A!==C))};return G.useEffect(()=>{s&&c([...o,s])},[s]),f.jsx("div",{className:"pb-4 flex items-center group bg-captn-dark-blue",children:f.jsxs("div",{style:{maxWidth:"800px",margin:"auto"},className:"fade-in relative ml-3 block w-full px-4 rounded-lg bg-captn-light-green ",children:[r==="daily_analysis"&&f.jsx("hr",{className:" bg-gray-200 border-1"}),r==="daily_analysis"&&f.jsx("p",{className:"block text-bold text-captn-light-cream",style:{margin:"20px 0"},children:f.jsx("b",{children:"If you've made a selection through email, the option is pre-selected but can be changed. You can opt for all or just a few options as desired, and then click the send button. Alternatively, you can type your own responses in the input field below."})}),f.jsx("div",{className:"ml-6 chat-conversations text-base flex flex-col",children:e.map((v,C)=>f.jsxs("label",{className:"flex items-center me-4",children:[f.jsx("input",{type:"checkbox",value:v,onChange:p,checked:o.includes(v),className:"accent-pink-300 rounded-sm accent-captn-cta-green"}),f.jsx("span",{className:"ml-2 mt-1 text-captn-light-cream",children:v})]},C))}),f.jsx("button",{onClick:v=>{v.preventDefault(),DN(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 BN=({sentence:e,speed:t=100,onStreamAnimationComplete:r})=>{const[s,o]=G.useState("");return G.useEffect(()=>{if(s.length{o(p=>e.substring(0,p.length+1))},t);return()=>clearTimeout(c)}else r&&r()},[s,e,t]),f.jsx(Kc,{children:s})},VN=({messages:e,maxHeight:t,isOpenOnLoad:r})=>{const[s,o]=G.useState(!r),c=G.useRef(null),[p,v]=G.useState(!0),C=L=>(L=L.replace(/\[0m/g,"").replace(/\[1m/g,'').replace(/\[4m/g,'').replace(/\[30m/g,'').replace(/\[31m/g,'').replace(/\[32m/g,'').replace(/\[33m/g,'').replace(/\[34m/g,'').replace(/\[35m/g,'').replace(/\[36m/g,'').replace(/\[37m/g,'').replace(/\n/g,"
"),L),A=L=>{const P=L.currentTarget,z=P.scrollHeight-P.scrollTop===P.clientHeight;v(z)};return G.useEffect(()=>{p&&c.current&&(c.current.scrollTop=c.current.scrollHeight)},[e,p]),f.jsxs("div",{className:`accordion-wrapper terminal ${s?"minimized":""}`,children:[f.jsxs("div",{className:`relative terminal-header ${s?"rounded-lg":"rounded-t-lg"} text-captn-light-cream p-1 text-right bg-captn-light-blue `,onClick:()=>o(!s),children:[f.jsx("p",{className:"accordion-title text-sm text-left text-captn-dark-blue",children:"Agent conversations"}),f.jsx("button",{className:`absolute right-4 top-4 ${s?"":"open"} text-sm text-captn-dark-blue `,children:s?f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-chevron-up",viewBox:"0 0 16 16",height:"16",children:f.jsx("path",{fillRule:"evenodd",d:"M1.646 11.854a.5.5 0 0 0 .708 0L8 6.207l5.646 5.647a.5.5 0 0 0 .708-.708l-6-6a.5.5 0 0 0-.708 0l-6 6a.5.5 0 0 0 0 .708z"})}):f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-chevron-down",viewBox:"0 0 16 16",height:"16",children:f.jsx("path",{fillRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.793l5.646-5.647a.5.5 0 0 1 .708 .708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"})})})]}),f.jsx("div",{className:`accordion-item rounded-b-lg ${s?"":"collapsed"}`,children:f.jsx("div",{ref:c,onScroll:A,className:`accordion-content scroll-container bg-captn-light-cream p-4 text-captn-dark-blue font-mono text-xs overflow-y-auto overflow-x-hidden ${s?"hidden":""}`,style:{maxHeight:`${t}px`,wordWrap:"break-word"},dangerouslySetInnerHTML:{__html:C(e)}})})]})},b0=({agentConversationHistory:e,initialState:t=!1,isAgentWindow:r=!1})=>(G.useState(t),f.jsx("div",{"data-testid":"agent-loader",className:"flex items-center group flex-col bg-captn-dark-blue",children:f.jsx("div",{style:{maxWidth:`${r?"745px":"800px"}`,left:`${r?"15px":"0px"}`,margin:"0 auto 20"},className:"relative block w-full",children:f.jsx(VN,{messages:e,maxHeight:400,isOpenOnLoad:r})})}));function WN({conversations:e,currentChatDetails:t,handleFormSubmit:r,userSelectedActionMessage:s,onStreamAnimationComplete:o}){var P,z;const[c,p]=G.useState(""),v=(P=t==null?void 0:t.smartSuggestions)==null?void 0:P.suggestions,C=v==null?void 0:v.length,A=C>0&&!(C===1&&(t==null?void 0:t.smartSuggestions.suggestions[0])===""),L=e.length-1;return Qc("newMessageFromTeam",M=>p(M)),Qc("streamFromTeamFinished",()=>p("")),f.jsxs("div",{"data-testid":"conversations-wrapper",className:"w-full",children:[e.map((M,H)=>{const B=M.role==="user",q=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:i2,className:"w-full h-full",style:{borderRadius:"50%"}});return f.jsx("div",{children:M.isLoading?f.jsx(n2,{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-${q} 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-${q} rounded-lg bg-${q} `,children:[f.jsx("span",{className:"absolute inline-block",style:{left:"-15px",top:"6px",height:" 45px",width:"45px"},children:V}),H===L&&!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(BN,{sentence:M.message,speed:5,onStreamAnimationComplete:o}):f.jsx(Kc,{children:M.message})}),(H!==L||H===L&&B)&&f.jsx("div",{className:"chat-conversations text-base flex flex-col gap-2",children:f.jsx(Kc,{children:M.message})}),M.agentConversationHistory&&f.jsx(b0,{agentConversationHistory:M.agentConversationHistory})]})})},H)}),(t==null?void 0:t.team_status)==="inprogress"&&c&&f.jsx(b0,{agentConversationHistory:c,initialState:!0,isAgentWindow:!0}),A&&!(t!=null&&t.streamAgentResponse)&&f.jsx("div",{"data-testid":"smart-suggestions",className:"fadeIn",children:((z=t.smartSuggestions)==null?void 0:z.type)=="oneOf"?f.jsx(FN,{currentChatDetails:t,smartSuggestionOnClick:r}):f.jsx(HN,{suggestions:t.smartSuggestions.suggestions,smartSuggestionOnClick:r,chatType:t.chatType,userSelectedActionMessage:s})})]})}const $N=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Mr();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(Ld,{to:"/login"});else return c?f.jsx(u1,{}):s?f.jsx(f.Fragment,{children:f.jsx(e,{...t,user:r})}):f.jsx(f.Fragment,{children:f.jsx(e,{...t,user:r})})},XN=({user:e})=>{const[t,r]=G.useState(!1),{socket:s}=yj(),o=aa(),{pathname:c}=o,p=Kr(),v=new URLSearchParams(o.search),C=c.split("/").pop(),A=C==="chat"?null:C,{data:L}=Gn(rk,{chatUUID:A}),P=Number(L==null?void 0:L.id),{data:z,refetch:M}=Gn(J9,{chatId:P},{enabled:!!P}),{data:H,refetch:B}=Gn(tk,{chatId:P},{enabled:!!P});G.useEffect(()=>{z&&z.chatType==="daily_analysis"&&ci({id:P,data:{shouldShowChat:!0}})},[A,z]),Qc("smartSuggestionsAddedToDB",q),Qc("streamFromTeamFinished",q);function q(){B(),M()}const W=()=>{p.push({search:""})},V=()=>{r(!t)},_=async(J,fe=!1,le=!1)=>{if(z.userId!==e.id)window.alert("Error: This chat does not belong to you.");else{let Ne;try{await Sj(P,fe,W);const ve=await Aj(P,J,le);Ne=await jj(P,J,le),z.customerBrief||z.chatType==="daily_analysis"?await Nj(s,z,Ne,J,ve,P):await Ej(P,z,Ne,s,ve,V)}catch(ve){await Pj(ve,P,Ne,p)}}},K=()=>{ci({id:P,data:{streamAgentResponse:!1}})};let ee=v.get("msg");ee&&(z!=null&&z.userRespondedWithNextAction)&&(ee=null);const X=v.get("selected_user_action");let Q=null;return X&&(z!=null&&z.userRespondedWithNextAction||z!=null&&z.proposedUserAction&&(Q=z.proposedUserAction[Number(X)-1])),f.jsx(Mj,{handleFormSubmit:_,currentChatDetails:z,triggerChatFormSubmitMsg:ee,refetchAllChatDetails:t,children:f.jsx("div",{className:"flex h-full flex-col",children:z?f.jsx("div",{className:"flex-1 overflow-hidden",children:H&&f.jsx(WN,{conversations:H,currentChatDetails:z,handleFormSubmit:_,userSelectedActionMessage:Q,onStreamAnimationComplete:K})}):f.jsx(UN,{})})})},YN=$N(XN);function UN(){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 GN=[{name:"Monthly Subscription",id:d1.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}],ZN=()=>{const[e,t]=G.useState(!1),{data:r,isLoading:s}=Mr(),o=Kr();async function c(p){if(!r){o.push("/login");return}try{t(p);let v=await wb(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:GN.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(WC,{className:"h-6 w-5 flex-none text-captn-cta-green","aria-hidden":"true"}),v]},v))})]}),r&&r.hasPaid?f.jsx("a",{href:e2,"aria-describedby":"manage-subscription",className:` +- `)}`;t(r)}};function HN({suggestions:e,smartSuggestionOnClick:t,chatType:r,userSelectedActionMessage:s}){const[o,c]=G.useState([]),p=v=>{const C=v.target.value;v.target.checked?c([...o,C]):c(o.filter(A=>A!==C))};return G.useEffect(()=>{s&&c([...o,s])},[s]),f.jsx("div",{className:"pb-4 flex items-center group bg-captn-dark-blue",children:f.jsxs("div",{style:{maxWidth:"800px",margin:"auto"},className:"fade-in relative ml-3 block w-full px-4 rounded-lg bg-captn-light-green ",children:[r==="daily_analysis"&&f.jsx("hr",{className:" bg-gray-200 border-1"}),r==="daily_analysis"&&f.jsx("p",{className:"block text-bold text-captn-light-cream",style:{margin:"20px 0"},children:f.jsx("b",{children:"If you've made a selection through email, the option is pre-selected but can be changed. You can opt for all or just a few options as desired, and then click the send button. Alternatively, you can type your own responses in the input field below."})}),f.jsx("div",{className:"ml-6 chat-conversations text-base flex flex-col",children:e.map((v,C)=>f.jsxs("label",{className:"flex items-center me-4",children:[f.jsx("input",{type:"checkbox",value:v,onChange:p,checked:o.includes(v),className:"accent-pink-300 rounded-sm accent-captn-cta-green"}),f.jsx("span",{className:"ml-2 mt-1 text-captn-light-cream",children:v})]},C))}),f.jsx("button",{onClick:v=>{v.preventDefault(),DN(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 BN=({sentence:e,speed:t=100,onStreamAnimationComplete:r})=>{const[s,o]=G.useState("");return G.useEffect(()=>{if(s.length{o(p=>e.substring(0,p.length+1))},t);return()=>clearTimeout(c)}else r&&r()},[s,e,t]),f.jsx(Kc,{children:s})},VN=({messages:e,maxHeight:t,isOpenOnLoad:r})=>{const[s,o]=G.useState(!r),c=G.useRef(null),[p,v]=G.useState(!0),C=L=>(L=L.replace(/\[0m/g,"
").replace(/\[1m/g,'').replace(/\[4m/g,'').replace(/\[30m/g,'').replace(/\[31m/g,'').replace(/\[32m/g,'').replace(/\[33m/g,'').replace(/\[34m/g,'').replace(/\[35m/g,'').replace(/\[36m/g,'').replace(/\[37m/g,'').replace(/\n/g,"
"),L),A=L=>{const P=L.currentTarget,z=P.scrollHeight-P.scrollTop===P.clientHeight;v(z)};return G.useEffect(()=>{p&&c.current&&(c.current.scrollTop=c.current.scrollHeight)},[e,p]),f.jsxs("div",{className:`accordion-wrapper terminal ${s?"minimized":""}`,children:[f.jsxs("div",{className:`relative terminal-header ${s?"rounded-lg":"rounded-t-lg"} text-captn-light-cream p-1 text-right bg-captn-light-blue `,onClick:()=>o(!s),children:[f.jsx("p",{className:"accordion-title text-sm text-left text-captn-dark-blue",children:"Agent conversations"}),f.jsx("button",{className:`absolute right-4 top-4 ${s?"":"open"} text-sm text-captn-dark-blue `,children:s?f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-chevron-up",viewBox:"0 0 16 16",height:"16",children:f.jsx("path",{fillRule:"evenodd",d:"M1.646 11.854a.5.5 0 0 0 .708 0L8 6.207l5.646 5.647a.5.5 0 0 0 .708-.708l-6-6a.5.5 0 0 0-.708 0l-6 6a.5.5 0 0 0 0 .708z"})}):f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-chevron-down",viewBox:"0 0 16 16",height:"16",children:f.jsx("path",{fillRule:"evenodd",d:"M1.646 4.646a.5.5 0 0 1 .708 0L8 10.793l5.646-5.647a.5.5 0 0 1 .708 .708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"})})})]}),f.jsx("div",{className:`accordion-item rounded-b-lg ${s?"":"collapsed"}`,children:f.jsx("div",{ref:c,onScroll:A,className:`accordion-content scroll-container bg-captn-light-cream p-4 text-captn-dark-blue font-mono text-xs overflow-y-auto overflow-x-hidden ${s?"hidden":""}`,style:{maxHeight:`${t}px`,wordWrap:"break-word"},dangerouslySetInnerHTML:{__html:C(e)}})})]})},b0=({agentConversationHistory:e,initialState:t=!1,isAgentWindow:r=!1})=>(G.useState(t),f.jsx("div",{"data-testid":"agent-loader",className:"flex items-center group flex-col bg-captn-dark-blue",children:f.jsx("div",{style:{maxWidth:`${r?"745px":"800px"}`,left:`${r?"15px":"0px"}`,margin:"0 auto 20"},className:"relative block w-full",children:f.jsx(VN,{messages:e,maxHeight:400,isOpenOnLoad:r})})}));function WN({conversations:e,currentChatDetails:t,handleFormSubmit:r,userSelectedActionMessage:s,onStreamAnimationComplete:o}){var P,z;const[c,p]=G.useState(""),v=(P=t==null?void 0:t.smartSuggestions)==null?void 0:P.suggestions,C=v==null?void 0:v.length,A=C>0&&!(C===1&&(t==null?void 0:t.smartSuggestions.suggestions[0])===""),L=e.length-1;return Qc("newMessageFromTeam",M=>p(M)),Qc("streamFromTeamFinished",()=>p("")),f.jsxs("div",{"data-testid":"conversations-wrapper",className:"w-full",children:[e.map((M,H)=>{const B=M.role==="user",q=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:r2,className:"w-full h-full",style:{borderRadius:"50%"}});return f.jsx("div",{children:M.isLoading?f.jsx(i2,{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-${q} 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-${q} rounded-lg bg-${q} `,children:[f.jsx("span",{className:"absolute inline-block",style:{left:"-15px",top:"6px",height:" 45px",width:"45px"},children:V}),H===L&&!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(BN,{sentence:M.message,speed:5,onStreamAnimationComplete:o}):f.jsx(Kc,{children:M.message})}),(H!==L||H===L&&B)&&f.jsx("div",{className:"chat-conversations text-base flex flex-col gap-2",children:f.jsx(Kc,{children:M.message})}),M.agentConversationHistory&&f.jsx(b0,{agentConversationHistory:M.agentConversationHistory})]})})},H)}),(t==null?void 0:t.team_status)==="inprogress"&&c&&f.jsx(b0,{agentConversationHistory:c,initialState:!0,isAgentWindow:!0}),A&&!(t!=null&&t.streamAgentResponse)&&f.jsx("div",{"data-testid":"smart-suggestions",className:"fadeIn",children:((z=t.smartSuggestions)==null?void 0:z.type)=="oneOf"?f.jsx(FN,{currentChatDetails:t,smartSuggestionOnClick:r}):f.jsx(HN,{suggestions:t.smartSuggestions.suggestions,smartSuggestionOnClick:r,chatType:t.chatType,userSelectedActionMessage:s})})]})}const $N=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Mr();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(Ld,{to:"/login"});else return c?f.jsx(u1,{}):s?f.jsx(f.Fragment,{children:f.jsx(e,{...t,user:r})}):f.jsx(f.Fragment,{children:f.jsx(e,{...t,user:r})})},XN=({user:e})=>{const[t,r]=G.useState(!1),{socket:s}=yj(),o=aa(),{pathname:c}=o,p=Kr(),v=new URLSearchParams(o.search),C=c.split("/").pop(),A=C==="chat"?null:C,{data:L}=Gn(rk,{chatUUID:A}),P=Number(L==null?void 0:L.id),{data:z,refetch:M}=Gn(J9,{chatId:P},{enabled:!!P}),{data:H,refetch:B}=Gn(tk,{chatId:P},{enabled:!!P});G.useEffect(()=>{z&&z.chatType==="daily_analysis"&&ci({id:P,data:{shouldShowChat:!0}})},[A,z]),Qc("smartSuggestionsAddedToDB",q),Qc("streamFromTeamFinished",q);function q(){B(),M()}const W=()=>{p.push({search:""})},V=()=>{r(!t)},_=async(J,fe=!1,le=!1)=>{if(z.userId!==e.id)window.alert("Error: This chat does not belong to you.");else{let Ne;try{await Sj(P,fe,W);const ve=await Aj(P,J,le);Ne=await jj(P,J,le),z.customerBrief||z.chatType==="daily_analysis"?await Nj(s,z,Ne,J,ve,P):await Ej(P,z,Ne,s,ve,V)}catch(ve){await Pj(ve,P,Ne,p)}}},K=()=>{ci({id:P,data:{streamAgentResponse:!1}})};let ee=v.get("msg");ee&&(z!=null&&z.userRespondedWithNextAction)&&(ee=null);const X=v.get("selected_user_action");let Q=null;return X&&(z!=null&&z.userRespondedWithNextAction||z!=null&&z.proposedUserAction&&(Q=z.proposedUserAction[Number(X)-1])),f.jsx(Mj,{handleFormSubmit:_,currentChatDetails:z,triggerChatFormSubmitMsg:ee,refetchAllChatDetails:t,children:f.jsx("div",{className:"flex h-full flex-col",children:z?f.jsx("div",{className:"flex-1 overflow-hidden",children:H&&f.jsx(WN,{conversations:H,currentChatDetails:z,handleFormSubmit:_,userSelectedActionMessage:Q,onStreamAnimationComplete:K})}):f.jsx(UN,{})})})},YN=$N(XN);function UN(){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 GN=[{name:"Monthly Subscription",id:d1.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}],ZN=()=>{const[e,t]=G.useState(!1),{data:r,isLoading:s}=Mr(),o=Kr();async function c(p){if(!r){o.push("/login");return}try{t(p);let v=await bb(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:GN.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(WC,{className:"h-6 w-5 flex-none text-captn-cta-green","aria-hidden":"true"}),v]},v))})]}),r&&r.hasPaid?f.jsx("a",{href:Jb,"aria-describedby":"manage-subscription",className:` ${p.id==="enterprise-tier"?"opacity-50 cursor-not-allowed":"opacity-100 cursor-pointer"} ${p.bestDeal?"no-underline bg-captn-cta-green text-captn-light-cream hover:text-captn-light-cream shadow-sm hover:bg-captn-cta-green-hover":"text-captn-dark-blue ring-1 ring-inset ring-purple-200 hover:ring-purple-400"} 'mt-8 block rounded-md py-2 px-3 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-captn-light-blue' @@ -84,7 +84,7 @@ Error generating stack: `+c.message+` ${p.bestDeal?"bg-captn-cta-green text-captn-light-cream hover:text-captn-light-cream shadow-sm hover:bg-captn-cta-green-hover":"text-captn-dark-blue ring-1 ring-inset ring-purple-200 hover:ring-purple-400"} ${e===p.id?"cursor-wait":null} 'mt-8 block rounded-md py-2 px-3 text-center text-sm font-semibold leading-6 focus-visible:outline focus-visible:outline-2 focus-visible:outline-yellow-400 ' - `,children:p.id==="enterprise-tier"?"Contact us":r?"Start free trial":"Sign in to buy plan"})]},p.id))})]})})},qN=({type:e,message:t,onClick:r})=>{const s=e==="success";return f.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 p-16 backdrop-blur-sm bg-captn-light-cream/30",children:f.jsxs("div",{className:"bg-captn-light-cream rounded-lg shadow-lg p-8 m-4 max-w-sm mx-auto",children:[f.jsx("h2",{className:"text-xl font-bold mb-4 text-captn-dark-blue",children:s?"Success":"Error"}),f.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:t}),f.jsx("div",{className:"mt-4 text-right",children:f.jsx("button",{onClick:r,className:`py-2 px-4 rounded text-captn-light-cream focus:outline-none ${s?"bg-captn-cta-green":"bg-captn-cta-red"}`,children:"OK"})})]})})};function QN({hasSubscribedToMarketingEmails:e}){const[t,r]=G.useState(e),[s,o]=G.useState(!1),[c,p]=G.useState(null),v=P=>{r(P.target.value==="Yes"),o(!0)},C=()=>{p(null)},A=async P=>{try{await Ja({hasSubscribedToMarketingEmails:P}),p("success")}catch{p("error")}o(!1)},L=c==="success"?"Your changes are saved successfully.":"Something went wrong. Please try again later.";return f.jsxs(f.Fragment,{children:[c&&f.jsx(qN,{type:c,onClick:C,message:L}),f.jsxs("div",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:[f.jsxs("label",{className:"mr-4",children:[f.jsx("input",{type:"radio",value:"Yes",checked:t,onChange:v,className:"form-radio text-captn-light-blue mr-2 focus:ring-1 outline-none"}),"Yes"]}),f.jsxs("label",{children:[f.jsx("input",{type:"radio",value:"No",checked:!t,onChange:v,className:"form-radio text-captn-light-blue mr-2 focus:ring-1 outline-none"}),"No"]})]}),f.jsx("div",{className:"ml-0 md:ml-4 flex-shrink-0 sm:col-span-1 sm:mt-0",style:{height:"24px"},children:f.jsx("button",{onClick:()=>A(t),disabled:!s,className:`mt-4 md:-mt-10 no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream ring-1 ring-inset ring-gray-200 hover:bg-captn-cta-green-hover shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:text-captn-light-cream bg-captn-cta-green ${s?"":"opacity-40 cursor-not-allowed"}`,children:"Save"})})]})}const KN=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Mr();return o?r?f.jsx(e,{...t,user:r}):f.jsx(Ld,{to:"/login"}):c?f.jsx(u1,{}):s?f.jsx(e,{...t,user:r}):f.jsx(e,{...t,user:r})},JN=({user:e})=>f.jsxs("div",{className:"mt-10 px-6",children:[f.jsxs("div",{className:"overflow-hidden bg-captn-light-cream ring-1 ring-gray-900/10 shadow-lg sm:rounded-lg lg:m-8 ",children:[f.jsx("div",{className:"px-4 py-5 sm:px-6 lg:px-8",children:f.jsx("h3",{className:"text-base font-semibold leading-6 text-captn-dark-blue",children:"Account Information"})}),f.jsx("div",{className:"border-t border-gray-200 px-4 py-5 sm:p-0",children:f.jsxs("dl",{className:"sm:divide-y sm:divide-gray-200",children:[!!e.email&&f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue dark:text-captn-light-cream",children:"Email address"}),f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue dark:text-gray-400 sm:col-span-2 sm:mt-0",children:e.email})]}),!!e.username&&f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue dark:text-captn-light-cream",children:"Username"}),f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue dark:text-gray-400 sm:col-span-2 sm:mt-0",children:e.username})]}),f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue",children:"Subscription status"}),e.hasPaid?f.jsxs(f.Fragment,{children:[e.subscriptionStatus!=="past_due"?f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"Active"}):f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"Your Account is Past Due! Please Update your Payment Information"}),f.jsx(tE,{})]}):f.jsxs(f.Fragment,{children:[f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"N/A"}),f.jsx("div",{className:"flex items-center justify-left -mt-2",children:f.jsx(t2,{})})]})]}),f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue",children:"I agree to receiving marketing emails"}),f.jsx(f.Fragment,{children:f.jsx(QN,{hasSubscribedToMarketingEmails:e.hasSubscribedToMarketingEmails})})]})]})})]}),f.jsx("div",{className:"inline-flex w-full justify-end",children:f.jsx("button",{onClick:Sb,className:"inline-flex justify-center mx-8 py-2 px-4 border border-transparent shadow-md text-sm font-medium rounded-md text-captn-light-cream bg-captn-cta-green hover:bg-captn-cta-green-hover focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Sign out"})})]}),eE=KN(JN);function tE(){const e=()=>{window.open(e2,"_blank")};return f.jsx("div",{className:"ml-0 md:ml-4 flex-shrink-0 sm:col-span-1 sm:mt-0",children:f.jsx("button",{onClick:e,className:"font-medium text-sm text-captn-light-blue hover:underline",children:"Manage Subscription"})})}function rE(){const[e,t]=G.useState("loading"),r=Kr(),s=aa();return G.useEffect(()=>{function o(){return setTimeout(()=>{r.push("/chat")},4e3)}const c=new URLSearchParams(s.search),p=c.get("success");return c.get("canceled")?t("canceled"):p?t("paid"):r.push("/chat"),o(),()=>{clearTimeout(o())}},[s]),f.jsx("div",{className:"flex min-h-full flex-col justify-center mt-10 sm:px-6 lg:px-8",children:f.jsx("div",{className:"sm:mx-auto sm:w-full sm:max-w-md",children:f.jsxs("div",{className:"bg-white py-8 px-4 shadow-xl ring-1 ring-gray-900/10 sm:rounded-lg sm:px-10",children:[f.jsx("h1",{children:e==="paid"?"🥳 Payment Successful!":e==="canceled"?"😢 Payment Canceled":e==="error"&&"🙄 Payment Error"}),e!=="loading"&&f.jsxs("span",{className:"text-center",children:["You are being redirected to your chat page... ",f.jsx("br",{})]})]})})})}function Bd(){return f.jsx("svg",{className:"fill-meta-3",width:"10",height:"11",viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M4.35716 2.47737L0.908974 5.82987L5.0443e-07 4.94612L5 0.0848689L10 4.94612L9.09103 5.82987L5.64284 2.47737L5.64284 10.0849L4.35716 10.0849L4.35716 2.47737Z",fill:""})})}function C1(){return f.jsx("svg",{className:"fill-meta-5",width:"10",height:"11",viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M5.64284 7.69237L9.09102 4.33987L10 5.22362L5 10.0849L-8.98488e-07 5.22362L0.908973 4.33987L4.35716 7.69237L4.35716 0.0848701L5.64284 0.0848704L5.64284 7.69237Z",fill:""})})}const iE=({dailyStats:e,isLoading:t})=>{const r=G.useMemo(()=>!!(e!=null&&e.userDelta)&&e.userDelta>0,[e]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"18",viewBox:"0 0 22 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M7.18418 8.03751C9.31543 8.03751 11.0686 6.35313 11.0686 4.25626C11.0686 2.15938 9.31543 0.475006 7.18418 0.475006C5.05293 0.475006 3.2998 2.15938 3.2998 4.25626C3.2998 6.35313 5.05293 8.03751 7.18418 8.03751ZM7.18418 2.05626C8.45605 2.05626 9.52168 3.05313 9.52168 4.29063C9.52168 5.52813 8.49043 6.52501 7.18418 6.52501C5.87793 6.52501 4.84668 5.52813 4.84668 4.29063C4.84668 3.05313 5.9123 2.05626 7.18418 2.05626Z",fill:""}),f.jsx("path",{d:"M15.8124 9.6875C17.6687 9.6875 19.1468 8.24375 19.1468 6.42188C19.1468 4.6 17.6343 3.15625 15.8124 3.15625C13.9905 3.15625 12.478 4.6 12.478 6.42188C12.478 8.24375 13.9905 9.6875 15.8124 9.6875ZM15.8124 4.7375C16.8093 4.7375 17.5999 5.49375 17.5999 6.45625C17.5999 7.41875 16.8093 8.175 15.8124 8.175C14.8155 8.175 14.0249 7.41875 14.0249 6.45625C14.0249 5.49375 14.8155 4.7375 15.8124 4.7375Z",fill:""}),f.jsx("path",{d:"M15.9843 10.0313H15.6749C14.6437 10.0313 13.6468 10.3406 12.7874 10.8563C11.8593 9.61876 10.3812 8.79376 8.73115 8.79376H5.67178C2.85303 8.82814 0.618652 11.0625 0.618652 13.8469V16.3219C0.618652 16.975 1.13428 17.4906 1.7874 17.4906H20.2468C20.8999 17.4906 21.4499 16.9406 21.4499 16.2875V15.4625C21.4155 12.4719 18.9749 10.0313 15.9843 10.0313ZM2.16553 15.9438V13.8469C2.16553 11.9219 3.74678 10.3406 5.67178 10.3406H8.73115C10.6562 10.3406 12.2374 11.9219 12.2374 13.8469V15.9438H2.16553V15.9438ZM19.8687 15.9438H13.7499V13.8469C13.7499 13.2969 13.6468 12.7469 13.4749 12.2313C14.0937 11.7844 14.8499 11.5781 15.6405 11.5781H15.9499C18.0812 11.5781 19.8343 13.3313 19.8343 15.4625V15.9438H19.8687Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e==null?void 0:e.userCount}),f.jsx("span",{className:"text-sm font-medium",children:"Total Signups"})]}),f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t?"...":r?e==null?void 0:e.userDelta:"-",!!e&&r&&f.jsx(Bd,{})]})]})]})},nE=({totalPageViews:e,prevDayViewsChangePercent:t})=>{const r=parseInt(t||"")>0;return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"16",viewBox:"0 0 22 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M11 15.1156C4.19376 15.1156 0.825012 8.61876 0.687512 8.34376C0.584387 8.13751 0.584387 7.86251 0.687512 7.65626C0.825012 7.38126 4.19376 0.918762 11 0.918762C17.8063 0.918762 21.175 7.38126 21.3125 7.65626C21.4156 7.86251 21.4156 8.13751 21.3125 8.34376C21.175 8.61876 17.8063 15.1156 11 15.1156ZM2.26876 8.00001C3.02501 9.27189 5.98126 13.5688 11 13.5688C16.0188 13.5688 18.975 9.27189 19.7313 8.00001C18.975 6.72814 16.0188 2.43126 11 2.43126C5.98126 2.43126 3.02501 6.72814 2.26876 8.00001Z",fill:""}),f.jsx("path",{d:"M11 10.9219C9.38438 10.9219 8.07812 9.61562 8.07812 8C8.07812 6.38438 9.38438 5.07812 11 5.07812C12.6156 5.07812 13.9219 6.38438 13.9219 8C13.9219 9.61562 12.6156 10.9219 11 10.9219ZM11 6.625C10.2437 6.625 9.625 7.24375 9.625 8C9.625 8.75625 10.2437 9.375 11 9.375C11.7563 9.375 12.375 8.75625 12.375 8C12.375 7.24375 11.7563 6.625 11 6.625Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e}),f.jsx("span",{className:"text-sm font-medium",children:"Total page views"})]}),t&&parseInt(t)!==0&&f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t,"%",parseInt(t)>0?f.jsx(Bd,{}):f.jsx(C1,{})]})]})]})},sE=({dailyStats:e,isLoading:t})=>{const r=G.useMemo(()=>!!(e!=null&&e.paidUserDelta)&&(e==null?void 0:e.paidUserDelta)>0,[e]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M21.1063 18.0469L19.3875 3.23126C19.2157 1.71876 17.9438 0.584381 16.3969 0.584381H5.56878C4.05628 0.584381 2.78441 1.71876 2.57816 3.23126L0.859406 18.0469C0.756281 18.9063 1.03128 19.7313 1.61566 20.3844C2.20003 21.0375 2.99066 21.3813 3.85003 21.3813H18.1157C18.975 21.3813 19.8 21.0031 20.35 20.3844C20.9 19.7656 21.2094 18.9063 21.1063 18.0469ZM19.2157 19.3531C18.9407 19.6625 18.5625 19.8344 18.15 19.8344H3.85003C3.43753 19.8344 3.05941 19.6625 2.78441 19.3531C2.50941 19.0438 2.37191 18.6313 2.44066 18.2188L4.12503 3.43751C4.19378 2.71563 4.81253 2.16563 5.56878 2.16563H16.4313C17.1532 2.16563 17.7719 2.71563 17.875 3.43751L19.5938 18.2531C19.6282 18.6656 19.4907 19.0438 19.2157 19.3531Z",fill:""}),f.jsx("path",{d:"M14.3345 5.29375C13.922 5.39688 13.647 5.80938 13.7501 6.22188C13.7845 6.42813 13.8189 6.63438 13.8189 6.80625C13.8189 8.35313 12.547 9.625 11.0001 9.625C9.45327 9.625 8.1814 8.35313 8.1814 6.80625C8.1814 6.6 8.21577 6.42813 8.25015 6.22188C8.35327 5.80938 8.07827 5.39688 7.66577 5.29375C7.25327 5.19063 6.84077 5.46563 6.73765 5.87813C6.6689 6.1875 6.63452 6.49688 6.63452 6.80625C6.63452 9.2125 8.5939 11.1719 11.0001 11.1719C13.4064 11.1719 15.3658 9.2125 15.3658 6.80625C15.3658 6.49688 15.3314 6.1875 15.2626 5.87813C15.1595 5.46563 14.747 5.225 14.3345 5.29375Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e==null?void 0:e.paidUserCount}),f.jsx("span",{className:"text-sm font-medium",children:"Total Paying Users"})]}),f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t?"...":(e==null?void 0:e.paidUserDelta)!==0?e==null?void 0:e.paidUserDelta:"-",(e==null?void 0:e.paidUserDelta)!==0?r?f.jsx(Bd,{}):f.jsx(C1,{}):null]})]})]})},aE=({dailyStats:e,weeklyStats:t,isLoading:r})=>{const s=G.useMemo(()=>{var c;return t?t[0].totalRevenue-((c=t[1])==null?void 0:c.totalRevenue)>0:!1},[t]),o=G.useMemo(()=>{var p,v,C,A;if(!t||t.length<2||r)return;if(((p=t[1])==null?void 0:p.totalRevenue)===0||((v=t[0])==null?void 0:v.totalRevenue)===0)return 0;t.sort((L,P)=>P.id-L.id);const c=(t[0].totalRevenue-((C=t[1])==null?void 0:C.totalRevenue))/((A=t[1])==null?void 0:A.totalRevenue)*100;return Math.floor(c)},[t]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"20",height:"22",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M11.7531 16.4312C10.3781 16.4312 9.27808 17.5312 9.27808 18.9062C9.27808 20.2812 10.3781 21.3812 11.7531 21.3812C13.1281 21.3812 14.2281 20.2812 14.2281 18.9062C14.2281 17.5656 13.0937 16.4312 11.7531 16.4312ZM11.7531 19.8687C11.2375 19.8687 10.825 19.4562 10.825 18.9406C10.825 18.425 11.2375 18.0125 11.7531 18.0125C12.2687 18.0125 12.6812 18.425 12.6812 18.9406C12.6812 19.4219 12.2343 19.8687 11.7531 19.8687Z",fill:""}),f.jsx("path",{d:"M5.22183 16.4312C3.84683 16.4312 2.74683 17.5312 2.74683 18.9062C2.74683 20.2812 3.84683 21.3812 5.22183 21.3812C6.59683 21.3812 7.69683 20.2812 7.69683 18.9062C7.69683 17.5656 6.56245 16.4312 5.22183 16.4312ZM5.22183 19.8687C4.7062 19.8687 4.2937 19.4562 4.2937 18.9406C4.2937 18.425 4.7062 18.0125 5.22183 18.0125C5.73745 18.0125 6.14995 18.425 6.14995 18.9406C6.14995 19.4219 5.73745 19.8687 5.22183 19.8687Z",fill:""}),f.jsx("path",{d:"M19.0062 0.618744H17.15C16.325 0.618744 15.6031 1.23749 15.5 2.06249L14.95 6.01562H1.37185C1.0281 6.01562 0.684353 6.18749 0.443728 6.46249C0.237478 6.73749 0.134353 7.11562 0.237478 7.45937C0.237478 7.49374 0.237478 7.49374 0.237478 7.52812L2.36873 13.9562C2.50623 14.4375 2.9531 14.7812 3.46873 14.7812H12.9562C14.2281 14.7812 15.3281 13.8187 15.5 12.5469L16.9437 2.26874C16.9437 2.19999 17.0125 2.16562 17.0812 2.16562H18.9375C19.35 2.16562 19.7281 1.82187 19.7281 1.37499C19.7281 0.928119 19.4187 0.618744 19.0062 0.618744ZM14.0219 12.3062C13.9531 12.8219 13.5062 13.2 12.9906 13.2H3.7781L1.92185 7.56249H14.7094L14.0219 12.3062Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsxs("h4",{className:"text-title-md font-bold text-black dark:text-white",children:["$",e==null?void 0:e.totalRevenue]}),f.jsx("span",{className:"text-sm font-medium",children:"Total Revenue"})]}),f.jsxs("span",{className:"flex items-center gap-1 text-sm font-medium text-meta-3",children:[r?"...":o?o+"%":"-",o?s?f.jsx(Bd,{}):f.jsx(C1,{}):null]})]})]})};var Y2={},_f={exports:{}};/*! + `,children:p.id==="enterprise-tier"?"Contact us":r?"Start free trial":"Sign in to buy plan"})]},p.id))})]})})},qN=({type:e,message:t,onClick:r})=>{const s=e==="success";return f.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 p-16 backdrop-blur-sm bg-captn-light-cream/30",children:f.jsxs("div",{className:"bg-captn-light-cream rounded-lg shadow-lg p-8 m-4 max-w-sm mx-auto",children:[f.jsx("h2",{className:"text-xl font-bold mb-4 text-captn-dark-blue",children:s?"Success":"Error"}),f.jsx("p",{className:"text-gray-700 dark:text-gray-300",children:t}),f.jsx("div",{className:"mt-4 text-right",children:f.jsx("button",{onClick:r,className:`py-2 px-4 rounded text-captn-light-cream focus:outline-none ${s?"bg-captn-cta-green":"bg-captn-cta-red"}`,children:"OK"})})]})})};function QN({hasSubscribedToMarketingEmails:e}){const[t,r]=G.useState(e),[s,o]=G.useState(!1),[c,p]=G.useState(null),v=P=>{r(P.target.value==="Yes"),o(!0)},C=()=>{p(null)},A=async P=>{try{await Ja({hasSubscribedToMarketingEmails:P}),p("success")}catch{p("error")}o(!1)},L=c==="success"?"Your changes are saved successfully.":"Something went wrong. Please try again later.";return f.jsxs(f.Fragment,{children:[c&&f.jsx(qN,{type:c,onClick:C,message:L}),f.jsxs("div",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:[f.jsxs("label",{className:"mr-4",children:[f.jsx("input",{type:"radio",value:"Yes",checked:t,onChange:v,className:"form-radio text-captn-light-blue mr-2 focus:ring-1 outline-none"}),"Yes"]}),f.jsxs("label",{children:[f.jsx("input",{type:"radio",value:"No",checked:!t,onChange:v,className:"form-radio text-captn-light-blue mr-2 focus:ring-1 outline-none"}),"No"]})]}),f.jsx("div",{className:"ml-0 md:ml-4 flex-shrink-0 sm:col-span-1 sm:mt-0",style:{height:"24px"},children:f.jsx("button",{onClick:()=>A(t),disabled:!s,className:`mt-4 md:-mt-10 no-underline rounded-md px-3.5 py-2.5 text-sm text-captn-light-cream ring-1 ring-inset ring-gray-200 hover:bg-captn-cta-green-hover shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 dark:text-captn-light-cream bg-captn-cta-green ${s?"":"opacity-40 cursor-not-allowed"}`,children:"Save"})})]})}const KN=e=>t=>{const{data:r,isError:s,isSuccess:o,isLoading:c}=Mr();return o?r?f.jsx(e,{...t,user:r}):f.jsx(Ld,{to:"/login"}):c?f.jsx(u1,{}):s?f.jsx(e,{...t,user:r}):f.jsx(e,{...t,user:r})},JN=({user:e})=>f.jsxs("div",{className:"mt-10 px-6",children:[f.jsxs("div",{className:"overflow-hidden bg-captn-light-cream ring-1 ring-gray-900/10 shadow-lg sm:rounded-lg lg:m-8 ",children:[f.jsx("div",{className:"px-4 py-5 sm:px-6 lg:px-8",children:f.jsx("h3",{className:"text-base font-semibold leading-6 text-captn-dark-blue",children:"Account Information"})}),f.jsx("div",{className:"border-t border-gray-200 px-4 py-5 sm:p-0",children:f.jsxs("dl",{className:"sm:divide-y sm:divide-gray-200",children:[!!e.email&&f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue dark:text-captn-light-cream",children:"Email address"}),f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue dark:text-gray-400 sm:col-span-2 sm:mt-0",children:e.email})]}),!!e.username&&f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue dark:text-captn-light-cream",children:"Username"}),f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue dark:text-gray-400 sm:col-span-2 sm:mt-0",children:e.username})]}),f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue",children:"Subscription status"}),e.hasPaid?f.jsxs(f.Fragment,{children:[e.subscriptionStatus!=="past_due"?f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"Active"}):f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"Your Account is Past Due! Please Update your Payment Information"}),f.jsx(tE,{})]}):f.jsxs(f.Fragment,{children:[f.jsx("dd",{className:"mt-1 text-sm text-captn-dark-blue sm:col-span-1 sm:mt-0",children:"N/A"}),f.jsx("div",{className:"flex items-center justify-left -mt-2",children:f.jsx(e2,{})})]})]}),f.jsxs("div",{className:"py-4 sm:grid sm:grid-cols-3 sm:gap-4 sm:py-5 sm:px-6",children:[f.jsx("dt",{className:"text-sm font-medium text-captn-dark-blue",children:"I agree to receiving marketing emails"}),f.jsx(f.Fragment,{children:f.jsx(QN,{hasSubscribedToMarketingEmails:e.hasSubscribedToMarketingEmails})})]})]})})]}),f.jsx("div",{className:"inline-flex w-full justify-end",children:f.jsx("button",{onClick:Cb,className:"inline-flex justify-center mx-8 py-2 px-4 border border-transparent shadow-md text-sm font-medium rounded-md text-captn-light-cream bg-captn-cta-green hover:bg-captn-cta-green-hover focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:"Sign out"})})]}),eE=KN(JN);function tE(){const e=()=>{window.open(Jb,"_blank")};return f.jsx("div",{className:"ml-0 md:ml-4 flex-shrink-0 sm:col-span-1 sm:mt-0",children:f.jsx("button",{onClick:e,className:"font-medium text-sm text-captn-light-blue hover:underline",children:"Manage Subscription"})})}function rE(){const[e,t]=G.useState("loading"),r=Kr(),s=aa();return G.useEffect(()=>{function o(){return setTimeout(()=>{r.push("/chat")},4e3)}const c=new URLSearchParams(s.search),p=c.get("success");return c.get("canceled")?t("canceled"):p?t("paid"):r.push("/chat"),o(),()=>{clearTimeout(o())}},[s]),f.jsx("div",{className:"flex min-h-full flex-col justify-center mt-10 sm:px-6 lg:px-8",children:f.jsx("div",{className:"sm:mx-auto sm:w-full sm:max-w-md",children:f.jsxs("div",{className:"bg-white py-8 px-4 shadow-xl ring-1 ring-gray-900/10 sm:rounded-lg sm:px-10",children:[f.jsx("h1",{children:e==="paid"?"🥳 Payment Successful!":e==="canceled"?"😢 Payment Canceled":e==="error"&&"🙄 Payment Error"}),e!=="loading"&&f.jsxs("span",{className:"text-center",children:["You are being redirected to your chat page... ",f.jsx("br",{})]})]})})})}function Bd(){return f.jsx("svg",{className:"fill-meta-3",width:"10",height:"11",viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M4.35716 2.47737L0.908974 5.82987L5.0443e-07 4.94612L5 0.0848689L10 4.94612L9.09103 5.82987L5.64284 2.47737L5.64284 10.0849L4.35716 10.0849L4.35716 2.47737Z",fill:""})})}function C1(){return f.jsx("svg",{className:"fill-meta-5",width:"10",height:"11",viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M5.64284 7.69237L9.09102 4.33987L10 5.22362L5 10.0849L-8.98488e-07 5.22362L0.908973 4.33987L4.35716 7.69237L4.35716 0.0848701L5.64284 0.0848704L5.64284 7.69237Z",fill:""})})}const iE=({dailyStats:e,isLoading:t})=>{const r=G.useMemo(()=>!!(e!=null&&e.userDelta)&&e.userDelta>0,[e]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"18",viewBox:"0 0 22 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M7.18418 8.03751C9.31543 8.03751 11.0686 6.35313 11.0686 4.25626C11.0686 2.15938 9.31543 0.475006 7.18418 0.475006C5.05293 0.475006 3.2998 2.15938 3.2998 4.25626C3.2998 6.35313 5.05293 8.03751 7.18418 8.03751ZM7.18418 2.05626C8.45605 2.05626 9.52168 3.05313 9.52168 4.29063C9.52168 5.52813 8.49043 6.52501 7.18418 6.52501C5.87793 6.52501 4.84668 5.52813 4.84668 4.29063C4.84668 3.05313 5.9123 2.05626 7.18418 2.05626Z",fill:""}),f.jsx("path",{d:"M15.8124 9.6875C17.6687 9.6875 19.1468 8.24375 19.1468 6.42188C19.1468 4.6 17.6343 3.15625 15.8124 3.15625C13.9905 3.15625 12.478 4.6 12.478 6.42188C12.478 8.24375 13.9905 9.6875 15.8124 9.6875ZM15.8124 4.7375C16.8093 4.7375 17.5999 5.49375 17.5999 6.45625C17.5999 7.41875 16.8093 8.175 15.8124 8.175C14.8155 8.175 14.0249 7.41875 14.0249 6.45625C14.0249 5.49375 14.8155 4.7375 15.8124 4.7375Z",fill:""}),f.jsx("path",{d:"M15.9843 10.0313H15.6749C14.6437 10.0313 13.6468 10.3406 12.7874 10.8563C11.8593 9.61876 10.3812 8.79376 8.73115 8.79376H5.67178C2.85303 8.82814 0.618652 11.0625 0.618652 13.8469V16.3219C0.618652 16.975 1.13428 17.4906 1.7874 17.4906H20.2468C20.8999 17.4906 21.4499 16.9406 21.4499 16.2875V15.4625C21.4155 12.4719 18.9749 10.0313 15.9843 10.0313ZM2.16553 15.9438V13.8469C2.16553 11.9219 3.74678 10.3406 5.67178 10.3406H8.73115C10.6562 10.3406 12.2374 11.9219 12.2374 13.8469V15.9438H2.16553V15.9438ZM19.8687 15.9438H13.7499V13.8469C13.7499 13.2969 13.6468 12.7469 13.4749 12.2313C14.0937 11.7844 14.8499 11.5781 15.6405 11.5781H15.9499C18.0812 11.5781 19.8343 13.3313 19.8343 15.4625V15.9438H19.8687Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e==null?void 0:e.userCount}),f.jsx("span",{className:"text-sm font-medium",children:"Total Signups"})]}),f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t?"...":r?e==null?void 0:e.userDelta:"-",!!e&&r&&f.jsx(Bd,{})]})]})]})},nE=({totalPageViews:e,prevDayViewsChangePercent:t})=>{const r=parseInt(t||"")>0;return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"16",viewBox:"0 0 22 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M11 15.1156C4.19376 15.1156 0.825012 8.61876 0.687512 8.34376C0.584387 8.13751 0.584387 7.86251 0.687512 7.65626C0.825012 7.38126 4.19376 0.918762 11 0.918762C17.8063 0.918762 21.175 7.38126 21.3125 7.65626C21.4156 7.86251 21.4156 8.13751 21.3125 8.34376C21.175 8.61876 17.8063 15.1156 11 15.1156ZM2.26876 8.00001C3.02501 9.27189 5.98126 13.5688 11 13.5688C16.0188 13.5688 18.975 9.27189 19.7313 8.00001C18.975 6.72814 16.0188 2.43126 11 2.43126C5.98126 2.43126 3.02501 6.72814 2.26876 8.00001Z",fill:""}),f.jsx("path",{d:"M11 10.9219C9.38438 10.9219 8.07812 9.61562 8.07812 8C8.07812 6.38438 9.38438 5.07812 11 5.07812C12.6156 5.07812 13.9219 6.38438 13.9219 8C13.9219 9.61562 12.6156 10.9219 11 10.9219ZM11 6.625C10.2437 6.625 9.625 7.24375 9.625 8C9.625 8.75625 10.2437 9.375 11 9.375C11.7563 9.375 12.375 8.75625 12.375 8C12.375 7.24375 11.7563 6.625 11 6.625Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e}),f.jsx("span",{className:"text-sm font-medium",children:"Total page views"})]}),t&&parseInt(t)!==0&&f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t,"%",parseInt(t)>0?f.jsx(Bd,{}):f.jsx(C1,{})]})]})]})},sE=({dailyStats:e,isLoading:t})=>{const r=G.useMemo(()=>!!(e!=null&&e.paidUserDelta)&&(e==null?void 0:e.paidUserDelta)>0,[e]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M21.1063 18.0469L19.3875 3.23126C19.2157 1.71876 17.9438 0.584381 16.3969 0.584381H5.56878C4.05628 0.584381 2.78441 1.71876 2.57816 3.23126L0.859406 18.0469C0.756281 18.9063 1.03128 19.7313 1.61566 20.3844C2.20003 21.0375 2.99066 21.3813 3.85003 21.3813H18.1157C18.975 21.3813 19.8 21.0031 20.35 20.3844C20.9 19.7656 21.2094 18.9063 21.1063 18.0469ZM19.2157 19.3531C18.9407 19.6625 18.5625 19.8344 18.15 19.8344H3.85003C3.43753 19.8344 3.05941 19.6625 2.78441 19.3531C2.50941 19.0438 2.37191 18.6313 2.44066 18.2188L4.12503 3.43751C4.19378 2.71563 4.81253 2.16563 5.56878 2.16563H16.4313C17.1532 2.16563 17.7719 2.71563 17.875 3.43751L19.5938 18.2531C19.6282 18.6656 19.4907 19.0438 19.2157 19.3531Z",fill:""}),f.jsx("path",{d:"M14.3345 5.29375C13.922 5.39688 13.647 5.80938 13.7501 6.22188C13.7845 6.42813 13.8189 6.63438 13.8189 6.80625C13.8189 8.35313 12.547 9.625 11.0001 9.625C9.45327 9.625 8.1814 8.35313 8.1814 6.80625C8.1814 6.6 8.21577 6.42813 8.25015 6.22188C8.35327 5.80938 8.07827 5.39688 7.66577 5.29375C7.25327 5.19063 6.84077 5.46563 6.73765 5.87813C6.6689 6.1875 6.63452 6.49688 6.63452 6.80625C6.63452 9.2125 8.5939 11.1719 11.0001 11.1719C13.4064 11.1719 15.3658 9.2125 15.3658 6.80625C15.3658 6.49688 15.3314 6.1875 15.2626 5.87813C15.1595 5.46563 14.747 5.225 14.3345 5.29375Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"text-title-md font-bold text-black dark:text-white",children:e==null?void 0:e.paidUserCount}),f.jsx("span",{className:"text-sm font-medium",children:"Total Paying Users"})]}),f.jsxs("span",{className:`flex items-center gap-1 text-sm font-medium ${r?"text-meta-3":"text-meta-5"}`,children:[t?"...":(e==null?void 0:e.paidUserDelta)!==0?e==null?void 0:e.paidUserDelta:"-",(e==null?void 0:e.paidUserDelta)!==0?r?f.jsx(Bd,{}):f.jsx(C1,{}):null]})]})]})},aE=({dailyStats:e,weeklyStats:t,isLoading:r})=>{const s=G.useMemo(()=>{var c;return t?t[0].totalRevenue-((c=t[1])==null?void 0:c.totalRevenue)>0:!1},[t]),o=G.useMemo(()=>{var p,v,C,A;if(!t||t.length<2||r)return;if(((p=t[1])==null?void 0:p.totalRevenue)===0||((v=t[0])==null?void 0:v.totalRevenue)===0)return 0;t.sort((L,P)=>P.id-L.id);const c=(t[0].totalRevenue-((C=t[1])==null?void 0:C.totalRevenue))/((A=t[1])==null?void 0:A.totalRevenue)*100;return Math.floor(c)},[t]);return f.jsxs("div",{className:"rounded-sm border border-stroke bg-white py-6 px-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4",children:f.jsxs("svg",{className:"fill-primary dark:fill-white",width:"20",height:"22",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M11.7531 16.4312C10.3781 16.4312 9.27808 17.5312 9.27808 18.9062C9.27808 20.2812 10.3781 21.3812 11.7531 21.3812C13.1281 21.3812 14.2281 20.2812 14.2281 18.9062C14.2281 17.5656 13.0937 16.4312 11.7531 16.4312ZM11.7531 19.8687C11.2375 19.8687 10.825 19.4562 10.825 18.9406C10.825 18.425 11.2375 18.0125 11.7531 18.0125C12.2687 18.0125 12.6812 18.425 12.6812 18.9406C12.6812 19.4219 12.2343 19.8687 11.7531 19.8687Z",fill:""}),f.jsx("path",{d:"M5.22183 16.4312C3.84683 16.4312 2.74683 17.5312 2.74683 18.9062C2.74683 20.2812 3.84683 21.3812 5.22183 21.3812C6.59683 21.3812 7.69683 20.2812 7.69683 18.9062C7.69683 17.5656 6.56245 16.4312 5.22183 16.4312ZM5.22183 19.8687C4.7062 19.8687 4.2937 19.4562 4.2937 18.9406C4.2937 18.425 4.7062 18.0125 5.22183 18.0125C5.73745 18.0125 6.14995 18.425 6.14995 18.9406C6.14995 19.4219 5.73745 19.8687 5.22183 19.8687Z",fill:""}),f.jsx("path",{d:"M19.0062 0.618744H17.15C16.325 0.618744 15.6031 1.23749 15.5 2.06249L14.95 6.01562H1.37185C1.0281 6.01562 0.684353 6.18749 0.443728 6.46249C0.237478 6.73749 0.134353 7.11562 0.237478 7.45937C0.237478 7.49374 0.237478 7.49374 0.237478 7.52812L2.36873 13.9562C2.50623 14.4375 2.9531 14.7812 3.46873 14.7812H12.9562C14.2281 14.7812 15.3281 13.8187 15.5 12.5469L16.9437 2.26874C16.9437 2.19999 17.0125 2.16562 17.0812 2.16562H18.9375C19.35 2.16562 19.7281 1.82187 19.7281 1.37499C19.7281 0.928119 19.4187 0.618744 19.0062 0.618744ZM14.0219 12.3062C13.9531 12.8219 13.5062 13.2 12.9906 13.2H3.7781L1.92185 7.56249H14.7094L14.0219 12.3062Z",fill:""})]})}),f.jsxs("div",{className:"mt-4 flex items-end justify-between",children:[f.jsxs("div",{children:[f.jsxs("h4",{className:"text-title-md font-bold text-black dark:text-white",children:["$",e==null?void 0:e.totalRevenue]}),f.jsx("span",{className:"text-sm font-medium",children:"Total Revenue"})]}),f.jsxs("span",{className:"flex items-center gap-1 text-sm font-medium text-meta-3",children:[r?"...":o?o+"%":"-",o?s?f.jsx(Bd,{}):f.jsx(C1,{}):null]})]})]})};var X2={},_f={exports:{}};/*! * ApexCharts v3.47.0 * (c) 2018-2024 ApexCharts * Released under the MIT License. @@ -183,11 +183,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `),this.t.download&&u.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var x=0;x0&&l.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:a.globals.gridWidth,maxY:a.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var a=this.w,l=this.xyRatios;if(!a.globals.zoomEnabled){if(a.globals.selection!==void 0&&a.globals.selection!==null)this.drawSelectionRect(a.globals.selection);else if(a.config.chart.selection.xaxis.min!==void 0&&a.config.chart.selection.xaxis.max!==void 0){var d=(a.config.chart.selection.xaxis.min-a.globals.minX)/l.xRatio,u=a.globals.gridWidth-(a.globals.maxX-a.config.chart.selection.xaxis.max)/l.xRatio-d;a.globals.isRangeBar&&(d=(a.config.chart.selection.xaxis.min-a.globals.yAxisScale[0].niceMin)/l.invertedYRatio,u=(a.config.chart.selection.xaxis.max-a.config.chart.selection.xaxis.min)/l.invertedYRatio);var h={x:d,y:0,width:u,height:a.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(h),this.makeSelectionRectDraggable(),typeof a.config.chart.events.selection=="function"&&a.config.chart.events.selection(this.ctx,{xaxis:{min:a.config.chart.selection.xaxis.min,max:a.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(a){var l=a.x,d=a.y,u=a.width,h=a.height,g=a.translateX,x=g===void 0?0:g,y=a.translateY,b=y===void 0?0:y,w=this.w,S=this.zoomRect,j=this.selectionRect;if(this.dragged||w.globals.selection!==null){var E={transform:"translate("+x+", "+b+")"};w.globals.zoomEnabled&&this.dragged&&(u<0&&(u=1),S.attr({x:l,y:d,width:u,height:h,fill:w.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":w.config.chart.zoom.zoomedArea.fill.opacity,stroke:w.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":w.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":w.config.chart.zoom.zoomedArea.stroke.opacity}),X.setAttrs(S.node,E)),w.globals.selectionEnabled&&(j.attr({x:l,y:d,width:u>0?u:0,height:h>0?h:0,fill:w.config.chart.selection.fill.color,"fill-opacity":w.config.chart.selection.fill.opacity,stroke:w.config.chart.selection.stroke.color,"stroke-width":w.config.chart.selection.stroke.width,"stroke-dasharray":w.config.chart.selection.stroke.dashArray,"stroke-opacity":w.config.chart.selection.stroke.opacity}),X.setAttrs(j.node,E))}}},{key:"hideSelectionRect",value:function(a){a&&a.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(a){var l=a.context,d=a.zoomtype,u=this.w,h=l,g=this.gridRect.getBoundingClientRect(),x=h.startX-1,y=h.startY,b=!1,w=!1,S=h.clientX-g.left-x,j=h.clientY-g.top-y,E={};return Math.abs(S+x)>u.globals.gridWidth?S=u.globals.gridWidth-x:h.clientX-g.left<0&&(S=x),x>h.clientX-g.left&&(b=!0,S=Math.abs(S)),y>h.clientY-g.top&&(w=!0,j=Math.abs(j)),E=d==="x"?{x:b?x-S:x,y:0,width:S,height:u.globals.gridHeight}:d==="y"?{x:0,y:w?y-j:y,width:u.globals.gridWidth,height:j}:{x:b?x-S:x,y:w?y-j:y,width:S,height:j},h.drawSelectionRect(E),h.selectionDragging("resizing"),E}},{key:"selectionDragging",value:function(a,l){var d=this,u=this.w,h=this.xyRatios,g=this.selectionRect,x=0;a==="resizing"&&(x=30);var y=function(w){return parseFloat(g.node.getAttribute(w))},b={x:y("x"),y:y("y"),width:y("width"),height:y("height")};u.globals.selection=b,typeof u.config.chart.events.selection=="function"&&u.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var w,S,j,E,T=d.gridRect.getBoundingClientRect(),I=g.node.getBoundingClientRect();u.globals.isRangeBar?(w=u.globals.yAxisScale[0].niceMin+(I.left-T.left)*h.invertedYRatio,S=u.globals.yAxisScale[0].niceMin+(I.right-T.left)*h.invertedYRatio,j=0,E=1):(w=u.globals.xAxisScale.niceMin+(I.left-T.left)*h.xRatio,S=u.globals.xAxisScale.niceMin+(I.right-T.left)*h.xRatio,j=u.globals.yAxisScale[0].niceMin+(T.bottom-I.bottom)*h.yRatio[0],E=u.globals.yAxisScale[0].niceMax-(I.top-T.top)*h.yRatio[0]);var D={xaxis:{min:w,max:S},yaxis:{min:j,max:E}};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=[],E=[];if(u.config.yaxis.forEach(function(R,F){j.push(u.globals.yAxisScale[F].niceMax-g.yRatio[F]*h.startY),E.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=_.clone(u.globals.initialConfig.yaxis),I=_.clone(u.globals.initialConfig.xaxis);if(u.globals.zoomed=!0,u.config.xaxis.convertedCatToNumeric&&(w=Math.floor(w),S=Math.floor(S),w<1&&(w=1,S=u.globals.dataPoints),S-w<2&&(S=w+1)),d!=="xy"&&d!=="x"||(I={min:w,max:S}),d!=="xy"&&d!=="y"||T.forEach(function(R,F){T[F].min=E[F],T[F].max=j[F]}),x){var D=x.getBeforeZoomRange(I,T);D&&(I=D.xaxis?D.xaxis:I,T=D.yaxis?D.yaxis:T)}var m={xaxis:I};u.config.chart.group||(m.yaxis=T),h.ctx.updateHelpers._updateOptions(m,!1,h.w.config.chart.animations.dynamicAnimation.enabled),typeof u.config.chart.events.zoomed=="function"&&x.zoomCallback(I,T)}else if(u.globals.selectionEnabled){var k,N=null;k={min:w,max:S},d!=="xy"&&d!=="y"||(N=_.clone(u.config.yaxis)).forEach(function(R,F){N[F].min=E[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=_.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}(),el=function(){function O(i){c(this,O),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx}return v(O,[{key:"getNearestValues",value:function(i){var n=i.hoverArea,a=i.elGrid,l=i.clientX,d=i.clientY,u=this.w,h=a.getBoundingClientRect(),g=h.width,x=h.height,y=g/(u.globals.dataPoints-1),b=x/u.globals.dataPoints,w=this.hasBars();!u.globals.comboCharts&&!w||u.config.xaxis.convertedCatToNumeric||(y=g/u.globals.dataPoints);var S=l-h.left-u.globals.barPadForNumericAxis,j=d-h.top;S<0||j<0||S>g||j>x?(n.classList.remove("hovering-zoom"),n.classList.remove("hovering-pan")):u.globals.zoomEnabled?(n.classList.remove("hovering-pan"),n.classList.add("hovering-zoom")):u.globals.panEnabled&&(n.classList.remove("hovering-zoom"),n.classList.add("hovering-pan"));var E=Math.round(S/y),T=Math.floor(j/b);w&&!u.config.xaxis.convertedCatToNumeric&&(E=Math.ceil(S/y),E-=1);var I=null,D=null,m=u.globals.seriesXvalues.map(function($){return $.filter(function(Y){return _.isNumber(Y)})}),k=u.globals.seriesYvalues.map(function($){return $.filter(function(Y){return _.isNumber(Y)})});if(u.globals.isXNumeric){var N=this.ttCtx.getElGrid().getBoundingClientRect(),R=S*(N.width/g),F=j*(N.height/x);I=(D=this.closestInMultiArray(R,F,m,k)).index,E=D.j,I!==null&&(m=u.globals.seriesXvalues[I],E=(D=this.closestInArray(R,m)).index)}return u.globals.capturedSeriesIndex=I===null?-1:I,(!E||E<1)&&(E=0),u.globals.isBarHorizontal?u.globals.capturedDataPointIndex=T:u.globals.capturedDataPointIndex=E,{capturedSeries:I,j:u.globals.isBarHorizontal?T:E,hoverX:S,hoverY:j}}},{key:"closestInMultiArray",value:function(i,n,a,l){var d=this.w,u=0,h=null,g=-1;d.globals.series.length>1?u=this.getFirstActiveXArray(a):h=0;var x=a[u][0],y=Math.abs(i-x);if(a.forEach(function(S){S.forEach(function(j,E){var T=Math.abs(i-j);T<=y&&(y=T,g=E)})}),g!==-1){var b=l[u][g],w=Math.abs(n-b);h=u,l.forEach(function(S,j){var E=Math.abs(n-S[g]);E<=w&&(w=E,h=j)})}return{index:h,j:g}}},{key:"getFirstActiveXArray",value:function(i){for(var n=this.w,a=0,l=i.map(function(u,h){return u.length>0?h:-1}),d=0;d0)for(var l=0;l *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var i=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(i=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(U.attrs.name,""),Y+="
".concat(U.val,"
")}),m.innerHTML=$+"",k.innerHTML=Y+""};h?x.globals.seriesGoals[n][a]&&Array.isArray(x.globals.seriesGoals[n][a])?N():(m.innerHTML="",k.innerHTML=""):N()}else m.innerHTML="",k.innerHTML="";if(E!==null&&(l[n].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=x.config.tooltip.z.title,l[n].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=E!==void 0?E:""),h&&T[0]){if(x.config.tooltip.hideEmptySeries){var R=l[n].querySelector(".apexcharts-tooltip-marker"),F=l[n].querySelector(".apexcharts-tooltip-text");parseFloat(b)==0?(R.style.display="none",F.style.display="none"):(R.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}(),rl=function(){function O(i){c(this,O),this.ttCtx=i,this.ctx=i.ctx,this.w=i.w}return v(O,[{key:"moveXCrosshairs",value:function(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=this.ttCtx,l=this.w,d=a.getElXCrosshairs(),u=i-a.xcrosshairsWidth/2,h=l.globals.labels.slice().length;if(n!==null&&(u=l.globals.gridWidth/h*n),d===null||l.globals.isBarHorizontal||(d.setAttribute("x",u),d.setAttribute("x1",u),d.setAttribute("x2",u),d.setAttribute("y2",l.globals.gridHeight),d.classList.add("apexcharts-active")),u<0&&(u=0),u>l.globals.gridWidth&&(u=l.globals.gridWidth),a.isXAxisTooltipEnabled){var g=u;l.config.xaxis.crosshairs.width!=="tickWidth"&&l.config.xaxis.crosshairs.width!=="barWidth"||(g=u+a.xcrosshairsWidth/2),this.moveXAxisTooltip(g)}}},{key:"moveYCrosshairs",value:function(i){var n=this.ttCtx;n.ycrosshairs!==null&&X.setAttrs(n.ycrosshairs,{y1:i,y2:i}),n.ycrosshairsHidden!==null&&X.setAttrs(n.ycrosshairsHidden,{y1:i,y2:i})}},{key:"moveXAxisTooltip",value:function(i){var n=this.w,a=this.ttCtx;if(a.xaxisTooltip!==null&&a.xcrosshairsWidth!==0){a.xaxisTooltip.classList.add("apexcharts-active");var l=a.xaxisOffY+n.config.xaxis.tooltip.offsetY+n.globals.translateY+1+n.config.xaxis.offsetY;if(i-=a.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(i)){i+=n.globals.translateX;var d;d=new X(this.ctx).getTextRects(a.xaxisTooltipText.innerHTML),a.xaxisTooltipText.style.minWidth=d.width+"px",a.xaxisTooltip.style.left=i+"px",a.xaxisTooltip.style.top=l+"px"}}}},{key:"moveYAxisTooltip",value:function(i){var n=this.w,a=this.ttCtx;a.yaxisTTEls===null&&(a.yaxisTTEls=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var l=parseInt(a.ycrosshairsHidden.getAttribute("y1"),10),d=n.globals.translateY+l,u=a.yaxisTTEls[i].getBoundingClientRect().height,h=n.globals.translateYAxisX[i]-2;n.config.yaxis[i].opposite&&(h-=26),d-=u/2,n.globals.ignoreYAxisIndexes.indexOf(i)===-1?(a.yaxisTTEls[i].classList.add("apexcharts-active"),a.yaxisTTEls[i].style.top=d+"px",a.yaxisTTEls[i].style.left=h+n.config.yaxis[i].tooltip.offsetX+"px"):a.yaxisTTEls[i].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(i,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,l=this.w,d=this.ttCtx,u=d.getElTooltip(),h=d.tooltipRect,g=a!==null?parseFloat(a):1,x=parseFloat(i)+g+5,y=parseFloat(n)+g/2;if(x>l.globals.gridWidth/2&&(x=x-h.ttWidth-g-10),x>l.globals.gridWidth-h.ttWidth-10&&(x=l.globals.gridWidth-h.ttWidth),x<-20&&(x=-20),l.config.tooltip.followCursor){var b=d.getElGrid().getBoundingClientRect();(x=d.e.clientX-b.left)>l.globals.gridWidth/2&&(x-=d.tooltipRect.ttWidth),(y=d.e.clientY+l.globals.translateY-b.top)>l.globals.gridHeight/2&&(y-=d.tooltipRect.ttHeight)}else l.globals.isBarHorizontal||h.ttHeight/2+y>l.globals.gridHeight&&(y=l.globals.gridHeight-h.ttHeight+l.globals.translateY);isNaN(x)||(x+=l.globals.translateX,u.style.left=x+"px",u.style.top=y+"px")}},{key:"moveMarkers",value:function(i,n){var a=this.w,l=this.ttCtx;if(a.globals.markers.size[i]>0)for(var d=a.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(i,"'] .apexcharts-marker")),u=0;u0&&(y.setAttribute("r",g),y.setAttribute("cx",a),y.setAttribute("cy",l)),this.moveXCrosshairs(a),u.fixedTooltip||this.moveTooltip(a,l,g)}}},{key:"moveDynamicPointsOnHover",value:function(i){var n,a=this.ttCtx,l=a.w,d=0,u=0,h=l.globals.pointsArray;n=new Me(this.ctx).getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var g=a.tooltipUtil.getHoverMarkerSize(n);h[n]&&(d=h[n][i][0],u=h[n][i][1]);var x=a.tooltipUtil.getAllMarkers();if(x!==null)for(var y=0;y0?(x[y]&&x[y].setAttribute("r",g),x[y]&&x[y].setAttribute("cy",w)):x[y]&&x[y].setAttribute("r",0)}}this.moveXCrosshairs(d),a.fixedTooltip||this.moveTooltip(d,u||l.globals.gridHeight,g)}},{key:"moveStickyTooltipOverBars",value:function(i,n){var a=this.w,l=this.ttCtx,d=a.globals.columnSeries?a.globals.columnSeries.length:a.globals.series.length,u=d>=2&&d%2==0?Math.floor(d/2):Math.floor(d/2)+1;a.globals.isBarHorizontal&&(u=new Me(this.ctx).getActiveConfigSeriesIndex("desc")+1);var h=a.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(u,"'] path[j='").concat(i,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(u,"'] path[j='").concat(i,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(u,"'] path[j='").concat(i,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(u,"'] path[j='").concat(i,"']"));h||typeof n!="number"||(h=a.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(n,"'] path[j='").concat(i,`'], .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(i,`'], .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(i,`'], - .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(i,"']")));var g=h?parseFloat(h.getAttribute("cx")):0,x=h?parseFloat(h.getAttribute("cy")):0,y=h?parseFloat(h.getAttribute("barWidth")):0,b=l.getElGrid().getBoundingClientRect(),w=h&&(h.classList.contains("apexcharts-candlestick-area")||h.classList.contains("apexcharts-boxPlot-area"));a.globals.isXNumeric?(h&&!w&&(g-=d%2!=0?y/2:0),h&&w&&a.globals.comboCharts&&(g-=y/2)):a.globals.isBarHorizontal||(g=l.xAxisTicksPositions[i-1]+l.dataPointsDividedWidth/2,isNaN(g)&&(g=l.xAxisTicksPositions[i]-l.dataPointsDividedWidth/2)),a.globals.isBarHorizontal?x-=l.tooltipRect.ttHeight:a.config.tooltip.followCursor?x=l.e.clientY-b.top-l.tooltipRect.ttHeight/2:x+l.tooltipRect.ttHeight+15>a.globals.gridHeight&&(x=a.globals.gridHeight),a.globals.isBarHorizontal||this.moveXCrosshairs(g),l.fixedTooltip||this.moveTooltip(g,x||a.globals.gridHeight)}}]),O}(),il=function(){function O(i){c(this,O),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx,this.tooltipPosition=new rl(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}(),t5=function(){function O(i){c(this,O),this.w=i.w;var n=this.w;this.ttCtx=i,this.isVerticalGroupedRangeBar=!n.globals.isBarHorizontal&&n.config.chart.type==="rangeBar"&&n.config.plotOptions.bar.rangeBarGroupRows}return v(O,[{key:"getAttr",value:function(i,n){return parseFloat(i.target.getAttribute(n))}},{key:"handleHeatTreeTooltip",value:function(i){var n=i.e,a=i.opt,l=i.x,d=i.y,u=i.type,h=this.ttCtx,g=this.w;if(n.target.classList.contains("apexcharts-".concat(u,"-rect"))){var x=this.getAttr(n,"i"),y=this.getAttr(n,"j"),b=this.getAttr(n,"cx"),w=this.getAttr(n,"cy"),S=this.getAttr(n,"width"),j=this.getAttr(n,"height");if(h.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:x,j:y,shared:!1,e:n}),g.globals.capturedSeriesIndex=x,g.globals.capturedDataPointIndex=y,l=b+h.tooltipRect.ttWidth/2+S,d=w+h.tooltipRect.ttHeight/2-j/2,h.tooltipPosition.moveXCrosshairs(b+S/2),l>g.globals.gridWidth/2&&(l=b-h.tooltipRect.ttWidth/2+S),h.w.config.tooltip.followCursor){var E=g.globals.dom.elWrap.getBoundingClientRect();l=g.globals.clientX-E.left-(l>g.globals.gridWidth/2?h.tooltipRect.ttWidth:0),d=g.globals.clientY-E.top-(d>g.globals.gridHeight/2?h.tooltipRect.ttHeight:0)}}return{x:l,y:d}}},{key:"handleMarkerTooltip",value:function(i){var n,a,l=i.e,d=i.opt,u=i.x,h=i.y,g=this.w,x=this.ttCtx;if(l.target.classList.contains("apexcharts-marker")){var y=parseInt(d.paths.getAttribute("cx"),10),b=parseInt(d.paths.getAttribute("cy"),10),w=parseFloat(d.paths.getAttribute("val"));if(a=parseInt(d.paths.getAttribute("rel"),10),n=parseInt(d.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,x.intersect){var S=_.findAncestor(d.paths,"apexcharts-series");S&&(n=parseInt(S.getAttribute("data:realIndex"),10))}if(x.tooltipLabels.drawSeriesTexts({ttItems:d.ttItems,i:n,j:a,shared:!x.showOnIntersect&&g.config.tooltip.shared,e:l}),l.type==="mouseup"&&x.markerClick(l,n,a),g.globals.capturedSeriesIndex=n,g.globals.capturedDataPointIndex=a,u=y,h=b+g.globals.translateY-1.4*x.tooltipRect.ttHeight,x.w.config.tooltip.followCursor){var j=x.getElGrid().getBoundingClientRect();h=x.e.clientY+g.globals.translateY-j.top}w<0&&(h=b),x.marker.enlargeCurrentPoint(a,d.paths,u,h)}return{x:u,y:h}}},{key:"handleBarTooltip",value:function(i){var n,a,l=i.e,d=i.opt,u=this.w,h=this.ttCtx,g=h.getElTooltip(),x=0,y=0,b=0,w=this.getBarTooltipXY({e:l,opt:d});n=w.i;var S=w.barHeight,j=w.j;u.globals.capturedSeriesIndex=n,u.globals.capturedDataPointIndex=j,u.globals.isBarHorizontal&&h.tooltipUtil.hasBars()||!u.config.tooltip.shared?(y=w.x,b=w.y,a=Array.isArray(u.config.stroke.width)?u.config.stroke.width[n]:u.config.stroke.width,x=y):u.globals.comboCharts||u.config.tooltip.shared||(x/=2),isNaN(b)&&(b=u.globals.svgHeight-h.tooltipRect.ttHeight);var E=parseInt(d.paths.parentNode.getAttribute("data:realIndex"),10),T=u.globals.isMultipleYAxis?u.config.yaxis[E]&&u.config.yaxis[E].reversed:u.config.yaxis[0].reversed;if(y+h.tooltipRect.ttWidth>u.globals.gridWidth&&!T?y-=h.tooltipRect.ttWidth:y<0&&(y=0),h.w.config.tooltip.followCursor){var I=h.getElGrid().getBoundingClientRect();b=h.e.clientY-I.top}h.tooltip===null&&(h.tooltip=u.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),u.config.tooltip.shared||(u.globals.comboBarCount>0?h.tooltipPosition.moveXCrosshairs(x+a/2):h.tooltipPosition.moveXCrosshairs(x)),!h.fixedTooltip&&(!u.config.tooltip.shared||u.globals.isBarHorizontal&&h.tooltipUtil.hasBars())&&(T&&(y-=h.tooltipRect.ttWidth)<0&&(y=0),!T||u.globals.isBarHorizontal&&h.tooltipUtil.hasBars()||(b=b+S-2*(u.globals.series[n][j]<0?S:0)),b=b+u.globals.translateY-h.tooltipRect.ttHeight/2,g.style.left=y+u.globals.translateX+"px",g.style.top=b+"px")}},{key:"getBarTooltipXY",value:function(i){var n=this,a=i.e,l=i.opt,d=this.w,u=null,h=this.ttCtx,g=0,x=0,y=0,b=0,w=0,S=a.target.classList;if(S.contains("apexcharts-bar-area")||S.contains("apexcharts-candlestick-area")||S.contains("apexcharts-boxPlot-area")||S.contains("apexcharts-rangebar-area")){var j=a.target,E=j.getBoundingClientRect(),T=l.elGrid.getBoundingClientRect(),I=E.height;w=E.height;var D=E.width,m=parseInt(j.getAttribute("cx"),10),k=parseInt(j.getAttribute("cy"),10);b=parseFloat(j.getAttribute("barWidth"));var N=a.type==="touchmove"?a.touches[0].clientX:a.clientX;u=parseInt(j.getAttribute("j"),10),g=parseInt(j.parentNode.getAttribute("rel"),10)-1;var R=j.getAttribute("data-range-y1"),F=j.getAttribute("data-range-y2");d.globals.comboCharts&&(g=parseInt(j.parentNode.getAttribute("data:realIndex"),10));var $=function(U){return d.globals.isXNumeric?m-D/2:n.isVerticalGroupedRangeBar?m+D/2:m-h.dataPointsDividedWidth+D/2},Y=function(){return k-h.dataPointsDividedHeight+I/2-h.tooltipRect.ttHeight/2};h.tooltipLabels.drawSeriesTexts({ttItems:l.ttItems,i:g,j:u,y1:R?parseInt(R,10):null,y2: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=Y()):(x=$(),y=a.clientY-T.top-h.tooltipRect.ttHeight/2-15):d.globals.isBarHorizontal?((x=m)0&&a.setAttribute("width",n.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var i=this.w,n=this.ttCtx;n.ycrosshairs=i.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),n.ycrosshairsHidden=i.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(i,n,a){var l=this.ttCtx,d=this.w,u=d.globals.yLabelFormatters[i];if(l.yaxisTooltips[i]){var h=l.getElGrid().getBoundingClientRect(),g=(n-h.top)*a.yRatio[i],x=d.globals.maxYArr[i]-d.globals.minYArr[i],y=d.globals.minYArr[i]+(x-g);l.tooltipPosition.moveYCrosshairs(n-h.top),l.yaxisTooltipText[i].innerHTML=u(y),l.tooltipPosition.moveYAxisTooltip(i)}}}]),O}(),N1=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 el(this),this.tooltipLabels=new tl(this),this.tooltipPosition=new rl(this),this.marker=new il(this),this.intersect=new t5(this),this.axesTooltip=new r5(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 Hi(this.ctx);this.xAxisTicksPositions=l.getXAxisTicksPositions()}if(!n.globals.comboCharts&&!this.tConfig.intersect&&n.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),n.config.markers.size!==0&&n.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),n.globals.collapsedSeries.length!==n.globals.series.length){this.dataPointsDividedHeight=n.globals.gridHeight/n.globals.dataPoints,this.dataPointsDividedWidth=n.globals.gridWidth/n.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||n.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,a.appendChild(this.tooltipTitle));var d=n.globals.series.length;(n.globals.xyCharts||n.globals.comboCharts)&&this.tConfig.shared&&(d=this.showOnIntersect?1:n.globals.series.length),this.legendLabels=n.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(d),this.addSVGEvents()}}},{key:"createTTElements",value:function(i){for(var n=this,a=this.w,l=[],d=this.getElTooltip(),u=function(g){var x=document.createElement("div");x.classList.add("apexcharts-tooltip-series-group"),x.style.order=a.config.tooltip.inverseOrder?i-g:g+1,n.tConfig.shared&&n.tConfig.enabledOnSeries&&Array.isArray(n.tConfig.enabledOnSeries)&&n.tConfig.enabledOnSeries.indexOf(g)<0&&x.classList.add("apexcharts-tooltip-series-group-hidden");var y=document.createElement("span");y.classList.add("apexcharts-tooltip-marker"),y.style.backgroundColor=a.globals.colors[g],x.appendChild(y);var b=document.createElement("div");b.classList.add("apexcharts-tooltip-text"),b.style.fontFamily=n.tConfig.style.fontFamily||a.config.chart.fontFamily,b.style.fontSize=n.tConfig.style.fontSize,["y","goals","z"].forEach(function(w){var S=document.createElement("div");S.classList.add("apexcharts-tooltip-".concat(w,"-group"));var j=document.createElement("span");j.classList.add("apexcharts-tooltip-text-".concat(w,"-label")),S.appendChild(j);var E=document.createElement("span");E.classList.add("apexcharts-tooltip-text-".concat(w,"-value")),S.appendChild(E),b.appendChild(S)}),x.appendChild(b),d.appendChild(x),l.push(x)},h=0;h0&&this.addPathsEventListeners(j,b),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(b)}}},{key:"drawFixedTooltipRect",value:function(){var i=this.w,n=this.getElTooltip(),a=n.getBoundingClientRect(),l=a.width+10,d=a.height+10,u=this.tConfig.fixed.offsetX,h=this.tConfig.fixed.offsetY,g=this.tConfig.fixed.position.toLowerCase();return g.indexOf("right")>-1&&(u=u+i.globals.svgWidth-l+10),g.indexOf("bottom")>-1&&(h=h+i.globals.svgHeight-d-10),n.style.left=u+"px",n.style.top=h+"px",{x:u,y:h,ttWidth:l,ttHeight:d}}},{key:"addDatapointEventsListeners",value:function(i){var n=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(n,i)}},{key:"addPathsEventListeners",value:function(i,n){for(var a=this,l=function(u){var h={paths:i[u],tooltipEl:n.tooltipEl,tooltipY:n.tooltipY,tooltipX:n.tooltipX,elGrid:n.elGrid,hoverArea:n.hoverArea,ttItems:n.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(g){return i[u].addEventListener(g,a.onSeriesHover.bind(a,h),{capture:!1,passive:!0})})},d=0;d=100?this.seriesHover(i,n):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){a.seriesHover(i,n)},100-l))}},{key:"seriesHover",value:function(i,n){var a=this;this.lastHoverTime=Date.now();var l=[],d=this.w;d.config.chart.group&&(l=this.ctx.getGroupedCharts()),d.globals.axisCharts&&(d.globals.minX===-1/0&&d.globals.maxX===1/0||d.globals.dataPoints===0)||(l.length?l.forEach(function(u){var h=a.getElTooltip(u),g={paths:i.paths,tooltipEl:h,tooltipY:i.tooltipY,tooltipX:i.tooltipX,elGrid:i.elGrid,hoverArea:i.hoverArea,ttItems:u.w.globals.tooltip.ttItems};u.w.globals.minX===a.w.globals.minX&&u.w.globals.maxX===a.w.globals.maxX&&u.w.globals.tooltip.seriesHoverByContext({chartCtx:u,ttCtx:u.w.globals.tooltip,opt:g,e:n})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:i,e:n}))}},{key:"seriesHoverByContext",value:function(i){var n=i.chartCtx,a=i.ttCtx,l=i.opt,d=i.e,u=n.w,h=this.getElTooltip();h&&(a.tooltipRect={x:0,y:0,ttWidth:h.getBoundingClientRect().width,ttHeight:h.getBoundingClientRect().height},a.e=d,a.tooltipUtil.hasBars()&&!u.globals.comboCharts&&!a.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Me(n).toggleSeriesOnHover(d,d.target.parentNode),a.fixedTooltip&&a.drawFixedTooltipRect(),u.globals.axisCharts?a.axisChartsTooltips({e:d,opt:l,tooltipRect:a.tooltipRect}):a.nonAxisChartsTooltips({e:d,opt:l,tooltipRect:a.tooltipRect}))}},{key:"axisChartsTooltips",value:function(i){var n,a,l=i.e,d=i.opt,u=this.w,h=d.elGrid.getBoundingClientRect(),g=l.type==="touchmove"?l.touches[0].clientX:l.clientX,x=l.type==="touchmove"?l.touches[0].clientY:l.clientY;if(this.clientY=x,this.clientX=g,u.globals.capturedSeriesIndex=-1,u.globals.capturedDataPointIndex=-1,xh.top+h.height)this.handleMouseOut(d);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!u.config.tooltip.shared){var y=parseInt(d.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(y)<0)return void this.handleMouseOut(d)}var b=this.getElTooltip(),w=this.getElXCrosshairs(),S=u.globals.xyCharts||u.config.chart.type==="bar"&&!u.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||u.globals.comboCharts&&this.tooltipUtil.hasBars();if(l.type==="mousemove"||l.type==="touchmove"||l.type==="mouseup"){if(u.globals.collapsedSeries.length+u.globals.ancillaryCollapsedSeries.length===u.globals.series.length)return;w!==null&&w.classList.add("apexcharts-active");var j=this.yaxisTooltips.filter(function(I){return I===!0});if(this.ycrosshairs!==null&&j.length&&this.ycrosshairs.classList.add("apexcharts-active"),S&&!this.showOnIntersect)this.handleStickyTooltip(l,g,x,d);else if(u.config.chart.type==="heatmap"||u.config.chart.type==="treemap"){var E=this.intersect.handleHeatTreeTooltip({e:l,opt:d,x:n,y:a,type:u.config.chart.type});n=E.x,a=E.y,b.style.left=n+"px",b.style.top=a+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:l,opt:d}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:l,opt:d,x:n,y:a});if(this.yaxisTooltips.length)for(var T=0;Tx.width)this.handleMouseOut(l);else if(g!==null)this.handleStickyCapturedSeries(i,g,l,h);else if(this.tooltipUtil.isXoverlap(h)||d.globals.isBarHorizontal){var y=d.globals.series.findIndex(function(b,w){return!d.globals.collapsedSeriesIndices.includes(w)});this.create(i,this,y,h,l.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(i,n,a,l){var d=this.w;if(!this.tConfig.shared&&d.globals.series[n][l]===null)return void this.handleMouseOut(a);if(d.globals.series[n][l]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(l)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(i,this,n,l,a.ttItems):this.create(i,this,n,l,a.ttItems,!1);else if(this.tooltipUtil.isXoverlap(l)){var u=d.globals.series.findIndex(function(h,g){return!d.globals.collapsedSeriesIndices.includes(g)});this.create(i,this,u,l,a.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var i=this.w,n=new X(this.ctx),a=i.globals.dom.Paper.select(".apexcharts-bar-area"),l=0;l5&&arguments[5]!==void 0?arguments[5]:null,F=this.w,$=n;i.type==="mouseup"&&this.markerClick(i,a,l),R===null&&(R=this.tConfig.shared);var Y=this.tooltipUtil.hasMarkers(a),U=this.tooltipUtil.getElBars();if(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(U),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)),R&&(j=j+S.height/2-m/2-2);var Y=this.barCtx.series[d][u]<0,U=x;switch(this.barCtx.isReversed&&(U=x-w+(Y?2*w:0),x-=w),I.position){case"center":E=R?Y?U-w/2+N:U+w/2-N:Y?U-w/2+S.height/2+N:U+w/2+S.height/2-N;break;case"bottom":E=R?Y?U-w+N:U+w-N:Y?U-w+S.height+m+N:U+w-S.height/2+m-N;break;case"top":E=R?Y?U+N:U-N:Y?U-S.height/2-N:U+S.height+N}if(this.barCtx.lastActiveBarSerieIndex===h&&D.enabled){var te=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:h,j:u}),T.fontSize);n=Y?U-te.height/2-N-D.offsetY+18:U+te.height+N+D.offsetY-18,a=j+D.offsetX}return l.config.chart.stacked||(E<0?E=0+m:E+S.height/3>l.globals.gridHeight&&(E=l.globals.gridHeight-m)),{bcx:y,bcy:x,dataLabelsX:j,dataLabelsY:E,totalDataLabelsX:a,totalDataLabelsY:n,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(i){var n=this.w,a=i.x,l=i.i,d=i.j,u=i.realIndex,h=i.groupIndex,g=i.bcy,x=i.barHeight,y=i.barWidth,b=i.textRects,w=i.dataLabelsX,S=i.strokeWidth,j=i.dataLabelsConfig,E=i.barDataLabelsConfig,T=i.barTotalDataLabelsConfig,I=i.offX,D=i.offY,m=n.globals.gridHeight/n.globals.dataPoints;y=Math.abs(y);var k,N,R=(g+=h!==-1?h*x:0)-(this.barCtx.isRangeBar?0:m)+x/2+b.height/2+D-3,F="start",$=this.barCtx.series[l][d]<0,Y=a;switch(this.barCtx.isReversed&&(Y=a+y-($?2*y:0),a=n.globals.gridWidth-y),E.position){case"center":w=$?Y+y/2-I:Math.max(b.width/2,Y-y/2)+I;break;case"bottom":w=$?Y+y-S-Math.round(b.width/2)-I:Y-y+S+Math.round(b.width/2)+I;break;case"top":w=$?Y-S+Math.round(b.width/2)-I:Y-S-Math.round(b.width/2)+I}if(this.barCtx.lastActiveBarSerieIndex===u&&T.enabled){var U=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:u,j:d}),j.fontSize);$?(k=Y-S+Math.round(U.width/2)-I-T.offsetX-15,F="end"):k=Y-S-Math.round(U.width/2)+I+T.offsetX+15,N=R+T.offsetY}return n.config.chart.stacked||(w<0?w=w+b.width+S:w+b.width/2>n.globals.gridWidth&&(w=n.globals.gridWidth-b.width-S)),{bcx:a,bcy:g,dataLabelsX:w,dataLabelsY:R,totalDataLabelsX:k,totalDataLabelsY:N,totalDataLabelsAnchor: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),E=y.formatter,T=null,I=b.globals.collapsedSeriesIndices.indexOf(d)>-1;if(y.enabled&&!I){T=j.group({class:"apexcharts-data-labels",transform:w});var D="";l!==void 0&&(D=E(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}(),n5=function(){function O(i){c(this,O),this.w=i.w,this.barCtx=i}return v(O,[{key:"initVariables",value:function(i){var n=this.w;this.barCtx.series=i,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var a=0;a0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=i[a].length),n.globals.isXNumeric)for(var l=0;ln.globals.minX&&n.globals.seriesX[a][l]0&&(l=x.globals.minXDiff/w),(u=l/b*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(u=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(u=parseInt(this.barCtx.barOptions.columnWidth,10)),h=x.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?x.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),i=x.globals.padHorizontal+(l-u*this.barCtx.seriesLen)/2}return x.globals.barHeight=d,x.globals.barWidth=u,{x:i,y:n,yDivision:a,xDivision:l,barHeight:d,barWidth:u,zeroH:h,zeroW:g}}},{key:"initializeStackedPrevVars",value:function(i){var n=i.w;n.globals.hasSeriesGroups?n.globals.seriesGroups.forEach(function(a){i[a]||(i[a]={}),i[a].prevY=[],i[a].prevX=[],i[a].prevYF=[],i[a].prevXF=[],i[a].prevYVal=[],i[a].prevXVal=[]}):(i.prevY=[],i.prevX=[],i.prevYF=[],i.prevXF=[],i.prevYVal=[],i.prevXVal=[])}},{key:"initializeStackedXYVars",value:function(i){var n=i.w;n.globals.hasSeriesGroups?n.globals.seriesGroups.forEach(function(a){i[a]||(i[a]={}),i[a].xArrj=[],i[a].xArrjF=[],i[a].xArrjVal=[],i[a].yArrj=[],i[a].yArrjF=[],i[a].yArrjVal=[]}):(i.xArrj=[],i.xArrjF=[],i.xArrjVal=[],i.yArrj=[],i.yArrjF=[],i.yArrjVal=[])}},{key:"getPathFillColor",value:function(i,n,a,l){var d,u,h,g,x=this.w,y=new ze(this.barCtx.ctx),b=null,w=this.barCtx.barOptions.distributed?a:n;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(S){i[n][a]>=S.from&&i[n][a]<=S.to&&(b=S.color)}),x.config.series[n].data[a]&&x.config.series[n].data[a].fillColor&&(b=x.config.series[n].data[a].fillColor),y.fillPath({seriesNumber:this.barCtx.barOptions.distributed?w:l,dataPointIndex:a,color:b,value:i[n][a],fillConfig:(d=x.config.series[n].data[a])===null||d===void 0?void 0:d.fill,fillType:(u=x.config.series[n].data[a])!==null&&u!==void 0&&(h=u.fill)!==null&&h!==void 0&&h.type?(g=x.config.series[n].data[a])===null||g===void 0?void 0:g.fill.type:Array.isArray(x.config.fill.type)?x.config.fill.type[n]:x.config.fill.type})}},{key:"getStrokeWidth",value:function(i,n,a){var l=0,d=this.w;return this.barCtx.series[i][n]===void 0||this.barCtx.series[i][n]===null?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,d.config.stroke.show&&(this.barCtx.isNullValue||(l=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[a]:this.barCtx.strokeWidth)),l}},{key:"shouldApplyRadius",value:function(i){var n=this.w,a=!1;return n.config.plotOptions.bar.borderRadius>0&&(n.config.chart.stacked&&n.config.plotOptions.bar.borderRadiusWhenStacked==="last"?this.barCtx.lastActiveBarSerieIndex===i&&(a=!0):a=!0),a}},{key:"barBackground",value:function(i){var n=i.j,a=i.i,l=i.x1,d=i.x2,u=i.y1,h=i.y2,g=i.elSeries,x=this.w,y=new X(this.barCtx.ctx),b=new Me(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&b===a){n>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(n%=this.barCtx.barOptions.colors.backgroundBarColors.length);var w=this.barCtx.barOptions.colors.backgroundBarColors[n],S=y.drawRect(l!==void 0?l:0,u!==void 0?u:0,d!==void 0?d:x.globals.gridWidth,h!==void 0?h:x.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,w,this.barCtx.barOptions.colors.backgroundBarOpacity);g.add(S),S.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(i){var n,a=i.barWidth,l=i.barXPosition,d=i.y1,u=i.y2,h=i.strokeWidth,g=i.seriesGroup,x=i.realIndex,y=i.i,b=i.j,w=i.w,S=new X(this.barCtx.ctx);(h=Array.isArray(h)?h[x]:h)||(h=0);var j=a,E=l;(n=w.config.series[x].data[b])!==null&&n!==void 0&&n.columnWidthOffset&&(E=l-w.config.series[x].data[b].columnWidthOffset/2,j=a+w.config.series[x].data[b].columnWidthOffset);var T=E,I=E+j;d+=.001,u+=.001;var D=S.move(T,d),m=S.move(T,d),k=S.line(I-h,d);if(w.globals.previousPaths.length>0&&(m=this.barCtx.getPreviousPath(x,b,!1)),D=D+S.line(T,u)+S.line(I-h,u)+S.line(I-h,d)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),m=m+S.line(T,d)+k+k+k+k+k+S.line(T,d)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),this.shouldApplyRadius(x)&&(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,E=l;(n=w.config.series[x].data[b])!==null&&n!==void 0&&n.barHeightOffset&&(j=a-w.config.series[x].data[b].barHeightOffset/2,E=l+w.config.series[x].data[b].barHeightOffset);var T=j,I=j+E;d+=.001,u+=.001;var 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,I-h);if(D=D+S.line(u,T)+S.line(u,I-h)+k+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),m=m+S.line(d,T)+k+k+k+k+k+S.line(d,T)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),this.shouldApplyRadius(x)&&(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 _,E=S.move(h,w)+S.line(u,w)+S.line(x,b)+S.line(y,b)+S.line(h,w)+(d.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z");return S.drawPath({d:E,fill:j.shadeColor(.5,_.rgb2hex(l)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadows"})}},{key:"getZeroValueEncounters",value:function(i){var n=i.i,a=i.j,l=this.w,d=0,u=0;return l.globals.seriesPercent.forEach(function(h,g){h[a]&&d++,gthis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var h=0,g=0;h0&&(this.visibleI=this.visibleI+1);var m=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=I),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed;var N=this.barHelpers.initialPositions();j=N.y,m=N.barHeight,y=N.yDivision,w=N.zeroW,S=N.x,k=N.barWidth,x=N.xDivision,b=N.zeroH,this.horizontal||T.push(S+k/2);var R=l.group({class:"apexcharts-datalabels","data:realIndex":I});a.globals.delayedElements.push({el:R.node}),R.node.classList.add("apexcharts-element-hidden");var 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 Y=0;Y0){var me=this.barHelpers.drawBarShadow({color:typeof ie=="string"&&(ie==null?void 0:ie.indexOf("url"))===-1?ie:_.hexToRgba(a.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:te});me&&$.add(me)}this.pathArr.push(te);var 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,Y>0&&T.push(S+k/2),E.push(j),this.renderSeries({realIndex:I,pathFill:ie,j:Y,i:h,pathFrom:te.pathFrom,pathTo:te.pathTo,strokeWidth:U,elSeries:D,x:S,y:j,series:i,barHeight:te.barHeight?te.barHeight:m,barWidth:te.barWidth?te.barWidth:k,elDataLabelsWrap:R,elGoalsMarkers:F,elBarShadows:$,visibleSeries:this.visibleI,type:"bar"})}a.globals.seriesXvalues[I]=T,a.globals.seriesYvalues[I]=E,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,E=i.y2,T=i.series,I=i.barHeight,D=i.barWidth,m=i.barXPosition,k=i.barYPosition,N=i.elDataLabelsWrap,R=i.elGoalsMarkers,F=i.elBarShadows,$=i.visibleSeries,Y=i.type,U=this.w,te=new X(this.ctx);l||(l=this.barOptions.distributed?U.globals.stroke.colors[d]:U.globals.stroke.colors[n]),U.config.series[u].data[d]&&U.config.series[u].data[d].strokeColor&&(l=U.config.series[u].data[d].strokeColor),this.isNullValue&&(a="none");var ne=d/U.config.chart.animations.animateGradually.delay*(U.config.chart.animations.speed/U.globals.dataPoints)/2.4,ie=te.renderPaths({i:u,j:d,realIndex:n,pathFrom:g,pathTo:x,stroke:l,strokeWidth:y,strokeLineCap:U.config.stroke.lineCap,fill:a,animationDelay:ne,initialSpeed:U.config.chart.animations.speed,dataChangeSpeed:U.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(Y,"-area")});ie.attr("clip-path","url(#gridRectMask".concat(U.globals.cuid,")"));var me=U.config.forecastDataPoints;me.count>0&&d>=U.globals.dataPoints-me.count&&(ie.node.setAttribute("stroke-dasharray",me.dashArray),ie.node.setAttribute("stroke-width",me.strokeWidth),ie.node.setAttribute("fill-opacity",me.fillOpacity)),j!==void 0&&E!==void 0&&(ie.attr("data-range-y1",j),ie.attr("data-range-y2",E)),new ee(this.ctx).setSelectionFilter(ie,n,d),b.add(ie);var we=new i5(this).handleBarDataLabels({x:w,y:S,y1:j,y2:E,i:u,j:d,series:T,realIndex:n,groupIndex:h,barHeight:I,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),R&&b.add(R),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,E=0;b.globals.seriesPercent.forEach(function(I,D){I[S]&&j++,D0&&(l=this.seriesLen*l/j),n=g+l*this.visibleI,n-=l*E}else n=g+l*this.visibleI;this.isFunnel&&(u-=(this.barHelpers.getXForValue(this.series[w][S],u)-u)/2),h=this.barHelpers.getXForValue(this.series[w][S],u);var T=this.barHelpers.getBarpaths({barYPosition:n,barHeight:l,x1:u,x2:h,strokeWidth:d,series:this.series,realIndex:a.realIndex,i:w,j:S,w:b});return b.globals.isXNumeric||(g+=x),this.barHelpers.barBackground({j:S,i:w,y1:n-l*this.visibleI,y2:l*this.seriesLen,elSeries:y}),{pathTo:T.pathTo,pathFrom:T.pathFrom,x1:u,x:h,y:g,goalX:this.barHelpers.getGoalValues("x",u,null,w,S),barYPosition:n,barHeight:l}}},{key:"drawColumnPaths",value:function(i){var n,a=i.indexes,l=i.x,d=i.y,u=i.xDivision,h=i.barWidth,g=i.zeroH,x=i.strokeWidth,y=i.elSeries,b=this.w,w=a.realIndex,S=a.i,j=a.j,E=a.bc;if(b.globals.isXNumeric){var T=this.getBarXForNumericXAxis({x:l,j,realIndex:w,barWidth:h});l=T.x,n=T.barXPosition}else if(b.config.plotOptions.bar.hideZeroBarsWhenGrouped){var I=this.barHelpers.getZeroValueEncounters({i:S,j}),D=I.nonZeroColumns,m=I.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:E,j,i:S,x1:n-x/2-h*this.visibleI,x2:h*this.seriesLen+x/2,elSeries:y}),{pathTo:k.pathTo,pathFrom:k.pathFrom,x:l,y:d,goalY:this.barHelpers.getGoalValues("y",null,g,S,j),barXPosition:n,barWidth:h}}},{key:"getBarXForNumericXAxis",value:function(i){var n=i.x,a=i.barWidth,l=i.realIndex,d=i.j,u=this.w,h=l;return u.globals.seriesX[l].length||(h=u.globals.maxValsInArrayIndex),u.globals.seriesX[h][d]&&(n=(u.globals.seriesX[h][d]-u.globals.minX)/this.xRatio-a*this.seriesLen/2),{barXPosition:n+a*this.visibleI,x:n}}},{key:"getPreviousPath",value:function(i,n){for(var a,l=this.w,d=0;d0&&parseInt(u.realIndex,10)===parseInt(i,10)&&l.globals.previousPaths[d].paths[n]!==void 0&&(a=l.globals.previousPaths[d].paths[n].d)}return a}}]),O}(),E1=function(O){A(n,fs);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l){var d=this,u=this.w;this.graphics=new X(this.ctx),this.bar=new fs(this.ctx,this.xyRatios);var h=new Q(this.ctx,u);a=h.getLogSeries(a),this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(a),u.config.chart.stackType==="100%"&&(a=u.globals.seriesPercent.slice()),this.series=a,this.barHelpers.initializeStackedPrevVars(this);for(var g=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),x=0,y=0,b=function(j,E){var T=void 0,I=void 0,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=[],R=[],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:_.escapeString(u.globals.seriesNames[F]),rel:j+1,"data:realIndex":F});d.ctx.series.addCollapsedClassToSeries($,F);var Y=d.graphics.group({class:"apexcharts-datalabels","data:realIndex":F}),U=d.graphics.group({class:"apexcharts-bar-goals-markers"}),te=0,ne=0,ie=d.initialPositions(x,y,T,I,D,m);y=ie.y,te=ie.barHeight,I=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,E=this.w,T=y+(b!==-1?b*u:0),I=d.i,D=d.j,m=0,k=0;k0){var R=g;this.groupCtx.prevXVal[N-1][D]<0?R=this.series[I][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&&(R=this.series[I][D]>=0?this.groupCtx.prevX[N-1][D]:this.groupCtx.prevX[N-1][D]-m+2*(this.isReversed?m:0)),l=R}else l=g;x=this.series[I][D]===null?l:l+this.series[I][D]/this.invertedYRatio-2*(this.isReversed?this.series[I][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:I,j:D,w:E});return this.barHelpers.barBackground({j:D,i:I,y1:T,y2:u,elSeries:j}),y+=S,{pathTo:F.pathTo,pathFrom:F.pathFrom,goalX:this.barHelpers.getGoalValues("x",g,null,I,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,E=l.j,T=l.bc;if(S.globals.isXNumeric){var I=S.globals.seriesX[j][E];I||(I=0),d=(I-S.globals.minX)/this.xRatio-g/2,S.globals.seriesGroups.length&&(d=(I-S.globals.minX)/this.xRatio-g/2*S.globals.seriesGroups.length)}for(var D,m=d+(y!==-1?y*g:0),k=0,N=0;N0&&!S.globals.isXNumeric||R>0&&S.globals.isXNumeric&&S.globals.seriesX[j-1][E]===S.globals.seriesX[j][E]){var F,$,Y,U=Math.min(this.yRatio.length+1,j+1);if(this.groupCtx.prevY[R-1]!==void 0&&this.groupCtx.prevY[R-1].length)for(var te=1;te=0?Y-k+2*(this.isReversed?k:0):Y;break}if(((we=this.groupCtx.prevYVal[R-ie])===null||we===void 0?void 0:we[E])>=0){$=this.series[j][E]>=0?Y:Y+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,R).every(function(Oe){return Oe.every(function(Ve){return isNaN(Ve)})})?x:$}else D=x;u=this.series[j][E]?D-this.series[j][E]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[j][E]/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:E,w:S});return this.barHelpers.barBackground({bc:T,j:E,i:j,x1:m,x2:g,elSeries:w}),d+=h,{pathTo:Pe.pathTo,pathFrom:Pe.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,x,j,E),barXPosition:m,x:S.globals.isXNumeric?d-h:d,y:u}}}]),n}(),Xd=function(O){A(n,fs);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l,d){var u=this,h=this.w,g=new X(this.ctx),x=h.globals.comboCharts?l:h.config.chart.type,y=new ze(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=h.config.plotOptions.bar.horizontal;var b=new Q(this.ctx,h);a=b.getLogSeries(a),this.series=a,this.yRatio=b.getLogYRatios(this.yRatio),this.barHelpers.initVariables(a);for(var w=g.group({class:"apexcharts-".concat(x,"-series apexcharts-plot-series")}),S=function(E){u.isBoxPlot=h.config.chart.type==="boxPlot"||h.config.series[E].type==="boxPlot";var T,I,D,m,k=void 0,N=void 0,R=[],F=[],$=h.globals.comboCharts?d[E]:E,Y=g.group({class:"apexcharts-series",seriesName:_.escapeString(h.globals.seriesNames[$]),rel:E+1,"data:realIndex":$});u.ctx.series.addCollapsedClassToSeries(Y,$),a[E].length>0&&(u.visibleI=u.visibleI+1);var U,te;u.yRatio.length>1&&(u.yaxisIndex=$);var ne=u.barHelpers.initialPositions();N=ne.y,U=ne.barHeight,I=ne.yDivision,m=ne.zeroW,k=ne.x,te=ne.barWidth,T=ne.xDivision,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(E,Pe,$),Ve=null,We={indexes:{i:E,j:Pe,realIndex:$},x:k,y:N,strokeWidth:Oe,elSeries:Y};Ve=u.isHorizontal?u.drawHorizontalBoxPaths(s(s({},We),{},{yDivision:I,barHeight:U,zeroW:m})):u.drawVerticalBoxPaths(s(s({},We),{},{xDivision:T,barWidth:te,zeroH:D})),N=Ve.y,k=Ve.x,Pe>0&&F.push(k+te/2),R.push(N),Ve.pathTo.forEach(function(tt,ot){var Zt=!u.isBoxPlot&&u.candlestickOptions.wick.useFillColor?Ve.color[ot]:h.globals.stroke.colors[E],Tt=y.fillPath({seriesNumber:$,dataPointIndex:Pe,color:Ve.color[ot],value:a[E][Pe]});u.renderSeries({realIndex:$,pathFill:Tt,lineFill:Zt,j:Pe,i:E,pathFrom:Ve.pathFrom,pathTo:tt,strokeWidth:Oe,elSeries:Y,x:k,y:N,series:a,barHeight:U,barWidth:te,elDataLabelsWrap:ie,visibleSeries:u.visibleI,type:h.config.chart.type})})},we=0;wek.c&&(j=!1);var F=Math.min(k.o,k.c),$=Math.max(k.o,k.c),Y=k.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[m][S]-y.globals.minX)/this.xRatio-h/2);var U=d+h*this.visibleI;this.series[w][S]===void 0||this.series[w][S]===null?(F=g,$=g):(F=g-F/D,$=g-$/D,N=g-k.h/D,R=g-k.l/D,Y=g-k.m/D);var te=b.move(U,g),ne=b.move(U+h/2,F);return y.globals.previousPaths.length>0&&(ne=this.getPreviousPath(m,S,!0)),te=this.isBoxPlot?[b.move(U,F)+b.line(U+h/2,F)+b.line(U+h/2,N)+b.line(U+h/4,N)+b.line(U+h-h/4,N)+b.line(U+h/2,N)+b.line(U+h/2,F)+b.line(U+h,F)+b.line(U+h,Y)+b.line(U,Y)+b.line(U,F+x/2),b.move(U,Y)+b.line(U+h,Y)+b.line(U+h,$)+b.line(U+h/2,$)+b.line(U+h/2,R)+b.line(U+h-h/4,R)+b.line(U+h/4,R)+b.line(U+h/2,R)+b.line(U+h/2,$)+b.line(U,$)+b.line(U,Y)+"z"]:[b.move(U,$)+b.line(U+h/2,$)+b.line(U+h/2,N)+b.line(U+h/2,$)+b.line(U+h,$)+b.line(U+h,F)+b.line(U+h/2,F)+b.line(U+h/2,R)+b.line(U+h/2,F)+b.line(U,F)+b.line(U,$-x/2)],ne+=b.move(U,F),y.globals.isXNumeric||(d+=u),{pathTo:te,pathFrom:ne,x:d,y:$,barXPosition:U,color:this.isBoxPlot?I:j?[E]:[T]}}},{key:"drawHorizontalBoxPaths",value:function(a){var l=a.indexes;a.x;var d=a.y,u=a.yDivision,h=a.barHeight,g=a.zeroW,x=a.strokeWidth,y=this.w,b=new X(this.ctx),w=l.i,S=l.j,j=this.boxOptions.colors.lower;this.isBoxPlot&&(j=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var E=this.invertedYRatio,T=l.realIndex,I=this.getOHLCValue(T,S),D=g,m=g,k=Math.min(I.o,I.c),N=Math.max(I.o,I.c),R=I.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[T][S]-y.globals.minX)/this.invertedXRatio-h/2);var F=d+h*this.visibleI;this.series[w][S]===void 0||this.series[w][S]===null?(k=g,N=g):(k=g+k/E,N=g+N/E,D=g+I.h/E,m=g+I.l/E,R=g+I.m/E);var $=b.move(g,F),Y=b.move(k,F+h/2);return y.globals.previousPaths.length>0&&(Y=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(R,F+h)+b.line(R,F)+b.line(k+x/2,F),b.move(R,F)+b.line(R,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(R,F)+"z"],Y+=b.move(k,F),y.globals.isXNumeric||(d+=u),{pathTo:$,pathFrom:Y,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}(),L1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"checkColorRange",value:function(){var i=this.w,n=!1,a=i.config.plotOptions[i.config.chart.type];return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(function(l,d){l.from<=0&&(n=!0)}),n}},{key:"getShadeColor",value:function(i,n,a,l){var d=this.w,u=1,h=d.config.plotOptions[i].shadeIntensity,g=this.determineColor(i,n,a);d.globals.hasNegs||l?u=d.config.plotOptions[i].reverseNegativeShade?g.percent<0?g.percent/100*(1.25*h):(1-g.percent/100)*(1.25*h):g.percent<=0?1-(1+g.percent/100)*h:(1-g.percent/100)*h:(u=1-g.percent/100,i==="treemap"&&(u=(1-g.percent/100)*(1.25*h)));var x=g.color,y=new _;return d.config.plotOptions[i].enableShades&&(x=this.w.config.theme.mode==="dark"?_.hexToRgba(y.shadeColor(-1*u,g.color),d.config.fill.opacity):_.hexToRgba(y.shadeColor(u,g.color),d.config.fill.opacity)),{color:x,colorProps:g}}},{key:"determineColor",value:function(i,n,a){var l=this.w,d=l.globals.series[n][a],u=l.config.plotOptions[i],h=u.colorScale.inverse?a:n;u.distributed&&l.config.chart.type==="treemap"&&(h=a);var g=l.globals.colors[h],x=null,y=Math.min.apply(Math,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,E){if(d>=j.from&&d<=j.to){g=j.color,x=j.foreColor?j.foreColor:null,y=j.from,b=j.to;var T=Math.abs(b)+Math.abs(y);S=100*d/(T===0?T-1e-6:T)}}),{color:g,foreColor:x,percent:S}}},{key:"calculateDataLabels",value:function(i){var n=i.text,a=i.x,l=i.y,d=i.i,u=i.j,h=i.colorProps,g=i.fontSize,x=this.w.config.dataLabels,y=new X(this.ctx),b=new Be(this.ctx),w=null;if(x.enabled){w=y.group({class:"apexcharts-data-labels"});var S=x.offsetX,j=x.offsetY,E=a+S,T=l+parseFloat(x.style.fontSize)/3+j;b.plotDataLabelsText({x:E,y:T,text:n,i:d,j:u,color:h.foreColor,parent:w,fontSize:g,dataLabelsConfig:x})}return w}},{key:"addListeners",value:function(i){var n=new X(this.ctx);i.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this,i)),i.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this,i)),i.node.addEventListener("mousedown",n.pathMouseDown.bind(this,i))}}]),O}(),s5=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 L1(i),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return v(O,[{key:"draw",value:function(i){var n=this.w,a=new X(this.ctx),l=a.group({class:"apexcharts-heatmap"});l.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")"));var d=n.globals.gridWidth/n.globals.dataPoints,u=n.globals.gridHeight/n.globals.series.length,h=0,g=!1;this.negRange=this.helpers.checkColorRange();var x=i.slice();n.config.yaxis[0].reversed&&(g=!0,x.reverse());for(var y=g?0:x.length-1;g?y=0;g?y++:y--){var b=a.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:_.escapeString(n.globals.seriesNames[y]),rel:y+1,"data:realIndex":y});if(this.ctx.series.addCollapsedClassToSeries(b,y),n.config.chart.dropShadow.enabled){var w=n.config.chart.dropShadow;new ee(this.ctx).dropShadow(b,w,y)}for(var S=0,j=n.config.plotOptions.heatmap.shadeIntensity,E=0;E-1&&this.pieClicked(w),a.config.dataLabels.enabled){var N=m.x,R=m.y,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),E=a.centerY+u*Math.sin(b),T=_.polarToCartesian(a.centerX,a.centerY,a.donutSize,y),I=_.polarToCartesian(a.centerX,a.centerY,a.donutSize,g),D=d>180?1:0,m=["M",w,S,"A",u,u,0,D,1,j,E];return n=a.chartType==="donut"?[].concat(m,["L",T.x,T.y,"A",a.donutSize,a.donutSize,0,D,0,I.x,I.y,"L",w,S,"z"]).join(" "):a.chartType==="pie"||a.chartType==="polarArea"?[].concat(m,["L",a.centerX,a.centerY,"L",w,S]).join(" "):[].concat(m).join(" "),h.roundPathCorners(n,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(i){var n=this.w,a=new fa(this.ctx),l=new X(this.ctx),d=new P1(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}(),a5=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var n=this.w;this.graphics=new X(this.ctx),this.lineColorArr=n.globals.stroke.colors!==void 0?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight0&&(R=n.getPreviousPath(I));for(var 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&&(E=360-Math.abs(this.startAngle)-.1);var T=d.drawPath({d:"",stroke:S,strokeWidth:x*parseInt(w.strokeWidth,10)/100,fill:"none",strokeOpacity:w.opacity,classes:"apexcharts-radialbar-area"});if(w.dropShadow.enabled){var I=w.dropShadow;h.dropShadow(T,I)}b.add(T),T.attr("id","apexcharts-radialbarTrack-"+y),this.animatePaths(T,{centerX:a.centerX,centerY:a.centerY,endAngle:E,startAngle:j,size:a.size,i:y,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:l.globals.easing})}return u}},{key:"drawArcs",value:function(a){var l=this.w,d=new X(this.ctx),u=new ze(this.ctx),h=new ee(this.ctx),g=d.group(),x=this.getStrokeWidth(a);a.size=a.size-x/2;var y=l.config.plotOptions.radialBar.hollow.background,b=a.size-x*a.series.length-this.margin*a.series.length-x*parseInt(l.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,w=b-l.config.plotOptions.radialBar.hollow.margin;l.config.plotOptions.radialBar.hollow.image!==void 0&&(y=this.drawHollowImage(a,g,b,y));var S=this.drawHollow({size:w,centerX:a.centerX,centerY:a.centerY,fill:y||"transparent"});if(l.config.plotOptions.radialBar.hollow.dropShadow.enabled){var j=l.config.plotOptions.radialBar.hollow.dropShadow;h.dropShadow(S,j)}var E=1;!this.radialDataLabels.total.show&&l.globals.series.length>1&&(E=0);var T=null;this.radialDataLabels.show&&(T=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:b,centerX:a.centerX,centerY:a.centerY,opacity:E})),l.config.plotOptions.radialBar.hollow.position==="back"&&(g.add(S),T&&g.add(T));var I=!1;l.config.plotOptions.radialBar.inverseOrder&&(I=!0);for(var D=I?a.series.length-1:0;I?D>=0:D100?100:a.series[D])/100,$=Math.round(this.totalAngle*F)+this.startAngle,Y=void 0;l.globals.dataChanged&&(R=this.startAngle,Y=Math.round(this.totalAngle*_.negToZero(l.globals.previousPaths[D])/100)+R),Math.abs($)+Math.abs(N)>=360&&($-=.01),Math.abs(Y)+Math.abs(R)>=360&&(Y-=.01);var U=$-N,te=Array.isArray(l.config.stroke.dashArray)?l.config.stroke.dashArray[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":U,"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=_.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:Y,prevStartAngle:R,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=_.randomId(),y=h.config.plotOptions.radialBar.hollow.image;if(h.config.plotOptions.radialBar.hollow.imageClipped)g.clippedImgArea({width:d,height:d,image:y,patternID:"pattern".concat(h.globals.cuid).concat(x)}),u="url(#pattern".concat(h.globals.cuid).concat(x,")");else{var b=h.config.plotOptions.radialBar.hollow.imageWidth,w=h.config.plotOptions.radialBar.hollow.imageHeight;if(b===void 0&&w===void 0){var S=h.globals.dom.Paper.image(y).loaded(function(E){this.move(a.centerX-E.width/2+h.config.plotOptions.radialBar.hollow.imageOffsetX,a.centerY-E.height/2+h.config.plotOptions.radialBar.hollow.imageOffsetY)});l.add(S)}else{var j=h.globals.dom.Paper.image(y).loaded(function(E){this.move(a.centerX-b/2+h.config.plotOptions.radialBar.hollow.imageOffsetX,a.centerY-w/2+h.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(b,w)});l.add(j)}}return u}},{key:"getStrokeWidth",value:function(a){var l=this.w;return a.size*(100-parseInt(l.config.plotOptions.radialBar.hollow.size,10))/100/(a.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(a){var l=parseInt(a.target.getAttribute("rel"),10)-1,d=this.barLabels.onClick,u=this.w;d&&d(u.globals.seriesNames[l],{w:u,seriesIndex:l})}}]),n}(),l5=function(O){A(n,fs);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l){var d=this.w,u=new X(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=a,this.seriesRangeStart=d.globals.seriesRangeStart,this.seriesRangeEnd=d.globals.seriesRangeEnd,this.barHelpers.initVariables(a);for(var h=u.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),g=0;g0&&(this.visibleI=this.visibleI+1);var I=0,D=0;this.yRatio.length>1&&(this.yaxisIndex=E);var m=this.barHelpers.initialPositions();j=m.y,w=m.zeroW,S=m.x,D=m.barWidth,I=m.barHeight,x=m.xDivision,y=m.yDivision,b=m.zeroH;for(var k=u.group({class:"apexcharts-datalabels","data:realIndex":E}),N=u.group({class:"apexcharts-rangebar-goals-markers"}),R=0;R0});return this.isHorizontal?(u=E.config.plotOptions.bar.rangeBarGroupRows?g+w*k:g+y*this.visibleI+w*k,N>-1&&!E.config.plotOptions.bar.rangeBarOverlap&&(T=E.globals.seriesRange[l][N].overlaps).indexOf(I)>-1&&(u=(y=j.barHeight/T.length)*this.visibleI+w*(100-parseInt(this.barOptions.barHeight,10))/100/2+y*(this.visibleI+T.indexOf(I))+w*k)):(k>-1&&(h=E.config.plotOptions.bar.rangeBarGroupRows?x+S*k:x+b*this.visibleI+S*k),N>-1&&!E.config.plotOptions.bar.rangeBarOverlap&&(T=E.globals.seriesRange[l][N].overlaps).indexOf(I)>-1&&(h=(b=j.barWidth/T.length)*this.visibleI+S*(100-parseInt(this.barOptions.barWidth,10))/100/2+b*(this.visibleI+T.indexOf(I))+S*k)),{barYPosition:u,barXPosition:h,barHeight:y,barWidth:b}}},{key:"drawRangeColumnPaths",value:function(a){var l=a.indexes,d=a.x,u=a.xDivision,h=a.barWidth,g=a.barXPosition,x=a.zeroH,y=this.w,b=l.i,w=l.j,S=this.yRatio[this.yaxisIndex],j=l.realIndex,E=this.getRangeValue(j,w),T=Math.min(E.start,E.end),I=Math.max(E.start,E.end);this.series[b][w]===void 0||this.series[b][w]===null?T=x:(T=x-T/S,I=x-I/S);var D=Math.abs(I-T),m=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:h,y1:T,y2:I,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:l.realIndex,i:j,j:w,w:y});if(y.globals.isXNumeric){var k=this.getBarXForNumericXAxis({x:d,j:w,realIndex:j,barWidth:h});d=k.x,g=k.barXPosition}else d+=u;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:D,x:d,y:I,goalY:this.barHelpers.getGoalValues("y",null,x,b,w),barXPosition:g}}},{key:"drawRangeBarPaths",value:function(a){var l=a.indexes,d=a.y,u=a.y1,h=a.y2,g=a.yDivision,x=a.barHeight,y=a.barYPosition,b=a.zeroW,w=this.w,S=b+u/this.invertedYRatio,j=b+h/this.invertedYRatio,E=Math.abs(j-S),T=this.barHelpers.getBarpaths({barYPosition:y,barHeight:x,x1:S,x2:j,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:l.realIndex,realIndex:l.realIndex,j:l.j,w});return w.globals.isXNumeric||(d+=g),{pathTo:T.pathTo,pathFrom:T.pathFrom,barWidth:E,x:j,goalX:this.barHelpers.getGoalValues("x",b,null,l.realIndex,l.j),y:d}}},{key:"getRangeValue",value:function(a,l){var d=this.w;return{start:d.globals.seriesRangeStart[a][l],end:d.globals.seriesRangeEnd[a][l]}}}]),n}(),c5=function(){function O(i){c(this,O),this.w=i.w,this.lineCtx=i}return v(O,[{key:"sameValueSeriesFix",value:function(i,n){var a=this.w;if((a.config.fill.type==="gradient"||a.config.fill.type[i]==="gradient")&&new Q(this.lineCtx.ctx,a).seriesHaveSameValues(i)){var l=n[i].slice();l[l.length-1]=l[l.length-1]+1e-6,n[i]=l}return n}},{key:"calculatePoints",value:function(i){var n=i.series,a=i.realIndex,l=i.x,d=i.y,u=i.i,h=i.j,g=i.prevY,x=this.w,y=[],b=[];if(h===0){var w=this.lineCtx.categoryAxisCorrection+x.config.markers.offsetX;x.globals.isXNumeric&&(w=(x.globals.seriesX[a][0]-x.globals.minX)/this.lineCtx.xRatio+x.config.markers.offsetX),y.push(w),b.push(_.isNumber(n[u][0])?g+x.config.markers.offsetY:null),y.push(l+x.config.markers.offsetX),b.push(_.isNumber(n[u][h+1])?d+x.config.markers.offsetY:null)}else y.push(l+x.config.markers.offsetX),b.push(_.isNumber(n[u][h+1])?d+x.config.markers.offsetY:null);return{x:y,y:b}}},{key:"checkPreviousPaths",value:function(i){for(var n=i.pathFromLine,a=i.pathFromArea,l=i.realIndex,d=this.w,u=0;u0&&parseInt(h.realIndex,10)===parseInt(l,10)&&(h.type==="line"?(this.lineCtx.appendPathFrom=!1,n=d.globals.previousPaths[u].paths[0].d):h.type==="area"&&(this.lineCtx.appendPathFrom=!1,a=d.globals.previousPaths[u].paths[0].d,d.config.stroke.show&&d.globals.previousPaths[u].paths[1]&&(n=d.globals.previousPaths[u].paths[1].d)))}return{pathFromLine:n,pathFromArea:a}}},{key:"determineFirstPrevY",value:function(i){var n,a,l=i.i,d=i.series,u=i.prevY,h=i.lineYPosition,g=this.w,x=g.config.chart.stacked&&!g.globals.comboCharts||g.config.chart.stacked&&g.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[l])===null||n===void 0?void 0:n.type)==="bar");if(((a=d[l])===null||a===void 0?void 0:a[0])!==void 0)u=(h=x&&l>0?this.lineCtx.prevSeriesY[l-1][0]:this.lineCtx.zeroY)-d[l][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?d[l][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(x&&l>0&&d[l][0]===void 0){for(var y=l-1;y>=0;y--)if(d[y][0]!==null&&d[y][0]!==void 0){u=h=this.lineCtx.prevSeriesY[y][0];break}}return{prevY:u,lineYPosition:h}}}]),O}(),d5=function(O){for(var i,n,a,l,d=function(y){for(var b=[],w=y[0],S=y[1],j=b[0]=Ud(w,S),E=1,T=y.length-1;E9&&(l=3*a/Math.sqrt(l),d[g]=l*i,d[g+1]=l*n);for(var x=0;x<=u;x++)l=(O[Math.min(u,x+1)][0]-O[Math.max(0,x-1)][0])/(6*(1+d[x]*d[x])),h.push([l||0,d[x]*l||0]);return h},Yd=function(O){for(var i="",n=0;n4?(i+="C".concat(a[0],", ").concat(a[1]),i+=", ".concat(a[2],", ").concat(a[3]),i+=", ".concat(a[4],", ").concat(a[5])):l>2&&(i+="S".concat(a[0],", ").concat(a[1]),i+=", ".concat(a[2],", ").concat(a[3]))}return i},R1=function(O){var i=d5(O),n=O[1],a=O[0],l=[],d=i[1],u=i[0];l.push(a,[a[0]+u[0],a[1]+u[1],n[0]-d[0],n[1]-d[1],n[0],n[1]]);for(var h=2,g=i.length;h0&&(I=(u.globals.seriesX[S][0]-u.globals.minX)/this.xRatio),T.push(I);var D,m=I,k=void 0,N=m,R=this.zeroY,F=this.zeroY;R=this.lineHelpers.determineFirstPrevY({i:w,series:i,prevY:R,lineYPosition:0}).prevY,u.config.stroke.curve==="monotonCubic"&&i[w][0]===null?j.push(null):j.push(R),D=R,g==="rangeArea"&&(k=F=this.lineHelpers.determineFirstPrevY({i:w,series:l,prevY:F,lineYPosition:0}).prevY,E.push(F));var $={type:g,series:i,realIndex:S,i:w,x:I,y:1,pX:m,pY:D,pathsFrom:this._calculatePathsFrom({type:g,series:i,i:w,realIndex:S,prevX:N,prevY:R,prevY2:F}),linePaths:[],areaPaths:[],seriesIndex:a,lineYPosition:0,xArrj:T,yArrj:j,y2Arrj:E,seriesRangeEnd:l},Y=this._iterateOverDataPoints(s(s({},$),{},{iterations:g==="rangeArea"?i[w].length-1:void 0,isRangeStart:!0}));if(g==="rangeArea"){var U=this._calculatePathsFrom({series:l,i:w,realIndex:S,prevX:N,prevY:F}),te=this._iterateOverDataPoints(s(s({},$),{},{series:l,pY:k,pathsFrom:U,iterations:l[w].length-1,isRangeStart:!1}));Y.linePaths[0]=te.linePath+Y.linePath,Y.pathFromLine=te.pathFromLine+Y.pathFromLine}this._handlePaths({type:g,realIndex:S,i:w,paths:Y}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),b.push(this.elSeries)}if(((d=u.config.series[0])===null||d===void 0?void 0:d.zIndex)!==void 0&&b.sort(function(me,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:_.escapeString(l.globals.seriesNames[a])}),this.elPointsMain=d.group({class:"apexcharts-series-markers-wrap","data:realIndex":a}),this.elDataLabelsWrap=d.group({class:"apexcharts-datalabels","data:realIndex":a});var u=i[n].length===l.globals.dataPoints;this.elSeries.attr({"data:longestSeries":u,rel:n+1,"data:realIndex":a}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(i){var n,a,l,d,u=i.type,h=i.series,g=i.i,x=i.realIndex,y=i.prevX,b=i.prevY,w=i.prevY2,S=this.w,j=new X(this.ctx);if(h[g][0]===null){for(var E=0;E0){var T=this.lineHelpers.checkPreviousPaths({pathFromLine:l,pathFromArea:d,realIndex:x});l=T.pathFromLine,d=T.pathFromArea}return{prevX:y,prevY:b,linePath:n,areaPath:a,pathFromLine:l,pathFromArea:d}}},{key:"_handlePaths",value:function(i){var n=i.type,a=i.realIndex,l=i.i,d=i.paths,u=this.w,h=new X(this.ctx),g=new ze(this.ctx);this.prevSeriesY.push(d.yArrj),u.globals.seriesXvalues[a]=d.xArrj,u.globals.seriesYvalues[a]=d.yArrj;var x=u.config.forecastDataPoints;if(x.count>0&&n!=="rangeArea"){var y=u.globals.seriesXvalues[a][u.globals.seriesXvalues[a].length-x.count-1],b=h.drawRect(y,0,u.globals.gridWidth,u.globals.gridHeight,0);u.globals.dom.elForecastMask.appendChild(b.node);var w=h.drawRect(0,0,y,u.globals.gridHeight,0);u.globals.dom.elNonForecastMask.appendChild(w.node)}this.pointsChart||u.globals.delayedElements.push({el:this.elPointsMain.node,index:a});var S={i:l,realIndex:a,animationDelay:l,initialSpeed:u.config.chart.animations.speed,dataChangeSpeed:u.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(n)};if(n==="area")for(var j=g.fillPath({seriesNumber:a}),E=0;E0&&n!=="rangeArea"){var 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,")")),R.attr("clip-path","url(#nonForecastMask".concat(u.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(i){var n,a=this,l=i.type,d=i.series,u=i.iterations,h=i.realIndex,g=i.i,x=i.x,y=i.y,b=i.pX,w=i.pY,S=i.pathsFrom,j=i.linePaths,E=i.areaPaths,T=i.seriesIndex,I=i.lineYPosition,D=i.xArrj,m=i.yArrj,k=i.y2Arrj,N=i.isRangeStart,R=i.seriesRangeEnd,F=this.w,$=new X(this.ctx),Y=this.yRatio,U=S.prevY,te=S.linePath,ne=S.areaPath,ie=S.pathFromLine,me=S.pathFromArea,we=_.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(Or,mi){return mi-Or/Y[a.yaxisIndex]+2*(a.isReversed?Or/Y[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){mi--;break}return mi>=0?mi:0}(g-1)][We+1]:I=this.zeroY:I=this.zeroY,tt?y=Pe(we,I):(y=Pe(d[g][We+1],I),l==="rangeArea"&&(Oe=Pe(R[g][We+1],I))),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:U}),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:E,seriesIndex:T,isRangeStart:N});E=Tt.areaPaths,j=Tt.linePaths,b=Tt.pX,w=Tt.pY,ne=Tt.areaPath,te=Tt.linePath,!this.appendPathFrom||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:E,pathFromLine:ie,linePaths:j,linePath:te,areaPath:ne}}},{key:"_handleMarkersAndLabels",value:function(i){var n=i.type,a=i.pointsPos,l=i.isRangeStart,d=i.i,u=i.j,h=i.realIndex,g=this.w,x=new Be(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,u,{realIndex:h,pointsPos:a,zRatio:this.zRatio,elParent:this.elPointsMain});else{g.globals.series[d].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var y=this.markers.plotChartMarkers(a,h,u+1);y!==null&&this.elPointsMain.add(y)}var b=x.drawDataLabel({type:n,isRangeStart:l,pos:a,i:h,j:u+1});b!==null&&this.elDataLabelsWrap.add(b)}},{key:"_createPaths",value:function(i){var n=i.type,a=i.series,l=i.i,d=i.realIndex,u=i.j,h=i.x,g=i.y,x=i.xArrj,y=i.yArrj,b=i.y2,w=i.y2Arrj,S=i.pX,j=i.pY,E=i.linePath,T=i.areaPath,I=i.linePaths,D=i.areaPaths,m=i.seriesIndex,k=i.isRangeStart,N=this.w,R=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 Y=n==="rangeArea"?x.length===N.globals.dataPoints:u===a[l].length-2,U=x.map(function(Ve,We){return[x[We],y[We]]}).filter(function(Ve){return Ve[1]!==null});if(Y&&U.length>1){var te=R1(U);if(E+=Yd(te),a[l][0]===null?T=E:T+=Yd(te),n==="rangeArea"&&k){E+=R.line(x[x.length-1],w[w.length-1]);var ne=x.slice().reverse(),ie=w.slice().reverse(),me=ne.map(function(Ve,We){return[ne[We],ie[We]]}),we=R1(me);T=E+=Yd(we)}else T+=R.line(U[U.length-1][0],$)+R.line(U[0][0],$)+R.move(U[0][0],U[0][1])+"z";I.push(E),D.push(T)}}else if(F==="smooth"){var Pe=.35*(h-S);N.globals.hasNullValues?(a[l][u]!==null&&(a[l][u+1]!==null?(E=R.move(S,j)+R.curve(S+Pe,j,h-Pe,g,h+1,g),T=R.move(S+1,j)+R.curve(S+Pe,j,h-Pe,g,h+1,g)+R.line(h,$)+R.line(S,$)+"z"):(E=R.move(S,j),T=R.move(S,j)+"z")),I.push(E),D.push(T)):(E+=R.curve(S+Pe,j,h-Pe,g,h,g),T+=R.curve(S+Pe,j,h-Pe,g,h,g)),S=h,j=g,u===a[l].length-2&&(T=T+R.curve(S,j,h,g,h,$)+R.move(h,g)+"z",n==="rangeArea"&&k?E=E+R.curve(S,j,h,g,h,b)+R.move(h,b)+"z":N.globals.hasNullValues||(I.push(E),D.push(T)))}else{if(a[l][u+1]===null){E+=R.move(h,g);var Oe=N.globals.isXNumeric?(N.globals.seriesX[d][u]-N.globals.minX)/this.xRatio:h-this.xDivision;T=T+R.line(Oe,$)+R.move(h,g)+"z"}a[l][u]===null&&(E+=R.move(h,g),T+=R.move(h,$)),F==="stepline"?(E=E+R.line(h,null,"H")+R.line(null,g,"V"),T=T+R.line(h,null,"H")+R.line(null,g,"V")):F==="straight"&&(E+=R.line(h,g),T+=R.line(h,g)),u===a[l].length-2&&(T=T+R.line(h,$)+R.move(h,g)+"z",n==="rangeArea"&&k?E=E+R.line(h,b)+R.move(h,b)+"z":(I.push(E),D.push(T)))}return{linePaths:I,areaPaths:D,pX:S,pY:j,linePath:E,areaPath:T}}},{key:"handleNullDataPoints",value:function(i,n,a,l,d){var u=this.w;if(i[a][l]===null&&u.config.markers.showNullDataPoints||i[a].length===1){var h=this.markers.plotChartMarkers(n,d,l+1,this.strokeWidth-u.config.markers.strokeWidth/2,!0);h!==null&&this.elPointsMain.add(h)}}}]),O}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function O(h,g,x,y){this.xoffset=h,this.yoffset=g,this.height=y,this.width=x,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(b){var w,S=[],j=this.xoffset,E=this.yoffset,T=d(b)/this.height,I=d(b)/this.width;if(this.width>=this.height)for(w=0;w=this.height){var S=b/this.height,j=this.width-S;w=new O(this.xoffset+S,this.yoffset,j,this.height)}else{var E=b/this.width,T=this.height-E;w=new O(this.xoffset,this.yoffset+E,this.width,T)}return w}}function i(h,g,x,y,b){y=y===void 0?0:y,b=b===void 0?0:b;var w=n(function(S,j){var E,T=[],I=j/d(S);for(E=0;E=m}(g,w=h[0],b)?(g.push(w),n(h.slice(1),g,x,y)):(S=x.cutArea(d(g),y),y.push(x.getCoordinates(g)),n(h,[],S,y)),y;y.push(x.getCoordinates(g))}function a(h,g){var x=Math.min.apply(Math,h),y=Math.max.apply(Math,h),b=d(h);return Math.max(Math.pow(g,2)*y/Math.pow(b,2),Math.pow(b,2)/(Math.pow(g,2)*x))}function l(h){return h&&h.constructor===Array}function d(h){var g,x=0;for(g=0;gu-l&&x.width<=h-d){var y=g.rotateAroundCenter(i.node);i.node.setAttribute("transform","rotate(-90 ".concat(y.x," ").concat(y.y,") translate(").concat(x.height/3,")"))}}},{key:"truncateLabels",value:function(i,n,a,l,d,u){var h=new X(this.ctx),g=h.getTextRects(i,n).width+this.w.config.stroke.width+5>d-a&&u-l>d-a?u-l:d-a,x=h.getTextBasedOnMaxWidth({text:i,maxWidth:g,fontSize:n});return i.length!==x.length&&g/n<5?"":x}},{key:"animateTreemap",value:function(i,n,a,l){var d=new K(this.ctx);d.animateRect(i,{x:n.x,y:n.y,width:n.width,height:n.height},{x:a.x,y:a.y,width:a.width,height:a.height},l,function(){d.animationCompleted(i)})}}]),O}(),h5=86400,f5=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*h5),E=Math.floor(u),T=Math.floor(u/30),I=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:E,numberOfMonths:T,numberOfYears:I};switch(this.tickInterval){case"years":this.generateYearScale(m);break;case"months":case"half_year":this.generateMonthScale(m);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(m);break;case"hours":this.generateHourScale(m);break;case"minutes_fives":case"minutes":this.generateMinuteScale(m);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(m)}var k=this.timeScaleArray.map(function(N){var R={position:N.position,unit:N.unit,year:N.year,day:N.day?N.day:1,hour:N.hour?N.hour:0,month:N.month+1};return N.unit==="month"?s(s({},R),{},{day:1,value:N.value+1}):N.unit==="day"||N.unit==="hour"?s(s({},R),{},{value:N.value}):N.unit==="minute"?s(s({},R),{},{value:N.value,minute:N.value}):N.unit==="second"?s(s({},R),{},{value:N.value,minute:N.minute,second:N.second}):N});return k.filter(function(N){var R=1,F=Math.ceil(l.globals.gridWidth/120),$=N.value;l.config.xaxis.tickAmount!==void 0&&(F=l.config.xaxis.tickAmount),k.length>F&&(R=Math.floor(k.length/F));var Y=!1,U=!1;switch(a.tickInterval){case"years":N.unit==="year"&&(Y=!0);break;case"half_year":R=7,N.unit==="year"&&(Y=!0);break;case"months":R=1,N.unit==="year"&&(Y=!0);break;case"months_fortnight":R=15,N.unit!=="year"&&N.unit!=="month"||(Y=!0),$===30&&(U=!0);break;case"months_days":R=10,N.unit==="month"&&(Y=!0),$===30&&(U=!0);break;case"week_days":R=8,N.unit==="month"&&(Y=!0);break;case"days":R=1,N.unit==="month"&&(Y=!0);break;case"hours":N.unit==="day"&&(Y=!0);break;case"minutes_fives":case"seconds_fives":$%5!=0&&(U=!0);break;case"seconds_tens":$%10!=0&&(U=!0)}if(a.tickInterval==="hours"||a.tickInterval==="minutes_fives"||a.tickInterval==="seconds_tens"||a.tickInterval==="seconds_fives"){if(!U)return!0}else if(($%R==0||Y)&&!U)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(i,n){var a=this.w,l=this.formatDates(i),d=this.removeOverlappingTS(l);a.globals.timescaleLabels=d.slice(),new Pt(this.ctx).plotCoords()}},{key:"determineInterval",value:function(i){var n=24*i,a=60*n;switch(!0){case i/365>5:this.tickInterval="years";break;case i>800:this.tickInterval="half_year";break;case i>180:this.tickInterval="months";break;case i>90:this.tickInterval="months_fortnight";break;case i>60:this.tickInterval="months_days";break;case i>30:this.tickInterval="week_days";break;case i>2:this.tickInterval="days";break;case n>2.4:this.tickInterval="hours";break;case a>15:this.tickInterval="minutes_fives";break;case a>5:this.tickInterval="minutes";break;case a>1:this.tickInterval="seconds_tens";break;case 60*a>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(i){var n=i.firstVal,a=i.currentMonth,l=i.currentYear,d=i.daysWidthOnXAxis,u=i.numberOfYears,h=n.minYear,g=0,x=new Re(this.ctx),y="year";if(n.minDate>1||n.minMonth>0){var b=x.determineRemainingDaysOfYear(n.minYear,n.minMonth,n.minDate);g=(x.determineDaysOfYear(n.minYear)-b+1)*d,h=n.minYear+1,this.timeScaleArray.push({position:g,value:h,unit:y,year:h,month:_.monthMod(a+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:g,value:h,unit:y,year:l,month:_.monthMod(a+1)});for(var w=h,S=g,j=0;j1){x=(y.determineDaysOfMonths(l+1,n.minYear)-a+1)*u,g=_.monthMod(l+1);var S=d+w,j=_.monthMod(g),E=g;g===0&&(b="year",E=S,j=1,S+=w+=1),this.timeScaleArray.push({position:x,value:E,unit:b,year:S,month:j})}else this.timeScaleArray.push({position:x,value:g,unit:b,year:d,month:_.monthMod(l)});for(var T=g+1,I=x,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=_.monthMod(n.minMonth),g="month",y=n.minDate):n.minDate!==1&&n.minHour===0&&n.minMinute===0&&(w=0,x=n.minDate,S=x,j=b(y=x,a,l)),this.timeScaleArray.push({position:w,value:S,unit:g,year:this._getYear(l,j,0),month:_.monthMod(j),day:y});for(var E=w,T=0;Tg.determineDaysOfMonths(F+1,d)&&(T=1,F+=1),{month:F,date:T}},b=function(R,F){return R>g.determineDaysOfMonths(F+1,d)?F+=1:F},w=60-(n.minMinute+n.minSecond/60),S=w*u,j=n.minHour+1,E=j;w===60&&(S=0,E=j=n.minHour);var T=a;E>=24&&(E=0,T+=1,x="day");var I=y(T,l).month;I=b(T,I),this.timeScaleArray.push({position:S,value:j,unit:x,day:T,hour:E,year:d,month:_.monthMod(I)}),E++;for(var D=S,m=0;m=24&&(E=0,x="day",I=y(T+=1,I).month,I=b(T,I));var k=this._getYear(d,I,0);D=60*u+D;var N=E===0?T:E;this.timeScaleArray.push({position:D,value:N,unit:x,hour:E,day:T,year:k,month:_.monthMod(I)}),E++}}},{key:"generateMinuteScale",value:function(i){for(var n=i.currentMillisecond,a=i.currentSecond,l=i.currentMinute,d=i.currentHour,u=i.currentDate,h=i.currentMonth,g=i.currentYear,x=i.minutesWidthOnXAxis,y=i.secondsWidthOnXAxis,b=i.numberOfMinutes,w=l+1,S=u,j=h,E=g,T=d,I=(60-a-n/1e3)*y,D=0;D=60&&(w=0,(T+=1)===24&&(T=0)),this.timeScaleArray.push({position:I,value:w,unit:"minute",hour:T,minute:w,day:S,year:this._getYear(E,j,0),month:_.monthMod(j)}),I+=x,w++}},{key:"generateSecondScale",value:function(i){for(var n=i.currentMillisecond,a=i.currentSecond,l=i.currentMinute,d=i.currentHour,u=i.currentDate,h=i.currentMonth,g=i.currentYear,x=i.secondsWidthOnXAxis,y=i.numberOfSeconds,b=a+1,w=l,S=u,j=h,E=g,T=d,I=(1e3-n)/1e3*x,D=0;D=60&&(b=0,++w>=60&&(w=0,++T===24&&(T=0))),this.timeScaleArray.push({position:I,value:b,unit:"second",hour:T,minute:w,second:b,day:S,year:this._getYear(E,j,0),month:_.monthMod(j)}),I+=x,b++}},{key:"createRawDateString",value:function(i,n){var a=i.year;return i.month===0&&(i.month=1),a+="-"+("0"+i.month.toString()).slice(-2),i.unit==="day"?a+=i.unit==="day"?"-"+("0"+n).slice(-2):"-01":a+="-"+("0"+(i.day?i.day:"1")).slice(-2),i.unit==="hour"?a+=i.unit==="hour"?"T"+("0"+n).slice(-2):"T00":a+="T"+("0"+(i.hour?i.hour:"0")).slice(-2),i.unit==="minute"?a+=":"+("0"+n).slice(-2):a+=":"+(i.minute?("0"+i.minute).slice(-2):"00"),i.unit==="second"?a+=":"+("0"+n).slice(-2):a+=":00",this.utc&&(a+=".000Z"),a}},{key:"formatDates",value:function(i){var n=this,a=this.w;return i.map(function(l){var d=l.value.toString(),u=new Re(n.ctx),h=n.createRawDateString(l,d),g=u.getDate(u.parseDate(h));if(n.utc||(g=u.getDate(u.parseDateWithTimezone(h))),a.config.xaxis.labels.format===void 0){var x="dd MMM",y=a.config.xaxis.labels.datetimeFormatter;l.unit==="year"&&(x=y.year),l.unit==="month"&&(x=y.month),l.unit==="day"&&(x=y.day),l.unit==="hour"&&(x=y.hour),l.unit==="minute"&&(x=y.minute),l.unit==="second"&&(x=y.second),d=u.formatDate(g,x)}else d=u.formatDate(g,a.config.xaxis.labels.format);return{dateString:h,position:l.position,value:d,unit:l.unit,year:l.year,month:l.month}})}},{key:"removeOverlappingTS",value:function(i){var n,a=this,l=new X(this.ctx),d=!1;i.length>0&&i[0].value&&i.every(function(g){return g.value.length===i[0].value.length})&&(d=!0,n=l.getTextRects(i[0].value).width);var u=0,h=i.map(function(g,x){if(x>0&&a.w.config.xaxis.labels.hideOverlappingLabels){var y=d?n:l.getTextRects(i[u].value).width,b=i[u].position;return g.position>b+y+10?(u=x,g):null}return g});return h=h.filter(function(g){return g!==null})}},{key:"_getYear",value:function(i,n,a){return i+Math.floor(n/12)+a}}]),O}(),p5=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 Y=0;i[$].type!==void 0?(i[$].type==="column"||i[$].type==="bar"?(d.series.length>1&&l.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),y.series.push(F),y.i.push($),Y++,a.globals.columnSeries=y.series):i[$].type==="area"?(h.series.push(F),h.i.push($),Y++):i[$].type==="line"?(u.series.push(F),u.i.push($),Y++):i[$].type==="scatter"?(g.series.push(F),g.i.push($)):i[$].type==="bubble"?(x.series.push(F),x.i.push($),Y++):i[$].type==="candlestick"?(b.series.push(F),b.i.push($),Y++):i[$].type==="boxPlot"?(w.series.push(F),w.i.push($),Y++):i[$].type==="rangeBar"?(S.series.push(F),S.i.push($),Y++):i[$].type==="rangeArea"?(j.series.push(d.seriesRangeStart[$]),j.seriesRangeEnd.push(d.seriesRangeEnd[$]),j.i.push($),Y++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble/candlestick/boxPlot/rangeBar/rangeArea"),Y>1&&(d.comboCharts=!0)):(u.series.push(F),u.i.push($))});var E=new Gd(this.ctx,n),T=new Xd(this.ctx,n);this.ctx.pie=new T1(this.ctx);var I=new o5(this.ctx);this.ctx.rangeBar=new l5(this.ctx,n);var D=new a5(this.ctx),m=[];if(d.comboCharts){if(h.series.length>0&&m.push(E.draw(h.series,"area",h.i)),y.series.length>0)if(a.config.chart.stacked){var k=new E1(this.ctx,n);m.push(k.draw(y.series,y.i))}else this.ctx.bar=new fs(this.ctx,n),m.push(this.ctx.bar.draw(y.series,y.i));if(j.series.length>0&&m.push(E.draw(j.series,"rangeArea",j.i,j.seriesRangeEnd)),u.series.length>0&&m.push(E.draw(u.series,"line",u.i)),b.series.length>0&&m.push(T.draw(b.series,"candlestick",b.i)),w.series.length>0&&m.push(T.draw(w.series,"boxPlot",w.i)),S.series.length>0&&m.push(this.ctx.rangeBar.draw(S.series,S.i)),g.series.length>0){var N=new Gd(this.ctx,n,!0);m.push(N.draw(g.series,"scatter",g.i))}if(x.series.length>0){var R=new Gd(this.ctx,n,!0);m.push(R.draw(x.series,"bubble",x.i))}}else switch(l.chart.type){case"line":m=E.draw(d.series,"line");break;case"area":m=E.draw(d.series,"area");break;case"bar":l.chart.stacked?m=new E1(this.ctx,n).draw(d.series):(this.ctx.bar=new fs(this.ctx,n),m=this.ctx.bar.draw(d.series));break;case"candlestick":m=new Xd(this.ctx,n).draw(d.series,"candlestick");break;case"boxPlot":m=new Xd(this.ctx,n).draw(d.series,l.chart.type);break;case"rangeBar":m=this.ctx.rangeBar.draw(d.series);break;case"rangeArea":m=E.draw(d.seriesRangeStart,"rangeArea",void 0,d.seriesRangeEnd);break;case"heatmap":m=new s5(this.ctx,n).draw(d.series);break;case"treemap":m=new u5(this.ctx,n).draw(d.series);break;case"pie":case"donut":case"polarArea":m=this.ctx.pie.draw(d.series);break;case"radialBar":m=I.draw(d.series);break;case"radar":m=D.draw(d.series);break;default:m=E.draw(d.series)}return m}},{key:"setSVGDimensions",value:function(){var i=this.w.globals,n=this.w.config;i.svgWidth=n.chart.width,i.svgHeight=n.chart.height;var a=_.getDimensions(this.el),l=n.chart.width.toString().split(/[0-9]+/g).pop();l==="%"?_.isNumber(a[0])&&(a[0].width===0&&(a=_.getDimensions(this.el.parentNode)),i.svgWidth=a[0]*parseInt(n.chart.width,10)/100):l!=="px"&&l!==""||(i.svgWidth=parseInt(n.chart.width,10));var d=n.chart.height.toString().split(/[0-9]+/g).pop();if(i.svgHeight!=="auto"&&i.svgHeight!=="")if(d==="%"){var u=_.getDimensions(this.el.parentNode);i.svgHeight=u[1]*parseInt(n.chart.height,10)/100}else i.svgHeight=parseInt(n.chart.height,10);else i.axisCharts?i.svgHeight=i.svgWidth/1.61:i.svgHeight=i.svgWidth/1.2;if(i.svgWidth<0&&(i.svgWidth=0),i.svgHeight<0&&(i.svgHeight=0),X.setAttrs(i.dom.Paper.node,{width:i.svgWidth,height:i.svgHeight}),d!=="%"){var h=n.chart.sparkline.enabled?0:i.axisCharts?n.chart.parentHeightOffset:0;i.dom.Paper.node.parentNode.parentNode.style.minHeight=i.svgHeight+h+"px"}i.dom.elWrap.style.width=i.svgWidth+"px",i.dom.elWrap.style.height=i.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var i=this.w.globals,n=i.translateY,a={transform:"translate("+i.translateX+", "+n+")"};X.setAttrs(i.dom.elGraphical.node,a)}},{key:"resizeNonAxisCharts",value:function(){var i=this.w,n=i.globals,a=0,l=i.config.chart.sparkline.enabled?1:15;l+=i.config.grid.padding.bottom,i.config.legend.position!=="top"&&i.config.legend.position!=="bottom"||!i.config.legend.show||i.config.legend.floating||(a=new Jo(this.ctx).legendHelpers.getLegendBBox().clwh+10);var d=i.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),u=2.05*i.globals.radialSize;if(d&&!i.config.chart.sparkline.enabled&&i.config.plotOptions.radialBar.startAngle!==0){var h=_.getBoundingClientRect(d);u=h.bottom;var g=h.bottom-h.top;u=Math.max(2.05*i.globals.radialSize,g)}var x=u+n.translateY+a+l;n.dom.elLegendForeign&&n.dom.elLegendForeign.setAttribute("height",x),i.config.chart.height&&String(i.config.chart.height).indexOf("%")>0||(n.dom.elWrap.style.height=x+"px",X.setAttrs(n.dom.Paper.node,{height:x}),n.dom.Paper.node.parentNode.parentNode.style.minHeight=x+"px")}},{key:"coreCalculations",value:function(){new us(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 f5(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}(),g5=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"_updateOptions",value:function(i){var n=this,a=arguments.length>1&&arguments[1]!==void 0&&arguments[1],l=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],d=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],u=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(h){var g=[n.ctx];d&&(g=n.ctx.getSyncedCharts()),n.ctx.w.globals.isExecCalled&&(g=[n.ctx],n.ctx.w.globals.isExecCalled=!1),g.forEach(function(x,y){var b=x.w;if(b.globals.shouldAnimate=l,a||(b.globals.resized=!0,b.globals.dataChanged=!0,l&&x.series.getPreviousPaths()),i&&o(i)==="object"&&(x.config=new oe(i),i=Q.extendArrayProps(x.config,i,b),x.w.globals.chartID!==n.ctx.w.globals.chartID&&delete i.series,b.config=_.extend(b.config,i),u&&(b.globals.lastXAxis=i.xaxis?_.clone(i.xaxis):[],b.globals.lastYAxis=i.yaxis?_.clone(i.yaxis):[],b.globals.initialConfig=_.extend({},b.config),b.globals.initialSeries=_.clone(b.config.series),i.series))){for(var w=0;w2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(d){var u,h=a.w;return h.globals.shouldAnimate=n,h.globals.dataChanged=!0,n&&a.ctx.series.getPreviousPaths(),h.globals.axisCharts?((u=i.map(function(g,x){return a._extendSeries(g,x)})).length===0&&(u=[{data:[]}]),h.config.series=u):h.config.series=i.slice(),l&&(h.globals.initialConfig.series=_.clone(h.config.series),h.globals.initialSeries=_.clone(h.config.series)),a.ctx.update().then(function(){d(a.ctx)})})}},{key:"_extendSeries",value:function(i,n){var a=this.w,l=a.config.series[n];return s(s({},a.config.series[n]),{},{name:i.name?i.name:l==null?void 0:l.name,color:i.color?i.color:l==null?void 0:l.color,type:i.type?i.type:l==null?void 0:l.type,group:i.group?i.group:l==null?void 0:l.group,data:i.data?i.data:l==null?void 0:l.data,zIndex:i.zIndex!==void 0?i.zIndex:n})}},{key:"toggleDataPointSelection",value:function(i,n){var a=this.w,l=null,d=".apexcharts-series[data\\:realIndex='".concat(i,"']");return a.globals.axisCharts?l=a.globals.dom.Paper.select("".concat(d," path[j='").concat(n,"'], ").concat(d," circle[j='").concat(n,"'], ").concat(d," rect[j='").concat(n,"']")).members[0]:n===void 0&&(l=a.globals.dom.Paper.select("".concat(d," path[j='").concat(i,"']")).members[0],a.config.chart.type!=="pie"&&a.config.chart.type!=="polarArea"&&a.config.chart.type!=="donut"||this.ctx.pie.pieClicked(i)),l?(new X(this.ctx).pathMouseDown(l,null),l.node?l.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(i){var n=this.w;if(["min","max"].forEach(function(l){i.xaxis[l]!==void 0&&(n.config.xaxis[l]=i.xaxis[l],n.globals.lastXAxis[l]=i.xaxis[l])}),i.xaxis.categories&&i.xaxis.categories.length&&(n.config.xaxis.categories=i.xaxis.categories),n.config.xaxis.convertedCatToNumeric){var a=new 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}();Tn=typeof window<"u"?window:void 0,nl=function(O,i){var n=(this!==void 0?this:O).SVG=function(m){if(n.supported)return m=new n.Doc(m),n.parser.draw||n.prepare(),m};if(n.ns="http://www.w3.org/2000/svg",n.xmlns="http://www.w3.org/2000/xmlns/",n.xlink="http://www.w3.org/1999/xlink",n.svgjs="http://svgjs.dev",n.supported=!0,!n.supported)return!1;n.did=1e3,n.eid=function(m){return"Svgjs"+y(m)+n.did++},n.create=function(m){var k=i.createElementNS(this.ns,m);return k.setAttribute("id",this.eid(m)),k},n.extend=function(){var m,k;k=(m=[].slice.call(arguments)).pop();for(var N=m.length-1;N>=0;N--)if(m[N])for(var R in k)m[N].prototype[R]=k[R];n.Set&&n.Set.inherit&&n.Set.inherit()},n.invent=function(m){var k=typeof m.create=="function"?m.create:function(){this.constructor.call(this,n.create(m.create))};return m.inherit&&(k.prototype=new m.inherit),m.extend&&n.extend(k,m.extend),m.construct&&n.extend(m.parent||n.Container,m.construct),k},n.adopt=function(m){return m?m.instance?m.instance:((k=m.nodeName=="svg"?m.parentNode instanceof O.SVGElement?new n.Nested:new n.Doc:m.nodeName=="linearGradient"?new n.Gradient("linear"):m.nodeName=="radialGradient"?new n.Gradient("radial"):n[y(m.nodeName)]?new n[y(m.nodeName)]:new n.Element(m)).type=m.nodeName,k.node=m,m.instance=k,k instanceof n.Doc&&k.namespace().defs(),k.setData(JSON.parse(m.getAttribute("svgjs:data"))||{}),k):null;var k},n.prepare=function(){var m=i.getElementsByTagName("body")[0],k=(m?new n.Doc(m):n.adopt(i.documentElement).nested()).size(2,0);n.parser={body:m||i.documentElement,draw:k.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:k.polyline().node,path:k.path().node,native:n.create("svg")}},n.parser={native:n.create("svg")},i.addEventListener("DOMContentLoaded",function(){n.parser.draw||n.prepare()},!1),n.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},n.utils={map:function(m,k){for(var N=m.length,R=[],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;dY);return R},bbox:function(){return n.parser.draw||n.prepare(),n.parser.path.setAttribute("d",this.toString()),n.parser.path.getBBox()}}),n.Number=n.invent({create:function(m,k){this.value=0,this.unit=k||"",typeof m=="number"?this.value=isNaN(m)?0:isFinite(m)?m:m<0?-34e37:34e37:typeof m=="string"?(k=m.match(n.regex.numberAndUnit))&&(this.value=parseFloat(k[1]),k[5]=="%"?this.value/=100:k[5]=="s"&&(this.value*=1e3),this.unit=k[5]):m instanceof n.Number&&(this.value=m.valueOf(),this.unit=m.unit)},extend:{toString:function(){return(this.unit=="%"?~~(1e8*this.value)/1e6:this.unit=="s"?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(m){return m=new n.Number(m),new n.Number(this+m,this.unit||m.unit)},minus:function(m){return m=new n.Number(m),new n.Number(this-m,this.unit||m.unit)},times:function(m){return m=new n.Number(m),new n.Number(this*m,this.unit||m.unit)},divide:function(m){return m=new n.Number(m),new n.Number(this/m,this.unit||m.unit)},to:function(m){var k=new n.Number(this);return typeof m=="string"&&(k.unit=m),k},morph:function(m){return this.destination=new n.Number(m),m.relative&&(this.destination.value+=this.value),this},at:function(m){return this.destination?new n.Number(this.destination).minus(this).times(m).plus(this):this}}}),n.Element=n.invent({create:function(m){this._stroke=n.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=m)&&(this.type=m.nodeName,this.node.instance=this,this._stroke=m.getAttribute("stroke")||this._stroke)},extend:{x:function(m){return this.attr("x",m)},y:function(m){return this.attr("y",m)},cx:function(m){return m==null?this.x()+this.width()/2:this.x(m-this.width()/2)},cy:function(m){return m==null?this.y()+this.height()/2:this.y(m-this.height()/2)},move:function(m,k){return this.x(m).y(k)},center:function(m,k){return this.cx(m).cy(k)},width:function(m){return this.attr("width",m)},height:function(m){return this.attr("height",m)},size:function(m,k){var N=w(this,m,k);return this.width(new n.Number(N.width)).height(new n.Number(N.height))},clone:function(m){this.writeDataToDom();var k=E(this.node.cloneNode(!0));return m?m.add(k):this.after(k),k},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(m){return this.after(m).remove(),m},addTo:function(m){return m.put(this)},putIn:function(m){return m.add(this)},id:function(m){return this.attr("id",m)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return this.style("display")!="none"},toString:function(){return this.attr("id")},classes:function(){var m=this.attr("class");return m==null?[]:m.trim().split(n.regex.delimiter)},hasClass:function(m){return this.classes().indexOf(m)!=-1},addClass:function(m){if(!this.hasClass(m)){var k=this.classes();k.push(m),this.attr("class",k.join(" "))}return this},removeClass:function(m){return this.hasClass(m)&&this.attr("class",this.classes().filter(function(k){return k!=m}).join(" ")),this},toggleClass:function(m){return this.hasClass(m)?this.removeClass(m):this.addClass(m)},reference:function(m){return n.get(this.attr(m))},parent:function(m){var k=this;if(!k.node.parentNode)return null;if(k=n.adopt(k.node.parentNode),!m)return k;for(;k&&k.node instanceof O.SVGElement;){if(typeof m=="string"?k.matches(m):k instanceof m)return k;if(!k.node.parentNode||k.node.parentNode.nodeName=="#document")return null;k=n.adopt(k.node.parentNode)}},doc:function(){return this instanceof n.Doc?this:this.parent(n.Doc)},parents:function(m){var k=[],N=this;do{if(!(N=N.parent(m))||!N.node)break;k.push(N)}while(N.parent);return k},matches:function(m){return function(k,N){return(k.matches||k.matchesSelector||k.msMatchesSelector||k.mozMatchesSelector||k.webkitMatchesSelector||k.oMatchesSelector).call(k,N)}(this.node,m)},native:function(){return this.node},svg:function(m){var k=i.createElement("svg");if(!(m&&this instanceof n.Parent))return k.appendChild(m=i.createElement("svg")),this.writeDataToDom(),m.appendChild(this.node.cloneNode(!0)),k.innerHTML.replace(/^/,"").replace(/<\/svg>$/,"");k.innerHTML=""+m.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var N=0,R=k.firstChild.childNodes.length;N":function(m){return-Math.cos(m*Math.PI)/2+.5},">":function(m){return Math.sin(m*Math.PI/2)},"<":function(m){return 1-Math.cos(m*Math.PI/2)}},n.morph=function(m){return function(k,N){return new n.MorphObj(k,N).at(m)}},n.Situation=n.invent({create:function(m){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new n.Number(m.duration).valueOf(),this.delay=new n.Number(m.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=m.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),n.FX=n.invent({create:function(m){this._target=m,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(m,k,N){o(m)==="object"&&(k=m.ease,N=m.delay,m=m.duration);var R=new n.Situation({duration:m||1e3,delay:N||0,ease:n.easing[k||"-"]||k});return this.queue(R),this},target:function(m){return m&&m instanceof n.Element?(this._target=m,this):this._target},timeToAbsPos:function(m){return(m-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(m){return this.situation.duration/this._speed*m+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=O.requestAnimationFrame((function(){this.step()}).bind(this))},stopAnimFrame:function(){O.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(m){return(typeof m=="function"||m instanceof n.Situation)&&this.situations.push(m),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof n.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var m,k=this.situation;if(k.init)return this;for(var N in k.animations){m=this.target()[N](),Array.isArray(m)||(m=[m]),Array.isArray(k.animations[N])||(k.animations[N]=[k.animations[N]]);for(var R=m.length;R--;)k.animations[N][R]instanceof n.Number&&(m[R]=new n.Number(m[R])),k.animations[N][R]=m[R].morph(k.animations[N][R])}for(var N in k.attrs)k.attrs[N]=new n.MorphObj(this.target().attr(N),k.attrs[N]);for(var N in k.styles)k.styles[N]=new n.MorphObj(this.target().style(N),k.styles[N]);return k.initialTransformation=this.target().matrixify(),k.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(m,k){var N=this.active;return this.active=!1,k&&this.clearQueue(),m&&this.situation&&(!N&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(m){var k=this.last();return this.target().on("finished.fx",function N(R){R.detail.situation==k&&(m.call(this,k),this.off("finished.fx",N))}),this._callStart()},during:function(m){var k=this.last(),N=function(R){R.detail.situation==k&&m.call(this,R.detail.pos,n.morph(R.detail.pos),R.detail.eased,k)};return this.target().off("during.fx",N).on("during.fx",N),this.after(function(){this.off("during.fx",N)}),this._callStart()},afterAll:function(m){var k=function N(R){m.call(this),this.off("allfinished.fx",N)};return this.target().off("allfinished.fx",k).on("allfinished.fx",k),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(m,k,N){return this.last()[N||"animations"][m]=k,this._callStart()},step:function(m){var k,N,R;m||(this.absPos=this.timeToAbsPos(+new Date)),this.situation.loops!==!1?(k=Math.max(this.absPos,0),N=Math.floor(k),this.situation.loops===!0||Nthis.lastPos&&$<=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(),R=this.situation;for(var F in R.animations)m=[].concat(R.animations[F]).map(function(U){return typeof U!="string"&&U.at?U.at(R.ease(k.pos),k.pos):U}),N[F].apply(N,m);for(var F in R.attrs)m=[F].concat(R.attrs[F]).map(function(te){return typeof te!="string"&&te.at?te.at(R.ease(k.pos),k.pos):te}),N.attr.apply(N,m);for(var F in R.styles)m=[F].concat(R.styles[F]).map(function(te){return typeof te!="string"&&te.at?te.at(R.ease(k.pos),k.pos):te}),N.style.apply(N,m);if(R.transforms.length){m=R.initialTransformation,F=0;for(var $=R.transforms.length;F<$;F++){var Y=R.transforms[F];Y instanceof n.Matrix?m=Y.relative?m.multiply(new n.Matrix().morph(Y).at(R.ease(this.pos))):m.morph(Y).at(R.ease(this.pos)):(Y.relative||Y.undo(m.extract()),m=m.multiply(Y.at(R.ease(this.pos))))}N.matrix(m)}return this},once:function(m,k,N){var R=this.last();return N||(m=R.ease(m)),R.once[m]=k,this},_callStart:function(){return setTimeout((function(){this.start()}).bind(this),0),this}},parent:n.Element,construct:{animate:function(m,k,N){return(this.fx||(this.fx=new n.FX(this))).animate(m,k,N)},delay:function(m){return(this.fx||(this.fx=new n.FX(this))).delay(m)},stop:function(m,k){return this.fx&&this.fx.stop(m,k),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),n.MorphObj=n.invent({create:function(m,k){return n.Color.isColor(k)?new n.Color(m).morph(k):n.regex.delimiter.test(m)?n.regex.pathLetters.test(m)?new n.PathArray(m).morph(k):new n.Array(m).morph(k):n.regex.numberAndUnit.test(k)?new n.Number(m).morph(k):(this.value=m,void(this.destination=k))},extend:{at:function(m,k){return k<1?this.value:this.destination},valueOf:function(){return this.value}}}),n.extend(n.FX,{attr:function(m,k,N){if(o(m)==="object")for(var R in m)this.attr(R,m[R]);else this.add(m,k,"attrs");return this},plot:function(m,k,N,R){return arguments.length==4?this.plot([m,k,N,R]):this.add("plot",new(this.target()).morphArray(m))}}),n.Box=n.invent({create:function(m,k,N,R){if(!(o(m)!=="object"||m instanceof n.Element))return n.Box.call(this,m.left!=null?m.left:m.x,m.top!=null?m.top:m.y,m.width,m.height);var F;arguments.length==4&&(this.x=m,this.y=k,this.width=N,this.height=R),(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 R=m.clone(n.parser.draw.instance).show();R&&R.node&&typeof R.node.getBBox=="function"&&(k=R.node.getBBox()),R&&typeof R.remove=="function"&&R.remove()}else k={x:m.node.clientLeft,y:m.node.clientTop,width:m.node.clientWidth,height:m.node.clientHeight}}n.Box.call(this,k)}},inherit:n.Box,parent:n.Element,construct:{bbox:function(){return new n.BBox(this)}}}),n.BBox.prototype.constructor=n.BBox,n.Matrix=n.invent({create:function(m){var k=j([1,0,0,1,0,0]);m=m===null?k:m instanceof n.Element?m.matrixify():typeof m=="string"?j(m.split(n.regex.delimiter).map(parseFloat)):arguments.length==6?j([].slice.call(arguments)):Array.isArray(m)?j(m):m&&o(m)==="object"?m:k;for(var N=I.length-1;N>=0;--N)this[I[N]]=m[I[N]]!=null?m[I[N]]:k[I[N]]},extend:{extract:function(){var m=S(this,0,1);S(this,1,0);var k=180/Math.PI*Math.atan2(m.y,m.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(k*Math.PI/180)+this.f*Math.sin(k*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(k*Math.PI/180)+this.e*Math.sin(-k*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:k,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new n.Matrix(this)}},clone:function(){return new n.Matrix(this)},morph:function(m){return this.destination=new n.Matrix(m),this},multiply:function(m){return new n.Matrix(this.native().multiply(function(k){return k instanceof n.Matrix||(k=new n.Matrix(k)),k}(m).native()))},inverse:function(){return new n.Matrix(this.native().inverse())},translate:function(m,k){return new n.Matrix(this.native().translate(m||0,k||0))},native:function(){for(var m=n.parser.native.createSVGMatrix(),k=I.length-1;k>=0;k--)m[I[k]]=this[I[k]];return m},toString:function(){return"matrix("+T(this.a)+","+T(this.b)+","+T(this.c)+","+T(this.d)+","+T(this.e)+","+T(this.f)+")"}},parent:n.Element,construct:{ctm:function(){return new n.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof n.Nested){var m=this.rect(1,1),k=m.node.getScreenCTM();return m.remove(),new n.Matrix(k)}return new n.Matrix(this.node.getScreenCTM())}}}),n.Point=n.invent({create:function(m,k){var N;N=Array.isArray(m)?{x:m[0],y:m[1]}:o(m)==="object"?{x:m.x,y:m.y}:m!=null?{x:m,y:k??m}:{x:0,y:0},this.x=N.x,this.y=N.y},extend:{clone:function(){return new n.Point(this)},morph:function(m,k){return this.destination=new n.Point(m,k),this}}}),n.extend(n.Element,{point:function(m,k){return new n.Point(m,k).transform(this.screenCTM().inverse())}}),n.extend(n.Element,{attr:function(m,k,N){if(m==null){for(m={},N=(k=this.node.attributes).length-1;N>=0;N--)m[k[N].nodeName]=n.regex.isNumber.test(k[N].nodeValue)?parseFloat(k[N].nodeValue):k[N].nodeValue;return m}if(o(m)==="object")for(var R in m)this.attr(R,m[R]);else if(k===null)this.node.removeAttribute(m);else{if(k==null)return(k=this.node.getAttribute(m))==null?n.defaults.attrs[m]:n.regex.isNumber.test(k)?parseFloat(k):k;m=="stroke-width"?this.attr("stroke",parseFloat(k)>0?this._stroke:null):m=="stroke"&&(this._stroke=k),m!="fill"&&m!="stroke"||(n.regex.isImage.test(k)&&(k=this.doc().defs().image(k,0,0)),k instanceof n.Image&&(k=this.doc().defs().pattern(0,0,function(){this.add(k)}))),typeof k=="number"?k=new n.Number(k):n.Color.isColor(k)?k=new n.Color(k):Array.isArray(k)&&(k=new n.Array(k)),m=="leading"?this.leading&&this.leading(k):typeof N=="string"?this.node.setAttributeNS(N,m,k.toString()):this.node.setAttribute(m,k.toString()),!this.rebuild||m!="font-size"&&m!="x"||this.rebuild(m,k)}return this}}),n.extend(n.Element,{transform:function(m,k){var N;return o(m)!=="object"?(N=new n.Matrix(this).extract(),typeof m=="string"?N[m]:N):(N=new n.Matrix(this),k=!!k||!!m.relative,m.a!=null&&(N=k?N.multiply(new n.Matrix(m)):new n.Matrix(m)),this.attr("transform",N))}}),n.extend(n.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(n.regex.transforms).slice(0,-1).map(function(m){var k=m.trim().split("(");return[k[0],k[1].split(n.regex.delimiter).map(function(N){return parseFloat(N)})]}).reduce(function(m,k){return k[0]=="matrix"?m.multiply(j(k[1])):m[k[0]].apply(m,k[1])},new n.Matrix)},toParent:function(m){if(this==m)return this;var k=this.screenCTM(),N=m.screenCTM().inverse();return this.addTo(m).untransform().transform(N.multiply(k)),this},toDoc:function(){return this.toParent(this.doc())}}),n.Transformation=n.invent({create:function(m,k){if(arguments.length>1&&typeof k!="boolean")return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(m))for(var N=0,R=this.arguments.length;N=0},index:function(m){return[].slice.call(this.node.childNodes).indexOf(m.node)},get:function(m){return n.adopt(this.node.childNodes[m])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(m,k){for(var N=this.children(),R=0,F=N.length;Ra.globals.gridHeight&&(x=a.globals.gridHeight),a.globals.isBarHorizontal||this.moveXCrosshairs(g),l.fixedTooltip||this.moveTooltip(g,x||a.globals.gridHeight)}}]),O}(),il=function(){function O(i){c(this,O),this.w=i.w,this.ttCtx=i,this.ctx=i.ctx,this.tooltipPosition=new rl(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}(),e5=function(){function O(i){c(this,O),this.w=i.w;var n=this.w;this.ttCtx=i,this.isVerticalGroupedRangeBar=!n.globals.isBarHorizontal&&n.config.chart.type==="rangeBar"&&n.config.plotOptions.bar.rangeBarGroupRows}return v(O,[{key:"getAttr",value:function(i,n){return parseFloat(i.target.getAttribute(n))}},{key:"handleHeatTreeTooltip",value:function(i){var n=i.e,a=i.opt,l=i.x,d=i.y,u=i.type,h=this.ttCtx,g=this.w;if(n.target.classList.contains("apexcharts-".concat(u,"-rect"))){var x=this.getAttr(n,"i"),y=this.getAttr(n,"j"),b=this.getAttr(n,"cx"),w=this.getAttr(n,"cy"),S=this.getAttr(n,"width"),j=this.getAttr(n,"height");if(h.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:x,j:y,shared:!1,e:n}),g.globals.capturedSeriesIndex=x,g.globals.capturedDataPointIndex=y,l=b+h.tooltipRect.ttWidth/2+S,d=w+h.tooltipRect.ttHeight/2-j/2,h.tooltipPosition.moveXCrosshairs(b+S/2),l>g.globals.gridWidth/2&&(l=b-h.tooltipRect.ttWidth/2+S),h.w.config.tooltip.followCursor){var E=g.globals.dom.elWrap.getBoundingClientRect();l=g.globals.clientX-E.left-(l>g.globals.gridWidth/2?h.tooltipRect.ttWidth:0),d=g.globals.clientY-E.top-(d>g.globals.gridHeight/2?h.tooltipRect.ttHeight:0)}}return{x:l,y:d}}},{key:"handleMarkerTooltip",value:function(i){var n,a,l=i.e,d=i.opt,u=i.x,h=i.y,g=this.w,x=this.ttCtx;if(l.target.classList.contains("apexcharts-marker")){var y=parseInt(d.paths.getAttribute("cx"),10),b=parseInt(d.paths.getAttribute("cy"),10),w=parseFloat(d.paths.getAttribute("val"));if(a=parseInt(d.paths.getAttribute("rel"),10),n=parseInt(d.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,x.intersect){var S=_.findAncestor(d.paths,"apexcharts-series");S&&(n=parseInt(S.getAttribute("data:realIndex"),10))}if(x.tooltipLabels.drawSeriesTexts({ttItems:d.ttItems,i:n,j:a,shared:!x.showOnIntersect&&g.config.tooltip.shared,e:l}),l.type==="mouseup"&&x.markerClick(l,n,a),g.globals.capturedSeriesIndex=n,g.globals.capturedDataPointIndex=a,u=y,h=b+g.globals.translateY-1.4*x.tooltipRect.ttHeight,x.w.config.tooltip.followCursor){var j=x.getElGrid().getBoundingClientRect();h=x.e.clientY+g.globals.translateY-j.top}w<0&&(h=b),x.marker.enlargeCurrentPoint(a,d.paths,u,h)}return{x:u,y:h}}},{key:"handleBarTooltip",value:function(i){var n,a,l=i.e,d=i.opt,u=this.w,h=this.ttCtx,g=h.getElTooltip(),x=0,y=0,b=0,w=this.getBarTooltipXY({e:l,opt:d});n=w.i;var S=w.barHeight,j=w.j;u.globals.capturedSeriesIndex=n,u.globals.capturedDataPointIndex=j,u.globals.isBarHorizontal&&h.tooltipUtil.hasBars()||!u.config.tooltip.shared?(y=w.x,b=w.y,a=Array.isArray(u.config.stroke.width)?u.config.stroke.width[n]:u.config.stroke.width,x=y):u.globals.comboCharts||u.config.tooltip.shared||(x/=2),isNaN(b)&&(b=u.globals.svgHeight-h.tooltipRect.ttHeight);var E=parseInt(d.paths.parentNode.getAttribute("data:realIndex"),10),T=u.globals.isMultipleYAxis?u.config.yaxis[E]&&u.config.yaxis[E].reversed:u.config.yaxis[0].reversed;if(y+h.tooltipRect.ttWidth>u.globals.gridWidth&&!T?y-=h.tooltipRect.ttWidth:y<0&&(y=0),h.w.config.tooltip.followCursor){var I=h.getElGrid().getBoundingClientRect();b=h.e.clientY-I.top}h.tooltip===null&&(h.tooltip=u.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),u.config.tooltip.shared||(u.globals.comboBarCount>0?h.tooltipPosition.moveXCrosshairs(x+a/2):h.tooltipPosition.moveXCrosshairs(x)),!h.fixedTooltip&&(!u.config.tooltip.shared||u.globals.isBarHorizontal&&h.tooltipUtil.hasBars())&&(T&&(y-=h.tooltipRect.ttWidth)<0&&(y=0),!T||u.globals.isBarHorizontal&&h.tooltipUtil.hasBars()||(b=b+S-2*(u.globals.series[n][j]<0?S:0)),b=b+u.globals.translateY-h.tooltipRect.ttHeight/2,g.style.left=y+u.globals.translateX+"px",g.style.top=b+"px")}},{key:"getBarTooltipXY",value:function(i){var n=this,a=i.e,l=i.opt,d=this.w,u=null,h=this.ttCtx,g=0,x=0,y=0,b=0,w=0,S=a.target.classList;if(S.contains("apexcharts-bar-area")||S.contains("apexcharts-candlestick-area")||S.contains("apexcharts-boxPlot-area")||S.contains("apexcharts-rangebar-area")){var j=a.target,E=j.getBoundingClientRect(),T=l.elGrid.getBoundingClientRect(),I=E.height;w=E.height;var D=E.width,m=parseInt(j.getAttribute("cx"),10),k=parseInt(j.getAttribute("cy"),10);b=parseFloat(j.getAttribute("barWidth"));var N=a.type==="touchmove"?a.touches[0].clientX:a.clientX;u=parseInt(j.getAttribute("j"),10),g=parseInt(j.parentNode.getAttribute("rel"),10)-1;var R=j.getAttribute("data-range-y1"),F=j.getAttribute("data-range-y2");d.globals.comboCharts&&(g=parseInt(j.parentNode.getAttribute("data:realIndex"),10));var $=function(U){return d.globals.isXNumeric?m-D/2:n.isVerticalGroupedRangeBar?m+D/2:m-h.dataPointsDividedWidth+D/2},Y=function(){return k-h.dataPointsDividedHeight+I/2-h.tooltipRect.ttHeight/2};h.tooltipLabels.drawSeriesTexts({ttItems:l.ttItems,i:g,j:u,y1:R?parseInt(R,10):null,y2: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=Y()):(x=$(),y=a.clientY-T.top-h.tooltipRect.ttHeight/2-15):d.globals.isBarHorizontal?((x=m)0&&a.setAttribute("width",n.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var i=this.w,n=this.ttCtx;n.ycrosshairs=i.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),n.ycrosshairsHidden=i.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(i,n,a){var l=this.ttCtx,d=this.w,u=d.globals.yLabelFormatters[i];if(l.yaxisTooltips[i]){var h=l.getElGrid().getBoundingClientRect(),g=(n-h.top)*a.yRatio[i],x=d.globals.maxYArr[i]-d.globals.minYArr[i],y=d.globals.minYArr[i]+(x-g);l.tooltipPosition.moveYCrosshairs(n-h.top),l.yaxisTooltipText[i].innerHTML=u(y),l.tooltipPosition.moveYAxisTooltip(i)}}}]),O}(),N1=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 el(this),this.tooltipLabels=new tl(this),this.tooltipPosition=new rl(this),this.marker=new il(this),this.intersect=new e5(this),this.axesTooltip=new t5(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 Hi(this.ctx);this.xAxisTicksPositions=l.getXAxisTicksPositions()}if(!n.globals.comboCharts&&!this.tConfig.intersect&&n.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),n.config.markers.size!==0&&n.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),n.globals.collapsedSeries.length!==n.globals.series.length){this.dataPointsDividedHeight=n.globals.gridHeight/n.globals.dataPoints,this.dataPointsDividedWidth=n.globals.gridWidth/n.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||n.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,a.appendChild(this.tooltipTitle));var d=n.globals.series.length;(n.globals.xyCharts||n.globals.comboCharts)&&this.tConfig.shared&&(d=this.showOnIntersect?1:n.globals.series.length),this.legendLabels=n.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(d),this.addSVGEvents()}}},{key:"createTTElements",value:function(i){for(var n=this,a=this.w,l=[],d=this.getElTooltip(),u=function(g){var x=document.createElement("div");x.classList.add("apexcharts-tooltip-series-group"),x.style.order=a.config.tooltip.inverseOrder?i-g:g+1,n.tConfig.shared&&n.tConfig.enabledOnSeries&&Array.isArray(n.tConfig.enabledOnSeries)&&n.tConfig.enabledOnSeries.indexOf(g)<0&&x.classList.add("apexcharts-tooltip-series-group-hidden");var y=document.createElement("span");y.classList.add("apexcharts-tooltip-marker"),y.style.backgroundColor=a.globals.colors[g],x.appendChild(y);var b=document.createElement("div");b.classList.add("apexcharts-tooltip-text"),b.style.fontFamily=n.tConfig.style.fontFamily||a.config.chart.fontFamily,b.style.fontSize=n.tConfig.style.fontSize,["y","goals","z"].forEach(function(w){var S=document.createElement("div");S.classList.add("apexcharts-tooltip-".concat(w,"-group"));var j=document.createElement("span");j.classList.add("apexcharts-tooltip-text-".concat(w,"-label")),S.appendChild(j);var E=document.createElement("span");E.classList.add("apexcharts-tooltip-text-".concat(w,"-value")),S.appendChild(E),b.appendChild(S)}),x.appendChild(b),d.appendChild(x),l.push(x)},h=0;h0&&this.addPathsEventListeners(j,b),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(b)}}},{key:"drawFixedTooltipRect",value:function(){var i=this.w,n=this.getElTooltip(),a=n.getBoundingClientRect(),l=a.width+10,d=a.height+10,u=this.tConfig.fixed.offsetX,h=this.tConfig.fixed.offsetY,g=this.tConfig.fixed.position.toLowerCase();return g.indexOf("right")>-1&&(u=u+i.globals.svgWidth-l+10),g.indexOf("bottom")>-1&&(h=h+i.globals.svgHeight-d-10),n.style.left=u+"px",n.style.top=h+"px",{x:u,y:h,ttWidth:l,ttHeight:d}}},{key:"addDatapointEventsListeners",value:function(i){var n=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(n,i)}},{key:"addPathsEventListeners",value:function(i,n){for(var a=this,l=function(u){var h={paths:i[u],tooltipEl:n.tooltipEl,tooltipY:n.tooltipY,tooltipX:n.tooltipX,elGrid:n.elGrid,hoverArea:n.hoverArea,ttItems:n.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(g){return i[u].addEventListener(g,a.onSeriesHover.bind(a,h),{capture:!1,passive:!0})})},d=0;d=100?this.seriesHover(i,n):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){a.seriesHover(i,n)},100-l))}},{key:"seriesHover",value:function(i,n){var a=this;this.lastHoverTime=Date.now();var l=[],d=this.w;d.config.chart.group&&(l=this.ctx.getGroupedCharts()),d.globals.axisCharts&&(d.globals.minX===-1/0&&d.globals.maxX===1/0||d.globals.dataPoints===0)||(l.length?l.forEach(function(u){var h=a.getElTooltip(u),g={paths:i.paths,tooltipEl:h,tooltipY:i.tooltipY,tooltipX:i.tooltipX,elGrid:i.elGrid,hoverArea:i.hoverArea,ttItems:u.w.globals.tooltip.ttItems};u.w.globals.minX===a.w.globals.minX&&u.w.globals.maxX===a.w.globals.maxX&&u.w.globals.tooltip.seriesHoverByContext({chartCtx:u,ttCtx:u.w.globals.tooltip,opt:g,e:n})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:i,e:n}))}},{key:"seriesHoverByContext",value:function(i){var n=i.chartCtx,a=i.ttCtx,l=i.opt,d=i.e,u=n.w,h=this.getElTooltip();h&&(a.tooltipRect={x:0,y:0,ttWidth:h.getBoundingClientRect().width,ttHeight:h.getBoundingClientRect().height},a.e=d,a.tooltipUtil.hasBars()&&!u.globals.comboCharts&&!a.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Me(n).toggleSeriesOnHover(d,d.target.parentNode),a.fixedTooltip&&a.drawFixedTooltipRect(),u.globals.axisCharts?a.axisChartsTooltips({e:d,opt:l,tooltipRect:a.tooltipRect}):a.nonAxisChartsTooltips({e:d,opt:l,tooltipRect:a.tooltipRect}))}},{key:"axisChartsTooltips",value:function(i){var n,a,l=i.e,d=i.opt,u=this.w,h=d.elGrid.getBoundingClientRect(),g=l.type==="touchmove"?l.touches[0].clientX:l.clientX,x=l.type==="touchmove"?l.touches[0].clientY:l.clientY;if(this.clientY=x,this.clientX=g,u.globals.capturedSeriesIndex=-1,u.globals.capturedDataPointIndex=-1,xh.top+h.height)this.handleMouseOut(d);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!u.config.tooltip.shared){var y=parseInt(d.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(y)<0)return void this.handleMouseOut(d)}var b=this.getElTooltip(),w=this.getElXCrosshairs(),S=u.globals.xyCharts||u.config.chart.type==="bar"&&!u.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||u.globals.comboCharts&&this.tooltipUtil.hasBars();if(l.type==="mousemove"||l.type==="touchmove"||l.type==="mouseup"){if(u.globals.collapsedSeries.length+u.globals.ancillaryCollapsedSeries.length===u.globals.series.length)return;w!==null&&w.classList.add("apexcharts-active");var j=this.yaxisTooltips.filter(function(I){return I===!0});if(this.ycrosshairs!==null&&j.length&&this.ycrosshairs.classList.add("apexcharts-active"),S&&!this.showOnIntersect)this.handleStickyTooltip(l,g,x,d);else if(u.config.chart.type==="heatmap"||u.config.chart.type==="treemap"){var E=this.intersect.handleHeatTreeTooltip({e:l,opt:d,x:n,y:a,type:u.config.chart.type});n=E.x,a=E.y,b.style.left=n+"px",b.style.top=a+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:l,opt:d}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:l,opt:d,x:n,y:a});if(this.yaxisTooltips.length)for(var T=0;Tx.width)this.handleMouseOut(l);else if(g!==null)this.handleStickyCapturedSeries(i,g,l,h);else if(this.tooltipUtil.isXoverlap(h)||d.globals.isBarHorizontal){var y=d.globals.series.findIndex(function(b,w){return!d.globals.collapsedSeriesIndices.includes(w)});this.create(i,this,y,h,l.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(i,n,a,l){var d=this.w;if(!this.tConfig.shared&&d.globals.series[n][l]===null)return void this.handleMouseOut(a);if(d.globals.series[n][l]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(l)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(i,this,n,l,a.ttItems):this.create(i,this,n,l,a.ttItems,!1);else if(this.tooltipUtil.isXoverlap(l)){var u=d.globals.series.findIndex(function(h,g){return!d.globals.collapsedSeriesIndices.includes(g)});this.create(i,this,u,l,a.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var i=this.w,n=new X(this.ctx),a=i.globals.dom.Paper.select(".apexcharts-bar-area"),l=0;l5&&arguments[5]!==void 0?arguments[5]:null,F=this.w,$=n;i.type==="mouseup"&&this.markerClick(i,a,l),R===null&&(R=this.tConfig.shared);var Y=this.tooltipUtil.hasMarkers(a),U=this.tooltipUtil.getElBars();if(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(U),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)),R&&(j=j+S.height/2-m/2-2);var Y=this.barCtx.series[d][u]<0,U=x;switch(this.barCtx.isReversed&&(U=x-w+(Y?2*w:0),x-=w),I.position){case"center":E=R?Y?U-w/2+N:U+w/2-N:Y?U-w/2+S.height/2+N:U+w/2+S.height/2-N;break;case"bottom":E=R?Y?U-w+N:U+w-N:Y?U-w+S.height+m+N:U+w-S.height/2+m-N;break;case"top":E=R?Y?U+N:U-N:Y?U-S.height/2-N:U+S.height+N}if(this.barCtx.lastActiveBarSerieIndex===h&&D.enabled){var te=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:h,j:u}),T.fontSize);n=Y?U-te.height/2-N-D.offsetY+18:U+te.height+N+D.offsetY-18,a=j+D.offsetX}return l.config.chart.stacked||(E<0?E=0+m:E+S.height/3>l.globals.gridHeight&&(E=l.globals.gridHeight-m)),{bcx:y,bcy:x,dataLabelsX:j,dataLabelsY:E,totalDataLabelsX:a,totalDataLabelsY:n,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(i){var n=this.w,a=i.x,l=i.i,d=i.j,u=i.realIndex,h=i.groupIndex,g=i.bcy,x=i.barHeight,y=i.barWidth,b=i.textRects,w=i.dataLabelsX,S=i.strokeWidth,j=i.dataLabelsConfig,E=i.barDataLabelsConfig,T=i.barTotalDataLabelsConfig,I=i.offX,D=i.offY,m=n.globals.gridHeight/n.globals.dataPoints;y=Math.abs(y);var k,N,R=(g+=h!==-1?h*x:0)-(this.barCtx.isRangeBar?0:m)+x/2+b.height/2+D-3,F="start",$=this.barCtx.series[l][d]<0,Y=a;switch(this.barCtx.isReversed&&(Y=a+y-($?2*y:0),a=n.globals.gridWidth-y),E.position){case"center":w=$?Y+y/2-I:Math.max(b.width/2,Y-y/2)+I;break;case"bottom":w=$?Y+y-S-Math.round(b.width/2)-I:Y-y+S+Math.round(b.width/2)+I;break;case"top":w=$?Y-S+Math.round(b.width/2)-I:Y-S-Math.round(b.width/2)+I}if(this.barCtx.lastActiveBarSerieIndex===u&&T.enabled){var U=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:u,j:d}),j.fontSize);$?(k=Y-S+Math.round(U.width/2)-I-T.offsetX-15,F="end"):k=Y-S-Math.round(U.width/2)+I+T.offsetX+15,N=R+T.offsetY}return n.config.chart.stacked||(w<0?w=w+b.width+S:w+b.width/2>n.globals.gridWidth&&(w=n.globals.gridWidth-b.width-S)),{bcx:a,bcy:g,dataLabelsX:w,dataLabelsY:R,totalDataLabelsX:k,totalDataLabelsY:N,totalDataLabelsAnchor: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),E=y.formatter,T=null,I=b.globals.collapsedSeriesIndices.indexOf(d)>-1;if(y.enabled&&!I){T=j.group({class:"apexcharts-data-labels",transform:w});var D="";l!==void 0&&(D=E(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}(),i5=function(){function O(i){c(this,O),this.w=i.w,this.barCtx=i}return v(O,[{key:"initVariables",value:function(i){var n=this.w;this.barCtx.series=i,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var a=0;a0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=i[a].length),n.globals.isXNumeric)for(var l=0;ln.globals.minX&&n.globals.seriesX[a][l]0&&(l=x.globals.minXDiff/w),(u=l/b*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(u=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(u=parseInt(this.barCtx.barOptions.columnWidth,10)),h=x.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?x.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),i=x.globals.padHorizontal+(l-u*this.barCtx.seriesLen)/2}return x.globals.barHeight=d,x.globals.barWidth=u,{x:i,y:n,yDivision:a,xDivision:l,barHeight:d,barWidth:u,zeroH:h,zeroW:g}}},{key:"initializeStackedPrevVars",value:function(i){var n=i.w;n.globals.hasSeriesGroups?n.globals.seriesGroups.forEach(function(a){i[a]||(i[a]={}),i[a].prevY=[],i[a].prevX=[],i[a].prevYF=[],i[a].prevXF=[],i[a].prevYVal=[],i[a].prevXVal=[]}):(i.prevY=[],i.prevX=[],i.prevYF=[],i.prevXF=[],i.prevYVal=[],i.prevXVal=[])}},{key:"initializeStackedXYVars",value:function(i){var n=i.w;n.globals.hasSeriesGroups?n.globals.seriesGroups.forEach(function(a){i[a]||(i[a]={}),i[a].xArrj=[],i[a].xArrjF=[],i[a].xArrjVal=[],i[a].yArrj=[],i[a].yArrjF=[],i[a].yArrjVal=[]}):(i.xArrj=[],i.xArrjF=[],i.xArrjVal=[],i.yArrj=[],i.yArrjF=[],i.yArrjVal=[])}},{key:"getPathFillColor",value:function(i,n,a,l){var d,u,h,g,x=this.w,y=new ze(this.barCtx.ctx),b=null,w=this.barCtx.barOptions.distributed?a:n;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(S){i[n][a]>=S.from&&i[n][a]<=S.to&&(b=S.color)}),x.config.series[n].data[a]&&x.config.series[n].data[a].fillColor&&(b=x.config.series[n].data[a].fillColor),y.fillPath({seriesNumber:this.barCtx.barOptions.distributed?w:l,dataPointIndex:a,color:b,value:i[n][a],fillConfig:(d=x.config.series[n].data[a])===null||d===void 0?void 0:d.fill,fillType:(u=x.config.series[n].data[a])!==null&&u!==void 0&&(h=u.fill)!==null&&h!==void 0&&h.type?(g=x.config.series[n].data[a])===null||g===void 0?void 0:g.fill.type:Array.isArray(x.config.fill.type)?x.config.fill.type[n]:x.config.fill.type})}},{key:"getStrokeWidth",value:function(i,n,a){var l=0,d=this.w;return this.barCtx.series[i][n]===void 0||this.barCtx.series[i][n]===null?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,d.config.stroke.show&&(this.barCtx.isNullValue||(l=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[a]:this.barCtx.strokeWidth)),l}},{key:"shouldApplyRadius",value:function(i){var n=this.w,a=!1;return n.config.plotOptions.bar.borderRadius>0&&(n.config.chart.stacked&&n.config.plotOptions.bar.borderRadiusWhenStacked==="last"?this.barCtx.lastActiveBarSerieIndex===i&&(a=!0):a=!0),a}},{key:"barBackground",value:function(i){var n=i.j,a=i.i,l=i.x1,d=i.x2,u=i.y1,h=i.y2,g=i.elSeries,x=this.w,y=new X(this.barCtx.ctx),b=new Me(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&b===a){n>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(n%=this.barCtx.barOptions.colors.backgroundBarColors.length);var w=this.barCtx.barOptions.colors.backgroundBarColors[n],S=y.drawRect(l!==void 0?l:0,u!==void 0?u:0,d!==void 0?d:x.globals.gridWidth,h!==void 0?h:x.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,w,this.barCtx.barOptions.colors.backgroundBarOpacity);g.add(S),S.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(i){var n,a=i.barWidth,l=i.barXPosition,d=i.y1,u=i.y2,h=i.strokeWidth,g=i.seriesGroup,x=i.realIndex,y=i.i,b=i.j,w=i.w,S=new X(this.barCtx.ctx);(h=Array.isArray(h)?h[x]:h)||(h=0);var j=a,E=l;(n=w.config.series[x].data[b])!==null&&n!==void 0&&n.columnWidthOffset&&(E=l-w.config.series[x].data[b].columnWidthOffset/2,j=a+w.config.series[x].data[b].columnWidthOffset);var T=E,I=E+j;d+=.001,u+=.001;var D=S.move(T,d),m=S.move(T,d),k=S.line(I-h,d);if(w.globals.previousPaths.length>0&&(m=this.barCtx.getPreviousPath(x,b,!1)),D=D+S.line(T,u)+S.line(I-h,u)+S.line(I-h,d)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),m=m+S.line(T,d)+k+k+k+k+k+S.line(T,d)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),this.shouldApplyRadius(x)&&(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,E=l;(n=w.config.series[x].data[b])!==null&&n!==void 0&&n.barHeightOffset&&(j=a-w.config.series[x].data[b].barHeightOffset/2,E=l+w.config.series[x].data[b].barHeightOffset);var T=j,I=j+E;d+=.001,u+=.001;var 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,I-h);if(D=D+S.line(u,T)+S.line(u,I-h)+k+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),m=m+S.line(d,T)+k+k+k+k+k+S.line(d,T)+(w.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z"),this.shouldApplyRadius(x)&&(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 _,E=S.move(h,w)+S.line(u,w)+S.line(x,b)+S.line(y,b)+S.line(h,w)+(d.config.plotOptions.bar.borderRadiusApplication==="around"?" Z":" z");return S.drawPath({d:E,fill:j.shadeColor(.5,_.rgb2hex(l)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadows"})}},{key:"getZeroValueEncounters",value:function(i){var n=i.i,a=i.j,l=this.w,d=0,u=0;return l.globals.seriesPercent.forEach(function(h,g){h[a]&&d++,gthis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var h=0,g=0;h0&&(this.visibleI=this.visibleI+1);var m=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=I),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed;var N=this.barHelpers.initialPositions();j=N.y,m=N.barHeight,y=N.yDivision,w=N.zeroW,S=N.x,k=N.barWidth,x=N.xDivision,b=N.zeroH,this.horizontal||T.push(S+k/2);var R=l.group({class:"apexcharts-datalabels","data:realIndex":I});a.globals.delayedElements.push({el:R.node}),R.node.classList.add("apexcharts-element-hidden");var 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 Y=0;Y0){var me=this.barHelpers.drawBarShadow({color:typeof ie=="string"&&(ie==null?void 0:ie.indexOf("url"))===-1?ie:_.hexToRgba(a.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:te});me&&$.add(me)}this.pathArr.push(te);var 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,Y>0&&T.push(S+k/2),E.push(j),this.renderSeries({realIndex:I,pathFill:ie,j:Y,i:h,pathFrom:te.pathFrom,pathTo:te.pathTo,strokeWidth:U,elSeries:D,x:S,y:j,series:i,barHeight:te.barHeight?te.barHeight:m,barWidth:te.barWidth?te.barWidth:k,elDataLabelsWrap:R,elGoalsMarkers:F,elBarShadows:$,visibleSeries:this.visibleI,type:"bar"})}a.globals.seriesXvalues[I]=T,a.globals.seriesYvalues[I]=E,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,E=i.y2,T=i.series,I=i.barHeight,D=i.barWidth,m=i.barXPosition,k=i.barYPosition,N=i.elDataLabelsWrap,R=i.elGoalsMarkers,F=i.elBarShadows,$=i.visibleSeries,Y=i.type,U=this.w,te=new X(this.ctx);l||(l=this.barOptions.distributed?U.globals.stroke.colors[d]:U.globals.stroke.colors[n]),U.config.series[u].data[d]&&U.config.series[u].data[d].strokeColor&&(l=U.config.series[u].data[d].strokeColor),this.isNullValue&&(a="none");var ne=d/U.config.chart.animations.animateGradually.delay*(U.config.chart.animations.speed/U.globals.dataPoints)/2.4,ie=te.renderPaths({i:u,j:d,realIndex:n,pathFrom:g,pathTo:x,stroke:l,strokeWidth:y,strokeLineCap:U.config.stroke.lineCap,fill:a,animationDelay:ne,initialSpeed:U.config.chart.animations.speed,dataChangeSpeed:U.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(Y,"-area")});ie.attr("clip-path","url(#gridRectMask".concat(U.globals.cuid,")"));var me=U.config.forecastDataPoints;me.count>0&&d>=U.globals.dataPoints-me.count&&(ie.node.setAttribute("stroke-dasharray",me.dashArray),ie.node.setAttribute("stroke-width",me.strokeWidth),ie.node.setAttribute("fill-opacity",me.fillOpacity)),j!==void 0&&E!==void 0&&(ie.attr("data-range-y1",j),ie.attr("data-range-y2",E)),new ee(this.ctx).setSelectionFilter(ie,n,d),b.add(ie);var we=new r5(this).handleBarDataLabels({x:w,y:S,y1:j,y2:E,i:u,j:d,series:T,realIndex:n,groupIndex:h,barHeight:I,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),R&&b.add(R),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,E=0;b.globals.seriesPercent.forEach(function(I,D){I[S]&&j++,D0&&(l=this.seriesLen*l/j),n=g+l*this.visibleI,n-=l*E}else n=g+l*this.visibleI;this.isFunnel&&(u-=(this.barHelpers.getXForValue(this.series[w][S],u)-u)/2),h=this.barHelpers.getXForValue(this.series[w][S],u);var T=this.barHelpers.getBarpaths({barYPosition:n,barHeight:l,x1:u,x2:h,strokeWidth:d,series:this.series,realIndex:a.realIndex,i:w,j:S,w:b});return b.globals.isXNumeric||(g+=x),this.barHelpers.barBackground({j:S,i:w,y1:n-l*this.visibleI,y2:l*this.seriesLen,elSeries:y}),{pathTo:T.pathTo,pathFrom:T.pathFrom,x1:u,x:h,y:g,goalX:this.barHelpers.getGoalValues("x",u,null,w,S),barYPosition:n,barHeight:l}}},{key:"drawColumnPaths",value:function(i){var n,a=i.indexes,l=i.x,d=i.y,u=i.xDivision,h=i.barWidth,g=i.zeroH,x=i.strokeWidth,y=i.elSeries,b=this.w,w=a.realIndex,S=a.i,j=a.j,E=a.bc;if(b.globals.isXNumeric){var T=this.getBarXForNumericXAxis({x:l,j,realIndex:w,barWidth:h});l=T.x,n=T.barXPosition}else if(b.config.plotOptions.bar.hideZeroBarsWhenGrouped){var I=this.barHelpers.getZeroValueEncounters({i:S,j}),D=I.nonZeroColumns,m=I.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:E,j,i:S,x1:n-x/2-h*this.visibleI,x2:h*this.seriesLen+x/2,elSeries:y}),{pathTo:k.pathTo,pathFrom:k.pathFrom,x:l,y:d,goalY:this.barHelpers.getGoalValues("y",null,g,S,j),barXPosition:n,barWidth:h}}},{key:"getBarXForNumericXAxis",value:function(i){var n=i.x,a=i.barWidth,l=i.realIndex,d=i.j,u=this.w,h=l;return u.globals.seriesX[l].length||(h=u.globals.maxValsInArrayIndex),u.globals.seriesX[h][d]&&(n=(u.globals.seriesX[h][d]-u.globals.minX)/this.xRatio-a*this.seriesLen/2),{barXPosition:n+a*this.visibleI,x:n}}},{key:"getPreviousPath",value:function(i,n){for(var a,l=this.w,d=0;d0&&parseInt(u.realIndex,10)===parseInt(i,10)&&l.globals.previousPaths[d].paths[n]!==void 0&&(a=l.globals.previousPaths[d].paths[n].d)}return a}}]),O}(),E1=function(O){A(n,fs);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l){var d=this,u=this.w;this.graphics=new X(this.ctx),this.bar=new fs(this.ctx,this.xyRatios);var h=new Q(this.ctx,u);a=h.getLogSeries(a),this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(a),u.config.chart.stackType==="100%"&&(a=u.globals.seriesPercent.slice()),this.series=a,this.barHelpers.initializeStackedPrevVars(this);for(var g=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),x=0,y=0,b=function(j,E){var T=void 0,I=void 0,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=[],R=[],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:_.escapeString(u.globals.seriesNames[F]),rel:j+1,"data:realIndex":F});d.ctx.series.addCollapsedClassToSeries($,F);var Y=d.graphics.group({class:"apexcharts-datalabels","data:realIndex":F}),U=d.graphics.group({class:"apexcharts-bar-goals-markers"}),te=0,ne=0,ie=d.initialPositions(x,y,T,I,D,m);y=ie.y,te=ie.barHeight,I=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,E=this.w,T=y+(b!==-1?b*u:0),I=d.i,D=d.j,m=0,k=0;k0){var R=g;this.groupCtx.prevXVal[N-1][D]<0?R=this.series[I][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&&(R=this.series[I][D]>=0?this.groupCtx.prevX[N-1][D]:this.groupCtx.prevX[N-1][D]-m+2*(this.isReversed?m:0)),l=R}else l=g;x=this.series[I][D]===null?l:l+this.series[I][D]/this.invertedYRatio-2*(this.isReversed?this.series[I][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:I,j:D,w:E});return this.barHelpers.barBackground({j:D,i:I,y1:T,y2:u,elSeries:j}),y+=S,{pathTo:F.pathTo,pathFrom:F.pathFrom,goalX:this.barHelpers.getGoalValues("x",g,null,I,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,E=l.j,T=l.bc;if(S.globals.isXNumeric){var I=S.globals.seriesX[j][E];I||(I=0),d=(I-S.globals.minX)/this.xRatio-g/2,S.globals.seriesGroups.length&&(d=(I-S.globals.minX)/this.xRatio-g/2*S.globals.seriesGroups.length)}for(var D,m=d+(y!==-1?y*g:0),k=0,N=0;N0&&!S.globals.isXNumeric||R>0&&S.globals.isXNumeric&&S.globals.seriesX[j-1][E]===S.globals.seriesX[j][E]){var F,$,Y,U=Math.min(this.yRatio.length+1,j+1);if(this.groupCtx.prevY[R-1]!==void 0&&this.groupCtx.prevY[R-1].length)for(var te=1;te=0?Y-k+2*(this.isReversed?k:0):Y;break}if(((we=this.groupCtx.prevYVal[R-ie])===null||we===void 0?void 0:we[E])>=0){$=this.series[j][E]>=0?Y:Y+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,R).every(function(Oe){return Oe.every(function(Ve){return isNaN(Ve)})})?x:$}else D=x;u=this.series[j][E]?D-this.series[j][E]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[j][E]/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:E,w:S});return this.barHelpers.barBackground({bc:T,j:E,i:j,x1:m,x2:g,elSeries:w}),d+=h,{pathTo:Pe.pathTo,pathFrom:Pe.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,x,j,E),barXPosition:m,x:S.globals.isXNumeric?d-h:d,y:u}}}]),n}(),Xd=function(O){A(n,fs);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l,d){var u=this,h=this.w,g=new X(this.ctx),x=h.globals.comboCharts?l:h.config.chart.type,y=new ze(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=h.config.plotOptions.bar.horizontal;var b=new Q(this.ctx,h);a=b.getLogSeries(a),this.series=a,this.yRatio=b.getLogYRatios(this.yRatio),this.barHelpers.initVariables(a);for(var w=g.group({class:"apexcharts-".concat(x,"-series apexcharts-plot-series")}),S=function(E){u.isBoxPlot=h.config.chart.type==="boxPlot"||h.config.series[E].type==="boxPlot";var T,I,D,m,k=void 0,N=void 0,R=[],F=[],$=h.globals.comboCharts?d[E]:E,Y=g.group({class:"apexcharts-series",seriesName:_.escapeString(h.globals.seriesNames[$]),rel:E+1,"data:realIndex":$});u.ctx.series.addCollapsedClassToSeries(Y,$),a[E].length>0&&(u.visibleI=u.visibleI+1);var U,te;u.yRatio.length>1&&(u.yaxisIndex=$);var ne=u.barHelpers.initialPositions();N=ne.y,U=ne.barHeight,I=ne.yDivision,m=ne.zeroW,k=ne.x,te=ne.barWidth,T=ne.xDivision,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(E,Pe,$),Ve=null,We={indexes:{i:E,j:Pe,realIndex:$},x:k,y:N,strokeWidth:Oe,elSeries:Y};Ve=u.isHorizontal?u.drawHorizontalBoxPaths(s(s({},We),{},{yDivision:I,barHeight:U,zeroW:m})):u.drawVerticalBoxPaths(s(s({},We),{},{xDivision:T,barWidth:te,zeroH:D})),N=Ve.y,k=Ve.x,Pe>0&&F.push(k+te/2),R.push(N),Ve.pathTo.forEach(function(tt,ot){var Zt=!u.isBoxPlot&&u.candlestickOptions.wick.useFillColor?Ve.color[ot]:h.globals.stroke.colors[E],Tt=y.fillPath({seriesNumber:$,dataPointIndex:Pe,color:Ve.color[ot],value:a[E][Pe]});u.renderSeries({realIndex:$,pathFill:Tt,lineFill:Zt,j:Pe,i:E,pathFrom:Ve.pathFrom,pathTo:tt,strokeWidth:Oe,elSeries:Y,x:k,y:N,series:a,barHeight:U,barWidth:te,elDataLabelsWrap:ie,visibleSeries:u.visibleI,type:h.config.chart.type})})},we=0;wek.c&&(j=!1);var F=Math.min(k.o,k.c),$=Math.max(k.o,k.c),Y=k.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[m][S]-y.globals.minX)/this.xRatio-h/2);var U=d+h*this.visibleI;this.series[w][S]===void 0||this.series[w][S]===null?(F=g,$=g):(F=g-F/D,$=g-$/D,N=g-k.h/D,R=g-k.l/D,Y=g-k.m/D);var te=b.move(U,g),ne=b.move(U+h/2,F);return y.globals.previousPaths.length>0&&(ne=this.getPreviousPath(m,S,!0)),te=this.isBoxPlot?[b.move(U,F)+b.line(U+h/2,F)+b.line(U+h/2,N)+b.line(U+h/4,N)+b.line(U+h-h/4,N)+b.line(U+h/2,N)+b.line(U+h/2,F)+b.line(U+h,F)+b.line(U+h,Y)+b.line(U,Y)+b.line(U,F+x/2),b.move(U,Y)+b.line(U+h,Y)+b.line(U+h,$)+b.line(U+h/2,$)+b.line(U+h/2,R)+b.line(U+h-h/4,R)+b.line(U+h/4,R)+b.line(U+h/2,R)+b.line(U+h/2,$)+b.line(U,$)+b.line(U,Y)+"z"]:[b.move(U,$)+b.line(U+h/2,$)+b.line(U+h/2,N)+b.line(U+h/2,$)+b.line(U+h,$)+b.line(U+h,F)+b.line(U+h/2,F)+b.line(U+h/2,R)+b.line(U+h/2,F)+b.line(U,F)+b.line(U,$-x/2)],ne+=b.move(U,F),y.globals.isXNumeric||(d+=u),{pathTo:te,pathFrom:ne,x:d,y:$,barXPosition:U,color:this.isBoxPlot?I:j?[E]:[T]}}},{key:"drawHorizontalBoxPaths",value:function(a){var l=a.indexes;a.x;var d=a.y,u=a.yDivision,h=a.barHeight,g=a.zeroW,x=a.strokeWidth,y=this.w,b=new X(this.ctx),w=l.i,S=l.j,j=this.boxOptions.colors.lower;this.isBoxPlot&&(j=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var E=this.invertedYRatio,T=l.realIndex,I=this.getOHLCValue(T,S),D=g,m=g,k=Math.min(I.o,I.c),N=Math.max(I.o,I.c),R=I.m;y.globals.isXNumeric&&(d=(y.globals.seriesX[T][S]-y.globals.minX)/this.invertedXRatio-h/2);var F=d+h*this.visibleI;this.series[w][S]===void 0||this.series[w][S]===null?(k=g,N=g):(k=g+k/E,N=g+N/E,D=g+I.h/E,m=g+I.l/E,R=g+I.m/E);var $=b.move(g,F),Y=b.move(k,F+h/2);return y.globals.previousPaths.length>0&&(Y=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(R,F+h)+b.line(R,F)+b.line(k+x/2,F),b.move(R,F)+b.line(R,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(R,F)+"z"],Y+=b.move(k,F),y.globals.isXNumeric||(d+=u),{pathTo:$,pathFrom:Y,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}(),L1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"checkColorRange",value:function(){var i=this.w,n=!1,a=i.config.plotOptions[i.config.chart.type];return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(function(l,d){l.from<=0&&(n=!0)}),n}},{key:"getShadeColor",value:function(i,n,a,l){var d=this.w,u=1,h=d.config.plotOptions[i].shadeIntensity,g=this.determineColor(i,n,a);d.globals.hasNegs||l?u=d.config.plotOptions[i].reverseNegativeShade?g.percent<0?g.percent/100*(1.25*h):(1-g.percent/100)*(1.25*h):g.percent<=0?1-(1+g.percent/100)*h:(1-g.percent/100)*h:(u=1-g.percent/100,i==="treemap"&&(u=(1-g.percent/100)*(1.25*h)));var x=g.color,y=new _;return d.config.plotOptions[i].enableShades&&(x=this.w.config.theme.mode==="dark"?_.hexToRgba(y.shadeColor(-1*u,g.color),d.config.fill.opacity):_.hexToRgba(y.shadeColor(u,g.color),d.config.fill.opacity)),{color:x,colorProps:g}}},{key:"determineColor",value:function(i,n,a){var l=this.w,d=l.globals.series[n][a],u=l.config.plotOptions[i],h=u.colorScale.inverse?a:n;u.distributed&&l.config.chart.type==="treemap"&&(h=a);var g=l.globals.colors[h],x=null,y=Math.min.apply(Math,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,E){if(d>=j.from&&d<=j.to){g=j.color,x=j.foreColor?j.foreColor:null,y=j.from,b=j.to;var T=Math.abs(b)+Math.abs(y);S=100*d/(T===0?T-1e-6:T)}}),{color:g,foreColor:x,percent:S}}},{key:"calculateDataLabels",value:function(i){var n=i.text,a=i.x,l=i.y,d=i.i,u=i.j,h=i.colorProps,g=i.fontSize,x=this.w.config.dataLabels,y=new X(this.ctx),b=new Be(this.ctx),w=null;if(x.enabled){w=y.group({class:"apexcharts-data-labels"});var S=x.offsetX,j=x.offsetY,E=a+S,T=l+parseFloat(x.style.fontSize)/3+j;b.plotDataLabelsText({x:E,y:T,text:n,i:d,j:u,color:h.foreColor,parent:w,fontSize:g,dataLabelsConfig:x})}return w}},{key:"addListeners",value:function(i){var n=new X(this.ctx);i.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this,i)),i.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this,i)),i.node.addEventListener("mousedown",n.pathMouseDown.bind(this,i))}}]),O}(),n5=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 L1(i),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return v(O,[{key:"draw",value:function(i){var n=this.w,a=new X(this.ctx),l=a.group({class:"apexcharts-heatmap"});l.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")"));var d=n.globals.gridWidth/n.globals.dataPoints,u=n.globals.gridHeight/n.globals.series.length,h=0,g=!1;this.negRange=this.helpers.checkColorRange();var x=i.slice();n.config.yaxis[0].reversed&&(g=!0,x.reverse());for(var y=g?0:x.length-1;g?y=0;g?y++:y--){var b=a.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:_.escapeString(n.globals.seriesNames[y]),rel:y+1,"data:realIndex":y});if(this.ctx.series.addCollapsedClassToSeries(b,y),n.config.chart.dropShadow.enabled){var w=n.config.chart.dropShadow;new ee(this.ctx).dropShadow(b,w,y)}for(var S=0,j=n.config.plotOptions.heatmap.shadeIntensity,E=0;E-1&&this.pieClicked(w),a.config.dataLabels.enabled){var N=m.x,R=m.y,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),E=a.centerY+u*Math.sin(b),T=_.polarToCartesian(a.centerX,a.centerY,a.donutSize,y),I=_.polarToCartesian(a.centerX,a.centerY,a.donutSize,g),D=d>180?1:0,m=["M",w,S,"A",u,u,0,D,1,j,E];return n=a.chartType==="donut"?[].concat(m,["L",T.x,T.y,"A",a.donutSize,a.donutSize,0,D,0,I.x,I.y,"L",w,S,"z"]).join(" "):a.chartType==="pie"||a.chartType==="polarArea"?[].concat(m,["L",a.centerX,a.centerY,"L",w,S]).join(" "):[].concat(m).join(" "),h.roundPathCorners(n,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(i){var n=this.w,a=new fa(this.ctx),l=new X(this.ctx),d=new P1(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}(),s5=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var n=this.w;this.graphics=new X(this.ctx),this.lineColorArr=n.globals.stroke.colors!==void 0?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight0&&(R=n.getPreviousPath(I));for(var 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&&(E=360-Math.abs(this.startAngle)-.1);var T=d.drawPath({d:"",stroke:S,strokeWidth:x*parseInt(w.strokeWidth,10)/100,fill:"none",strokeOpacity:w.opacity,classes:"apexcharts-radialbar-area"});if(w.dropShadow.enabled){var I=w.dropShadow;h.dropShadow(T,I)}b.add(T),T.attr("id","apexcharts-radialbarTrack-"+y),this.animatePaths(T,{centerX:a.centerX,centerY:a.centerY,endAngle:E,startAngle:j,size:a.size,i:y,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:l.globals.easing})}return u}},{key:"drawArcs",value:function(a){var l=this.w,d=new X(this.ctx),u=new ze(this.ctx),h=new ee(this.ctx),g=d.group(),x=this.getStrokeWidth(a);a.size=a.size-x/2;var y=l.config.plotOptions.radialBar.hollow.background,b=a.size-x*a.series.length-this.margin*a.series.length-x*parseInt(l.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,w=b-l.config.plotOptions.radialBar.hollow.margin;l.config.plotOptions.radialBar.hollow.image!==void 0&&(y=this.drawHollowImage(a,g,b,y));var S=this.drawHollow({size:w,centerX:a.centerX,centerY:a.centerY,fill:y||"transparent"});if(l.config.plotOptions.radialBar.hollow.dropShadow.enabled){var j=l.config.plotOptions.radialBar.hollow.dropShadow;h.dropShadow(S,j)}var E=1;!this.radialDataLabels.total.show&&l.globals.series.length>1&&(E=0);var T=null;this.radialDataLabels.show&&(T=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:b,centerX:a.centerX,centerY:a.centerY,opacity:E})),l.config.plotOptions.radialBar.hollow.position==="back"&&(g.add(S),T&&g.add(T));var I=!1;l.config.plotOptions.radialBar.inverseOrder&&(I=!0);for(var D=I?a.series.length-1:0;I?D>=0:D100?100:a.series[D])/100,$=Math.round(this.totalAngle*F)+this.startAngle,Y=void 0;l.globals.dataChanged&&(R=this.startAngle,Y=Math.round(this.totalAngle*_.negToZero(l.globals.previousPaths[D])/100)+R),Math.abs($)+Math.abs(N)>=360&&($-=.01),Math.abs(Y)+Math.abs(R)>=360&&(Y-=.01);var U=$-N,te=Array.isArray(l.config.stroke.dashArray)?l.config.stroke.dashArray[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":U,"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=_.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:Y,prevStartAngle:R,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=_.randomId(),y=h.config.plotOptions.radialBar.hollow.image;if(h.config.plotOptions.radialBar.hollow.imageClipped)g.clippedImgArea({width:d,height:d,image:y,patternID:"pattern".concat(h.globals.cuid).concat(x)}),u="url(#pattern".concat(h.globals.cuid).concat(x,")");else{var b=h.config.plotOptions.radialBar.hollow.imageWidth,w=h.config.plotOptions.radialBar.hollow.imageHeight;if(b===void 0&&w===void 0){var S=h.globals.dom.Paper.image(y).loaded(function(E){this.move(a.centerX-E.width/2+h.config.plotOptions.radialBar.hollow.imageOffsetX,a.centerY-E.height/2+h.config.plotOptions.radialBar.hollow.imageOffsetY)});l.add(S)}else{var j=h.globals.dom.Paper.image(y).loaded(function(E){this.move(a.centerX-b/2+h.config.plotOptions.radialBar.hollow.imageOffsetX,a.centerY-w/2+h.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(b,w)});l.add(j)}}return u}},{key:"getStrokeWidth",value:function(a){var l=this.w;return a.size*(100-parseInt(l.config.plotOptions.radialBar.hollow.size,10))/100/(a.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(a){var l=parseInt(a.target.getAttribute("rel"),10)-1,d=this.barLabels.onClick,u=this.w;d&&d(u.globals.seriesNames[l],{w:u,seriesIndex:l})}}]),n}(),o5=function(O){A(n,fs);var i=M(n);function n(){return c(this,n),i.apply(this,arguments)}return v(n,[{key:"draw",value:function(a,l){var d=this.w,u=new X(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=a,this.seriesRangeStart=d.globals.seriesRangeStart,this.seriesRangeEnd=d.globals.seriesRangeEnd,this.barHelpers.initVariables(a);for(var h=u.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),g=0;g0&&(this.visibleI=this.visibleI+1);var I=0,D=0;this.yRatio.length>1&&(this.yaxisIndex=E);var m=this.barHelpers.initialPositions();j=m.y,w=m.zeroW,S=m.x,D=m.barWidth,I=m.barHeight,x=m.xDivision,y=m.yDivision,b=m.zeroH;for(var k=u.group({class:"apexcharts-datalabels","data:realIndex":E}),N=u.group({class:"apexcharts-rangebar-goals-markers"}),R=0;R0});return this.isHorizontal?(u=E.config.plotOptions.bar.rangeBarGroupRows?g+w*k:g+y*this.visibleI+w*k,N>-1&&!E.config.plotOptions.bar.rangeBarOverlap&&(T=E.globals.seriesRange[l][N].overlaps).indexOf(I)>-1&&(u=(y=j.barHeight/T.length)*this.visibleI+w*(100-parseInt(this.barOptions.barHeight,10))/100/2+y*(this.visibleI+T.indexOf(I))+w*k)):(k>-1&&(h=E.config.plotOptions.bar.rangeBarGroupRows?x+S*k:x+b*this.visibleI+S*k),N>-1&&!E.config.plotOptions.bar.rangeBarOverlap&&(T=E.globals.seriesRange[l][N].overlaps).indexOf(I)>-1&&(h=(b=j.barWidth/T.length)*this.visibleI+S*(100-parseInt(this.barOptions.barWidth,10))/100/2+b*(this.visibleI+T.indexOf(I))+S*k)),{barYPosition:u,barXPosition:h,barHeight:y,barWidth:b}}},{key:"drawRangeColumnPaths",value:function(a){var l=a.indexes,d=a.x,u=a.xDivision,h=a.barWidth,g=a.barXPosition,x=a.zeroH,y=this.w,b=l.i,w=l.j,S=this.yRatio[this.yaxisIndex],j=l.realIndex,E=this.getRangeValue(j,w),T=Math.min(E.start,E.end),I=Math.max(E.start,E.end);this.series[b][w]===void 0||this.series[b][w]===null?T=x:(T=x-T/S,I=x-I/S);var D=Math.abs(I-T),m=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:h,y1:T,y2:I,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:l.realIndex,i:j,j:w,w:y});if(y.globals.isXNumeric){var k=this.getBarXForNumericXAxis({x:d,j:w,realIndex:j,barWidth:h});d=k.x,g=k.barXPosition}else d+=u;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:D,x:d,y:I,goalY:this.barHelpers.getGoalValues("y",null,x,b,w),barXPosition:g}}},{key:"drawRangeBarPaths",value:function(a){var l=a.indexes,d=a.y,u=a.y1,h=a.y2,g=a.yDivision,x=a.barHeight,y=a.barYPosition,b=a.zeroW,w=this.w,S=b+u/this.invertedYRatio,j=b+h/this.invertedYRatio,E=Math.abs(j-S),T=this.barHelpers.getBarpaths({barYPosition:y,barHeight:x,x1:S,x2:j,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:l.realIndex,realIndex:l.realIndex,j:l.j,w});return w.globals.isXNumeric||(d+=g),{pathTo:T.pathTo,pathFrom:T.pathFrom,barWidth:E,x:j,goalX:this.barHelpers.getGoalValues("x",b,null,l.realIndex,l.j),y:d}}},{key:"getRangeValue",value:function(a,l){var d=this.w;return{start:d.globals.seriesRangeStart[a][l],end:d.globals.seriesRangeEnd[a][l]}}}]),n}(),l5=function(){function O(i){c(this,O),this.w=i.w,this.lineCtx=i}return v(O,[{key:"sameValueSeriesFix",value:function(i,n){var a=this.w;if((a.config.fill.type==="gradient"||a.config.fill.type[i]==="gradient")&&new Q(this.lineCtx.ctx,a).seriesHaveSameValues(i)){var l=n[i].slice();l[l.length-1]=l[l.length-1]+1e-6,n[i]=l}return n}},{key:"calculatePoints",value:function(i){var n=i.series,a=i.realIndex,l=i.x,d=i.y,u=i.i,h=i.j,g=i.prevY,x=this.w,y=[],b=[];if(h===0){var w=this.lineCtx.categoryAxisCorrection+x.config.markers.offsetX;x.globals.isXNumeric&&(w=(x.globals.seriesX[a][0]-x.globals.minX)/this.lineCtx.xRatio+x.config.markers.offsetX),y.push(w),b.push(_.isNumber(n[u][0])?g+x.config.markers.offsetY:null),y.push(l+x.config.markers.offsetX),b.push(_.isNumber(n[u][h+1])?d+x.config.markers.offsetY:null)}else y.push(l+x.config.markers.offsetX),b.push(_.isNumber(n[u][h+1])?d+x.config.markers.offsetY:null);return{x:y,y:b}}},{key:"checkPreviousPaths",value:function(i){for(var n=i.pathFromLine,a=i.pathFromArea,l=i.realIndex,d=this.w,u=0;u0&&parseInt(h.realIndex,10)===parseInt(l,10)&&(h.type==="line"?(this.lineCtx.appendPathFrom=!1,n=d.globals.previousPaths[u].paths[0].d):h.type==="area"&&(this.lineCtx.appendPathFrom=!1,a=d.globals.previousPaths[u].paths[0].d,d.config.stroke.show&&d.globals.previousPaths[u].paths[1]&&(n=d.globals.previousPaths[u].paths[1].d)))}return{pathFromLine:n,pathFromArea:a}}},{key:"determineFirstPrevY",value:function(i){var n,a,l=i.i,d=i.series,u=i.prevY,h=i.lineYPosition,g=this.w,x=g.config.chart.stacked&&!g.globals.comboCharts||g.config.chart.stacked&&g.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[l])===null||n===void 0?void 0:n.type)==="bar");if(((a=d[l])===null||a===void 0?void 0:a[0])!==void 0)u=(h=x&&l>0?this.lineCtx.prevSeriesY[l-1][0]:this.lineCtx.zeroY)-d[l][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?d[l][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(x&&l>0&&d[l][0]===void 0){for(var y=l-1;y>=0;y--)if(d[y][0]!==null&&d[y][0]!==void 0){u=h=this.lineCtx.prevSeriesY[y][0];break}}return{prevY:u,lineYPosition:h}}}]),O}(),c5=function(O){for(var i,n,a,l,d=function(y){for(var b=[],w=y[0],S=y[1],j=b[0]=Ud(w,S),E=1,T=y.length-1;E9&&(l=3*a/Math.sqrt(l),d[g]=l*i,d[g+1]=l*n);for(var x=0;x<=u;x++)l=(O[Math.min(u,x+1)][0]-O[Math.max(0,x-1)][0])/(6*(1+d[x]*d[x])),h.push([l||0,d[x]*l||0]);return h},Yd=function(O){for(var i="",n=0;n4?(i+="C".concat(a[0],", ").concat(a[1]),i+=", ".concat(a[2],", ").concat(a[3]),i+=", ".concat(a[4],", ").concat(a[5])):l>2&&(i+="S".concat(a[0],", ").concat(a[1]),i+=", ".concat(a[2],", ").concat(a[3]))}return i},R1=function(O){var i=c5(O),n=O[1],a=O[0],l=[],d=i[1],u=i[0];l.push(a,[a[0]+u[0],a[1]+u[1],n[0]-d[0],n[1]-d[1],n[0],n[1]]);for(var h=2,g=i.length;h0&&(I=(u.globals.seriesX[S][0]-u.globals.minX)/this.xRatio),T.push(I);var D,m=I,k=void 0,N=m,R=this.zeroY,F=this.zeroY;R=this.lineHelpers.determineFirstPrevY({i:w,series:i,prevY:R,lineYPosition:0}).prevY,u.config.stroke.curve==="monotonCubic"&&i[w][0]===null?j.push(null):j.push(R),D=R,g==="rangeArea"&&(k=F=this.lineHelpers.determineFirstPrevY({i:w,series:l,prevY:F,lineYPosition:0}).prevY,E.push(F));var $={type:g,series:i,realIndex:S,i:w,x:I,y:1,pX:m,pY:D,pathsFrom:this._calculatePathsFrom({type:g,series:i,i:w,realIndex:S,prevX:N,prevY:R,prevY2:F}),linePaths:[],areaPaths:[],seriesIndex:a,lineYPosition:0,xArrj:T,yArrj:j,y2Arrj:E,seriesRangeEnd:l},Y=this._iterateOverDataPoints(s(s({},$),{},{iterations:g==="rangeArea"?i[w].length-1:void 0,isRangeStart:!0}));if(g==="rangeArea"){var U=this._calculatePathsFrom({series:l,i:w,realIndex:S,prevX:N,prevY:F}),te=this._iterateOverDataPoints(s(s({},$),{},{series:l,pY:k,pathsFrom:U,iterations:l[w].length-1,isRangeStart:!1}));Y.linePaths[0]=te.linePath+Y.linePath,Y.pathFromLine=te.pathFromLine+Y.pathFromLine}this._handlePaths({type:g,realIndex:S,i:w,paths:Y}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),b.push(this.elSeries)}if(((d=u.config.series[0])===null||d===void 0?void 0:d.zIndex)!==void 0&&b.sort(function(me,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:_.escapeString(l.globals.seriesNames[a])}),this.elPointsMain=d.group({class:"apexcharts-series-markers-wrap","data:realIndex":a}),this.elDataLabelsWrap=d.group({class:"apexcharts-datalabels","data:realIndex":a});var u=i[n].length===l.globals.dataPoints;this.elSeries.attr({"data:longestSeries":u,rel:n+1,"data:realIndex":a}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(i){var n,a,l,d,u=i.type,h=i.series,g=i.i,x=i.realIndex,y=i.prevX,b=i.prevY,w=i.prevY2,S=this.w,j=new X(this.ctx);if(h[g][0]===null){for(var E=0;E0){var T=this.lineHelpers.checkPreviousPaths({pathFromLine:l,pathFromArea:d,realIndex:x});l=T.pathFromLine,d=T.pathFromArea}return{prevX:y,prevY:b,linePath:n,areaPath:a,pathFromLine:l,pathFromArea:d}}},{key:"_handlePaths",value:function(i){var n=i.type,a=i.realIndex,l=i.i,d=i.paths,u=this.w,h=new X(this.ctx),g=new ze(this.ctx);this.prevSeriesY.push(d.yArrj),u.globals.seriesXvalues[a]=d.xArrj,u.globals.seriesYvalues[a]=d.yArrj;var x=u.config.forecastDataPoints;if(x.count>0&&n!=="rangeArea"){var y=u.globals.seriesXvalues[a][u.globals.seriesXvalues[a].length-x.count-1],b=h.drawRect(y,0,u.globals.gridWidth,u.globals.gridHeight,0);u.globals.dom.elForecastMask.appendChild(b.node);var w=h.drawRect(0,0,y,u.globals.gridHeight,0);u.globals.dom.elNonForecastMask.appendChild(w.node)}this.pointsChart||u.globals.delayedElements.push({el:this.elPointsMain.node,index:a});var S={i:l,realIndex:a,animationDelay:l,initialSpeed:u.config.chart.animations.speed,dataChangeSpeed:u.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(n)};if(n==="area")for(var j=g.fillPath({seriesNumber:a}),E=0;E0&&n!=="rangeArea"){var 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,")")),R.attr("clip-path","url(#nonForecastMask".concat(u.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(i){var n,a=this,l=i.type,d=i.series,u=i.iterations,h=i.realIndex,g=i.i,x=i.x,y=i.y,b=i.pX,w=i.pY,S=i.pathsFrom,j=i.linePaths,E=i.areaPaths,T=i.seriesIndex,I=i.lineYPosition,D=i.xArrj,m=i.yArrj,k=i.y2Arrj,N=i.isRangeStart,R=i.seriesRangeEnd,F=this.w,$=new X(this.ctx),Y=this.yRatio,U=S.prevY,te=S.linePath,ne=S.areaPath,ie=S.pathFromLine,me=S.pathFromArea,we=_.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(Or,mi){return mi-Or/Y[a.yaxisIndex]+2*(a.isReversed?Or/Y[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){mi--;break}return mi>=0?mi:0}(g-1)][We+1]:I=this.zeroY:I=this.zeroY,tt?y=Pe(we,I):(y=Pe(d[g][We+1],I),l==="rangeArea"&&(Oe=Pe(R[g][We+1],I))),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:U}),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:E,seriesIndex:T,isRangeStart:N});E=Tt.areaPaths,j=Tt.linePaths,b=Tt.pX,w=Tt.pY,ne=Tt.areaPath,te=Tt.linePath,!this.appendPathFrom||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:E,pathFromLine:ie,linePaths:j,linePath:te,areaPath:ne}}},{key:"_handleMarkersAndLabels",value:function(i){var n=i.type,a=i.pointsPos,l=i.isRangeStart,d=i.i,u=i.j,h=i.realIndex,g=this.w,x=new Be(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,u,{realIndex:h,pointsPos:a,zRatio:this.zRatio,elParent:this.elPointsMain});else{g.globals.series[d].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var y=this.markers.plotChartMarkers(a,h,u+1);y!==null&&this.elPointsMain.add(y)}var b=x.drawDataLabel({type:n,isRangeStart:l,pos:a,i:h,j:u+1});b!==null&&this.elDataLabelsWrap.add(b)}},{key:"_createPaths",value:function(i){var n=i.type,a=i.series,l=i.i,d=i.realIndex,u=i.j,h=i.x,g=i.y,x=i.xArrj,y=i.yArrj,b=i.y2,w=i.y2Arrj,S=i.pX,j=i.pY,E=i.linePath,T=i.areaPath,I=i.linePaths,D=i.areaPaths,m=i.seriesIndex,k=i.isRangeStart,N=this.w,R=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 Y=n==="rangeArea"?x.length===N.globals.dataPoints:u===a[l].length-2,U=x.map(function(Ve,We){return[x[We],y[We]]}).filter(function(Ve){return Ve[1]!==null});if(Y&&U.length>1){var te=R1(U);if(E+=Yd(te),a[l][0]===null?T=E:T+=Yd(te),n==="rangeArea"&&k){E+=R.line(x[x.length-1],w[w.length-1]);var ne=x.slice().reverse(),ie=w.slice().reverse(),me=ne.map(function(Ve,We){return[ne[We],ie[We]]}),we=R1(me);T=E+=Yd(we)}else T+=R.line(U[U.length-1][0],$)+R.line(U[0][0],$)+R.move(U[0][0],U[0][1])+"z";I.push(E),D.push(T)}}else if(F==="smooth"){var Pe=.35*(h-S);N.globals.hasNullValues?(a[l][u]!==null&&(a[l][u+1]!==null?(E=R.move(S,j)+R.curve(S+Pe,j,h-Pe,g,h+1,g),T=R.move(S+1,j)+R.curve(S+Pe,j,h-Pe,g,h+1,g)+R.line(h,$)+R.line(S,$)+"z"):(E=R.move(S,j),T=R.move(S,j)+"z")),I.push(E),D.push(T)):(E+=R.curve(S+Pe,j,h-Pe,g,h,g),T+=R.curve(S+Pe,j,h-Pe,g,h,g)),S=h,j=g,u===a[l].length-2&&(T=T+R.curve(S,j,h,g,h,$)+R.move(h,g)+"z",n==="rangeArea"&&k?E=E+R.curve(S,j,h,g,h,b)+R.move(h,b)+"z":N.globals.hasNullValues||(I.push(E),D.push(T)))}else{if(a[l][u+1]===null){E+=R.move(h,g);var Oe=N.globals.isXNumeric?(N.globals.seriesX[d][u]-N.globals.minX)/this.xRatio:h-this.xDivision;T=T+R.line(Oe,$)+R.move(h,g)+"z"}a[l][u]===null&&(E+=R.move(h,g),T+=R.move(h,$)),F==="stepline"?(E=E+R.line(h,null,"H")+R.line(null,g,"V"),T=T+R.line(h,null,"H")+R.line(null,g,"V")):F==="straight"&&(E+=R.line(h,g),T+=R.line(h,g)),u===a[l].length-2&&(T=T+R.line(h,$)+R.move(h,g)+"z",n==="rangeArea"&&k?E=E+R.line(h,b)+R.move(h,b)+"z":(I.push(E),D.push(T)))}return{linePaths:I,areaPaths:D,pX:S,pY:j,linePath:E,areaPath:T}}},{key:"handleNullDataPoints",value:function(i,n,a,l,d){var u=this.w;if(i[a][l]===null&&u.config.markers.showNullDataPoints||i[a].length===1){var h=this.markers.plotChartMarkers(n,d,l+1,this.strokeWidth-u.config.markers.strokeWidth/2,!0);h!==null&&this.elPointsMain.add(h)}}}]),O}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function O(h,g,x,y){this.xoffset=h,this.yoffset=g,this.height=y,this.width=x,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(b){var w,S=[],j=this.xoffset,E=this.yoffset,T=d(b)/this.height,I=d(b)/this.width;if(this.width>=this.height)for(w=0;w=this.height){var S=b/this.height,j=this.width-S;w=new O(this.xoffset+S,this.yoffset,j,this.height)}else{var E=b/this.width,T=this.height-E;w=new O(this.xoffset,this.yoffset+E,this.width,T)}return w}}function i(h,g,x,y,b){y=y===void 0?0:y,b=b===void 0?0:b;var w=n(function(S,j){var E,T=[],I=j/d(S);for(E=0;E=m}(g,w=h[0],b)?(g.push(w),n(h.slice(1),g,x,y)):(S=x.cutArea(d(g),y),y.push(x.getCoordinates(g)),n(h,[],S,y)),y;y.push(x.getCoordinates(g))}function a(h,g){var x=Math.min.apply(Math,h),y=Math.max.apply(Math,h),b=d(h);return Math.max(Math.pow(g,2)*y/Math.pow(b,2),Math.pow(b,2)/(Math.pow(g,2)*x))}function l(h){return h&&h.constructor===Array}function d(h){var g,x=0;for(g=0;gu-l&&x.width<=h-d){var y=g.rotateAroundCenter(i.node);i.node.setAttribute("transform","rotate(-90 ".concat(y.x," ").concat(y.y,") translate(").concat(x.height/3,")"))}}},{key:"truncateLabels",value:function(i,n,a,l,d,u){var h=new X(this.ctx),g=h.getTextRects(i,n).width+this.w.config.stroke.width+5>d-a&&u-l>d-a?u-l:d-a,x=h.getTextBasedOnMaxWidth({text:i,maxWidth:g,fontSize:n});return i.length!==x.length&&g/n<5?"":x}},{key:"animateTreemap",value:function(i,n,a,l){var d=new K(this.ctx);d.animateRect(i,{x:n.x,y:n.y,width:n.width,height:n.height},{x:a.x,y:a.y,width:a.width,height:a.height},l,function(){d.animationCompleted(i)})}}]),O}(),u5=86400,h5=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*u5),E=Math.floor(u),T=Math.floor(u/30),I=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:E,numberOfMonths:T,numberOfYears:I};switch(this.tickInterval){case"years":this.generateYearScale(m);break;case"months":case"half_year":this.generateMonthScale(m);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(m);break;case"hours":this.generateHourScale(m);break;case"minutes_fives":case"minutes":this.generateMinuteScale(m);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(m)}var k=this.timeScaleArray.map(function(N){var R={position:N.position,unit:N.unit,year:N.year,day:N.day?N.day:1,hour:N.hour?N.hour:0,month:N.month+1};return N.unit==="month"?s(s({},R),{},{day:1,value:N.value+1}):N.unit==="day"||N.unit==="hour"?s(s({},R),{},{value:N.value}):N.unit==="minute"?s(s({},R),{},{value:N.value,minute:N.value}):N.unit==="second"?s(s({},R),{},{value:N.value,minute:N.minute,second:N.second}):N});return k.filter(function(N){var R=1,F=Math.ceil(l.globals.gridWidth/120),$=N.value;l.config.xaxis.tickAmount!==void 0&&(F=l.config.xaxis.tickAmount),k.length>F&&(R=Math.floor(k.length/F));var Y=!1,U=!1;switch(a.tickInterval){case"years":N.unit==="year"&&(Y=!0);break;case"half_year":R=7,N.unit==="year"&&(Y=!0);break;case"months":R=1,N.unit==="year"&&(Y=!0);break;case"months_fortnight":R=15,N.unit!=="year"&&N.unit!=="month"||(Y=!0),$===30&&(U=!0);break;case"months_days":R=10,N.unit==="month"&&(Y=!0),$===30&&(U=!0);break;case"week_days":R=8,N.unit==="month"&&(Y=!0);break;case"days":R=1,N.unit==="month"&&(Y=!0);break;case"hours":N.unit==="day"&&(Y=!0);break;case"minutes_fives":case"seconds_fives":$%5!=0&&(U=!0);break;case"seconds_tens":$%10!=0&&(U=!0)}if(a.tickInterval==="hours"||a.tickInterval==="minutes_fives"||a.tickInterval==="seconds_tens"||a.tickInterval==="seconds_fives"){if(!U)return!0}else if(($%R==0||Y)&&!U)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(i,n){var a=this.w,l=this.formatDates(i),d=this.removeOverlappingTS(l);a.globals.timescaleLabels=d.slice(),new Pt(this.ctx).plotCoords()}},{key:"determineInterval",value:function(i){var n=24*i,a=60*n;switch(!0){case i/365>5:this.tickInterval="years";break;case i>800:this.tickInterval="half_year";break;case i>180:this.tickInterval="months";break;case i>90:this.tickInterval="months_fortnight";break;case i>60:this.tickInterval="months_days";break;case i>30:this.tickInterval="week_days";break;case i>2:this.tickInterval="days";break;case n>2.4:this.tickInterval="hours";break;case a>15:this.tickInterval="minutes_fives";break;case a>5:this.tickInterval="minutes";break;case a>1:this.tickInterval="seconds_tens";break;case 60*a>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(i){var n=i.firstVal,a=i.currentMonth,l=i.currentYear,d=i.daysWidthOnXAxis,u=i.numberOfYears,h=n.minYear,g=0,x=new Re(this.ctx),y="year";if(n.minDate>1||n.minMonth>0){var b=x.determineRemainingDaysOfYear(n.minYear,n.minMonth,n.minDate);g=(x.determineDaysOfYear(n.minYear)-b+1)*d,h=n.minYear+1,this.timeScaleArray.push({position:g,value:h,unit:y,year:h,month:_.monthMod(a+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:g,value:h,unit:y,year:l,month:_.monthMod(a+1)});for(var w=h,S=g,j=0;j1){x=(y.determineDaysOfMonths(l+1,n.minYear)-a+1)*u,g=_.monthMod(l+1);var S=d+w,j=_.monthMod(g),E=g;g===0&&(b="year",E=S,j=1,S+=w+=1),this.timeScaleArray.push({position:x,value:E,unit:b,year:S,month:j})}else this.timeScaleArray.push({position:x,value:g,unit:b,year:d,month:_.monthMod(l)});for(var T=g+1,I=x,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=_.monthMod(n.minMonth),g="month",y=n.minDate):n.minDate!==1&&n.minHour===0&&n.minMinute===0&&(w=0,x=n.minDate,S=x,j=b(y=x,a,l)),this.timeScaleArray.push({position:w,value:S,unit:g,year:this._getYear(l,j,0),month:_.monthMod(j),day:y});for(var E=w,T=0;Tg.determineDaysOfMonths(F+1,d)&&(T=1,F+=1),{month:F,date:T}},b=function(R,F){return R>g.determineDaysOfMonths(F+1,d)?F+=1:F},w=60-(n.minMinute+n.minSecond/60),S=w*u,j=n.minHour+1,E=j;w===60&&(S=0,E=j=n.minHour);var T=a;E>=24&&(E=0,T+=1,x="day");var I=y(T,l).month;I=b(T,I),this.timeScaleArray.push({position:S,value:j,unit:x,day:T,hour:E,year:d,month:_.monthMod(I)}),E++;for(var D=S,m=0;m=24&&(E=0,x="day",I=y(T+=1,I).month,I=b(T,I));var k=this._getYear(d,I,0);D=60*u+D;var N=E===0?T:E;this.timeScaleArray.push({position:D,value:N,unit:x,hour:E,day:T,year:k,month:_.monthMod(I)}),E++}}},{key:"generateMinuteScale",value:function(i){for(var n=i.currentMillisecond,a=i.currentSecond,l=i.currentMinute,d=i.currentHour,u=i.currentDate,h=i.currentMonth,g=i.currentYear,x=i.minutesWidthOnXAxis,y=i.secondsWidthOnXAxis,b=i.numberOfMinutes,w=l+1,S=u,j=h,E=g,T=d,I=(60-a-n/1e3)*y,D=0;D=60&&(w=0,(T+=1)===24&&(T=0)),this.timeScaleArray.push({position:I,value:w,unit:"minute",hour:T,minute:w,day:S,year:this._getYear(E,j,0),month:_.monthMod(j)}),I+=x,w++}},{key:"generateSecondScale",value:function(i){for(var n=i.currentMillisecond,a=i.currentSecond,l=i.currentMinute,d=i.currentHour,u=i.currentDate,h=i.currentMonth,g=i.currentYear,x=i.secondsWidthOnXAxis,y=i.numberOfSeconds,b=a+1,w=l,S=u,j=h,E=g,T=d,I=(1e3-n)/1e3*x,D=0;D=60&&(b=0,++w>=60&&(w=0,++T===24&&(T=0))),this.timeScaleArray.push({position:I,value:b,unit:"second",hour:T,minute:w,second:b,day:S,year:this._getYear(E,j,0),month:_.monthMod(j)}),I+=x,b++}},{key:"createRawDateString",value:function(i,n){var a=i.year;return i.month===0&&(i.month=1),a+="-"+("0"+i.month.toString()).slice(-2),i.unit==="day"?a+=i.unit==="day"?"-"+("0"+n).slice(-2):"-01":a+="-"+("0"+(i.day?i.day:"1")).slice(-2),i.unit==="hour"?a+=i.unit==="hour"?"T"+("0"+n).slice(-2):"T00":a+="T"+("0"+(i.hour?i.hour:"0")).slice(-2),i.unit==="minute"?a+=":"+("0"+n).slice(-2):a+=":"+(i.minute?("0"+i.minute).slice(-2):"00"),i.unit==="second"?a+=":"+("0"+n).slice(-2):a+=":00",this.utc&&(a+=".000Z"),a}},{key:"formatDates",value:function(i){var n=this,a=this.w;return i.map(function(l){var d=l.value.toString(),u=new Re(n.ctx),h=n.createRawDateString(l,d),g=u.getDate(u.parseDate(h));if(n.utc||(g=u.getDate(u.parseDateWithTimezone(h))),a.config.xaxis.labels.format===void 0){var x="dd MMM",y=a.config.xaxis.labels.datetimeFormatter;l.unit==="year"&&(x=y.year),l.unit==="month"&&(x=y.month),l.unit==="day"&&(x=y.day),l.unit==="hour"&&(x=y.hour),l.unit==="minute"&&(x=y.minute),l.unit==="second"&&(x=y.second),d=u.formatDate(g,x)}else d=u.formatDate(g,a.config.xaxis.labels.format);return{dateString:h,position:l.position,value:d,unit:l.unit,year:l.year,month:l.month}})}},{key:"removeOverlappingTS",value:function(i){var n,a=this,l=new X(this.ctx),d=!1;i.length>0&&i[0].value&&i.every(function(g){return g.value.length===i[0].value.length})&&(d=!0,n=l.getTextRects(i[0].value).width);var u=0,h=i.map(function(g,x){if(x>0&&a.w.config.xaxis.labels.hideOverlappingLabels){var y=d?n:l.getTextRects(i[u].value).width,b=i[u].position;return g.position>b+y+10?(u=x,g):null}return g});return h=h.filter(function(g){return g!==null})}},{key:"_getYear",value:function(i,n,a){return i+Math.floor(n/12)+a}}]),O}(),f5=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 Y=0;i[$].type!==void 0?(i[$].type==="column"||i[$].type==="bar"?(d.series.length>1&&l.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),y.series.push(F),y.i.push($),Y++,a.globals.columnSeries=y.series):i[$].type==="area"?(h.series.push(F),h.i.push($),Y++):i[$].type==="line"?(u.series.push(F),u.i.push($),Y++):i[$].type==="scatter"?(g.series.push(F),g.i.push($)):i[$].type==="bubble"?(x.series.push(F),x.i.push($),Y++):i[$].type==="candlestick"?(b.series.push(F),b.i.push($),Y++):i[$].type==="boxPlot"?(w.series.push(F),w.i.push($),Y++):i[$].type==="rangeBar"?(S.series.push(F),S.i.push($),Y++):i[$].type==="rangeArea"?(j.series.push(d.seriesRangeStart[$]),j.seriesRangeEnd.push(d.seriesRangeEnd[$]),j.i.push($),Y++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble/candlestick/boxPlot/rangeBar/rangeArea"),Y>1&&(d.comboCharts=!0)):(u.series.push(F),u.i.push($))});var E=new Gd(this.ctx,n),T=new Xd(this.ctx,n);this.ctx.pie=new T1(this.ctx);var I=new a5(this.ctx);this.ctx.rangeBar=new o5(this.ctx,n);var D=new s5(this.ctx),m=[];if(d.comboCharts){if(h.series.length>0&&m.push(E.draw(h.series,"area",h.i)),y.series.length>0)if(a.config.chart.stacked){var k=new E1(this.ctx,n);m.push(k.draw(y.series,y.i))}else this.ctx.bar=new fs(this.ctx,n),m.push(this.ctx.bar.draw(y.series,y.i));if(j.series.length>0&&m.push(E.draw(j.series,"rangeArea",j.i,j.seriesRangeEnd)),u.series.length>0&&m.push(E.draw(u.series,"line",u.i)),b.series.length>0&&m.push(T.draw(b.series,"candlestick",b.i)),w.series.length>0&&m.push(T.draw(w.series,"boxPlot",w.i)),S.series.length>0&&m.push(this.ctx.rangeBar.draw(S.series,S.i)),g.series.length>0){var N=new Gd(this.ctx,n,!0);m.push(N.draw(g.series,"scatter",g.i))}if(x.series.length>0){var R=new Gd(this.ctx,n,!0);m.push(R.draw(x.series,"bubble",x.i))}}else switch(l.chart.type){case"line":m=E.draw(d.series,"line");break;case"area":m=E.draw(d.series,"area");break;case"bar":l.chart.stacked?m=new E1(this.ctx,n).draw(d.series):(this.ctx.bar=new fs(this.ctx,n),m=this.ctx.bar.draw(d.series));break;case"candlestick":m=new Xd(this.ctx,n).draw(d.series,"candlestick");break;case"boxPlot":m=new Xd(this.ctx,n).draw(d.series,l.chart.type);break;case"rangeBar":m=this.ctx.rangeBar.draw(d.series);break;case"rangeArea":m=E.draw(d.seriesRangeStart,"rangeArea",void 0,d.seriesRangeEnd);break;case"heatmap":m=new n5(this.ctx,n).draw(d.series);break;case"treemap":m=new d5(this.ctx,n).draw(d.series);break;case"pie":case"donut":case"polarArea":m=this.ctx.pie.draw(d.series);break;case"radialBar":m=I.draw(d.series);break;case"radar":m=D.draw(d.series);break;default:m=E.draw(d.series)}return m}},{key:"setSVGDimensions",value:function(){var i=this.w.globals,n=this.w.config;i.svgWidth=n.chart.width,i.svgHeight=n.chart.height;var a=_.getDimensions(this.el),l=n.chart.width.toString().split(/[0-9]+/g).pop();l==="%"?_.isNumber(a[0])&&(a[0].width===0&&(a=_.getDimensions(this.el.parentNode)),i.svgWidth=a[0]*parseInt(n.chart.width,10)/100):l!=="px"&&l!==""||(i.svgWidth=parseInt(n.chart.width,10));var d=n.chart.height.toString().split(/[0-9]+/g).pop();if(i.svgHeight!=="auto"&&i.svgHeight!=="")if(d==="%"){var u=_.getDimensions(this.el.parentNode);i.svgHeight=u[1]*parseInt(n.chart.height,10)/100}else i.svgHeight=parseInt(n.chart.height,10);else i.axisCharts?i.svgHeight=i.svgWidth/1.61:i.svgHeight=i.svgWidth/1.2;if(i.svgWidth<0&&(i.svgWidth=0),i.svgHeight<0&&(i.svgHeight=0),X.setAttrs(i.dom.Paper.node,{width:i.svgWidth,height:i.svgHeight}),d!=="%"){var h=n.chart.sparkline.enabled?0:i.axisCharts?n.chart.parentHeightOffset:0;i.dom.Paper.node.parentNode.parentNode.style.minHeight=i.svgHeight+h+"px"}i.dom.elWrap.style.width=i.svgWidth+"px",i.dom.elWrap.style.height=i.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var i=this.w.globals,n=i.translateY,a={transform:"translate("+i.translateX+", "+n+")"};X.setAttrs(i.dom.elGraphical.node,a)}},{key:"resizeNonAxisCharts",value:function(){var i=this.w,n=i.globals,a=0,l=i.config.chart.sparkline.enabled?1:15;l+=i.config.grid.padding.bottom,i.config.legend.position!=="top"&&i.config.legend.position!=="bottom"||!i.config.legend.show||i.config.legend.floating||(a=new Jo(this.ctx).legendHelpers.getLegendBBox().clwh+10);var d=i.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),u=2.05*i.globals.radialSize;if(d&&!i.config.chart.sparkline.enabled&&i.config.plotOptions.radialBar.startAngle!==0){var h=_.getBoundingClientRect(d);u=h.bottom;var g=h.bottom-h.top;u=Math.max(2.05*i.globals.radialSize,g)}var x=u+n.translateY+a+l;n.dom.elLegendForeign&&n.dom.elLegendForeign.setAttribute("height",x),i.config.chart.height&&String(i.config.chart.height).indexOf("%")>0||(n.dom.elWrap.style.height=x+"px",X.setAttrs(n.dom.Paper.node,{height:x}),n.dom.Paper.node.parentNode.parentNode.style.minHeight=x+"px")}},{key:"coreCalculations",value:function(){new us(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 h5(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}(),p5=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"_updateOptions",value:function(i){var n=this,a=arguments.length>1&&arguments[1]!==void 0&&arguments[1],l=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],d=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],u=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(h){var g=[n.ctx];d&&(g=n.ctx.getSyncedCharts()),n.ctx.w.globals.isExecCalled&&(g=[n.ctx],n.ctx.w.globals.isExecCalled=!1),g.forEach(function(x,y){var b=x.w;if(b.globals.shouldAnimate=l,a||(b.globals.resized=!0,b.globals.dataChanged=!0,l&&x.series.getPreviousPaths()),i&&o(i)==="object"&&(x.config=new oe(i),i=Q.extendArrayProps(x.config,i,b),x.w.globals.chartID!==n.ctx.w.globals.chartID&&delete i.series,b.config=_.extend(b.config,i),u&&(b.globals.lastXAxis=i.xaxis?_.clone(i.xaxis):[],b.globals.lastYAxis=i.yaxis?_.clone(i.yaxis):[],b.globals.initialConfig=_.extend({},b.config),b.globals.initialSeries=_.clone(b.config.series),i.series))){for(var w=0;w2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(d){var u,h=a.w;return h.globals.shouldAnimate=n,h.globals.dataChanged=!0,n&&a.ctx.series.getPreviousPaths(),h.globals.axisCharts?((u=i.map(function(g,x){return a._extendSeries(g,x)})).length===0&&(u=[{data:[]}]),h.config.series=u):h.config.series=i.slice(),l&&(h.globals.initialConfig.series=_.clone(h.config.series),h.globals.initialSeries=_.clone(h.config.series)),a.ctx.update().then(function(){d(a.ctx)})})}},{key:"_extendSeries",value:function(i,n){var a=this.w,l=a.config.series[n];return s(s({},a.config.series[n]),{},{name:i.name?i.name:l==null?void 0:l.name,color:i.color?i.color:l==null?void 0:l.color,type:i.type?i.type:l==null?void 0:l.type,group:i.group?i.group:l==null?void 0:l.group,data:i.data?i.data:l==null?void 0:l.data,zIndex:i.zIndex!==void 0?i.zIndex:n})}},{key:"toggleDataPointSelection",value:function(i,n){var a=this.w,l=null,d=".apexcharts-series[data\\:realIndex='".concat(i,"']");return a.globals.axisCharts?l=a.globals.dom.Paper.select("".concat(d," path[j='").concat(n,"'], ").concat(d," circle[j='").concat(n,"'], ").concat(d," rect[j='").concat(n,"']")).members[0]:n===void 0&&(l=a.globals.dom.Paper.select("".concat(d," path[j='").concat(i,"']")).members[0],a.config.chart.type!=="pie"&&a.config.chart.type!=="polarArea"&&a.config.chart.type!=="donut"||this.ctx.pie.pieClicked(i)),l?(new X(this.ctx).pathMouseDown(l,null),l.node?l.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(i){var n=this.w;if(["min","max"].forEach(function(l){i.xaxis[l]!==void 0&&(n.config.xaxis[l]=i.xaxis[l],n.globals.lastXAxis[l]=i.xaxis[l])}),i.xaxis.categories&&i.xaxis.categories.length&&(n.config.xaxis.categories=i.xaxis.categories),n.config.xaxis.convertedCatToNumeric){var a=new 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}();Tn=typeof window<"u"?window:void 0,nl=function(O,i){var n=(this!==void 0?this:O).SVG=function(m){if(n.supported)return m=new n.Doc(m),n.parser.draw||n.prepare(),m};if(n.ns="http://www.w3.org/2000/svg",n.xmlns="http://www.w3.org/2000/xmlns/",n.xlink="http://www.w3.org/1999/xlink",n.svgjs="http://svgjs.dev",n.supported=!0,!n.supported)return!1;n.did=1e3,n.eid=function(m){return"Svgjs"+y(m)+n.did++},n.create=function(m){var k=i.createElementNS(this.ns,m);return k.setAttribute("id",this.eid(m)),k},n.extend=function(){var m,k;k=(m=[].slice.call(arguments)).pop();for(var N=m.length-1;N>=0;N--)if(m[N])for(var R in k)m[N].prototype[R]=k[R];n.Set&&n.Set.inherit&&n.Set.inherit()},n.invent=function(m){var k=typeof m.create=="function"?m.create:function(){this.constructor.call(this,n.create(m.create))};return m.inherit&&(k.prototype=new m.inherit),m.extend&&n.extend(k,m.extend),m.construct&&n.extend(m.parent||n.Container,m.construct),k},n.adopt=function(m){return m?m.instance?m.instance:((k=m.nodeName=="svg"?m.parentNode instanceof O.SVGElement?new n.Nested:new n.Doc:m.nodeName=="linearGradient"?new n.Gradient("linear"):m.nodeName=="radialGradient"?new n.Gradient("radial"):n[y(m.nodeName)]?new n[y(m.nodeName)]:new n.Element(m)).type=m.nodeName,k.node=m,m.instance=k,k instanceof n.Doc&&k.namespace().defs(),k.setData(JSON.parse(m.getAttribute("svgjs:data"))||{}),k):null;var k},n.prepare=function(){var m=i.getElementsByTagName("body")[0],k=(m?new n.Doc(m):n.adopt(i.documentElement).nested()).size(2,0);n.parser={body:m||i.documentElement,draw:k.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:k.polyline().node,path:k.path().node,native:n.create("svg")}},n.parser={native:n.create("svg")},i.addEventListener("DOMContentLoaded",function(){n.parser.draw||n.prepare()},!1),n.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},n.utils={map:function(m,k){for(var N=m.length,R=[],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;dY);return R},bbox:function(){return n.parser.draw||n.prepare(),n.parser.path.setAttribute("d",this.toString()),n.parser.path.getBBox()}}),n.Number=n.invent({create:function(m,k){this.value=0,this.unit=k||"",typeof m=="number"?this.value=isNaN(m)?0:isFinite(m)?m:m<0?-34e37:34e37:typeof m=="string"?(k=m.match(n.regex.numberAndUnit))&&(this.value=parseFloat(k[1]),k[5]=="%"?this.value/=100:k[5]=="s"&&(this.value*=1e3),this.unit=k[5]):m instanceof n.Number&&(this.value=m.valueOf(),this.unit=m.unit)},extend:{toString:function(){return(this.unit=="%"?~~(1e8*this.value)/1e6:this.unit=="s"?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(m){return m=new n.Number(m),new n.Number(this+m,this.unit||m.unit)},minus:function(m){return m=new n.Number(m),new n.Number(this-m,this.unit||m.unit)},times:function(m){return m=new n.Number(m),new n.Number(this*m,this.unit||m.unit)},divide:function(m){return m=new n.Number(m),new n.Number(this/m,this.unit||m.unit)},to:function(m){var k=new n.Number(this);return typeof m=="string"&&(k.unit=m),k},morph:function(m){return this.destination=new n.Number(m),m.relative&&(this.destination.value+=this.value),this},at:function(m){return this.destination?new n.Number(this.destination).minus(this).times(m).plus(this):this}}}),n.Element=n.invent({create:function(m){this._stroke=n.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=m)&&(this.type=m.nodeName,this.node.instance=this,this._stroke=m.getAttribute("stroke")||this._stroke)},extend:{x:function(m){return this.attr("x",m)},y:function(m){return this.attr("y",m)},cx:function(m){return m==null?this.x()+this.width()/2:this.x(m-this.width()/2)},cy:function(m){return m==null?this.y()+this.height()/2:this.y(m-this.height()/2)},move:function(m,k){return this.x(m).y(k)},center:function(m,k){return this.cx(m).cy(k)},width:function(m){return this.attr("width",m)},height:function(m){return this.attr("height",m)},size:function(m,k){var N=w(this,m,k);return this.width(new n.Number(N.width)).height(new n.Number(N.height))},clone:function(m){this.writeDataToDom();var k=E(this.node.cloneNode(!0));return m?m.add(k):this.after(k),k},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(m){return this.after(m).remove(),m},addTo:function(m){return m.put(this)},putIn:function(m){return m.add(this)},id:function(m){return this.attr("id",m)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return this.style("display")!="none"},toString:function(){return this.attr("id")},classes:function(){var m=this.attr("class");return m==null?[]:m.trim().split(n.regex.delimiter)},hasClass:function(m){return this.classes().indexOf(m)!=-1},addClass:function(m){if(!this.hasClass(m)){var k=this.classes();k.push(m),this.attr("class",k.join(" "))}return this},removeClass:function(m){return this.hasClass(m)&&this.attr("class",this.classes().filter(function(k){return k!=m}).join(" ")),this},toggleClass:function(m){return this.hasClass(m)?this.removeClass(m):this.addClass(m)},reference:function(m){return n.get(this.attr(m))},parent:function(m){var k=this;if(!k.node.parentNode)return null;if(k=n.adopt(k.node.parentNode),!m)return k;for(;k&&k.node instanceof O.SVGElement;){if(typeof m=="string"?k.matches(m):k instanceof m)return k;if(!k.node.parentNode||k.node.parentNode.nodeName=="#document")return null;k=n.adopt(k.node.parentNode)}},doc:function(){return this instanceof n.Doc?this:this.parent(n.Doc)},parents:function(m){var k=[],N=this;do{if(!(N=N.parent(m))||!N.node)break;k.push(N)}while(N.parent);return k},matches:function(m){return function(k,N){return(k.matches||k.matchesSelector||k.msMatchesSelector||k.mozMatchesSelector||k.webkitMatchesSelector||k.oMatchesSelector).call(k,N)}(this.node,m)},native:function(){return this.node},svg:function(m){var k=i.createElement("svg");if(!(m&&this instanceof n.Parent))return k.appendChild(m=i.createElement("svg")),this.writeDataToDom(),m.appendChild(this.node.cloneNode(!0)),k.innerHTML.replace(/^/,"").replace(/<\/svg>$/,"");k.innerHTML=""+m.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2>")+"";for(var N=0,R=k.firstChild.childNodes.length;N":function(m){return-Math.cos(m*Math.PI)/2+.5},">":function(m){return Math.sin(m*Math.PI/2)},"<":function(m){return 1-Math.cos(m*Math.PI/2)}},n.morph=function(m){return function(k,N){return new n.MorphObj(k,N).at(m)}},n.Situation=n.invent({create:function(m){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new n.Number(m.duration).valueOf(),this.delay=new n.Number(m.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=m.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),n.FX=n.invent({create:function(m){this._target=m,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(m,k,N){o(m)==="object"&&(k=m.ease,N=m.delay,m=m.duration);var R=new n.Situation({duration:m||1e3,delay:N||0,ease:n.easing[k||"-"]||k});return this.queue(R),this},target:function(m){return m&&m instanceof n.Element?(this._target=m,this):this._target},timeToAbsPos:function(m){return(m-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(m){return this.situation.duration/this._speed*m+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=O.requestAnimationFrame((function(){this.step()}).bind(this))},stopAnimFrame:function(){O.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(m){return(typeof m=="function"||m instanceof n.Situation)&&this.situations.push(m),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof n.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var m,k=this.situation;if(k.init)return this;for(var N in k.animations){m=this.target()[N](),Array.isArray(m)||(m=[m]),Array.isArray(k.animations[N])||(k.animations[N]=[k.animations[N]]);for(var R=m.length;R--;)k.animations[N][R]instanceof n.Number&&(m[R]=new n.Number(m[R])),k.animations[N][R]=m[R].morph(k.animations[N][R])}for(var N in k.attrs)k.attrs[N]=new n.MorphObj(this.target().attr(N),k.attrs[N]);for(var N in k.styles)k.styles[N]=new n.MorphObj(this.target().style(N),k.styles[N]);return k.initialTransformation=this.target().matrixify(),k.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(m,k){var N=this.active;return this.active=!1,k&&this.clearQueue(),m&&this.situation&&(!N&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(m){var k=this.last();return this.target().on("finished.fx",function N(R){R.detail.situation==k&&(m.call(this,k),this.off("finished.fx",N))}),this._callStart()},during:function(m){var k=this.last(),N=function(R){R.detail.situation==k&&m.call(this,R.detail.pos,n.morph(R.detail.pos),R.detail.eased,k)};return this.target().off("during.fx",N).on("during.fx",N),this.after(function(){this.off("during.fx",N)}),this._callStart()},afterAll:function(m){var k=function N(R){m.call(this),this.off("allfinished.fx",N)};return this.target().off("allfinished.fx",k).on("allfinished.fx",k),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(m,k,N){return this.last()[N||"animations"][m]=k,this._callStart()},step:function(m){var k,N,R;m||(this.absPos=this.timeToAbsPos(+new Date)),this.situation.loops!==!1?(k=Math.max(this.absPos,0),N=Math.floor(k),this.situation.loops===!0||Nthis.lastPos&&$<=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(),R=this.situation;for(var F in R.animations)m=[].concat(R.animations[F]).map(function(U){return typeof U!="string"&&U.at?U.at(R.ease(k.pos),k.pos):U}),N[F].apply(N,m);for(var F in R.attrs)m=[F].concat(R.attrs[F]).map(function(te){return typeof te!="string"&&te.at?te.at(R.ease(k.pos),k.pos):te}),N.attr.apply(N,m);for(var F in R.styles)m=[F].concat(R.styles[F]).map(function(te){return typeof te!="string"&&te.at?te.at(R.ease(k.pos),k.pos):te}),N.style.apply(N,m);if(R.transforms.length){m=R.initialTransformation,F=0;for(var $=R.transforms.length;F<$;F++){var Y=R.transforms[F];Y instanceof n.Matrix?m=Y.relative?m.multiply(new n.Matrix().morph(Y).at(R.ease(this.pos))):m.morph(Y).at(R.ease(this.pos)):(Y.relative||Y.undo(m.extract()),m=m.multiply(Y.at(R.ease(this.pos))))}N.matrix(m)}return this},once:function(m,k,N){var R=this.last();return N||(m=R.ease(m)),R.once[m]=k,this},_callStart:function(){return setTimeout((function(){this.start()}).bind(this),0),this}},parent:n.Element,construct:{animate:function(m,k,N){return(this.fx||(this.fx=new n.FX(this))).animate(m,k,N)},delay:function(m){return(this.fx||(this.fx=new n.FX(this))).delay(m)},stop:function(m,k){return this.fx&&this.fx.stop(m,k),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),n.MorphObj=n.invent({create:function(m,k){return n.Color.isColor(k)?new n.Color(m).morph(k):n.regex.delimiter.test(m)?n.regex.pathLetters.test(m)?new n.PathArray(m).morph(k):new n.Array(m).morph(k):n.regex.numberAndUnit.test(k)?new n.Number(m).morph(k):(this.value=m,void(this.destination=k))},extend:{at:function(m,k){return k<1?this.value:this.destination},valueOf:function(){return this.value}}}),n.extend(n.FX,{attr:function(m,k,N){if(o(m)==="object")for(var R in m)this.attr(R,m[R]);else this.add(m,k,"attrs");return this},plot:function(m,k,N,R){return arguments.length==4?this.plot([m,k,N,R]):this.add("plot",new(this.target()).morphArray(m))}}),n.Box=n.invent({create:function(m,k,N,R){if(!(o(m)!=="object"||m instanceof n.Element))return n.Box.call(this,m.left!=null?m.left:m.x,m.top!=null?m.top:m.y,m.width,m.height);var F;arguments.length==4&&(this.x=m,this.y=k,this.width=N,this.height=R),(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 R=m.clone(n.parser.draw.instance).show();R&&R.node&&typeof R.node.getBBox=="function"&&(k=R.node.getBBox()),R&&typeof R.remove=="function"&&R.remove()}else k={x:m.node.clientLeft,y:m.node.clientTop,width:m.node.clientWidth,height:m.node.clientHeight}}n.Box.call(this,k)}},inherit:n.Box,parent:n.Element,construct:{bbox:function(){return new n.BBox(this)}}}),n.BBox.prototype.constructor=n.BBox,n.Matrix=n.invent({create:function(m){var k=j([1,0,0,1,0,0]);m=m===null?k:m instanceof n.Element?m.matrixify():typeof m=="string"?j(m.split(n.regex.delimiter).map(parseFloat)):arguments.length==6?j([].slice.call(arguments)):Array.isArray(m)?j(m):m&&o(m)==="object"?m:k;for(var N=I.length-1;N>=0;--N)this[I[N]]=m[I[N]]!=null?m[I[N]]:k[I[N]]},extend:{extract:function(){var m=S(this,0,1);S(this,1,0);var k=180/Math.PI*Math.atan2(m.y,m.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(k*Math.PI/180)+this.f*Math.sin(k*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(k*Math.PI/180)+this.e*Math.sin(-k*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:k,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new n.Matrix(this)}},clone:function(){return new n.Matrix(this)},morph:function(m){return this.destination=new n.Matrix(m),this},multiply:function(m){return new n.Matrix(this.native().multiply(function(k){return k instanceof n.Matrix||(k=new n.Matrix(k)),k}(m).native()))},inverse:function(){return new n.Matrix(this.native().inverse())},translate:function(m,k){return new n.Matrix(this.native().translate(m||0,k||0))},native:function(){for(var m=n.parser.native.createSVGMatrix(),k=I.length-1;k>=0;k--)m[I[k]]=this[I[k]];return m},toString:function(){return"matrix("+T(this.a)+","+T(this.b)+","+T(this.c)+","+T(this.d)+","+T(this.e)+","+T(this.f)+")"}},parent:n.Element,construct:{ctm:function(){return new n.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof n.Nested){var m=this.rect(1,1),k=m.node.getScreenCTM();return m.remove(),new n.Matrix(k)}return new n.Matrix(this.node.getScreenCTM())}}}),n.Point=n.invent({create:function(m,k){var N;N=Array.isArray(m)?{x:m[0],y:m[1]}:o(m)==="object"?{x:m.x,y:m.y}:m!=null?{x:m,y:k??m}:{x:0,y:0},this.x=N.x,this.y=N.y},extend:{clone:function(){return new n.Point(this)},morph:function(m,k){return this.destination=new n.Point(m,k),this}}}),n.extend(n.Element,{point:function(m,k){return new n.Point(m,k).transform(this.screenCTM().inverse())}}),n.extend(n.Element,{attr:function(m,k,N){if(m==null){for(m={},N=(k=this.node.attributes).length-1;N>=0;N--)m[k[N].nodeName]=n.regex.isNumber.test(k[N].nodeValue)?parseFloat(k[N].nodeValue):k[N].nodeValue;return m}if(o(m)==="object")for(var R in m)this.attr(R,m[R]);else if(k===null)this.node.removeAttribute(m);else{if(k==null)return(k=this.node.getAttribute(m))==null?n.defaults.attrs[m]:n.regex.isNumber.test(k)?parseFloat(k):k;m=="stroke-width"?this.attr("stroke",parseFloat(k)>0?this._stroke:null):m=="stroke"&&(this._stroke=k),m!="fill"&&m!="stroke"||(n.regex.isImage.test(k)&&(k=this.doc().defs().image(k,0,0)),k instanceof n.Image&&(k=this.doc().defs().pattern(0,0,function(){this.add(k)}))),typeof k=="number"?k=new n.Number(k):n.Color.isColor(k)?k=new n.Color(k):Array.isArray(k)&&(k=new n.Array(k)),m=="leading"?this.leading&&this.leading(k):typeof N=="string"?this.node.setAttributeNS(N,m,k.toString()):this.node.setAttribute(m,k.toString()),!this.rebuild||m!="font-size"&&m!="x"||this.rebuild(m,k)}return this}}),n.extend(n.Element,{transform:function(m,k){var N;return o(m)!=="object"?(N=new n.Matrix(this).extract(),typeof m=="string"?N[m]:N):(N=new n.Matrix(this),k=!!k||!!m.relative,m.a!=null&&(N=k?N.multiply(new n.Matrix(m)):new n.Matrix(m)),this.attr("transform",N))}}),n.extend(n.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(n.regex.transforms).slice(0,-1).map(function(m){var k=m.trim().split("(");return[k[0],k[1].split(n.regex.delimiter).map(function(N){return parseFloat(N)})]}).reduce(function(m,k){return k[0]=="matrix"?m.multiply(j(k[1])):m[k[0]].apply(m,k[1])},new n.Matrix)},toParent:function(m){if(this==m)return this;var k=this.screenCTM(),N=m.screenCTM().inverse();return this.addTo(m).untransform().transform(N.multiply(k)),this},toDoc:function(){return this.toParent(this.doc())}}),n.Transformation=n.invent({create:function(m,k){if(arguments.length>1&&typeof k!="boolean")return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(m))for(var N=0,R=this.arguments.length;N=0},index:function(m){return[].slice.call(this.node.childNodes).indexOf(m.node)},get:function(m){return n.adopt(this.node.childNodes[m])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(m,k){for(var N=this.children(),R=0,F=N.length;R=0;k--)m.childNodes[k]instanceof O.SVGElement&&E(m.childNodes[k]);return n.adopt(m).id(n.eid(m.nodeName))}function T(m){return Math.abs(m)>1e-37?m:0}["fill","stroke"].forEach(function(m){var k={};k[m]=function(N){if(N===void 0)return this;if(typeof N=="string"||n.Color.isRgb(N)||N&&typeof N.fill=="function")this.attr(m,N);else for(var R=h[m].length-1;R>=0;R--)N[h[m][R]]!=null&&this.attr(h.prefix(m,h[m][R]),N[h[m][R]]);return this},n.extend(n.Element,n.FX,k)}),n.extend(n.Element,n.FX,{translate:function(m,k){return this.transform({x:m,y:k})},matrix:function(m){return this.attr("transform",new n.Matrix(arguments.length==6?[].slice.call(arguments):m))},opacity:function(m){return this.attr("opacity",m)},dx:function(m){return this.x(new n.Number(m).plus(this instanceof n.FX?0:this.x()),!0)},dy:function(m){return this.y(new n.Number(m).plus(this instanceof n.FX?0:this.y()),!0)}}),n.extend(n.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(m){return this.node.getPointAtLength(m)}}),n.Set=n.invent({create:function(m){Array.isArray(m)?this.members=m:this.clear()},extend:{add:function(){for(var m=[].slice.call(arguments),k=0,N=m.length;k-1&&this.members.splice(k,1),this},each:function(m){for(var k=0,N=this.members.length;k=0},index:function(m){return this.members.indexOf(m)},get:function(m){return this.members[m]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(m){return new n.Set(m)}}}),n.FX.Set=n.invent({create:function(m){this.set=m}}),n.Set.inherit=function(){var m=[];for(var k in n.Shape.prototype)typeof n.Shape.prototype[k]=="function"&&typeof n.Set.prototype[k]!="function"&&m.push(k);for(var k in m.forEach(function(R){n.Set.prototype[R]=function(){for(var F=0,$=this.members.length;F<$;F++)this.members[F]&&typeof this.members[F][R]=="function"&&this.members[F][R].apply(this.members[F],arguments);return R=="animate"?this.fx||(this.fx=new n.FX.Set(this)):this}}),m=[],n.FX.prototype)typeof n.FX.prototype[k]=="function"&&typeof n.FX.Set.prototype[k]!="function"&&m.push(k);m.forEach(function(N){n.FX.Set.prototype[N]=function(){for(var R=0,F=this.set.members.length;R=0;m--)delete this.memory()[arguments[m]];return this},memory:function(){return this._memory||(this._memory={})}}),n.get=function(m){var k=i.getElementById(function(N){var R=(N||"").toString().match(n.regex.reference);if(R)return R[1]}(m)||m);return n.adopt(k)},n.select=function(m,k){return new n.Set(n.utils.map((k||i).querySelectorAll(m),function(N){return n.adopt(N)}))},n.extend(n.Parent,{select:function(m){return n.select(m,this.node)}});var I="abcdef".split("");if(typeof O.CustomEvent!="function"){var 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=Tn.document?nl(Tn,Tn.document):function(O){return nl(O,O.document)}:Tn.SVG=nl(Tn,Tn.document),(function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(u,h){return this.add(u,h),!u.attr("in")&&this.autoSetIn&&u.attr("in",this.source),u.attr("result")||u.attr("result",u),u},blend:function(u,h,g){return this.put(new SVG.BlendEffect(u,h,g))},colorMatrix:function(u,h){return this.put(new SVG.ColorMatrixEffect(u,h))},convolveMatrix:function(u){return this.put(new SVG.ConvolveMatrixEffect(u))},componentTransfer:function(u){return this.put(new SVG.ComponentTransferEffect(u))},composite:function(u,h,g){return this.put(new SVG.CompositeEffect(u,h,g))},flood:function(u,h){return this.put(new SVG.FloodEffect(u,h))},offset:function(u,h){return this.put(new SVG.OffsetEffect(u,h))},image:function(u){return this.put(new SVG.ImageEffect(u))},merge:function(){var u=[void 0];for(var h in arguments)u.push(arguments[h]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,u)))},gaussianBlur:function(u,h){return this.put(new SVG.GaussianBlurEffect(u,h))},morphology:function(u,h){return this.put(new SVG.MorphologyEffect(u,h))},diffuseLighting:function(u,h,g){return this.put(new SVG.DiffuseLightingEffect(u,h,g))},displacementMap:function(u,h,g,x,y){return this.put(new SVG.DisplacementMapEffect(u,h,g,x,y))},specularLighting:function(u,h,g,x){return this.put(new SVG.SpecularLightingEffect(u,h,g,x))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(u,h,g,x,y){return this.put(new SVG.TurbulenceEffect(u,h,g,x,y))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(u){var h=this.put(new SVG.Filter);return typeof u=="function"&&u.call(h,h),h}}),SVG.extend(SVG.Container,{filter:function(u){return this.defs().filter(u)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(u){return this.filterer=u instanceof SVG.Element?u:this.doc().filter(u),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(u){return this.filterer&&u===!0&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(u){return u==null?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",u)},result:function(u){return u==null?this.attr("result"):this.attr("result",u)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(u){return u==null?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",u)},result:function(u){return u==null?this.attr("result"):this.attr("result",u)},toString:function(){return this.result()}}});var O={blend:function(u,h){return this.parent()&&this.parent().blend(this,u,h)},colorMatrix:function(u,h){return this.parent()&&this.parent().colorMatrix(u,h).in(this)},convolveMatrix:function(u){return this.parent()&&this.parent().convolveMatrix(u).in(this)},componentTransfer:function(u){return this.parent()&&this.parent().componentTransfer(u).in(this)},composite:function(u,h){return this.parent()&&this.parent().composite(this,u,h)},flood:function(u,h){return this.parent()&&this.parent().flood(u,h)},offset:function(u,h){return this.parent()&&this.parent().offset(u,h).in(this)},image:function(u){return this.parent()&&this.parent().image(u)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(u,h){return this.parent()&&this.parent().gaussianBlur(u,h).in(this)},morphology:function(u,h){return this.parent()&&this.parent().morphology(u,h).in(this)},diffuseLighting:function(u,h,g){return this.parent()&&this.parent().diffuseLighting(u,h,g).in(this)},displacementMap:function(u,h,g,x){return this.parent()&&this.parent().displacementMap(this,u,h,g,x)},specularLighting:function(u,h,g,x){return this.parent()&&this.parent().specularLighting(u,h,g,x).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(u,h,g,x,y){return this.parent()&&this.parent().turbulence(u,h,g,x,y).in(this)}};SVG.extend(SVG.Effect,O),SVG.extend(SVG.ParentEffect,O),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(u){this.attr("in",u)}}});var i={blend:function(u,h,g){this.attr({in:u,in2:h,mode:g||"normal"})},colorMatrix:function(u,h){u=="matrix"&&(h=l(h)),this.attr({type:u,values:h===void 0?null:h})},convolveMatrix:function(u){u=l(u),this.attr({order:Math.sqrt(u.split(" ").length),kernelMatrix:u})},composite:function(u,h,g){this.attr({in:u,in2:h,operator:g})},flood:function(u,h){this.attr("flood-color",u),h!=null&&this.attr("flood-opacity",h)},offset:function(u,h){this.attr({dx:u,dy:h})},image:function(u){this.attr("href",u,SVG.xlink)},displacementMap:function(u,h,g,x,y){this.attr({in:u,in2:h,scale:g,xChannelSelector:x,yChannelSelector:y})},gaussianBlur:function(u,h){u!=null||h!=null?this.attr("stdDeviation",function(g){if(!Array.isArray(g))return g;for(var x=0,y=g.length,b=[];x1&&(We*=y=Math.sqrt(y),tt*=y),b=new SVG.Matrix().rotate(ot).scale(1/We,1/tt).rotate(-ot),It=It.transform(b),Vt=Vt.transform(b),w=[Vt.x-It.x,Vt.y-It.y],j=w[0]*w[0]+w[1]*w[1],S=Math.sqrt(j),w[0]/=S,w[1]/=S,E=j<4?Math.sqrt(1-j/4):0,Zt===Tt&&(E*=-1),T=new SVG.Point((Vt.x+It.x)/2+E*-w[1],(Vt.y+It.y)/2+E*w[0]),I=new SVG.Point(It.x-T.x,It.y-T.y),D=new SVG.Point(Vt.x-T.x,Vt.y-T.y),m=Math.acos(I.x/Math.sqrt(I.x*I.x+I.y*I.y)),I.y<0&&(m*=-1),k=Math.acos(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 _1=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 Z(this.ctx),this.ctx.core=new p5(this.ctx.el,this.ctx),this.ctx.config=new oe({}),this.ctx.data=new Nt(this.ctx),this.ctx.grid=new Qo(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 A1(this.ctx),this.ctx.exports=new ds(this.ctx),this.ctx.localization=new j1(this.ctx),this.ctx.options=new Le,this.ctx.responsive=new se(this.ctx),this.ctx.series=new Me(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 Jo(this.ctx),this.ctx.toolbar=new hs(this.ctx),this.ctx.tooltip=new N1(this.ctx),this.ctx.dimensions=new Pt(this.ctx),this.ctx.updateHelpers=new g5(this.ctx),this.ctx.zoomPanSelection=new pa(this.ctx),this.ctx.w.globals.tooltip=new N1(this.ctx)}}]),O}(),M1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"clear",value:function(i){var n=i.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:n})}},{key:"killSVG",value:function(i){i.each(function(n,a){this.removeClass("*"),this.off(),this.stop()},!0),i.ungroup(),i.clear()}},{key:"clearDomElements",value:function(i){var n=this,a=i.isUpdating,l=this.w.globals.dom.Paper.node;l.parentNode&&l.parentNode.parentNode&&!a&&(l.parentNode.parentNode.style.minHeight="unset");var d=this.w.globals.dom.baseEl;d&&this.ctx.eventList.forEach(function(h){d.removeEventListener(h,n.ctx.events.documentEvent)});var u=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(u.Paper),u.Paper.remove(),u.elWrap=null,u.elGraphical=null,u.elLegendWrap=null,u.elLegendForeign=null,u.baseEl=null,u.elGridRect=null,u.elGridRectMask=null,u.elGridRectMarkerMask=null,u.elForecastMask=null,u.elNonForecastMask=null,u.elDefs=null}}]),O}(),Zd=new WeakMap,m5=function(){function O(i,n){c(this,O),this.opts=n,this.ctx=this,this.w=new je(n).init(),this.el=i,this.w.globals.cuid=_.randomId(),this.w.globals.chartID=this.w.config.chart.id?_.escapeString(this.w.config.chart.id):this.w.globals.cuid,new _1(this).initModules(),this.create=_.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return v(O,[{key:"render",value:function(){var i=this;return new Promise(function(n,a){if(i.el!==null){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),i.w.config.chart.id&&Apex._chartInstances.push({id:i.w.globals.chartID,group:i.w.config.chart.group,chart:i}),i.setLocale(i.w.config.chart.defaultLocale);var l=i.w.config.chart.events.beforeMount;if(typeof l=="function"&&l(i,i.w),i.events.fireEvent("beforeMount",[i,i.w]),window.addEventListener("resize",i.windowResizeHandler),function(w,S){var j=!1;if(w.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var E=w.getBoundingClientRect();w.style.display!=="none"&&E.width!==0||(j=!0)}var T=new ResizeObserver(function(I){j&&S.call(w,I),j=!0});w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(w.children).forEach(function(I){return T.observe(I)}):T.observe(w),Zd.set(S,T)}(i.el.parentNode,i.parentResizeHandler),!i.css){var d=i.el.getRootNode&&i.el.getRootNode(),u=_.is("ShadowRoot",d),h=i.el.ownerDocument,g=h.getElementById("apexcharts-css");if(u||!g){var x;i.css=document.createElement("style"),i.css.id="apexcharts-css",i.css.textContent=`@keyframes opaque { +`:""):(typeof m=="function"?m.call(this,this):this.plain(m),this)},dx:function(m){return this.attr("dx",m)},dy:function(m){return this.attr("dy",m)},newLine:function(){var m=this.parent(n.Text);return this.dom.newLined=!0,this.dy(m.dom.leading*m.attr("font-size")).attr("x",m.x())}}}),n.extend(n.Text,n.Tspan,{plain:function(m){return this._build===!1&&this.clear(),this.node.appendChild(i.createTextNode(m)),this},tspan:function(m){var k=(this.textPath&&this.textPath()||this).node,N=new n.Tspan;return this._build===!1&&this.clear(),k.appendChild(N.node),N.text(m)},clear:function(){for(var m=(this.textPath&&this.textPath()||this).node;m.hasChildNodes();)m.removeChild(m.lastChild);return this},length:function(){return this.node.getComputedTextLength()}}),n.TextPath=n.invent({create:"textPath",inherit:n.Parent,parent:n.Text,construct:{morphArray:n.PathArray,array:function(){var m=this.track();return m?m.array():null},plot:function(m){var k=this.track(),N=null;return k&&(N=k.plot(m)),m==null?N:this},track:function(){var m=this.textPath();if(m)return m.reference("href")},textPath:function(){if(this.node.firstChild&&this.node.firstChild.nodeName=="textPath")return n.adopt(this.node.firstChild)}}}),n.Nested=n.invent({create:function(){this.constructor.call(this,n.create("svg")),this.style("overflow","visible")},inherit:n.Container,construct:{nested:function(){return this.put(new n.Nested)}}});var h={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(m,k){return k=="color"?m:m+"-"+k}};function g(m,k,N,R){return N+R.replace(n.regex.dots," .")}function x(m){return m.toLowerCase().replace(/-(.)/g,function(k,N){return N.toUpperCase()})}function y(m){return m.charAt(0).toUpperCase()+m.slice(1)}function b(m){var k=m.toString(16);return k.length==1?"0"+k:k}function w(m,k,N){if(k==null||N==null){var R=m.bbox();k==null?k=R.width/R.height*N:N==null&&(N=R.height/R.width*k)}return{width:k,height:N}}function S(m,k,N){return{x:k*m.a+N*m.c+0,y:k*m.b+N*m.d+0}}function j(m){return{a:m[0],b:m[1],c:m[2],d:m[3],e:m[4],f:m[5]}}function E(m){for(var k=m.childNodes.length-1;k>=0;k--)m.childNodes[k]instanceof O.SVGElement&&E(m.childNodes[k]);return n.adopt(m).id(n.eid(m.nodeName))}function T(m){return Math.abs(m)>1e-37?m:0}["fill","stroke"].forEach(function(m){var k={};k[m]=function(N){if(N===void 0)return this;if(typeof N=="string"||n.Color.isRgb(N)||N&&typeof N.fill=="function")this.attr(m,N);else for(var R=h[m].length-1;R>=0;R--)N[h[m][R]]!=null&&this.attr(h.prefix(m,h[m][R]),N[h[m][R]]);return this},n.extend(n.Element,n.FX,k)}),n.extend(n.Element,n.FX,{translate:function(m,k){return this.transform({x:m,y:k})},matrix:function(m){return this.attr("transform",new n.Matrix(arguments.length==6?[].slice.call(arguments):m))},opacity:function(m){return this.attr("opacity",m)},dx:function(m){return this.x(new n.Number(m).plus(this instanceof n.FX?0:this.x()),!0)},dy:function(m){return this.y(new n.Number(m).plus(this instanceof n.FX?0:this.y()),!0)}}),n.extend(n.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(m){return this.node.getPointAtLength(m)}}),n.Set=n.invent({create:function(m){Array.isArray(m)?this.members=m:this.clear()},extend:{add:function(){for(var m=[].slice.call(arguments),k=0,N=m.length;k-1&&this.members.splice(k,1),this},each:function(m){for(var k=0,N=this.members.length;k=0},index:function(m){return this.members.indexOf(m)},get:function(m){return this.members[m]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(m){return new n.Set(m)}}}),n.FX.Set=n.invent({create:function(m){this.set=m}}),n.Set.inherit=function(){var m=[];for(var k in n.Shape.prototype)typeof n.Shape.prototype[k]=="function"&&typeof n.Set.prototype[k]!="function"&&m.push(k);for(var k in m.forEach(function(R){n.Set.prototype[R]=function(){for(var F=0,$=this.members.length;F<$;F++)this.members[F]&&typeof this.members[F][R]=="function"&&this.members[F][R].apply(this.members[F],arguments);return R=="animate"?this.fx||(this.fx=new n.FX.Set(this)):this}}),m=[],n.FX.prototype)typeof n.FX.prototype[k]=="function"&&typeof n.FX.Set.prototype[k]!="function"&&m.push(k);m.forEach(function(N){n.FX.Set.prototype[N]=function(){for(var R=0,F=this.set.members.length;R=0;m--)delete this.memory()[arguments[m]];return this},memory:function(){return this._memory||(this._memory={})}}),n.get=function(m){var k=i.getElementById(function(N){var R=(N||"").toString().match(n.regex.reference);if(R)return R[1]}(m)||m);return n.adopt(k)},n.select=function(m,k){return new n.Set(n.utils.map((k||i).querySelectorAll(m),function(N){return n.adopt(N)}))},n.extend(n.Parent,{select:function(m){return n.select(m,this.node)}});var I="abcdef".split("");if(typeof O.CustomEvent!="function"){var 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=Tn.document?nl(Tn,Tn.document):function(O){return nl(O,O.document)}:Tn.SVG=nl(Tn,Tn.document),(function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(u,h){return this.add(u,h),!u.attr("in")&&this.autoSetIn&&u.attr("in",this.source),u.attr("result")||u.attr("result",u),u},blend:function(u,h,g){return this.put(new SVG.BlendEffect(u,h,g))},colorMatrix:function(u,h){return this.put(new SVG.ColorMatrixEffect(u,h))},convolveMatrix:function(u){return this.put(new SVG.ConvolveMatrixEffect(u))},componentTransfer:function(u){return this.put(new SVG.ComponentTransferEffect(u))},composite:function(u,h,g){return this.put(new SVG.CompositeEffect(u,h,g))},flood:function(u,h){return this.put(new SVG.FloodEffect(u,h))},offset:function(u,h){return this.put(new SVG.OffsetEffect(u,h))},image:function(u){return this.put(new SVG.ImageEffect(u))},merge:function(){var u=[void 0];for(var h in arguments)u.push(arguments[h]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,u)))},gaussianBlur:function(u,h){return this.put(new SVG.GaussianBlurEffect(u,h))},morphology:function(u,h){return this.put(new SVG.MorphologyEffect(u,h))},diffuseLighting:function(u,h,g){return this.put(new SVG.DiffuseLightingEffect(u,h,g))},displacementMap:function(u,h,g,x,y){return this.put(new SVG.DisplacementMapEffect(u,h,g,x,y))},specularLighting:function(u,h,g,x){return this.put(new SVG.SpecularLightingEffect(u,h,g,x))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(u,h,g,x,y){return this.put(new SVG.TurbulenceEffect(u,h,g,x,y))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(u){var h=this.put(new SVG.Filter);return typeof u=="function"&&u.call(h,h),h}}),SVG.extend(SVG.Container,{filter:function(u){return this.defs().filter(u)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(u){return this.filterer=u instanceof SVG.Element?u:this.doc().filter(u),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(u){return this.filterer&&u===!0&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(u){return u==null?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",u)},result:function(u){return u==null?this.attr("result"):this.attr("result",u)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(u){return u==null?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",u)},result:function(u){return u==null?this.attr("result"):this.attr("result",u)},toString:function(){return this.result()}}});var O={blend:function(u,h){return this.parent()&&this.parent().blend(this,u,h)},colorMatrix:function(u,h){return this.parent()&&this.parent().colorMatrix(u,h).in(this)},convolveMatrix:function(u){return this.parent()&&this.parent().convolveMatrix(u).in(this)},componentTransfer:function(u){return this.parent()&&this.parent().componentTransfer(u).in(this)},composite:function(u,h){return this.parent()&&this.parent().composite(this,u,h)},flood:function(u,h){return this.parent()&&this.parent().flood(u,h)},offset:function(u,h){return this.parent()&&this.parent().offset(u,h).in(this)},image:function(u){return this.parent()&&this.parent().image(u)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(u,h){return this.parent()&&this.parent().gaussianBlur(u,h).in(this)},morphology:function(u,h){return this.parent()&&this.parent().morphology(u,h).in(this)},diffuseLighting:function(u,h,g){return this.parent()&&this.parent().diffuseLighting(u,h,g).in(this)},displacementMap:function(u,h,g,x){return this.parent()&&this.parent().displacementMap(this,u,h,g,x)},specularLighting:function(u,h,g,x){return this.parent()&&this.parent().specularLighting(u,h,g,x).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(u,h,g,x,y){return this.parent()&&this.parent().turbulence(u,h,g,x,y).in(this)}};SVG.extend(SVG.Effect,O),SVG.extend(SVG.ParentEffect,O),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(u){this.attr("in",u)}}});var i={blend:function(u,h,g){this.attr({in:u,in2:h,mode:g||"normal"})},colorMatrix:function(u,h){u=="matrix"&&(h=l(h)),this.attr({type:u,values:h===void 0?null:h})},convolveMatrix:function(u){u=l(u),this.attr({order:Math.sqrt(u.split(" ").length),kernelMatrix:u})},composite:function(u,h,g){this.attr({in:u,in2:h,operator:g})},flood:function(u,h){this.attr("flood-color",u),h!=null&&this.attr("flood-opacity",h)},offset:function(u,h){this.attr({dx:u,dy:h})},image:function(u){this.attr("href",u,SVG.xlink)},displacementMap:function(u,h,g,x,y){this.attr({in:u,in2:h,scale:g,xChannelSelector:x,yChannelSelector:y})},gaussianBlur:function(u,h){u!=null||h!=null?this.attr("stdDeviation",function(g){if(!Array.isArray(g))return g;for(var x=0,y=g.length,b=[];x1&&(We*=y=Math.sqrt(y),tt*=y),b=new SVG.Matrix().rotate(ot).scale(1/We,1/tt).rotate(-ot),It=It.transform(b),Vt=Vt.transform(b),w=[Vt.x-It.x,Vt.y-It.y],j=w[0]*w[0]+w[1]*w[1],S=Math.sqrt(j),w[0]/=S,w[1]/=S,E=j<4?Math.sqrt(1-j/4):0,Zt===Tt&&(E*=-1),T=new SVG.Point((Vt.x+It.x)/2+E*-w[1],(Vt.y+It.y)/2+E*w[0]),I=new SVG.Point(It.x-T.x,It.y-T.y),D=new SVG.Point(Vt.x-T.x,Vt.y-T.y),m=Math.acos(I.x/Math.sqrt(I.x*I.x+I.y*I.y)),I.y<0&&(m*=-1),k=Math.acos(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 _1=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 Z(this.ctx),this.ctx.core=new f5(this.ctx.el,this.ctx),this.ctx.config=new oe({}),this.ctx.data=new Nt(this.ctx),this.ctx.grid=new Qo(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 A1(this.ctx),this.ctx.exports=new ds(this.ctx),this.ctx.localization=new j1(this.ctx),this.ctx.options=new Le,this.ctx.responsive=new se(this.ctx),this.ctx.series=new Me(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 Jo(this.ctx),this.ctx.toolbar=new hs(this.ctx),this.ctx.tooltip=new N1(this.ctx),this.ctx.dimensions=new Pt(this.ctx),this.ctx.updateHelpers=new p5(this.ctx),this.ctx.zoomPanSelection=new pa(this.ctx),this.ctx.w.globals.tooltip=new N1(this.ctx)}}]),O}(),M1=function(){function O(i){c(this,O),this.ctx=i,this.w=i.w}return v(O,[{key:"clear",value:function(i){var n=i.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:n})}},{key:"killSVG",value:function(i){i.each(function(n,a){this.removeClass("*"),this.off(),this.stop()},!0),i.ungroup(),i.clear()}},{key:"clearDomElements",value:function(i){var n=this,a=i.isUpdating,l=this.w.globals.dom.Paper.node;l.parentNode&&l.parentNode.parentNode&&!a&&(l.parentNode.parentNode.style.minHeight="unset");var d=this.w.globals.dom.baseEl;d&&this.ctx.eventList.forEach(function(h){d.removeEventListener(h,n.ctx.events.documentEvent)});var u=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(u.Paper),u.Paper.remove(),u.elWrap=null,u.elGraphical=null,u.elLegendWrap=null,u.elLegendForeign=null,u.baseEl=null,u.elGridRect=null,u.elGridRectMask=null,u.elGridRectMarkerMask=null,u.elForecastMask=null,u.elNonForecastMask=null,u.elDefs=null}}]),O}(),Zd=new WeakMap,g5=function(){function O(i,n){c(this,O),this.opts=n,this.ctx=this,this.w=new je(n).init(),this.el=i,this.w.globals.cuid=_.randomId(),this.w.globals.chartID=this.w.config.chart.id?_.escapeString(this.w.config.chart.id):this.w.globals.cuid,new _1(this).initModules(),this.create=_.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return v(O,[{key:"render",value:function(){var i=this;return new Promise(function(n,a){if(i.el!==null){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),i.w.config.chart.id&&Apex._chartInstances.push({id:i.w.globals.chartID,group:i.w.config.chart.group,chart:i}),i.setLocale(i.w.config.chart.defaultLocale);var l=i.w.config.chart.events.beforeMount;if(typeof l=="function"&&l(i,i.w),i.events.fireEvent("beforeMount",[i,i.w]),window.addEventListener("resize",i.windowResizeHandler),function(w,S){var j=!1;if(w.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var E=w.getBoundingClientRect();w.style.display!=="none"&&E.width!==0||(j=!0)}var T=new ResizeObserver(function(I){j&&S.call(w,I),j=!0});w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(w.children).forEach(function(I){return T.observe(I)}):T.observe(w),Zd.set(S,T)}(i.el.parentNode,i.parentResizeHandler),!i.css){var d=i.el.getRootNode&&i.el.getRootNode(),u=_.is("ShadowRoot",d),h=i.el.ownerDocument,g=h.getElementById("apexcharts-css");if(u||!g){var x;i.css=document.createElement("style"),i.css.id="apexcharts-css",i.css.textContent=`@keyframes opaque { 0% { opacity: 0 } @@ -787,7 +787,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho .apexcharts-rangebar-goals-markers{ pointer-events: none -}`;var y=((x=i.opts.chart)===null||x===void 0?void 0:x.nonce)||i.w.config.chart.nonce;y&&i.css.setAttribute("nonce",y),u?d.prepend(i.css):h.head.appendChild(i.css)}}var b=i.create(i.w.config.series,{});if(!b)return n(i);i.mount(b).then(function(){typeof i.w.config.chart.events.mounted=="function"&&i.w.config.chart.events.mounted(i,i.w),i.events.fireEvent("mounted",[i,i.w]),n(b)}).catch(function(w){a(w)})}else a(new Error("Element not found"))})}},{key:"create",value:function(i,n){var a=this.w;new _1(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 Qo(a);var h,g,x=a.grid.drawGrid();if(a.annotations=new Fe(a),a.annotations.drawImageAnnos(),a.annotations.drawTextAnnos(),l.config.grid.position==="back"&&(x&&l.globals.dom.elGraphical.add(x.el),x!=null&&(h=x.elGridBorders)!==null&&h!==void 0&&h.node&&l.globals.dom.elGraphical.add(x.elGridBorders)),Array.isArray(n.elGraph))for(var y=0;y0&&l.globals.memory.methodsToExec.forEach(function(j){j.method(j.params,!1,j.context)}),l.globals.axisCharts||l.globals.noData||a.core.resizeNonAxisCharts(),d(a)})}},{key:"destroy",value:function(){var i,n;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,i=this.parentResizeHandler,(n=Zd.get(i))&&(n.disconnect(),Zd.delete(i));var a=this.w.config.chart.id;a&&Apex._chartInstances.forEach(function(l,d){l.id===_.escapeString(a)&&Apex._chartInstances.splice(d,1)}),new M1(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 us(this.ctx).getMinYMaxY(i).highestY}},{key:"getLowestValueInSeries",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new us(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 ds(this.ctx).dataURI(i)}},{key:"exportToCSV",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new ds(this.ctx).exportToCSV(i)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var i=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){i.w.globals.resized=!0,i.w.globals.dataChanged=!1,i.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var i=this.w.config.chart.redrawOnWindowResize;typeof i=="function"&&(i=i()),i&&this._windowResize()}}],[{key:"getChartByID",value:function(i){var n=_.escapeString(i);if(Apex._chartInstances){var a=Apex._chartInstances.filter(function(l){return l.id===n})[0];return a&&a.chart}}},{key:"initOnLoad",value:function(){for(var i=document.querySelectorAll("[data-apexcharts]"),n=0;n2?d-2:0),h=2;h{const r=G.useMemo(()=>{if(e&&(e==null?void 0:e.length)>0)return(e==null?void 0:e.sort((A,L)=>new Date(A.date).getTime()-new Date(L.date).getTime())).map(A=>A.totalRevenue)},[e]),s=G.useMemo(()=>{if(e&&(e==null?void 0:e.length)>0)return e==null?void 0:e.map(A=>A.date.toString().split(" ").slice(0,3).join(" "))},[e]),[o,c]=G.useState({series:[{name:"Profit",data:[4,7,10,11,13,14,17]}]}),[p,v]=G.useState(Pl);return G.useEffect(()=>{r&&r.length>0&&c(C=>{const A=C.series.findIndex(L=>L.name==="Revenue");return A>=0?{...C,series:C.series.map((L,P)=>P===A?{...L,data:r}:L)}:{...C,series:[...C.series,{name:"Revenue",data:r}]}})},[r]),G.useEffect(()=>{s&&(s==null?void 0:s.length)>0&&r&&(r==null?void 0:r.length)>0&&v({...Pl,xaxis:{...Pl.xaxis,categories:s},yaxis:{...Pl.yaxis,max:Math.ceil(Math.max(...r)/100)*100,min:Math.floor(Math.min(...r)/100)*100}})},[s,r]),f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:col-span-8",children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 sm:flex-nowrap",children:[f.jsxs("div",{className:"flex w-full flex-wrap gap-3 sm:gap-5",children:[f.jsxs("div",{className:"flex min-w-47.5",children:[f.jsx("span",{className:"mt-1 mr-2 flex h-4 w-full max-w-4 items-center justify-center rounded-full border border-primary",children:f.jsx("span",{className:"block h-2.5 w-full max-w-2.5 rounded-full bg-primary"})}),f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"font-semibold text-primary",children:"Total Profit"}),f.jsx("p",{className:"text-sm font-medium",children:"Last 7 Days"})]})]}),f.jsxs("div",{className:"flex min-w-47.5",children:[f.jsx("span",{className:"mt-1 mr-2 flex h-4 w-full max-w-4 items-center justify-center rounded-full border border-secondary",children:f.jsx("span",{className:"block h-2.5 w-full max-w-2.5 rounded-full bg-secondary"})}),f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"font-semibold text-secondary",children:"Total Revenue"}),f.jsx("p",{className:"text-sm font-medium",children:"Last 7 Days"})]})]})]}),f.jsx("div",{className:"flex w-full max-w-45 justify-end",children:f.jsxs("div",{className:"inline-flex items-center rounded-md bg-whiter p-1.5 dark:bg-meta-4",children:[f.jsx("button",{className:"rounded bg-white py-1 px-3 text-xs font-medium text-black shadow-card hover:bg-white hover:shadow-card dark:bg-boxdark dark:text-white dark:hover:bg-boxdark",children:"Day"}),f.jsx("button",{className:"rounded py-1 px-3 text-xs font-medium text-black hover:bg-white hover:shadow-card dark:text-white dark:hover:bg-boxdark",children:"Week"}),f.jsx("button",{className:"rounded py-1 px-3 text-xs font-medium text-black hover:bg-white hover:shadow-card dark:text-white dark:hover:bg-boxdark",children:"Month"})]})})]}),f.jsx("div",{children:f.jsx("div",{id:"chartOne",className:"-ml-5",children:f.jsx(Vd,{options:p,series:o.series,type:"area",height:350})})})]})},SE=({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"})})]})]}),k0=({children:e,activeCondition:t})=>{const[r,s]=G.useState(t),o=()=>{s(!r)};return f.jsx("li",{children:e(o,r)})},AE=({sidebarOpen:e,setSidebarOpen:t})=>{const r=aa(),{pathname:s}=r,o=G.useRef(null),c=G.useRef(null),p=localStorage.getItem("sidebar-expanded"),[v,C]=G.useState(p===null?!1:p==="true");return G.useEffect(()=>{const A=({target:L})=>{!c.current||!o.current||!e||c.current.contains(L)||o.current.contains(L)||t(!1)};return document.addEventListener("click",A),()=>document.removeEventListener("click",A)}),G.useEffect(()=>{const A=({keyCode:L})=>{!e||L!==27||t(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)}),G.useEffect(()=>{var A,L;localStorage.setItem("sidebar-expanded",v.toString()),v?(A=document.querySelector("body"))==null||A.classList.add("sidebar-expanded"):(L=document.querySelector("body"))==null||L.classList.remove("sidebar-expanded")},[v]),f.jsxs("aside",{ref:c,className:`absolute left-0 top-0 z-9999 flex h-screen w-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(sr,{to:"/",children:f.jsx("img",{src:j2,alt:"Logo",className:"h-10 w-auto -mt-1 "})}),f.jsx("button",{ref:o,onClick:()=>t(!e),"aria-controls":"sidebar","aria-expanded":e,className:"block lg:hidden text-captn-light-cream",children:f.jsx("svg",{className:"fill-current",width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M19 8.175H2.98748L9.36248 1.6875C9.69998 1.35 9.69998 0.825 9.36248 0.4875C9.02498 0.15 8.49998 0.15 8.16248 0.4875L0.399976 8.3625C0.0624756 8.7 0.0624756 9.225 0.399976 9.5625L8.16248 17.4375C8.31248 17.5875 8.53748 17.7 8.76248 17.7C8.98748 17.7 9.17498 17.625 9.36248 17.475C9.69998 17.1375 9.69998 16.6125 9.36248 16.275L3.02498 9.8625H19C19.45 9.8625 19.825 9.4875 19.825 9.0375C19.825 8.55 19.45 8.175 19 8.175Z",fill:""})})})]}),f.jsx("div",{className:"no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear",children:f.jsxs("nav",{className:"mt-5 py-4 px-4 lg:mt-9 lg:px-6",children:[f.jsxs("div",{children:[f.jsx("h3",{className:"mb-4 ml-4 text-sm font-semibold text-bodydark2",children:"MENU"}),f.jsxs("ul",{className:"mb-6 flex flex-col gap-1.5",children:[f.jsxs(sr,{to:"/admin",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s==="/"&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M6.10322 0.956299H2.53135C1.5751 0.956299 0.787598 1.7438 0.787598 2.70005V6.27192C0.787598 7.22817 1.5751 8.01567 2.53135 8.01567H6.10322C7.05947 8.01567 7.84697 7.22817 7.84697 6.27192V2.72817C7.8751 1.7438 7.0876 0.956299 6.10322 0.956299ZM6.60947 6.30005C6.60947 6.5813 6.38447 6.8063 6.10322 6.8063H2.53135C2.2501 6.8063 2.0251 6.5813 2.0251 6.30005V2.72817C2.0251 2.44692 2.2501 2.22192 2.53135 2.22192H6.10322C6.38447 2.22192 6.60947 2.44692 6.60947 2.72817V6.30005Z",fill:""}),f.jsx("path",{d:"M15.4689 0.956299H11.8971C10.9408 0.956299 10.1533 1.7438 10.1533 2.70005V6.27192C10.1533 7.22817 10.9408 8.01567 11.8971 8.01567H15.4689C16.4252 8.01567 17.2127 7.22817 17.2127 6.27192V2.72817C17.2127 1.7438 16.4252 0.956299 15.4689 0.956299ZM15.9752 6.30005C15.9752 6.5813 15.7502 6.8063 15.4689 6.8063H11.8971C11.6158 6.8063 11.3908 6.5813 11.3908 6.30005V2.72817C11.3908 2.44692 11.6158 2.22192 11.8971 2.22192H15.4689C15.7502 2.22192 15.9752 2.44692 15.9752 2.72817V6.30005Z",fill:""}),f.jsx("path",{d:"M6.10322 9.92822H2.53135C1.5751 9.92822 0.787598 10.7157 0.787598 11.672V15.2438C0.787598 16.2001 1.5751 16.9876 2.53135 16.9876H6.10322C7.05947 16.9876 7.84697 16.2001 7.84697 15.2438V11.7001C7.8751 10.7157 7.0876 9.92822 6.10322 9.92822ZM6.60947 15.272C6.60947 15.5532 6.38447 15.7782 6.10322 15.7782H2.53135C2.2501 15.7782 2.0251 15.5532 2.0251 15.272V11.7001C2.0251 11.4188 2.2501 11.1938 2.53135 11.1938H6.10322C6.38447 11.1938 6.60947 11.4188 6.60947 11.7001V15.272Z",fill:""}),f.jsx("path",{d:"M15.4689 9.92822H11.8971C10.9408 9.92822 10.1533 10.7157 10.1533 11.672V15.2438C10.1533 16.2001 10.9408 16.9876 11.8971 16.9876H15.4689C16.4252 16.9876 17.2127 16.2001 17.2127 15.2438V11.7001C17.2127 10.7157 16.4252 9.92822 15.4689 9.92822ZM15.9752 15.272C15.9752 15.5532 15.7502 15.7782 15.4689 15.7782H11.8971C11.6158 15.7782 11.3908 15.5532 11.3908 15.272V11.7001C11.3908 11.4188 11.6158 11.1938 11.8971 11.1938H15.4689C15.7502 11.1938 15.9752 11.4188 15.9752 11.7001V15.272Z",fill:""})]}),"Dashboard"]}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/users",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("users")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_130_9756)",children:f.jsx("path",{d:"M15.7501 0.55835H2.2501C1.29385 0.55835 0.506348 1.34585 0.506348 2.3021V15.8021C0.506348 16.7584 1.29385 17.574 2.27822 17.574H15.7782C16.7345 17.574 17.5501 16.7865 17.5501 15.8021V2.3021C17.522 1.34585 16.7063 0.55835 15.7501 0.55835ZM6.69385 10.599V6.4646H11.3063V10.5709H6.69385V10.599ZM11.3063 11.8646V16.3083H6.69385V11.8646H11.3063ZM1.77197 6.4646H5.45635V10.5709H1.77197V6.4646ZM12.572 6.4646H16.2563V10.5709H12.572V6.4646ZM2.2501 1.82397H15.7501C16.0313 1.82397 16.2563 2.04897 16.2563 2.33022V5.2271H1.77197V2.3021C1.77197 2.02085 1.96885 1.82397 2.2501 1.82397ZM1.77197 15.8021V11.8646H5.45635V16.3083H2.2501C1.96885 16.3083 1.77197 16.0834 1.77197 15.8021ZM15.7501 16.3083H12.572V11.8646H16.2563V15.8021C16.2563 16.0834 16.0313 16.3083 15.7501 16.3083Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9756",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Users"]})}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/settings",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("settings")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9763)",children:[f.jsx("path",{d:"M17.0721 7.30835C16.7909 6.99897 16.3971 6.83022 15.9752 6.83022H15.8909C15.7502 6.83022 15.6377 6.74585 15.6096 6.63335C15.5815 6.52085 15.5252 6.43647 15.4971 6.32397C15.4409 6.21147 15.4971 6.09897 15.5815 6.0146L15.6377 5.95835C15.9471 5.6771 16.1159 5.28335 16.1159 4.86147C16.1159 4.4396 15.9752 4.04585 15.6659 3.73647L14.569 2.61147C13.9784 1.99272 12.9659 1.9646 12.3471 2.58335L12.2627 2.6396C12.1784 2.72397 12.0377 2.7521 11.8971 2.69585C11.7846 2.6396 11.6721 2.58335 11.5315 2.55522C11.3909 2.49897 11.3065 2.38647 11.3065 2.27397V2.13335C11.3065 1.26147 10.6034 0.55835 9.73148 0.55835H8.15648C7.7346 0.55835 7.34085 0.7271 7.0596 1.00835C6.75023 1.31772 6.6096 1.71147 6.6096 2.10522V2.21772C6.6096 2.33022 6.52523 2.44272 6.41273 2.49897C6.35648 2.5271 6.32835 2.5271 6.2721 2.55522C6.1596 2.61147 6.01898 2.58335 5.9346 2.49897L5.87835 2.4146C5.5971 2.10522 5.20335 1.93647 4.78148 1.93647C4.3596 1.93647 3.96585 2.0771 3.65648 2.38647L2.53148 3.48335C1.91273 4.07397 1.8846 5.08647 2.50335 5.70522L2.5596 5.7896C2.64398 5.87397 2.6721 6.0146 2.61585 6.09897C2.5596 6.21147 2.53148 6.29585 2.47523 6.40835C2.41898 6.52085 2.3346 6.5771 2.19398 6.5771H2.1096C1.68773 6.5771 1.29398 6.71772 0.984604 7.0271C0.675229 7.30835 0.506479 7.7021 0.506479 8.12397L0.478354 9.69897C0.450229 10.5708 1.15335 11.274 2.02523 11.3021H2.1096C2.25023 11.3021 2.36273 11.3865 2.39085 11.499C2.4471 11.5833 2.50335 11.6677 2.53148 11.7802C2.5596 11.8927 2.53148 12.0052 2.4471 12.0896L2.39085 12.1458C2.08148 12.4271 1.91273 12.8208 1.91273 13.2427C1.91273 13.6646 2.05335 14.0583 2.36273 14.3677L3.4596 15.4927C4.05023 16.1115 5.06273 16.1396 5.68148 15.5208L5.76585 15.4646C5.85023 15.3802 5.99085 15.3521 6.13148 15.4083C6.24398 15.4646 6.35648 15.5208 6.4971 15.549C6.63773 15.6052 6.7221 15.7177 6.7221 15.8302V15.9427C6.7221 16.8146 7.42523 17.5177 8.2971 17.5177H9.8721C10.744 17.5177 11.4471 16.8146 11.4471 15.9427V15.8302C11.4471 15.7177 11.5315 15.6052 11.644 15.549C11.7002 15.5208 11.7284 15.5208 11.7846 15.4927C11.9252 15.4365 12.0377 15.4646 12.1221 15.549L12.1784 15.6333C12.4596 15.9427 12.8534 16.1115 13.2752 16.1115C13.6971 16.1115 14.0909 15.9708 14.4002 15.6615L15.5252 14.5646C16.144 13.974 16.1721 12.9615 15.5534 12.3427L15.4971 12.2583C15.4127 12.174 15.3846 12.0333 15.4409 11.949C15.4971 11.8365 15.5252 11.7521 15.5815 11.6396C15.6377 11.5271 15.7502 11.4708 15.8627 11.4708H15.9471H15.9752C16.819 11.4708 17.5221 10.7958 17.5502 9.92397L17.5784 8.34897C17.5221 8.01147 17.3534 7.5896 17.0721 7.30835ZM16.2284 9.9521C16.2284 10.1208 16.0877 10.2615 15.919 10.2615H15.8346H15.8065C15.1596 10.2615 14.569 10.6552 14.344 11.2177C14.3159 11.3021 14.2596 11.3865 14.2315 11.4708C13.9784 12.0333 14.0909 12.7365 14.5409 13.1865L14.5971 13.2708C14.7096 13.3833 14.7096 13.5802 14.5971 13.6927L13.4721 14.7896C13.3877 14.874 13.3034 14.874 13.2471 14.874C13.1909 14.874 13.1065 14.874 13.0221 14.7896L12.9659 14.7052C12.5159 14.2271 11.8409 14.0865 11.2221 14.3677L11.1096 14.424C10.4909 14.6771 10.0971 15.2396 10.0971 15.8865V15.999C10.0971 16.1677 9.95648 16.3083 9.78773 16.3083H8.21273C8.04398 16.3083 7.90335 16.1677 7.90335 15.999V15.8865C7.90335 15.2396 7.5096 14.649 6.89085 14.424C6.80648 14.3958 6.69398 14.3396 6.6096 14.3115C6.3846 14.199 6.1596 14.1708 5.9346 14.1708C5.54085 14.1708 5.1471 14.3115 4.83773 14.6208L4.78148 14.649C4.66898 14.7615 4.4721 14.7615 4.3596 14.649L3.26273 13.524C3.17835 13.4396 3.17835 13.3552 3.17835 13.299C3.17835 13.2427 3.17835 13.1583 3.26273 13.074L3.31898 13.0177C3.7971 12.5677 3.93773 11.8646 3.6846 11.3021C3.65648 11.2177 3.62835 11.1333 3.5721 11.049C3.3471 10.4583 2.7846 10.0365 2.13773 10.0365H2.05335C1.8846 10.0365 1.74398 9.89585 1.74398 9.7271L1.7721 8.1521C1.7721 8.0396 1.82835 7.98335 1.85648 7.9271C1.8846 7.89897 1.96898 7.84272 2.08148 7.84272H2.16585C2.81273 7.87085 3.40335 7.4771 3.65648 6.88647C3.6846 6.8021 3.74085 6.71772 3.76898 6.63335C4.0221 6.07085 3.9096 5.36772 3.4596 4.91772L3.40335 4.83335C3.29085 4.72085 3.29085 4.52397 3.40335 4.41147L4.52835 3.3146C4.61273 3.23022 4.6971 3.23022 4.75335 3.23022C4.8096 3.23022 4.89398 3.23022 4.97835 3.3146L5.0346 3.39897C5.4846 3.8771 6.1596 4.01772 6.77835 3.7646L6.89085 3.70835C7.5096 3.45522 7.90335 2.89272 7.90335 2.24585V2.13335C7.90335 2.02085 7.9596 1.9646 7.98773 1.90835C8.01585 1.8521 8.10023 1.82397 8.21273 1.82397H9.78773C9.95648 1.82397 10.0971 1.9646 10.0971 2.13335V2.24585C10.0971 2.89272 10.4909 3.48335 11.1096 3.70835C11.194 3.73647 11.3065 3.79272 11.3909 3.82085C11.9815 4.1021 12.6846 3.9896 13.1627 3.5396L13.2471 3.48335C13.3596 3.37085 13.5565 3.37085 13.669 3.48335L14.7659 4.60835C14.8502 4.69272 14.8502 4.7771 14.8502 4.83335C14.8502 4.8896 14.8221 4.97397 14.7659 5.05835L14.7096 5.1146C14.2034 5.53647 14.0627 6.2396 14.2877 6.8021C14.3159 6.88647 14.344 6.97085 14.4002 7.05522C14.6252 7.64585 15.1877 8.06772 15.8346 8.06772H15.919C16.0315 8.06772 16.0877 8.12397 16.144 8.1521C16.2002 8.18022 16.2284 8.2646 16.2284 8.3771V9.9521Z",fill:""}),f.jsx("path",{d:"M9.00029 5.22705C6.89092 5.22705 5.17529 6.94268 5.17529 9.05205C5.17529 11.1614 6.89092 12.8771 9.00029 12.8771C11.1097 12.8771 12.8253 11.1614 12.8253 9.05205C12.8253 6.94268 11.1097 5.22705 9.00029 5.22705ZM9.00029 11.6114C7.59404 11.6114 6.44092 10.4583 6.44092 9.05205C6.44092 7.6458 7.59404 6.49268 9.00029 6.49268C10.4065 6.49268 11.5597 7.6458 11.5597 9.05205C11.5597 10.4583 10.4065 11.6114 9.00029 11.6114Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9763",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Settings"]})})]})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"mb-4 ml-4 text-sm font-semibold text-bodydark2",children:"Extra Components"}),f.jsxs("ul",{className:"mb-6 flex flex-col gap-1.5",children:[f.jsx("li",{children:f.jsxs(sr,{to:"/admin/chart",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("chart")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9801)",children:[f.jsx("path",{d:"M10.8563 0.55835C10.5188 0.55835 10.2095 0.8396 10.2095 1.20522V6.83022C10.2095 7.16773 10.4907 7.4771 10.8563 7.4771H16.8751C17.0438 7.4771 17.2126 7.39272 17.3251 7.28022C17.4376 7.1396 17.4938 6.97085 17.4938 6.8021C17.2688 3.28647 14.3438 0.55835 10.8563 0.55835ZM11.4751 6.15522V1.8521C13.8095 2.13335 15.6938 3.8771 16.1438 6.18335H11.4751V6.15522Z",fill:""}),f.jsx("path",{d:"M15.3845 8.7427H9.1126V2.69582C9.1126 2.35832 8.83135 2.07707 8.49385 2.07707C8.40947 2.07707 8.3251 2.07707 8.24072 2.07707C3.96572 2.04895 0.506348 5.53645 0.506348 9.81145C0.506348 14.0864 3.99385 17.5739 8.26885 17.5739C12.5438 17.5739 16.0313 14.0864 16.0313 9.81145C16.0313 9.6427 16.0313 9.47395 16.0032 9.33332C16.0032 8.99582 15.722 8.7427 15.3845 8.7427ZM8.26885 16.3083C4.66885 16.3083 1.77197 13.4114 1.77197 9.81145C1.77197 6.3802 4.47197 3.53957 7.8751 3.3427V9.36145C7.8751 9.69895 8.15635 10.0083 8.52197 10.0083H14.7938C14.6813 13.4958 11.7845 16.3083 8.26885 16.3083Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9801",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Chart"]})}),f.jsx(k0,{activeCondition:s==="/forms"||s.includes("forms"),children:(A,L)=>f.jsxs(ge.Fragment,{children:[f.jsxs(sr,{to:"#",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${(s==="/forms"||s.includes("forms"))&&"bg-gray-700 dark:bg-meta-4"}`,onClick:P=>{P.preventDefault(),v?A():C(!0)},children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M1.43425 7.5093H2.278C2.44675 7.5093 2.55925 7.3968 2.58737 7.31243L2.98112 6.32805H5.90612L6.27175 7.31243C6.328 7.48118 6.46862 7.5093 6.58112 7.5093H7.453C7.76237 7.48118 7.87487 7.25618 7.76237 7.03118L5.428 1.4343C5.37175 1.26555 5.3155 1.23743 5.14675 1.23743H3.88112C3.76862 1.23743 3.59987 1.29368 3.57175 1.4343L1.153 7.08743C1.0405 7.2843 1.20925 7.5093 1.43425 7.5093ZM4.47175 2.98118L5.3155 5.17493H3.59987L4.47175 2.98118Z",fill:""}),f.jsx("path",{d:"M10.1249 2.5031H16.8749C17.2124 2.5031 17.5218 2.22185 17.5218 1.85623C17.5218 1.4906 17.2405 1.20935 16.8749 1.20935H10.1249C9.7874 1.20935 9.47803 1.4906 9.47803 1.85623C9.47803 2.22185 9.75928 2.5031 10.1249 2.5031Z",fill:""}),f.jsx("path",{d:"M16.8749 6.21558H10.1249C9.7874 6.21558 9.47803 6.49683 9.47803 6.86245C9.47803 7.22808 9.75928 7.50933 10.1249 7.50933H16.8749C17.2124 7.50933 17.5218 7.22808 17.5218 6.86245C17.5218 6.49683 17.2124 6.21558 16.8749 6.21558Z",fill:""}),f.jsx("path",{d:"M16.875 11.1656H1.77187C1.43438 11.1656 1.125 11.4469 1.125 11.8125C1.125 12.1781 1.40625 12.4594 1.77187 12.4594H16.875C17.2125 12.4594 17.5219 12.1781 17.5219 11.8125C17.5219 11.4469 17.2125 11.1656 16.875 11.1656Z",fill:""}),f.jsx("path",{d:"M16.875 16.1156H1.77187C1.43438 16.1156 1.125 16.3969 1.125 16.7625C1.125 17.1281 1.40625 17.4094 1.77187 17.4094H16.875C17.2125 17.4094 17.5219 17.1281 17.5219 16.7625C17.5219 16.3969 17.2125 16.1156 16.875 16.1156Z",fill:"white"})]}),"Forms",f.jsx("svg",{className:`absolute right-4 top-1/2 -translate-y-1/2 fill-current ${L&&"rotate-180"}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.41107 6.9107C4.73651 6.58527 5.26414 6.58527 5.58958 6.9107L10.0003 11.3214L14.4111 6.91071C14.7365 6.58527 15.2641 6.58527 15.5896 6.91071C15.915 7.23614 15.915 7.76378 15.5896 8.08922L10.5896 13.0892C10.2641 13.4147 9.73651 13.4147 9.41107 13.0892L4.41107 8.08922C4.08563 7.76378 4.08563 7.23614 4.41107 6.9107Z",fill:""})})]}),f.jsx("div",{className:`translate transform overflow-hidden ${!L&&"hidden"}`,children:f.jsxs("ul",{className:"mt-4 mb-5.5 flex flex-col gap-2.5 pl-6",children:[f.jsx("li",{children:f.jsx(sr,{to:"/admin/forms/form-elements",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Form Elements"})}),f.jsx("li",{children:f.jsx(sr,{to:"/admin/forms/form-layouts",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Form Layout"})})]})})]})}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/calendar",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("calendar")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsx("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M15.7499 2.9812H14.2874V2.36245C14.2874 2.02495 14.0062 1.71558 13.6405 1.71558C13.2749 1.71558 12.9937 1.99683 12.9937 2.36245V2.9812H4.97803V2.36245C4.97803 2.02495 4.69678 1.71558 4.33115 1.71558C3.96553 1.71558 3.68428 1.99683 3.68428 2.36245V2.9812H2.2499C1.29365 2.9812 0.478027 3.7687 0.478027 4.75308V14.5406C0.478027 15.4968 1.26553 16.3125 2.2499 16.3125H15.7499C16.7062 16.3125 17.5218 15.525 17.5218 14.5406V4.72495C17.5218 3.7687 16.7062 2.9812 15.7499 2.9812ZM1.77178 8.21245H4.1624V10.9968H1.77178V8.21245ZM5.42803 8.21245H8.38115V10.9968H5.42803V8.21245ZM8.38115 12.2625V15.0187H5.42803V12.2625H8.38115ZM9.64678 12.2625H12.5999V15.0187H9.64678V12.2625ZM9.64678 10.9968V8.21245H12.5999V10.9968H9.64678ZM13.8374 8.21245H16.228V10.9968H13.8374V8.21245ZM2.2499 4.24683H3.7124V4.83745C3.7124 5.17495 3.99365 5.48433 4.35928 5.48433C4.7249 5.48433 5.00615 5.20308 5.00615 4.83745V4.24683H13.0499V4.83745C13.0499 5.17495 13.3312 5.48433 13.6968 5.48433C14.0624 5.48433 14.3437 5.20308 14.3437 4.83745V4.24683H15.7499C16.0312 4.24683 16.2562 4.47183 16.2562 4.75308V6.94683H1.77178V4.75308C1.77178 4.47183 1.96865 4.24683 2.2499 4.24683ZM1.77178 14.5125V12.2343H4.1624V14.9906H2.2499C1.96865 15.0187 1.77178 14.7937 1.77178 14.5125ZM15.7499 15.0187H13.8374V12.2625H16.228V14.5406C16.2562 14.7937 16.0312 15.0187 15.7499 15.0187Z",fill:""})}),"Calendar"]})}),f.jsx(k0,{activeCondition:s==="/ui"||s.includes("ui"),children:(A,L)=>f.jsxs(ge.Fragment,{children:[f.jsxs(sr,{to:"#",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${(s==="/ui"||s.includes("ui"))&&"bg-gray-700 dark:bg-meta-4"}`,onClick:P=>{P.preventDefault(),v?A():C(!0)},children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9807)",children:[f.jsx("path",{d:"M15.7501 0.55835H2.2501C1.29385 0.55835 0.506348 1.34585 0.506348 2.3021V7.53335C0.506348 8.4896 1.29385 9.2771 2.2501 9.2771H15.7501C16.7063 9.2771 17.4938 8.4896 17.4938 7.53335V2.3021C17.4938 1.34585 16.7063 0.55835 15.7501 0.55835ZM16.2563 7.53335C16.2563 7.8146 16.0313 8.0396 15.7501 8.0396H2.2501C1.96885 8.0396 1.74385 7.8146 1.74385 7.53335V2.3021C1.74385 2.02085 1.96885 1.79585 2.2501 1.79585H15.7501C16.0313 1.79585 16.2563 2.02085 16.2563 2.3021V7.53335Z",fill:""}),f.jsx("path",{d:"M6.13135 10.9646H2.2501C1.29385 10.9646 0.506348 11.7521 0.506348 12.7083V15.8021C0.506348 16.7583 1.29385 17.5458 2.2501 17.5458H6.13135C7.0876 17.5458 7.8751 16.7583 7.8751 15.8021V12.7083C7.90322 11.7521 7.11572 10.9646 6.13135 10.9646ZM6.6376 15.8021C6.6376 16.0833 6.4126 16.3083 6.13135 16.3083H2.2501C1.96885 16.3083 1.74385 16.0833 1.74385 15.8021V12.7083C1.74385 12.4271 1.96885 12.2021 2.2501 12.2021H6.13135C6.4126 12.2021 6.6376 12.4271 6.6376 12.7083V15.8021Z",fill:""}),f.jsx("path",{d:"M15.75 10.9646H11.8688C10.9125 10.9646 10.125 11.7521 10.125 12.7083V15.8021C10.125 16.7583 10.9125 17.5458 11.8688 17.5458H15.75C16.7063 17.5458 17.4938 16.7583 17.4938 15.8021V12.7083C17.4938 11.7521 16.7063 10.9646 15.75 10.9646ZM16.2562 15.8021C16.2562 16.0833 16.0312 16.3083 15.75 16.3083H11.8688C11.5875 16.3083 11.3625 16.0833 11.3625 15.8021V12.7083C11.3625 12.4271 11.5875 12.2021 11.8688 12.2021H15.75C16.0312 12.2021 16.2562 12.4271 16.2562 12.7083V15.8021Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9807",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"UI Elements",f.jsx("svg",{className:`absolute right-4 top-1/2 -translate-y-1/2 fill-current ${L&&"rotate-180"}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.41107 6.9107C4.73651 6.58527 5.26414 6.58527 5.58958 6.9107L10.0003 11.3214L14.4111 6.91071C14.7365 6.58527 15.2641 6.58527 15.5896 6.91071C15.915 7.23614 15.915 7.76378 15.5896 8.08922L10.5896 13.0892C10.2641 13.4147 9.73651 13.4147 9.41107 13.0892L4.41107 8.08922C4.08563 7.76378 4.08563 7.23614 4.41107 6.9107Z",fill:""})})]}),f.jsx("div",{className:`translate transform overflow-hidden ${!L&&"hidden"}`,children:f.jsxs("ul",{className:"mt-4 mb-5.5 flex flex-col gap-2.5 pl-6",children:[f.jsx("li",{children:f.jsx(sr,{to:"/admin/ui/alerts",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Alerts"})}),f.jsx("li",{children:f.jsx(sr,{to:"/admin/ui/buttons",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Buttons"})})]})})]})})]})]})]})})]})},Di=({children:e})=>{const[t,r]=G.useState(!1),{data:s}=Mr();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(AE,{sidebarOpen:t,setSidebarOpen:r}),f.jsxs("div",{className:"relative flex flex-1 flex-col overflow-y-auto overflow-x-hidden",children:[f.jsx(A2,{sidebarOpen:t,setSidebarOpen:r,user:s}),f.jsx("main",{children:f.jsx("div",{className:"mx-auto max-w-screen-2xl p-4 md:p-6 2xl:p-10",children:e})})]})]})})},jE=({user:e})=>{var c;const t=Kr();e.isAdmin||t.push("/");const{data:r,isLoading:s,error:o}=Gn(Q9);return f.jsxs(Di,{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(nE,{totalPageViews:r==null?void 0:r.dailyStats.totalViews,prevDayViewsChangePercent:r==null?void 0:r.dailyStats.prevDayViewsChangePercent}),f.jsx(aE,{dailyStats:r==null?void 0:r.dailyStats,weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx(sE,{dailyStats:r==null?void 0:r.dailyStats,isLoading:s}),f.jsx(iE,{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(CE,{weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx("div",{className:"col-span-12 xl:col-span-8",children:f.jsx(SE,{sources:(c=r==null?void 0:r.dailyStats)==null?void 0:c.sources})})]})]})},Ln=({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})]})})]}),NE=()=>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"})}),EE=()=>{const[e,t]=G.useState(!1),r=G.useRef(null),s=G.useRef(null);return G.useEffect(()=>{const o=({target:c})=>{s.current&&(!e||s.current.contains(c)||r.current.contains(c)||t(!1))};return document.addEventListener("click",o),()=>document.removeEventListener("click",o)}),G.useEffect(()=>{const o=({keyCode:c})=>{!e||c!==27||t(!1)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)}),f.jsxs("div",{className:"relative",children:[f.jsx("button",{ref:r,onClick:()=>t(!e),children:f.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M2.25 11.25C3.49264 11.25 4.5 10.2426 4.5 9C4.5 7.75736 3.49264 6.75 2.25 6.75C1.00736 6.75 0 7.75736 0 9C0 10.2426 1.00736 11.25 2.25 11.25Z",fill:"#98A6AD"}),f.jsx("path",{d:"M9 11.25C10.2426 11.25 11.25 10.2426 11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25Z",fill:"#98A6AD"}),f.jsx("path",{d:"M15.75 11.25C16.9926 11.25 18 10.2426 18 9C18 7.75736 16.9926 6.75 15.75 6.75C14.5074 6.75 13.5 7.75736 13.5 9C13.5 10.2426 14.5074 11.25 15.75 11.25Z",fill:"#98A6AD"})]})}),f.jsxs("div",{ref:s,onFocus:()=>t(!0),onBlur:()=>t(!1),className:`absolute right-0 top-full z-40 w-40 space-y-1 rounded-sm border border-stroke bg-white p-1.5 shadow-default dark:border-strokedark dark:bg-boxdark ${e===!0?"block":"hidden"}`,children:[f.jsxs("button",{className:"flex w-full items-center gap-2 rounded-sm py-1.5 px-4 text-left text-sm hover:bg-gray dark:hover:bg-meta-4",children:[f.jsxs("svg",{className:"fill-current",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_62_9787)",children:f.jsx("path",{d:"M15.55 2.97499C15.55 2.77499 15.475 2.57499 15.325 2.42499C15.025 2.12499 14.725 1.82499 14.45 1.52499C14.175 1.24999 13.925 0.974987 13.65 0.724987C13.525 0.574987 13.375 0.474986 13.175 0.449986C12.95 0.424986 12.75 0.474986 12.575 0.624987L10.875 2.32499H2.02495C1.17495 2.32499 0.449951 3.02499 0.449951 3.89999V14C0.449951 14.85 1.14995 15.575 2.02495 15.575H12.15C13 15.575 13.725 14.875 13.725 14V5.12499L15.35 3.49999C15.475 3.34999 15.55 3.17499 15.55 2.97499ZM8.19995 8.99999C8.17495 9.02499 8.17495 9.02499 8.14995 9.02499L6.34995 9.62499L6.94995 7.82499C6.94995 7.79999 6.97495 7.79999 6.97495 7.77499L11.475 3.27499L12.725 4.49999L8.19995 8.99999ZM12.575 14C12.575 14.25 12.375 14.45 12.125 14.45H2.02495C1.77495 14.45 1.57495 14.25 1.57495 14V3.87499C1.57495 3.62499 1.77495 3.42499 2.02495 3.42499H9.72495L6.17495 6.99999C6.04995 7.12499 5.92495 7.29999 5.87495 7.49999L4.94995 10.3C4.87495 10.5 4.92495 10.675 5.02495 10.85C5.09995 10.95 5.24995 11.1 5.52495 11.1H5.62495L8.49995 10.15C8.67495 10.1 8.84995 9.97499 8.97495 9.84999L12.575 6.24999V14ZM13.5 3.72499L12.25 2.49999L13.025 1.72499C13.225 1.92499 14.05 2.74999 14.25 2.97499L13.5 3.72499Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_62_9787",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),"Edit"]}),f.jsxs("button",{className:"flex w-full items-center gap-2 rounded-sm py-1.5 px-4 text-left text-sm hover:bg-gray dark:hover:bg-meta-4",children:[f.jsxs("svg",{className:"fill-current",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M12.225 2.20005H10.3V1.77505C10.3 1.02505 9.70005 0.425049 8.95005 0.425049H7.02505C6.27505 0.425049 5.67505 1.02505 5.67505 1.77505V2.20005H3.75005C3.02505 2.20005 2.42505 2.80005 2.42505 3.52505V4.27505C2.42505 4.82505 2.75005 5.27505 3.22505 5.47505L3.62505 13.75C3.67505 14.775 4.52505 15.575 5.55005 15.575H10.4C11.425 15.575 12.275 14.775 12.325 13.75L12.75 5.45005C13.225 5.25005 13.55 4.77505 13.55 4.25005V3.50005C13.55 2.80005 12.95 2.20005 12.225 2.20005ZM6.82505 1.77505C6.82505 1.65005 6.92505 1.55005 7.05005 1.55005H8.97505C9.10005 1.55005 9.20005 1.65005 9.20005 1.77505V2.20005H6.85005V1.77505H6.82505ZM3.57505 3.52505C3.57505 3.42505 3.65005 3.32505 3.77505 3.32505H12.225C12.325 3.32505 12.425 3.40005 12.425 3.52505V4.27505C12.425 4.37505 12.35 4.47505 12.225 4.47505H3.77505C3.67505 4.47505 3.57505 4.40005 3.57505 4.27505V3.52505V3.52505ZM10.425 14.45H5.57505C5.15005 14.45 4.80005 14.125 4.77505 13.675L4.40005 5.57505H11.625L11.25 13.675C11.2 14.1 10.85 14.45 10.425 14.45Z",fill:""}),f.jsx("path",{d:"M8.00005 8.1001C7.70005 8.1001 7.42505 8.3501 7.42505 8.6751V11.8501C7.42505 12.1501 7.67505 12.4251 8.00005 12.4251C8.30005 12.4251 8.57505 12.1751 8.57505 11.8501V8.6751C8.57505 8.3501 8.30005 8.1001 8.00005 8.1001Z",fill:""}),f.jsx("path",{d:"M9.99994 8.60004C9.67494 8.57504 9.42494 8.80004 9.39994 9.12504L9.24994 11.325C9.22494 11.625 9.44994 11.9 9.77494 11.925C9.79994 11.925 9.79994 11.925 9.82494 11.925C10.1249 11.925 10.3749 11.7 10.3749 11.4L10.5249 9.20004C10.5249 8.87504 10.2999 8.62504 9.99994 8.60004Z",fill:""}),f.jsx("path",{d:"M5.97497 8.60004C5.67497 8.62504 5.42497 8.90004 5.44997 9.20004L5.62497 11.4C5.64997 11.7 5.89997 11.925 6.17497 11.925C6.19997 11.925 6.19997 11.925 6.22497 11.925C6.52497 11.9 6.77497 11.625 6.74997 11.325L6.57497 9.12504C6.57497 8.80004 6.29997 8.57504 5.97497 8.60004Z",fill:""})]}),"Delete"]})]})]})},LE=()=>{var M;const[e,t]=G.useState(0),[r,s]=G.useState(1),[o,c]=G.useState(void 0),[p,v]=G.useState([]),[C,A]=G.useState(void 0),{data:L,isLoading:P,error:z}=Gn(K9,{skip:e,hasPaidFilter:C,emailContains:o,subscriptionStatus:(p==null?void 0:p.length)>0?p:void 0});return G.useEffect(()=>{s(1)},[o,p]),G.useEffect(()=>{t((r-1)*10)},[r]),f.jsx("div",{className:"flex flex-col gap-4",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsxs("div",{className:"flex-col flex items-start justify-between p-6 gap-3 w-full bg-gray-100/40 dark:bg-gray-700/50",children:[f.jsx("span",{className:"text-sm font-medium",children:"Filters:"}),f.jsxs("div",{className:"flex items-center justify-between gap-3 w-full px-2",children:[f.jsxs("div",{className:"relative flex items-center gap-3 ",children:[f.jsx("label",{htmlFor:"email-filter",className:"block text-sm text-gray-700 dark:text-white",children:"email:"}),f.jsx("input",{type:"text",id:"email-filter",placeholder:"dude@example.com",onChange:H=>{c(H.currentTarget.value)},className:"rounded border border-stroke py-2 px-5 bg-white outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"}),f.jsx("label",{htmlFor:"status-filter",className:"block text-sm ml-2 text-gray-700 dark:text-white",children:"status:"}),f.jsxs("div",{className:"flex-grow relative z-20 rounded border border-stroke pr-8 outline-none bg-white transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsx("div",{className:"flex items-center",children:p&&p.length>0?p.map((H,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:q=>{q.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(q=>q!==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:L==null?void 0:L.totalPages,onChange:H=>{s(parseInt(H.currentTarget.value))},className:"rounded-md border-1 border-stroke bg-transparent px-4 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"}),f.jsxs("span",{className:"text-md text-black dark:text-white",children:[" ","/ ",L==null?void 0:L.totalPages," "]})]})]})]}),f.jsxs("div",{className:"grid grid-cols-12 border-t-4 border-stroke py-4.5 px-4 dark:border-strokedark md:px-6 ",children:[f.jsx("div",{className:"col-span-3 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Email / Username"})}),f.jsx("div",{className:"col-span-3 hidden items-center sm:flex",children:f.jsx("p",{className:"font-medium",children:"Last Active"})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Subscription Status"})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Stripe ID"})}),f.jsx("div",{className:"col-span-1 flex items-center",children:f.jsx("p",{className:"font-medium"})})]}),P&&f.jsx("div",{className:"-mt-40",children:f.jsx(NE,{})}),!!(L!=null&&L.users)&&((M=L==null?void 0:L.users)==null?void 0:M.length)>0&&L.users.map(H=>f.jsxs("div",{className:"grid grid-cols-12 gap-4 border-t border-stroke py-4.5 px-4 dark:border-strokedark md:px-6 ",children:[f.jsx("div",{className:"col-span-3 flex items-center",children:f.jsxs("div",{className:"flex flex-col gap-1 ",children:[f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.email}),f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.username})]})}),f.jsx("div",{className:"col-span-3 hidden items-center sm:flex",children:f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.lastActiveTimestamp.toLocaleDateString()+" "+H.lastActiveTimestamp.toLocaleTimeString()})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.subscriptionStatus})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"text-sm text-meta-3",children:H.stripeId})}),f.jsx("div",{className:"col-span-1 flex items-center",children:f.jsx(EE,{})})]},H.id))]})})},PE=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"Users"}),f.jsx("div",{className:"flex flex-col gap-10",children:f.jsx(LE,{})})]});let TE={data:""},RE=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||TE,_E=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ME=/\/\*[^]*?\*\/| +/g,C0=/\n+/g,Ji=(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"?Ji(p,c):c+"{"+Ji(p,c[1]=="k"?"":t)+"}":typeof p=="object"?s+=Ji(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+=Ji.p?Ji.p(c,p):c+":"+p+";")}return r+(t&&o?t+"{"+o+"}":o)+s},bi={},K2=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+K2(e[r]);return t}return e},OE=(e,t,r,s,o)=>{let c=K2(e),p=bi[c]||(bi[c]=(C=>{let A=0,L=11;for(;A>>0;return"go"+L})(c));if(!bi[p]){let C=c!==e?e:(A=>{let L,P,z=[{}];for(;L=_E.exec(A.replace(ME,""));)L[4]?z.shift():L[3]?(P=L[3].replace(C0," ").trim(),z.unshift(z[0][P]=z[0][P]||{})):z[0][L[1]]=L[2].replace(C0," ").trim();return z[0]})(e);bi[p]=Ji(o?{["@keyframes "+p]:C}:C,r?"":"."+p)}let v=r&&bi.g?bi.g:null;return r&&(bi.g=bi[p]),((C,A,L,P)=>{P?A.data=A.data.replace(P,C):A.data.indexOf(C)===-1&&(A.data=L?C+A.data:A.data+C)})(bi[p],t,s,v),p},IE=(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?"":Ji(v,""):v===!1?"":v}return s+o+(p??"")},"");function Wd(e){let t=this||{},r=e.call?e(t.p):e;return OE(r.unshift?r.raw?IE(r,[].slice.call(arguments,1),t.p):r.reduce((s,o)=>Object.assign(s,o&&o.call?o(t.p):o),{}):r,RE(t.target),t.g,t.o,t.k)}let J2,Mf,Of;Wd.bind({g:1});let Ii=Wd.bind({k:1});function zE(e,t,r,s){Ji.p=t,J2=e,Mf=r,Of=s}function Pn(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:Mf&&Mf()},v),r.o=/ *go\d+/.test(C),v.className=Wd.apply(r,s)+(C?" "+C:"");let A=e;return e[0]&&(A=v.as||e,delete v.as),Of&&A[0]&&Of(v),J2(A,v)}return t?t(o):o}}var FE=e=>typeof e=="function",If=(e,t)=>FE(e)?e(t):e,DE=(()=>{let e=0;return()=>(++e).toString()})(),HE=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),BE=20,rc=new Map,VE=1e3,S0=e=>{if(rc.has(e))return;let t=setTimeout(()=>{rc.delete(e),$d({type:4,toastId:e})},VE);rc.set(e,t)},WE=e=>{let t=rc.get(e);t&&clearTimeout(t)},zf=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,BE)};case 1:return t.toast.id&&WE(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)?zf(e,{type:1,toast:r}):zf(e,{type:0,toast:r});case 3:let{toastId:s}=t;return s?S0(s):e.toasts.forEach(c=>{S0(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}))}}},$E=[],qu={toasts:[],pausedAt:void 0},$d=e=>{qu=zf(qu,e),$E.forEach(t=>{t(qu)})},XE=(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)||DE()}),qo=e=>(t,r)=>{let s=XE(t,e,r);return $d({type:2,toast:s}),s.id},Xr=(e,t)=>qo("blank")(e,t);Xr.error=qo("error");Xr.success=qo("success");Xr.loading=qo("loading");Xr.custom=qo("custom");Xr.dismiss=e=>{$d({type:3,toastId:e})};Xr.remove=e=>$d({type:4,toastId:e});Xr.promise=(e,t,r)=>{let s=Xr.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(o=>(Xr.success(If(t.success,o),{id:s,...r,...r==null?void 0:r.success}),o)).catch(o=>{Xr.error(If(t.error,o),{id:s,...r,...r==null?void 0:r.error})}),e};var YE=Ii` +}`;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 _1(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 Qo(a);var h,g,x=a.grid.drawGrid();if(a.annotations=new Fe(a),a.annotations.drawImageAnnos(),a.annotations.drawTextAnnos(),l.config.grid.position==="back"&&(x&&l.globals.dom.elGraphical.add(x.el),x!=null&&(h=x.elGridBorders)!==null&&h!==void 0&&h.node&&l.globals.dom.elGraphical.add(x.elGridBorders)),Array.isArray(n.elGraph))for(var y=0;y0&&l.globals.memory.methodsToExec.forEach(function(j){j.method(j.params,!1,j.context)}),l.globals.axisCharts||l.globals.noData||a.core.resizeNonAxisCharts(),d(a)})}},{key:"destroy",value:function(){var i,n;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,i=this.parentResizeHandler,(n=Zd.get(i))&&(n.disconnect(),Zd.delete(i));var a=this.w.config.chart.id;a&&Apex._chartInstances.forEach(function(l,d){l.id===_.escapeString(a)&&Apex._chartInstances.splice(d,1)}),new M1(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 us(this.ctx).getMinYMaxY(i).highestY}},{key:"getLowestValueInSeries",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new us(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 ds(this.ctx).dataURI(i)}},{key:"exportToCSV",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new ds(this.ctx).exportToCSV(i)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var i=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){i.w.globals.resized=!0,i.w.globals.dataChanged=!1,i.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var i=this.w.config.chart.redrawOnWindowResize;typeof i=="function"&&(i=i()),i&&this._windowResize()}}],[{key:"getChartByID",value:function(i){var n=_.escapeString(i);if(Apex._chartInstances){var a=Apex._chartInstances.filter(function(l){return l.id===n})[0];return a&&a.chart}}},{key:"initOnLoad",value:function(){for(var i=document.querySelectorAll("[data-apexcharts]"),n=0;n2?d-2:0),h=2;h{const r=G.useMemo(()=>{if(e&&(e==null?void 0:e.length)>0)return(e==null?void 0:e.sort((A,L)=>new Date(A.date).getTime()-new Date(L.date).getTime())).map(A=>A.totalRevenue)},[e]),s=G.useMemo(()=>{if(e&&(e==null?void 0:e.length)>0)return e==null?void 0:e.map(A=>A.date.toString().split(" ").slice(0,3).join(" "))},[e]),[o,c]=G.useState({series:[{name:"Profit",data:[4,7,10,11,13,14,17]}]}),[p,v]=G.useState(Pl);return G.useEffect(()=>{r&&r.length>0&&c(C=>{const A=C.series.findIndex(L=>L.name==="Revenue");return A>=0?{...C,series:C.series.map((L,P)=>P===A?{...L,data:r}:L)}:{...C,series:[...C.series,{name:"Revenue",data:r}]}})},[r]),G.useEffect(()=>{s&&(s==null?void 0:s.length)>0&&r&&(r==null?void 0:r.length)>0&&v({...Pl,xaxis:{...Pl.xaxis,categories:s},yaxis:{...Pl.yaxis,max:Math.ceil(Math.max(...r)/100)*100,min:Math.floor(Math.min(...r)/100)*100}})},[s,r]),f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:col-span-8",children:[f.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 sm:flex-nowrap",children:[f.jsxs("div",{className:"flex w-full flex-wrap gap-3 sm:gap-5",children:[f.jsxs("div",{className:"flex min-w-47.5",children:[f.jsx("span",{className:"mt-1 mr-2 flex h-4 w-full max-w-4 items-center justify-center rounded-full border border-primary",children:f.jsx("span",{className:"block h-2.5 w-full max-w-2.5 rounded-full bg-primary"})}),f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"font-semibold text-primary",children:"Total Profit"}),f.jsx("p",{className:"text-sm font-medium",children:"Last 7 Days"})]})]}),f.jsxs("div",{className:"flex min-w-47.5",children:[f.jsx("span",{className:"mt-1 mr-2 flex h-4 w-full max-w-4 items-center justify-center rounded-full border border-secondary",children:f.jsx("span",{className:"block h-2.5 w-full max-w-2.5 rounded-full bg-secondary"})}),f.jsxs("div",{className:"w-full",children:[f.jsx("p",{className:"font-semibold text-secondary",children:"Total Revenue"}),f.jsx("p",{className:"text-sm font-medium",children:"Last 7 Days"})]})]})]}),f.jsx("div",{className:"flex w-full max-w-45 justify-end",children:f.jsxs("div",{className:"inline-flex items-center rounded-md bg-whiter p-1.5 dark:bg-meta-4",children:[f.jsx("button",{className:"rounded bg-white py-1 px-3 text-xs font-medium text-black shadow-card hover:bg-white hover:shadow-card dark:bg-boxdark dark:text-white dark:hover:bg-boxdark",children:"Day"}),f.jsx("button",{className:"rounded py-1 px-3 text-xs font-medium text-black hover:bg-white hover:shadow-card dark:text-white dark:hover:bg-boxdark",children:"Week"}),f.jsx("button",{className:"rounded py-1 px-3 text-xs font-medium text-black hover:bg-white hover:shadow-card dark:text-white dark:hover:bg-boxdark",children:"Month"})]})})]}),f.jsx("div",{children:f.jsx("div",{id:"chartOne",className:"-ml-5",children:f.jsx(Vd,{options:p,series:o.series,type:"area",height:350})})})]})},SE=({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"})})]})]}),k0=({children:e,activeCondition:t})=>{const[r,s]=G.useState(t),o=()=>{s(!r)};return f.jsx("li",{children:e(o,r)})},AE=({sidebarOpen:e,setSidebarOpen:t})=>{const r=aa(),{pathname:s}=r,o=G.useRef(null),c=G.useRef(null),p=localStorage.getItem("sidebar-expanded"),[v,C]=G.useState(p===null?!1:p==="true");return G.useEffect(()=>{const A=({target:L})=>{!c.current||!o.current||!e||c.current.contains(L)||o.current.contains(L)||t(!1)};return document.addEventListener("click",A),()=>document.removeEventListener("click",A)}),G.useEffect(()=>{const A=({keyCode:L})=>{!e||L!==27||t(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)}),G.useEffect(()=>{var A,L;localStorage.setItem("sidebar-expanded",v.toString()),v?(A=document.querySelector("body"))==null||A.classList.add("sidebar-expanded"):(L=document.querySelector("body"))==null||L.classList.remove("sidebar-expanded")},[v]),f.jsxs("aside",{ref:c,className:`absolute left-0 top-0 z-9999 flex h-screen w-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(sr,{to:"/",children:f.jsx("img",{src:A2,alt:"Logo",className:"h-10 w-auto -mt-1 "})}),f.jsx("button",{ref:o,onClick:()=>t(!e),"aria-controls":"sidebar","aria-expanded":e,className:"block lg:hidden text-captn-light-cream",children:f.jsx("svg",{className:"fill-current",width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M19 8.175H2.98748L9.36248 1.6875C9.69998 1.35 9.69998 0.825 9.36248 0.4875C9.02498 0.15 8.49998 0.15 8.16248 0.4875L0.399976 8.3625C0.0624756 8.7 0.0624756 9.225 0.399976 9.5625L8.16248 17.4375C8.31248 17.5875 8.53748 17.7 8.76248 17.7C8.98748 17.7 9.17498 17.625 9.36248 17.475C9.69998 17.1375 9.69998 16.6125 9.36248 16.275L3.02498 9.8625H19C19.45 9.8625 19.825 9.4875 19.825 9.0375C19.825 8.55 19.45 8.175 19 8.175Z",fill:""})})})]}),f.jsx("div",{className:"no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear",children:f.jsxs("nav",{className:"mt-5 py-4 px-4 lg:mt-9 lg:px-6",children:[f.jsxs("div",{children:[f.jsx("h3",{className:"mb-4 ml-4 text-sm font-semibold text-bodydark2",children:"MENU"}),f.jsxs("ul",{className:"mb-6 flex flex-col gap-1.5",children:[f.jsxs(sr,{to:"/admin",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s==="/"&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M6.10322 0.956299H2.53135C1.5751 0.956299 0.787598 1.7438 0.787598 2.70005V6.27192C0.787598 7.22817 1.5751 8.01567 2.53135 8.01567H6.10322C7.05947 8.01567 7.84697 7.22817 7.84697 6.27192V2.72817C7.8751 1.7438 7.0876 0.956299 6.10322 0.956299ZM6.60947 6.30005C6.60947 6.5813 6.38447 6.8063 6.10322 6.8063H2.53135C2.2501 6.8063 2.0251 6.5813 2.0251 6.30005V2.72817C2.0251 2.44692 2.2501 2.22192 2.53135 2.22192H6.10322C6.38447 2.22192 6.60947 2.44692 6.60947 2.72817V6.30005Z",fill:""}),f.jsx("path",{d:"M15.4689 0.956299H11.8971C10.9408 0.956299 10.1533 1.7438 10.1533 2.70005V6.27192C10.1533 7.22817 10.9408 8.01567 11.8971 8.01567H15.4689C16.4252 8.01567 17.2127 7.22817 17.2127 6.27192V2.72817C17.2127 1.7438 16.4252 0.956299 15.4689 0.956299ZM15.9752 6.30005C15.9752 6.5813 15.7502 6.8063 15.4689 6.8063H11.8971C11.6158 6.8063 11.3908 6.5813 11.3908 6.30005V2.72817C11.3908 2.44692 11.6158 2.22192 11.8971 2.22192H15.4689C15.7502 2.22192 15.9752 2.44692 15.9752 2.72817V6.30005Z",fill:""}),f.jsx("path",{d:"M6.10322 9.92822H2.53135C1.5751 9.92822 0.787598 10.7157 0.787598 11.672V15.2438C0.787598 16.2001 1.5751 16.9876 2.53135 16.9876H6.10322C7.05947 16.9876 7.84697 16.2001 7.84697 15.2438V11.7001C7.8751 10.7157 7.0876 9.92822 6.10322 9.92822ZM6.60947 15.272C6.60947 15.5532 6.38447 15.7782 6.10322 15.7782H2.53135C2.2501 15.7782 2.0251 15.5532 2.0251 15.272V11.7001C2.0251 11.4188 2.2501 11.1938 2.53135 11.1938H6.10322C6.38447 11.1938 6.60947 11.4188 6.60947 11.7001V15.272Z",fill:""}),f.jsx("path",{d:"M15.4689 9.92822H11.8971C10.9408 9.92822 10.1533 10.7157 10.1533 11.672V15.2438C10.1533 16.2001 10.9408 16.9876 11.8971 16.9876H15.4689C16.4252 16.9876 17.2127 16.2001 17.2127 15.2438V11.7001C17.2127 10.7157 16.4252 9.92822 15.4689 9.92822ZM15.9752 15.272C15.9752 15.5532 15.7502 15.7782 15.4689 15.7782H11.8971C11.6158 15.7782 11.3908 15.5532 11.3908 15.272V11.7001C11.3908 11.4188 11.6158 11.1938 11.8971 11.1938H15.4689C15.7502 11.1938 15.9752 11.4188 15.9752 11.7001V15.272Z",fill:""})]}),"Dashboard"]}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/users",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("users")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_130_9756)",children:f.jsx("path",{d:"M15.7501 0.55835H2.2501C1.29385 0.55835 0.506348 1.34585 0.506348 2.3021V15.8021C0.506348 16.7584 1.29385 17.574 2.27822 17.574H15.7782C16.7345 17.574 17.5501 16.7865 17.5501 15.8021V2.3021C17.522 1.34585 16.7063 0.55835 15.7501 0.55835ZM6.69385 10.599V6.4646H11.3063V10.5709H6.69385V10.599ZM11.3063 11.8646V16.3083H6.69385V11.8646H11.3063ZM1.77197 6.4646H5.45635V10.5709H1.77197V6.4646ZM12.572 6.4646H16.2563V10.5709H12.572V6.4646ZM2.2501 1.82397H15.7501C16.0313 1.82397 16.2563 2.04897 16.2563 2.33022V5.2271H1.77197V2.3021C1.77197 2.02085 1.96885 1.82397 2.2501 1.82397ZM1.77197 15.8021V11.8646H5.45635V16.3083H2.2501C1.96885 16.3083 1.77197 16.0834 1.77197 15.8021ZM15.7501 16.3083H12.572V11.8646H16.2563V15.8021C16.2563 16.0834 16.0313 16.3083 15.7501 16.3083Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9756",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Users"]})}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/settings",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("settings")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9763)",children:[f.jsx("path",{d:"M17.0721 7.30835C16.7909 6.99897 16.3971 6.83022 15.9752 6.83022H15.8909C15.7502 6.83022 15.6377 6.74585 15.6096 6.63335C15.5815 6.52085 15.5252 6.43647 15.4971 6.32397C15.4409 6.21147 15.4971 6.09897 15.5815 6.0146L15.6377 5.95835C15.9471 5.6771 16.1159 5.28335 16.1159 4.86147C16.1159 4.4396 15.9752 4.04585 15.6659 3.73647L14.569 2.61147C13.9784 1.99272 12.9659 1.9646 12.3471 2.58335L12.2627 2.6396C12.1784 2.72397 12.0377 2.7521 11.8971 2.69585C11.7846 2.6396 11.6721 2.58335 11.5315 2.55522C11.3909 2.49897 11.3065 2.38647 11.3065 2.27397V2.13335C11.3065 1.26147 10.6034 0.55835 9.73148 0.55835H8.15648C7.7346 0.55835 7.34085 0.7271 7.0596 1.00835C6.75023 1.31772 6.6096 1.71147 6.6096 2.10522V2.21772C6.6096 2.33022 6.52523 2.44272 6.41273 2.49897C6.35648 2.5271 6.32835 2.5271 6.2721 2.55522C6.1596 2.61147 6.01898 2.58335 5.9346 2.49897L5.87835 2.4146C5.5971 2.10522 5.20335 1.93647 4.78148 1.93647C4.3596 1.93647 3.96585 2.0771 3.65648 2.38647L2.53148 3.48335C1.91273 4.07397 1.8846 5.08647 2.50335 5.70522L2.5596 5.7896C2.64398 5.87397 2.6721 6.0146 2.61585 6.09897C2.5596 6.21147 2.53148 6.29585 2.47523 6.40835C2.41898 6.52085 2.3346 6.5771 2.19398 6.5771H2.1096C1.68773 6.5771 1.29398 6.71772 0.984604 7.0271C0.675229 7.30835 0.506479 7.7021 0.506479 8.12397L0.478354 9.69897C0.450229 10.5708 1.15335 11.274 2.02523 11.3021H2.1096C2.25023 11.3021 2.36273 11.3865 2.39085 11.499C2.4471 11.5833 2.50335 11.6677 2.53148 11.7802C2.5596 11.8927 2.53148 12.0052 2.4471 12.0896L2.39085 12.1458C2.08148 12.4271 1.91273 12.8208 1.91273 13.2427C1.91273 13.6646 2.05335 14.0583 2.36273 14.3677L3.4596 15.4927C4.05023 16.1115 5.06273 16.1396 5.68148 15.5208L5.76585 15.4646C5.85023 15.3802 5.99085 15.3521 6.13148 15.4083C6.24398 15.4646 6.35648 15.5208 6.4971 15.549C6.63773 15.6052 6.7221 15.7177 6.7221 15.8302V15.9427C6.7221 16.8146 7.42523 17.5177 8.2971 17.5177H9.8721C10.744 17.5177 11.4471 16.8146 11.4471 15.9427V15.8302C11.4471 15.7177 11.5315 15.6052 11.644 15.549C11.7002 15.5208 11.7284 15.5208 11.7846 15.4927C11.9252 15.4365 12.0377 15.4646 12.1221 15.549L12.1784 15.6333C12.4596 15.9427 12.8534 16.1115 13.2752 16.1115C13.6971 16.1115 14.0909 15.9708 14.4002 15.6615L15.5252 14.5646C16.144 13.974 16.1721 12.9615 15.5534 12.3427L15.4971 12.2583C15.4127 12.174 15.3846 12.0333 15.4409 11.949C15.4971 11.8365 15.5252 11.7521 15.5815 11.6396C15.6377 11.5271 15.7502 11.4708 15.8627 11.4708H15.9471H15.9752C16.819 11.4708 17.5221 10.7958 17.5502 9.92397L17.5784 8.34897C17.5221 8.01147 17.3534 7.5896 17.0721 7.30835ZM16.2284 9.9521C16.2284 10.1208 16.0877 10.2615 15.919 10.2615H15.8346H15.8065C15.1596 10.2615 14.569 10.6552 14.344 11.2177C14.3159 11.3021 14.2596 11.3865 14.2315 11.4708C13.9784 12.0333 14.0909 12.7365 14.5409 13.1865L14.5971 13.2708C14.7096 13.3833 14.7096 13.5802 14.5971 13.6927L13.4721 14.7896C13.3877 14.874 13.3034 14.874 13.2471 14.874C13.1909 14.874 13.1065 14.874 13.0221 14.7896L12.9659 14.7052C12.5159 14.2271 11.8409 14.0865 11.2221 14.3677L11.1096 14.424C10.4909 14.6771 10.0971 15.2396 10.0971 15.8865V15.999C10.0971 16.1677 9.95648 16.3083 9.78773 16.3083H8.21273C8.04398 16.3083 7.90335 16.1677 7.90335 15.999V15.8865C7.90335 15.2396 7.5096 14.649 6.89085 14.424C6.80648 14.3958 6.69398 14.3396 6.6096 14.3115C6.3846 14.199 6.1596 14.1708 5.9346 14.1708C5.54085 14.1708 5.1471 14.3115 4.83773 14.6208L4.78148 14.649C4.66898 14.7615 4.4721 14.7615 4.3596 14.649L3.26273 13.524C3.17835 13.4396 3.17835 13.3552 3.17835 13.299C3.17835 13.2427 3.17835 13.1583 3.26273 13.074L3.31898 13.0177C3.7971 12.5677 3.93773 11.8646 3.6846 11.3021C3.65648 11.2177 3.62835 11.1333 3.5721 11.049C3.3471 10.4583 2.7846 10.0365 2.13773 10.0365H2.05335C1.8846 10.0365 1.74398 9.89585 1.74398 9.7271L1.7721 8.1521C1.7721 8.0396 1.82835 7.98335 1.85648 7.9271C1.8846 7.89897 1.96898 7.84272 2.08148 7.84272H2.16585C2.81273 7.87085 3.40335 7.4771 3.65648 6.88647C3.6846 6.8021 3.74085 6.71772 3.76898 6.63335C4.0221 6.07085 3.9096 5.36772 3.4596 4.91772L3.40335 4.83335C3.29085 4.72085 3.29085 4.52397 3.40335 4.41147L4.52835 3.3146C4.61273 3.23022 4.6971 3.23022 4.75335 3.23022C4.8096 3.23022 4.89398 3.23022 4.97835 3.3146L5.0346 3.39897C5.4846 3.8771 6.1596 4.01772 6.77835 3.7646L6.89085 3.70835C7.5096 3.45522 7.90335 2.89272 7.90335 2.24585V2.13335C7.90335 2.02085 7.9596 1.9646 7.98773 1.90835C8.01585 1.8521 8.10023 1.82397 8.21273 1.82397H9.78773C9.95648 1.82397 10.0971 1.9646 10.0971 2.13335V2.24585C10.0971 2.89272 10.4909 3.48335 11.1096 3.70835C11.194 3.73647 11.3065 3.79272 11.3909 3.82085C11.9815 4.1021 12.6846 3.9896 13.1627 3.5396L13.2471 3.48335C13.3596 3.37085 13.5565 3.37085 13.669 3.48335L14.7659 4.60835C14.8502 4.69272 14.8502 4.7771 14.8502 4.83335C14.8502 4.8896 14.8221 4.97397 14.7659 5.05835L14.7096 5.1146C14.2034 5.53647 14.0627 6.2396 14.2877 6.8021C14.3159 6.88647 14.344 6.97085 14.4002 7.05522C14.6252 7.64585 15.1877 8.06772 15.8346 8.06772H15.919C16.0315 8.06772 16.0877 8.12397 16.144 8.1521C16.2002 8.18022 16.2284 8.2646 16.2284 8.3771V9.9521Z",fill:""}),f.jsx("path",{d:"M9.00029 5.22705C6.89092 5.22705 5.17529 6.94268 5.17529 9.05205C5.17529 11.1614 6.89092 12.8771 9.00029 12.8771C11.1097 12.8771 12.8253 11.1614 12.8253 9.05205C12.8253 6.94268 11.1097 5.22705 9.00029 5.22705ZM9.00029 11.6114C7.59404 11.6114 6.44092 10.4583 6.44092 9.05205C6.44092 7.6458 7.59404 6.49268 9.00029 6.49268C10.4065 6.49268 11.5597 7.6458 11.5597 9.05205C11.5597 10.4583 10.4065 11.6114 9.00029 11.6114Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9763",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Settings"]})})]})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"mb-4 ml-4 text-sm font-semibold text-bodydark2",children:"Extra Components"}),f.jsxs("ul",{className:"mb-6 flex flex-col gap-1.5",children:[f.jsx("li",{children:f.jsxs(sr,{to:"/admin/chart",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("chart")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9801)",children:[f.jsx("path",{d:"M10.8563 0.55835C10.5188 0.55835 10.2095 0.8396 10.2095 1.20522V6.83022C10.2095 7.16773 10.4907 7.4771 10.8563 7.4771H16.8751C17.0438 7.4771 17.2126 7.39272 17.3251 7.28022C17.4376 7.1396 17.4938 6.97085 17.4938 6.8021C17.2688 3.28647 14.3438 0.55835 10.8563 0.55835ZM11.4751 6.15522V1.8521C13.8095 2.13335 15.6938 3.8771 16.1438 6.18335H11.4751V6.15522Z",fill:""}),f.jsx("path",{d:"M15.3845 8.7427H9.1126V2.69582C9.1126 2.35832 8.83135 2.07707 8.49385 2.07707C8.40947 2.07707 8.3251 2.07707 8.24072 2.07707C3.96572 2.04895 0.506348 5.53645 0.506348 9.81145C0.506348 14.0864 3.99385 17.5739 8.26885 17.5739C12.5438 17.5739 16.0313 14.0864 16.0313 9.81145C16.0313 9.6427 16.0313 9.47395 16.0032 9.33332C16.0032 8.99582 15.722 8.7427 15.3845 8.7427ZM8.26885 16.3083C4.66885 16.3083 1.77197 13.4114 1.77197 9.81145C1.77197 6.3802 4.47197 3.53957 7.8751 3.3427V9.36145C7.8751 9.69895 8.15635 10.0083 8.52197 10.0083H14.7938C14.6813 13.4958 11.7845 16.3083 8.26885 16.3083Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9801",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"Chart"]})}),f.jsx(k0,{activeCondition:s==="/forms"||s.includes("forms"),children:(A,L)=>f.jsxs(ge.Fragment,{children:[f.jsxs(sr,{to:"#",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${(s==="/forms"||s.includes("forms"))&&"bg-gray-700 dark:bg-meta-4"}`,onClick:P=>{P.preventDefault(),v?A():C(!0)},children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M1.43425 7.5093H2.278C2.44675 7.5093 2.55925 7.3968 2.58737 7.31243L2.98112 6.32805H5.90612L6.27175 7.31243C6.328 7.48118 6.46862 7.5093 6.58112 7.5093H7.453C7.76237 7.48118 7.87487 7.25618 7.76237 7.03118L5.428 1.4343C5.37175 1.26555 5.3155 1.23743 5.14675 1.23743H3.88112C3.76862 1.23743 3.59987 1.29368 3.57175 1.4343L1.153 7.08743C1.0405 7.2843 1.20925 7.5093 1.43425 7.5093ZM4.47175 2.98118L5.3155 5.17493H3.59987L4.47175 2.98118Z",fill:""}),f.jsx("path",{d:"M10.1249 2.5031H16.8749C17.2124 2.5031 17.5218 2.22185 17.5218 1.85623C17.5218 1.4906 17.2405 1.20935 16.8749 1.20935H10.1249C9.7874 1.20935 9.47803 1.4906 9.47803 1.85623C9.47803 2.22185 9.75928 2.5031 10.1249 2.5031Z",fill:""}),f.jsx("path",{d:"M16.8749 6.21558H10.1249C9.7874 6.21558 9.47803 6.49683 9.47803 6.86245C9.47803 7.22808 9.75928 7.50933 10.1249 7.50933H16.8749C17.2124 7.50933 17.5218 7.22808 17.5218 6.86245C17.5218 6.49683 17.2124 6.21558 16.8749 6.21558Z",fill:""}),f.jsx("path",{d:"M16.875 11.1656H1.77187C1.43438 11.1656 1.125 11.4469 1.125 11.8125C1.125 12.1781 1.40625 12.4594 1.77187 12.4594H16.875C17.2125 12.4594 17.5219 12.1781 17.5219 11.8125C17.5219 11.4469 17.2125 11.1656 16.875 11.1656Z",fill:""}),f.jsx("path",{d:"M16.875 16.1156H1.77187C1.43438 16.1156 1.125 16.3969 1.125 16.7625C1.125 17.1281 1.40625 17.4094 1.77187 17.4094H16.875C17.2125 17.4094 17.5219 17.1281 17.5219 16.7625C17.5219 16.3969 17.2125 16.1156 16.875 16.1156Z",fill:"white"})]}),"Forms",f.jsx("svg",{className:`absolute right-4 top-1/2 -translate-y-1/2 fill-current ${L&&"rotate-180"}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.41107 6.9107C4.73651 6.58527 5.26414 6.58527 5.58958 6.9107L10.0003 11.3214L14.4111 6.91071C14.7365 6.58527 15.2641 6.58527 15.5896 6.91071C15.915 7.23614 15.915 7.76378 15.5896 8.08922L10.5896 13.0892C10.2641 13.4147 9.73651 13.4147 9.41107 13.0892L4.41107 8.08922C4.08563 7.76378 4.08563 7.23614 4.41107 6.9107Z",fill:""})})]}),f.jsx("div",{className:`translate transform overflow-hidden ${!L&&"hidden"}`,children:f.jsxs("ul",{className:"mt-4 mb-5.5 flex flex-col gap-2.5 pl-6",children:[f.jsx("li",{children:f.jsx(sr,{to:"/admin/forms/form-elements",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Form Elements"})}),f.jsx("li",{children:f.jsx(sr,{to:"/admin/forms/form-layouts",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Form Layout"})})]})})]})}),f.jsx("li",{children:f.jsxs(sr,{to:"/admin/calendar",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${s.includes("calendar")&&"bg-gray-700 dark:bg-meta-4"}`,children:[f.jsx("svg",{className:"fill-current",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M15.7499 2.9812H14.2874V2.36245C14.2874 2.02495 14.0062 1.71558 13.6405 1.71558C13.2749 1.71558 12.9937 1.99683 12.9937 2.36245V2.9812H4.97803V2.36245C4.97803 2.02495 4.69678 1.71558 4.33115 1.71558C3.96553 1.71558 3.68428 1.99683 3.68428 2.36245V2.9812H2.2499C1.29365 2.9812 0.478027 3.7687 0.478027 4.75308V14.5406C0.478027 15.4968 1.26553 16.3125 2.2499 16.3125H15.7499C16.7062 16.3125 17.5218 15.525 17.5218 14.5406V4.72495C17.5218 3.7687 16.7062 2.9812 15.7499 2.9812ZM1.77178 8.21245H4.1624V10.9968H1.77178V8.21245ZM5.42803 8.21245H8.38115V10.9968H5.42803V8.21245ZM8.38115 12.2625V15.0187H5.42803V12.2625H8.38115ZM9.64678 12.2625H12.5999V15.0187H9.64678V12.2625ZM9.64678 10.9968V8.21245H12.5999V10.9968H9.64678ZM13.8374 8.21245H16.228V10.9968H13.8374V8.21245ZM2.2499 4.24683H3.7124V4.83745C3.7124 5.17495 3.99365 5.48433 4.35928 5.48433C4.7249 5.48433 5.00615 5.20308 5.00615 4.83745V4.24683H13.0499V4.83745C13.0499 5.17495 13.3312 5.48433 13.6968 5.48433C14.0624 5.48433 14.3437 5.20308 14.3437 4.83745V4.24683H15.7499C16.0312 4.24683 16.2562 4.47183 16.2562 4.75308V6.94683H1.77178V4.75308C1.77178 4.47183 1.96865 4.24683 2.2499 4.24683ZM1.77178 14.5125V12.2343H4.1624V14.9906H2.2499C1.96865 15.0187 1.77178 14.7937 1.77178 14.5125ZM15.7499 15.0187H13.8374V12.2625H16.228V14.5406C16.2562 14.7937 16.0312 15.0187 15.7499 15.0187Z",fill:""})}),"Calendar"]})}),f.jsx(k0,{activeCondition:s==="/ui"||s.includes("ui"),children:(A,L)=>f.jsxs(ge.Fragment,{children:[f.jsxs(sr,{to:"#",className:`group relative flex items-center gap-2.5 rounded-sm py-2 px-4 font-medium text-bodydark1 duration-300 ease-in-out hover:bg-gray-700 dark:hover:bg-meta-4 ${(s==="/ui"||s.includes("ui"))&&"bg-gray-700 dark:bg-meta-4"}`,onClick:P=>{P.preventDefault(),v?A():C(!0)},children:[f.jsxs("svg",{className:"fill-current",width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{clipPath:"url(#clip0_130_9807)",children:[f.jsx("path",{d:"M15.7501 0.55835H2.2501C1.29385 0.55835 0.506348 1.34585 0.506348 2.3021V7.53335C0.506348 8.4896 1.29385 9.2771 2.2501 9.2771H15.7501C16.7063 9.2771 17.4938 8.4896 17.4938 7.53335V2.3021C17.4938 1.34585 16.7063 0.55835 15.7501 0.55835ZM16.2563 7.53335C16.2563 7.8146 16.0313 8.0396 15.7501 8.0396H2.2501C1.96885 8.0396 1.74385 7.8146 1.74385 7.53335V2.3021C1.74385 2.02085 1.96885 1.79585 2.2501 1.79585H15.7501C16.0313 1.79585 16.2563 2.02085 16.2563 2.3021V7.53335Z",fill:""}),f.jsx("path",{d:"M6.13135 10.9646H2.2501C1.29385 10.9646 0.506348 11.7521 0.506348 12.7083V15.8021C0.506348 16.7583 1.29385 17.5458 2.2501 17.5458H6.13135C7.0876 17.5458 7.8751 16.7583 7.8751 15.8021V12.7083C7.90322 11.7521 7.11572 10.9646 6.13135 10.9646ZM6.6376 15.8021C6.6376 16.0833 6.4126 16.3083 6.13135 16.3083H2.2501C1.96885 16.3083 1.74385 16.0833 1.74385 15.8021V12.7083C1.74385 12.4271 1.96885 12.2021 2.2501 12.2021H6.13135C6.4126 12.2021 6.6376 12.4271 6.6376 12.7083V15.8021Z",fill:""}),f.jsx("path",{d:"M15.75 10.9646H11.8688C10.9125 10.9646 10.125 11.7521 10.125 12.7083V15.8021C10.125 16.7583 10.9125 17.5458 11.8688 17.5458H15.75C16.7063 17.5458 17.4938 16.7583 17.4938 15.8021V12.7083C17.4938 11.7521 16.7063 10.9646 15.75 10.9646ZM16.2562 15.8021C16.2562 16.0833 16.0312 16.3083 15.75 16.3083H11.8688C11.5875 16.3083 11.3625 16.0833 11.3625 15.8021V12.7083C11.3625 12.4271 11.5875 12.2021 11.8688 12.2021H15.75C16.0312 12.2021 16.2562 12.4271 16.2562 12.7083V15.8021Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_130_9807",children:f.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0 0.052124)"})})})]}),"UI Elements",f.jsx("svg",{className:`absolute right-4 top-1/2 -translate-y-1/2 fill-current ${L&&"rotate-180"}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.41107 6.9107C4.73651 6.58527 5.26414 6.58527 5.58958 6.9107L10.0003 11.3214L14.4111 6.91071C14.7365 6.58527 15.2641 6.58527 15.5896 6.91071C15.915 7.23614 15.915 7.76378 15.5896 8.08922L10.5896 13.0892C10.2641 13.4147 9.73651 13.4147 9.41107 13.0892L4.41107 8.08922C4.08563 7.76378 4.08563 7.23614 4.41107 6.9107Z",fill:""})})]}),f.jsx("div",{className:`translate transform overflow-hidden ${!L&&"hidden"}`,children:f.jsxs("ul",{className:"mt-4 mb-5.5 flex flex-col gap-2.5 pl-6",children:[f.jsx("li",{children:f.jsx(sr,{to:"/admin/ui/alerts",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Alerts"})}),f.jsx("li",{children:f.jsx(sr,{to:"/admin/ui/buttons",className:({isActive:P})=>"group relative flex items-center gap-2.5 rounded-md px-4 font-medium text-bodydark2 duration-300 ease-in-out hover:text-white "+(P&&"!text-white"),children:"Buttons"})})]})})]})})]})]})]})})]})},Di=({children:e})=>{const[t,r]=G.useState(!1),{data:s}=Mr();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(AE,{sidebarOpen:t,setSidebarOpen:r}),f.jsxs("div",{className:"relative flex flex-1 flex-col overflow-y-auto overflow-x-hidden",children:[f.jsx(S2,{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})})]})]})})},jE=({user:e})=>{var c;const t=Kr();e.isAdmin||t.push("/");const{data:r,isLoading:s,error:o}=Gn(Q9);return f.jsxs(Di,{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(nE,{totalPageViews:r==null?void 0:r.dailyStats.totalViews,prevDayViewsChangePercent:r==null?void 0:r.dailyStats.prevDayViewsChangePercent}),f.jsx(aE,{dailyStats:r==null?void 0:r.dailyStats,weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx(sE,{dailyStats:r==null?void 0:r.dailyStats,isLoading:s}),f.jsx(iE,{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(CE,{weeklyStats:r==null?void 0:r.weeklyStats,isLoading:s}),f.jsx("div",{className:"col-span-12 xl:col-span-8",children:f.jsx(SE,{sources:(c=r==null?void 0:r.dailyStats)==null?void 0:c.sources})})]})]})},Ln=({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})]})})]}),NE=()=>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"})}),EE=()=>{const[e,t]=G.useState(!1),r=G.useRef(null),s=G.useRef(null);return G.useEffect(()=>{const o=({target:c})=>{s.current&&(!e||s.current.contains(c)||r.current.contains(c)||t(!1))};return document.addEventListener("click",o),()=>document.removeEventListener("click",o)}),G.useEffect(()=>{const o=({keyCode:c})=>{!e||c!==27||t(!1)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)}),f.jsxs("div",{className:"relative",children:[f.jsx("button",{ref:r,onClick:()=>t(!e),children:f.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M2.25 11.25C3.49264 11.25 4.5 10.2426 4.5 9C4.5 7.75736 3.49264 6.75 2.25 6.75C1.00736 6.75 0 7.75736 0 9C0 10.2426 1.00736 11.25 2.25 11.25Z",fill:"#98A6AD"}),f.jsx("path",{d:"M9 11.25C10.2426 11.25 11.25 10.2426 11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25Z",fill:"#98A6AD"}),f.jsx("path",{d:"M15.75 11.25C16.9926 11.25 18 10.2426 18 9C18 7.75736 16.9926 6.75 15.75 6.75C14.5074 6.75 13.5 7.75736 13.5 9C13.5 10.2426 14.5074 11.25 15.75 11.25Z",fill:"#98A6AD"})]})}),f.jsxs("div",{ref:s,onFocus:()=>t(!0),onBlur:()=>t(!1),className:`absolute right-0 top-full z-40 w-40 space-y-1 rounded-sm border border-stroke bg-white p-1.5 shadow-default dark:border-strokedark dark:bg-boxdark ${e===!0?"block":"hidden"}`,children:[f.jsxs("button",{className:"flex w-full items-center gap-2 rounded-sm py-1.5 px-4 text-left text-sm hover:bg-gray dark:hover:bg-meta-4",children:[f.jsxs("svg",{className:"fill-current",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_62_9787)",children:f.jsx("path",{d:"M15.55 2.97499C15.55 2.77499 15.475 2.57499 15.325 2.42499C15.025 2.12499 14.725 1.82499 14.45 1.52499C14.175 1.24999 13.925 0.974987 13.65 0.724987C13.525 0.574987 13.375 0.474986 13.175 0.449986C12.95 0.424986 12.75 0.474986 12.575 0.624987L10.875 2.32499H2.02495C1.17495 2.32499 0.449951 3.02499 0.449951 3.89999V14C0.449951 14.85 1.14995 15.575 2.02495 15.575H12.15C13 15.575 13.725 14.875 13.725 14V5.12499L15.35 3.49999C15.475 3.34999 15.55 3.17499 15.55 2.97499ZM8.19995 8.99999C8.17495 9.02499 8.17495 9.02499 8.14995 9.02499L6.34995 9.62499L6.94995 7.82499C6.94995 7.79999 6.97495 7.79999 6.97495 7.77499L11.475 3.27499L12.725 4.49999L8.19995 8.99999ZM12.575 14C12.575 14.25 12.375 14.45 12.125 14.45H2.02495C1.77495 14.45 1.57495 14.25 1.57495 14V3.87499C1.57495 3.62499 1.77495 3.42499 2.02495 3.42499H9.72495L6.17495 6.99999C6.04995 7.12499 5.92495 7.29999 5.87495 7.49999L4.94995 10.3C4.87495 10.5 4.92495 10.675 5.02495 10.85C5.09995 10.95 5.24995 11.1 5.52495 11.1H5.62495L8.49995 10.15C8.67495 10.1 8.84995 9.97499 8.97495 9.84999L12.575 6.24999V14ZM13.5 3.72499L12.25 2.49999L13.025 1.72499C13.225 1.92499 14.05 2.74999 14.25 2.97499L13.5 3.72499Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_62_9787",children:f.jsx("rect",{width:"16",height:"16",fill:"white"})})})]}),"Edit"]}),f.jsxs("button",{className:"flex w-full items-center gap-2 rounded-sm py-1.5 px-4 text-left text-sm hover:bg-gray dark:hover:bg-meta-4",children:[f.jsxs("svg",{className:"fill-current",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M12.225 2.20005H10.3V1.77505C10.3 1.02505 9.70005 0.425049 8.95005 0.425049H7.02505C6.27505 0.425049 5.67505 1.02505 5.67505 1.77505V2.20005H3.75005C3.02505 2.20005 2.42505 2.80005 2.42505 3.52505V4.27505C2.42505 4.82505 2.75005 5.27505 3.22505 5.47505L3.62505 13.75C3.67505 14.775 4.52505 15.575 5.55005 15.575H10.4C11.425 15.575 12.275 14.775 12.325 13.75L12.75 5.45005C13.225 5.25005 13.55 4.77505 13.55 4.25005V3.50005C13.55 2.80005 12.95 2.20005 12.225 2.20005ZM6.82505 1.77505C6.82505 1.65005 6.92505 1.55005 7.05005 1.55005H8.97505C9.10005 1.55005 9.20005 1.65005 9.20005 1.77505V2.20005H6.85005V1.77505H6.82505ZM3.57505 3.52505C3.57505 3.42505 3.65005 3.32505 3.77505 3.32505H12.225C12.325 3.32505 12.425 3.40005 12.425 3.52505V4.27505C12.425 4.37505 12.35 4.47505 12.225 4.47505H3.77505C3.67505 4.47505 3.57505 4.40005 3.57505 4.27505V3.52505V3.52505ZM10.425 14.45H5.57505C5.15005 14.45 4.80005 14.125 4.77505 13.675L4.40005 5.57505H11.625L11.25 13.675C11.2 14.1 10.85 14.45 10.425 14.45Z",fill:""}),f.jsx("path",{d:"M8.00005 8.1001C7.70005 8.1001 7.42505 8.3501 7.42505 8.6751V11.8501C7.42505 12.1501 7.67505 12.4251 8.00005 12.4251C8.30005 12.4251 8.57505 12.1751 8.57505 11.8501V8.6751C8.57505 8.3501 8.30005 8.1001 8.00005 8.1001Z",fill:""}),f.jsx("path",{d:"M9.99994 8.60004C9.67494 8.57504 9.42494 8.80004 9.39994 9.12504L9.24994 11.325C9.22494 11.625 9.44994 11.9 9.77494 11.925C9.79994 11.925 9.79994 11.925 9.82494 11.925C10.1249 11.925 10.3749 11.7 10.3749 11.4L10.5249 9.20004C10.5249 8.87504 10.2999 8.62504 9.99994 8.60004Z",fill:""}),f.jsx("path",{d:"M5.97497 8.60004C5.67497 8.62504 5.42497 8.90004 5.44997 9.20004L5.62497 11.4C5.64997 11.7 5.89997 11.925 6.17497 11.925C6.19997 11.925 6.19997 11.925 6.22497 11.925C6.52497 11.9 6.77497 11.625 6.74997 11.325L6.57497 9.12504C6.57497 8.80004 6.29997 8.57504 5.97497 8.60004Z",fill:""})]}),"Delete"]})]})]})},LE=()=>{var M;const[e,t]=G.useState(0),[r,s]=G.useState(1),[o,c]=G.useState(void 0),[p,v]=G.useState([]),[C,A]=G.useState(void 0),{data:L,isLoading:P,error:z}=Gn(K9,{skip:e,hasPaidFilter:C,emailContains:o,subscriptionStatus:(p==null?void 0:p.length)>0?p:void 0});return G.useEffect(()=>{s(1)},[o,p]),G.useEffect(()=>{t((r-1)*10)},[r]),f.jsx("div",{className:"flex flex-col gap-4",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsxs("div",{className:"flex-col flex items-start justify-between p-6 gap-3 w-full bg-gray-100/40 dark:bg-gray-700/50",children:[f.jsx("span",{className:"text-sm font-medium",children:"Filters:"}),f.jsxs("div",{className:"flex items-center justify-between gap-3 w-full px-2",children:[f.jsxs("div",{className:"relative flex items-center gap-3 ",children:[f.jsx("label",{htmlFor:"email-filter",className:"block text-sm text-gray-700 dark:text-white",children:"email:"}),f.jsx("input",{type:"text",id:"email-filter",placeholder:"dude@example.com",onChange:H=>{c(H.currentTarget.value)},className:"rounded border border-stroke py-2 px-5 bg-white outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"}),f.jsx("label",{htmlFor:"status-filter",className:"block text-sm ml-2 text-gray-700 dark:text-white",children:"status:"}),f.jsxs("div",{className:"flex-grow relative z-20 rounded border border-stroke pr-8 outline-none bg-white transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsx("div",{className:"flex items-center",children:p&&p.length>0?p.map((H,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:q=>{q.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(q=>q!==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:L==null?void 0:L.totalPages,onChange:H=>{s(parseInt(H.currentTarget.value))},className:"rounded-md border-1 border-stroke bg-transparent px-4 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"}),f.jsxs("span",{className:"text-md text-black dark:text-white",children:[" ","/ ",L==null?void 0:L.totalPages," "]})]})]})]}),f.jsxs("div",{className:"grid grid-cols-12 border-t-4 border-stroke py-4.5 px-4 dark:border-strokedark md:px-6 ",children:[f.jsx("div",{className:"col-span-3 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Email / Username"})}),f.jsx("div",{className:"col-span-3 hidden items-center sm:flex",children:f.jsx("p",{className:"font-medium",children:"Last Active"})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Subscription Status"})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"font-medium",children:"Stripe ID"})}),f.jsx("div",{className:"col-span-1 flex items-center",children:f.jsx("p",{className:"font-medium"})})]}),P&&f.jsx("div",{className:"-mt-40",children:f.jsx(NE,{})}),!!(L!=null&&L.users)&&((M=L==null?void 0:L.users)==null?void 0:M.length)>0&&L.users.map(H=>f.jsxs("div",{className:"grid grid-cols-12 gap-4 border-t border-stroke py-4.5 px-4 dark:border-strokedark md:px-6 ",children:[f.jsx("div",{className:"col-span-3 flex items-center",children:f.jsxs("div",{className:"flex flex-col gap-1 ",children:[f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.email}),f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.username})]})}),f.jsx("div",{className:"col-span-3 hidden items-center sm:flex",children:f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.lastActiveTimestamp.toLocaleDateString()+" "+H.lastActiveTimestamp.toLocaleTimeString()})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"text-sm text-black dark:text-white",children:H.subscriptionStatus})}),f.jsx("div",{className:"col-span-2 flex items-center",children:f.jsx("p",{className:"text-sm text-meta-3",children:H.stripeId})}),f.jsx("div",{className:"col-span-1 flex items-center",children:f.jsx(EE,{})})]},H.id))]})})},PE=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"Users"}),f.jsx("div",{className:"flex flex-col gap-10",children:f.jsx(LE,{})})]});let TE={data:""},RE=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||TE,_E=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ME=/\/\*[^]*?\*\/| +/g,C0=/\n+/g,Ji=(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"?Ji(p,c):c+"{"+Ji(p,c[1]=="k"?"":t)+"}":typeof p=="object"?s+=Ji(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+=Ji.p?Ji.p(c,p):c+":"+p+";")}return r+(t&&o?t+"{"+o+"}":o)+s},bi={},Q2=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+Q2(e[r]);return t}return e},OE=(e,t,r,s,o)=>{let c=Q2(e),p=bi[c]||(bi[c]=(C=>{let A=0,L=11;for(;A>>0;return"go"+L})(c));if(!bi[p]){let C=c!==e?e:(A=>{let L,P,z=[{}];for(;L=_E.exec(A.replace(ME,""));)L[4]?z.shift():L[3]?(P=L[3].replace(C0," ").trim(),z.unshift(z[0][P]=z[0][P]||{})):z[0][L[1]]=L[2].replace(C0," ").trim();return z[0]})(e);bi[p]=Ji(o?{["@keyframes "+p]:C}:C,r?"":"."+p)}let v=r&&bi.g?bi.g:null;return r&&(bi.g=bi[p]),((C,A,L,P)=>{P?A.data=A.data.replace(P,C):A.data.indexOf(C)===-1&&(A.data=L?C+A.data:A.data+C)})(bi[p],t,s,v),p},IE=(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?"":Ji(v,""):v===!1?"":v}return s+o+(p??"")},"");function Wd(e){let t=this||{},r=e.call?e(t.p):e;return OE(r.unshift?r.raw?IE(r,[].slice.call(arguments,1),t.p):r.reduce((s,o)=>Object.assign(s,o&&o.call?o(t.p):o),{}):r,RE(t.target),t.g,t.o,t.k)}let K2,Mf,Of;Wd.bind({g:1});let Ii=Wd.bind({k:1});function zE(e,t,r,s){Ji.p=t,K2=e,Mf=r,Of=s}function Pn(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:Mf&&Mf()},v),r.o=/ *go\d+/.test(C),v.className=Wd.apply(r,s)+(C?" "+C:"");let A=e;return e[0]&&(A=v.as||e,delete v.as),Of&&A[0]&&Of(v),K2(A,v)}return o}}var FE=e=>typeof e=="function",If=(e,t)=>FE(e)?e(t):e,DE=(()=>{let e=0;return()=>(++e).toString()})(),HE=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),BE=20,rc=new Map,VE=1e3,S0=e=>{if(rc.has(e))return;let t=setTimeout(()=>{rc.delete(e),$d({type:4,toastId:e})},VE);rc.set(e,t)},WE=e=>{let t=rc.get(e);t&&clearTimeout(t)},zf=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,BE)};case 1:return t.toast.id&&WE(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)?zf(e,{type:1,toast:r}):zf(e,{type:0,toast:r});case 3:let{toastId:s}=t;return s?S0(s):e.toasts.forEach(c=>{S0(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}))}}},$E=[],qu={toasts:[],pausedAt:void 0},$d=e=>{qu=zf(qu,e),$E.forEach(t=>{t(qu)})},XE=(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)||DE()}),qo=e=>(t,r)=>{let s=XE(t,e,r);return $d({type:2,toast:s}),s.id},Xr=(e,t)=>qo("blank")(e,t);Xr.error=qo("error");Xr.success=qo("success");Xr.loading=qo("loading");Xr.custom=qo("custom");Xr.dismiss=e=>{$d({type:3,toastId:e})};Xr.remove=e=>$d({type:4,toastId:e});Xr.promise=(e,t,r)=>{let s=Xr.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(o=>(Xr.success(If(t.success,o),{id:s,...r,...r==null?void 0:r.success}),o)).catch(o=>{Xr.error(If(t.error,o),{id:s,...r,...r==null?void 0:r.error})}),e};var YE=Ii` from { transform: scale(0) rotate(45deg); opacity: 0; @@ -963,4 +963,4 @@ to { > * { pointer-events: auto; } -`;var A0=Xr;const fL=()=>{const e=t=>{t.preventDefault(),confirm("Are you sure you want to save the changes?")?A0.success("Your changes have been saved successfully!"):A0.error("Your changes have not been saved!")};return f.jsx(Di,{children:f.jsxs("div",{className:"mx-auto max-w-270",children:[f.jsx(Ln,{pageName:"Settings"}),f.jsxs("div",{className:"grid grid-cols-5 gap-8",children:[f.jsx("div",{className:"col-span-5 xl:col-span-3",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-7 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Personal Information"})}),f.jsx("div",{className:"p-7",children:f.jsxs("form",{onSubmit:e,children:[f.jsxs("div",{className:"mb-5.5 flex flex-col gap-5.5 sm:flex-row",children:[f.jsxs("div",{className:"w-full sm:w-1/2",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"fullName",children:"Full Name"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsx("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.72039 12.887C4.50179 12.1056 5.5616 11.6666 6.66667 11.6666H13.3333C14.4384 11.6666 15.4982 12.1056 16.2796 12.887C17.061 13.6684 17.5 14.7282 17.5 15.8333V17.5C17.5 17.9602 17.1269 18.3333 16.6667 18.3333C16.2064 18.3333 15.8333 17.9602 15.8333 17.5V15.8333C15.8333 15.1703 15.5699 14.5344 15.1011 14.0655C14.6323 13.5967 13.9964 13.3333 13.3333 13.3333H6.66667C6.00363 13.3333 5.36774 13.5967 4.8989 14.0655C4.43006 14.5344 4.16667 15.1703 4.16667 15.8333V17.5C4.16667 17.9602 3.79357 18.3333 3.33333 18.3333C2.8731 18.3333 2.5 17.9602 2.5 17.5V15.8333C2.5 14.7282 2.93899 13.6684 3.72039 12.887Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99967 3.33329C8.61896 3.33329 7.49967 4.45258 7.49967 5.83329C7.49967 7.214 8.61896 8.33329 9.99967 8.33329C11.3804 8.33329 12.4997 7.214 12.4997 5.83329C12.4997 4.45258 11.3804 3.33329 9.99967 3.33329ZM5.83301 5.83329C5.83301 3.53211 7.69849 1.66663 9.99967 1.66663C12.3009 1.66663 14.1663 3.53211 14.1663 5.83329C14.1663 8.13448 12.3009 9.99996 9.99967 9.99996C7.69849 9.99996 5.83301 8.13448 5.83301 5.83329Z",fill:""})]})})}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"fullName",id:"fullName",placeholder:"Devid Jhon",defaultValue:"Devid Jhon"})]})]}),f.jsxs("div",{className:"w-full sm:w-1/2",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"phoneNumber",children:"Phone Number"}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 px-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"phoneNumber",id:"phoneNumber",placeholder:"+990 3343 7865",defaultValue:"+990 3343 7865"})]})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"emailAddress",children:"Email Address"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsx("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33301 4.16667C2.87658 4.16667 2.49967 4.54357 2.49967 5V15C2.49967 15.4564 2.87658 15.8333 3.33301 15.8333H16.6663C17.1228 15.8333 17.4997 15.4564 17.4997 15V5C17.4997 4.54357 17.1228 4.16667 16.6663 4.16667H3.33301ZM0.833008 5C0.833008 3.6231 1.9561 2.5 3.33301 2.5H16.6663C18.0432 2.5 19.1663 3.6231 19.1663 5V15C19.1663 16.3769 18.0432 17.5 16.6663 17.5H3.33301C1.9561 17.5 0.833008 16.3769 0.833008 15V5Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.983719 4.52215C1.24765 4.1451 1.76726 4.05341 2.1443 4.31734L9.99975 9.81615L17.8552 4.31734C18.2322 4.05341 18.7518 4.1451 19.0158 4.52215C19.2797 4.89919 19.188 5.4188 18.811 5.68272L10.4776 11.5161C10.1907 11.7169 9.80879 11.7169 9.52186 11.5161L1.18853 5.68272C0.811486 5.4188 0.719791 4.89919 0.983719 4.52215Z",fill:""})]})})}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"email",name:"emailAddress",id:"emailAddress",placeholder:"devidjond45@gmail.com",defaultValue:"devidjond45@gmail.com"})]})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"Username",children:"Username"}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 px-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"Username",id:"Username",placeholder:"devidjhon24",defaultValue:"devidjhon24"})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"Username",children:"BIO"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{opacity:"0.8",clipPath:"url(#clip0_88_10224)",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.56524 3.23223C2.03408 2.76339 2.66997 2.5 3.33301 2.5H9.16634C9.62658 2.5 9.99967 2.8731 9.99967 3.33333C9.99967 3.79357 9.62658 4.16667 9.16634 4.16667H3.33301C3.11199 4.16667 2.90003 4.25446 2.74375 4.41074C2.58747 4.56702 2.49967 4.77899 2.49967 5V16.6667C2.49967 16.8877 2.58747 17.0996 2.74375 17.2559C2.90003 17.4122 3.11199 17.5 3.33301 17.5H14.9997C15.2207 17.5 15.4326 17.4122 15.5889 17.2559C15.7452 17.0996 15.833 16.8877 15.833 16.6667V10.8333C15.833 10.3731 16.2061 10 16.6663 10C17.1266 10 17.4997 10.3731 17.4997 10.8333V16.6667C17.4997 17.3297 17.2363 17.9656 16.7674 18.4344C16.2986 18.9033 15.6627 19.1667 14.9997 19.1667H3.33301C2.66997 19.1667 2.03408 18.9033 1.56524 18.4344C1.0964 17.9656 0.833008 17.3297 0.833008 16.6667V5C0.833008 4.33696 1.0964 3.70107 1.56524 3.23223Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6664 2.39884C16.4185 2.39884 16.1809 2.49729 16.0056 2.67253L8.25216 10.426L7.81167 12.188L9.57365 11.7475L17.3271 3.99402C17.5023 3.81878 17.6008 3.5811 17.6008 3.33328C17.6008 3.08545 17.5023 2.84777 17.3271 2.67253C17.1519 2.49729 16.9142 2.39884 16.6664 2.39884ZM14.8271 1.49402C15.3149 1.00622 15.9765 0.732178 16.6664 0.732178C17.3562 0.732178 18.0178 1.00622 18.5056 1.49402C18.9934 1.98182 19.2675 2.64342 19.2675 3.33328C19.2675 4.02313 18.9934 4.68473 18.5056 5.17253L10.5889 13.0892C10.4821 13.196 10.3483 13.2718 10.2018 13.3084L6.86847 14.1417C6.58449 14.2127 6.28409 14.1295 6.0771 13.9225C5.87012 13.7156 5.78691 13.4151 5.85791 13.1312L6.69124 9.79783C6.72787 9.65131 6.80364 9.51749 6.91044 9.41069L14.8271 1.49402Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_88_10224",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),f.jsx("textarea",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",name:"bio",id:"bio",rows:6,placeholder:"Write your bio here",defaultValue:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque posuere fermentum urna, eu condimentum mauris tempus ut. Donec fermentum blandit aliquet."})]})]}),f.jsxs("div",{className:"flex justify-end gap-4.5",children:[f.jsx("button",{className:"flex justify-center rounded border border-stroke py-2 px-6 font-medium text-black hover:shadow-1 dark:border-strokedark dark:text-white",type:"submit",children:"Cancel"}),f.jsx("button",{className:"flex justify-center rounded bg-primary py-2 px-6 font-medium text-gray hover:shadow-1",type:"submit",children:"Save"})]})]})})]})}),f.jsx("div",{className:"col-span-5 xl:col-span-2",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-7 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Your Photo"})}),f.jsx("div",{className:"p-7",children:f.jsxs("form",{action:"#",children:[f.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[f.jsx("div",{className:"h-14 w-14 rounded-full"}),f.jsxs("div",{children:[f.jsx("span",{className:"mb-1.5 text-black dark:text-white",children:"Edit your photo"}),f.jsxs("span",{className:"flex gap-2.5",children:[f.jsx("button",{className:"text-sm hover:text-primary",children:"Delete"}),f.jsx("button",{className:"text-sm hover:text-primary",children:"Update"})]})]})]}),f.jsxs("div",{id:"FileUpload",className:"relative mb-5.5 block w-full cursor-pointer appearance-none rounded border-2 border-dashed border-primary bg-gray py-4 px-4 dark:bg-meta-4 sm:py-7.5",children:[f.jsx("input",{type:"file",accept:"image/*",className:"absolute inset-0 z-50 m-0 h-full w-full cursor-pointer p-0 opacity-0 outline-none"}),f.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[f.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full border border-stroke bg-white dark:border-strokedark dark:bg-boxdark",children:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.99967 9.33337C2.36786 9.33337 2.66634 9.63185 2.66634 10V12.6667C2.66634 12.8435 2.73658 13.0131 2.8616 13.1381C2.98663 13.2631 3.1562 13.3334 3.33301 13.3334H12.6663C12.8431 13.3334 13.0127 13.2631 13.1377 13.1381C13.2628 13.0131 13.333 12.8435 13.333 12.6667V10C13.333 9.63185 13.6315 9.33337 13.9997 9.33337C14.3679 9.33337 14.6663 9.63185 14.6663 10V12.6667C14.6663 13.1971 14.4556 13.7058 14.0806 14.0809C13.7055 14.456 13.1968 14.6667 12.6663 14.6667H3.33301C2.80257 14.6667 2.29387 14.456 1.91879 14.0809C1.54372 13.7058 1.33301 13.1971 1.33301 12.6667V10C1.33301 9.63185 1.63148 9.33337 1.99967 9.33337Z",fill:"#3C50E0"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5286 1.52864C7.78894 1.26829 8.21106 1.26829 8.4714 1.52864L11.8047 4.86197C12.0651 5.12232 12.0651 5.54443 11.8047 5.80478C11.5444 6.06513 11.1223 6.06513 10.8619 5.80478L8 2.94285L5.13807 5.80478C4.87772 6.06513 4.45561 6.06513 4.19526 5.80478C3.93491 5.54443 3.93491 5.12232 4.19526 4.86197L7.5286 1.52864Z",fill:"#3C50E0"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99967 1.33337C8.36786 1.33337 8.66634 1.63185 8.66634 2.00004V10C8.66634 10.3682 8.36786 10.6667 7.99967 10.6667C7.63148 10.6667 7.33301 10.3682 7.33301 10V2.00004C7.33301 1.63185 7.63148 1.33337 7.99967 1.33337Z",fill:"#3C50E0"})]})}),f.jsxs("p",{children:[f.jsx("span",{className:"text-primary",children:"Click to upload"})," or drag and drop"]}),f.jsx("p",{className:"mt-1.5",children:"SVG, PNG, JPG or GIF"}),f.jsx("p",{children:"(max, 800 X 800px)"})]})]}),f.jsxs("div",{className:"flex justify-end gap-4.5",children:[f.jsx("button",{className:"flex justify-center rounded border border-stroke py-2 px-6 font-medium text-black hover:shadow-1 dark:border-strokedark dark:text-white",type:"submit",children:"Cancel"}),f.jsx("button",{className:"flex justify-center rounded bg-primary py-2 px-6 font-medium text-gray hover:bg-opacity-70",type:"submit",children:"Save"})]})]})})]})})]})]})})},pL=()=>{const[e,t]=G.useState({series:[{data:[168,385,201,298,187,195,291,110,215,390,280,112,123,212,270,190,310,115,90,380,112,223,292,170,290,110,115,290,380,312]}]}),r={colors:["#3C50E0"],chart:{fontFamily:"Satoshi, sans-serif",type:"bar",height:350,toolbar:{show:!1}},plotOptions:{bar:{horizontal:!1,columnWidth:"55%",borderRadius:2}},dataLabels:{enabled:!1},stroke:{show:!0,width:4,colors:["transparent"]},xaxis:{categories:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],axisBorder:{show:!1},axisTicks:{show:!1}},legend:{show:!0,position:"top",horizontalAlign:"left",fontFamily:"inter",markers:{radius:99}},grid:{yaxis:{lines:{show:!1}}},fill:{opacity:1},tooltip:{x:{show:!1}}};return f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5",children:[f.jsx("div",{children:f.jsx("h3",{className:"text-xl font-semibold text-black dark:text-white",children:"Visitors Analytics"})}),f.jsx("div",{className:"mb-2",children:f.jsx("div",{id:"chartFour",className:"-ml-5",children:f.jsx(Vd,{options:r,series:e.series,type:"bar",height:350})})})]})},gL={chart:{type:"donut"},colors:["#10B981","#375E83","#259AE6","#FFA70B"],labels:["Remote","Hybrid","Onsite","Leave"],legend:{show:!0,position:"bottom"},plotOptions:{pie:{donut:{size:"65%",background:"transparent"}}},dataLabels:{enabled:!1},responsive:[{breakpoint:2600,options:{chart:{width:380}}},{breakpoint:640,options:{chart:{width:200}}}]},mL=()=>{const[e,t]=G.useState({series:[65,34,12,56]});return f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:col-span-5",children:[f.jsxs("div",{className:"mb-3 justify-between gap-4 sm:flex",children:[f.jsx("div",{children:f.jsx("h5",{className:"text-xl font-semibold text-black dark:text-white",children:"Visitors Analytics"})}),f.jsx("div",{children:f.jsxs("div",{className:"relative z-20 inline-block",children:[f.jsxs("select",{name:"",id:"",className:"relative z-20 inline-flex appearance-none bg-transparent py-1 pl-3 pr-8 text-sm font-medium outline-none",children:[f.jsx("option",{value:"",children:"Monthly"}),f.jsx("option",{value:"",children:"Yearly"})]}),f.jsx("span",{className:"absolute top-1/2 right-3 z-10 -translate-y-1/2",children:f.jsxs("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M0.47072 1.08816C0.47072 1.02932 0.500141 0.955772 0.54427 0.911642C0.647241 0.808672 0.809051 0.808672 0.912022 0.896932L4.85431 4.60386C4.92785 4.67741 5.06025 4.67741 5.14851 4.60386L9.09079 0.896932C9.19376 0.793962 9.35557 0.808672 9.45854 0.911642C9.56151 1.01461 9.5468 1.17642 9.44383 1.27939L5.50155 4.98632C5.22206 5.23639 4.78076 5.23639 4.51598 4.98632L0.558981 1.27939C0.50014 1.22055 0.47072 1.16171 0.47072 1.08816Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.22659 0.546578L5.00141 4.09604L8.76422 0.557869C9.08459 0.244537 9.54201 0.329403 9.79139 0.578788C10.112 0.899434 10.0277 1.36122 9.77668 1.61224L9.76644 1.62248L5.81552 5.33722C5.36257 5.74249 4.6445 5.7544 4.19352 5.32924C4.19327 5.32901 4.19377 5.32948 4.19352 5.32924L0.225953 1.61241C0.102762 1.48922 -4.20186e-08 1.31674 -3.20269e-08 1.08816C-2.40601e-08 0.905899 0.0780105 0.712197 0.211421 0.578787C0.494701 0.295506 0.935574 0.297138 1.21836 0.539529L1.22659 0.546578ZM4.51598 4.98632C4.78076 5.23639 5.22206 5.23639 5.50155 4.98632L9.44383 1.27939C9.5468 1.17642 9.56151 1.01461 9.45854 0.911642C9.35557 0.808672 9.19376 0.793962 9.09079 0.896932L5.14851 4.60386C5.06025 4.67741 4.92785 4.67741 4.85431 4.60386L0.912022 0.896932C0.809051 0.808672 0.647241 0.808672 0.54427 0.911642C0.500141 0.955772 0.47072 1.02932 0.47072 1.08816C0.47072 1.16171 0.50014 1.22055 0.558981 1.27939L4.51598 4.98632Z",fill:"#637381"})]})})]})})]}),f.jsx("div",{className:"mb-2",children:f.jsx("div",{id:"chartThree",className:"mx-auto flex justify-center",children:f.jsx(Vd,{options:gL,series:e.series,type:"donut"})})}),f.jsxs("div",{className:"-mx-8 flex flex-wrap items-center justify-center gap-y-3",children:[f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-primary"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Desktop "}),f.jsx("span",{children:" 65% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#6577F3]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Tablet "}),f.jsx("span",{children:" 34% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#8FD0EF]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Mobile "}),f.jsx("span",{children:" 45% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#0FADCF]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Unknown "}),f.jsx("span",{children:" 12% "})]})]})})]})]})},xL=()=>f.jsx("div",{className:"col-span-12 rounded-sm border border-stroke bg-white p-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:f.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2 xl:grid-cols-4 xl:gap-0",children:[f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark xl:border-b-0 xl:border-r xl:pb-0",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"$4,350"}),f.jsx("p",{className:"text-sm font-medium",children:"Unique Visitors"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"18%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark xl:border-b-0 xl:border-r xl:pb-0",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"55.9K"}),f.jsx("p",{className:"text-sm font-medium",children:"Total Pageviews"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"25%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark sm:border-b-0 sm:pb-0 xl:border-r",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"54%"}),f.jsx("p",{className:"text-sm font-medium",children:"Bounce Rate"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M9.75302 12.1328L13.7773 8.10856L14.8381 9.16939L9.00279 15.0047L3.16748 9.16939L4.22831 8.10856L8.25256 12.1328V3.00098H9.75302V12.1328Z",fill:"#F0950C"})}),f.jsx("span",{className:"text-meta-8",children:"7%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"2m 56s"}),f.jsx("p",{className:"text-sm font-medium",children:"Visit Duration"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"12%"})]})]})]})}),vL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"Chart"}),f.jsxs("div",{className:"grid grid-cols-12 gap-4 md:gap-6 2xl:gap-7.5",children:[f.jsx(xL,{}),f.jsx("div",{className:"col-span-12",children:f.jsx(pL,{})}),f.jsx(mL,{})]})]});function yL(){return f.jsx("div",{children:"Hello world!"})}const bL=()=>{const[e,t]=G.useState(!1);return f.jsx("div",{children:f.jsxs("label",{htmlFor:"checkboxLabelFour",className:"flex cursor-pointer select-none items-center",children:[f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:"checkboxLabelFour",className:"sr-only",onChange:()=>{t(!e)}}),f.jsx("div",{className:`mr-4 flex h-5 w-5 items-center justify-center rounded-full border ${e&&"border-primary"}`,children:f.jsx("span",{className:`h-2.5 w-2.5 rounded-full bg-transparent ${e&&"!bg-primary"}`,children:" "})})]}),"Checkbox Text"]})})},wL=({user:e,updateUserById:t})=>{const[r,s]=G.useState((e==null?void 0:e.hasPaid)||!1);return f.jsx("div",{className:"relative",children:f.jsx("label",{htmlFor:`toggle1-${e==null?void 0:e.id}`,className:"flex cursor-pointer select-none items-center",children:f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:`toggle1-${e==null?void 0:e.id}`,className:"sr-only",onChange:()=>{s(!r),t&&t({id:e==null?void 0:e.id,data:{hasPaid:!r}})}}),f.jsx("div",{className:"reblock h-8 w-14 rounded-full bg-meta-9 dark:bg-[#5A616B]"}),f.jsx("div",{className:`absolute left-1 top-1 h-6 w-6 rounded-full bg-white dark:bg-gray-400 transition ${r&&"!right-1 !translate-x-full !bg-primary dark:!bg-white"}`})]})})})},kL=()=>{const[e,t]=G.useState(!1);return f.jsx("div",{children:f.jsx("label",{htmlFor:"toggle3",className:"flex cursor-pointer select-none items-center",children:f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:"toggle3",className:"sr-only",onChange:()=>{t(!e)}}),f.jsx("div",{className:"block h-8 w-14 rounded-full bg-meta-9 dark:bg-[#5A616B]"}),f.jsxs("div",{className:`dot absolute left-1 top-1 flex h-6 w-6 items-center justify-center rounded-full bg-white transition ${e&&"!right-1 !translate-x-full !bg-primary dark:!bg-white"}`,children:[f.jsx("span",{className:`hidden ${e&&"!block"}`,children:f.jsx("svg",{className:"fill-white dark:fill-black",width:"11",height:"8",viewBox:"0 0 11 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M10.0915 0.951972L10.0867 0.946075L10.0813 0.940568C9.90076 0.753564 9.61034 0.753146 9.42927 0.939309L4.16201 6.22962L1.58507 3.63469C1.40401 3.44841 1.11351 3.44879 0.932892 3.63584C0.755703 3.81933 0.755703 4.10875 0.932892 4.29224L0.932878 4.29225L0.934851 4.29424L3.58046 6.95832C3.73676 7.11955 3.94983 7.2 4.1473 7.2C4.36196 7.2 4.55963 7.11773 4.71406 6.9584L10.0468 1.60234C10.2436 1.4199 10.2421 1.1339 10.0915 0.951972ZM4.2327 6.30081L4.2317 6.2998C4.23206 6.30015 4.23237 6.30049 4.23269 6.30082L4.2327 6.30081Z",fill:"",stroke:"",strokeWidth:"0.4"})})}),f.jsx("span",{className:`${e&&"hidden"}`,children:f.jsx("svg",{className:"h-4 w-4 stroke-current",fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]})]})})})},CL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"FormElements"}),f.jsxs("div",{className:"grid grid-cols-1 gap-9 sm:grid-cols-2",children:[f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Input Fields"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Default Input"}),f.jsx("input",{type:"text",placeholder:"Default Input",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Active Input"}),f.jsx("input",{type:"text",placeholder:"Active Input",className:"w-full rounded-lg border-[1.5px] border-primary bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:bg-form-input"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block font-medium text-black dark:text-white",children:"Disabled label"}),f.jsx("input",{type:"text",placeholder:"Disabled label",disabled:!0,className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary dark:disabled:bg-black"})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Toggle switch input"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsx(wL,{}),f.jsx(kL,{})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Time and date"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Date picker"}),f.jsx("div",{className:"relative",children:f.jsx("input",{type:"date",className:"custom-input-date custom-input-date-1 w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Select date"}),f.jsx("div",{className:"relative",children:f.jsx("input",{type:"date",className:"custom-input-date custom-input-date-2 w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"File upload"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Attach file"}),f.jsx("input",{type:"file",className:"w-full cursor-pointer rounded-lg border-[1.5px] border-stroke bg-transparent font-medium outline-none transition file:mr-5 file:border-collapse file:cursor-pointer file:border-0 file:border-r file:border-solid file:border-stroke file:bg-whiter file:py-3 file:px-5 file:hover:bg-primary file:hover:bg-opacity-10 focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:file:border-form-strokedark dark:file:bg-white/30 dark:file:text-white dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Attach file"}),f.jsx("input",{type:"file",className:"w-full rounded-md border border-stroke p-3 outline-none transition file:mr-4 file:rounded file:border-[0.5px] file:border-stroke file:bg-[#EEEEEE] file:py-1 file:px-2.5 file:text-sm file:font-medium focus:border-primary file:focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:file:border-strokedark dark:file:bg-white/30 dark:file:text-white"})]})]})]})]}),f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Textarea Fields"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Default textarea"}),f.jsx("textarea",{rows:6,placeholder:"Default textarea",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Active textarea"}),f.jsx("textarea",{rows:6,placeholder:"Active textarea",className:"w-full rounded-lg border-[1.5px] border-primary bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:bg-form-input"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Disabled textarea"}),f.jsx("textarea",{rows:6,disabled:!0,placeholder:"Disabled textarea",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary dark:disabled:bg-black"})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Checkbox and radio"})}),f.jsx("div",{className:"flex flex-col gap-5.5 p-6.5",children:f.jsx(bL,{})})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Select input"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Select Country"}),f.jsxs("div",{className:"relative z-20 bg-white dark:bg-form-input",children:[f.jsx("span",{className:"absolute top-1/2 left-4 z-30 -translate-y-1/2",children:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0007 2.50065C5.85852 2.50065 2.50065 5.85852 2.50065 10.0007C2.50065 14.1428 5.85852 17.5007 10.0007 17.5007C14.1428 17.5007 17.5007 14.1428 17.5007 10.0007C17.5007 5.85852 14.1428 2.50065 10.0007 2.50065ZM0.833984 10.0007C0.833984 4.93804 4.93804 0.833984 10.0007 0.833984C15.0633 0.833984 19.1673 4.93804 19.1673 10.0007C19.1673 15.0633 15.0633 19.1673 10.0007 19.1673C4.93804 19.1673 0.833984 15.0633 0.833984 10.0007Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.833984 9.99935C0.833984 9.53911 1.20708 9.16602 1.66732 9.16602H18.334C18.7942 9.16602 19.1673 9.53911 19.1673 9.99935C19.1673 10.4596 18.7942 10.8327 18.334 10.8327H1.66732C1.20708 10.8327 0.833984 10.4596 0.833984 9.99935Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.50084 10.0008C7.55796 12.5632 8.4392 15.0301 10.0006 17.0418C11.5621 15.0301 12.4433 12.5632 12.5005 10.0008C12.4433 7.43845 11.5621 4.97153 10.0007 2.95982C8.4392 4.97153 7.55796 7.43845 7.50084 10.0008ZM10.0007 1.66749L9.38536 1.10547C7.16473 3.53658 5.90275 6.69153 5.83417 9.98346C5.83392 9.99503 5.83392 10.0066 5.83417 10.0182C5.90275 13.3101 7.16473 16.4651 9.38536 18.8962C9.54325 19.069 9.76655 19.1675 10.0007 19.1675C10.2348 19.1675 10.4581 19.069 10.6159 18.8962C12.8366 16.4651 14.0986 13.3101 14.1671 10.0182C14.1674 10.0066 14.1674 9.99503 14.1671 9.98346C14.0986 6.69153 12.8366 3.53658 10.6159 1.10547L10.0007 1.66749Z",fill:"#637381"})]})})}),f.jsxs("select",{className:"relative z-20 w-full appearance-none rounded border border-stroke bg-transparent py-3 px-12 outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsx("option",{value:"",children:"USA"}),f.jsx("option",{value:"",children:"UK"}),f.jsx("option",{value:"",children:"Canada"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-10 -translate-y-1/2",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:"#637381"})})})})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Multiselect Dropdown"}),f.jsxs("div",{className:"relative z-20 w-full rounded border border-stroke p-1.5 pr-8 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsxs("div",{className:"flex flex-wrap items-center",children:[f.jsxs("span",{className:"m-1.5 flex items-center justify-center rounded border-[.5px] border-stroke bg-gray py-1.5 px-2.5 text-sm font-medium dark:border-strokedark dark:bg-white/30",children:["Design",f.jsx("span",{className:"cursor-pointer pl-2 hover:text-danger",children:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.35355 3.35355C9.54882 3.15829 9.54882 2.84171 9.35355 2.64645C9.15829 2.45118 8.84171 2.45118 8.64645 2.64645L6 5.29289L3.35355 2.64645C3.15829 2.45118 2.84171 2.45118 2.64645 2.64645C2.45118 2.84171 2.45118 3.15829 2.64645 3.35355L5.29289 6L2.64645 8.64645C2.45118 8.84171 2.45118 9.15829 2.64645 9.35355C2.84171 9.54882 3.15829 9.54882 3.35355 9.35355L6 6.70711L8.64645 9.35355C8.84171 9.54882 9.15829 9.54882 9.35355 9.35355C9.54882 9.15829 9.54882 8.84171 9.35355 8.64645L6.70711 6L9.35355 3.35355Z",fill:"currentColor"})})})]}),f.jsxs("span",{className:"m-1.5 flex items-center justify-center rounded border-[.5px] border-stroke bg-gray py-1.5 px-2.5 text-sm font-medium dark:border-strokedark dark:bg-white/30",children:["Development",f.jsx("span",{className:"cursor-pointer pl-2 hover:text-danger",children:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.35355 3.35355C9.54882 3.15829 9.54882 2.84171 9.35355 2.64645C9.15829 2.45118 8.84171 2.45118 8.64645 2.64645L6 5.29289L3.35355 2.64645C3.15829 2.45118 2.84171 2.45118 2.64645 2.64645C2.45118 2.84171 2.45118 3.15829 2.64645 3.35355L5.29289 6L2.64645 8.64645C2.45118 8.84171 2.45118 9.15829 2.64645 9.35355C2.84171 9.54882 3.15829 9.54882 3.35355 9.35355L6 6.70711L8.64645 9.35355C8.84171 9.54882 9.15829 9.54882 9.35355 9.35355C9.54882 9.15829 9.54882 8.84171 9.35355 8.64645L6.70711 6L9.35355 3.35355Z",fill:"currentColor"})})})]})]}),f.jsxs("select",{name:"",id:"",className:"absolute top-0 left-0 z-20 h-full w-full bg-transparent opacity-0",children:[f.jsx("option",{value:"",children:"Option"}),f.jsx("option",{value:"",children:"Option"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-10 -translate-y-1/2",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:"#637381"})})})})]})]})]})]})]})]})]}),SL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"FormLayout"}),f.jsxs("div",{className:"grid grid-cols-1 gap-9 sm:grid-cols-2",children:[f.jsx("div",{className:"flex flex-col gap-9",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Contact Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5 flex flex-col gap-6 xl:flex-row",children:[f.jsxs("div",{className:"w-full xl:w-1/2",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"First name"}),f.jsx("input",{type:"text",placeholder:"Enter your first name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"w-full xl:w-1/2",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Last name"}),f.jsx("input",{type:"text",placeholder:"Enter your last name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsxs("label",{className:"mb-2.5 block text-black dark:text-white",children:["Email ",f.jsx("span",{className:"text-meta-1",children:"*"})]}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Subject"}),f.jsx("input",{type:"text",placeholder:"Select subject",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Subject"}),f.jsxs("div",{className:"relative z-20 bg-transparent dark:bg-form-input",children:[f.jsxs("select",{className:"relative z-20 w-full appearance-none rounded border border-stroke bg-transparent py-3 px-5 outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary",children:[f.jsx("option",{value:"",children:"Type your subject"}),f.jsx("option",{value:"",children:"USA"}),f.jsx("option",{value:"",children:"UK"}),f.jsx("option",{value:"",children:"Canada"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-30 -translate-y-1/2",children:f.jsx("svg",{className:"fill-current",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:""})})})})]})]}),f.jsxs("div",{className:"mb-6",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Message"}),f.jsx("textarea",{rows:6,placeholder:"Type your message",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Send Message"})]})})]})}),f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Sign In Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Email"}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Password"}),f.jsx("input",{type:"password",placeholder:"Enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mt-5 mb-5.5 flex items-center justify-between",children:[f.jsxs("label",{htmlFor:"formCheckbox",className:"flex cursor-pointer",children:[f.jsxs("div",{className:"relative pt-0.5",children:[f.jsx("input",{type:"checkbox",id:"formCheckbox",className:"taskCheckbox sr-only"}),f.jsx("div",{className:"box mr-3 flex h-5 w-5 items-center justify-center rounded border border-stroke dark:border-strokedark",children:f.jsx("span",{className:"text-white opacity-0",children:f.jsx("svg",{className:"fill-current",width:"10",height:"7",viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70685 0.292804C9.89455 0.480344 10 0.734667 10 0.999847C10 1.26503 9.89455 1.51935 9.70685 1.70689L4.70059 6.7072C4.51283 6.89468 4.2582 7 3.9927 7C3.72721 7 3.47258 6.89468 3.28482 6.7072L0.281063 3.70701C0.0986771 3.5184 -0.00224342 3.26578 3.785e-05 3.00357C0.00231912 2.74136 0.10762 2.49053 0.29326 2.30511C0.4789 2.11969 0.730026 2.01451 0.992551 2.01224C1.25508 2.00996 1.50799 2.11076 1.69683 2.29293L3.9927 4.58607L8.29108 0.292804C8.47884 0.105322 8.73347 0 8.99896 0C9.26446 0 9.51908 0.105322 9.70685 0.292804Z",fill:""})})})})]}),f.jsx("p",{children:"Remember me"})]}),f.jsx("a",{href:"#",className:"text-sm text-primary",children:"Forget password?"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Sign In"})]})})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Sign Up Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Name"}),f.jsx("input",{type:"text",placeholder:"Enter your full name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Email"}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Password"}),f.jsx("input",{type:"password",placeholder:"Enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Re-type Password"}),f.jsx("input",{type:"password",placeholder:"Re-enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Sign Up"})]})})]})]})]})]}),AL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"Calendar"}),f.jsx("div",{className:"w-full max-w-full rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:f.jsxs("table",{className:"w-full",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"grid grid-cols-7 rounded-t-sm bg-primary text-white",children:[f.jsxs("th",{className:"flex h-15 items-center justify-center rounded-tl-sm p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Sunday "}),f.jsx("span",{className:"block lg:hidden",children:" Sun "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Monday "}),f.jsx("span",{className:"block lg:hidden",children:" Mon "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Tuesday "}),f.jsx("span",{className:"block lg:hidden",children:" Tue "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Wednesday "}),f.jsx("span",{className:"block lg:hidden",children:" Wed "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Thursday "}),f.jsx("span",{className:"block lg:hidden",children:" Thur "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Friday "}),f.jsx("span",{className:"block lg:hidden",children:" Fri "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center rounded-tr-sm p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Saturday "}),f.jsx("span",{className:"block lg:hidden",children:" Sat "})]})]})}),f.jsxs("tbody",{children:[f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsxs("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:[f.jsx("span",{className:"font-medium text-black dark:text-white",children:"1"}),f.jsxs("div",{className:"group h-16 w-full flex-grow cursor-pointer py-1 md:h-30",children:[f.jsx("span",{className:"group-hover:text-primary md:hidden",children:"More"}),f.jsxs("div",{className:"event invisible absolute left-2 z-99 mb-1 flex w-[200%] flex-col rounded-sm border-l-[3px] border-primary bg-gray px-3 py-1 text-left opacity-0 group-hover:visible group-hover:opacity-100 dark:bg-meta-4 md:visible md:w-[190%] md:opacity-100",children:[f.jsx("span",{className:"event-name text-sm font-semibold text-black dark:text-white",children:"Redesign Website"}),f.jsx("span",{className:"time text-sm font-medium text-black dark:text-white",children:"1 Dec - 2 Dec"})]})]})]}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"2"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"3"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"4"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"5"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"6"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"7"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"8"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"9"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"10"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"11"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"12"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"13"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"14"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"15"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"16"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"17"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"18"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"19"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"20"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"21"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"22"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"23"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"24"})}),f.jsxs("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:[f.jsx("span",{className:"font-medium text-black dark:text-white",children:"25"}),f.jsxs("div",{className:"group h-16 w-full flex-grow cursor-pointer py-1 md:h-30",children:[f.jsx("span",{className:"group-hover:text-primary md:hidden",children:"More"}),f.jsxs("div",{className:"event invisible absolute left-2 z-99 mb-1 flex w-[300%] flex-col rounded-sm border-l-[3px] border-primary bg-gray px-3 py-1 text-left opacity-0 group-hover:visible group-hover:opacity-100 dark:bg-meta-4 md:visible md:w-[290%] md:opacity-100",children:[f.jsx("span",{className:"event-name text-sm font-semibold text-black dark:text-white",children:"App Design"}),f.jsx("span",{className:"time text-sm font-medium text-black dark:text-white",children:"25 Dec - 27 Dec"})]})]})]}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"26"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"27"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"28"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"29"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"30"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"31"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"1"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"2"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"3"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"4"})})]})]})]})})]}),jL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"Alerts"}),f.jsx("div",{className:"rounded-sm border border-stroke bg-white p-4 shadow-default dark:border-strokedark dark:bg-boxdark md:p-6 xl:p-9",children:f.jsxs("div",{className:"flex flex-col gap-7.5",children:[f.jsxs("div",{className:"flex w-full border-l-6 border-warning bg-warning bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-9 items-center justify-center rounded-lg bg-warning bg-opacity-30",children:f.jsx("svg",{width:"19",height:"16",viewBox:"0 0 19 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M1.50493 16H17.5023C18.6204 16 19.3413 14.9018 18.8354 13.9735L10.8367 0.770573C10.2852 -0.256858 8.70677 -0.256858 8.15528 0.770573L0.156617 13.9735C-0.334072 14.8998 0.386764 16 1.50493 16ZM10.7585 12.9298C10.7585 13.6155 10.2223 14.1433 9.45583 14.1433C8.6894 14.1433 8.15311 13.6155 8.15311 12.9298V12.9015C8.15311 12.2159 8.6894 11.688 9.45583 11.688C10.2223 11.688 10.7585 12.2159 10.7585 12.9015V12.9298ZM8.75236 4.01062H10.2548C10.6674 4.01062 10.9127 4.33826 10.8671 4.75288L10.2071 10.1186C10.1615 10.5049 9.88572 10.7455 9.50142 10.7455C9.11929 10.7455 8.84138 10.5028 8.79579 10.1186L8.13574 4.75288C8.09449 4.33826 8.33984 4.01062 8.75236 4.01062Z",fill:"#FBBF24"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 text-lg font-semibold text-[#9D5425]",children:"Attention needed"}),f.jsx("p",{className:"leading-relaxed text-[#D0915C]",children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when"})]})]}),f.jsxs("div",{className:"flex w-full border-l-6 border-[#34D399] bg-[#34D399] bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-full max-w-[36px] items-center justify-center rounded-lg bg-[#34D399]",children:f.jsx("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M15.2984 0.826822L15.2868 0.811827L15.2741 0.797751C14.9173 0.401867 14.3238 0.400754 13.9657 0.794406L5.91888 9.45376L2.05667 5.2868C1.69856 4.89287 1.10487 4.89389 0.747996 5.28987C0.417335 5.65675 0.417335 6.22337 0.747996 6.59026L0.747959 6.59029L0.752701 6.59541L4.86742 11.0348C5.14445 11.3405 5.52858 11.5 5.89581 11.5C6.29242 11.5 6.65178 11.3355 6.92401 11.035L15.2162 2.11161C15.5833 1.74452 15.576 1.18615 15.2984 0.826822Z",fill:"white",stroke:"white"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 text-lg font-semibold text-black dark:text-[#34D399] ",children:"Message Sent Successfully"}),f.jsx("p",{className:"text-base leading-relaxed text-body",children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry."})]})]}),f.jsxs("div",{className:"flex w-full border-l-6 border-[#F87171] bg-[#F87171] bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-full max-w-[36px] items-center justify-center rounded-lg bg-[#F87171]",children:f.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M6.4917 7.65579L11.106 12.2645C11.2545 12.4128 11.4715 12.5 11.6738 12.5C11.8762 12.5 12.0931 12.4128 12.2416 12.2645C12.5621 11.9445 12.5623 11.4317 12.2423 11.1114C12.2422 11.1113 12.2422 11.1113 12.2422 11.1113C12.242 11.1111 12.2418 11.1109 12.2416 11.1107L7.64539 6.50351L12.2589 1.91221L12.2595 1.91158C12.5802 1.59132 12.5802 1.07805 12.2595 0.757793C11.9393 0.437994 11.4268 0.437869 11.1064 0.757418C11.1063 0.757543 11.1062 0.757668 11.106 0.757793L6.49234 5.34931L1.89459 0.740581L1.89396 0.739942C1.57364 0.420019 1.0608 0.420019 0.740487 0.739944C0.42005 1.05999 0.419837 1.57279 0.73985 1.89309L6.4917 7.65579ZM6.4917 7.65579L1.89459 12.2639L1.89395 12.2645C1.74546 12.4128 1.52854 12.5 1.32616 12.5C1.12377 12.5 0.906853 12.4128 0.758361 12.2645L1.1117 11.9108L0.758358 12.2645C0.437984 11.9445 0.437708 11.4319 0.757539 11.1116C0.757812 11.1113 0.758086 11.111 0.75836 11.1107L5.33864 6.50287L0.740487 1.89373L6.4917 7.65579Z",fill:"#ffffff",stroke:"#ffffff"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 font-semibold text-[#B45454]",children:"There were 1 errors with your submission"}),f.jsx("ul",{children:f.jsx("li",{className:"leading-relaxed text-[#CD5D5D]",children:"Lorem Ipsum is simply dummy text of the printing"})})]})]})]})})]}),NL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"Buttons"}),f.jsxs("div",{className:"mb-10 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke px-7 py-4 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Normal Button"})}),f.jsxs("div",{className:"p-4 md:p-6 xl:p-9",children:[f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]}),f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-meta-3 py-4 px-10 text-center font-medium text-meta-3 hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]}),f.jsxs("div",{className:"flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-black py-4 px-10 text-center font-medium text-black hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]})]})]}),f.jsxs("div",{className:"mb-10 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke px-7 py-4 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Button With Icon"})}),f.jsxs("div",{className:"p-4 md:p-6 xl:p-9",children:[f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]})]}),f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]})]}),f.jsxs("div",{className:"flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]})]})]})]})]}),EL={display:"flex",alignItems:"center",justifyContent:"center",padding:"4rem"},e5={display:"flex",alignItems:"center",gap:".5rem",borderRadius:".5rem",padding:"1rem"},LL={...e5,borderColor:"rgb(240 82 82)",backgroundColor:"rgb(253 232 232)",color:"rgb(200 30 30)"},PL={...e5,borderColor:"rgb(107 114 128)",backgroundColor:"rgb(243 244 246)",color:"rgb(55 65 81)"};function TL(){const{isLoading:e,error:t,user:r}=RL();return r!=null?f.jsx(Ld,{to:"/chat"}):f.jsxs("div",{style:EL,children:[t&&f.jsxs("div",{style:LL,children:[f.jsx(j0,{})," ",t]}),e&&f.jsxs("div",{style:PL,children:[f.jsx(j0,{})," Please wait a moment while we log you in."]})]})}function RL(){const{data:e}=Mr(),[t,r]=G.useState(!0),[s,o]=G.useState(null),c=aa();async function p(){try{r(!0);const A=new URLSearchParams(c.search).get("error");if(A!==null){o(A);return}const L=c.hash.slice(1),P=await _L({code:L});if(!ML(P)){o("Unable to login with the OAuth provider.");return}await c9(P.data.sessionId)}catch(C){console.error(C),o("Unable to login with the OAuth provider.")}finally{r(!1)}}const v=G.useRef(!0);return G.useEffect(()=>{v.current&&(v.current=!1,p())},[]),{user:e,error:s,isLoading:t}}const j0=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.25rem",height:"1.25rem",fill:"currentColor",stroke:"currentColor",strokeWidth:0,"aria-hidden":"true",viewBox:"0 0 20 20",children:f.jsx("path",{fillRule:"evenodd",stroke:"none",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM9 9a1 1 0 0 0 0 2v3a1 1 0 0 0 1 1h1a1 1 0 1 0 0-2v-3a1 1 0 0 0-1-1H9z",clipRule:"evenodd"})});async function _L(e){return ca.post("/auth/exchange-code",e)}function ML(e){return e.data&&typeof e.data.sessionId=="string"}const OL={LandingPageRoute:kA,LoginRoute:CA,SignupRoute:SA,TocPageRoute:AA,PrivacyRoute:jA,ChatPageRoute:YN,PricingPageRoute:ZN,AccountRoute:eE,CheckoutRoute:zr(rE),AdminRoute:zr(jE),AdminUsersRoute:zr(PE),AdminSettingsRoute:zr(fL),AdminChartsRoute:zr(vL),AdminMessagesRoute:zr(yL),AdminFormElementsRoute:zr(CL),AdminFormLayoutsRoute:zr(SL),AdminCalendarRoute:zr(AL),AdminUIAlertsRoute:zr(jL),AdminUIButtonsRoute:zr(NL)},IL=f.jsx(T8,{basename:"/",children:f.jsx(bA,{children:f.jsxs(P8,{children:[Object.entries(ck).map(([e,t])=>f.jsx(pm,{exact:!0,path:t.to,component:OL[e]},e)),f.jsx(pm,{exact:!0,path:"/oauth/callback",children:f.jsx(TL,{})})]})})});zL();async function zL(){e9(),await FL()}async function FL(){const e=await r1;Ku.createRoot(document.getElementById("root")).render(f.jsx(ge.StrictMode,{children:f.jsx(vw,{client:e,children:f.jsx(vj,{children:IL})})}))} +`;var A0=Xr;const fL=()=>{const e=t=>{t.preventDefault(),confirm("Are you sure you want to save the changes?")?A0.success("Your changes have been saved successfully!"):A0.error("Your changes have not been saved!")};return f.jsx(Di,{children:f.jsxs("div",{className:"mx-auto max-w-270",children:[f.jsx(Ln,{pageName:"Settings"}),f.jsxs("div",{className:"grid grid-cols-5 gap-8",children:[f.jsx("div",{className:"col-span-5 xl:col-span-3",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-7 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Personal Information"})}),f.jsx("div",{className:"p-7",children:f.jsxs("form",{onSubmit:e,children:[f.jsxs("div",{className:"mb-5.5 flex flex-col gap-5.5 sm:flex-row",children:[f.jsxs("div",{className:"w-full sm:w-1/2",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"fullName",children:"Full Name"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsx("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.72039 12.887C4.50179 12.1056 5.5616 11.6666 6.66667 11.6666H13.3333C14.4384 11.6666 15.4982 12.1056 16.2796 12.887C17.061 13.6684 17.5 14.7282 17.5 15.8333V17.5C17.5 17.9602 17.1269 18.3333 16.6667 18.3333C16.2064 18.3333 15.8333 17.9602 15.8333 17.5V15.8333C15.8333 15.1703 15.5699 14.5344 15.1011 14.0655C14.6323 13.5967 13.9964 13.3333 13.3333 13.3333H6.66667C6.00363 13.3333 5.36774 13.5967 4.8989 14.0655C4.43006 14.5344 4.16667 15.1703 4.16667 15.8333V17.5C4.16667 17.9602 3.79357 18.3333 3.33333 18.3333C2.8731 18.3333 2.5 17.9602 2.5 17.5V15.8333C2.5 14.7282 2.93899 13.6684 3.72039 12.887Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99967 3.33329C8.61896 3.33329 7.49967 4.45258 7.49967 5.83329C7.49967 7.214 8.61896 8.33329 9.99967 8.33329C11.3804 8.33329 12.4997 7.214 12.4997 5.83329C12.4997 4.45258 11.3804 3.33329 9.99967 3.33329ZM5.83301 5.83329C5.83301 3.53211 7.69849 1.66663 9.99967 1.66663C12.3009 1.66663 14.1663 3.53211 14.1663 5.83329C14.1663 8.13448 12.3009 9.99996 9.99967 9.99996C7.69849 9.99996 5.83301 8.13448 5.83301 5.83329Z",fill:""})]})})}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"fullName",id:"fullName",placeholder:"Devid Jhon",defaultValue:"Devid Jhon"})]})]}),f.jsxs("div",{className:"w-full sm:w-1/2",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"phoneNumber",children:"Phone Number"}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 px-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"phoneNumber",id:"phoneNumber",placeholder:"+990 3343 7865",defaultValue:"+990 3343 7865"})]})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"emailAddress",children:"Email Address"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsx("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.33301 4.16667C2.87658 4.16667 2.49967 4.54357 2.49967 5V15C2.49967 15.4564 2.87658 15.8333 3.33301 15.8333H16.6663C17.1228 15.8333 17.4997 15.4564 17.4997 15V5C17.4997 4.54357 17.1228 4.16667 16.6663 4.16667H3.33301ZM0.833008 5C0.833008 3.6231 1.9561 2.5 3.33301 2.5H16.6663C18.0432 2.5 19.1663 3.6231 19.1663 5V15C19.1663 16.3769 18.0432 17.5 16.6663 17.5H3.33301C1.9561 17.5 0.833008 16.3769 0.833008 15V5Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.983719 4.52215C1.24765 4.1451 1.76726 4.05341 2.1443 4.31734L9.99975 9.81615L17.8552 4.31734C18.2322 4.05341 18.7518 4.1451 19.0158 4.52215C19.2797 4.89919 19.188 5.4188 18.811 5.68272L10.4776 11.5161C10.1907 11.7169 9.80879 11.7169 9.52186 11.5161L1.18853 5.68272C0.811486 5.4188 0.719791 4.89919 0.983719 4.52215Z",fill:""})]})})}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"email",name:"emailAddress",id:"emailAddress",placeholder:"devidjond45@gmail.com",defaultValue:"devidjond45@gmail.com"})]})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"Username",children:"Username"}),f.jsx("input",{className:"w-full rounded border border-stroke bg-gray py-3 px-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",type:"text",name:"Username",id:"Username",placeholder:"devidjhon24",defaultValue:"devidjhon24"})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-3 block text-sm font-medium text-black dark:text-white",htmlFor:"Username",children:"BIO"}),f.jsxs("div",{className:"relative",children:[f.jsx("span",{className:"absolute left-4.5 top-4",children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsxs("g",{opacity:"0.8",clipPath:"url(#clip0_88_10224)",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.56524 3.23223C2.03408 2.76339 2.66997 2.5 3.33301 2.5H9.16634C9.62658 2.5 9.99967 2.8731 9.99967 3.33333C9.99967 3.79357 9.62658 4.16667 9.16634 4.16667H3.33301C3.11199 4.16667 2.90003 4.25446 2.74375 4.41074C2.58747 4.56702 2.49967 4.77899 2.49967 5V16.6667C2.49967 16.8877 2.58747 17.0996 2.74375 17.2559C2.90003 17.4122 3.11199 17.5 3.33301 17.5H14.9997C15.2207 17.5 15.4326 17.4122 15.5889 17.2559C15.7452 17.0996 15.833 16.8877 15.833 16.6667V10.8333C15.833 10.3731 16.2061 10 16.6663 10C17.1266 10 17.4997 10.3731 17.4997 10.8333V16.6667C17.4997 17.3297 17.2363 17.9656 16.7674 18.4344C16.2986 18.9033 15.6627 19.1667 14.9997 19.1667H3.33301C2.66997 19.1667 2.03408 18.9033 1.56524 18.4344C1.0964 17.9656 0.833008 17.3297 0.833008 16.6667V5C0.833008 4.33696 1.0964 3.70107 1.56524 3.23223Z",fill:""}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.6664 2.39884C16.4185 2.39884 16.1809 2.49729 16.0056 2.67253L8.25216 10.426L7.81167 12.188L9.57365 11.7475L17.3271 3.99402C17.5023 3.81878 17.6008 3.5811 17.6008 3.33328C17.6008 3.08545 17.5023 2.84777 17.3271 2.67253C17.1519 2.49729 16.9142 2.39884 16.6664 2.39884ZM14.8271 1.49402C15.3149 1.00622 15.9765 0.732178 16.6664 0.732178C17.3562 0.732178 18.0178 1.00622 18.5056 1.49402C18.9934 1.98182 19.2675 2.64342 19.2675 3.33328C19.2675 4.02313 18.9934 4.68473 18.5056 5.17253L10.5889 13.0892C10.4821 13.196 10.3483 13.2718 10.2018 13.3084L6.86847 14.1417C6.58449 14.2127 6.28409 14.1295 6.0771 13.9225C5.87012 13.7156 5.78691 13.4151 5.85791 13.1312L6.69124 9.79783C6.72787 9.65131 6.80364 9.51749 6.91044 9.41069L14.8271 1.49402Z",fill:""})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_88_10224",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),f.jsx("textarea",{className:"w-full rounded border border-stroke bg-gray py-3 pl-11.5 pr-4.5 text-black focus:border-primary focus-visible:outline-none dark:border-strokedark dark:bg-meta-4 dark:text-white dark:focus:border-primary",name:"bio",id:"bio",rows:6,placeholder:"Write your bio here",defaultValue:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque posuere fermentum urna, eu condimentum mauris tempus ut. Donec fermentum blandit aliquet."})]})]}),f.jsxs("div",{className:"flex justify-end gap-4.5",children:[f.jsx("button",{className:"flex justify-center rounded border border-stroke py-2 px-6 font-medium text-black hover:shadow-1 dark:border-strokedark dark:text-white",type:"submit",children:"Cancel"}),f.jsx("button",{className:"flex justify-center rounded bg-primary py-2 px-6 font-medium text-gray hover:shadow-1",type:"submit",children:"Save"})]})]})})]})}),f.jsx("div",{className:"col-span-5 xl:col-span-2",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-7 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Your Photo"})}),f.jsx("div",{className:"p-7",children:f.jsxs("form",{action:"#",children:[f.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[f.jsx("div",{className:"h-14 w-14 rounded-full"}),f.jsxs("div",{children:[f.jsx("span",{className:"mb-1.5 text-black dark:text-white",children:"Edit your photo"}),f.jsxs("span",{className:"flex gap-2.5",children:[f.jsx("button",{className:"text-sm hover:text-primary",children:"Delete"}),f.jsx("button",{className:"text-sm hover:text-primary",children:"Update"})]})]})]}),f.jsxs("div",{id:"FileUpload",className:"relative mb-5.5 block w-full cursor-pointer appearance-none rounded border-2 border-dashed border-primary bg-gray py-4 px-4 dark:bg-meta-4 sm:py-7.5",children:[f.jsx("input",{type:"file",accept:"image/*",className:"absolute inset-0 z-50 m-0 h-full w-full cursor-pointer p-0 opacity-0 outline-none"}),f.jsxs("div",{className:"flex flex-col items-center justify-center space-y-3",children:[f.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full border border-stroke bg-white dark:border-strokedark dark:bg-boxdark",children:f.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.99967 9.33337C2.36786 9.33337 2.66634 9.63185 2.66634 10V12.6667C2.66634 12.8435 2.73658 13.0131 2.8616 13.1381C2.98663 13.2631 3.1562 13.3334 3.33301 13.3334H12.6663C12.8431 13.3334 13.0127 13.2631 13.1377 13.1381C13.2628 13.0131 13.333 12.8435 13.333 12.6667V10C13.333 9.63185 13.6315 9.33337 13.9997 9.33337C14.3679 9.33337 14.6663 9.63185 14.6663 10V12.6667C14.6663 13.1971 14.4556 13.7058 14.0806 14.0809C13.7055 14.456 13.1968 14.6667 12.6663 14.6667H3.33301C2.80257 14.6667 2.29387 14.456 1.91879 14.0809C1.54372 13.7058 1.33301 13.1971 1.33301 12.6667V10C1.33301 9.63185 1.63148 9.33337 1.99967 9.33337Z",fill:"#3C50E0"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5286 1.52864C7.78894 1.26829 8.21106 1.26829 8.4714 1.52864L11.8047 4.86197C12.0651 5.12232 12.0651 5.54443 11.8047 5.80478C11.5444 6.06513 11.1223 6.06513 10.8619 5.80478L8 2.94285L5.13807 5.80478C4.87772 6.06513 4.45561 6.06513 4.19526 5.80478C3.93491 5.54443 3.93491 5.12232 4.19526 4.86197L7.5286 1.52864Z",fill:"#3C50E0"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99967 1.33337C8.36786 1.33337 8.66634 1.63185 8.66634 2.00004V10C8.66634 10.3682 8.36786 10.6667 7.99967 10.6667C7.63148 10.6667 7.33301 10.3682 7.33301 10V2.00004C7.33301 1.63185 7.63148 1.33337 7.99967 1.33337Z",fill:"#3C50E0"})]})}),f.jsxs("p",{children:[f.jsx("span",{className:"text-primary",children:"Click to upload"})," or drag and drop"]}),f.jsx("p",{className:"mt-1.5",children:"SVG, PNG, JPG or GIF"}),f.jsx("p",{children:"(max, 800 X 800px)"})]})]}),f.jsxs("div",{className:"flex justify-end gap-4.5",children:[f.jsx("button",{className:"flex justify-center rounded border border-stroke py-2 px-6 font-medium text-black hover:shadow-1 dark:border-strokedark dark:text-white",type:"submit",children:"Cancel"}),f.jsx("button",{className:"flex justify-center rounded bg-primary py-2 px-6 font-medium text-gray hover:bg-opacity-70",type:"submit",children:"Save"})]})]})})]})})]})]})})},pL=()=>{const[e,t]=G.useState({series:[{data:[168,385,201,298,187,195,291,110,215,390,280,112,123,212,270,190,310,115,90,380,112,223,292,170,290,110,115,290,380,312]}]}),r={colors:["#3C50E0"],chart:{fontFamily:"Satoshi, sans-serif",type:"bar",height:350,toolbar:{show:!1}},plotOptions:{bar:{horizontal:!1,columnWidth:"55%",borderRadius:2}},dataLabels:{enabled:!1},stroke:{show:!0,width:4,colors:["transparent"]},xaxis:{categories:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],axisBorder:{show:!1},axisTicks:{show:!1}},legend:{show:!0,position:"top",horizontalAlign:"left",fontFamily:"inter",markers:{radius:99}},grid:{yaxis:{lines:{show:!1}}},fill:{opacity:1},tooltip:{x:{show:!1}}};return f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5",children:[f.jsx("div",{children:f.jsx("h3",{className:"text-xl font-semibold text-black dark:text-white",children:"Visitors Analytics"})}),f.jsx("div",{className:"mb-2",children:f.jsx("div",{id:"chartFour",className:"-ml-5",children:f.jsx(Vd,{options:r,series:e.series,type:"bar",height:350})})})]})},gL={chart:{type:"donut"},colors:["#10B981","#375E83","#259AE6","#FFA70B"],labels:["Remote","Hybrid","Onsite","Leave"],legend:{show:!0,position:"bottom"},plotOptions:{pie:{donut:{size:"65%",background:"transparent"}}},dataLabels:{enabled:!1},responsive:[{breakpoint:2600,options:{chart:{width:380}}},{breakpoint:640,options:{chart:{width:200}}}]},mL=()=>{const[e,t]=G.useState({series:[65,34,12,56]});return f.jsxs("div",{className:"col-span-12 rounded-sm border border-stroke bg-white px-5 pt-7.5 pb-5 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:col-span-5",children:[f.jsxs("div",{className:"mb-3 justify-between gap-4 sm:flex",children:[f.jsx("div",{children:f.jsx("h5",{className:"text-xl font-semibold text-black dark:text-white",children:"Visitors Analytics"})}),f.jsx("div",{children:f.jsxs("div",{className:"relative z-20 inline-block",children:[f.jsxs("select",{name:"",id:"",className:"relative z-20 inline-flex appearance-none bg-transparent py-1 pl-3 pr-8 text-sm font-medium outline-none",children:[f.jsx("option",{value:"",children:"Monthly"}),f.jsx("option",{value:"",children:"Yearly"})]}),f.jsx("span",{className:"absolute top-1/2 right-3 z-10 -translate-y-1/2",children:f.jsxs("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M0.47072 1.08816C0.47072 1.02932 0.500141 0.955772 0.54427 0.911642C0.647241 0.808672 0.809051 0.808672 0.912022 0.896932L4.85431 4.60386C4.92785 4.67741 5.06025 4.67741 5.14851 4.60386L9.09079 0.896932C9.19376 0.793962 9.35557 0.808672 9.45854 0.911642C9.56151 1.01461 9.5468 1.17642 9.44383 1.27939L5.50155 4.98632C5.22206 5.23639 4.78076 5.23639 4.51598 4.98632L0.558981 1.27939C0.50014 1.22055 0.47072 1.16171 0.47072 1.08816Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.22659 0.546578L5.00141 4.09604L8.76422 0.557869C9.08459 0.244537 9.54201 0.329403 9.79139 0.578788C10.112 0.899434 10.0277 1.36122 9.77668 1.61224L9.76644 1.62248L5.81552 5.33722C5.36257 5.74249 4.6445 5.7544 4.19352 5.32924C4.19327 5.32901 4.19377 5.32948 4.19352 5.32924L0.225953 1.61241C0.102762 1.48922 -4.20186e-08 1.31674 -3.20269e-08 1.08816C-2.40601e-08 0.905899 0.0780105 0.712197 0.211421 0.578787C0.494701 0.295506 0.935574 0.297138 1.21836 0.539529L1.22659 0.546578ZM4.51598 4.98632C4.78076 5.23639 5.22206 5.23639 5.50155 4.98632L9.44383 1.27939C9.5468 1.17642 9.56151 1.01461 9.45854 0.911642C9.35557 0.808672 9.19376 0.793962 9.09079 0.896932L5.14851 4.60386C5.06025 4.67741 4.92785 4.67741 4.85431 4.60386L0.912022 0.896932C0.809051 0.808672 0.647241 0.808672 0.54427 0.911642C0.500141 0.955772 0.47072 1.02932 0.47072 1.08816C0.47072 1.16171 0.50014 1.22055 0.558981 1.27939L4.51598 4.98632Z",fill:"#637381"})]})})]})})]}),f.jsx("div",{className:"mb-2",children:f.jsx("div",{id:"chartThree",className:"mx-auto flex justify-center",children:f.jsx(Vd,{options:gL,series:e.series,type:"donut"})})}),f.jsxs("div",{className:"-mx-8 flex flex-wrap items-center justify-center gap-y-3",children:[f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-primary"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Desktop "}),f.jsx("span",{children:" 65% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#6577F3]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Tablet "}),f.jsx("span",{children:" 34% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#8FD0EF]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Mobile "}),f.jsx("span",{children:" 45% "})]})]})}),f.jsx("div",{className:"w-full px-8 sm:w-1/2",children:f.jsxs("div",{className:"flex w-full items-center",children:[f.jsx("span",{className:"mr-2 block h-3 w-full max-w-3 rounded-full bg-[#0FADCF]"}),f.jsxs("p",{className:"flex w-full justify-between text-sm font-medium text-black dark:text-white",children:[f.jsx("span",{children:" Unknown "}),f.jsx("span",{children:" 12% "})]})]})})]})]})},xL=()=>f.jsx("div",{className:"col-span-12 rounded-sm border border-stroke bg-white p-7.5 shadow-default dark:border-strokedark dark:bg-boxdark",children:f.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2 xl:grid-cols-4 xl:gap-0",children:[f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark xl:border-b-0 xl:border-r xl:pb-0",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"$4,350"}),f.jsx("p",{className:"text-sm font-medium",children:"Unique Visitors"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"18%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark xl:border-b-0 xl:border-r xl:pb-0",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"55.9K"}),f.jsx("p",{className:"text-sm font-medium",children:"Total Pageviews"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"25%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2 border-b border-stroke pb-5 dark:border-strokedark sm:border-b-0 sm:pb-0 xl:border-r",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"54%"}),f.jsx("p",{className:"text-sm font-medium",children:"Bounce Rate"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M9.75302 12.1328L13.7773 8.10856L14.8381 9.16939L9.00279 15.0047L3.16748 9.16939L4.22831 8.10856L8.25256 12.1328V3.00098H9.75302V12.1328Z",fill:"#F0950C"})}),f.jsx("span",{className:"text-meta-8",children:"7%"})]})]}),f.jsxs("div",{className:"flex items-center justify-center gap-2",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"mb-0.5 text-xl font-semibold text-black dark:text-white md:text-title-lg",children:"2m 56s"}),f.jsx("p",{className:"text-sm font-medium",children:"Visit Duration"})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.25259 5.87281L4.22834 9.89706L3.16751 8.83623L9.00282 3.00092L14.8381 8.83623L13.7773 9.89705L9.75306 5.87281L9.75306 15.0046L8.25259 15.0046L8.25259 5.87281Z",fill:"#10B981"})}),f.jsx("span",{className:"text-meta-3",children:"12%"})]})]})]})}),vL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"Chart"}),f.jsxs("div",{className:"grid grid-cols-12 gap-4 md:gap-6 2xl:gap-7.5",children:[f.jsx(xL,{}),f.jsx("div",{className:"col-span-12",children:f.jsx(pL,{})}),f.jsx(mL,{})]})]});function yL(){return f.jsx("div",{children:"Hello world!"})}const bL=()=>{const[e,t]=G.useState(!1);return f.jsx("div",{children:f.jsxs("label",{htmlFor:"checkboxLabelFour",className:"flex cursor-pointer select-none items-center",children:[f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:"checkboxLabelFour",className:"sr-only",onChange:()=>{t(!e)}}),f.jsx("div",{className:`mr-4 flex h-5 w-5 items-center justify-center rounded-full border ${e&&"border-primary"}`,children:f.jsx("span",{className:`h-2.5 w-2.5 rounded-full bg-transparent ${e&&"!bg-primary"}`,children:" "})})]}),"Checkbox Text"]})})},wL=({user:e,updateUserById:t})=>{const[r,s]=G.useState((e==null?void 0:e.hasPaid)||!1);return f.jsx("div",{className:"relative",children:f.jsx("label",{htmlFor:`toggle1-${e==null?void 0:e.id}`,className:"flex cursor-pointer select-none items-center",children:f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:`toggle1-${e==null?void 0:e.id}`,className:"sr-only",onChange:()=>{s(!r),t&&t({id:e==null?void 0:e.id,data:{hasPaid:!r}})}}),f.jsx("div",{className:"reblock h-8 w-14 rounded-full bg-meta-9 dark:bg-[#5A616B]"}),f.jsx("div",{className:`absolute left-1 top-1 h-6 w-6 rounded-full bg-white dark:bg-gray-400 transition ${r&&"!right-1 !translate-x-full !bg-primary dark:!bg-white"}`})]})})})},kL=()=>{const[e,t]=G.useState(!1);return f.jsx("div",{children:f.jsx("label",{htmlFor:"toggle3",className:"flex cursor-pointer select-none items-center",children:f.jsxs("div",{className:"relative",children:[f.jsx("input",{type:"checkbox",id:"toggle3",className:"sr-only",onChange:()=>{t(!e)}}),f.jsx("div",{className:"block h-8 w-14 rounded-full bg-meta-9 dark:bg-[#5A616B]"}),f.jsxs("div",{className:`dot absolute left-1 top-1 flex h-6 w-6 items-center justify-center rounded-full bg-white transition ${e&&"!right-1 !translate-x-full !bg-primary dark:!bg-white"}`,children:[f.jsx("span",{className:`hidden ${e&&"!block"}`,children:f.jsx("svg",{className:"fill-white dark:fill-black",width:"11",height:"8",viewBox:"0 0 11 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M10.0915 0.951972L10.0867 0.946075L10.0813 0.940568C9.90076 0.753564 9.61034 0.753146 9.42927 0.939309L4.16201 6.22962L1.58507 3.63469C1.40401 3.44841 1.11351 3.44879 0.932892 3.63584C0.755703 3.81933 0.755703 4.10875 0.932892 4.29224L0.932878 4.29225L0.934851 4.29424L3.58046 6.95832C3.73676 7.11955 3.94983 7.2 4.1473 7.2C4.36196 7.2 4.55963 7.11773 4.71406 6.9584L10.0468 1.60234C10.2436 1.4199 10.2421 1.1339 10.0915 0.951972ZM4.2327 6.30081L4.2317 6.2998C4.23206 6.30015 4.23237 6.30049 4.23269 6.30082L4.2327 6.30081Z",fill:"",stroke:"",strokeWidth:"0.4"})})}),f.jsx("span",{className:`${e&&"hidden"}`,children:f.jsx("svg",{className:"h-4 w-4 stroke-current",fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]})]})})})},CL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"FormElements"}),f.jsxs("div",{className:"grid grid-cols-1 gap-9 sm:grid-cols-2",children:[f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Input Fields"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Default Input"}),f.jsx("input",{type:"text",placeholder:"Default Input",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Active Input"}),f.jsx("input",{type:"text",placeholder:"Active Input",className:"w-full rounded-lg border-[1.5px] border-primary bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:bg-form-input"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block font-medium text-black dark:text-white",children:"Disabled label"}),f.jsx("input",{type:"text",placeholder:"Disabled label",disabled:!0,className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary dark:disabled:bg-black"})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Toggle switch input"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsx(wL,{}),f.jsx(kL,{})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Time and date"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Date picker"}),f.jsx("div",{className:"relative",children:f.jsx("input",{type:"date",className:"custom-input-date custom-input-date-1 w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Select date"}),f.jsx("div",{className:"relative",children:f.jsx("input",{type:"date",className:"custom-input-date custom-input-date-2 w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"File upload"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Attach file"}),f.jsx("input",{type:"file",className:"w-full cursor-pointer rounded-lg border-[1.5px] border-stroke bg-transparent font-medium outline-none transition file:mr-5 file:border-collapse file:cursor-pointer file:border-0 file:border-r file:border-solid file:border-stroke file:bg-whiter file:py-3 file:px-5 file:hover:bg-primary file:hover:bg-opacity-10 focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:file:border-form-strokedark dark:file:bg-white/30 dark:file:text-white dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Attach file"}),f.jsx("input",{type:"file",className:"w-full rounded-md border border-stroke p-3 outline-none transition file:mr-4 file:rounded file:border-[0.5px] file:border-stroke file:bg-[#EEEEEE] file:py-1 file:px-2.5 file:text-sm file:font-medium focus:border-primary file:focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:file:border-strokedark dark:file:bg-white/30 dark:file:text-white"})]})]})]})]}),f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Textarea Fields"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Default textarea"}),f.jsx("textarea",{rows:6,placeholder:"Default textarea",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Active textarea"}),f.jsx("textarea",{rows:6,placeholder:"Active textarea",className:"w-full rounded-lg border-[1.5px] border-primary bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:bg-form-input"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Disabled textarea"}),f.jsx("textarea",{rows:6,disabled:!0,placeholder:"Disabled textarea",className:"w-full rounded-lg border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary dark:disabled:bg-black"})]})]})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Checkbox and radio"})}),f.jsx("div",{className:"flex flex-col gap-5.5 p-6.5",children:f.jsx(bL,{})})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Select input"})}),f.jsxs("div",{className:"flex flex-col gap-5.5 p-6.5",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Select Country"}),f.jsxs("div",{className:"relative z-20 bg-white dark:bg-form-input",children:[f.jsx("span",{className:"absolute top-1/2 left-4 z-30 -translate-y-1/2",children:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsxs("g",{opacity:"0.8",children:[f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0007 2.50065C5.85852 2.50065 2.50065 5.85852 2.50065 10.0007C2.50065 14.1428 5.85852 17.5007 10.0007 17.5007C14.1428 17.5007 17.5007 14.1428 17.5007 10.0007C17.5007 5.85852 14.1428 2.50065 10.0007 2.50065ZM0.833984 10.0007C0.833984 4.93804 4.93804 0.833984 10.0007 0.833984C15.0633 0.833984 19.1673 4.93804 19.1673 10.0007C19.1673 15.0633 15.0633 19.1673 10.0007 19.1673C4.93804 19.1673 0.833984 15.0633 0.833984 10.0007Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.833984 9.99935C0.833984 9.53911 1.20708 9.16602 1.66732 9.16602H18.334C18.7942 9.16602 19.1673 9.53911 19.1673 9.99935C19.1673 10.4596 18.7942 10.8327 18.334 10.8327H1.66732C1.20708 10.8327 0.833984 10.4596 0.833984 9.99935Z",fill:"#637381"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.50084 10.0008C7.55796 12.5632 8.4392 15.0301 10.0006 17.0418C11.5621 15.0301 12.4433 12.5632 12.5005 10.0008C12.4433 7.43845 11.5621 4.97153 10.0007 2.95982C8.4392 4.97153 7.55796 7.43845 7.50084 10.0008ZM10.0007 1.66749L9.38536 1.10547C7.16473 3.53658 5.90275 6.69153 5.83417 9.98346C5.83392 9.99503 5.83392 10.0066 5.83417 10.0182C5.90275 13.3101 7.16473 16.4651 9.38536 18.8962C9.54325 19.069 9.76655 19.1675 10.0007 19.1675C10.2348 19.1675 10.4581 19.069 10.6159 18.8962C12.8366 16.4651 14.0986 13.3101 14.1671 10.0182C14.1674 10.0066 14.1674 9.99503 14.1671 9.98346C14.0986 6.69153 12.8366 3.53658 10.6159 1.10547L10.0007 1.66749Z",fill:"#637381"})]})})}),f.jsxs("select",{className:"relative z-20 w-full appearance-none rounded border border-stroke bg-transparent py-3 px-12 outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsx("option",{value:"",children:"USA"}),f.jsx("option",{value:"",children:"UK"}),f.jsx("option",{value:"",children:"Canada"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-10 -translate-y-1/2",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:"#637381"})})})})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-3 block text-black dark:text-white",children:"Multiselect Dropdown"}),f.jsxs("div",{className:"relative z-20 w-full rounded border border-stroke p-1.5 pr-8 font-medium outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input",children:[f.jsxs("div",{className:"flex flex-wrap items-center",children:[f.jsxs("span",{className:"m-1.5 flex items-center justify-center rounded border-[.5px] border-stroke bg-gray py-1.5 px-2.5 text-sm font-medium dark:border-strokedark dark:bg-white/30",children:["Design",f.jsx("span",{className:"cursor-pointer pl-2 hover:text-danger",children:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.35355 3.35355C9.54882 3.15829 9.54882 2.84171 9.35355 2.64645C9.15829 2.45118 8.84171 2.45118 8.64645 2.64645L6 5.29289L3.35355 2.64645C3.15829 2.45118 2.84171 2.45118 2.64645 2.64645C2.45118 2.84171 2.45118 3.15829 2.64645 3.35355L5.29289 6L2.64645 8.64645C2.45118 8.84171 2.45118 9.15829 2.64645 9.35355C2.84171 9.54882 3.15829 9.54882 3.35355 9.35355L6 6.70711L8.64645 9.35355C8.84171 9.54882 9.15829 9.54882 9.35355 9.35355C9.54882 9.15829 9.54882 8.84171 9.35355 8.64645L6.70711 6L9.35355 3.35355Z",fill:"currentColor"})})})]}),f.jsxs("span",{className:"m-1.5 flex items-center justify-center rounded border-[.5px] border-stroke bg-gray py-1.5 px-2.5 text-sm font-medium dark:border-strokedark dark:bg-white/30",children:["Development",f.jsx("span",{className:"cursor-pointer pl-2 hover:text-danger",children:f.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.35355 3.35355C9.54882 3.15829 9.54882 2.84171 9.35355 2.64645C9.15829 2.45118 8.84171 2.45118 8.64645 2.64645L6 5.29289L3.35355 2.64645C3.15829 2.45118 2.84171 2.45118 2.64645 2.64645C2.45118 2.84171 2.45118 3.15829 2.64645 3.35355L5.29289 6L2.64645 8.64645C2.45118 8.84171 2.45118 9.15829 2.64645 9.35355C2.84171 9.54882 3.15829 9.54882 3.35355 9.35355L6 6.70711L8.64645 9.35355C8.84171 9.54882 9.15829 9.54882 9.35355 9.35355C9.54882 9.15829 9.54882 8.84171 9.35355 8.64645L6.70711 6L9.35355 3.35355Z",fill:"currentColor"})})})]})]}),f.jsxs("select",{name:"",id:"",className:"absolute top-0 left-0 z-20 h-full w-full bg-transparent opacity-0",children:[f.jsx("option",{value:"",children:"Option"}),f.jsx("option",{value:"",children:"Option"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-10 -translate-y-1/2",children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:"#637381"})})})})]})]})]})]})]})]})]}),SL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"FormLayout"}),f.jsxs("div",{className:"grid grid-cols-1 gap-9 sm:grid-cols-2",children:[f.jsx("div",{className:"flex flex-col gap-9",children:f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Contact Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5 flex flex-col gap-6 xl:flex-row",children:[f.jsxs("div",{className:"w-full xl:w-1/2",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"First name"}),f.jsx("input",{type:"text",placeholder:"Enter your first name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"w-full xl:w-1/2",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Last name"}),f.jsx("input",{type:"text",placeholder:"Enter your last name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsxs("label",{className:"mb-2.5 block text-black dark:text-white",children:["Email ",f.jsx("span",{className:"text-meta-1",children:"*"})]}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Subject"}),f.jsx("input",{type:"text",placeholder:"Select subject",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Subject"}),f.jsxs("div",{className:"relative z-20 bg-transparent dark:bg-form-input",children:[f.jsxs("select",{className:"relative z-20 w-full appearance-none rounded border border-stroke bg-transparent py-3 px-5 outline-none transition focus:border-primary active:border-primary dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary",children:[f.jsx("option",{value:"",children:"Type your subject"}),f.jsx("option",{value:"",children:"USA"}),f.jsx("option",{value:"",children:"UK"}),f.jsx("option",{value:"",children:"Canada"})]}),f.jsx("span",{className:"absolute top-1/2 right-4 z-30 -translate-y-1/2",children:f.jsx("svg",{className:"fill-current",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("g",{opacity:"0.8",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:""})})})})]})]}),f.jsxs("div",{className:"mb-6",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Message"}),f.jsx("textarea",{rows:6,placeholder:"Type your message",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Send Message"})]})})]})}),f.jsxs("div",{className:"flex flex-col gap-9",children:[f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Sign In Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Email"}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Password"}),f.jsx("input",{type:"password",placeholder:"Enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mt-5 mb-5.5 flex items-center justify-between",children:[f.jsxs("label",{htmlFor:"formCheckbox",className:"flex cursor-pointer",children:[f.jsxs("div",{className:"relative pt-0.5",children:[f.jsx("input",{type:"checkbox",id:"formCheckbox",className:"taskCheckbox sr-only"}),f.jsx("div",{className:"box mr-3 flex h-5 w-5 items-center justify-center rounded border border-stroke dark:border-strokedark",children:f.jsx("span",{className:"text-white opacity-0",children:f.jsx("svg",{className:"fill-current",width:"10",height:"7",viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70685 0.292804C9.89455 0.480344 10 0.734667 10 0.999847C10 1.26503 9.89455 1.51935 9.70685 1.70689L4.70059 6.7072C4.51283 6.89468 4.2582 7 3.9927 7C3.72721 7 3.47258 6.89468 3.28482 6.7072L0.281063 3.70701C0.0986771 3.5184 -0.00224342 3.26578 3.785e-05 3.00357C0.00231912 2.74136 0.10762 2.49053 0.29326 2.30511C0.4789 2.11969 0.730026 2.01451 0.992551 2.01224C1.25508 2.00996 1.50799 2.11076 1.69683 2.29293L3.9927 4.58607L8.29108 0.292804C8.47884 0.105322 8.73347 0 8.99896 0C9.26446 0 9.51908 0.105322 9.70685 0.292804Z",fill:""})})})})]}),f.jsx("p",{children:"Remember me"})]}),f.jsx("a",{href:"#",className:"text-sm text-primary",children:"Forget password?"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Sign In"})]})})]}),f.jsxs("div",{className:"rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke py-4 px-6.5 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Sign Up Form"})}),f.jsx("form",{action:"#",children:f.jsxs("div",{className:"p-6.5",children:[f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Name"}),f.jsx("input",{type:"text",placeholder:"Enter your full name",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Email"}),f.jsx("input",{type:"email",placeholder:"Enter your email address",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-4.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Password"}),f.jsx("input",{type:"password",placeholder:"Enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsxs("div",{className:"mb-5.5",children:[f.jsx("label",{className:"mb-2.5 block text-black dark:text-white",children:"Re-type Password"}),f.jsx("input",{type:"password",placeholder:"Re-enter password",className:"w-full rounded border-[1.5px] border-stroke bg-transparent py-3 px-5 font-medium outline-none transition focus:border-primary active:border-primary disabled:cursor-default disabled:bg-whiter dark:border-form-strokedark dark:bg-form-input dark:focus:border-primary"})]}),f.jsx("button",{className:"flex w-full justify-center rounded bg-primary p-3 font-medium text-gray",children:"Sign Up"})]})})]})]})]})]}),AL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"Calendar"}),f.jsx("div",{className:"w-full max-w-full rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:f.jsxs("table",{className:"w-full",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"grid grid-cols-7 rounded-t-sm bg-primary text-white",children:[f.jsxs("th",{className:"flex h-15 items-center justify-center rounded-tl-sm p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Sunday "}),f.jsx("span",{className:"block lg:hidden",children:" Sun "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Monday "}),f.jsx("span",{className:"block lg:hidden",children:" Mon "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Tuesday "}),f.jsx("span",{className:"block lg:hidden",children:" Tue "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Wednesday "}),f.jsx("span",{className:"block lg:hidden",children:" Wed "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Thursday "}),f.jsx("span",{className:"block lg:hidden",children:" Thur "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Friday "}),f.jsx("span",{className:"block lg:hidden",children:" Fri "})]}),f.jsxs("th",{className:"flex h-15 items-center justify-center rounded-tr-sm p-1 text-xs font-semibold sm:text-base xl:p-5",children:[f.jsx("span",{className:"hidden lg:block",children:" Saturday "}),f.jsx("span",{className:"block lg:hidden",children:" Sat "})]})]})}),f.jsxs("tbody",{children:[f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsxs("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:[f.jsx("span",{className:"font-medium text-black dark:text-white",children:"1"}),f.jsxs("div",{className:"group h-16 w-full flex-grow cursor-pointer py-1 md:h-30",children:[f.jsx("span",{className:"group-hover:text-primary md:hidden",children:"More"}),f.jsxs("div",{className:"event invisible absolute left-2 z-99 mb-1 flex w-[200%] flex-col rounded-sm border-l-[3px] border-primary bg-gray px-3 py-1 text-left opacity-0 group-hover:visible group-hover:opacity-100 dark:bg-meta-4 md:visible md:w-[190%] md:opacity-100",children:[f.jsx("span",{className:"event-name text-sm font-semibold text-black dark:text-white",children:"Redesign Website"}),f.jsx("span",{className:"time text-sm font-medium text-black dark:text-white",children:"1 Dec - 2 Dec"})]})]})]}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"2"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"3"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"4"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"5"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"6"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"7"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"8"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"9"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"10"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"11"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"12"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"13"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"14"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"15"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"16"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"17"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"18"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"19"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"20"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"21"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"22"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"23"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"24"})}),f.jsxs("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:[f.jsx("span",{className:"font-medium text-black dark:text-white",children:"25"}),f.jsxs("div",{className:"group h-16 w-full flex-grow cursor-pointer py-1 md:h-30",children:[f.jsx("span",{className:"group-hover:text-primary md:hidden",children:"More"}),f.jsxs("div",{className:"event invisible absolute left-2 z-99 mb-1 flex w-[300%] flex-col rounded-sm border-l-[3px] border-primary bg-gray px-3 py-1 text-left opacity-0 group-hover:visible group-hover:opacity-100 dark:bg-meta-4 md:visible md:w-[290%] md:opacity-100",children:[f.jsx("span",{className:"event-name text-sm font-semibold text-black dark:text-white",children:"App Design"}),f.jsx("span",{className:"time text-sm font-medium text-black dark:text-white",children:"25 Dec - 27 Dec"})]})]})]}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"26"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"27"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"28"})})]}),f.jsxs("tr",{className:"grid grid-cols-7",children:[f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"29"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"30"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"31"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"1"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"2"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"3"})}),f.jsx("td",{className:"ease relative h-20 cursor-pointer border border-stroke p-2 transition duration-500 hover:bg-gray dark:border-strokedark dark:hover:bg-meta-4 md:h-25 md:p-6 xl:h-31",children:f.jsx("span",{className:"font-medium text-black dark:text-white",children:"4"})})]})]})]})})]}),jL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"Alerts"}),f.jsx("div",{className:"rounded-sm border border-stroke bg-white p-4 shadow-default dark:border-strokedark dark:bg-boxdark md:p-6 xl:p-9",children:f.jsxs("div",{className:"flex flex-col gap-7.5",children:[f.jsxs("div",{className:"flex w-full border-l-6 border-warning bg-warning bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-9 items-center justify-center rounded-lg bg-warning bg-opacity-30",children:f.jsx("svg",{width:"19",height:"16",viewBox:"0 0 19 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M1.50493 16H17.5023C18.6204 16 19.3413 14.9018 18.8354 13.9735L10.8367 0.770573C10.2852 -0.256858 8.70677 -0.256858 8.15528 0.770573L0.156617 13.9735C-0.334072 14.8998 0.386764 16 1.50493 16ZM10.7585 12.9298C10.7585 13.6155 10.2223 14.1433 9.45583 14.1433C8.6894 14.1433 8.15311 13.6155 8.15311 12.9298V12.9015C8.15311 12.2159 8.6894 11.688 9.45583 11.688C10.2223 11.688 10.7585 12.2159 10.7585 12.9015V12.9298ZM8.75236 4.01062H10.2548C10.6674 4.01062 10.9127 4.33826 10.8671 4.75288L10.2071 10.1186C10.1615 10.5049 9.88572 10.7455 9.50142 10.7455C9.11929 10.7455 8.84138 10.5028 8.79579 10.1186L8.13574 4.75288C8.09449 4.33826 8.33984 4.01062 8.75236 4.01062Z",fill:"#FBBF24"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 text-lg font-semibold text-[#9D5425]",children:"Attention needed"}),f.jsx("p",{className:"leading-relaxed text-[#D0915C]",children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when"})]})]}),f.jsxs("div",{className:"flex w-full border-l-6 border-[#34D399] bg-[#34D399] bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-full max-w-[36px] items-center justify-center rounded-lg bg-[#34D399]",children:f.jsx("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M15.2984 0.826822L15.2868 0.811827L15.2741 0.797751C14.9173 0.401867 14.3238 0.400754 13.9657 0.794406L5.91888 9.45376L2.05667 5.2868C1.69856 4.89287 1.10487 4.89389 0.747996 5.28987C0.417335 5.65675 0.417335 6.22337 0.747996 6.59026L0.747959 6.59029L0.752701 6.59541L4.86742 11.0348C5.14445 11.3405 5.52858 11.5 5.89581 11.5C6.29242 11.5 6.65178 11.3355 6.92401 11.035L15.2162 2.11161C15.5833 1.74452 15.576 1.18615 15.2984 0.826822Z",fill:"white",stroke:"white"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 text-lg font-semibold text-black dark:text-[#34D399] ",children:"Message Sent Successfully"}),f.jsx("p",{className:"text-base leading-relaxed text-body",children:"Lorem Ipsum is simply dummy text of the printing and typesetting industry."})]})]}),f.jsxs("div",{className:"flex w-full border-l-6 border-[#F87171] bg-[#F87171] bg-opacity-[15%] px-7 py-8 shadow-md dark:bg-[#1B1B24] dark:bg-opacity-30 md:p-9",children:[f.jsx("div",{className:"mr-5 flex h-9 w-full max-w-[36px] items-center justify-center rounded-lg bg-[#F87171]",children:f.jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M6.4917 7.65579L11.106 12.2645C11.2545 12.4128 11.4715 12.5 11.6738 12.5C11.8762 12.5 12.0931 12.4128 12.2416 12.2645C12.5621 11.9445 12.5623 11.4317 12.2423 11.1114C12.2422 11.1113 12.2422 11.1113 12.2422 11.1113C12.242 11.1111 12.2418 11.1109 12.2416 11.1107L7.64539 6.50351L12.2589 1.91221L12.2595 1.91158C12.5802 1.59132 12.5802 1.07805 12.2595 0.757793C11.9393 0.437994 11.4268 0.437869 11.1064 0.757418C11.1063 0.757543 11.1062 0.757668 11.106 0.757793L6.49234 5.34931L1.89459 0.740581L1.89396 0.739942C1.57364 0.420019 1.0608 0.420019 0.740487 0.739944C0.42005 1.05999 0.419837 1.57279 0.73985 1.89309L6.4917 7.65579ZM6.4917 7.65579L1.89459 12.2639L1.89395 12.2645C1.74546 12.4128 1.52854 12.5 1.32616 12.5C1.12377 12.5 0.906853 12.4128 0.758361 12.2645L1.1117 11.9108L0.758358 12.2645C0.437984 11.9445 0.437708 11.4319 0.757539 11.1116C0.757812 11.1113 0.758086 11.111 0.75836 11.1107L5.33864 6.50287L0.740487 1.89373L6.4917 7.65579Z",fill:"#ffffff",stroke:"#ffffff"})})}),f.jsxs("div",{className:"w-full",children:[f.jsx("h5",{className:"mb-3 font-semibold text-[#B45454]",children:"There were 1 errors with your submission"}),f.jsx("ul",{children:f.jsx("li",{className:"leading-relaxed text-[#CD5D5D]",children:"Lorem Ipsum is simply dummy text of the printing"})})]})]})]})})]}),NL=()=>f.jsxs(Di,{children:[f.jsx(Ln,{pageName:"Buttons"}),f.jsxs("div",{className:"mb-10 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke px-7 py-4 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Normal Button"})}),f.jsxs("div",{className:"p-4 md:p-6 xl:p-9",children:[f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]}),f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-meta-3 py-4 px-10 text-center font-medium text-meta-3 hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]}),f.jsxs("div",{className:"flex flex-wrap gap-5 xl:gap-20",children:[f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-full bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"}),f.jsx(rt,{to:"#",className:"inline-flex items-center justify-center rounded-md border border-black py-4 px-10 text-center font-medium text-black hover:bg-opacity-90 lg:px-8 xl:px-10",children:"Button"})]})]})]}),f.jsxs("div",{className:"mb-10 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark",children:[f.jsx("div",{className:"border-b border-stroke px-7 py-4 dark:border-strokedark",children:f.jsx("h3",{className:"font-medium text-black dark:text-white",children:"Button With Icon"})}),f.jsxs("div",{className:"p-4 md:p-6 xl:p-9",children:[f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M17.8125 16.6656H2.1875C1.69022 16.6656 1.21331 16.4681 0.861675 16.1164C0.510044 15.7648 0.3125 15.2879 0.3125 14.7906V5.20935C0.3125 4.71207 0.510044 4.23516 0.861675 3.88353C1.21331 3.53189 1.69022 3.33435 2.1875 3.33435H17.8125C18.3098 3.33435 18.7867 3.53189 19.1383 3.88353C19.49 4.23516 19.6875 4.71207 19.6875 5.20935V14.7906C19.6875 15.2879 19.49 15.7648 19.1383 16.1164C18.7867 16.4681 18.3098 16.6656 17.8125 16.6656ZM2.1875 4.58435C2.02174 4.58435 1.86277 4.6502 1.74556 4.76741C1.62835 4.88462 1.5625 5.04359 1.5625 5.20935V14.7906C1.5625 14.9564 1.62835 15.1153 1.74556 15.2325C1.86277 15.3498 2.02174 15.4156 2.1875 15.4156H17.8125C17.9783 15.4156 18.1372 15.3498 18.2544 15.2325C18.3717 15.1153 18.4375 14.9564 18.4375 14.7906V5.20935C18.4375 5.04359 18.3717 4.88462 18.2544 4.76741C18.1372 4.6502 17.9783 4.58435 17.8125 4.58435H2.1875Z",fill:""}),f.jsx("path",{d:"M9.9996 10.6438C9.63227 10.6437 9.2721 10.5421 8.95898 10.35L0.887102 5.45001C0.744548 5.36381 0.642073 5.22452 0.602222 5.06277C0.58249 4.98268 0.578725 4.89948 0.591144 4.81794C0.603563 4.73639 0.631922 4.65809 0.674602 4.58751C0.717281 4.51692 0.773446 4.45543 0.839888 4.40655C0.906331 4.35767 0.981751 4.32236 1.06184 4.30263C1.22359 4.26277 1.39455 4.28881 1.5371 4.37501L9.60898 9.28126C9.7271 9.35331 9.8628 9.39143 10.0012 9.39143C10.1395 9.39143 10.2752 9.35331 10.3934 9.28126L18.4621 4.37501C18.5323 4.33233 18.6102 4.30389 18.6913 4.29131C18.7725 4.27873 18.8554 4.28227 18.9352 4.30171C19.015 4.32115 19.0901 4.35612 19.1564 4.40462C19.2227 4.45312 19.2788 4.51421 19.3215 4.58438C19.3642 4.65456 19.3926 4.73245 19.4052 4.81362C19.4177 4.89478 19.4142 4.97763 19.3948 5.05743C19.3753 5.13723 19.3404 5.21242 19.2919 5.27871C19.2434 5.34499 19.1823 5.40108 19.1121 5.44376L11.0402 10.35C10.7271 10.5421 10.3669 10.6437 9.9996 10.6438Z",fill:""})]})}),"Button With Icon"]})]}),f.jsxs("div",{className:"mb-7.5 flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-md border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M18.0758 0.849976H16.0695C15.819 0.851233 15.5774 0.942521 15.3886 1.10717C15.1999 1.27183 15.0766 1.49887 15.0414 1.74685L14.4789 5.80935H13.3976V3.4031C13.3952 3.1654 13.3002 2.93802 13.1327 2.76935C12.9652 2.60068 12.7384 2.50403 12.5008 2.49998H10.082C10.0553 2.27763 9.94981 2.07221 9.78472 1.92089C9.61964 1.76956 9.40584 1.68233 9.18202 1.67498H6.45389C6.32885 1.67815 6.20571 1.70632 6.09172 1.75782C5.97773 1.80932 5.8752 1.8831 5.79017 1.97484C5.70513 2.06657 5.63932 2.17439 5.59659 2.29195C5.55387 2.40951 5.5351 2.53443 5.54139 2.65935V3.32498H3.15077C2.91396 3.32162 2.68544 3.41207 2.51507 3.57659C2.3447 3.7411 2.24632 3.96632 2.24139 4.2031V5.81248C2.0999 5.81539 1.96078 5.84937 1.83387 5.91201C1.70697 5.97466 1.59538 6.06443 1.50702 6.17498C1.41616 6.29094 1.35267 6.42593 1.32128 6.56986C1.2899 6.7138 1.29143 6.86297 1.32577 7.00623C1.32443 7.02182 1.32443 7.0375 1.32577 7.0531L3.23827 12.9375C3.29323 13.1432 3.4153 13.3247 3.58513 13.4532C3.75496 13.5818 3.96282 13.6499 4.17577 13.6468H13.3883C13.7379 13.6464 14.0756 13.5197 14.3391 13.29C14.6027 13.0603 14.7744 12.7431 14.8226 12.3968L16.2508 2.09998H18.0726C18.2384 2.09998 18.3974 2.03413 18.5146 1.91692C18.6318 1.79971 18.6976 1.64074 18.6976 1.47498C18.6976 1.30922 18.6318 1.15024 18.5146 1.03303C18.3974 0.915824 18.2384 0.849976 18.0726 0.849976H18.0758ZM12.1383 5.79373H10.0945V3.74998H12.1476L12.1383 5.79373ZM6.79139 2.9156H8.84452V3.39998V5.7906H6.79139V2.9156ZM3.49139 4.5656H5.54139V5.79373H3.49139V4.5656ZM13.5851 12.225C13.579 12.2727 13.5556 12.3166 13.5193 12.3483C13.4831 12.38 13.4364 12.3972 13.3883 12.3968H4.37577L2.65389 7.04998H14.3039L13.5851 12.225Z",fill:""}),f.jsx("path",{d:"M5.31172 15.1125C4.9118 15.1094 4.51997 15.2252 4.18594 15.4451C3.85191 15.665 3.59073 15.9792 3.43553 16.3478C3.28034 16.7164 3.23813 17.1228 3.31425 17.5154C3.39037 17.908 3.58139 18.2692 3.86309 18.5531C4.14478 18.837 4.50445 19.0308 4.89647 19.11C5.28849 19.1891 5.6952 19.1501 6.06499 18.9978C6.43477 18.8454 6.75099 18.5867 6.97351 18.2544C7.19603 17.9221 7.31483 17.5312 7.31485 17.1312C7.31608 16.8671 7.26522 16.6053 7.16518 16.3608C7.06515 16.1164 6.91789 15.894 6.73184 15.7065C6.5458 15.519 6.3246 15.3701 6.08092 15.2681C5.83725 15.1662 5.57586 15.1133 5.31172 15.1125ZM5.31172 17.9C5.15905 17.9031 5.00891 17.8607 4.88045 17.7781C4.75199 17.6955 4.65103 17.5766 4.59045 17.4364C4.52986 17.2962 4.51239 17.1412 4.54026 16.9911C4.56814 16.8409 4.64009 16.7025 4.74695 16.5934C4.85382 16.4843 4.99075 16.4096 5.14028 16.3786C5.28981 16.3477 5.44518 16.3619 5.58656 16.4196C5.72794 16.4773 5.84894 16.5758 5.93412 16.7026C6.0193 16.8293 6.06481 16.9785 6.06484 17.1312C6.06651 17.3329 5.9882 17.5271 5.84705 17.6712C5.70589 17.8152 5.51341 17.8975 5.31172 17.9Z",fill:""}),f.jsx("path",{d:"M12.9504 15.1125C12.5505 15.1094 12.1586 15.2252 11.8246 15.4451C11.4906 15.665 11.2294 15.9792 11.0742 16.3478C10.919 16.7164 10.8768 17.1228 10.9529 17.5154C11.029 17.908 11.2201 18.2692 11.5018 18.5531C11.7835 18.837 12.1431 19.0308 12.5351 19.11C12.9272 19.1891 13.3339 19.1501 13.7037 18.9978C14.0734 18.8454 14.3897 18.5867 14.6122 18.2544C14.8347 17.9221 14.9535 17.5312 14.9535 17.1312C14.9552 16.598 14.7452 16.086 14.3696 15.7075C13.994 15.329 13.4836 15.115 12.9504 15.1125ZM12.9504 17.9C12.7977 17.9031 12.6476 17.8607 12.5191 17.7781C12.3907 17.6955 12.2897 17.5766 12.2291 17.4364C12.1685 17.2962 12.1511 17.1412 12.1789 16.9911C12.2068 16.8409 12.2788 16.7025 12.3856 16.5934C12.4925 16.4843 12.6294 16.4096 12.779 16.3786C12.9285 16.3477 13.0838 16.3619 13.2252 16.4196C13.3666 16.4773 13.4876 16.5758 13.5728 16.7026C13.658 16.8293 13.7035 16.9785 13.7035 17.1312C13.7052 17.3329 13.6269 17.5271 13.4857 17.6712C13.3446 17.8152 13.1521 17.8975 12.9504 17.9Z",fill:""})]})}),"Button With Icon"]})]}),f.jsxs("div",{className:"flex flex-wrap gap-5 xl:gap-7.5",children:[f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-primary py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-meta-3 py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full bg-black py-4 px-10 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]}),f.jsxs(rt,{to:"#",className:"inline-flex items-center justify-center gap-2.5 rounded-full border border-primary py-4 px-10 text-center font-medium text-primary hover:bg-opacity-90 lg:px-8 xl:px-10",children:[f.jsx("span",{children:f.jsxs("svg",{className:"fill-current",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("g",{clipPath:"url(#clip0_182_46495)",children:f.jsx("path",{d:"M18.875 11.4375C18.3125 10.8438 17.5625 10.5312 16.75 10.5312C16.125 10.5312 15.5625 10.7188 15.0625 11.0938C15 11.125 14.9688 11.1562 14.9062 11.2188C14.8438 11.1875 14.8125 11.125 14.75 11.0938C14.25 10.7188 13.6875 10.5312 13.0625 10.5312C12.9062 10.5312 12.7812 10.5312 12.6562 10.5625C11.7188 9.5 10.5625 8.75 9.3125 8.40625C10.625 7.75 11.5312 6.40625 11.5312 4.875C11.5312 2.6875 9.75 0.9375 7.59375 0.9375C5.40625 0.9375 3.65625 2.71875 3.65625 4.875C3.65625 6.4375 4.5625 7.78125 5.875 8.40625C4.5625 8.78125 3.40625 9.53125 2.4375 10.6562C1.125 12.2188 0.375 14.4062 0.3125 16.7812C0.3125 17.0312 0.4375 17.25 0.65625 17.3438C1.5 17.75 4.4375 19.0938 7.59375 19.0938C9.28125 19.0938 10.8438 18.8125 10.9062 18.8125C11.25 18.75 11.4688 18.4375 11.4062 18.0938C11.3438 17.75 11.0312 17.5312 10.6875 17.5938C10.6875 17.5938 9.15625 17.875 7.59375 17.875C5.0625 17.8438 2.65625 16.875 1.5625 16.375C1.65625 14.4375 2.3125 12.7187 3.375 11.4375C4.46875 10.125 5.96875 9.40625 7.59375 9.40625C9.03125 9.40625 10.375 10 11.4375 11.0312C11.2812 11.1562 11.125 11.2812 11 11.4062C10.4688 11.9688 10.1875 12.75 10.1875 13.5938C10.1875 14.4375 10.5 15.2188 11.1562 16C11.6875 16.6562 12.4375 17.2812 13.2812 18L13.3125 18.0312C13.5937 18.25 13.9062 18.5312 14.2188 18.8125C14.4062 19 14.6875 19.0938 14.9375 19.0938C15.1875 19.0938 15.4687 19 15.6562 18.8125C16 18.5312 16.3125 18.25 16.5938 18C17.4375 17.2812 18.1875 16.6562 18.7188 16C19.375 15.2188 19.6875 14.4375 19.6875 13.5938C19.6875 12.7812 19.4062 12.0312 18.875 11.4375ZM4.875 4.875C4.875 3.375 6.09375 2.1875 7.5625 2.1875C9.0625 2.1875 10.25 3.40625 10.25 4.875C10.25 6.375 9.03125 7.5625 7.5625 7.5625C6.09375 7.5625 4.875 6.34375 4.875 4.875ZM17.75 15.2188C17.2812 15.7812 16.5938 16.375 15.7812 17.0625C15.5312 17.2812 15.2188 17.5312 14.9062 17.7812C14.625 17.5312 14.3438 17.2812 14.0938 17.0938L14.0625 17.0625C13.25 16.375 12.5625 15.7812 12.0938 15.2188C11.625 14.6562 11.4062 14.1562 11.4062 13.625C11.4062 13.0937 11.5938 12.625 11.9062 12.2812C12.2188 11.9375 12.6563 11.75 13.0938 11.75C13.4375 11.75 13.75 11.8438 14 12.0625C14.125 12.1562 14.2188 12.25 14.3125 12.375C14.5938 12.7188 15.1875 12.7188 15.5 12.375C15.5938 12.25 15.7187 12.1562 15.8125 12.0625C16.0937 11.8438 16.4062 11.75 16.7188 11.75C17.1875 11.75 17.5938 11.9375 17.9062 12.2812C18.2188 12.625 18.4062 13.0937 18.4062 13.625C18.4375 14.1875 18.2188 14.6562 17.75 15.2188Z",fill:""})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"clip0_182_46495",children:f.jsx("rect",{width:"20",height:"20",fill:"white"})})})]})}),"Button With Icon"]})]})]})]})]}),EL={display:"flex",alignItems:"center",justifyContent:"center",padding:"4rem"},J2={display:"flex",alignItems:"center",gap:".5rem",borderRadius:".5rem",padding:"1rem"},LL={...J2,borderColor:"rgb(240 82 82)",backgroundColor:"rgb(253 232 232)",color:"rgb(200 30 30)"},PL={...J2,borderColor:"rgb(107 114 128)",backgroundColor:"rgb(243 244 246)",color:"rgb(55 65 81)"};function TL(){const{isLoading:e,error:t,user:r}=RL();return r!=null?f.jsx(Ld,{to:"/chat"}):f.jsxs("div",{style:EL,children:[t&&f.jsxs("div",{style:LL,children:[f.jsx(j0,{})," ",t]}),e&&f.jsxs("div",{style:PL,children:[f.jsx(j0,{})," Please wait a moment while we log you in."]})]})}function RL(){const{data:e}=Mr(),[t,r]=G.useState(!0),[s,o]=G.useState(null),c=aa();async function p(){try{r(!0);const A=new URLSearchParams(c.search).get("error");if(A!==null){o(A);return}const L=c.hash.slice(1),P=await _L({code:L});if(!ML(P)){o("Unable to login with the OAuth provider.");return}await c9(P.data.sessionId)}catch(C){console.error(C),o("Unable to login with the OAuth provider.")}finally{r(!1)}}const v=G.useRef(!0);return G.useEffect(()=>{v.current&&(v.current=!1,p())},[]),{user:e,error:s,isLoading:t}}const j0=()=>f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.25rem",height:"1.25rem",fill:"currentColor",stroke:"currentColor",strokeWidth:0,"aria-hidden":"true",viewBox:"0 0 20 20",children:f.jsx("path",{fillRule:"evenodd",stroke:"none",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM9 9a1 1 0 0 0 0 2v3a1 1 0 0 0 1 1h1a1 1 0 1 0 0-2v-3a1 1 0 0 0-1-1H9z",clipRule:"evenodd"})});async function _L(e){return ca.post("/auth/exchange-code",e)}function ML(e){return e.data&&typeof e.data.sessionId=="string"}const OL={LandingPageRoute:kA,LoginRoute:CA,SignupRoute:SA,TocPageRoute:AA,PrivacyRoute:jA,ChatPageRoute:YN,PricingPageRoute:ZN,AccountRoute:eE,CheckoutRoute:zr(rE),AdminRoute:zr(jE),AdminUsersRoute:zr(PE),AdminSettingsRoute:zr(fL),AdminChartsRoute:zr(vL),AdminMessagesRoute:zr(yL),AdminFormElementsRoute:zr(CL),AdminFormLayoutsRoute:zr(SL),AdminCalendarRoute:zr(AL),AdminUIAlertsRoute:zr(jL),AdminUIButtonsRoute:zr(NL)},IL=f.jsx(T8,{basename:"/",children:f.jsx(bA,{children:f.jsxs(P8,{children:[Object.entries(ck).map(([e,t])=>f.jsx(pm,{exact:!0,path:t.to,component:OL[e]},e)),f.jsx(pm,{exact:!0,path:"/oauth/callback",children:f.jsx(TL,{})})]})})});zL();async function zL(){e9(),await FL()}async function FL(){const e=await r1;Ku.createRoot(document.getElementById("root")).render(f.jsx(ge.StrictMode,{children:f.jsx(vw,{client:e,children:f.jsx(vj,{children:IL})})}))} diff --git a/index.html b/index.html index 75b0745..ba12b6f 100644 --- a/index.html +++ b/index.html @@ -12,19 +12,23 @@ + + - - - - + + + + + + Capt’n.ai - +