From 0662d840c36c35a786a7bd83a46942cfb2018a10 Mon Sep 17 00:00:00 2001 From: ah7255703 Date: Wed, 6 Dec 2023 23:00:46 +0200 Subject: [PATCH 1/6] Refactor useSessionId hook --- copilot-widget/lib/hooks/useSessionId.ts | 26 +++++++++--------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/copilot-widget/lib/hooks/useSessionId.ts b/copilot-widget/lib/hooks/useSessionId.ts index cbb274fbd..7991379c6 100644 --- a/copilot-widget/lib/hooks/useSessionId.ts +++ b/copilot-widget/lib/hooks/useSessionId.ts @@ -1,20 +1,14 @@ -import { useLayoutEffect, useState } from "react"; +import { useEffect, useState } from "react"; -export const SESSION_ID_KEY = "@openchatai:session_id"; -function gtSessionId() { - return sessionStorage.getItem(SESSION_ID_KEY); +// the session id will be copilotId:uniqueId +function randomString(length: number = 10) { + return Math.random().toString(36).substring(2, length + 2); } -export function useSessionId() { - const [sessionId, setSessionId] = useState(gtSessionId); - useLayoutEffect(() => { - const $sessionId = sessionStorage.getItem(SESSION_ID_KEY); - if ($sessionId) { - setSessionId(sessionId); - } else { - const newSessionId = Math.random().toString(36).substring(2, 15); - sessionStorage.setItem(SESSION_ID_KEY, newSessionId); - setSessionId(newSessionId); - } - }, []); + +export function useSessionId(copilotToken: string) { + const [sessionId, setSessionId] = useState(sessionStorage.getItem(copilotToken) || randomString()); + useEffect(() => { + sessionStorage.setItem(copilotToken, sessionId); + }, [sessionId, copilotToken]); return { sessionId, setSessionId }; } From bfe8559c33d0901f791d6b1d1edbabdde75908b7 Mon Sep 17 00:00:00 2001 From: ah7255703 Date: Wed, 6 Dec 2023 23:02:43 +0200 Subject: [PATCH 2/6] Update sessionId in AxiosProvider --- copilot-widget/lib/contexts/axiosInstance.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copilot-widget/lib/contexts/axiosInstance.tsx b/copilot-widget/lib/contexts/axiosInstance.tsx index 9dc2a05fe..1f41d2daa 100644 --- a/copilot-widget/lib/contexts/axiosInstance.tsx +++ b/copilot-widget/lib/contexts/axiosInstance.tsx @@ -30,7 +30,7 @@ const AxiosContext = createContext(undefined); // prefred it separated for the future. export function AxiosProvider({ children }: { children: ReactNode }) { const config = useConfigData(); - const { sessionId } = useSessionId(); + const { sessionId } = useSessionId(config?.token || 'defaultToken'); const axiosInstance: AxiosInstance = createAxiosInstance(config?.apiUrl, sessionId, config?.token); return ( From 22c92b800456931e0d29ceb06e2f0d2acbab860d Mon Sep 17 00:00:00 2001 From: ah7255703 Date: Wed, 6 Dec 2023 23:04:58 +0200 Subject: [PATCH 3/6] Update build script to use npm run build:embed --- .github/workflows/build-widget.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-widget.yml b/.github/workflows/build-widget.yml index b56b679ec..ad0f59e8a 100644 --- a/.github/workflows/build-widget.yml +++ b/.github/workflows/build-widget.yml @@ -5,7 +5,7 @@ on: paths: - "copilot-widget/**" jobs: - build-and-publish: + build-and-upload-script: runs-on: ubuntu-latest steps: @@ -18,7 +18,7 @@ jobs: run: cd copilot-widget/ && npm install - name: Build copilot-widget - run: cd copilot-widget/ && npm run build + run: cd copilot-widget/ && npm run build:embed - name: Upload embed as artifact. uses: actions/upload-artifact@v3 From 8bba3332f88451c7b553354701fbb664c5e71ce7 Mon Sep 17 00:00:00 2001 From: ah7255703 Date: Wed, 6 Dec 2023 23:08:19 +0200 Subject: [PATCH 4/6] updated `pilot.js` --- dashboard/public/pilot.js | 86 +++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/dashboard/public/pilot.js b/dashboard/public/pilot.js index f75b70129..8402072b0 100644 --- a/dashboard/public/pilot.js +++ b/dashboard/public/pilot.js @@ -1,4 +1,4 @@ -function Dw(e,t){for(var n=0;nr[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"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function _r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Og={exports:{}},Ea={},Ag={exports:{}},ce={};/** +function Lw(e,t){for(var n=0;nr[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"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function _r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tg={exports:{}},Ea={},Og={exports:{}},ce={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function Dw(e,t){for(var n=0;n>>1,I=z[X];if(0>>1;Xo(Y,S))Ao(ne,Y)?(z[X]=ne,z[A]=S,X=A):(z[X]=Y,z[U]=S,X=U);else if(Ao(ne,S))z[X]=ne,z[A]=S,X=A;else break e}}return G}function o(z,G){var S=z.sortIndex-G.sortIndex;return S!==0?S:z.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var s=[],u=[],c=1,p=null,d=3,f=!1,h=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(z){for(var G=n(u);G!==null;){if(G.callback===null)r(u);else if(G.startTime<=z)r(u),G.sortIndex=G.expirationTime,t(s,G);else break;G=n(u)}}function C(z){if(m=!1,v(z),!h)if(n(s)!==null)h=!0,Q(E);else{var G=n(u);G!==null&&te(C,G.startTime-z)}}function E(z,G){h=!1,m&&(m=!1,g(O),O=-1),f=!0;var S=d;try{for(v(G),p=n(s);p!==null&&(!(p.expirationTime>G)||z&&!_());){var X=p.callback;if(typeof X=="function"){p.callback=null,d=p.priorityLevel;var I=X(p.expirationTime<=G);G=e.unstable_now(),typeof I=="function"?p.callback=I:p===n(s)&&r(s),v(G)}else r(s);p=n(s)}if(p!==null)var b=!0;else{var U=n(u);U!==null&&te(C,U.startTime-G),b=!1}return b}finally{p=null,d=S,f=!1}}var k=!1,T=null,O=-1,N=5,P=-1;function _(){return!(e.unstable_now()-Pz||125X?(z.sortIndex=S,t(u,z),n(s)===null&&z===n(u)&&(m?(g(O),O=-1):m=!0,te(C,S-X))):(z.sortIndex=I,t(s,z),h||f||(h=!0,Q(E))),z},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(z){var G=d;return function(){var S=d;d=G;try{return z.apply(this,arguments)}finally{d=S}}}})(Mg);jg.exports=Mg;var rx=jg.exports;/** + */(function(e){function t(z,G){var S=z.length;z.push(G);e:for(;0>>1,I=z[X];if(0>>1;Xo(Y,S))Ao(ne,Y)?(z[X]=ne,z[A]=S,X=A):(z[X]=Y,z[U]=S,X=U);else if(Ao(ne,S))z[X]=ne,z[A]=S,X=A;else break e}}return G}function o(z,G){var S=z.sortIndex-G.sortIndex;return S!==0?S:z.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var s=[],u=[],c=1,p=null,d=3,f=!1,h=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(z){for(var G=n(u);G!==null;){if(G.callback===null)r(u);else if(G.startTime<=z)r(u),G.sortIndex=G.expirationTime,t(s,G);else break;G=n(u)}}function C(z){if(m=!1,v(z),!h)if(n(s)!==null)h=!0,Q(E);else{var G=n(u);G!==null&&te(C,G.startTime-z)}}function E(z,G){h=!1,m&&(m=!1,g(O),O=-1),f=!0;var S=d;try{for(v(G),p=n(s);p!==null&&(!(p.expirationTime>G)||z&&!_());){var X=p.callback;if(typeof X=="function"){p.callback=null,d=p.priorityLevel;var I=X(p.expirationTime<=G);G=e.unstable_now(),typeof I=="function"?p.callback=I:p===n(s)&&r(s),v(G)}else r(s);p=n(s)}if(p!==null)var b=!0;else{var U=n(u);U!==null&&te(C,U.startTime-G),b=!1}return b}finally{p=null,d=S,f=!1}}var k=!1,T=null,O=-1,N=5,P=-1;function _(){return!(e.unstable_now()-Pz||125X?(z.sortIndex=S,t(u,z),n(s)===null&&z===n(u)&&(m?(g(O),O=-1):m=!0,te(C,S-X))):(z.sortIndex=I,t(s,z),h||f||(h=!0,Q(E))),z},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(z){var G=d;return function(){var S=d;d=G;try{return z.apply(this,arguments)}finally{d=S}}}})(jg);Fg.exports=jg;var nx=Fg.exports;/** * @license React * react-dom.production.min.js * @@ -30,19 +30,19 @@ function Dw(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pu=Object.prototype.hasOwnProperty,ox=/^[: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]*$/,If={},Ff={};function ix(e){return Pu.call(Ff,e)?!0:Pu.call(If,e)?!1:ox.test(e)?Ff[e]=!0:(If[e]=!0,!1)}function lx(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ax(e,t,n,r){if(t===null||typeof t>"u"||lx(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ct(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var Je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Je[e]=new ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Je[t]=new ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Je[e]=new ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Je[e]=new ct(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){Je[e]=new ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Je[e]=new ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Je[e]=new ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Je[e]=new ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Je[e]=new ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var Jc=/[\-:]([a-z])/g;function ep(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(Jc,ep);Je[t]=new ct(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(Jc,ep);Je[t]=new ct(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(Jc,ep);Je[t]=new ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Je[e]=new ct(e,1,!1,e.toLowerCase(),null,!1,!1)});Je.xlinkHref=new ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Je[e]=new ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function tp(e,t,n,r){var o=Je.hasOwnProperty(t)?Je[t]:null;(o!==null?o.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pu=Object.prototype.hasOwnProperty,rx=/^[: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]*$/,Nf={},If={};function ox(e){return Pu.call(If,e)?!0:Pu.call(Nf,e)?!1:rx.test(e)?If[e]=!0:(Nf[e]=!0,!1)}function ix(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function lx(e,t,n,r){if(t===null||typeof t>"u"||ix(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ct(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var Je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Je[e]=new ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Je[t]=new ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Je[e]=new ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Je[e]=new ct(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){Je[e]=new ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Je[e]=new ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Je[e]=new ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Je[e]=new ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Je[e]=new ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var Zc=/[\-:]([a-z])/g;function Jc(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(Zc,Jc);Je[t]=new ct(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(Zc,Jc);Je[t]=new ct(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(Zc,Jc);Je[t]=new ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Je[e]=new ct(e,1,!1,e.toLowerCase(),null,!1,!1)});Je.xlinkHref=new ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Je[e]=new ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function ep(e,t,n,r){var o=Je.hasOwnProperty(t)?Je[t]:null;(o!==null?o.type!==0:r||!(2a||o[l]!==i[a]){var s=` -`+o[l].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=l&&0<=a);break}}}finally{Os=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vo(e):""}function sx(e){switch(e.tag){case 5:return Vo(e.type);case 16:return Vo("Lazy");case 13:return Vo("Suspense");case 19:return Vo("SuspenseList");case 0:case 2:case 15:return e=As(e.type,!1),e;case 11:return e=As(e.type.render,!1),e;case 1:return e=As(e.type,!0),e;default:return""}}function $u(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 Hr:return"Fragment";case Ur:return"Portal";case Tu:return"Profiler";case np:return"StrictMode";case Ou:return"Suspense";case Au:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Wg:return(e.displayName||"Context")+".Consumer";case Hg:return(e._context.displayName||"Context")+".Provider";case rp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case op:return t=e.displayName||null,t!==null?t:$u(e.type)||"Memo";case Bn:t=e._payload,e=e._init;try{return $u(e(t))}catch{}}return null}function ux(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 $u(t);case 8:return t===np?"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 rr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Gg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cx(e){var t=Gg(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qi(e){e._valueTracker||(e._valueTracker=cx(e))}function qg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Gg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Wl(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 _u(e,t){var n=t.checked;return De({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Mf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Yg(e,t){t=t.checked,t!=null&&tp(e,"checked",t,!1)}function Ru(e,t){Yg(e,t);var n=rr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Lu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Lu(e,t.type,rr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Lu(e,t,n){(t!=="number"||Wl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Go=Array.isArray;function to(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Ki.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ui(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qo={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},px=["Webkit","ms","Moz","O"];Object.keys(Qo).forEach(function(e){px.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qo[t]=Qo[e]})});function Zg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qo.hasOwnProperty(e)&&Qo[e]?(""+t).trim():t+"px"}function Jg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Zg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var fx=De({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 Nu(e,t){if(t){if(fx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function Iu(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 Fu=null;function ip(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ju=null,no=null,ro=null;function Wf(e){if(e=Di(e)){if(typeof ju!="function")throw Error(F(280));var t=e.stateNode;t&&(t=$a(t),ju(e.stateNode,e.type,t))}}function ey(e){no?ro?ro.push(e):ro=[e]:no=e}function ty(){if(no){var e=no,t=ro;if(ro=no=null,Wf(e),t)for(e=0;e>>=0,e===0?32:31-(Sx(e)/Cx|0)|0}var Xi=64,Zi=4194304;function qo(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 Yl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var a=l&~o;a!==0?r=qo(a):(i&=l,i!==0&&(r=qo(i)))}else l=n&~o,l!==0?r=qo(l):i!==0&&(r=qo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ri(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=n}function Ox(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Xo),Jf=String.fromCharCode(32),ed=!1;function by(e,t){switch(e){case"keyup":return nb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ky(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wr=!1;function ob(e,t){switch(e){case"compositionend":return ky(t);case"keypress":return t.which!==32?null:(ed=!0,Jf);case"textInput":return e=t.data,e===Jf&&ed?null:e;default:return null}}function ib(e,t){if(Wr)return e==="compositionend"||!dp&&by(e,t)?(e=wy(),El=cp=Vn=null,Wr=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=od(n)}}function Py(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Py(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ty(){for(var e=window,t=Wl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wl(e.document)}return t}function hp(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 hb(e){var t=Ty(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Py(n.ownerDocument.documentElement,n)){if(r!==null&&hp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=id(n,i);var l=id(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Vr=null,Vu=null,Jo=null,Gu=!1;function ld(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Gu||Vr==null||Vr!==Wl(r)||(r=Vr,"selectionStart"in r&&hp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Jo&&mi(Jo,r)||(Jo=r,r=Xl(Vu,"onSelect"),0Yr||(e.current=Zu[Yr],Zu[Yr]=null,Yr--)}function Ce(e,t){Yr++,Zu[Yr]=e.current,e.current=t}var or={},ot=ur(or),ht=ur(!1),Cr=or;function co(e,t){var n=e.type.contextTypes;if(!n)return or;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function mt(e){return e=e.childContextTypes,e!=null}function Jl(){Ae(ht),Ae(ot)}function dd(e,t,n){if(ot.current!==or)throw Error(F(168));Ce(ot,t),Ce(ht,n)}function Ny(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(F(108,ux(e)||"Unknown",o));return De({},n,r)}function ea(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,Cr=ot.current,Ce(ot,e),Ce(ht,ht.current),!0}function hd(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=Ny(e,t,Cr),r.__reactInternalMemoizedMergedChildContext=e,Ae(ht),Ae(ot),Ce(ot,e)):Ae(ht),Ce(ht,n)}var vn=null,_a=!1,Hs=!1;function Iy(e){vn===null?vn=[e]:vn.push(e)}function Pb(e){_a=!0,Iy(e)}function cr(){if(!Hs&&vn!==null){Hs=!0;var e=0,t=ve;try{var n=vn;for(ve=1;e>=l,o-=l,wn=1<<32-Qt(t)+o|n<O?(N=T,T=null):N=T.sibling;var P=d(g,T,v[O],C);if(P===null){T===null&&(T=N);break}e&&T&&P.alternate===null&&t(g,T),y=i(P,y,O),k===null?E=P:k.sibling=P,k=P,T=N}if(O===v.length)return n(g,T),$e&&mr(g,O),E;if(T===null){for(;OO?(N=T,T=null):N=T.sibling;var _=d(g,T,P.value,C);if(_===null){T===null&&(T=N);break}e&&T&&_.alternate===null&&t(g,T),y=i(_,y,O),k===null?E=_:k.sibling=_,k=_,T=N}if(P.done)return n(g,T),$e&&mr(g,O),E;if(T===null){for(;!P.done;O++,P=v.next())P=p(g,P.value,C),P!==null&&(y=i(P,y,O),k===null?E=P:k.sibling=P,k=P);return $e&&mr(g,O),E}for(T=r(g,T);!P.done;O++,P=v.next())P=f(T,g,O,P.value,C),P!==null&&(e&&P.alternate!==null&&T.delete(P.key===null?O:P.key),y=i(P,y,O),k===null?E=P:k.sibling=P,k=P);return e&&T.forEach(function(R){return t(g,R)}),$e&&mr(g,O),E}function w(g,y,v,C){if(typeof v=="object"&&v!==null&&v.type===Hr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Yi:e:{for(var E=v.key,k=y;k!==null;){if(k.key===E){if(E=v.type,E===Hr){if(k.tag===7){n(g,k.sibling),y=o(k,v.props.children),y.return=g,g=y;break e}}else if(k.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Bn&&bd(E)===k.type){n(g,k.sibling),y=o(k,v.props),y.ref=Fo(g,k,v),y.return=g,g=y;break e}n(g,k);break}else t(g,k);k=k.sibling}v.type===Hr?(y=Sr(v.props.children,g.mode,C,v.key),y.return=g,g=y):(C=Ll(v.type,v.key,v.props,null,g.mode,C),C.ref=Fo(g,y,v),C.return=g,g=C)}return l(g);case Ur:e:{for(k=v.key;y!==null;){if(y.key===k)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(g,y.sibling),y=o(y,v.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=Xs(v,g.mode,C),y.return=g,g=y}return l(g);case Bn:return k=v._init,w(g,y,k(v._payload),C)}if(Go(v))return h(g,y,v,C);if(Lo(v))return m(g,y,v,C);il(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(n(g,y.sibling),y=o(y,v),y.return=g,g=y):(n(g,y),y=Ks(v,g.mode,C),y.return=g,g=y),l(g)):n(g,y)}return w}var fo=Vy(!0),Gy=Vy(!1),zi={},sn=ur(zi),wi=ur(zi),xi=ur(zi);function xr(e){if(e===zi)throw Error(F(174));return e}function Sp(e,t){switch(Ce(xi,t),Ce(wi,e),Ce(sn,zi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zu(t,e)}Ae(sn),Ce(sn,t)}function ho(){Ae(sn),Ae(wi),Ae(xi)}function qy(e){xr(xi.current);var t=xr(sn.current),n=zu(t,e.type);t!==n&&(Ce(wi,e),Ce(sn,n))}function Cp(e){wi.current===e&&(Ae(sn),Ae(wi))}var Re=ur(0);function la(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ws=[];function Ep(){for(var e=0;en?n:4,e(!0);var r=Vs.transition;Vs.transition={};try{e(!1),t()}finally{ve=n,Vs.transition=r}}function u0(){return It().memoizedState}function $b(e,t,n){var r=Jn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},c0(e))p0(t,n);else if(n=By(e,t,n,r),n!==null){var o=st();Kt(n,e,r,o),f0(n,t,r)}}function _b(e,t,n){var r=Jn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(c0(e))p0(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,a=i(l,n);if(o.hasEagerState=!0,o.eagerState=a,Zt(a,l)){var s=t.interleaved;s===null?(o.next=o,bp(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=By(e,t,o,r),n!==null&&(o=st(),Kt(n,e,r,o),f0(n,t,r))}}function c0(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function p0(e,t){ei=aa=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function f0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ap(e,n)}}var sa={readContext:Nt,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useInsertionEffect:et,useLayoutEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useMutableSource:et,useSyncExternalStore:et,useId:et,unstable_isNewReconciler:!1},Rb={readContext:Nt,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:Sd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Al(4194308,4,o0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Al(4194308,4,e,t)},useInsertionEffect:function(e,t){return Al(4,2,e,t)},useMemo:function(e,t){var n=tn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=tn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=$b.bind(null,Le,e),[r.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:kd,useDebugValue:$p,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=kd(!1),t=e[0];return e=Ab.bind(null,e[1]),tn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Le,o=tn();if($e){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),Ye===null)throw Error(F(349));Pr&30||Ky(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Sd(Zy.bind(null,r,i,e),[e]),r.flags|=2048,Si(9,Xy.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=tn(),t=Ye.identifierPrefix;if($e){var n=xn,r=wn;n=(r&~(1<<32-Qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=bi++,0")&&(s=s.replace("",e.displayName)),s}while(1<=l&&0<=a);break}}}finally{Os=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vo(e):""}function ax(e){switch(e.tag){case 5:return Vo(e.type);case 16:return Vo("Lazy");case 13:return Vo("Suspense");case 19:return Vo("SuspenseList");case 0:case 2:case 15:return e=As(e.type,!1),e;case 11:return e=As(e.type.render,!1),e;case 1:return e=As(e.type,!0),e;default:return""}}function $u(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 Hr:return"Fragment";case Ur:return"Portal";case Tu:return"Profiler";case tp:return"StrictMode";case Ou:return"Suspense";case Au:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Hg:return(e.displayName||"Context")+".Consumer";case Ug:return(e._context.displayName||"Context")+".Provider";case np:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case rp:return t=e.displayName||null,t!==null?t:$u(e.type)||"Memo";case Bn:t=e._payload,e=e._init;try{return $u(e(t))}catch{}}return null}function sx(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 $u(t);case 8:return t===tp?"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 rr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ux(e){var t=Vg(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qi(e){e._valueTracker||(e._valueTracker=ux(e))}function Gg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Vg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Wl(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 _u(e,t){var n=t.checked;return De({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function jf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qg(e,t){t=t.checked,t!=null&&ep(e,"checked",t,!1)}function Ru(e,t){qg(e,t);var n=rr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Lu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Lu(e,t.type,rr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Lu(e,t,n){(t!=="number"||Wl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Go=Array.isArray;function to(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Ki.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ui(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qo={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},cx=["Webkit","ms","Moz","O"];Object.keys(Qo).forEach(function(e){cx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qo[t]=Qo[e]})});function Xg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qo.hasOwnProperty(e)&&Qo[e]?(""+t).trim():t+"px"}function Zg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Xg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var px=De({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 Nu(e,t){if(t){if(px[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function Iu(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 Fu=null;function op(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ju=null,no=null,ro=null;function Hf(e){if(e=Di(e)){if(typeof ju!="function")throw Error(F(280));var t=e.stateNode;t&&(t=$a(t),ju(e.stateNode,e.type,t))}}function Jg(e){no?ro?ro.push(e):ro=[e]:no=e}function ey(){if(no){var e=no,t=ro;if(ro=no=null,Hf(e),t)for(e=0;e>>=0,e===0?32:31-(kx(e)/Sx|0)|0}var Xi=64,Zi=4194304;function qo(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 Yl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var a=l&~o;a!==0?r=qo(a):(i&=l,i!==0&&(r=qo(i)))}else l=n&~o,l!==0?r=qo(l):i!==0&&(r=qo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ri(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=n}function Tx(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Xo),Zf=String.fromCharCode(32),Jf=!1;function xy(e,t){switch(e){case"keyup":return tb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function by(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wr=!1;function rb(e,t){switch(e){case"compositionend":return by(t);case"keypress":return t.which!==32?null:(Jf=!0,Zf);case"textInput":return e=t.data,e===Zf&&Jf?null:e;default:return null}}function ob(e,t){if(Wr)return e==="compositionend"||!fp&&xy(e,t)?(e=vy(),El=up=Vn=null,Wr=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=rd(n)}}function Ey(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ey(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Py(){for(var e=window,t=Wl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wl(e.document)}return t}function dp(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 db(e){var t=Py(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ey(n.ownerDocument.documentElement,n)){if(r!==null&&dp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=od(n,i);var l=od(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Vr=null,Vu=null,Jo=null,Gu=!1;function id(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Gu||Vr==null||Vr!==Wl(r)||(r=Vr,"selectionStart"in r&&dp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Jo&&mi(Jo,r)||(Jo=r,r=Xl(Vu,"onSelect"),0Yr||(e.current=Zu[Yr],Zu[Yr]=null,Yr--)}function Ce(e,t){Yr++,Zu[Yr]=e.current,e.current=t}var or={},ot=ur(or),ht=ur(!1),Cr=or;function co(e,t){var n=e.type.contextTypes;if(!n)return or;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function mt(e){return e=e.childContextTypes,e!=null}function Jl(){Ae(ht),Ae(ot)}function fd(e,t,n){if(ot.current!==or)throw Error(F(168));Ce(ot,t),Ce(ht,n)}function zy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(F(108,sx(e)||"Unknown",o));return De({},n,r)}function ea(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,Cr=ot.current,Ce(ot,e),Ce(ht,ht.current),!0}function dd(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=zy(e,t,Cr),r.__reactInternalMemoizedMergedChildContext=e,Ae(ht),Ae(ot),Ce(ot,e)):Ae(ht),Ce(ht,n)}var vn=null,_a=!1,Hs=!1;function Ny(e){vn===null?vn=[e]:vn.push(e)}function Eb(e){_a=!0,Ny(e)}function cr(){if(!Hs&&vn!==null){Hs=!0;var e=0,t=ve;try{var n=vn;for(ve=1;e>=l,o-=l,wn=1<<32-Qt(t)+o|n<O?(N=T,T=null):N=T.sibling;var P=d(g,T,v[O],C);if(P===null){T===null&&(T=N);break}e&&T&&P.alternate===null&&t(g,T),y=i(P,y,O),k===null?E=P:k.sibling=P,k=P,T=N}if(O===v.length)return n(g,T),$e&&mr(g,O),E;if(T===null){for(;OO?(N=T,T=null):N=T.sibling;var _=d(g,T,P.value,C);if(_===null){T===null&&(T=N);break}e&&T&&_.alternate===null&&t(g,T),y=i(_,y,O),k===null?E=_:k.sibling=_,k=_,T=N}if(P.done)return n(g,T),$e&&mr(g,O),E;if(T===null){for(;!P.done;O++,P=v.next())P=p(g,P.value,C),P!==null&&(y=i(P,y,O),k===null?E=P:k.sibling=P,k=P);return $e&&mr(g,O),E}for(T=r(g,T);!P.done;O++,P=v.next())P=f(T,g,O,P.value,C),P!==null&&(e&&P.alternate!==null&&T.delete(P.key===null?O:P.key),y=i(P,y,O),k===null?E=P:k.sibling=P,k=P);return e&&T.forEach(function(R){return t(g,R)}),$e&&mr(g,O),E}function w(g,y,v,C){if(typeof v=="object"&&v!==null&&v.type===Hr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Yi:e:{for(var E=v.key,k=y;k!==null;){if(k.key===E){if(E=v.type,E===Hr){if(k.tag===7){n(g,k.sibling),y=o(k,v.props.children),y.return=g,g=y;break e}}else if(k.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Bn&&xd(E)===k.type){n(g,k.sibling),y=o(k,v.props),y.ref=Fo(g,k,v),y.return=g,g=y;break e}n(g,k);break}else t(g,k);k=k.sibling}v.type===Hr?(y=Sr(v.props.children,g.mode,C,v.key),y.return=g,g=y):(C=Ll(v.type,v.key,v.props,null,g.mode,C),C.ref=Fo(g,y,v),C.return=g,g=C)}return l(g);case Ur:e:{for(k=v.key;y!==null;){if(y.key===k)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(g,y.sibling),y=o(y,v.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=Xs(v,g.mode,C),y.return=g,g=y}return l(g);case Bn:return k=v._init,w(g,y,k(v._payload),C)}if(Go(v))return h(g,y,v,C);if(Lo(v))return m(g,y,v,C);il(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,y!==null&&y.tag===6?(n(g,y.sibling),y=o(y,v),y.return=g,g=y):(n(g,y),y=Ks(v,g.mode,C),y.return=g,g=y),l(g)):n(g,y)}return w}var fo=Wy(!0),Vy=Wy(!1),zi={},sn=ur(zi),wi=ur(zi),xi=ur(zi);function xr(e){if(e===zi)throw Error(F(174));return e}function kp(e,t){switch(Ce(xi,t),Ce(wi,e),Ce(sn,zi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zu(t,e)}Ae(sn),Ce(sn,t)}function ho(){Ae(sn),Ae(wi),Ae(xi)}function Gy(e){xr(xi.current);var t=xr(sn.current),n=zu(t,e.type);t!==n&&(Ce(wi,e),Ce(sn,n))}function Sp(e){wi.current===e&&(Ae(sn),Ae(wi))}var Re=ur(0);function la(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ws=[];function Cp(){for(var e=0;en?n:4,e(!0);var r=Vs.transition;Vs.transition={};try{e(!1),t()}finally{ve=n,Vs.transition=r}}function s0(){return It().memoizedState}function Ab(e,t,n){var r=Jn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},u0(e))c0(t,n);else if(n=My(e,t,n,r),n!==null){var o=st();Kt(n,e,r,o),p0(n,t,r)}}function $b(e,t,n){var r=Jn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(u0(e))c0(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,a=i(l,n);if(o.hasEagerState=!0,o.eagerState=a,Zt(a,l)){var s=t.interleaved;s===null?(o.next=o,xp(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=My(e,t,o,r),n!==null&&(o=st(),Kt(n,e,r,o),p0(n,t,r))}}function u0(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function c0(e,t){ei=aa=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function p0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lp(e,n)}}var sa={readContext:Nt,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useInsertionEffect:et,useLayoutEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useMutableSource:et,useSyncExternalStore:et,useId:et,unstable_isNewReconciler:!1},_b={readContext:Nt,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:kd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Al(4194308,4,r0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Al(4194308,4,e,t)},useInsertionEffect:function(e,t){return Al(4,2,e,t)},useMemo:function(e,t){var n=tn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=tn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ab.bind(null,Le,e),[r.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:bd,useDebugValue:Ap,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=bd(!1),t=e[0];return e=Ob.bind(null,e[1]),tn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Le,o=tn();if($e){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),Ye===null)throw Error(F(349));Pr&30||Qy(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,kd(Xy.bind(null,r,i,e),[e]),r.flags|=2048,Si(9,Ky.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=tn(),t=Ye.identifierPrefix;if($e){var n=xn,r=wn;n=(r&~(1<<32-Qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=bi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[rn]=t,e[vi]=r,b0(e,t,!1,!1),t.stateNode=e;e:{switch(l=Iu(n,r),n){case"dialog":Te("cancel",e),Te("close",e),o=r;break;case"iframe":case"object":case"embed":Te("load",e),o=r;break;case"video":case"audio":for(o=0;ogo&&(t.flags|=128,r=!0,jo(i,!1),t.lanes=4194304)}else{if(!r)if(e=la(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),jo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!$e)return tt(t),null}else 2*Me()-i.renderingStartTime>go&&n!==1073741824&&(t.flags|=128,r=!0,jo(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Me(),t.sibling=null,n=Re.current,Ce(Re,r?n&1|2:n&1),t):(tt(t),null);case 22:case 23:return Np(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?wt&1073741824&&(tt(t),t.subtreeFlags&6&&(t.flags|=8192)):tt(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function Mb(e,t){switch(gp(t),t.tag){case 1:return mt(t.type)&&Jl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ho(),Ae(ht),Ae(ot),Ep(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Cp(t),null;case 13:if(Ae(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));po()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ae(Re),null;case 4:return ho(),null;case 10:return xp(t.type._context),null;case 22:case 23:return Np(),null;case 24:return null;default:return null}}var al=!1,nt=!1,Bb=typeof WeakSet=="function"?WeakSet:Set,V=null;function Zr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function cc(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var Rd=!1;function Ub(e,t){if(qu=Ql,e=Ty(),hp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,a=-1,s=-1,u=0,c=0,p=e,d=null;t:for(;;){for(var f;p!==n||o!==0&&p.nodeType!==3||(a=l+o),p!==i||r!==0&&p.nodeType!==3||(s=l+r),p.nodeType===3&&(l+=p.nodeValue.length),(f=p.firstChild)!==null;)d=p,p=f;for(;;){if(p===e)break t;if(d===n&&++u===o&&(a=l),d===i&&++c===r&&(s=l),(f=p.nextSibling)!==null)break;p=d,d=p.parentNode}p=f}n=a===-1||s===-1?null:{start:a,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yu={focusedElem:e,selectionRange:n},Ql=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;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 m=h.memoizedProps,w=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Gt(t.type,m),w);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(C){Ne(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return h=Rd,Rd=!1,h}function ti(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&cc(t,n,i)}o=o.next}while(o!==r)}}function Da(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function pc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function C0(e){var t=e.alternate;t!==null&&(e.alternate=null,C0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[vi],delete t[Xu],delete t[Cb],delete t[Eb])),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 E0(e){return e.tag===5||e.tag===3||e.tag===4}function Ld(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||E0(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 fc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zl));else if(r!==4&&(e=e.child,e!==null))for(fc(e,t,n),e=e.sibling;e!==null;)fc(e,t,n),e=e.sibling}function dc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(dc(e,t,n),e=e.sibling;e!==null;)dc(e,t,n),e=e.sibling}var Ke=null,qt=!1;function Nn(e,t,n){for(n=n.child;n!==null;)P0(e,t,n),n=n.sibling}function P0(e,t,n){if(an&&typeof an.onCommitFiberUnmount=="function")try{an.onCommitFiberUnmount(Pa,n)}catch{}switch(n.tag){case 5:nt||Zr(n,t);case 6:var r=Ke,o=qt;Ke=null,Nn(e,t,n),Ke=r,qt=o,Ke!==null&&(qt?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(qt?(e=Ke,n=n.stateNode,e.nodeType===8?Us(e.parentNode,n):e.nodeType===1&&Us(e,n),di(e)):Us(Ke,n.stateNode));break;case 4:r=Ke,o=qt,Ke=n.stateNode.containerInfo,qt=!0,Nn(e,t,n),Ke=r,qt=o;break;case 0:case 11:case 14:case 15:if(!nt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&cc(n,t,l),o=o.next}while(o!==r)}Nn(e,t,n);break;case 1:if(!nt&&(Zr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ne(n,t,a)}Nn(e,t,n);break;case 21:Nn(e,t,n);break;case 22:n.mode&1?(nt=(r=nt)||n.memoizedState!==null,Nn(e,t,n),nt=r):Nn(e,t,n);break;default:Nn(e,t,n)}}function Dd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Bb),t.forEach(function(r){var o=Xb.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ht(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Wb(r/1960))-r,10e?16:e,Gn===null)var r=!1;else{if(e=Gn,Gn=null,pa=0,me&6)throw Error(F(331));var o=me;for(me|=4,V=e.current;V!==null;){var i=V,l=i.child;if(V.flags&16){var a=i.deletions;if(a!==null){for(var s=0;sMe()-Dp?kr(e,0):Lp|=n),gt(e,t)}function D0(e,t){t===0&&(e.mode&1?(t=Zi,Zi<<=1,!(Zi&130023424)&&(Zi=4194304)):t=1);var n=st();e=Pn(e,t),e!==null&&(Ri(e,t,n),gt(e,n))}function Kb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),D0(e,n)}function Xb(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(t),D0(e,n)}var z0;z0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ht.current)dt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return dt=!1,Fb(e,t,n);dt=!!(e.flags&131072)}else dt=!1,$e&&t.flags&1048576&&Fy(t,na,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$l(e,t),e=t.pendingProps;var o=co(t,ot.current);io(t,n),o=Tp(null,t,r,e,o,n);var i=Op();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,mt(r)?(i=!0,ea(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,kp(t),o.updater=Ra,t.stateNode=o,o._reactInternals=t,rc(t,r,e,n),t=lc(null,t,r,!0,i,n)):(t.tag=0,$e&&i&&mp(t),lt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch($l(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Jb(r),e=Gt(r,e),o){case 0:t=ic(null,t,r,e,n);break e;case 1:t=Ad(null,t,r,e,n);break e;case 11:t=Td(null,t,r,e,n);break e;case 14:t=Od(null,t,r,Gt(r.type,e),n);break e}throw Error(F(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gt(r,o),ic(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gt(r,o),Ad(e,t,r,o,n);case 3:e:{if(v0(t),e===null)throw Error(F(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Uy(e,t),ia(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=mo(Error(F(423)),t),t=$d(e,t,r,n,o);break e}else if(r!==o){o=mo(Error(F(424)),t),t=$d(e,t,r,n,o);break e}else for(bt=Kn(t.stateNode.containerInfo.firstChild),kt=t,$e=!0,Yt=null,n=Gy(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(po(),r===o){t=Tn(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return qy(t),e===null&&ec(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,Qu(r,o)?l=null:i!==null&&Qu(r,i)&&(t.flags|=32),y0(e,t),lt(e,t,l,n),t.child;case 6:return e===null&&ec(t),null;case 13:return w0(e,t,n);case 4:return Sp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fo(t,null,r,n):lt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gt(r,o),Td(e,t,r,o,n);case 7:return lt(e,t,t.pendingProps,n),t.child;case 8:return lt(e,t,t.pendingProps.children,n),t.child;case 12:return lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Ce(ra,r._currentValue),r._currentValue=l,i!==null)if(Zt(i.value,l)){if(i.children===o.children&&!ht.current){t=Tn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){l=i.child;for(var s=a.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=kn(-1,n&-n),s.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),tc(i.return,n,t),a.lanes|=n;break}s=s.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(F(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),tc(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}lt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,io(t,n),o=Nt(o),r=r(o),t.flags|=1,lt(e,t,r,n),t.child;case 14:return r=t.type,o=Gt(r,t.pendingProps),o=Gt(r.type,o),Od(e,t,r,o,n);case 15:return m0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gt(r,o),$l(e,t),t.tag=1,mt(r)?(e=!0,ea(t)):e=!1,io(t,n),Wy(t,r,o),rc(t,r,o,n),lc(null,t,r,!0,e,n);case 19:return x0(e,t,n);case 22:return g0(e,t,n)}throw Error(F(156,t.tag))};function N0(e,t){return sy(e,t)}function Zb(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,t,n,r){return new Zb(e,t,n,r)}function Fp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jb(e){if(typeof e=="function")return Fp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===rp)return 11;if(e===op)return 14}return 2}function er(e,t){var n=e.alternate;return n===null?(n=Lt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ll(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")Fp(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Hr:return Sr(n.children,o,i,t);case np:l=8,o|=8;break;case Tu:return e=Lt(12,n,t,o|2),e.elementType=Tu,e.lanes=i,e;case Ou:return e=Lt(13,n,t,o),e.elementType=Ou,e.lanes=i,e;case Au:return e=Lt(19,n,t,o),e.elementType=Au,e.lanes=i,e;case Vg:return Na(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Hg:l=10;break e;case Wg:l=9;break e;case rp:l=11;break e;case op:l=14;break e;case Bn:l=16,r=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=Lt(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Sr(e,t,n,r){return e=Lt(7,e,r,t),e.lanes=n,e}function Na(e,t,n,r){return e=Lt(22,e,r,t),e.elementType=Vg,e.lanes=n,e.stateNode={isHidden:!1},e}function Ks(e,t,n){return e=Lt(6,e,null,t),e.lanes=n,e}function Xs(e,t,n){return t=Lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ek(e,t,n,r,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=_s(0),this.expirationTimes=_s(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_s(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function jp(e,t,n,r,o,i,l,a,s){return e=new ek(e,t,n,a,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Lt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},kp(i),e}function tk(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(M0)}catch(e){console.error(e)}}M0(),Fg.exports=Pt;var Ba=Fg.exports,Ud=Ba;Eu.createRoot=Ud.createRoot,Eu.hydrateRoot=Ud.hydrateRoot;const lk='@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*{scrollbar-color:initial;scrollbar-width:initial}:root{--opencopilot-primary-clr: #703ea8;--opencopilot-accent-clr: #f8f7f8;--opencopilot-accnet-2-clr: #817f81;--opencopilot-primary-light-clr: rgba(0, 87, 255, .1)}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.opencopilot-fixed{position:fixed}.opencopilot-absolute{position:absolute}.opencopilot-relative{position:relative}.opencopilot-inset-0{top:0;right:0;bottom:0;left:0}.opencopilot-bottom-0{bottom:0}.opencopilot-right-0{right:0}.opencopilot-top-0{top:0}.\\!opencopilot-z-\\[100000\\]{z-index:100000!important}.opencopilot-z-50{z-index:50}.opencopilot-z-\\[10000000\\]{z-index:10000000}.opencopilot-z-\\[100\\]{z-index:100}.opencopilot-z-\\[50000\\]{z-index:50000}.opencopilot-clear-both{clear:both}.opencopilot-m-0{margin:0}.opencopilot-mx-auto{margin-left:auto;margin-right:auto}.opencopilot-mb-3{margin-bottom:.75rem}.opencopilot-mb-auto{margin-bottom:auto}.opencopilot-mt-auto{margin-top:auto}.opencopilot-block{display:block}.opencopilot-flex{display:flex}.opencopilot-grid{display:grid}.opencopilot-hidden{display:none}.opencopilot-aspect-square{aspect-ratio:1 / 1}.opencopilot-h-7{height:1.75rem}.opencopilot-h-fit{height:-moz-fit-content;height:fit-content}.opencopilot-h-full{height:100%}.opencopilot-h-screen{height:100vh}.opencopilot-max-h-full{max-height:100%}.opencopilot-w-7{width:1.75rem}.opencopilot-w-fit{width:-moz-fit-content;width:fit-content}.opencopilot-w-full{width:100%}.opencopilot-w-screen{width:100vw}.opencopilot-min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.opencopilot-max-w-\\[15rem\\]{max-width:15rem}.opencopilot-max-w-full{max-width:100%}.opencopilot-max-w-lg{max-width:32rem}.opencopilot-flex-1{flex:1 1 0%}.opencopilot-shrink-0{flex-shrink:0}.opencopilot-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.opencopilot-resize-none{resize:none}.opencopilot-flex-col{flex-direction:column}.opencopilot-flex-col-reverse{flex-direction:column-reverse}.opencopilot-flex-wrap{flex-wrap:wrap}.opencopilot-items-start{align-items:flex-start}.opencopilot-items-center{align-items:center}.opencopilot-justify-center{justify-content:center}.opencopilot-justify-between{justify-content:space-between}.opencopilot-gap-1{gap:.25rem}.opencopilot-gap-2{gap:.5rem}.opencopilot-gap-3{gap:.75rem}.opencopilot-gap-4{gap:1rem}.opencopilot-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.opencopilot-space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.opencopilot-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.opencopilot-justify-self-end{justify-self:end}.opencopilot-overflow-auto{overflow:auto}.opencopilot-overflow-hidden{overflow:hidden}.opencopilot-overflow-x-auto{overflow-x:auto}.opencopilot-overflow-y-auto{overflow-y:auto}.opencopilot-overflow-x-hidden{overflow-x:hidden}.opencopilot-scroll-smooth{scroll-behavior:smooth}.opencopilot-whitespace-nowrap{white-space:nowrap}.opencopilot-whitespace-pre-wrap{white-space:pre-wrap}.opencopilot-rounded-2xl{border-radius:1rem}.opencopilot-rounded-full{border-radius:9999px}.opencopilot-rounded-lg{border-radius:.5rem}.opencopilot-rounded-md{border-radius:.375rem}.opencopilot-rounded-sm{border-radius:.125rem}.opencopilot-rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.opencopilot-border{border-width:1px}.opencopilot-border-b{border-bottom-width:1px}.opencopilot-border-none{border-style:none}.opencopilot-border-primary-light{border-color:var(--opencopilot-primary-light-clr)}.opencopilot-border-rose-500{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity))}.opencopilot-border-transparent{border-color:transparent}.opencopilot-border-b-black\\/10{border-bottom-color:#0000001a}.opencopilot-bg-accent{background-color:var(--opencopilot-accent-clr)}.opencopilot-bg-black\\/50{background-color:#00000080}.opencopilot-bg-primary{background-color:var(--opencopilot-primary-clr)}.opencopilot-bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.opencopilot-bg-transparent{background-color:transparent}.opencopilot-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.opencopilot-fill-current{fill:currentColor}.opencopilot-object-cover{-o-object-fit:cover;object-fit:cover}.opencopilot-p-0{padding:0}.opencopilot-p-0\\.5{padding:.125rem}.opencopilot-p-2{padding:.5rem}.opencopilot-p-3{padding:.75rem}.opencopilot-p-6{padding:1.5rem}.opencopilot-px-2{padding-left:.5rem;padding-right:.5rem}.opencopilot-px-2\\.5{padding-left:.625rem;padding-right:.625rem}.opencopilot-px-4{padding-left:1rem;padding-right:1rem}.opencopilot-py-1{padding-top:.25rem;padding-bottom:.25rem}.opencopilot-py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.opencopilot-py-2{padding-top:.5rem;padding-bottom:.5rem}.opencopilot-ps-10{padding-inline-start:2.5rem}.opencopilot-text-center{text-align:center}.opencopilot-font-inter{font-family:Inter,sans-serif,system-ui}.opencopilot-text-2xl{font-size:1.5rem;line-height:2rem}.opencopilot-text-\\[14px\\]{font-size:14px}.opencopilot-text-lg{font-size:1.125rem;line-height:1.75rem}.opencopilot-text-sm{font-size:.875rem;line-height:1.25rem}.opencopilot-text-xl{font-size:1.25rem;line-height:1.75rem}.opencopilot-text-xs{font-size:.75rem;line-height:1rem}.opencopilot-font-medium{font-weight:500}.opencopilot-font-normal{font-weight:400}.opencopilot-font-semibold{font-weight:600}.opencopilot-lowercase{text-transform:lowercase}.opencopilot-leading-none{line-height:1}.opencopilot-leading-tight{line-height:1.25}.opencopilot-tracking-tight{letter-spacing:-.025em}.opencopilot-text-\\[\\#5e5c5e\\]{--tw-text-opacity: 1;color:rgb(94 92 94 / var(--tw-text-opacity))}.opencopilot-text-accent{color:var(--opencopilot-accent-clr)}.opencopilot-text-accent2{color:var(--opencopilot-accent-2-clr)}.opencopilot-text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.opencopilot-text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.opencopilot-text-primary{color:var(--opencopilot-primary-clr)}.opencopilot-text-rose-500{--tw-text-opacity: 1;color:rgb(244 63 94 / var(--tw-text-opacity))}.opencopilot-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.opencopilot-opacity-0{opacity:0}.opencopilot-opacity-100{opacity:1}.opencopilot-shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.opencopilot-shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.opencopilot-shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.opencopilot-outline-none{outline:2px solid transparent;outline-offset:2px}.opencopilot-ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.opencopilot-ring-\\[\\#334155\\]\\/60{--tw-ring-color: rgb(51 65 85 / .6)}.opencopilot-backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.opencopilot-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.opencopilot-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.opencopilot-transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.opencopilot-transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.opencopilot-duration-300{transition-duration:.3s}.opencopilot-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.opencopilot-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.opencopilot-animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.opencopilot-animate-out{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.opencopilot-fade-in,.opencopilot-fade-in-0{--tw-enter-opacity: 0}.opencopilot-fade-out{--tw-exit-opacity: 0}.opencopilot-slide-in-from-bottom-5{--tw-enter-translate-y: 1.25rem}.opencopilot-slide-in-from-top-1{--tw-enter-translate-y: -.25rem}.opencopilot-duration-300{animation-duration:.3s}.opencopilot-ease-in{animation-timing-function:cubic-bezier(.4,0,1,1)}.opencopilot-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.opencopilot-scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.opencopilot-scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.opencopilot-scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.opencopilot-scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.opencopilot-scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.opencopilot-scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.opencopilot-scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.opencopilot-scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.opencopilot-scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.opencopilot-scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.opencopilot-scrollbar-thin{scrollbar-width:thin}.opencopilot-scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.opencopilot-prose{color:var(--tw-prose-body);max-width:65ch}.opencopilot-prose :where(p):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.opencopilot-prose :where([class~=lead]):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.opencopilot-prose :where(a):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.opencopilot-prose :where(strong):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.opencopilot-prose :where(a strong):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(blockquote strong):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(thead th strong):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(ol):not(:where([class~=opencopilot-not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.opencopilot-prose :where(ol[type=A]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:upper-alpha}.opencopilot-prose :where(ol[type=a]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:lower-alpha}.opencopilot-prose :where(ol[type=A s]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:upper-alpha}.opencopilot-prose :where(ol[type=a s]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:lower-alpha}.opencopilot-prose :where(ol[type=I]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:upper-roman}.opencopilot-prose :where(ol[type=i]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:lower-roman}.opencopilot-prose :where(ol[type=I s]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:upper-roman}.opencopilot-prose :where(ol[type=i s]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:lower-roman}.opencopilot-prose :where(ol[type="1"]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:decimal}.opencopilot-prose :where(ul):not(:where([class~=opencopilot-not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.opencopilot-prose :where(ol>li):not(:where([class~=opencopilot-not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.opencopilot-prose :where(ul>li):not(:where([class~=opencopilot-not-prose] *))::marker{color:var(--tw-prose-bullets)}.opencopilot-prose :where(hr):not(:where([class~=opencopilot-not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.opencopilot-prose :where(blockquote):not(:where([class~=opencopilot-not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.opencopilot-prose :where(blockquote p:first-of-type):not(:where([class~=opencopilot-not-prose] *)):before{content:open-quote}.opencopilot-prose :where(blockquote p:last-of-type):not(:where([class~=opencopilot-not-prose] *)):after{content:close-quote}.opencopilot-prose :where(h1):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.opencopilot-prose :where(h1 strong):not(:where([class~=opencopilot-not-prose] *)){font-weight:900;color:inherit}.opencopilot-prose :where(h2):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.opencopilot-prose :where(h2 strong):not(:where([class~=opencopilot-not-prose] *)){font-weight:800;color:inherit}.opencopilot-prose :where(h3):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.opencopilot-prose :where(h3 strong):not(:where([class~=opencopilot-not-prose] *)){font-weight:700;color:inherit}.opencopilot-prose :where(h4):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.opencopilot-prose :where(h4 strong):not(:where([class~=opencopilot-not-prose] *)){font-weight:700;color:inherit}.opencopilot-prose :where(img):not(:where([class~=opencopilot-not-prose] *)){margin-top:2em;margin-bottom:2em}.opencopilot-prose :where(figure>*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0;margin-bottom:0}.opencopilot-prose :where(figcaption):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.opencopilot-prose :where(code):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.opencopilot-prose :where(code):not(:where([class~=opencopilot-not-prose] *)):before{content:"`"}.opencopilot-prose :where(code):not(:where([class~=opencopilot-not-prose] *)):after{content:"`"}.opencopilot-prose :where(a code):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(h1 code):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(h2 code):not(:where([class~=opencopilot-not-prose] *)){color:inherit;font-size:.875em}.opencopilot-prose :where(h3 code):not(:where([class~=opencopilot-not-prose] *)){color:inherit;font-size:.9em}.opencopilot-prose :where(h4 code):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(blockquote code):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(thead th code):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(pre):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.opencopilot-prose :where(pre code):not(:where([class~=opencopilot-not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.opencopilot-prose :where(pre code):not(:where([class~=opencopilot-not-prose] *)):before{content:none}.opencopilot-prose :where(pre code):not(:where([class~=opencopilot-not-prose] *)):after{content:none}.opencopilot-prose :where(table):not(:where([class~=opencopilot-not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.opencopilot-prose :where(thead):not(:where([class~=opencopilot-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.opencopilot-prose :where(thead th):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.opencopilot-prose :where(tbody tr):not(:where([class~=opencopilot-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.opencopilot-prose :where(tbody tr:last-child):not(:where([class~=opencopilot-not-prose] *)){border-bottom-width:0}.opencopilot-prose :where(tbody td):not(:where([class~=opencopilot-not-prose] *)){vertical-align:baseline}.opencopilot-prose :where(tfoot):not(:where([class~=opencopilot-not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.opencopilot-prose :where(tfoot td):not(:where([class~=opencopilot-not-prose] *)){vertical-align:top}.opencopilot-prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.opencopilot-prose :where(video):not(:where([class~=opencopilot-not-prose] *)){margin-top:2em;margin-bottom:2em}.opencopilot-prose :where(figure):not(:where([class~=opencopilot-not-prose] *)){margin-top:2em;margin-bottom:2em}.opencopilot-prose :where(li):not(:where([class~=opencopilot-not-prose] *)){margin-top:.5em;margin-bottom:.5em}.opencopilot-prose :where(ol>li):not(:where([class~=opencopilot-not-prose] *)){padding-left:.375em}.opencopilot-prose :where(ul>li):not(:where([class~=opencopilot-not-prose] *)){padding-left:.375em}.opencopilot-prose :where(.opencopilot-prose>ul>li p):not(:where([class~=opencopilot-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.opencopilot-prose :where(.opencopilot-prose>ul>li>*:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.25em}.opencopilot-prose :where(.opencopilot-prose>ul>li>*:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:1.25em}.opencopilot-prose :where(.opencopilot-prose>ol>li>*:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.25em}.opencopilot-prose :where(.opencopilot-prose>ol>li>*:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:1.25em}.opencopilot-prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=opencopilot-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.opencopilot-prose :where(hr+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose :where(h2+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose :where(h3+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose :where(h4+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose :where(thead th:first-child):not(:where([class~=opencopilot-not-prose] *)){padding-left:0}.opencopilot-prose :where(thead th:last-child):not(:where([class~=opencopilot-not-prose] *)){padding-right:0}.opencopilot-prose :where(tbody td,tfoot td):not(:where([class~=opencopilot-not-prose] *)){padding:.5714286em}.opencopilot-prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=opencopilot-not-prose] *)){padding-left:0}.opencopilot-prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=opencopilot-not-prose] *)){padding-right:0}.opencopilot-prose :where(.opencopilot-prose>:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose :where(.opencopilot-prose>:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:0}.opencopilot-prose-sm{font-size:.875rem;line-height:1.7142857}.opencopilot-prose-sm :where(p):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.opencopilot-prose-sm :where([class~=lead]):not(:where([class~=opencopilot-not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.opencopilot-prose-sm :where(blockquote):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.1111111em}.opencopilot-prose-sm :where(h1):not(:where([class~=opencopilot-not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.opencopilot-prose-sm :where(h2):not(:where([class~=opencopilot-not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.opencopilot-prose-sm :where(h3):not(:where([class~=opencopilot-not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.opencopilot-prose-sm :where(h4):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.opencopilot-prose-sm :where(img):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.opencopilot-prose-sm :where(video):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.opencopilot-prose-sm :where(figure):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.opencopilot-prose-sm :where(figure>*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0;margin-bottom:0}.opencopilot-prose-sm :where(figcaption):not(:where([class~=opencopilot-not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.opencopilot-prose-sm :where(code):not(:where([class~=opencopilot-not-prose] *)){font-size:.8571429em}.opencopilot-prose-sm :where(h2 code):not(:where([class~=opencopilot-not-prose] *)){font-size:.9em}.opencopilot-prose-sm :where(h3 code):not(:where([class~=opencopilot-not-prose] *)){font-size:.8888889em}.opencopilot-prose-sm :where(pre):not(:where([class~=opencopilot-not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding:.6666667em 1em}.opencopilot-prose-sm :where(ol):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.opencopilot-prose-sm :where(ul):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.opencopilot-prose-sm :where(li):not(:where([class~=opencopilot-not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.opencopilot-prose-sm :where(ol>li):not(:where([class~=opencopilot-not-prose] *)){padding-left:.4285714em}.opencopilot-prose-sm :where(ul>li):not(:where([class~=opencopilot-not-prose] *)){padding-left:.4285714em}.opencopilot-prose-sm :where(.opencopilot-prose-sm>ul>li p):not(:where([class~=opencopilot-not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.opencopilot-prose-sm :where(.opencopilot-prose-sm>ul>li>*:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.1428571em}.opencopilot-prose-sm :where(.opencopilot-prose-sm>ul>li>*:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:1.1428571em}.opencopilot-prose-sm :where(.opencopilot-prose-sm>ol>li>*:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.1428571em}.opencopilot-prose-sm :where(.opencopilot-prose-sm>ol>li>*:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:1.1428571em}.opencopilot-prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=opencopilot-not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.opencopilot-prose-sm :where(hr):not(:where([class~=opencopilot-not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.opencopilot-prose-sm :where(hr+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose-sm :where(h2+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose-sm :where(h3+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose-sm :where(h4+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose-sm :where(table):not(:where([class~=opencopilot-not-prose] *)){font-size:.8571429em;line-height:1.5}.opencopilot-prose-sm :where(thead th):not(:where([class~=opencopilot-not-prose] *)){padding-right:1em;padding-bottom:.6666667em;padding-left:1em}.opencopilot-prose-sm :where(thead th:first-child):not(:where([class~=opencopilot-not-prose] *)){padding-left:0}.opencopilot-prose-sm :where(thead th:last-child):not(:where([class~=opencopilot-not-prose] *)){padding-right:0}.opencopilot-prose-sm :where(tbody td,tfoot td):not(:where([class~=opencopilot-not-prose] *)){padding:.6666667em 1em}.opencopilot-prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=opencopilot-not-prose] *)){padding-left:0}.opencopilot-prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=opencopilot-not-prose] *)){padding-right:0}.opencopilot-prose-sm :where(.opencopilot-prose-sm>:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose-sm :where(.opencopilot-prose-sm>:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:0}.opencopilot-prose-slate{--tw-prose-body: #334155;--tw-prose-headings: #0f172a;--tw-prose-lead: #475569;--tw-prose-links: #0f172a;--tw-prose-bold: #0f172a;--tw-prose-counters: #64748b;--tw-prose-bullets: #cbd5e1;--tw-prose-hr: #e2e8f0;--tw-prose-quotes: #0f172a;--tw-prose-quote-borders: #e2e8f0;--tw-prose-captions: #64748b;--tw-prose-code: #0f172a;--tw-prose-pre-code: #e2e8f0;--tw-prose-pre-bg: #1e293b;--tw-prose-th-borders: #cbd5e1;--tw-prose-td-borders: #e2e8f0;--tw-prose-invert-body: #cbd5e1;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #94a3b8;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #94a3b8;--tw-prose-invert-bullets: #475569;--tw-prose-invert-hr: #334155;--tw-prose-invert-quotes: #f1f5f9;--tw-prose-invert-quote-borders: #334155;--tw-prose-invert-captions: #94a3b8;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #cbd5e1;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #475569;--tw-prose-invert-td-borders: #334155}@keyframes fade-in-bottom{0%{transform:translateY(50px);opacity:0}to{transform:translateY(0);opacity:1}}.fade-in-bottom{animation:fade-in-bottom .4s cubic-bezier(.39,.575,.565,1) both}.flex-center{display:flex;align-items:center;justify-content:center}@keyframes fade-in-top{0%{transform:translateY(-50px);opacity:0}to{transform:translateY(0);opacity:1}}.fade-in-top{animation:fade-in-top .6s cubic-bezier(.39,.575,.565,1) both}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.fade-in{animation:fade-in 1.2s cubic-bezier(.39,.575,.565,1) both}em-emoji-picker{--background-rgb: 85, 170, 255;--border-radius: 10px;--category-icon-size: 24px;--font-family: inherit;--font-size: 14px;min-height:250px;max-height:300px}.PopoverContent{transform-origin:var(--radix-popover-content-transform-origin);animation:scaleIn .5s ease-out}@keyframes scaleIn{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}.PopoverContent{animation-duration:.6s;animation-timing-function:cubic-bezier(.16,1,.3,1)}.PopoverContent[data-side=top]{animation-name:slideUp}.PopoverContent[data-side=bottom]{animation-name:slideDown}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes fade-in-right{0%{transform:translate(50px);opacity:0}to{transform:translate(0);opacity:1}}.fade-in-right{animation:fade-in-right .6s both}@keyframes scale-out-br{0%{transform:scale(1);transform-origin:100% 100%;opacity:1}to{transform:scale(0);transform-origin:100% 100%;opacity:1}}.scale-out-br{animation:scale-out-br .5s ease-in-out forwards}.placeholder\\:opencopilot-align-middle::-moz-placeholder{vertical-align:middle}.placeholder\\:opencopilot-align-middle::placeholder{vertical-align:middle}.placeholder\\:opencopilot-text-xs::-moz-placeholder{font-size:.75rem;line-height:1rem}.placeholder\\:opencopilot-text-xs::placeholder{font-size:.75rem;line-height:1rem}.last-of-type\\:opencopilot-mb-10:last-of-type{margin-bottom:2.5rem}.focus-within\\:opencopilot-ring-primary:focus-within{--tw-ring-color: var(--opencopilot-primary-clr)}.data-\\[state\\=open\\]\\:opencopilot-animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:opencopilot-animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:opencopilot-fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:opencopilot-fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:opencopilot-slide-in-from-top-0[data-state=closed]{--tw-enter-translate-y: -0px}.data-\\[state\\=open\\]\\:opencopilot-slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.prose-headings\\:opencopilot-my-1 :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=opencopilot-not-prose] *))){margin-top:.25rem;margin-bottom:.25rem}.prose-h1\\:opencopilot-font-medium :is(:where(h1):not(:where([class~=opencopilot-not-prose] *))){font-weight:500}.prose-h2\\:opencopilot-font-normal :is(:where(h2):not(:where([class~=opencopilot-not-prose] *))){font-weight:400}.hover\\:opencopilot-scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:opencopilot-shadow:hover{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:opencopilot-border-none:focus{border-style:none}.focus\\:opencopilot-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:opencopilot-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.disabled\\:opencopilot-pointer-events-none:disabled{pointer-events:none}.disabled\\:opencopilot-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opencopilot-opacity-40:disabled{opacity:.4}@media (min-width: 640px){.sm\\:opencopilot-w-96{width:24rem}.sm\\:opencopilot-flex-row{flex-direction:row}.sm\\:opencopilot-justify-end{justify-content:flex-end}.sm\\:opencopilot-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\\:opencopilot-rounded-xl{border-radius:.75rem}.sm\\:opencopilot-text-left{text-align:left}}\n',B0=x.createContext(void 0);function ak({children:e,data:t}){return L.jsx(B0.Provider,{value:t,children:e})}function Ni(){const e=x.useContext(B0);if(!e)throw new Error("useConfigData must be used within a ConfigDataProvider");return e}function sk(e){const[t,n]=x.useState(!!e),r=x.useCallback(()=>n(o=>!o),[]);return[t,r,n]}const U0=x.createContext(void 0);function H0(){const e=x.useContext(U0);if(!e)throw new Error("useAppContext must be used within an AppProvider");return e}function uk({children:e}){const t=Ni(),n=sk((t==null?void 0:t.defaultOpen)||!1);return L.jsx(U0.Provider,{value:n,children:e})}function W0(e,t){return function(){return e.apply(t,arguments)}}const{toString:ck}=Object.prototype,{getPrototypeOf:Hp}=Object,Ua=(e=>t=>{const n=ck.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pn=e=>(e=e.toLowerCase(),t=>Ua(t)===e),Ha=e=>t=>typeof t===e,{isArray:Eo}=Array,Ei=Ha("undefined");function pk(e){return e!==null&&!Ei(e)&&e.constructor!==null&&!Ei(e.constructor)&&zt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const V0=pn("ArrayBuffer");function fk(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&V0(e.buffer),t}const dk=Ha("string"),zt=Ha("function"),G0=Ha("number"),Wa=e=>e!==null&&typeof e=="object",hk=e=>e===!0||e===!1,Dl=e=>{if(Ua(e)!=="object")return!1;const t=Hp(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},mk=pn("Date"),gk=pn("File"),yk=pn("Blob"),vk=pn("FileList"),wk=e=>Wa(e)&&zt(e.pipe),xk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||zt(e.append)&&((t=Ua(e))==="formdata"||t==="object"&&zt(e.toString)&&e.toString()==="[object FormData]"))},bk=pn("URLSearchParams"),kk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ii(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Eo(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Y0=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Q0=e=>!Ei(e)&&e!==Y0;function vc(){const{caseless:e}=Q0(this)&&this||{},t={},n=(r,o)=>{const i=e&&q0(t,o)||o;Dl(t[i])&&Dl(r)?t[i]=vc(t[i],r):Dl(r)?t[i]=vc({},r):Eo(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(Ii(t,(o,i)=>{n&&zt(o)?e[i]=W0(o,n):e[i]=o},{allOwnKeys:r}),e),Ck=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ek=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Pk=(e,t,n,r)=>{let o,i,l;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)l=o[i],(!r||r(l,e,t))&&!a[l]&&(t[l]=e[l],a[l]=!0);e=n!==!1&&Hp(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Tk=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ok=e=>{if(!e)return null;if(Eo(e))return e;let t=e.length;if(!G0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ak=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Hp(Uint8Array)),$k=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},_k=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Rk=pn("HTMLFormElement"),Lk=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Hd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Dk=pn("RegExp"),K0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ii(n,(o,i)=>{let l;(l=t(o,i,e))!==!1&&(r[i]=l||o)}),Object.defineProperties(e,r)},zk=e=>{K0(e,(t,n)=>{if(zt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(zt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Nk=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Eo(e)?r(e):r(String(e).split(t)),n},Ik=()=>{},Fk=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Zs="abcdefghijklmnopqrstuvwxyz",Wd="0123456789",X0={DIGIT:Wd,ALPHA:Zs,ALPHA_DIGIT:Zs+Zs.toUpperCase()+Wd},jk=(e=16,t=X0.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Mk(e){return!!(e&&zt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Bk=e=>{const t=new Array(10),n=(r,o)=>{if(Wa(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Eo(r)?[]:{};return Ii(r,(l,a)=>{const s=n(l,o+1);!Ei(s)&&(i[a]=s)}),t[o]=void 0,i}}return r};return n(e,0)},Uk=pn("AsyncFunction"),Hk=e=>e&&(Wa(e)||zt(e))&&zt(e.then)&&zt(e.catch),D={isArray:Eo,isArrayBuffer:V0,isBuffer:pk,isFormData:xk,isArrayBufferView:fk,isString:dk,isNumber:G0,isBoolean:hk,isObject:Wa,isPlainObject:Dl,isUndefined:Ei,isDate:mk,isFile:gk,isBlob:yk,isRegExp:Dk,isFunction:zt,isStream:wk,isURLSearchParams:bk,isTypedArray:Ak,isFileList:vk,forEach:Ii,merge:vc,extend:Sk,trim:kk,stripBOM:Ck,inherits:Ek,toFlatObject:Pk,kindOf:Ua,kindOfTest:pn,endsWith:Tk,toArray:Ok,forEachEntry:$k,matchAll:_k,isHTMLForm:Rk,hasOwnProperty:Hd,hasOwnProp:Hd,reduceDescriptors:K0,freezeMethods:zk,toObjectSet:Nk,toCamelCase:Lk,noop:Ik,toFiniteNumber:Fk,findKey:q0,global:Y0,isContextDefined:Q0,ALPHABET:X0,generateString:jk,isSpecCompliantForm:Mk,toJSONObject:Bk,isAsyncFn:Uk,isThenable:Hk};function de(e,t,n,r,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),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}D.inherits(de,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:D.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Z0=de.prototype,J0={};["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=>{J0[e]={value:e}});Object.defineProperties(de,J0);Object.defineProperty(Z0,"isAxiosError",{value:!0});de.from=(e,t,n,r,o,i)=>{const l=Object.create(Z0);return D.toFlatObject(e,l,function(s){return s!==Error.prototype},a=>a!=="isAxiosError"),de.call(l,e.message,t,n,r,o),l.cause=e,l.name=e.name,i&&Object.assign(l,i),l};const Wk=null;function wc(e){return D.isPlainObject(e)||D.isArray(e)}function e1(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function Vd(e,t,n){return e?e.concat(t).map(function(o,i){return o=e1(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Vk(e){return D.isArray(e)&&!e.some(wc)}const Gk=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function Va(e,t,n){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,w){return!D.isUndefined(w[m])});const r=n.metaTokens,o=n.visitor||c,i=n.dots,l=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(o))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(D.isDate(h))return h.toISOString();if(!s&&D.isBlob(h))throw new de("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(h)||D.isTypedArray(h)?s&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,m,w){let g=h;if(h&&!w&&typeof h=="object"){if(D.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(D.isArray(h)&&Vk(h)||(D.isFileList(h)||D.endsWith(m,"[]"))&&(g=D.toArray(h)))return m=e1(m),g.forEach(function(v,C){!(D.isUndefined(v)||v===null)&&t.append(l===!0?Vd([m],C,i):l===null?m:m+"[]",u(v))}),!1}return wc(h)?!0:(t.append(Vd(w,m,i),u(h)),!1)}const p=[],d=Object.assign(Gk,{defaultVisitor:c,convertValue:u,isVisitable:wc});function f(h,m){if(!D.isUndefined(h)){if(p.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(h),D.forEach(h,function(g,y){(!(D.isUndefined(g)||g===null)&&o.call(t,g,D.isString(y)?y.trim():y,m,d))===!0&&f(g,m?m.concat(y):[y])}),p.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return f(e),t}function Gd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Wp(e,t){this._pairs=[],e&&Va(e,this,t)}const t1=Wp.prototype;t1.append=function(t,n){this._pairs.push([t,n])};t1.toString=function(t){const n=t?function(r){return t.call(this,r,Gd)}:Gd;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function qk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function n1(e,t,n){if(!t)return e;const r=n&&n.encode||qk,o=n&&n.serialize;let i;if(o?i=o(t,n):i=D.isURLSearchParams(t)?t.toString():new Wp(t,n).toString(r),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Yk{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(r){r!==null&&t(r)})}}const qd=Yk,r1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qk=typeof URLSearchParams<"u"?URLSearchParams:Wp,Kk=typeof FormData<"u"?FormData:null,Xk=typeof Blob<"u"?Blob:null,Zk=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Jk=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),ln={isBrowser:!0,classes:{URLSearchParams:Qk,FormData:Kk,Blob:Xk},isStandardBrowserEnv:Zk,isStandardBrowserWebWorkerEnv:Jk,protocols:["http","https","file","blob","url","data"]};function eS(e,t){return Va(e,new ln.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return ln.isNode&&D.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function tS(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nS(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return l=!l&&D.isArray(o)?o.length:l,s?(D.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!a):((!o[l]||!D.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],i)&&D.isArray(o[l])&&(o[l]=nS(o[l])),!a)}if(D.isFormData(e)&&D.isFunction(e.entries)){const n={};return D.forEachEntry(e,(r,o)=>{t(tS(r),o,n,0)}),n}return null}function rS(e,t,n){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Vp={transitional:r1,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=D.isObject(t);if(i&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return o&&o?JSON.stringify(o1(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return eS(t,this.formSerializer).toString();if((a=D.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Va(a?{"files[]":t}:t,s&&new s,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),rS(t)):t}],transformResponse:[function(t){const n=this.transitional||Vp.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&D.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(l)throw a.name==="SyntaxError"?de.from(a,de.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ln.classes.FormData,Blob:ln.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],e=>{Vp.headers[e]={}});const Gp=Vp,oS=D.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"]),iS=e=>{const t={};let n,r,o;return e&&e.split(` -`).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!n||t[n]&&oS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Yd=Symbol("internals");function Bo(e){return e&&String(e).trim().toLowerCase()}function zl(e){return e===!1||e==null?e:D.isArray(e)?e.map(zl):String(e)}function lS(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const aS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Js(e,t,n,r,o){if(D.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!D.isString(t)){if(D.isString(r))return t.indexOf(r)!==-1;if(D.isRegExp(r))return r.test(t)}}function sS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function uS(e,t){const n=D.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,l){return this[r].call(this,t,o,i,l)},configurable:!0})})}class Ga{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(a,s,u){const c=Bo(s);if(!c)throw new Error("header name must be a non-empty string");const p=D.findKey(o,c);(!p||o[p]===void 0||u===!0||u===void 0&&o[p]!==!1)&&(o[p||s]=zl(a))}const l=(a,s)=>D.forEach(a,(u,c)=>i(u,c,s));return D.isPlainObject(t)||t instanceof this.constructor?l(t,n):D.isString(t)&&(t=t.trim())&&!aS(t)?l(iS(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=Bo(t),t){const r=D.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return lS(o);if(D.isFunction(n))return n.call(this,o,r);if(D.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Bo(t),t){const r=D.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Js(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(l){if(l=Bo(l),l){const a=D.findKey(r,l);a&&(!n||Js(r,r[a],a,n))&&(delete r[a],o=!0)}}return D.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Js(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return D.forEach(this,(o,i)=>{const l=D.findKey(r,i);if(l){n[l]=zl(o),delete n[i];return}const a=t?sS(i):String(i).trim();a!==i&&delete n[i],n[a]=zl(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return D.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&D.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Yd]=this[Yd]={accessors:{}}).accessors,o=this.prototype;function i(l){const a=Bo(l);r[a]||(uS(o,l),r[a]=!0)}return D.isArray(t)?t.forEach(i):i(t),this}}Ga.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(Ga.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});D.freezeMethods(Ga);const Sn=Ga;function eu(e,t){const n=this||Gp,r=t||n,o=Sn.from(r.headers);let i=r.data;return D.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function i1(e){return!!(e&&e.__CANCEL__)}function Fi(e,t,n){de.call(this,e??"canceled",de.ERR_CANCELED,t,n),this.name="CanceledError"}D.inherits(Fi,de,{__CANCEL__:!0});function cS(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new de("Request failed with status code "+n.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const pS=ln.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,l,a){const s=[];s.push(n+"="+encodeURIComponent(r)),D.isNumber(o)&&s.push("expires="+new Date(o).toGMTString()),D.isString(i)&&s.push("path="+i),D.isString(l)&&s.push("domain="+l),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function fS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function dS(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function l1(e,t){return e&&!fS(t)?dS(e,t):t}const hS=ln.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let l=i;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(l){const a=D.isString(l)?o(l):l;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function mS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function gS(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,l;return t=t!==void 0?t:1e3,function(s){const u=Date.now(),c=r[i];l||(l=u),n[o]=s,r[o]=u;let p=i,d=0;for(;p!==o;)d+=n[p++],p=p%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-l{const i=o.loaded,l=o.lengthComputable?o.total:void 0,a=i-n,s=r(a),u=i<=l;n=i;const c={loaded:i,total:l,progress:l?i/l:void 0,bytes:a,rate:s||void 0,estimated:s&&l&&u?(l-i)/s:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const yS=typeof XMLHttpRequest<"u",vS=yS&&function(e){return new Promise(function(n,r){let o=e.data;const i=Sn.from(e.headers).normalize(),l=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}let u;D.isFormData(o)&&(ln.isStandardBrowserEnv||ln.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?D.isString(u=i.getContentType())&&i.setContentType(u.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let c=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(h+":"+m))}const p=l1(e.baseURL,e.url);c.open(e.method.toUpperCase(),n1(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function d(){if(!c)return;const h=Sn.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),w={data:!l||l==="text"||l==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:h,config:e,request:c};cS(function(y){n(y),s()},function(y){r(y),s()},w),c=null}if("onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(r(new de("Request aborted",de.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new de("Network Error",de.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const w=e.transitional||r1;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new de(m,w.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,c)),c=null},ln.isStandardBrowserEnv){const h=hS(p)&&e.xsrfCookieName&&pS.read(e.xsrfCookieName);h&&i.set(e.xsrfHeaderName,h)}o===void 0&&i.setContentType(null),"setRequestHeader"in c&&D.forEach(i.toJSON(),function(m,w){c.setRequestHeader(w,m)}),D.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),l&&l!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",Qd(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Qd(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=h=>{c&&(r(!h||h.type?new Fi(null,e,c):h),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=mS(p);if(f&&ln.protocols.indexOf(f)===-1){r(new de("Unsupported protocol "+f+":",de.ERR_BAD_REQUEST,e));return}c.send(o||null)})},xc={http:Wk,xhr:vS};D.forEach(xc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Kd=e=>`- ${e}`,wS=e=>D.isFunction(e)||e===null||e===!1,a1={getAdapter:e=>{e=D.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${a} `+(s===!1?"is not supported by the environment":"is not available in the build"));let l=t?i.length>1?`since : -`+i.map(Kd).join(` -`):" "+Kd(i[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:xc};function tu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fi(null,e)}function Xd(e){return tu(e),e.headers=Sn.from(e.headers),e.data=eu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),a1.getAdapter(e.adapter||Gp.adapter)(e).then(function(r){return tu(e),r.data=eu.call(e,e.transformResponse,r),r.headers=Sn.from(r.headers),r},function(r){return i1(r)||(tu(e),r&&r.response&&(r.response.data=eu.call(e,e.transformResponse,r.response),r.response.headers=Sn.from(r.response.headers))),Promise.reject(r)})}const Zd=e=>e instanceof Sn?e.toJSON():e;function yo(e,t){t=t||{};const n={};function r(u,c,p){return D.isPlainObject(u)&&D.isPlainObject(c)?D.merge.call({caseless:p},u,c):D.isPlainObject(c)?D.merge({},c):D.isArray(c)?c.slice():c}function o(u,c,p){if(D.isUndefined(c)){if(!D.isUndefined(u))return r(void 0,u,p)}else return r(u,c,p)}function i(u,c){if(!D.isUndefined(c))return r(void 0,c)}function l(u,c){if(D.isUndefined(c)){if(!D.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,p){if(p in t)return r(u,c);if(p in e)return r(void 0,u)}const s={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a,headers:(u,c)=>o(Zd(u),Zd(c),!0)};return D.forEach(Object.keys(Object.assign({},e,t)),function(c){const p=s[c]||o,d=p(e[c],t[c],c);D.isUndefined(d)&&p!==a||(n[c]=d)}),n}const s1="1.6.0",qp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Jd={};qp.transitional=function(t,n,r){function o(i,l){return"[Axios v"+s1+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,a)=>{if(t===!1)throw new de(o(l," has been removed"+(n?" in "+n:"")),de.ERR_DEPRECATED);return n&&!Jd[l]&&(Jd[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,a):!0}};function xS(e,t,n){if(typeof e!="object")throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],l=t[i];if(l){const a=e[i],s=a===void 0||l(a,i,e);if(s!==!0)throw new de("option "+i+" must be "+s,de.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new de("Unknown option "+i,de.ERR_BAD_OPTION)}}const bc={assertOptions:xS,validators:qp},In=bc.validators;class ha{constructor(t){this.defaults=t,this.interceptors={request:new qd,response:new qd}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yo(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&bc.assertOptions(r,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean)},!1),o!=null&&(D.isFunction(o)?n.paramsSerializer={serialize:o}:bc.assertOptions(o,{encode:In.function,serialize:In.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&D.merge(i.common,i[n.method]);i&&D.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Sn.concat(l,i);const a=[];let s=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(s=s&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,p=0,d;if(!s){const h=[Xd.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,u),d=h.length,c=Promise.resolve(n);p{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const l=new Promise(a=>{r.subscribe(a),i=a}).then(o);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,a){r.reason||(r.reason=new Fi(i,l,a),n(r.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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Yp(function(o){t=o}),cancel:t}}}const bS=Yp;function kS(e){return function(n){return e.apply(null,n)}}function SS(e){return D.isObject(e)&&e.isAxiosError===!0}const kc={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(kc).forEach(([e,t])=>{kc[t]=e});const CS=kc;function u1(e){const t=new Nl(e),n=W0(Nl.prototype.request,t);return D.extend(n,Nl.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return u1(yo(e,o))},n}const We=u1(Gp);We.Axios=Nl;We.CanceledError=Fi;We.CancelToken=bS;We.isCancel=i1;We.VERSION=s1;We.toFormData=Va;We.AxiosError=de;We.Cancel=We.CanceledError;We.all=function(t){return Promise.all(t)};We.spread=kS;We.isAxiosError=SS;We.mergeConfig=yo;We.AxiosHeaders=Sn;We.formToJSON=e=>o1(D.isHTMLForm(e)?new FormData(e):e);We.getAdapter=a1.getAdapter;We.HttpStatusCode=CS;We.default=We;const ES=We,Sc="@openchatai:session_id";function PS(){return sessionStorage.getItem(Sc)}function TS(){const[e,t]=x.useState(PS);return x.useLayoutEffect(()=>{if(sessionStorage.getItem(Sc))t(e);else{const r=Math.random().toString(36).substring(2,15);sessionStorage.setItem(Sc,r),t(r)}},[]),{sessionId:e,setSessionId:t}}function OS(e,t,n){const r=ES.create({baseURL:e,headers:{"X-Session-Id":t,"X-Bot-Token":n}});return r.interceptors.request.use(o=>(o.data={...o.data,session_id:t},o)),r}const c1=x.createContext(void 0);function AS({children:e}){const t=Ni(),{sessionId:n}=TS(),r=OS(t==null?void 0:t.apiUrl,n,t==null?void 0:t.token);return L.jsx(c1.Provider,{value:{axiosInstance:r},children:e})}const p1=()=>{const e=x.useContext(c1);if(!e)throw new Error("useAxiosInstance must be used within a AxiosProvider");return e},f1=x.createContext({});function $S({children:e}){const{axiosInstance:t}=p1(),[n,r]=x.useState(),[o,i]=x.useState(!0);async function l(){i(!0),t.get("/chat/init").then(({data:a})=>r(a)).finally(()=>i(!1))}return x.useEffect(()=>{l()},[]),L.jsx(f1.Provider,{value:{data:n,loading:o,refetch:l},children:e})}const Qp=()=>{const e=x.useContext(f1);return e||console.warn("Error loading initial data...."),e};function _S({children:e,options:t}){return L.jsx(ak,{data:t,children:L.jsx(uk,{children:L.jsx(AS,{children:L.jsx($S,{children:e})})})})}function RS(){for(var e=0,t,n,r="";ee&&(t=0,r=n,n=new Map)}return{get:function(l){var a=n.get(l);if(a!==void 0)return a;if((a=r.get(l))!==void 0)return o(l,a),a},set:function(l,a){n.has(l)?n.set(l,a):o(l,a)}}}var m1="!";function jS(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(l){for(var a=[],s=0,u=0,c,p=0;pu?c-u:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:w}}}function MS(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var o=r[0]==="[";o?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function BS(e){return{cache:FS(e.cacheSize),splitModifiers:jS(e),...LS(e)}}var US=/\s+/;function HS(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(US).map(function(l){var a=n(l),s=a.modifiers,u=a.hasImportantModifier,c=a.baseClassName,p=a.maybePostfixModifierPosition,d=r(p?c.substring(0,p):c),f=!!p;if(!d){if(!p)return{isTailwindClass:!1,originalClassName:l};if(d=r(c),!d)return{isTailwindClass:!1,originalClassName:l};f=!1}var h=MS(s).join(":"),m=u?h+m1:h;return{isTailwindClass:!0,modifierId:m,classGroupId:d,originalClassName:l,hasPostfixModifier:f}}).reverse().filter(function(l){if(!l.isTailwindClass)return!0;var a=l.modifierId,s=l.classGroupId,u=l.hasPostfixModifier,c=a+s;return i.has(c)?!1:(i.add(c),o(s,u).forEach(function(p){return i.add(a+p)}),!0)}).reverse().map(function(l){return l.originalClassName}).join(" ")}function WS(){for(var e=arguments.length,t=new Array(e),n=0;ne.forEach(n=>u2(n,t))}function Jt(...e){return x.useCallback(x1(...e),e)}function Xp(e,t=[]){let n=[];function r(i,l){const a=x.createContext(l),s=n.length;n=[...n,l];function u(p){const{scope:d,children:f,...h}=p,m=(d==null?void 0:d[e][s])||a,w=x.useMemo(()=>h,Object.values(h));return x.createElement(m.Provider,{value:w},f)}function c(p,d){const f=(d==null?void 0:d[e][s])||a,h=x.useContext(f);if(h)return h;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const o=()=>{const i=n.map(l=>x.createContext(l));return function(a){const s=(a==null?void 0:a[e])||i;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:s}}),[a,s])}};return o.scopeName=e,[r,c2(o,...t)]}function c2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const l=r.reduce((a,{useScope:s,scopeName:u})=>{const p=s(i)[`__scope${u}`];return{...a,...p}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}const vo=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},p2=Kw["useId".toString()]||(()=>{});let f2=0;function Il(e){const[t,n]=x.useState(p2());return vo(()=>{e||n(r=>r??String(f2++))},[e]),e||(t?`radix-${t}`:"")}function un(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function b1({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=d2({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,a=un(n),s=x.useCallback(u=>{if(i){const p=typeof u=="function"?u(e):u;p!==e&&a(p)}else o(u)},[i,e,o,a]);return[l,s]}function d2({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,o=x.useRef(r),i=un(t);return x.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Zp=x.forwardRef((e,t)=>{const{children:n,...r}=e,o=x.Children.toArray(n),i=o.find(h2);if(i){const l=i.props.children,a=o.map(s=>s===i?x.Children.count(l)>1?x.Children.only(null):x.isValidElement(l)?l.props.children:null:s);return x.createElement(Pc,ge({},r,{ref:t}),x.isValidElement(l)?x.cloneElement(l,void 0,a):null)}return x.createElement(Pc,ge({},r,{ref:t}),n)});Zp.displayName="Slot";const Pc=x.forwardRef((e,t)=>{const{children:n,...r}=e;return x.isValidElement(n)?x.cloneElement(n,{...m2(r,n.props),ref:t?x1(t,n.ref):n.ref}):x.Children.count(n)>1?x.Children.only(null):null});Pc.displayName="SlotClone";const k1=({children:e})=>x.createElement(x.Fragment,null,e);function h2(e){return x.isValidElement(e)&&e.type===k1}function m2(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const g2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ot=g2.reduce((e,t)=>{const n=x.forwardRef((r,o)=>{const{asChild:i,...l}=r,a=i?Zp:t;return x.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),x.createElement(a,ge({},l,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function S1(e,t){e&&Ba.flushSync(()=>e.dispatchEvent(t))}function C1(e,t=globalThis==null?void 0:globalThis.document){const n=un(e);x.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Tc="dismissableLayer.update",y2="dismissableLayer.pointerDownOutside",v2="dismissableLayer.focusOutside";let oh;const w2=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),x2=x.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:a,onDismiss:s,...u}=e,c=x.useContext(w2),[p,d]=x.useState(null),f=(n=p==null?void 0:p.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=x.useState({}),m=Jt(t,O=>d(O)),w=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(g),v=p?w.indexOf(p):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,E=v>=y,k=b2(O=>{const N=O.target,P=[...c.branches].some(_=>_.contains(N));!E||P||(i==null||i(O),a==null||a(O),O.defaultPrevented||s==null||s())},f),T=k2(O=>{const N=O.target;[...c.branches].some(_=>_.contains(N))||(l==null||l(O),a==null||a(O),O.defaultPrevented||s==null||s())},f);return C1(O=>{v===c.layers.size-1&&(o==null||o(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},f),x.useEffect(()=>{if(p)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(oh=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(p)),c.layers.add(p),ih(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=oh)}},[p,f,r,c]),x.useEffect(()=>()=>{p&&(c.layers.delete(p),c.layersWithOutsidePointerEventsDisabled.delete(p),ih())},[p,c]),x.useEffect(()=>{const O=()=>h({});return document.addEventListener(Tc,O),()=>document.removeEventListener(Tc,O)},[]),x.createElement(Ot.div,ge({},u,{ref:m,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:Xe(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Xe(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Xe(e.onPointerDownCapture,k.onPointerDownCapture)}))});function b2(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let c=function(){E1(y2,n,u,{discrete:!0})};var s=c;const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function k2(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=x.useRef(!1);return x.useEffect(()=>{const o=i=>{i.target&&!r.current&&E1(v2,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ih(){const e=new CustomEvent(Tc);document.dispatchEvent(e)}function E1(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?S1(o,i):o.dispatchEvent(i)}const nu="focusScope.autoFocusOnMount",ru="focusScope.autoFocusOnUnmount",lh={bubbles:!1,cancelable:!0},S2=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[a,s]=x.useState(null),u=un(o),c=un(i),p=x.useRef(null),d=Jt(t,m=>s(m)),f=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let y=function(k){if(f.paused||!a)return;const T=k.target;a.contains(T)?p.current=T:Mn(p.current,{select:!0})},v=function(k){if(f.paused||!a)return;const T=k.relatedTarget;T!==null&&(a.contains(T)||Mn(p.current,{select:!0}))},C=function(k){if(document.activeElement===document.body)for(const O of k)O.removedNodes.length>0&&Mn(a)};var m=y,w=v,g=C;document.addEventListener("focusin",y),document.addEventListener("focusout",v);const E=new MutationObserver(C);return a&&E.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",v),E.disconnect()}}},[r,a,f.paused]),x.useEffect(()=>{if(a){sh.add(f);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(nu,lh);a.addEventListener(nu,u),a.dispatchEvent(g),g.defaultPrevented||(C2(A2(P1(a)),{select:!0}),document.activeElement===m&&Mn(a))}return()=>{a.removeEventListener(nu,u),setTimeout(()=>{const g=new CustomEvent(ru,lh);a.addEventListener(ru,c),a.dispatchEvent(g),g.defaultPrevented||Mn(m??document.body,{select:!0}),a.removeEventListener(ru,c),sh.remove(f)},0)}}},[a,u,c,f]);const h=x.useCallback(m=>{if(!n&&!r||f.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(w&&g){const y=m.currentTarget,[v,C]=E2(y);v&&C?!m.shiftKey&&g===C?(m.preventDefault(),n&&Mn(v,{select:!0})):m.shiftKey&&g===v&&(m.preventDefault(),n&&Mn(C,{select:!0})):g===y&&m.preventDefault()}},[n,r,f.paused]);return x.createElement(Ot.div,ge({tabIndex:-1},l,{ref:d,onKeyDown:h}))});function C2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Mn(r,{select:t}),document.activeElement!==n)return}function E2(e){const t=P1(e),n=ah(t,e),r=ah(t.reverse(),e);return[n,r]}function P1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ah(e,t){for(const n of e)if(!P2(n,{upTo:t}))return n}function P2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function T2(e){return e instanceof HTMLInputElement&&"select"in e}function Mn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&T2(e)&&t&&e.select()}}const sh=O2();function O2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=uh(e,t),e.unshift(t)},remove(t){var n;e=uh(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function uh(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function A2(e){return e.filter(t=>t.tagName!=="A")}function $2(e,t){return x.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const qa=e=>{const{present:t,children:n}=e,r=_2(t),o=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),i=Jt(r.ref,o.ref);return typeof n=="function"||r.isPresent?x.cloneElement(o,{ref:i}):null};qa.displayName="Presence";function _2(e){const[t,n]=x.useState(),r=x.useRef({}),o=x.useRef(e),i=x.useRef("none"),l=e?"mounted":"unmounted",[a,s]=$2(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=pl(r.current);i.current=a==="mounted"?u:"none"},[a]),vo(()=>{const u=r.current,c=o.current;if(c!==e){const d=i.current,f=pl(u);e?s("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?s("UNMOUNT"):s(c&&d!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,s]),vo(()=>{if(t){const u=p=>{const f=pl(r.current).includes(p.animationName);p.target===t&&f&&Ba.flushSync(()=>s("ANIMATION_END"))},c=p=>{p.target===t&&(i.current=pl(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function pl(e){return(e==null?void 0:e.animationName)||"none"}let ou=0;function R2(){x.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:ch()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:ch()),ou++,()=>{ou===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),ou--}},[])}function ch(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var on=function(){return on=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return Q2;var t=K2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Z2=$1(),J2=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,a=e.gap;return n===void 0&&(n="margin"),` - .`.concat(D2,` { +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Ys(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function oc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Db=typeof WeakMap=="function"?WeakMap:Map;function f0(e,t,n){n=kn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ca||(ca=!0,hc=r),oc(e,t)},n}function d0(e,t,n){n=kn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){oc(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){oc(e,t),typeof r!="function"&&(Zn===null?Zn=new Set([this]):Zn.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Sd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Db;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Yb.bind(null,e,t,n),t.then(e,e))}function Cd(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 Ed(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=kn(-1,1),t.tag=2,Xn(n,t,1))),n.lanes|=1),e)}var zb=Rn.ReactCurrentOwner,dt=!1;function lt(e,t,n,r){t.child=e===null?Vy(t,null,n,r):fo(t,e.child,n,r)}function Pd(e,t,n,r,o){n=n.render;var i=t.ref;return io(t,o),r=Pp(e,t,n,r,i,o),n=Tp(),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Tn(e,t,o)):($e&&n&&hp(t),t.flags|=1,lt(e,t,r,o),t.child)}function Td(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Ip(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,h0(e,t,i,r,o)):(e=Ll(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var l=i.memoizedProps;if(n=n.compare,n=n!==null?n:mi,n(l,r)&&e.ref===t.ref)return Tn(e,t,o)}return t.flags|=1,e=er(i,r),e.ref=t.ref,e.return=t,t.child=e}function h0(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(mi(i,r)&&e.ref===t.ref)if(dt=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(dt=!0);else return t.lanes=e.lanes,Tn(e,t,o)}return ic(e,t,n,r,o)}function m0(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(Jr,wt),wt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ce(Jr,wt),wt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ce(Jr,wt),wt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ce(Jr,wt),wt|=r;return lt(e,t,o,n),t.child}function g0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ic(e,t,n,r,o){var i=mt(n)?Cr:ot.current;return i=co(t,i),io(t,o),n=Pp(e,t,n,r,i,o),r=Tp(),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Tn(e,t,o)):($e&&r&&hp(t),t.flags|=1,lt(e,t,n,o),t.child)}function Od(e,t,n,r,o){if(mt(n)){var i=!0;ea(t)}else i=!1;if(io(t,o),t.stateNode===null)$l(e,t),Hy(t,n,r),rc(t,n,r,o),r=!0;else if(e===null){var l=t.stateNode,a=t.memoizedProps;l.props=a;var s=l.context,u=n.contextType;typeof u=="object"&&u!==null?u=Nt(u):(u=mt(n)?Cr:ot.current,u=co(t,u));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";p||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==r||s!==u)&&wd(t,l,r,u),Un=!1;var d=t.memoizedState;l.state=d,ia(t,r,l,o),s=t.memoizedState,a!==r||d!==s||ht.current||Un?(typeof c=="function"&&(nc(t,n,c,r),s=t.memoizedState),(a=Un||vd(t,n,a,r,d,s,u))?(p||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),l.props=r,l.state=s,l.context=u,r=a):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,By(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Gt(t.type,a),l.props=u,p=t.pendingProps,d=l.context,s=n.contextType,typeof s=="object"&&s!==null?s=Nt(s):(s=mt(n)?Cr:ot.current,s=co(t,s));var f=n.getDerivedStateFromProps;(c=typeof f=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==p||d!==s)&&wd(t,l,r,s),Un=!1,d=t.memoizedState,l.state=d,ia(t,r,l,o);var h=t.memoizedState;a!==p||d!==h||ht.current||Un?(typeof f=="function"&&(nc(t,n,f,r),h=t.memoizedState),(u=Un||vd(t,n,u,r,d,h,s)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,h,s),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,h,s)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),l.props=r,l.state=h,l.context=s,r=u):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return lc(e,t,n,r,i,o)}function lc(e,t,n,r,o,i){g0(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return o&&dd(t,n,!1),Tn(e,t,i);r=t.stateNode,zb.current=t;var a=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=fo(t,e.child,null,i),t.child=fo(t,null,a,i)):lt(e,t,a,i),t.memoizedState=r.state,o&&dd(t,n,!0),t.child}function y0(e){var t=e.stateNode;t.pendingContext?fd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fd(e,t.context,!1),kp(e,t.containerInfo)}function Ad(e,t,n,r,o){return po(),gp(o),t.flags|=256,lt(e,t,n,r),t.child}var ac={dehydrated:null,treeContext:null,retryLane:0};function sc(e){return{baseLanes:e,cachePool:null,transitions:null}}function v0(e,t,n){var r=t.pendingProps,o=Re.current,i=!1,l=(t.flags&128)!==0,a;if((a=l)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ce(Re,o&1),e===null)return ec(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):(l=r.children,e=r.fallback,i?(r=t.mode,i=t.child,l={mode:"hidden",children:l},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=Na(l,r,0,null),e=Sr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=sc(n),t.memoizedState=ac,e):$p(t,l));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return Nb(e,t,l,r,a,o,n);if(i){i=r.fallback,l=t.mode,o=e.child,a=o.sibling;var s={mode:"hidden",children:r.children};return!(l&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=er(o,s),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=er(a,i):(i=Sr(i,l,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,l=e.child.memoizedState,l=l===null?sc(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~n,t.memoizedState=ac,r}return i=e.child,e=i.sibling,r=er(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function $p(e,t){return t=Na({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ll(e,t,n,r){return r!==null&&gp(r),fo(t,e.child,null,n),e=$p(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Nb(e,t,n,r,o,i,l){if(n)return t.flags&256?(t.flags&=-257,r=Ys(Error(F(422))),ll(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Na({mode:"visible",children:r.children},o,0,null),i=Sr(i,o,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&fo(t,e.child,null,l),t.child.memoizedState=sc(l),t.memoizedState=ac,i);if(!(t.mode&1))return ll(e,t,l,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(F(419)),r=Ys(i,r,void 0),ll(e,t,l,r)}if(a=(l&e.childLanes)!==0,dt||a){if(r=Ye,r!==null){switch(l&-l){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&(r.suspendedLanes|l)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Pn(e,o),Kt(r,e,o,-1))}return Np(),r=Ys(Error(F(421))),ll(e,t,l,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Qb.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,bt=Kn(o.nextSibling),kt=t,$e=!0,Yt=null,e!==null&&($t[_t++]=wn,$t[_t++]=xn,$t[_t++]=Er,wn=e.id,xn=e.overflow,Er=t),t=$p(t,r.children),t.flags|=4096,t)}function $d(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),tc(e.return,t,n)}function Qs(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function w0(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(lt(e,t,r.children,n),r=Re.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$d(e,n,t);else if(e.tag===19)$d(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ce(Re,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&la(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Qs(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&la(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Qs(t,!0,n,null,i);break;case"together":Qs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $l(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Tn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Tr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,n=er(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=er(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ib(e,t,n){switch(t.tag){case 3:y0(t),po();break;case 5:Gy(t);break;case 1:mt(t.type)&&ea(t);break;case 4:kp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ce(ra,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ce(Re,Re.current&1),t.flags|=128,null):n&t.child.childLanes?v0(e,t,n):(Ce(Re,Re.current&1),e=Tn(e,t,n),e!==null?e.sibling:null);Ce(Re,Re.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return w0(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ce(Re,Re.current),r)break;return null;case 22:case 23:return t.lanes=0,m0(e,t,n)}return Tn(e,t,n)}var x0,uc,b0,k0;x0=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};uc=function(){};b0=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,xr(sn.current);var i=null;switch(n){case"input":o=_u(e,o),r=_u(e,r),i=[];break;case"select":o=De({},o,{value:void 0}),r=De({},r,{value:void 0}),i=[];break;case"textarea":o=Du(e,o),r=Du(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zl)}Nu(n,r);var l;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(l in a)a.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(si.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var s=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&s!==a&&(s!=null||a!=null))if(u==="style")if(a){for(l in a)!a.hasOwnProperty(l)||s&&s.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in s)s.hasOwnProperty(l)&&a[l]!==s[l]&&(n||(n={}),n[l]=s[l])}else n||(i||(i=[]),i.push(u,n)),n=s;else u==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,a=a?a.__html:void 0,s!=null&&a!==s&&(i=i||[]).push(u,s)):u==="children"?typeof s!="string"&&typeof s!="number"||(i=i||[]).push(u,""+s):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(si.hasOwnProperty(u)?(s!=null&&u==="onScroll"&&Te("scroll",e),i||a===s||(i=[])):(i=i||[]).push(u,s))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};k0=function(e,t,n,r){n!==r&&(t.flags|=4)};function jo(e,t){if(!$e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function tt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fb(e,t,n){var r=t.pendingProps;switch(mp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tt(t),null;case 1:return mt(t.type)&&Jl(),tt(t),null;case 3:return r=t.stateNode,ho(),Ae(ht),Ae(ot),Cp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ol(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yt!==null&&(yc(Yt),Yt=null))),uc(e,t),tt(t),null;case 5:Sp(t);var o=xr(xi.current);if(n=t.type,e!==null&&t.stateNode!=null)b0(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(F(166));return tt(t),null}if(e=xr(sn.current),ol(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[rn]=t,r[vi]=i,e=(t.mode&1)!==0,n){case"dialog":Te("cancel",r),Te("close",r);break;case"iframe":case"object":case"embed":Te("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[rn]=t,e[vi]=r,x0(e,t,!1,!1),t.stateNode=e;e:{switch(l=Iu(n,r),n){case"dialog":Te("cancel",e),Te("close",e),o=r;break;case"iframe":case"object":case"embed":Te("load",e),o=r;break;case"video":case"audio":for(o=0;ogo&&(t.flags|=128,r=!0,jo(i,!1),t.lanes=4194304)}else{if(!r)if(e=la(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),jo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!$e)return tt(t),null}else 2*Me()-i.renderingStartTime>go&&n!==1073741824&&(t.flags|=128,r=!0,jo(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Me(),t.sibling=null,n=Re.current,Ce(Re,r?n&1|2:n&1),t):(tt(t),null);case 22:case 23:return zp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?wt&1073741824&&(tt(t),t.subtreeFlags&6&&(t.flags|=8192)):tt(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function jb(e,t){switch(mp(t),t.tag){case 1:return mt(t.type)&&Jl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ho(),Ae(ht),Ae(ot),Cp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Sp(t),null;case 13:if(Ae(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));po()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ae(Re),null;case 4:return ho(),null;case 10:return wp(t.type._context),null;case 22:case 23:return zp(),null;case 24:return null;default:return null}}var al=!1,nt=!1,Mb=typeof WeakSet=="function"?WeakSet:Set,V=null;function Zr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function cc(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var _d=!1;function Bb(e,t){if(qu=Ql,e=Py(),dp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,a=-1,s=-1,u=0,c=0,p=e,d=null;t:for(;;){for(var f;p!==n||o!==0&&p.nodeType!==3||(a=l+o),p!==i||r!==0&&p.nodeType!==3||(s=l+r),p.nodeType===3&&(l+=p.nodeValue.length),(f=p.firstChild)!==null;)d=p,p=f;for(;;){if(p===e)break t;if(d===n&&++u===o&&(a=l),d===i&&++c===r&&(s=l),(f=p.nextSibling)!==null)break;p=d,d=p.parentNode}p=f}n=a===-1||s===-1?null:{start:a,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Yu={focusedElem:e,selectionRange:n},Ql=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;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 m=h.memoizedProps,w=h.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?m:Gt(t.type,m),w);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(C){Ne(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return h=_d,_d=!1,h}function ti(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&cc(t,n,i)}o=o.next}while(o!==r)}}function Da(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function pc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function S0(e){var t=e.alternate;t!==null&&(e.alternate=null,S0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[vi],delete t[Xu],delete t[Sb],delete t[Cb])),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 C0(e){return e.tag===5||e.tag===3||e.tag===4}function Rd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||C0(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 fc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zl));else if(r!==4&&(e=e.child,e!==null))for(fc(e,t,n),e=e.sibling;e!==null;)fc(e,t,n),e=e.sibling}function dc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(dc(e,t,n),e=e.sibling;e!==null;)dc(e,t,n),e=e.sibling}var Ke=null,qt=!1;function Nn(e,t,n){for(n=n.child;n!==null;)E0(e,t,n),n=n.sibling}function E0(e,t,n){if(an&&typeof an.onCommitFiberUnmount=="function")try{an.onCommitFiberUnmount(Pa,n)}catch{}switch(n.tag){case 5:nt||Zr(n,t);case 6:var r=Ke,o=qt;Ke=null,Nn(e,t,n),Ke=r,qt=o,Ke!==null&&(qt?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(qt?(e=Ke,n=n.stateNode,e.nodeType===8?Us(e.parentNode,n):e.nodeType===1&&Us(e,n),di(e)):Us(Ke,n.stateNode));break;case 4:r=Ke,o=qt,Ke=n.stateNode.containerInfo,qt=!0,Nn(e,t,n),Ke=r,qt=o;break;case 0:case 11:case 14:case 15:if(!nt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&cc(n,t,l),o=o.next}while(o!==r)}Nn(e,t,n);break;case 1:if(!nt&&(Zr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ne(n,t,a)}Nn(e,t,n);break;case 21:Nn(e,t,n);break;case 22:n.mode&1?(nt=(r=nt)||n.memoizedState!==null,Nn(e,t,n),nt=r):Nn(e,t,n);break;default:Nn(e,t,n)}}function Ld(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Mb),t.forEach(function(r){var o=Kb.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ht(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Hb(r/1960))-r,10e?16:e,Gn===null)var r=!1;else{if(e=Gn,Gn=null,pa=0,me&6)throw Error(F(331));var o=me;for(me|=4,V=e.current;V!==null;){var i=V,l=i.child;if(V.flags&16){var a=i.deletions;if(a!==null){for(var s=0;sMe()-Lp?kr(e,0):Rp|=n),gt(e,t)}function L0(e,t){t===0&&(e.mode&1?(t=Zi,Zi<<=1,!(Zi&130023424)&&(Zi=4194304)):t=1);var n=st();e=Pn(e,t),e!==null&&(Ri(e,t,n),gt(e,n))}function Qb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),L0(e,n)}function Kb(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(t),L0(e,n)}var D0;D0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ht.current)dt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return dt=!1,Ib(e,t,n);dt=!!(e.flags&131072)}else dt=!1,$e&&t.flags&1048576&&Iy(t,na,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$l(e,t),e=t.pendingProps;var o=co(t,ot.current);io(t,n),o=Pp(null,t,r,e,o,n);var i=Tp();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,mt(r)?(i=!0,ea(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,bp(t),o.updater=Ra,t.stateNode=o,o._reactInternals=t,rc(t,r,e,n),t=lc(null,t,r,!0,i,n)):(t.tag=0,$e&&i&&hp(t),lt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch($l(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Zb(r),e=Gt(r,e),o){case 0:t=ic(null,t,r,e,n);break e;case 1:t=Od(null,t,r,e,n);break e;case 11:t=Pd(null,t,r,e,n);break e;case 14:t=Td(null,t,r,Gt(r.type,e),n);break e}throw Error(F(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gt(r,o),ic(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gt(r,o),Od(e,t,r,o,n);case 3:e:{if(y0(t),e===null)throw Error(F(387));r=t.pendingProps,i=t.memoizedState,o=i.element,By(e,t),ia(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=mo(Error(F(423)),t),t=Ad(e,t,r,n,o);break e}else if(r!==o){o=mo(Error(F(424)),t),t=Ad(e,t,r,n,o);break e}else for(bt=Kn(t.stateNode.containerInfo.firstChild),kt=t,$e=!0,Yt=null,n=Vy(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(po(),r===o){t=Tn(e,t,n);break e}lt(e,t,r,n)}t=t.child}return t;case 5:return Gy(t),e===null&&ec(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,Qu(r,o)?l=null:i!==null&&Qu(r,i)&&(t.flags|=32),g0(e,t),lt(e,t,l,n),t.child;case 6:return e===null&&ec(t),null;case 13:return v0(e,t,n);case 4:return kp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fo(t,null,r,n):lt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gt(r,o),Pd(e,t,r,o,n);case 7:return lt(e,t,t.pendingProps,n),t.child;case 8:return lt(e,t,t.pendingProps.children,n),t.child;case 12:return lt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Ce(ra,r._currentValue),r._currentValue=l,i!==null)if(Zt(i.value,l)){if(i.children===o.children&&!ht.current){t=Tn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){l=i.child;for(var s=a.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=kn(-1,n&-n),s.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),tc(i.return,n,t),a.lanes|=n;break}s=s.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(F(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),tc(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}lt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,io(t,n),o=Nt(o),r=r(o),t.flags|=1,lt(e,t,r,n),t.child;case 14:return r=t.type,o=Gt(r,t.pendingProps),o=Gt(r.type,o),Td(e,t,r,o,n);case 15:return h0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Gt(r,o),$l(e,t),t.tag=1,mt(r)?(e=!0,ea(t)):e=!1,io(t,n),Hy(t,r,o),rc(t,r,o,n),lc(null,t,r,!0,e,n);case 19:return w0(e,t,n);case 22:return m0(e,t,n)}throw Error(F(156,t.tag))};function z0(e,t){return ay(e,t)}function Xb(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,t,n,r){return new Xb(e,t,n,r)}function Ip(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zb(e){if(typeof e=="function")return Ip(e)?1:0;if(e!=null){if(e=e.$$typeof,e===np)return 11;if(e===rp)return 14}return 2}function er(e,t){var n=e.alternate;return n===null?(n=Lt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ll(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")Ip(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Hr:return Sr(n.children,o,i,t);case tp:l=8,o|=8;break;case Tu:return e=Lt(12,n,t,o|2),e.elementType=Tu,e.lanes=i,e;case Ou:return e=Lt(13,n,t,o),e.elementType=Ou,e.lanes=i,e;case Au:return e=Lt(19,n,t,o),e.elementType=Au,e.lanes=i,e;case Wg:return Na(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ug:l=10;break e;case Hg:l=9;break e;case np:l=11;break e;case rp:l=14;break e;case Bn:l=16,r=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=Lt(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Sr(e,t,n,r){return e=Lt(7,e,r,t),e.lanes=n,e}function Na(e,t,n,r){return e=Lt(22,e,r,t),e.elementType=Wg,e.lanes=n,e.stateNode={isHidden:!1},e}function Ks(e,t,n){return e=Lt(6,e,null,t),e.lanes=n,e}function Xs(e,t,n){return t=Lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jb(e,t,n,r,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=_s(0),this.expirationTimes=_s(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_s(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Fp(e,t,n,r,o,i,l,a,s){return e=new Jb(e,t,n,a,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Lt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},bp(i),e}function ek(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j0)}catch(e){console.error(e)}}j0(),Ig.exports=Pt;var Ba=Ig.exports,Bd=Ba;Eu.createRoot=Bd.createRoot,Eu.hydrateRoot=Bd.hydrateRoot;const ik='@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*{scrollbar-color:initial;scrollbar-width:initial}:root{--opencopilot-primary-clr: #703ea8;--opencopilot-accent-clr: #f8f7f8;--opencopilot-accnet-2-clr: #817f81;--opencopilot-primary-light-clr: rgba(0, 87, 255, .1)}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.opencopilot-fixed{position:fixed}.opencopilot-absolute{position:absolute}.opencopilot-relative{position:relative}.opencopilot-inset-0{top:0;right:0;bottom:0;left:0}.opencopilot-bottom-0{bottom:0}.opencopilot-right-0{right:0}.opencopilot-top-0{top:0}.\\!opencopilot-z-\\[100000\\]{z-index:100000!important}.opencopilot-z-50{z-index:50}.opencopilot-z-\\[10000000\\]{z-index:10000000}.opencopilot-z-\\[100\\]{z-index:100}.opencopilot-z-\\[50000\\]{z-index:50000}.opencopilot-clear-both{clear:both}.opencopilot-m-0{margin:0}.opencopilot-mx-auto{margin-left:auto;margin-right:auto}.opencopilot-mb-3{margin-bottom:.75rem}.opencopilot-mb-auto{margin-bottom:auto}.opencopilot-mt-auto{margin-top:auto}.opencopilot-block{display:block}.opencopilot-flex{display:flex}.opencopilot-grid{display:grid}.opencopilot-hidden{display:none}.opencopilot-aspect-square{aspect-ratio:1 / 1}.opencopilot-h-7{height:1.75rem}.opencopilot-h-fit{height:-moz-fit-content;height:fit-content}.opencopilot-h-full{height:100%}.opencopilot-h-screen{height:100vh}.opencopilot-max-h-full{max-height:100%}.opencopilot-w-7{width:1.75rem}.opencopilot-w-fit{width:-moz-fit-content;width:fit-content}.opencopilot-w-full{width:100%}.opencopilot-w-screen{width:100vw}.opencopilot-min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.opencopilot-max-w-\\[15rem\\]{max-width:15rem}.opencopilot-max-w-full{max-width:100%}.opencopilot-max-w-lg{max-width:32rem}.opencopilot-flex-1{flex:1 1 0%}.opencopilot-shrink-0{flex-shrink:0}.opencopilot-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.opencopilot-resize-none{resize:none}.opencopilot-flex-col{flex-direction:column}.opencopilot-flex-col-reverse{flex-direction:column-reverse}.opencopilot-flex-wrap{flex-wrap:wrap}.opencopilot-items-start{align-items:flex-start}.opencopilot-items-center{align-items:center}.opencopilot-justify-center{justify-content:center}.opencopilot-justify-between{justify-content:space-between}.opencopilot-gap-1{gap:.25rem}.opencopilot-gap-2{gap:.5rem}.opencopilot-gap-3{gap:.75rem}.opencopilot-gap-4{gap:1rem}.opencopilot-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.opencopilot-space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.opencopilot-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.opencopilot-justify-self-end{justify-self:end}.opencopilot-overflow-auto{overflow:auto}.opencopilot-overflow-hidden{overflow:hidden}.opencopilot-overflow-x-auto{overflow-x:auto}.opencopilot-overflow-y-auto{overflow-y:auto}.opencopilot-overflow-x-hidden{overflow-x:hidden}.opencopilot-scroll-smooth{scroll-behavior:smooth}.opencopilot-whitespace-nowrap{white-space:nowrap}.opencopilot-whitespace-pre-wrap{white-space:pre-wrap}.opencopilot-rounded-2xl{border-radius:1rem}.opencopilot-rounded-full{border-radius:9999px}.opencopilot-rounded-lg{border-radius:.5rem}.opencopilot-rounded-md{border-radius:.375rem}.opencopilot-rounded-sm{border-radius:.125rem}.opencopilot-rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.opencopilot-border{border-width:1px}.opencopilot-border-b{border-bottom-width:1px}.opencopilot-border-none{border-style:none}.opencopilot-border-primary-light{border-color:var(--opencopilot-primary-light-clr)}.opencopilot-border-rose-500{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity))}.opencopilot-border-transparent{border-color:transparent}.opencopilot-border-b-black\\/10{border-bottom-color:#0000001a}.opencopilot-bg-accent{background-color:var(--opencopilot-accent-clr)}.opencopilot-bg-black\\/50{background-color:#00000080}.opencopilot-bg-primary{background-color:var(--opencopilot-primary-clr)}.opencopilot-bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.opencopilot-bg-transparent{background-color:transparent}.opencopilot-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.opencopilot-fill-current{fill:currentColor}.opencopilot-object-cover{-o-object-fit:cover;object-fit:cover}.opencopilot-p-0{padding:0}.opencopilot-p-0\\.5{padding:.125rem}.opencopilot-p-2{padding:.5rem}.opencopilot-p-3{padding:.75rem}.opencopilot-p-6{padding:1.5rem}.opencopilot-px-2{padding-left:.5rem;padding-right:.5rem}.opencopilot-px-2\\.5{padding-left:.625rem;padding-right:.625rem}.opencopilot-px-4{padding-left:1rem;padding-right:1rem}.opencopilot-py-1{padding-top:.25rem;padding-bottom:.25rem}.opencopilot-py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.opencopilot-py-2{padding-top:.5rem;padding-bottom:.5rem}.opencopilot-ps-10{padding-inline-start:2.5rem}.opencopilot-text-center{text-align:center}.opencopilot-font-inter{font-family:Inter,sans-serif,system-ui}.opencopilot-text-2xl{font-size:1.5rem;line-height:2rem}.opencopilot-text-\\[14px\\]{font-size:14px}.opencopilot-text-lg{font-size:1.125rem;line-height:1.75rem}.opencopilot-text-sm{font-size:.875rem;line-height:1.25rem}.opencopilot-text-xl{font-size:1.25rem;line-height:1.75rem}.opencopilot-text-xs{font-size:.75rem;line-height:1rem}.opencopilot-font-medium{font-weight:500}.opencopilot-font-normal{font-weight:400}.opencopilot-font-semibold{font-weight:600}.opencopilot-lowercase{text-transform:lowercase}.opencopilot-leading-none{line-height:1}.opencopilot-leading-tight{line-height:1.25}.opencopilot-tracking-tight{letter-spacing:-.025em}.opencopilot-text-\\[\\#5e5c5e\\]{--tw-text-opacity: 1;color:rgb(94 92 94 / var(--tw-text-opacity))}.opencopilot-text-accent{color:var(--opencopilot-accent-clr)}.opencopilot-text-accent2{color:var(--opencopilot-accent-2-clr)}.opencopilot-text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.opencopilot-text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.opencopilot-text-primary{color:var(--opencopilot-primary-clr)}.opencopilot-text-rose-500{--tw-text-opacity: 1;color:rgb(244 63 94 / var(--tw-text-opacity))}.opencopilot-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.opencopilot-opacity-0{opacity:0}.opencopilot-opacity-100{opacity:1}.opencopilot-shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.opencopilot-shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.opencopilot-shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.opencopilot-outline-none{outline:2px solid transparent;outline-offset:2px}.opencopilot-ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.opencopilot-ring-\\[\\#334155\\]\\/60{--tw-ring-color: rgb(51 65 85 / .6)}.opencopilot-backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.opencopilot-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.opencopilot-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.opencopilot-transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.opencopilot-transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.opencopilot-duration-300{transition-duration:.3s}.opencopilot-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.opencopilot-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.opencopilot-animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.opencopilot-animate-out{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.opencopilot-fade-in,.opencopilot-fade-in-0{--tw-enter-opacity: 0}.opencopilot-fade-out{--tw-exit-opacity: 0}.opencopilot-slide-in-from-bottom-5{--tw-enter-translate-y: 1.25rem}.opencopilot-slide-in-from-top-1{--tw-enter-translate-y: -.25rem}.opencopilot-duration-300{animation-duration:.3s}.opencopilot-ease-in{animation-timing-function:cubic-bezier(.4,0,1,1)}.opencopilot-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.opencopilot-scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.opencopilot-scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.opencopilot-scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.opencopilot-scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.opencopilot-scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.opencopilot-scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.opencopilot-scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.opencopilot-scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.opencopilot-scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.opencopilot-scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.opencopilot-scrollbar-thin{scrollbar-width:thin}.opencopilot-scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.opencopilot-prose{color:var(--tw-prose-body);max-width:65ch}.opencopilot-prose :where(p):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.opencopilot-prose :where([class~=lead]):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.opencopilot-prose :where(a):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.opencopilot-prose :where(strong):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.opencopilot-prose :where(a strong):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(blockquote strong):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(thead th strong):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(ol):not(:where([class~=opencopilot-not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.opencopilot-prose :where(ol[type=A]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:upper-alpha}.opencopilot-prose :where(ol[type=a]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:lower-alpha}.opencopilot-prose :where(ol[type=A s]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:upper-alpha}.opencopilot-prose :where(ol[type=a s]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:lower-alpha}.opencopilot-prose :where(ol[type=I]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:upper-roman}.opencopilot-prose :where(ol[type=i]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:lower-roman}.opencopilot-prose :where(ol[type=I s]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:upper-roman}.opencopilot-prose :where(ol[type=i s]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:lower-roman}.opencopilot-prose :where(ol[type="1"]):not(:where([class~=opencopilot-not-prose] *)){list-style-type:decimal}.opencopilot-prose :where(ul):not(:where([class~=opencopilot-not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.opencopilot-prose :where(ol>li):not(:where([class~=opencopilot-not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.opencopilot-prose :where(ul>li):not(:where([class~=opencopilot-not-prose] *))::marker{color:var(--tw-prose-bullets)}.opencopilot-prose :where(hr):not(:where([class~=opencopilot-not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.opencopilot-prose :where(blockquote):not(:where([class~=opencopilot-not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.opencopilot-prose :where(blockquote p:first-of-type):not(:where([class~=opencopilot-not-prose] *)):before{content:open-quote}.opencopilot-prose :where(blockquote p:last-of-type):not(:where([class~=opencopilot-not-prose] *)):after{content:close-quote}.opencopilot-prose :where(h1):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.opencopilot-prose :where(h1 strong):not(:where([class~=opencopilot-not-prose] *)){font-weight:900;color:inherit}.opencopilot-prose :where(h2):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.opencopilot-prose :where(h2 strong):not(:where([class~=opencopilot-not-prose] *)){font-weight:800;color:inherit}.opencopilot-prose :where(h3):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.opencopilot-prose :where(h3 strong):not(:where([class~=opencopilot-not-prose] *)){font-weight:700;color:inherit}.opencopilot-prose :where(h4):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.opencopilot-prose :where(h4 strong):not(:where([class~=opencopilot-not-prose] *)){font-weight:700;color:inherit}.opencopilot-prose :where(img):not(:where([class~=opencopilot-not-prose] *)){margin-top:2em;margin-bottom:2em}.opencopilot-prose :where(figure>*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0;margin-bottom:0}.opencopilot-prose :where(figcaption):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.opencopilot-prose :where(code):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.opencopilot-prose :where(code):not(:where([class~=opencopilot-not-prose] *)):before{content:"`"}.opencopilot-prose :where(code):not(:where([class~=opencopilot-not-prose] *)):after{content:"`"}.opencopilot-prose :where(a code):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(h1 code):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(h2 code):not(:where([class~=opencopilot-not-prose] *)){color:inherit;font-size:.875em}.opencopilot-prose :where(h3 code):not(:where([class~=opencopilot-not-prose] *)){color:inherit;font-size:.9em}.opencopilot-prose :where(h4 code):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(blockquote code):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(thead th code):not(:where([class~=opencopilot-not-prose] *)){color:inherit}.opencopilot-prose :where(pre):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.opencopilot-prose :where(pre code):not(:where([class~=opencopilot-not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.opencopilot-prose :where(pre code):not(:where([class~=opencopilot-not-prose] *)):before{content:none}.opencopilot-prose :where(pre code):not(:where([class~=opencopilot-not-prose] *)):after{content:none}.opencopilot-prose :where(table):not(:where([class~=opencopilot-not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.opencopilot-prose :where(thead):not(:where([class~=opencopilot-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.opencopilot-prose :where(thead th):not(:where([class~=opencopilot-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.opencopilot-prose :where(tbody tr):not(:where([class~=opencopilot-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.opencopilot-prose :where(tbody tr:last-child):not(:where([class~=opencopilot-not-prose] *)){border-bottom-width:0}.opencopilot-prose :where(tbody td):not(:where([class~=opencopilot-not-prose] *)){vertical-align:baseline}.opencopilot-prose :where(tfoot):not(:where([class~=opencopilot-not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.opencopilot-prose :where(tfoot td):not(:where([class~=opencopilot-not-prose] *)){vertical-align:top}.opencopilot-prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.opencopilot-prose :where(video):not(:where([class~=opencopilot-not-prose] *)){margin-top:2em;margin-bottom:2em}.opencopilot-prose :where(figure):not(:where([class~=opencopilot-not-prose] *)){margin-top:2em;margin-bottom:2em}.opencopilot-prose :where(li):not(:where([class~=opencopilot-not-prose] *)){margin-top:.5em;margin-bottom:.5em}.opencopilot-prose :where(ol>li):not(:where([class~=opencopilot-not-prose] *)){padding-left:.375em}.opencopilot-prose :where(ul>li):not(:where([class~=opencopilot-not-prose] *)){padding-left:.375em}.opencopilot-prose :where(.opencopilot-prose>ul>li p):not(:where([class~=opencopilot-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.opencopilot-prose :where(.opencopilot-prose>ul>li>*:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.25em}.opencopilot-prose :where(.opencopilot-prose>ul>li>*:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:1.25em}.opencopilot-prose :where(.opencopilot-prose>ol>li>*:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.25em}.opencopilot-prose :where(.opencopilot-prose>ol>li>*:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:1.25em}.opencopilot-prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=opencopilot-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.opencopilot-prose :where(hr+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose :where(h2+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose :where(h3+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose :where(h4+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose :where(thead th:first-child):not(:where([class~=opencopilot-not-prose] *)){padding-left:0}.opencopilot-prose :where(thead th:last-child):not(:where([class~=opencopilot-not-prose] *)){padding-right:0}.opencopilot-prose :where(tbody td,tfoot td):not(:where([class~=opencopilot-not-prose] *)){padding:.5714286em}.opencopilot-prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=opencopilot-not-prose] *)){padding-left:0}.opencopilot-prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=opencopilot-not-prose] *)){padding-right:0}.opencopilot-prose :where(.opencopilot-prose>:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose :where(.opencopilot-prose>:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:0}.opencopilot-prose-sm{font-size:.875rem;line-height:1.7142857}.opencopilot-prose-sm :where(p):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.opencopilot-prose-sm :where([class~=lead]):not(:where([class~=opencopilot-not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.opencopilot-prose-sm :where(blockquote):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.1111111em}.opencopilot-prose-sm :where(h1):not(:where([class~=opencopilot-not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.opencopilot-prose-sm :where(h2):not(:where([class~=opencopilot-not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.opencopilot-prose-sm :where(h3):not(:where([class~=opencopilot-not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.opencopilot-prose-sm :where(h4):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.opencopilot-prose-sm :where(img):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.opencopilot-prose-sm :where(video):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.opencopilot-prose-sm :where(figure):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.opencopilot-prose-sm :where(figure>*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0;margin-bottom:0}.opencopilot-prose-sm :where(figcaption):not(:where([class~=opencopilot-not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.opencopilot-prose-sm :where(code):not(:where([class~=opencopilot-not-prose] *)){font-size:.8571429em}.opencopilot-prose-sm :where(h2 code):not(:where([class~=opencopilot-not-prose] *)){font-size:.9em}.opencopilot-prose-sm :where(h3 code):not(:where([class~=opencopilot-not-prose] *)){font-size:.8888889em}.opencopilot-prose-sm :where(pre):not(:where([class~=opencopilot-not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding:.6666667em 1em}.opencopilot-prose-sm :where(ol):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.opencopilot-prose-sm :where(ul):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.opencopilot-prose-sm :where(li):not(:where([class~=opencopilot-not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.opencopilot-prose-sm :where(ol>li):not(:where([class~=opencopilot-not-prose] *)){padding-left:.4285714em}.opencopilot-prose-sm :where(ul>li):not(:where([class~=opencopilot-not-prose] *)){padding-left:.4285714em}.opencopilot-prose-sm :where(.opencopilot-prose-sm>ul>li p):not(:where([class~=opencopilot-not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.opencopilot-prose-sm :where(.opencopilot-prose-sm>ul>li>*:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.1428571em}.opencopilot-prose-sm :where(.opencopilot-prose-sm>ul>li>*:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:1.1428571em}.opencopilot-prose-sm :where(.opencopilot-prose-sm>ol>li>*:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:1.1428571em}.opencopilot-prose-sm :where(.opencopilot-prose-sm>ol>li>*:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:1.1428571em}.opencopilot-prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=opencopilot-not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.opencopilot-prose-sm :where(hr):not(:where([class~=opencopilot-not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.opencopilot-prose-sm :where(hr+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose-sm :where(h2+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose-sm :where(h3+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose-sm :where(h4+*):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose-sm :where(table):not(:where([class~=opencopilot-not-prose] *)){font-size:.8571429em;line-height:1.5}.opencopilot-prose-sm :where(thead th):not(:where([class~=opencopilot-not-prose] *)){padding-right:1em;padding-bottom:.6666667em;padding-left:1em}.opencopilot-prose-sm :where(thead th:first-child):not(:where([class~=opencopilot-not-prose] *)){padding-left:0}.opencopilot-prose-sm :where(thead th:last-child):not(:where([class~=opencopilot-not-prose] *)){padding-right:0}.opencopilot-prose-sm :where(tbody td,tfoot td):not(:where([class~=opencopilot-not-prose] *)){padding:.6666667em 1em}.opencopilot-prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=opencopilot-not-prose] *)){padding-left:0}.opencopilot-prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=opencopilot-not-prose] *)){padding-right:0}.opencopilot-prose-sm :where(.opencopilot-prose-sm>:first-child):not(:where([class~=opencopilot-not-prose] *)){margin-top:0}.opencopilot-prose-sm :where(.opencopilot-prose-sm>:last-child):not(:where([class~=opencopilot-not-prose] *)){margin-bottom:0}.opencopilot-prose-slate{--tw-prose-body: #334155;--tw-prose-headings: #0f172a;--tw-prose-lead: #475569;--tw-prose-links: #0f172a;--tw-prose-bold: #0f172a;--tw-prose-counters: #64748b;--tw-prose-bullets: #cbd5e1;--tw-prose-hr: #e2e8f0;--tw-prose-quotes: #0f172a;--tw-prose-quote-borders: #e2e8f0;--tw-prose-captions: #64748b;--tw-prose-code: #0f172a;--tw-prose-pre-code: #e2e8f0;--tw-prose-pre-bg: #1e293b;--tw-prose-th-borders: #cbd5e1;--tw-prose-td-borders: #e2e8f0;--tw-prose-invert-body: #cbd5e1;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #94a3b8;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #94a3b8;--tw-prose-invert-bullets: #475569;--tw-prose-invert-hr: #334155;--tw-prose-invert-quotes: #f1f5f9;--tw-prose-invert-quote-borders: #334155;--tw-prose-invert-captions: #94a3b8;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #cbd5e1;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #475569;--tw-prose-invert-td-borders: #334155}@keyframes fade-in-bottom{0%{transform:translateY(50px);opacity:0}to{transform:translateY(0);opacity:1}}.fade-in-bottom{animation:fade-in-bottom .4s cubic-bezier(.39,.575,.565,1) both}.flex-center{display:flex;align-items:center;justify-content:center}@keyframes fade-in-top{0%{transform:translateY(-50px);opacity:0}to{transform:translateY(0);opacity:1}}.fade-in-top{animation:fade-in-top .6s cubic-bezier(.39,.575,.565,1) both}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.fade-in{animation:fade-in 1.2s cubic-bezier(.39,.575,.565,1) both}em-emoji-picker{--background-rgb: 85, 170, 255;--border-radius: 10px;--category-icon-size: 24px;--font-family: inherit;--font-size: 14px;min-height:250px;max-height:300px}.PopoverContent{transform-origin:var(--radix-popover-content-transform-origin);animation:scaleIn .5s ease-out}@keyframes scaleIn{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}.PopoverContent{animation-duration:.6s;animation-timing-function:cubic-bezier(.16,1,.3,1)}.PopoverContent[data-side=top]{animation-name:slideUp}.PopoverContent[data-side=bottom]{animation-name:slideDown}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes fade-in-right{0%{transform:translate(50px);opacity:0}to{transform:translate(0);opacity:1}}.fade-in-right{animation:fade-in-right .6s both}@keyframes scale-out-br{0%{transform:scale(1);transform-origin:100% 100%;opacity:1}to{transform:scale(0);transform-origin:100% 100%;opacity:1}}.scale-out-br{animation:scale-out-br .5s ease-in-out forwards}.placeholder\\:opencopilot-align-middle::-moz-placeholder{vertical-align:middle}.placeholder\\:opencopilot-align-middle::placeholder{vertical-align:middle}.placeholder\\:opencopilot-text-xs::-moz-placeholder{font-size:.75rem;line-height:1rem}.placeholder\\:opencopilot-text-xs::placeholder{font-size:.75rem;line-height:1rem}.last-of-type\\:opencopilot-mb-10:last-of-type{margin-bottom:2.5rem}.focus-within\\:opencopilot-ring-primary:focus-within{--tw-ring-color: var(--opencopilot-primary-clr)}.data-\\[state\\=open\\]\\:opencopilot-animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:opencopilot-animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:opencopilot-fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:opencopilot-fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:opencopilot-slide-in-from-top-0[data-state=closed]{--tw-enter-translate-y: -0px}.data-\\[state\\=open\\]\\:opencopilot-slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.prose-headings\\:opencopilot-my-1 :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=opencopilot-not-prose] *))){margin-top:.25rem;margin-bottom:.25rem}.prose-h1\\:opencopilot-font-medium :is(:where(h1):not(:where([class~=opencopilot-not-prose] *))){font-weight:500}.prose-h2\\:opencopilot-font-normal :is(:where(h2):not(:where([class~=opencopilot-not-prose] *))){font-weight:400}.hover\\:opencopilot-scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:opencopilot-shadow:hover{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:opencopilot-border-none:focus{border-style:none}.focus\\:opencopilot-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:opencopilot-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.disabled\\:opencopilot-pointer-events-none:disabled{pointer-events:none}.disabled\\:opencopilot-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opencopilot-opacity-40:disabled{opacity:.4}@media (min-width: 640px){.sm\\:opencopilot-w-96{width:24rem}.sm\\:opencopilot-flex-row{flex-direction:row}.sm\\:opencopilot-justify-end{justify-content:flex-end}.sm\\:opencopilot-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\\:opencopilot-rounded-xl{border-radius:.75rem}.sm\\:opencopilot-text-left{text-align:left}}\n',M0=x.createContext(void 0);function lk({children:e,data:t}){return L.jsx(M0.Provider,{value:t,children:e})}function Ni(){const e=x.useContext(M0);if(!e)throw new Error("useConfigData must be used within a ConfigDataProvider");return e}function ak(e){const[t,n]=x.useState(!!e),r=x.useCallback(()=>n(o=>!o),[]);return[t,r,n]}const B0=x.createContext(void 0);function U0(){const e=x.useContext(B0);if(!e)throw new Error("useAppContext must be used within an AppProvider");return e}function sk({children:e}){const t=Ni(),n=ak((t==null?void 0:t.defaultOpen)||!1);return L.jsx(B0.Provider,{value:n,children:e})}function H0(e,t){return function(){return e.apply(t,arguments)}}const{toString:uk}=Object.prototype,{getPrototypeOf:Up}=Object,Ua=(e=>t=>{const n=uk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pn=e=>(e=e.toLowerCase(),t=>Ua(t)===e),Ha=e=>t=>typeof t===e,{isArray:Eo}=Array,Ei=Ha("undefined");function ck(e){return e!==null&&!Ei(e)&&e.constructor!==null&&!Ei(e.constructor)&&zt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const W0=pn("ArrayBuffer");function pk(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&W0(e.buffer),t}const fk=Ha("string"),zt=Ha("function"),V0=Ha("number"),Wa=e=>e!==null&&typeof e=="object",dk=e=>e===!0||e===!1,Dl=e=>{if(Ua(e)!=="object")return!1;const t=Up(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},hk=pn("Date"),mk=pn("File"),gk=pn("Blob"),yk=pn("FileList"),vk=e=>Wa(e)&&zt(e.pipe),wk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||zt(e.append)&&((t=Ua(e))==="formdata"||t==="object"&&zt(e.toString)&&e.toString()==="[object FormData]"))},xk=pn("URLSearchParams"),bk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ii(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Eo(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const q0=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Y0=e=>!Ei(e)&&e!==q0;function vc(){const{caseless:e}=Y0(this)&&this||{},t={},n=(r,o)=>{const i=e&&G0(t,o)||o;Dl(t[i])&&Dl(r)?t[i]=vc(t[i],r):Dl(r)?t[i]=vc({},r):Eo(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(Ii(t,(o,i)=>{n&&zt(o)?e[i]=H0(o,n):e[i]=o},{allOwnKeys:r}),e),Sk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ck=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Ek=(e,t,n,r)=>{let o,i,l;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)l=o[i],(!r||r(l,e,t))&&!a[l]&&(t[l]=e[l],a[l]=!0);e=n!==!1&&Up(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Pk=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Tk=e=>{if(!e)return null;if(Eo(e))return e;let t=e.length;if(!V0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ok=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Up(Uint8Array)),Ak=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},$k=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},_k=pn("HTMLFormElement"),Rk=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Ud=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Lk=pn("RegExp"),Q0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ii(n,(o,i)=>{let l;(l=t(o,i,e))!==!1&&(r[i]=l||o)}),Object.defineProperties(e,r)},Dk=e=>{Q0(e,(t,n)=>{if(zt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(zt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},zk=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Eo(e)?r(e):r(String(e).split(t)),n},Nk=()=>{},Ik=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Zs="abcdefghijklmnopqrstuvwxyz",Hd="0123456789",K0={DIGIT:Hd,ALPHA:Zs,ALPHA_DIGIT:Zs+Zs.toUpperCase()+Hd},Fk=(e=16,t=K0.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function jk(e){return!!(e&&zt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Mk=e=>{const t=new Array(10),n=(r,o)=>{if(Wa(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Eo(r)?[]:{};return Ii(r,(l,a)=>{const s=n(l,o+1);!Ei(s)&&(i[a]=s)}),t[o]=void 0,i}}return r};return n(e,0)},Bk=pn("AsyncFunction"),Uk=e=>e&&(Wa(e)||zt(e))&&zt(e.then)&&zt(e.catch),D={isArray:Eo,isArrayBuffer:W0,isBuffer:ck,isFormData:wk,isArrayBufferView:pk,isString:fk,isNumber:V0,isBoolean:dk,isObject:Wa,isPlainObject:Dl,isUndefined:Ei,isDate:hk,isFile:mk,isBlob:gk,isRegExp:Lk,isFunction:zt,isStream:vk,isURLSearchParams:xk,isTypedArray:Ok,isFileList:yk,forEach:Ii,merge:vc,extend:kk,trim:bk,stripBOM:Sk,inherits:Ck,toFlatObject:Ek,kindOf:Ua,kindOfTest:pn,endsWith:Pk,toArray:Tk,forEachEntry:Ak,matchAll:$k,isHTMLForm:_k,hasOwnProperty:Ud,hasOwnProp:Ud,reduceDescriptors:Q0,freezeMethods:Dk,toObjectSet:zk,toCamelCase:Rk,noop:Nk,toFiniteNumber:Ik,findKey:G0,global:q0,isContextDefined:Y0,ALPHABET:K0,generateString:Fk,isSpecCompliantForm:jk,toJSONObject:Mk,isAsyncFn:Bk,isThenable:Uk};function de(e,t,n,r,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),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}D.inherits(de,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:D.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const X0=de.prototype,Z0={};["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=>{Z0[e]={value:e}});Object.defineProperties(de,Z0);Object.defineProperty(X0,"isAxiosError",{value:!0});de.from=(e,t,n,r,o,i)=>{const l=Object.create(X0);return D.toFlatObject(e,l,function(s){return s!==Error.prototype},a=>a!=="isAxiosError"),de.call(l,e.message,t,n,r,o),l.cause=e,l.name=e.name,i&&Object.assign(l,i),l};const Hk=null;function wc(e){return D.isPlainObject(e)||D.isArray(e)}function J0(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function Wd(e,t,n){return e?e.concat(t).map(function(o,i){return o=J0(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Wk(e){return D.isArray(e)&&!e.some(wc)}const Vk=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function Va(e,t,n){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,w){return!D.isUndefined(w[m])});const r=n.metaTokens,o=n.visitor||c,i=n.dots,l=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(o))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(D.isDate(h))return h.toISOString();if(!s&&D.isBlob(h))throw new de("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(h)||D.isTypedArray(h)?s&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,m,w){let g=h;if(h&&!w&&typeof h=="object"){if(D.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(D.isArray(h)&&Wk(h)||(D.isFileList(h)||D.endsWith(m,"[]"))&&(g=D.toArray(h)))return m=J0(m),g.forEach(function(v,C){!(D.isUndefined(v)||v===null)&&t.append(l===!0?Wd([m],C,i):l===null?m:m+"[]",u(v))}),!1}return wc(h)?!0:(t.append(Wd(w,m,i),u(h)),!1)}const p=[],d=Object.assign(Vk,{defaultVisitor:c,convertValue:u,isVisitable:wc});function f(h,m){if(!D.isUndefined(h)){if(p.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(h),D.forEach(h,function(g,y){(!(D.isUndefined(g)||g===null)&&o.call(t,g,D.isString(y)?y.trim():y,m,d))===!0&&f(g,m?m.concat(y):[y])}),p.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return f(e),t}function Vd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Hp(e,t){this._pairs=[],e&&Va(e,this,t)}const e1=Hp.prototype;e1.append=function(t,n){this._pairs.push([t,n])};e1.toString=function(t){const n=t?function(r){return t.call(this,r,Vd)}:Vd;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Gk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function t1(e,t,n){if(!t)return e;const r=n&&n.encode||Gk,o=n&&n.serialize;let i;if(o?i=o(t,n):i=D.isURLSearchParams(t)?t.toString():new Hp(t,n).toString(r),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class qk{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Gd=qk,n1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yk=typeof URLSearchParams<"u"?URLSearchParams:Hp,Qk=typeof FormData<"u"?FormData:null,Kk=typeof Blob<"u"?Blob:null,Xk=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Zk=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),ln={isBrowser:!0,classes:{URLSearchParams:Yk,FormData:Qk,Blob:Kk},isStandardBrowserEnv:Xk,isStandardBrowserWebWorkerEnv:Zk,protocols:["http","https","file","blob","url","data"]};function Jk(e,t){return Va(e,new ln.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return ln.isNode&&D.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function eS(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function tS(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return l=!l&&D.isArray(o)?o.length:l,s?(D.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!a):((!o[l]||!D.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],i)&&D.isArray(o[l])&&(o[l]=tS(o[l])),!a)}if(D.isFormData(e)&&D.isFunction(e.entries)){const n={};return D.forEachEntry(e,(r,o)=>{t(eS(r),o,n,0)}),n}return null}function nS(e,t,n){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Wp={transitional:n1,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=D.isObject(t);if(i&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return o&&o?JSON.stringify(r1(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Jk(t,this.formSerializer).toString();if((a=D.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Va(a?{"files[]":t}:t,s&&new s,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),nS(t)):t}],transformResponse:[function(t){const n=this.transitional||Wp.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&D.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(l)throw a.name==="SyntaxError"?de.from(a,de.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ln.classes.FormData,Blob:ln.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],e=>{Wp.headers[e]={}});const Vp=Wp,rS=D.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"]),oS=e=>{const t={};let n,r,o;return e&&e.split(` +`).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!n||t[n]&&rS[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},qd=Symbol("internals");function Bo(e){return e&&String(e).trim().toLowerCase()}function zl(e){return e===!1||e==null?e:D.isArray(e)?e.map(zl):String(e)}function iS(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const lS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Js(e,t,n,r,o){if(D.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!D.isString(t)){if(D.isString(r))return t.indexOf(r)!==-1;if(D.isRegExp(r))return r.test(t)}}function aS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function sS(e,t){const n=D.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,l){return this[r].call(this,t,o,i,l)},configurable:!0})})}class Ga{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(a,s,u){const c=Bo(s);if(!c)throw new Error("header name must be a non-empty string");const p=D.findKey(o,c);(!p||o[p]===void 0||u===!0||u===void 0&&o[p]!==!1)&&(o[p||s]=zl(a))}const l=(a,s)=>D.forEach(a,(u,c)=>i(u,c,s));return D.isPlainObject(t)||t instanceof this.constructor?l(t,n):D.isString(t)&&(t=t.trim())&&!lS(t)?l(oS(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=Bo(t),t){const r=D.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return iS(o);if(D.isFunction(n))return n.call(this,o,r);if(D.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Bo(t),t){const r=D.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Js(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(l){if(l=Bo(l),l){const a=D.findKey(r,l);a&&(!n||Js(r,r[a],a,n))&&(delete r[a],o=!0)}}return D.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Js(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return D.forEach(this,(o,i)=>{const l=D.findKey(r,i);if(l){n[l]=zl(o),delete n[i];return}const a=t?aS(i):String(i).trim();a!==i&&delete n[i],n[a]=zl(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return D.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&D.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[qd]=this[qd]={accessors:{}}).accessors,o=this.prototype;function i(l){const a=Bo(l);r[a]||(sS(o,l),r[a]=!0)}return D.isArray(t)?t.forEach(i):i(t),this}}Ga.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(Ga.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});D.freezeMethods(Ga);const Sn=Ga;function eu(e,t){const n=this||Vp,r=t||n,o=Sn.from(r.headers);let i=r.data;return D.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function o1(e){return!!(e&&e.__CANCEL__)}function Fi(e,t,n){de.call(this,e??"canceled",de.ERR_CANCELED,t,n),this.name="CanceledError"}D.inherits(Fi,de,{__CANCEL__:!0});function uS(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new de("Request failed with status code "+n.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const cS=ln.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,l,a){const s=[];s.push(n+"="+encodeURIComponent(r)),D.isNumber(o)&&s.push("expires="+new Date(o).toGMTString()),D.isString(i)&&s.push("path="+i),D.isString(l)&&s.push("domain="+l),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function pS(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fS(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function i1(e,t){return e&&!pS(t)?fS(e,t):t}const dS=ln.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let l=i;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(l){const a=D.isString(l)?o(l):l;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function hS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function mS(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,l;return t=t!==void 0?t:1e3,function(s){const u=Date.now(),c=r[i];l||(l=u),n[o]=s,r[o]=u;let p=i,d=0;for(;p!==o;)d+=n[p++],p=p%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-l{const i=o.loaded,l=o.lengthComputable?o.total:void 0,a=i-n,s=r(a),u=i<=l;n=i;const c={loaded:i,total:l,progress:l?i/l:void 0,bytes:a,rate:s||void 0,estimated:s&&l&&u?(l-i)/s:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const gS=typeof XMLHttpRequest<"u",yS=gS&&function(e){return new Promise(function(n,r){let o=e.data;const i=Sn.from(e.headers).normalize(),l=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}let u;D.isFormData(o)&&(ln.isStandardBrowserEnv||ln.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?D.isString(u=i.getContentType())&&i.setContentType(u.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let c=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(h+":"+m))}const p=i1(e.baseURL,e.url);c.open(e.method.toUpperCase(),t1(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function d(){if(!c)return;const h=Sn.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),w={data:!l||l==="text"||l==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:h,config:e,request:c};uS(function(y){n(y),s()},function(y){r(y),s()},w),c=null}if("onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(r(new de("Request aborted",de.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new de("Network Error",de.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const w=e.transitional||n1;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new de(m,w.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,c)),c=null},ln.isStandardBrowserEnv){const h=dS(p)&&e.xsrfCookieName&&cS.read(e.xsrfCookieName);h&&i.set(e.xsrfHeaderName,h)}o===void 0&&i.setContentType(null),"setRequestHeader"in c&&D.forEach(i.toJSON(),function(m,w){c.setRequestHeader(w,m)}),D.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),l&&l!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",Yd(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Yd(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=h=>{c&&(r(!h||h.type?new Fi(null,e,c):h),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=hS(p);if(f&&ln.protocols.indexOf(f)===-1){r(new de("Unsupported protocol "+f+":",de.ERR_BAD_REQUEST,e));return}c.send(o||null)})},xc={http:Hk,xhr:yS};D.forEach(xc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Qd=e=>`- ${e}`,vS=e=>D.isFunction(e)||e===null||e===!1,l1={getAdapter:e=>{e=D.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${a} `+(s===!1?"is not supported by the environment":"is not available in the build"));let l=t?i.length>1?`since : +`+i.map(Qd).join(` +`):" "+Qd(i[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:xc};function tu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fi(null,e)}function Kd(e){return tu(e),e.headers=Sn.from(e.headers),e.data=eu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),l1.getAdapter(e.adapter||Vp.adapter)(e).then(function(r){return tu(e),r.data=eu.call(e,e.transformResponse,r),r.headers=Sn.from(r.headers),r},function(r){return o1(r)||(tu(e),r&&r.response&&(r.response.data=eu.call(e,e.transformResponse,r.response),r.response.headers=Sn.from(r.response.headers))),Promise.reject(r)})}const Xd=e=>e instanceof Sn?e.toJSON():e;function yo(e,t){t=t||{};const n={};function r(u,c,p){return D.isPlainObject(u)&&D.isPlainObject(c)?D.merge.call({caseless:p},u,c):D.isPlainObject(c)?D.merge({},c):D.isArray(c)?c.slice():c}function o(u,c,p){if(D.isUndefined(c)){if(!D.isUndefined(u))return r(void 0,u,p)}else return r(u,c,p)}function i(u,c){if(!D.isUndefined(c))return r(void 0,c)}function l(u,c){if(D.isUndefined(c)){if(!D.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,p){if(p in t)return r(u,c);if(p in e)return r(void 0,u)}const s={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:a,headers:(u,c)=>o(Xd(u),Xd(c),!0)};return D.forEach(Object.keys(Object.assign({},e,t)),function(c){const p=s[c]||o,d=p(e[c],t[c],c);D.isUndefined(d)&&p!==a||(n[c]=d)}),n}const a1="1.6.0",Gp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Zd={};Gp.transitional=function(t,n,r){function o(i,l){return"[Axios v"+a1+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,a)=>{if(t===!1)throw new de(o(l," has been removed"+(n?" in "+n:"")),de.ERR_DEPRECATED);return n&&!Zd[l]&&(Zd[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,a):!0}};function wS(e,t,n){if(typeof e!="object")throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],l=t[i];if(l){const a=e[i],s=a===void 0||l(a,i,e);if(s!==!0)throw new de("option "+i+" must be "+s,de.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new de("Unknown option "+i,de.ERR_BAD_OPTION)}}const bc={assertOptions:wS,validators:Gp},In=bc.validators;class ha{constructor(t){this.defaults=t,this.interceptors={request:new Gd,response:new Gd}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=yo(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&bc.assertOptions(r,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean)},!1),o!=null&&(D.isFunction(o)?n.paramsSerializer={serialize:o}:bc.assertOptions(o,{encode:In.function,serialize:In.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&D.merge(i.common,i[n.method]);i&&D.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=Sn.concat(l,i);const a=[];let s=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(s=s&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,p=0,d;if(!s){const h=[Kd.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,u),d=h.length,c=Promise.resolve(n);p{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const l=new Promise(a=>{r.subscribe(a),i=a}).then(o);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,a){r.reason||(r.reason=new Fi(i,l,a),n(r.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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new qp(function(o){t=o}),cancel:t}}}const xS=qp;function bS(e){return function(n){return e.apply(null,n)}}function kS(e){return D.isObject(e)&&e.isAxiosError===!0}const kc={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(kc).forEach(([e,t])=>{kc[t]=e});const SS=kc;function s1(e){const t=new Nl(e),n=H0(Nl.prototype.request,t);return D.extend(n,Nl.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return s1(yo(e,o))},n}const We=s1(Vp);We.Axios=Nl;We.CanceledError=Fi;We.CancelToken=xS;We.isCancel=o1;We.VERSION=a1;We.toFormData=Va;We.AxiosError=de;We.Cancel=We.CanceledError;We.all=function(t){return Promise.all(t)};We.spread=bS;We.isAxiosError=kS;We.mergeConfig=yo;We.AxiosHeaders=Sn;We.formToJSON=e=>r1(D.isHTMLForm(e)?new FormData(e):e);We.getAdapter=l1.getAdapter;We.HttpStatusCode=SS;We.default=We;const CS=We;function ES(e=10){return Math.random().toString(36).substring(2,e+2)}function PS(e){const[t,n]=x.useState(sessionStorage.getItem(e)||ES());return x.useEffect(()=>{sessionStorage.setItem(e,t)},[t,e]),{sessionId:t,setSessionId:n}}function TS(e,t,n){const r=CS.create({baseURL:e,headers:{"X-Session-Id":t,"X-Bot-Token":n}});return r.interceptors.request.use(o=>(o.data={...o.data,session_id:t},o)),r}const u1=x.createContext(void 0);function OS({children:e}){const t=Ni(),{sessionId:n}=PS((t==null?void 0:t.token)||"defaultToken"),r=TS(t==null?void 0:t.apiUrl,n,t==null?void 0:t.token);return L.jsx(u1.Provider,{value:{axiosInstance:r},children:e})}const c1=()=>{const e=x.useContext(u1);if(!e)throw new Error("useAxiosInstance must be used within a AxiosProvider");return e},p1=x.createContext({});function AS({children:e}){const{axiosInstance:t}=c1(),[n,r]=x.useState(),[o,i]=x.useState(!0);async function l(){i(!0),t.get("/chat/init").then(({data:a})=>r(a)).finally(()=>i(!1))}return x.useEffect(()=>{l()},[]),L.jsx(p1.Provider,{value:{data:n,loading:o,refetch:l},children:e})}const Yp=()=>{const e=x.useContext(p1);return e||console.warn("Error loading initial data...."),e};function $S({children:e,options:t}){return L.jsx(lk,{data:t,children:L.jsx(sk,{children:L.jsx(OS,{children:L.jsx(AS,{children:e})})})})}function _S(){for(var e=0,t,n,r="";ee&&(t=0,r=n,n=new Map)}return{get:function(l){var a=n.get(l);if(a!==void 0)return a;if((a=r.get(l))!==void 0)return o(l,a),a},set:function(l,a){n.has(l)?n.set(l,a):o(l,a)}}}var h1="!";function FS(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(l){for(var a=[],s=0,u=0,c,p=0;pu?c-u:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:w}}}function jS(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var o=r[0]==="[";o?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function MS(e){return{cache:IS(e.cacheSize),splitModifiers:FS(e),...RS(e)}}var BS=/\s+/;function US(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(BS).map(function(l){var a=n(l),s=a.modifiers,u=a.hasImportantModifier,c=a.baseClassName,p=a.maybePostfixModifierPosition,d=r(p?c.substring(0,p):c),f=!!p;if(!d){if(!p)return{isTailwindClass:!1,originalClassName:l};if(d=r(c),!d)return{isTailwindClass:!1,originalClassName:l};f=!1}var h=jS(s).join(":"),m=u?h+h1:h;return{isTailwindClass:!0,modifierId:m,classGroupId:d,originalClassName:l,hasPostfixModifier:f}}).reverse().filter(function(l){if(!l.isTailwindClass)return!0;var a=l.modifierId,s=l.classGroupId,u=l.hasPostfixModifier,c=a+s;return i.has(c)?!1:(i.add(c),o(s,u).forEach(function(p){return i.add(a+p)}),!0)}).reverse().map(function(l){return l.originalClassName}).join(" ")}function HS(){for(var e=arguments.length,t=new Array(e),n=0;ne.forEach(n=>s2(n,t))}function Jt(...e){return x.useCallback(w1(...e),e)}function Kp(e,t=[]){let n=[];function r(i,l){const a=x.createContext(l),s=n.length;n=[...n,l];function u(p){const{scope:d,children:f,...h}=p,m=(d==null?void 0:d[e][s])||a,w=x.useMemo(()=>h,Object.values(h));return x.createElement(m.Provider,{value:w},f)}function c(p,d){const f=(d==null?void 0:d[e][s])||a,h=x.useContext(f);if(h)return h;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const o=()=>{const i=n.map(l=>x.createContext(l));return function(a){const s=(a==null?void 0:a[e])||i;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:s}}),[a,s])}};return o.scopeName=e,[r,u2(o,...t)]}function u2(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const l=r.reduce((a,{useScope:s,scopeName:u})=>{const p=s(i)[`__scope${u}`];return{...a,...p}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}const vo=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},c2=Qw["useId".toString()]||(()=>{});let p2=0;function Il(e){const[t,n]=x.useState(c2());return vo(()=>{e||n(r=>r??String(p2++))},[e]),e||(t?`radix-${t}`:"")}function un(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function x1({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=f2({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,a=un(n),s=x.useCallback(u=>{if(i){const p=typeof u=="function"?u(e):u;p!==e&&a(p)}else o(u)},[i,e,o,a]);return[l,s]}function f2({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,o=x.useRef(r),i=un(t);return x.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}const Xp=x.forwardRef((e,t)=>{const{children:n,...r}=e,o=x.Children.toArray(n),i=o.find(d2);if(i){const l=i.props.children,a=o.map(s=>s===i?x.Children.count(l)>1?x.Children.only(null):x.isValidElement(l)?l.props.children:null:s);return x.createElement(Ec,ge({},r,{ref:t}),x.isValidElement(l)?x.cloneElement(l,void 0,a):null)}return x.createElement(Ec,ge({},r,{ref:t}),n)});Xp.displayName="Slot";const Ec=x.forwardRef((e,t)=>{const{children:n,...r}=e;return x.isValidElement(n)?x.cloneElement(n,{...h2(r,n.props),ref:t?w1(t,n.ref):n.ref}):x.Children.count(n)>1?x.Children.only(null):null});Ec.displayName="SlotClone";const b1=({children:e})=>x.createElement(x.Fragment,null,e);function d2(e){return x.isValidElement(e)&&e.type===b1}function h2(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const m2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ot=m2.reduce((e,t)=>{const n=x.forwardRef((r,o)=>{const{asChild:i,...l}=r,a=i?Xp:t;return x.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),x.createElement(a,ge({},l,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function k1(e,t){e&&Ba.flushSync(()=>e.dispatchEvent(t))}function S1(e,t=globalThis==null?void 0:globalThis.document){const n=un(e);x.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Pc="dismissableLayer.update",g2="dismissableLayer.pointerDownOutside",y2="dismissableLayer.focusOutside";let rh;const v2=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),w2=x.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:a,onDismiss:s,...u}=e,c=x.useContext(v2),[p,d]=x.useState(null),f=(n=p==null?void 0:p.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=x.useState({}),m=Jt(t,O=>d(O)),w=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(g),v=p?w.indexOf(p):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,E=v>=y,k=x2(O=>{const N=O.target,P=[...c.branches].some(_=>_.contains(N));!E||P||(i==null||i(O),a==null||a(O),O.defaultPrevented||s==null||s())},f),T=b2(O=>{const N=O.target;[...c.branches].some(_=>_.contains(N))||(l==null||l(O),a==null||a(O),O.defaultPrevented||s==null||s())},f);return S1(O=>{v===c.layers.size-1&&(o==null||o(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},f),x.useEffect(()=>{if(p)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(rh=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(p)),c.layers.add(p),oh(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=rh)}},[p,f,r,c]),x.useEffect(()=>()=>{p&&(c.layers.delete(p),c.layersWithOutsidePointerEventsDisabled.delete(p),oh())},[p,c]),x.useEffect(()=>{const O=()=>h({});return document.addEventListener(Pc,O),()=>document.removeEventListener(Pc,O)},[]),x.createElement(Ot.div,ge({},u,{ref:m,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:Xe(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Xe(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Xe(e.onPointerDownCapture,k.onPointerDownCapture)}))});function x2(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let c=function(){C1(g2,n,u,{discrete:!0})};var s=c;const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function b2(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=x.useRef(!1);return x.useEffect(()=>{const o=i=>{i.target&&!r.current&&C1(y2,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function oh(){const e=new CustomEvent(Pc);document.dispatchEvent(e)}function C1(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?k1(o,i):o.dispatchEvent(i)}const nu="focusScope.autoFocusOnMount",ru="focusScope.autoFocusOnUnmount",ih={bubbles:!1,cancelable:!0},k2=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[a,s]=x.useState(null),u=un(o),c=un(i),p=x.useRef(null),d=Jt(t,m=>s(m)),f=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let y=function(k){if(f.paused||!a)return;const T=k.target;a.contains(T)?p.current=T:Mn(p.current,{select:!0})},v=function(k){if(f.paused||!a)return;const T=k.relatedTarget;T!==null&&(a.contains(T)||Mn(p.current,{select:!0}))},C=function(k){if(document.activeElement===document.body)for(const O of k)O.removedNodes.length>0&&Mn(a)};var m=y,w=v,g=C;document.addEventListener("focusin",y),document.addEventListener("focusout",v);const E=new MutationObserver(C);return a&&E.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",v),E.disconnect()}}},[r,a,f.paused]),x.useEffect(()=>{if(a){ah.add(f);const m=document.activeElement;if(!a.contains(m)){const g=new CustomEvent(nu,ih);a.addEventListener(nu,u),a.dispatchEvent(g),g.defaultPrevented||(S2(O2(E1(a)),{select:!0}),document.activeElement===m&&Mn(a))}return()=>{a.removeEventListener(nu,u),setTimeout(()=>{const g=new CustomEvent(ru,ih);a.addEventListener(ru,c),a.dispatchEvent(g),g.defaultPrevented||Mn(m??document.body,{select:!0}),a.removeEventListener(ru,c),ah.remove(f)},0)}}},[a,u,c,f]);const h=x.useCallback(m=>{if(!n&&!r||f.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,g=document.activeElement;if(w&&g){const y=m.currentTarget,[v,C]=C2(y);v&&C?!m.shiftKey&&g===C?(m.preventDefault(),n&&Mn(v,{select:!0})):m.shiftKey&&g===v&&(m.preventDefault(),n&&Mn(C,{select:!0})):g===y&&m.preventDefault()}},[n,r,f.paused]);return x.createElement(Ot.div,ge({tabIndex:-1},l,{ref:d,onKeyDown:h}))});function S2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Mn(r,{select:t}),document.activeElement!==n)return}function C2(e){const t=E1(e),n=lh(t,e),r=lh(t.reverse(),e);return[n,r]}function E1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function lh(e,t){for(const n of e)if(!E2(n,{upTo:t}))return n}function E2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function P2(e){return e instanceof HTMLInputElement&&"select"in e}function Mn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&P2(e)&&t&&e.select()}}const ah=T2();function T2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=sh(e,t),e.unshift(t)},remove(t){var n;e=sh(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function sh(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function O2(e){return e.filter(t=>t.tagName!=="A")}function A2(e,t){return x.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const qa=e=>{const{present:t,children:n}=e,r=$2(t),o=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),i=Jt(r.ref,o.ref);return typeof n=="function"||r.isPresent?x.cloneElement(o,{ref:i}):null};qa.displayName="Presence";function $2(e){const[t,n]=x.useState(),r=x.useRef({}),o=x.useRef(e),i=x.useRef("none"),l=e?"mounted":"unmounted",[a,s]=A2(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const u=pl(r.current);i.current=a==="mounted"?u:"none"},[a]),vo(()=>{const u=r.current,c=o.current;if(c!==e){const d=i.current,f=pl(u);e?s("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?s("UNMOUNT"):s(c&&d!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,s]),vo(()=>{if(t){const u=p=>{const f=pl(r.current).includes(p.animationName);p.target===t&&f&&Ba.flushSync(()=>s("ANIMATION_END"))},c=p=>{p.target===t&&(i.current=pl(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function pl(e){return(e==null?void 0:e.animationName)||"none"}let ou=0;function _2(){x.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:uh()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:uh()),ou++,()=>{ou===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),ou--}},[])}function uh(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var on=function(){return on=Object.assign||function(t){for(var n,r=1,o=arguments.length;r"u")return Y2;var t=Q2(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},X2=A1(),Z2=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,a=e.gap;return n===void 0&&(n="margin"),` + .`.concat(L2,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; } @@ -76,12 +76,12 @@ Error generating stack: `+i.message+` } body { - `).concat(z2,": ").concat(a,`px; + `).concat(D2,": ").concat(a,`px; } -`)},eC=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=x.useMemo(function(){return X2(o)},[o]);return x.createElement(Z2,{styles:J2(i,!t,o,n?"":"!important")})},Oc=!1;if(typeof window<"u")try{var fl=Object.defineProperty({},"passive",{get:function(){return Oc=!0,!0}});window.addEventListener("test",fl,fl),window.removeEventListener("test",fl,fl)}catch{Oc=!1}var Fr=Oc?{passive:!1}:!1,tC=function(e){return e.tagName==="TEXTAREA"},_1=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!tC(e)&&n[t]==="visible")},nC=function(e){return _1(e,"overflowY")},rC=function(e){return _1(e,"overflowX")},fh=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=R1(e,n);if(r){var o=L1(e,n),i=o[1],l=o[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},oC=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},iC=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},R1=function(e,t){return e==="v"?nC(t):rC(t)},L1=function(e,t){return e==="v"?oC(t):iC(t)},lC=function(e,t){return e==="h"&&t==="rtl"?-1:1},aC=function(e,t,n,r,o){var i=lC(e,window.getComputedStyle(t).direction),l=i*r,a=n.target,s=t.contains(a),u=!1,c=l>0,p=0,d=0;do{var f=L1(e,a),h=f[0],m=f[1],w=f[2],g=m-w-i*h;(h||g)&&R1(e,a)&&(p+=g,d+=h),a=a.parentNode}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&(o&&p===0||!o&&l>p)||!c&&(o&&d===0||!o&&-l>d))&&(u=!0),u},dl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dh=function(e){return[e.deltaX,e.deltaY]},hh=function(e){return e&&"current"in e?e.current:e},sC=function(e,t){return e[0]===t[0]&&e[1]===t[1]},uC=function(e){return` +`)},J2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=x.useMemo(function(){return K2(o)},[o]);return x.createElement(X2,{styles:Z2(i,!t,o,n?"":"!important")})},Tc=!1;if(typeof window<"u")try{var fl=Object.defineProperty({},"passive",{get:function(){return Tc=!0,!0}});window.addEventListener("test",fl,fl),window.removeEventListener("test",fl,fl)}catch{Tc=!1}var Fr=Tc?{passive:!1}:!1,eC=function(e){return e.tagName==="TEXTAREA"},$1=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!eC(e)&&n[t]==="visible")},tC=function(e){return $1(e,"overflowY")},nC=function(e){return $1(e,"overflowX")},ph=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=_1(e,n);if(r){var o=R1(e,n),i=o[1],l=o[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},rC=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},oC=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_1=function(e,t){return e==="v"?tC(t):nC(t)},R1=function(e,t){return e==="v"?rC(t):oC(t)},iC=function(e,t){return e==="h"&&t==="rtl"?-1:1},lC=function(e,t,n,r,o){var i=iC(e,window.getComputedStyle(t).direction),l=i*r,a=n.target,s=t.contains(a),u=!1,c=l>0,p=0,d=0;do{var f=R1(e,a),h=f[0],m=f[1],w=f[2],g=m-w-i*h;(h||g)&&_1(e,a)&&(p+=g,d+=h),a=a.parentNode}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&(o&&p===0||!o&&l>p)||!c&&(o&&d===0||!o&&-l>d))&&(u=!0),u},dl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fh=function(e){return[e.deltaX,e.deltaY]},dh=function(e){return e&&"current"in e?e.current:e},aC=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sC=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},cC=0,jr=[];function pC(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),o=x.useState(cC++)[0],i=x.useState(function(){return $1()})[0],l=x.useRef(e);x.useEffect(function(){l.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=L2([e.lockRef.current],(e.shards||[]).map(hh),!0).filter(Boolean);return m.forEach(function(w){return w.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=x.useCallback(function(m,w){if("touches"in m&&m.touches.length===2)return!l.current.allowPinchZoom;var g=dl(m),y=n.current,v="deltaX"in m?m.deltaX:y[0]-g[0],C="deltaY"in m?m.deltaY:y[1]-g[1],E,k=m.target,T=Math.abs(v)>Math.abs(C)?"h":"v";if("touches"in m&&T==="h"&&k.type==="range")return!1;var O=fh(T,k);if(!O)return!0;if(O?E=T:(E=T==="v"?"h":"v",O=fh(T,k)),!O)return!1;if(!r.current&&"changedTouches"in m&&(v||C)&&(r.current=E),!E)return!0;var N=r.current||E;return aC(N,w,m,N==="h"?v:C,!0)},[]),s=x.useCallback(function(m){var w=m;if(!(!jr.length||jr[jr.length-1]!==i)){var g="deltaY"in w?dh(w):dl(w),y=t.current.filter(function(E){return E.name===w.type&&E.target===w.target&&sC(E.delta,g)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var v=(l.current.shards||[]).map(hh).filter(Boolean).filter(function(E){return E.contains(w.target)}),C=v.length>0?a(w,v[0]):!l.current.noIsolation;C&&w.cancelable&&w.preventDefault()}}},[]),u=x.useCallback(function(m,w,g,y){var v={name:m,delta:w,target:g,should:y};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(C){return C!==v})},1)},[]),c=x.useCallback(function(m){n.current=dl(m),r.current=void 0},[]),p=x.useCallback(function(m){u(m.type,dh(m),m.target,a(m,e.lockRef.current))},[]),d=x.useCallback(function(m){u(m.type,dl(m),m.target,a(m,e.lockRef.current))},[]);x.useEffect(function(){return jr.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:d}),document.addEventListener("wheel",s,Fr),document.addEventListener("touchmove",s,Fr),document.addEventListener("touchstart",c,Fr),function(){jr=jr.filter(function(m){return m!==i}),document.removeEventListener("wheel",s,Fr),document.removeEventListener("touchmove",s,Fr),document.removeEventListener("touchstart",c,Fr)}},[]);var f=e.removeScrollBar,h=e.inert;return x.createElement(x.Fragment,null,h?x.createElement(i,{styles:uC(o)}):null,f?x.createElement(eC,{gapMode:"margin"}):null)}const fC=U2(A1,pC);var D1=x.forwardRef(function(e,t){return x.createElement(Ya,on({},e,{ref:t,sideCar:fC}))});D1.classNames=Ya.classNames;const dC=D1;var hC=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mr=new WeakMap,hl=new WeakMap,ml={},au=0,z1=function(e){return e&&(e.host||z1(e.parentNode))},mC=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=z1(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},gC=function(e,t,n,r){var o=mC(t,Array.isArray(e)?e:[e]);ml[n]||(ml[n]=new WeakMap);var i=ml[n],l=[],a=new Set,s=new Set(o),u=function(p){!p||a.has(p)||(a.add(p),u(p.parentNode))};o.forEach(u);var c=function(p){!p||s.has(p)||Array.prototype.forEach.call(p.children,function(d){if(a.has(d))c(d);else{var f=d.getAttribute(r),h=f!==null&&f!=="false",m=(Mr.get(d)||0)+1,w=(i.get(d)||0)+1;Mr.set(d,m),i.set(d,w),l.push(d),m===1&&h&&hl.set(d,!0),w===1&&d.setAttribute(n,"true"),h||d.setAttribute(r,"true")}})};return c(t),a.clear(),au++,function(){l.forEach(function(p){var d=Mr.get(p)-1,f=i.get(p)-1;Mr.set(p,d),i.set(p,f),d||(hl.has(p)||p.removeAttribute(r),hl.delete(p)),f||p.removeAttribute(n)}),au--,au||(Mr=new WeakMap,Mr=new WeakMap,hl=new WeakMap,ml={})}},yC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||hC(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),gC(r,o,n,"aria-hidden")):function(){return null}};const N1="Dialog",[I1,v_]=Xp(N1),[vC,fn]=I1(N1),wC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:l=!0}=e,a=x.useRef(null),s=x.useRef(null),[u=!1,c]=b1({prop:r,defaultProp:o,onChange:i});return x.createElement(vC,{scope:t,triggerRef:a,contentRef:s,contentId:Il(),titleId:Il(),descriptionId:Il(),open:u,onOpenChange:c,onOpenToggle:x.useCallback(()=>c(p=>!p),[c]),modal:l},n)},xC="DialogTrigger",bC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(xC,n),i=Jt(t,o.triggerRef);return x.createElement(Ot.button,ge({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Jp(o.open)},r,{ref:i,onClick:Xe(e.onClick,o.onOpenToggle)}))}),kC="DialogPortal",[w_,F1]=I1(kC,{forceMount:void 0}),Ac="DialogOverlay",SC=x.forwardRef((e,t)=>{const n=F1(Ac,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=fn(Ac,e.__scopeDialog);return i.modal?x.createElement(qa,{present:r||i.open},x.createElement(CC,ge({},o,{ref:t}))):null}),CC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(Ac,n);return x.createElement(dC,{as:Zp,allowPinchZoom:!0,shards:[o.contentRef]},x.createElement(Ot.div,ge({"data-state":Jp(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Pi="DialogContent",EC=x.forwardRef((e,t)=>{const n=F1(Pi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=fn(Pi,e.__scopeDialog);return x.createElement(qa,{present:r||i.open},i.modal?x.createElement(PC,ge({},o,{ref:t})):x.createElement(TC,ge({},o,{ref:t})))}),PC=x.forwardRef((e,t)=>{const n=fn(Pi,e.__scopeDialog),r=x.useRef(null),o=Jt(t,n.contentRef,r);return x.useEffect(()=>{const i=r.current;if(i)return yC(i)},[]),x.createElement(j1,ge({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xe(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),(l=n.triggerRef.current)===null||l===void 0||l.focus()}),onPointerDownOutside:Xe(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0;(l.button===2||a)&&i.preventDefault()}),onFocusOutside:Xe(e.onFocusOutside,i=>i.preventDefault())}))}),TC=x.forwardRef((e,t)=>{const n=fn(Pi,e.__scopeDialog),r=x.useRef(!1),o=x.useRef(!1);return x.createElement(j1,ge({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var l;if((l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var l,a;(l=e.onInteractOutside)===null||l===void 0||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),j1=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...l}=e,a=fn(Pi,n),s=x.useRef(null),u=Jt(t,s);return R2(),x.createElement(x.Fragment,null,x.createElement(S2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},x.createElement(x2,ge({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Jp(a.open)},l,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),OC="DialogTitle",AC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(OC,n);return x.createElement(Ot.h2,ge({id:o.titleId},r,{ref:t}))}),$C="DialogDescription",_C=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn($C,n);return x.createElement(Ot.p,ge({id:o.descriptionId},r,{ref:t}))}),RC="DialogClose",LC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(RC,n);return x.createElement(Ot.button,ge({type:"button"},r,{ref:t,onClick:Xe(e.onClick,()=>o.onOpenChange(!1))}))});function Jp(e){return e?"open":"closed"}const DC=wC,zC=bC,NC=SC,M1=EC,B1=AC,U1=_C,IC=LC,FC=DC,mh=IC,jC=zC,MC=NC,H1=x.forwardRef(({className:e,children:t,...n},r)=>L.jsx(MC,{className:"opencopilot-absolute opencopilot-inset-0 opencopilot-z-50 opencopilot-bg-black/50 opencopilot-backdrop-blur-sm data-[state=open]:opencopilot-animate-in data-[state=closed]:opencopilot-animate-out data-[state=closed]:opencopilot-fade-out-0 data-[state=open]:opencopilot-fade-in-0",children:L.jsx(M1,{ref:r,className:On("opencopilot-rounded-t-lg opencopilot-z-[100] opencopilot-absolute opencopilot-bottom-0 opencopilot-duration-300 opencopilot-w-full opencopilot-grid opencopilot-max-w-lg opencopilot-bg-white opencopilot-gap-4 opencopilot-shadow-lg opencopilot-p-6 opencopilot-animate-in data-[state=closed]:opencopilot-animate-out data-[state=closed]:opencopilot-fade-out-0 data-[state=open]:opencopilot-fade-in-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:opencopilot-slide-in-from-bottom",e),...n,children:t})}));H1.displayName=M1.displayName;const W1=({className:e,...t})=>L.jsx("div",{className:On("opencopilot-flex opencopilot-flex-col opencopilot-space-y-1.5 opencopilot-text-center sm:opencopilot-text-left",e),...t});W1.displayName="DialogHeader";const BC=x.forwardRef(({className:e,...t},n)=>L.jsx(B1,{ref:n,className:On("opencopilot-text-lg opencopilot-font-semibold opencopilot-leading-none opencopilot-tracking-tight",e),...t}));BC.displayName=B1.displayName;const UC=x.forwardRef(({className:e,...t},n)=>L.jsx(U1,{ref:n,className:On("opencopilot-text-sm opencopilot-text-muted-foreground",e),...t}));UC.displayName=U1.displayName;function HC(){const[,,e]=H0();return L.jsx("header",{className:"opencopilot-fade-in-top opencopilot-border-b opencopilot-border-b-black/10 opencopilot-w-full",children:L.jsx("div",{className:"opencopilot-p-3",children:L.jsxs("div",{className:"opencopilot-w-full opencopilot-flex opencopilot-items-center opencopilot-justify-between",children:[L.jsx("div",{children:L.jsx("h1",{className:"opencopilot-font-semibold opencopilot-text-sm",children:"OpenPilot"})}),L.jsx("div",{className:"opencopilot-flex opencopilot-items-center opencopilot-gap-3",children:L.jsxs(FC,{children:[L.jsx(jC,{children:L.jsx(s2,{size:19})}),L.jsxs(H1,{children:[L.jsx(W1,{className:"opencopilot-mx-auto",children:"Are you sure?"}),L.jsxs("div",{className:"opencopilot-space-y-1.5",children:[L.jsx(mh,{onClick:()=>{setTimeout(()=>{e(!1)},100)},className:"opencopilot-block opencopilot-w-full opencopilot-px-2 opencopilot-text-white opencopilot-shadow opencopilot-py-1 opencopilot-border opencopilot-border-transparent opencopilot-rounded-md opencopilot-bg-rose-500",children:L.jsx("span",{children:"Exit"})}),L.jsx(mh,{className:"opencopilot-block opencopilot-w-full opencopilot-px-2 opencopilot-py-1 opencopilot-rounded-md opencopilot-text-black",children:L.jsx("span",{children:"Cancel"})})]})]})]})})]})})})}var WC=function(e){return{display:e?"flex":"none"}},VC="#4fa94d",GC={"aria-busy":!0,role:"status"},gh=globalThis&&globalThis.__assign||function(){return gh=Object.assign||function(e){for(var t,n=1,r=arguments.length;nMath.abs(C)?"h":"v";if("touches"in m&&T==="h"&&k.type==="range")return!1;var O=ph(T,k);if(!O)return!0;if(O?E=T:(E=T==="v"?"h":"v",O=ph(T,k)),!O)return!1;if(!r.current&&"changedTouches"in m&&(v||C)&&(r.current=E),!E)return!0;var N=r.current||E;return lC(N,w,m,N==="h"?v:C,!0)},[]),s=x.useCallback(function(m){var w=m;if(!(!jr.length||jr[jr.length-1]!==i)){var g="deltaY"in w?fh(w):dl(w),y=t.current.filter(function(E){return E.name===w.type&&E.target===w.target&&aC(E.delta,g)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var v=(l.current.shards||[]).map(dh).filter(Boolean).filter(function(E){return E.contains(w.target)}),C=v.length>0?a(w,v[0]):!l.current.noIsolation;C&&w.cancelable&&w.preventDefault()}}},[]),u=x.useCallback(function(m,w,g,y){var v={name:m,delta:w,target:g,should:y};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(C){return C!==v})},1)},[]),c=x.useCallback(function(m){n.current=dl(m),r.current=void 0},[]),p=x.useCallback(function(m){u(m.type,fh(m),m.target,a(m,e.lockRef.current))},[]),d=x.useCallback(function(m){u(m.type,dl(m),m.target,a(m,e.lockRef.current))},[]);x.useEffect(function(){return jr.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:d}),document.addEventListener("wheel",s,Fr),document.addEventListener("touchmove",s,Fr),document.addEventListener("touchstart",c,Fr),function(){jr=jr.filter(function(m){return m!==i}),document.removeEventListener("wheel",s,Fr),document.removeEventListener("touchmove",s,Fr),document.removeEventListener("touchstart",c,Fr)}},[]);var f=e.removeScrollBar,h=e.inert;return x.createElement(x.Fragment,null,h?x.createElement(i,{styles:sC(o)}):null,f?x.createElement(J2,{gapMode:"margin"}):null)}const pC=B2(O1,cC);var L1=x.forwardRef(function(e,t){return x.createElement(Ya,on({},e,{ref:t,sideCar:pC}))});L1.classNames=Ya.classNames;const fC=L1;var dC=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mr=new WeakMap,hl=new WeakMap,ml={},au=0,D1=function(e){return e&&(e.host||D1(e.parentNode))},hC=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=D1(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},mC=function(e,t,n,r){var o=hC(t,Array.isArray(e)?e:[e]);ml[n]||(ml[n]=new WeakMap);var i=ml[n],l=[],a=new Set,s=new Set(o),u=function(p){!p||a.has(p)||(a.add(p),u(p.parentNode))};o.forEach(u);var c=function(p){!p||s.has(p)||Array.prototype.forEach.call(p.children,function(d){if(a.has(d))c(d);else{var f=d.getAttribute(r),h=f!==null&&f!=="false",m=(Mr.get(d)||0)+1,w=(i.get(d)||0)+1;Mr.set(d,m),i.set(d,w),l.push(d),m===1&&h&&hl.set(d,!0),w===1&&d.setAttribute(n,"true"),h||d.setAttribute(r,"true")}})};return c(t),a.clear(),au++,function(){l.forEach(function(p){var d=Mr.get(p)-1,f=i.get(p)-1;Mr.set(p,d),i.set(p,f),d||(hl.has(p)||p.removeAttribute(r),hl.delete(p)),f||p.removeAttribute(n)}),au--,au||(Mr=new WeakMap,Mr=new WeakMap,hl=new WeakMap,ml={})}},gC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||dC(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),mC(r,o,n,"aria-hidden")):function(){return null}};const z1="Dialog",[N1,y_]=Kp(z1),[yC,fn]=N1(z1),vC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:l=!0}=e,a=x.useRef(null),s=x.useRef(null),[u=!1,c]=x1({prop:r,defaultProp:o,onChange:i});return x.createElement(yC,{scope:t,triggerRef:a,contentRef:s,contentId:Il(),titleId:Il(),descriptionId:Il(),open:u,onOpenChange:c,onOpenToggle:x.useCallback(()=>c(p=>!p),[c]),modal:l},n)},wC="DialogTrigger",xC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(wC,n),i=Jt(t,o.triggerRef);return x.createElement(Ot.button,ge({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zp(o.open)},r,{ref:i,onClick:Xe(e.onClick,o.onOpenToggle)}))}),bC="DialogPortal",[v_,I1]=N1(bC,{forceMount:void 0}),Oc="DialogOverlay",kC=x.forwardRef((e,t)=>{const n=I1(Oc,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=fn(Oc,e.__scopeDialog);return i.modal?x.createElement(qa,{present:r||i.open},x.createElement(SC,ge({},o,{ref:t}))):null}),SC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(Oc,n);return x.createElement(fC,{as:Xp,allowPinchZoom:!0,shards:[o.contentRef]},x.createElement(Ot.div,ge({"data-state":Zp(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),Pi="DialogContent",CC=x.forwardRef((e,t)=>{const n=I1(Pi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=fn(Pi,e.__scopeDialog);return x.createElement(qa,{present:r||i.open},i.modal?x.createElement(EC,ge({},o,{ref:t})):x.createElement(PC,ge({},o,{ref:t})))}),EC=x.forwardRef((e,t)=>{const n=fn(Pi,e.__scopeDialog),r=x.useRef(null),o=Jt(t,n.contentRef,r);return x.useEffect(()=>{const i=r.current;if(i)return gC(i)},[]),x.createElement(F1,ge({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xe(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),(l=n.triggerRef.current)===null||l===void 0||l.focus()}),onPointerDownOutside:Xe(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,a=l.button===0&&l.ctrlKey===!0;(l.button===2||a)&&i.preventDefault()}),onFocusOutside:Xe(e.onFocusOutside,i=>i.preventDefault())}))}),PC=x.forwardRef((e,t)=>{const n=fn(Pi,e.__scopeDialog),r=x.useRef(!1),o=x.useRef(!1);return x.createElement(F1,ge({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var l;if((l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var l,a;(l=e.onInteractOutside)===null||l===void 0||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),F1=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...l}=e,a=fn(Pi,n),s=x.useRef(null),u=Jt(t,s);return _2(),x.createElement(x.Fragment,null,x.createElement(k2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},x.createElement(w2,ge({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Zp(a.open)},l,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),TC="DialogTitle",OC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(TC,n);return x.createElement(Ot.h2,ge({id:o.titleId},r,{ref:t}))}),AC="DialogDescription",$C=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(AC,n);return x.createElement(Ot.p,ge({id:o.descriptionId},r,{ref:t}))}),_C="DialogClose",RC=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fn(_C,n);return x.createElement(Ot.button,ge({type:"button"},r,{ref:t,onClick:Xe(e.onClick,()=>o.onOpenChange(!1))}))});function Zp(e){return e?"open":"closed"}const LC=vC,DC=xC,zC=kC,j1=CC,M1=OC,B1=$C,NC=RC,IC=LC,hh=NC,FC=DC,jC=zC,U1=x.forwardRef(({className:e,children:t,...n},r)=>L.jsx(jC,{className:"opencopilot-absolute opencopilot-inset-0 opencopilot-z-50 opencopilot-bg-black/50 opencopilot-backdrop-blur-sm data-[state=open]:opencopilot-animate-in data-[state=closed]:opencopilot-animate-out data-[state=closed]:opencopilot-fade-out-0 data-[state=open]:opencopilot-fade-in-0",children:L.jsx(j1,{ref:r,className:On("opencopilot-rounded-t-lg opencopilot-z-[100] opencopilot-absolute opencopilot-bottom-0 opencopilot-duration-300 opencopilot-w-full opencopilot-grid opencopilot-max-w-lg opencopilot-bg-white opencopilot-gap-4 opencopilot-shadow-lg opencopilot-p-6 opencopilot-animate-in data-[state=closed]:opencopilot-animate-out data-[state=closed]:opencopilot-fade-out-0 data-[state=open]:opencopilot-fade-in-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:opencopilot-slide-in-from-bottom",e),...n,children:t})}));U1.displayName=j1.displayName;const H1=({className:e,...t})=>L.jsx("div",{className:On("opencopilot-flex opencopilot-flex-col opencopilot-space-y-1.5 opencopilot-text-center sm:opencopilot-text-left",e),...t});H1.displayName="DialogHeader";const MC=x.forwardRef(({className:e,...t},n)=>L.jsx(M1,{ref:n,className:On("opencopilot-text-lg opencopilot-font-semibold opencopilot-leading-none opencopilot-tracking-tight",e),...t}));MC.displayName=M1.displayName;const BC=x.forwardRef(({className:e,...t},n)=>L.jsx(B1,{ref:n,className:On("opencopilot-text-sm opencopilot-text-muted-foreground",e),...t}));BC.displayName=B1.displayName;function UC(){const[,,e]=U0();return L.jsx("header",{className:"opencopilot-fade-in-top opencopilot-border-b opencopilot-border-b-black/10 opencopilot-w-full",children:L.jsx("div",{className:"opencopilot-p-3",children:L.jsxs("div",{className:"opencopilot-w-full opencopilot-flex opencopilot-items-center opencopilot-justify-between",children:[L.jsx("div",{children:L.jsx("h1",{className:"opencopilot-font-semibold opencopilot-text-sm",children:"OpenPilot"})}),L.jsx("div",{className:"opencopilot-flex opencopilot-items-center opencopilot-gap-3",children:L.jsxs(IC,{children:[L.jsx(FC,{children:L.jsx(a2,{size:19})}),L.jsxs(U1,{children:[L.jsx(H1,{className:"opencopilot-mx-auto",children:"Are you sure?"}),L.jsxs("div",{className:"opencopilot-space-y-1.5",children:[L.jsx(hh,{onClick:()=>{setTimeout(()=>{e(!1)},100)},className:"opencopilot-block opencopilot-w-full opencopilot-px-2 opencopilot-text-white opencopilot-shadow opencopilot-py-1 opencopilot-border opencopilot-border-transparent opencopilot-rounded-md opencopilot-bg-rose-500",children:L.jsx("span",{children:"Exit"})}),L.jsx(hh,{className:"opencopilot-block opencopilot-w-full opencopilot-px-2 opencopilot-py-1 opencopilot-rounded-md opencopilot-text-black",children:L.jsx("span",{children:"Cancel"})})]})]})]})})]})})})}var HC=function(e){return{display:e?"flex":"none"}},WC="#4fa94d",VC={"aria-busy":!0,role:"status"},mh=globalThis&&globalThis.__assign||function(){return mh=Object.assign||function(e){for(var t,n=1,r=arguments.length;npe)&&(Ee=(ee=ee.replace(" ",":")).length),0Y&&(Y=(b=b.trim()).charCodeAt(0)),Y){case 38:return b.replace(g,"$1"+I.trim());case 58:return I.trim()+b.replace(g,"$1"+I.trim());default:if(0<1*U&&0B.charCodeAt(8))break;case 115:A=A.replace(B,"-webkit-"+B)+";"+A;break;case 207:case 102:A=A.replace(B,"-webkit-"+(102U.charCodeAt(0)&&(U=U.trim()),X=U,U=[X],0pe)&&(Ee=(ee=ee.replace(" ",":")).length),0Y&&(Y=(b=b.trim()).charCodeAt(0)),Y){case 38:return b.replace(g,"$1"+I.trim());case 58:return I.trim()+b.replace(g,"$1"+I.trim());default:if(0<1*U&&0B.charCodeAt(8))break;case 115:A=A.replace(B,"-webkit-"+B)+";"+A;break;case 207:case 102:A=A.replace(B,"-webkit-"+(102U.charCodeAt(0)&&(U=U.trim()),X=U,U=[X],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var yE=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,o=0;o=this.groupSizes.length){for(var o=this.groupSizes,i=o.length,l=i;n>=l;)(l<<=1)<0&&ji(16,""+n);this.groupSizes=new Uint32Array(l),this.groupSizes.set(o),this.length=l;for(var a=i;a=this.length||this.groupSizes[n]===0)return r;for(var o=this.groupSizes[n],i=this.indexOfGroup(n),l=i+o,a=i;a=ii&&(ii=t+1),Ml.set(e,t),ga.set(t,e)},xE="style["+wo+'][data-styled-version="5.3.11"]',bE=new RegExp("^"+wo+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),kE=function(e,t,n){for(var r,o=n.split(","),i=0,l=o.length;i=0;u--){var c=s[u];if(c&&c.nodeType===1&&c.hasAttribute(wo))return c}}(n),i=o!==void 0?o.nextSibling:null;r.setAttribute(wo,"active"),r.setAttribute("data-styled-version","5.3.11");var l=CE();return l&&r.setAttribute("nonce",l),n.insertBefore(r,i),r},EE=function(){function e(n){var r=this.element=X1(n);r.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var i=document.styleSheets,l=0,a=i.length;l=0){var o=document.createTextNode(r),i=this.nodes[n];return this.element.insertBefore(o,i||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n0&&(p+=d+",")}),i+=""+u+c+'{content:"'+p+`"}/*!sc*/ -`}}}return i}(this)},e}(),AE=/(a)(d)/gi,Ah=function(e){return String.fromCharCode(e+(e>25?39:97))};function _c(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Ah(t%52)+n;return(Ah(t%52)+n).replace(AE,"$1-$2")}var eo=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},J1=function(e){return eo(5381,e)};function $E(e){for(var t=0;t>>0);if(!n.hasNameForId(o,a)){var s=r(l,"."+a,void 0,o);n.insertRules(o,a,s)}i.push(a),this.staticRulesId=a}else{for(var u=this.rules.length,c=eo(this.baseHash,r.hash),p="",d=0;d>>0);if(!n.hasNameForId(o,w)){var g=r(p,"."+w,void 0,o);n.insertRules(o,w,g)}i.push(w)}}return i.join(" ")},e}(),LE=/^\s*\/\/.*$/gm,DE=[":","[",".","#"];function zE(e){var t,n,r,o,i=e===void 0?nr:e,l=i.options,a=l===void 0?nr:l,s=i.plugins,u=s===void 0?ma:s,c=new XC(a),p=[],d=function(m){function w(g){if(g)try{m(g+"}")}catch{}}return function(g,y,v,C,E,k,T,O,N,P){switch(g){case 1:if(N===0&&y.charCodeAt(0)===64)return m(y+";"),"";break;case 2:if(O===0)return y+"/*|*/";break;case 3:switch(O){case 102:case 112:return m(v[0]+y),"";default:return y+(P===0?"/*|*/":"")}case-2:y.split("/*|*/}").forEach(w)}}}(function(m){p.push(m)}),f=function(m,w,g){return w===0&&DE.indexOf(g[n.length])!==-1||g.match(o)?m:"."+t};function h(m,w,g,y){y===void 0&&(y="&");var v=m.replace(LE,""),C=w&&g?g+" "+w+" { "+v+" }":v;return t=y,n=w,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),c(g||!w?"":w,C)}return c.use([].concat(u,[function(m,w,g){m===2&&g.length&&g[0].lastIndexOf(n)>0&&(g[0]=g[0].replace(r,f))},d,function(m){if(m===-2){var w=p;return p=[],w}}])),h.hash=u.length?u.reduce(function(m,w){return w.name||ji(15),eo(m,w.name)},5381).toString():"",h}var ev=le.createContext();ev.Consumer;var tv=le.createContext(),NE=(tv.Consumer,new Z1),Rc=zE();function IE(){return x.useContext(ev)||NE}function FE(){return x.useContext(tv)||Rc}var nv=function(){function e(t,n){var r=this;this.inject=function(o,i){i===void 0&&(i=Rc);var l=r.name+i.hash;o.hasNameForId(r.id,l)||o.insertRules(r.id,l,i(r.rules,l,"@keyframes"))},this.toString=function(){return ji(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=Rc),this.name+t.hash},e}(),jE=/([A-Z])/,ME=/([A-Z])/g,BE=/^ms-/,UE=function(e){return"-"+e.toLowerCase()};function $h(e){return jE.test(e)?e.replace(ME,UE).replace(BE,"-ms-"):e}var _h=function(e){return e==null||e===!1||e===""};function xo(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],l=0,a=e.length;l1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,VE=/(^-|-$)/g;function su(e){return e.replace(WE,"-").replace(VE,"")}var ov=function(e){return _c(J1(e)>>>0)};function yl(e){return typeof e=="string"&&!0}var Lc=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},GE=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function qE(e,t,n){var r=e[n];Lc(t)&&Lc(r)?iv(r,t):e[n]=t}function iv(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(P[O]=k[O]);return P}(t,["componentId"]),E=v&&v+"-"+(yl(y)?y:su(Th(y)));return av(y,bn({},C,{attrs:d,componentId:E}),n)},Object.defineProperty(h,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(y){this._foldedDefaultProps=r?iv({},e.defaultProps,y):y}}),Object.defineProperty(h,"toString",{value:function(){return"."+h.styledComponentId}}),o&&mE(h,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),h}var Dc=function(e){return function t(n,r,o){if(o===void 0&&(o=nr),!nf.isValidElementType(r))return ji(1,String(r));var i=function(){return n(r,o,rv.apply(void 0,arguments))};return i.withConfig=function(l){return t(n,r,bn({},o,{},l))},i.attrs=function(l){return t(n,r,bn({},o,{attrs:Array.prototype.concat(o.attrs,l).filter(Boolean)}))},i}(av,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){Dc[e]=Dc(e)});function pf(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var gE=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,o=0;o=this.groupSizes.length){for(var o=this.groupSizes,i=o.length,l=i;n>=l;)(l<<=1)<0&&ji(16,""+n);this.groupSizes=new Uint32Array(l),this.groupSizes.set(o),this.length=l;for(var a=i;a=this.length||this.groupSizes[n]===0)return r;for(var o=this.groupSizes[n],i=this.indexOfGroup(n),l=i+o,a=i;a=ii&&(ii=t+1),Ml.set(e,t),ga.set(t,e)},wE="style["+wo+'][data-styled-version="5.3.11"]',xE=new RegExp("^"+wo+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),bE=function(e,t,n){for(var r,o=n.split(","),i=0,l=o.length;i=0;u--){var c=s[u];if(c&&c.nodeType===1&&c.hasAttribute(wo))return c}}(n),i=o!==void 0?o.nextSibling:null;r.setAttribute(wo,"active"),r.setAttribute("data-styled-version","5.3.11");var l=SE();return l&&r.setAttribute("nonce",l),n.insertBefore(r,i),r},CE=function(){function e(n){var r=this.element=K1(n);r.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var i=document.styleSheets,l=0,a=i.length;l=0){var o=document.createTextNode(r),i=this.nodes[n];return this.element.insertBefore(o,i||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n0&&(p+=d+",")}),i+=""+u+c+'{content:"'+p+`"}/*!sc*/ +`}}}return i}(this)},e}(),OE=/(a)(d)/gi,Oh=function(e){return String.fromCharCode(e+(e>25?39:97))};function $c(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Oh(t%52)+n;return(Oh(t%52)+n).replace(OE,"$1-$2")}var eo=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Z1=function(e){return eo(5381,e)};function AE(e){for(var t=0;t>>0);if(!n.hasNameForId(o,a)){var s=r(l,"."+a,void 0,o);n.insertRules(o,a,s)}i.push(a),this.staticRulesId=a}else{for(var u=this.rules.length,c=eo(this.baseHash,r.hash),p="",d=0;d>>0);if(!n.hasNameForId(o,w)){var g=r(p,"."+w,void 0,o);n.insertRules(o,w,g)}i.push(w)}}return i.join(" ")},e}(),RE=/^\s*\/\/.*$/gm,LE=[":","[",".","#"];function DE(e){var t,n,r,o,i=e===void 0?nr:e,l=i.options,a=l===void 0?nr:l,s=i.plugins,u=s===void 0?ma:s,c=new KC(a),p=[],d=function(m){function w(g){if(g)try{m(g+"}")}catch{}}return function(g,y,v,C,E,k,T,O,N,P){switch(g){case 1:if(N===0&&y.charCodeAt(0)===64)return m(y+";"),"";break;case 2:if(O===0)return y+"/*|*/";break;case 3:switch(O){case 102:case 112:return m(v[0]+y),"";default:return y+(P===0?"/*|*/":"")}case-2:y.split("/*|*/}").forEach(w)}}}(function(m){p.push(m)}),f=function(m,w,g){return w===0&&LE.indexOf(g[n.length])!==-1||g.match(o)?m:"."+t};function h(m,w,g,y){y===void 0&&(y="&");var v=m.replace(RE,""),C=w&&g?g+" "+w+" { "+v+" }":v;return t=y,n=w,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),c(g||!w?"":w,C)}return c.use([].concat(u,[function(m,w,g){m===2&&g.length&&g[0].lastIndexOf(n)>0&&(g[0]=g[0].replace(r,f))},d,function(m){if(m===-2){var w=p;return p=[],w}}])),h.hash=u.length?u.reduce(function(m,w){return w.name||ji(15),eo(m,w.name)},5381).toString():"",h}var J1=le.createContext();J1.Consumer;var ev=le.createContext(),zE=(ev.Consumer,new X1),_c=DE();function NE(){return x.useContext(J1)||zE}function IE(){return x.useContext(ev)||_c}var tv=function(){function e(t,n){var r=this;this.inject=function(o,i){i===void 0&&(i=_c);var l=r.name+i.hash;o.hasNameForId(r.id,l)||o.insertRules(r.id,l,i(r.rules,l,"@keyframes"))},this.toString=function(){return ji(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=_c),this.name+t.hash},e}(),FE=/([A-Z])/,jE=/([A-Z])/g,ME=/^ms-/,BE=function(e){return"-"+e.toLowerCase()};function Ah(e){return FE.test(e)?e.replace(jE,BE).replace(ME,"-ms-"):e}var $h=function(e){return e==null||e===!1||e===""};function xo(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],l=0,a=e.length;l1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,WE=/(^-|-$)/g;function su(e){return e.replace(HE,"-").replace(WE,"")}var rv=function(e){return $c(Z1(e)>>>0)};function yl(e){return typeof e=="string"&&!0}var Rc=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},VE=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function GE(e,t,n){var r=e[n];Rc(t)&&Rc(r)?ov(r,t):e[n]=t}function ov(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(P[O]=k[O]);return P}(t,["componentId"]),E=v&&v+"-"+(yl(y)?y:su(Ph(y)));return lv(y,bn({},C,{attrs:d,componentId:E}),n)},Object.defineProperty(h,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(y){this._foldedDefaultProps=r?ov({},e.defaultProps,y):y}}),Object.defineProperty(h,"toString",{value:function(){return"."+h.styledComponentId}}),o&&hE(h,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),h}var Lc=function(e){return function t(n,r,o){if(o===void 0&&(o=nr),!tf.isValidElementType(r))return ji(1,String(r));var i=function(){return n(r,o,nv.apply(void 0,arguments))};return i.withConfig=function(l){return t(n,r,bn({},o,{},l))},i.attrs=function(l){return t(n,r,bn({},o,{attrs:Array.prototype.concat(o.attrs,l).filter(Boolean)}))},i}(lv,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){Lc[e]=Lc(e)});function cf(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};if(typeof r[t]<"u")return r[t];if(t&&t.indexOf(".")>0){for(var o=t.split("."),i=o.length,l=r[o[0]],a=1;l!=null&&a0&&arguments[0]!==void 0?arguments[0]:{};if(typeof r[t]<"u")return r[t];if(t&&t.indexOf(".")>0){for(var o=t.split("."),i=o.length,l=r[o[0]],a=1;l!=null&&a{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:a,onDismiss:s,...u}=e,c=x.useContext(t5),[p,d]=x.useState(null),f=(n=p==null?void 0:p.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=x.useState({}),m=Jt(t,O=>d(O)),w=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(g),v=p?w.indexOf(p):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,E=v>=y,k=r5(O=>{const N=O.target,P=[...c.branches].some(_=>_.contains(N));!E||P||(i==null||i(O),a==null||a(O),O.defaultPrevented||s==null||s())},f),T=o5(O=>{const N=O.target;[...c.branches].some(_=>_.contains(N))||(l==null||l(O),a==null||a(O),O.defaultPrevented||s==null||s())},f);return C1(O=>{v===c.layers.size-1&&(o==null||o(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},f),x.useEffect(()=>{if(p)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(dm=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(p)),c.layers.add(p),hm(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=dm)}},[p,f,r,c]),x.useEffect(()=>()=>{p&&(c.layers.delete(p),c.layersWithOutsidePointerEventsDisabled.delete(p),hm())},[p,c]),x.useEffect(()=>{const O=()=>h({});return document.addEventListener(zc,O),()=>document.removeEventListener(zc,O)},[]),x.createElement(Ot.div,ge({},u,{ref:m,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:Xe(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Xe(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Xe(e.onPointerDownCapture,k.onPointerDownCapture)}))});function r5(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let c=function(){uv(JE,n,u,{discrete:!0})};var s=c;const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function o5(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=x.useRef(!1);return x.useEffect(()=>{const o=i=>{i.target&&!r.current&&uv(e5,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hm(){const e=new CustomEvent(zc);document.dispatchEvent(e)}function uv(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?S1(o,i):o.dispatchEvent(i)}const i5=["top","right","bottom","left"],ir=Math.min,xt=Math.max,ya=Math.round,vl=Math.floor,lr=e=>({x:e,y:e}),l5={left:"right",right:"left",bottom:"top",top:"bottom"},a5={start:"end",end:"start"};function Nc(e,t,n){return xt(e,ir(t,n))}function An(e,t){return typeof e=="function"?e(t):e}function $n(e){return e.split("-")[0]}function Po(e){return e.split("-")[1]}function hf(e){return e==="x"?"y":"x"}function mf(e){return e==="y"?"height":"width"}function To(e){return["top","bottom"].includes($n(e))?"y":"x"}function gf(e){return hf(To(e))}function s5(e,t,n){n===void 0&&(n=!1);const r=Po(e),o=gf(e),i=mf(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=va(l)),[l,va(l)]}function u5(e){const t=va(e);return[Ic(e),t,Ic(t)]}function Ic(e){return e.replace(/start|end/g,t=>a5[t])}function c5(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}function p5(e,t,n,r){const o=Po(e);let i=c5($n(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(Ic)))),i}function va(e){return e.replace(/left|right|bottom|top/g,t=>l5[t])}function f5(e){return{top:0,right:0,bottom:0,left:0,...e}}function cv(e){return typeof e!="number"?f5(e):{top:e,right:e,bottom:e,left:e}}function wa(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function mm(e,t,n){let{reference:r,floating:o}=e;const i=To(t),l=gf(t),a=mf(l),s=$n(t),u=i==="y",c=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let f;switch(s){case"top":f={x:c,y:r.y-o.height};break;case"bottom":f={x:c,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:p};break;case"left":f={x:r.x-o.width,y:p};break;default:f={x:r.x,y:r.y}}switch(Po(t)){case"start":f[l]-=d*(n&&u?-1:1);break;case"end":f[l]+=d*(n&&u?-1:1);break}return f}const d5=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:p}=mm(u,r,s),d=r,f={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:a}=t,{element:s,padding:u=0}=An(e,t)||{};if(s==null)return{};const c=cv(u),p={x:n,y:r},d=gf(o),f=mf(d),h=await l.getDimensions(s),m=d==="y",w=m?"top":"left",g=m?"bottom":"right",y=m?"clientHeight":"clientWidth",v=i.reference[f]+i.reference[d]-p[d]-i.floating[f],C=p[d]-i.reference[d],E=await(l.getOffsetParent==null?void 0:l.getOffsetParent(s));let k=E?E[y]:0;(!k||!await(l.isElement==null?void 0:l.isElement(E)))&&(k=a.floating[y]||i.floating[f]);const T=v/2-C/2,O=k/2-h[f]/2-1,N=ir(c[w],O),P=ir(c[g],O),_=N,R=k-h[f]-P,H=k/2-h[f]/2+T,q=Nc(_,H,R),Q=Po(o)!=null&&H!=q&&i.reference[f]/2-(H<_?N:P)-h[f]/2<0?H<_?_-H:R-H:0;return{[d]:p[d]-Q,data:{[d]:q,centerOffset:H-q+Q}}}}),h5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:l,platform:a,elements:s}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:h=!0,...m}=An(e,t),w=$n(r),g=$n(l)===l,y=await(a.isRTL==null?void 0:a.isRTL(s.floating)),v=p||(g||!h?[va(l)]:u5(l));!p&&f!=="none"&&v.push(...p5(l,h,f,y));const C=[l,...v],E=await Oi(t,m),k=[];let T=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&k.push(E[w]),c){const _=s5(r,i,y);k.push(E[_[0]],E[_[1]])}if(T=[...T,{placement:r,overflows:k}],!k.every(_=>_<=0)){var O,N;const _=(((O=o.flip)==null?void 0:O.index)||0)+1,R=C[_];if(R)return{data:{index:_,overflows:T},reset:{placement:R}};let H=(N=T.filter(q=>q.overflows[0]<=0).sort((q,W)=>q.overflows[1]-W.overflows[1])[0])==null?void 0:N.placement;if(!H)switch(d){case"bestFit":{var P;const q=(P=T.map(W=>[W.placement,W.overflows.filter(Q=>Q>0).reduce((Q,te)=>Q+te,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:P[0];q&&(H=q);break}case"initialPlacement":H=l;break}if(r!==H)return{reset:{placement:H}}}return{}}}};function ym(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vm(e){return i5.some(t=>e[t]>=0)}const m5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=An(e,t);switch(r){case"referenceHidden":{const i=await Oi(t,{...o,elementContext:"reference"}),l=ym(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:vm(l)}}}case"escaped":{const i=await Oi(t,{...o,altBoundary:!0}),l=ym(i,n.floating);return{data:{escapedOffsets:l,escaped:vm(l)}}}default:return{}}}}};async function g5(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=$n(n),a=Po(n),s=To(n)==="y",u=["left","top"].includes(l)?-1:1,c=i&&s?-1:1,p=An(t,e);let{mainAxis:d,crossAxis:f,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),s?{x:f*c,y:d*u}:{x:d*u,y:f*c}}const y5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await g5(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},v5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:w=>{let{x:g,y}=w;return{x:g,y}}},...s}=An(e,t),u={x:n,y:r},c=await Oi(t,s),p=To($n(o)),d=hf(p);let f=u[d],h=u[p];if(i){const w=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=f+c[w],v=f-c[g];f=Nc(y,f,v)}if(l){const w=p==="y"?"top":"left",g=p==="y"?"bottom":"right",y=h+c[w],v=h-c[g];h=Nc(y,h,v)}const m=a.fn({...t,[d]:f,[p]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},w5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:s=!0,crossAxis:u=!0}=An(e,t),c={x:n,y:r},p=To(o),d=hf(p);let f=c[d],h=c[p];const m=An(a,t),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const v=d==="y"?"height":"width",C=i.reference[d]-i.floating[v]+w.mainAxis,E=i.reference[d]+i.reference[v]-w.mainAxis;fE&&(f=E)}if(u){var g,y;const v=d==="y"?"width":"height",C=["top","left"].includes($n(o)),E=i.reference[p]-i.floating[v]+(C&&((g=l.offset)==null?void 0:g[p])||0)+(C?0:w.crossAxis),k=i.reference[p]+i.reference[v]+(C?0:((y=l.offset)==null?void 0:y[p])||0)-(C?w.crossAxis:0);hk&&(h=k)}return{[d]:f,[p]:h}}}},x5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=()=>{},...a}=An(e,t),s=await Oi(t,a),u=$n(n),c=Po(n),p=To(n)==="y",{width:d,height:f}=r.floating;let h,m;u==="top"||u==="bottom"?(h=u,m=c===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=u,h=c==="end"?"top":"bottom");const w=f-s[h],g=d-s[m],y=!t.middlewareData.shift;let v=w,C=g;if(p){const k=d-s.left-s.right;C=c||y?ir(g,k):k}else{const k=f-s.top-s.bottom;v=c||y?ir(w,k):k}if(y&&!c){const k=xt(s.left,0),T=xt(s.right,0),O=xt(s.top,0),N=xt(s.bottom,0);p?C=d-2*(k!==0||T!==0?k+T:xt(s.left,s.right)):v=f-2*(O!==0||N!==0?O+N:xt(s.top,s.bottom))}await l({...t,availableWidth:C,availableHeight:v});const E=await o.getDimensions(i.floating);return d!==E.width||f!==E.height?{reset:{rects:!0}}:{}}}};function ar(e){return pv(e)?(e.nodeName||"").toLowerCase():"#document"}function St(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ln(e){var t;return(t=(pv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pv(e){return e instanceof Node||e instanceof St(e).Node}function _n(e){return e instanceof Element||e instanceof St(e).Element}function cn(e){return e instanceof HTMLElement||e instanceof St(e).HTMLElement}function wm(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof St(e).ShadowRoot}function Bi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function b5(e){return["table","td","th"].includes(ar(e))}function yf(e){const t=vf(),n=Ft(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function k5(e){let t=bo(e);for(;cn(t)&&!ms(t);){if(yf(t))return t;t=bo(t)}return null}function vf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ms(e){return["html","body","#document"].includes(ar(e))}function Ft(e){return St(e).getComputedStyle(e)}function gs(e){return _n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function bo(e){if(ar(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wm(e)&&e.host||Ln(e);return wm(t)?t.host:t}function fv(e){const t=bo(e);return ms(t)?e.ownerDocument?e.ownerDocument.body:e.body:cn(t)&&Bi(t)?t:fv(t)}function xa(e,t){var n;t===void 0&&(t=[]);const r=fv(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=St(r);return o?t.concat(i,i.visualViewport||[],Bi(r)?r:[]):t.concat(r,xa(r))}function dv(e){const t=Ft(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=cn(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=ya(n)!==i||ya(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function wf(e){return _n(e)?e:e.contextElement}function ao(e){const t=wf(e);if(!cn(t))return lr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=dv(t);let l=(i?ya(n.width):n.width)/r,a=(i?ya(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const S5=lr(0);function hv(e){const t=St(e);return!vf()||!t.visualViewport?S5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function C5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==St(e)?!1:t}function Ar(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=wf(e);let l=lr(1);t&&(r?_n(r)&&(l=ao(r)):l=ao(e));const a=C5(i,n,r)?hv(i):lr(0);let s=(o.left+a.x)/l.x,u=(o.top+a.y)/l.y,c=o.width/l.x,p=o.height/l.y;if(i){const d=St(i),f=r&&_n(r)?St(r):r;let h=d.frameElement;for(;h&&r&&f!==d;){const m=ao(h),w=h.getBoundingClientRect(),g=Ft(h),y=w.left+(h.clientLeft+parseFloat(g.paddingLeft))*m.x,v=w.top+(h.clientTop+parseFloat(g.paddingTop))*m.y;s*=m.x,u*=m.y,c*=m.x,p*=m.y,s+=y,u+=v,h=St(h).frameElement}}return wa({width:c,height:p,x:s,y:u})}function E5(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=cn(n),i=Ln(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=lr(1);const s=lr(0);if((o||!o&&r!=="fixed")&&((ar(n)!=="body"||Bi(i))&&(l=gs(n)),cn(n))){const u=Ar(n);a=ao(n),s.x=u.x+n.clientLeft,s.y=u.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}}function P5(e){return Array.from(e.getClientRects())}function mv(e){return Ar(Ln(e)).left+gs(e).scrollLeft}function T5(e){const t=Ln(e),n=gs(e),r=e.ownerDocument.body,o=xt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=xt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+mv(e);const a=-n.scrollTop;return Ft(r).direction==="rtl"&&(l+=xt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}function O5(e,t){const n=St(e),r=Ln(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const u=vf();(!u||u&&t==="fixed")&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}function A5(e,t){const n=Ar(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=cn(e)?ao(e):lr(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y,s=o*i.x,u=r*i.y;return{width:l,height:a,x:s,y:u}}function xm(e,t,n){let r;if(t==="viewport")r=O5(e,n);else if(t==="document")r=T5(Ln(e));else if(_n(t))r=A5(t,n);else{const o=hv(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return wa(r)}function gv(e,t){const n=bo(e);return n===t||!_n(n)||ms(n)?!1:Ft(n).position==="fixed"||gv(n,t)}function $5(e,t){const n=t.get(e);if(n)return n;let r=xa(e).filter(a=>_n(a)&&ar(a)!=="body"),o=null;const i=Ft(e).position==="fixed";let l=i?bo(e):e;for(;_n(l)&&!ms(l);){const a=Ft(l),s=yf(l);!s&&a.position==="fixed"&&(o=null),(i?!s&&!o:!s&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Bi(l)&&!s&&gv(e,l))?r=r.filter(c=>c!==l):o=a,l=bo(l)}return t.set(e,r),r}function _5(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?$5(t,this._c):[].concat(n),r],a=l[0],s=l.reduce((u,c)=>{const p=xm(t,c,o);return u.top=xt(p.top,u.top),u.right=ir(p.right,u.right),u.bottom=ir(p.bottom,u.bottom),u.left=xt(p.left,u.left),u},xm(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function R5(e){return dv(e)}function L5(e,t,n){const r=cn(t),o=Ln(t),i=n==="fixed",l=Ar(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=lr(0);if(r||!r&&!i)if((ar(t)!=="body"||Bi(o))&&(a=gs(t)),r){const u=Ar(t,!0,i,t);s.x=u.x+t.clientLeft,s.y=u.y+t.clientTop}else o&&(s.x=mv(o));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function bm(e,t){return!cn(e)||Ft(e).position==="fixed"?null:t?t(e):e.offsetParent}function yv(e,t){const n=St(e);if(!cn(e))return n;let r=bm(e,t);for(;r&&b5(r)&&Ft(r).position==="static";)r=bm(r,t);return r&&(ar(r)==="html"||ar(r)==="body"&&Ft(r).position==="static"&&!yf(r))?n:r||k5(e)||n}const D5=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||yv,i=this.getDimensions;return{reference:L5(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function z5(e){return Ft(e).direction==="rtl"}const N5={convertOffsetParentRelativeRectToViewportRelativeRect:E5,getDocumentElement:Ln,getClippingRect:_5,getOffsetParent:yv,getElementRects:D5,getClientRects:P5,getDimensions:R5,getScale:ao,isElement:_n,isRTL:z5};function I5(e,t){let n=null,r;const o=Ln(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function l(a,s){a===void 0&&(a=!1),s===void 0&&(s=1),i();const{left:u,top:c,width:p,height:d}=e.getBoundingClientRect();if(a||t(),!p||!d)return;const f=vl(c),h=vl(o.clientWidth-(u+p)),m=vl(o.clientHeight-(c+d)),w=vl(u),y={rootMargin:-f+"px "+-h+"px "+-m+"px "+-w+"px",threshold:xt(0,ir(1,s))||1};let v=!0;function C(E){const k=E[0].intersectionRatio;if(k!==s){if(!v)return l();k?l(!1,k):r=setTimeout(()=>{l(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(C,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,y)}n.observe(e)}return l(!0),i}function F5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,u=wf(e),c=o||i?[...u?xa(u):[],...xa(t)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const p=u&&a?I5(u,n):null;let d=-1,f=null;l&&(f=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{f&&f.observe(t)})),n()}),u&&!s&&f.observe(u),f.observe(t));let h,m=s?Ar(e):null;s&&w();function w(){const g=Ar(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,h=requestAnimationFrame(w)}return n(),()=>{c.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),p&&p(),f&&f.disconnect(),f=null,s&&cancelAnimationFrame(h)}}const j5=(e,t,n)=>{const r=new Map,o={platform:N5,...n},i={...o.platform,_c:r};return d5(e,t,{...o,platform:i})},M5=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?gm({element:r.current,padding:o}).fn(n):{}:r?gm({element:r,padding:o}).fn(n):{}}}};var Bl=typeof document<"u"?x.useLayoutEffect:x.useEffect;function ba(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ba(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ba(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function vv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function km(e,t){const n=vv(e);return Math.round(t*n)/n}function Sm(e){const t=x.useRef(e);return Bl(()=>{t.current=e}),t}function B5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:a=!0,whileElementsMounted:s,open:u}=e,[c,p]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,f]=x.useState(r);ba(d,r)||f(r);const[h,m]=x.useState(null),[w,g]=x.useState(null),y=x.useCallback(Q=>{Q!=k.current&&(k.current=Q,m(Q))},[m]),v=x.useCallback(Q=>{Q!==T.current&&(T.current=Q,g(Q))},[g]),C=i||h,E=l||w,k=x.useRef(null),T=x.useRef(null),O=x.useRef(c),N=Sm(s),P=Sm(o),_=x.useCallback(()=>{if(!k.current||!T.current)return;const Q={placement:t,strategy:n,middleware:d};P.current&&(Q.platform=P.current),j5(k.current,T.current,Q).then(te=>{const z={...te,isPositioned:!0};R.current&&!ba(O.current,z)&&(O.current=z,Ba.flushSync(()=>{p(z)}))})},[d,t,n,P]);Bl(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,p(Q=>({...Q,isPositioned:!1})))},[u]);const R=x.useRef(!1);Bl(()=>(R.current=!0,()=>{R.current=!1}),[]),Bl(()=>{if(C&&(k.current=C),E&&(T.current=E),C&&E){if(N.current)return N.current(C,E,_);_()}},[C,E,_,N]);const H=x.useMemo(()=>({reference:k,floating:T,setReference:y,setFloating:v}),[y,v]),q=x.useMemo(()=>({reference:C,floating:E}),[C,E]),W=x.useMemo(()=>{const Q={position:n,left:0,top:0};if(!q.floating)return Q;const te=km(q.floating,c.x),z=km(q.floating,c.y);return a?{...Q,transform:"translate("+te+"px, "+z+"px)",...vv(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:z}},[n,a,q.floating,c.x,c.y]);return x.useMemo(()=>({...c,update:_,refs:H,elements:q,floatingStyles:W}),[c,_,H,q,W])}const U5=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return x.createElement(Ot.svg,ge({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:x.createElement("polygon",{points:"0,0 30,0 15,10"}))}),H5=U5;function W5(e){const[t,n]=x.useState(void 0);return vo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let l,a;if("borderBoxSize"in i){const s=i.borderBoxSize,u=Array.isArray(s)?s[0]:s;l=u.inlineSize,a=u.blockSize}else l=e.offsetWidth,a=e.offsetHeight;n({width:l,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const wv="Popper",[xv,bv]=Xp(wv),[V5,kv]=xv(wv),G5=e=>{const{__scopePopper:t,children:n}=e,[r,o]=x.useState(null);return x.createElement(V5,{scope:t,anchor:r,onAnchorChange:o},n)},q5="PopperAnchor",Y5=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=kv(q5,n),l=x.useRef(null),a=Jt(t,l);return x.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:x.createElement(Ot.div,ge({},o,{ref:a}))}),Sv="PopperContent",[Q5,K5]=xv(Sv),X5=x.forwardRef((e,t)=>{var n,r,o,i,l,a,s,u;const{__scopePopper:c,side:p="bottom",sideOffset:d=0,align:f="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:w=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:v=!1,avoidCollisions:C=!0,onPlaced:E,...k}=e,T=kv(Sv,c),[O,N]=x.useState(null),P=Jt(t,Be=>N(Be)),[_,R]=x.useState(null),H=W5(_),q=(n=H==null?void 0:H.width)!==null&&n!==void 0?n:0,W=(r=H==null?void 0:H.height)!==null&&r!==void 0?r:0,Q=p+(f!=="center"?"-"+f:""),te=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},z=Array.isArray(w)?w:[w],G=z.length>0,S={padding:te,boundary:z.filter(t4),altBoundary:G},{refs:X,floatingStyles:I,placement:b,isPositioned:U,middlewareData:Y}=B5({strategy:"fixed",placement:Q,whileElementsMounted:F5,elements:{reference:T.anchor},middleware:[y5({mainAxis:d+W,alignmentAxis:h}),C&&v5({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?w5():void 0,...S}),C&&h5({...S}),x5({...S,apply:({elements:Be,rects:se,availableWidth:Fe,availableHeight:fe})=>{const{width:ze,height:hn}=se.reference,Ee=Be.floating.style;Ee.setProperty("--radix-popper-available-width",`${Fe}px`),Ee.setProperty("--radix-popper-available-height",`${fe}px`),Ee.setProperty("--radix-popper-anchor-width",`${ze}px`),Ee.setProperty("--radix-popper-anchor-height",`${hn}px`)}}),_&&M5({element:_,padding:m}),n4({arrowWidth:q,arrowHeight:W}),v&&m5({strategy:"referenceHidden"})]}),[A,ne]=Cv(b),B=un(E);vo(()=>{U&&(B==null||B())},[U,B]);const ye=(o=Y.arrow)===null||o===void 0?void 0:o.x,ie=(i=Y.arrow)===null||i===void 0?void 0:i.y,pe=((l=Y.arrow)===null||l===void 0?void 0:l.centerOffset)!==0,[J,Ie]=x.useState();return vo(()=>{O&&Ie(window.getComputedStyle(O).zIndex)},[O]),x.createElement("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:U?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(a=Y.transformOrigin)===null||a===void 0?void 0:a.x,(s=Y.transformOrigin)===null||s===void 0?void 0:s.y].join(" ")},dir:e.dir},x.createElement(Q5,{scope:c,placedSide:A,onArrowChange:R,arrowX:ye,arrowY:ie,shouldHideArrow:pe},x.createElement(Ot.div,ge({"data-side":A,"data-align":ne},k,{ref:P,style:{...k.style,animation:U?void 0:"none",opacity:(u=Y.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),Z5="PopperArrow",J5={top:"bottom",right:"left",bottom:"top",left:"right"},e4=x.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=K5(Z5,r),l=J5[i.placedSide];return x.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},x.createElement(H5,ge({},o,{ref:n,style:{...o.style,display:"block"}})))});function t4(e){return e!==null}const n4=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;const{placement:a,rects:s,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,d=p?0:e.arrowWidth,f=p?0:e.arrowHeight,[h,m]=Cv(a),w={start:"0%",center:"50%",end:"100%"}[m],g=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+d/2,y=((i=(l=u.arrow)===null||l===void 0?void 0:l.y)!==null&&i!==void 0?i:0)+f/2;let v="",C="";return h==="bottom"?(v=p?w:`${g}px`,C=`${-f}px`):h==="top"?(v=p?w:`${g}px`,C=`${s.floating.height+f}px`):h==="right"?(v=`${-f}px`,C=p?w:`${y}px`):h==="left"&&(v=`${s.floating.width+f}px`,C=p?w:`${y}px`),{data:{x:v,y:C}}}});function Cv(e){const[t,n="center"]=e.split("-");return[t,n]}const r4=G5,o4=Y5,i4=X5,l4=e4,a4=x.forwardRef((e,t)=>x.createElement(Ot.span,ge({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),s4=a4,[ys,x_]=Xp("Tooltip",[bv]),vs=bv(),u4="TooltipProvider",c4=700,Fc="tooltip.open",[p4,xf]=ys(u4),f4=e=>{const{__scopeTooltip:t,delayDuration:n=c4,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[l,a]=x.useState(!0),s=x.useRef(!1),u=x.useRef(0);return x.useEffect(()=>{const c=u.current;return()=>window.clearTimeout(c)},[]),x.createElement(p4,{scope:t,isOpenDelayed:l,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:x.useCallback(c=>{s.current=c},[]),disableHoverableContent:o},i)},bf="Tooltip",[d4,ws]=ys(bf),h4=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:l,delayDuration:a}=e,s=xf(bf,e.__scopeTooltip),u=vs(t),[c,p]=x.useState(null),d=Il(),f=x.useRef(0),h=l??s.disableHoverableContent,m=a??s.delayDuration,w=x.useRef(!1),[g=!1,y]=b1({prop:r,defaultProp:o,onChange:T=>{T?(s.onOpen(),document.dispatchEvent(new CustomEvent(Fc))):s.onClose(),i==null||i(T)}}),v=x.useMemo(()=>g?w.current?"delayed-open":"instant-open":"closed",[g]),C=x.useCallback(()=>{window.clearTimeout(f.current),w.current=!1,y(!0)},[y]),E=x.useCallback(()=>{window.clearTimeout(f.current),y(!1)},[y]),k=x.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{w.current=!0,y(!0)},m)},[m,y]);return x.useEffect(()=>()=>window.clearTimeout(f.current),[]),x.createElement(r4,u,x.createElement(d4,{scope:t,contentId:d,open:g,stateAttribute:v,trigger:c,onTriggerChange:p,onTriggerEnter:x.useCallback(()=>{s.isOpenDelayed?k():C()},[s.isOpenDelayed,k,C]),onTriggerLeave:x.useCallback(()=>{h?E():window.clearTimeout(f.current)},[E,h]),onOpen:C,onClose:E,disableHoverableContent:h},n))},Cm="TooltipTrigger",m4=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ws(Cm,n),i=xf(Cm,n),l=vs(n),a=x.useRef(null),s=Jt(t,a,o.onTriggerChange),u=x.useRef(!1),c=x.useRef(!1),p=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),x.createElement(o4,ge({asChild:!0},l),x.createElement(Ot.button,ge({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:s,onPointerMove:Xe(e.onPointerMove,d=>{d.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),c.current=!0)}),onPointerLeave:Xe(e.onPointerLeave,()=>{o.onTriggerLeave(),c.current=!1}),onPointerDown:Xe(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Xe(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Xe(e.onBlur,o.onClose),onClick:Xe(e.onClick,o.onClose)})))}),g4="TooltipPortal",[b_,y4]=ys(g4,{forceMount:void 0}),Ai="TooltipContent",v4=x.forwardRef((e,t)=>{const n=y4(Ai,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,l=ws(Ai,e.__scopeTooltip);return x.createElement(qa,{present:r||l.open},l.disableHoverableContent?x.createElement(Ev,ge({side:o},i,{ref:t})):x.createElement(w4,ge({side:o},i,{ref:t})))}),w4=x.forwardRef((e,t)=>{const n=ws(Ai,e.__scopeTooltip),r=xf(Ai,e.__scopeTooltip),o=x.useRef(null),i=Jt(t,o),[l,a]=x.useState(null),{trigger:s,onClose:u}=n,c=o.current,{onPointerInTransitChange:p}=r,d=x.useCallback(()=>{a(null),p(!1)},[p]),f=x.useCallback((h,m)=>{const w=h.currentTarget,g={x:h.clientX,y:h.clientY},y=C4(g,w.getBoundingClientRect()),v=E4(g,y),C=P4(m.getBoundingClientRect()),E=O4([...v,...C]);a(E),p(!0)},[p]);return x.useEffect(()=>()=>d(),[d]),x.useEffect(()=>{if(s&&c){const h=w=>f(w,c),m=w=>f(w,s);return s.addEventListener("pointerleave",h),c.addEventListener("pointerleave",m),()=>{s.removeEventListener("pointerleave",h),c.removeEventListener("pointerleave",m)}}},[s,c,f,d]),x.useEffect(()=>{if(l){const h=m=>{const w=m.target,g={x:m.clientX,y:m.clientY},y=(s==null?void 0:s.contains(w))||(c==null?void 0:c.contains(w)),v=!T4(g,l);y?d():v&&(d(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[s,c,l,u,d]),x.createElement(Ev,ge({},e,{ref:i}))}),[x4,b4]=ys(bf,{isInside:!1}),Ev=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:l,...a}=e,s=ws(Ai,n),u=vs(n),{onClose:c}=s;return x.useEffect(()=>(document.addEventListener(Fc,c),()=>document.removeEventListener(Fc,c)),[c]),x.useEffect(()=>{if(s.trigger){const p=d=>{const f=d.target;f!=null&&f.contains(s.trigger)&&c()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[s.trigger,c]),x.createElement(n5,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:c},x.createElement(i4,ge({"data-state":s.stateAttribute},u,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),x.createElement(k1,null,r),x.createElement(x4,{scope:n,isInside:!0},x.createElement(s4,{id:s.contentId,role:"tooltip"},o||r))))}),k4="TooltipArrow",S4=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=vs(n);return b4(k4,n).isInside?null:x.createElement(l4,ge({},o,r,{ref:t}))});function C4(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function E4(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function P4(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function T4(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,l=t.length-1;ir!=c>r&&n<(u-a)*(r-s)/(c-s)+a&&(o=!o)}return o}function O4(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),A4(t)}function A4(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],l=n[n.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const $4=f4,_4=h4,R4=m4,Pv=v4,L4=S4,xs=R4;function Ui({children:e}){return L.jsx($4,{children:L.jsx(_4,{children:e})})}Ui.displayName="ToolTip";const Hi=x.forwardRef(({className:e,children:t,sideOffset:n=0,arrowClassName:r,...o},i)=>L.jsx(Pv,{ref:i,sideOffset:n,dir:"auto",className:On("opencopilot-text-primary opencopilot-font-medium opencopilot-px-2 opencopilot-bg-accent opencopilot-z-[50000] opencopilot-py-1 opencopilot-overflow-hidden opencopilot-shadow opencopilot-min-w-fit opencopilot-max-w-[15rem] opencopilot-select-none opencopilot-rounded-sm opencopilot-p-0.5 opencopilot-text-xs opencopilot-leading-none","opencopilot-animate-in opencopilot-fade-in-0 opencopilot-slide-in-from-bottom-5 data-[state=closed]:animate-out data-[state=closed]:opencopilot-slide-in-from-top-0",e),...o,children:L.jsxs(L.Fragment,{children:[t,L.jsx(L4,{className:On("opencopilot-fill-current opencopilot-text-accent opencopilot-animate-in opencopilot-slide-in-from-top-1 opencopilot-ease-out data-[state=closed]:opencopilot-animate-out",r)})]})}));Hi.displayName=Pv.displayName;function kf({text:e,every:t,onFinish:n,shouldStart:r=!0}){const[o,i]=x.useState(""),[l,a]=x.useState(0),[s,u]=x.useState(!1),c=t||1e-5;return x.useEffect(()=>{if(r)if(l{i(e.substring(0,l+1)),a(d=>d+1)},c);return()=>{clearInterval(p)}}else u(!0),typeof n=="function"&&n()},[e,l,c,n,r]),{displayText:o,isComplete:s,text:e}}const Em=["http","https","mailto","tel"];function D4(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let o=-1;for(;++oo||(o=t.indexOf("#"),o!==-1&&r>o)?t:"javascript:void(0)"}/*! +`])));var Qh,Kh,Xh,Zh=globalThis&&globalThis.__assign||function(){return Zh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:a,onDismiss:s,...u}=e,c=x.useContext(e5),[p,d]=x.useState(null),f=(n=p==null?void 0:p.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=x.useState({}),m=Jt(t,O=>d(O)),w=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(g),v=p?w.indexOf(p):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,E=v>=y,k=n5(O=>{const N=O.target,P=[...c.branches].some(_=>_.contains(N));!E||P||(i==null||i(O),a==null||a(O),O.defaultPrevented||s==null||s())},f),T=r5(O=>{const N=O.target;[...c.branches].some(_=>_.contains(N))||(l==null||l(O),a==null||a(O),O.defaultPrevented||s==null||s())},f);return S1(O=>{v===c.layers.size-1&&(o==null||o(O),!O.defaultPrevented&&s&&(O.preventDefault(),s()))},f),x.useEffect(()=>{if(p)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(fm=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(p)),c.layers.add(p),dm(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=fm)}},[p,f,r,c]),x.useEffect(()=>()=>{p&&(c.layers.delete(p),c.layersWithOutsidePointerEventsDisabled.delete(p),dm())},[p,c]),x.useEffect(()=>{const O=()=>h({});return document.addEventListener(Dc,O),()=>document.removeEventListener(Dc,O)},[]),x.createElement(Ot.div,ge({},u,{ref:m,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:Xe(e.onFocusCapture,T.onFocusCapture),onBlurCapture:Xe(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:Xe(e.onPointerDownCapture,k.onPointerDownCapture)}))});function n5(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let c=function(){sv(ZE,n,u,{discrete:!0})};var s=c;const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function r5(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),r=x.useRef(!1);return x.useEffect(()=>{const o=i=>{i.target&&!r.current&&sv(JE,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function dm(){const e=new CustomEvent(Dc);document.dispatchEvent(e)}function sv(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?k1(o,i):o.dispatchEvent(i)}const o5=["top","right","bottom","left"],ir=Math.min,xt=Math.max,ya=Math.round,vl=Math.floor,lr=e=>({x:e,y:e}),i5={left:"right",right:"left",bottom:"top",top:"bottom"},l5={start:"end",end:"start"};function zc(e,t,n){return xt(e,ir(t,n))}function An(e,t){return typeof e=="function"?e(t):e}function $n(e){return e.split("-")[0]}function Po(e){return e.split("-")[1]}function df(e){return e==="x"?"y":"x"}function hf(e){return e==="y"?"height":"width"}function To(e){return["top","bottom"].includes($n(e))?"y":"x"}function mf(e){return df(To(e))}function a5(e,t,n){n===void 0&&(n=!1);const r=Po(e),o=mf(e),i=hf(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=va(l)),[l,va(l)]}function s5(e){const t=va(e);return[Nc(e),t,Nc(t)]}function Nc(e){return e.replace(/start|end/g,t=>l5[t])}function u5(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}function c5(e,t,n,r){const o=Po(e);let i=u5($n(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(Nc)))),i}function va(e){return e.replace(/left|right|bottom|top/g,t=>i5[t])}function p5(e){return{top:0,right:0,bottom:0,left:0,...e}}function uv(e){return typeof e!="number"?p5(e):{top:e,right:e,bottom:e,left:e}}function wa(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function hm(e,t,n){let{reference:r,floating:o}=e;const i=To(t),l=mf(t),a=hf(l),s=$n(t),u=i==="y",c=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2;let f;switch(s){case"top":f={x:c,y:r.y-o.height};break;case"bottom":f={x:c,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:p};break;case"left":f={x:r.x-o.width,y:p};break;default:f={x:r.x,y:r.y}}switch(Po(t)){case"start":f[l]-=d*(n&&u?-1:1);break;case"end":f[l]+=d*(n&&u?-1:1);break}return f}const f5=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:p}=hm(u,r,s),d=r,f={},h=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:a}=t,{element:s,padding:u=0}=An(e,t)||{};if(s==null)return{};const c=uv(u),p={x:n,y:r},d=mf(o),f=hf(d),h=await l.getDimensions(s),m=d==="y",w=m?"top":"left",g=m?"bottom":"right",y=m?"clientHeight":"clientWidth",v=i.reference[f]+i.reference[d]-p[d]-i.floating[f],C=p[d]-i.reference[d],E=await(l.getOffsetParent==null?void 0:l.getOffsetParent(s));let k=E?E[y]:0;(!k||!await(l.isElement==null?void 0:l.isElement(E)))&&(k=a.floating[y]||i.floating[f]);const T=v/2-C/2,O=k/2-h[f]/2-1,N=ir(c[w],O),P=ir(c[g],O),_=N,R=k-h[f]-P,H=k/2-h[f]/2+T,q=zc(_,H,R),Q=Po(o)!=null&&H!=q&&i.reference[f]/2-(H<_?N:P)-h[f]/2<0?H<_?_-H:R-H:0;return{[d]:p[d]-Q,data:{[d]:q,centerOffset:H-q+Q}}}}),d5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:l,platform:a,elements:s}=t,{mainAxis:u=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:h=!0,...m}=An(e,t),w=$n(r),g=$n(l)===l,y=await(a.isRTL==null?void 0:a.isRTL(s.floating)),v=p||(g||!h?[va(l)]:s5(l));!p&&f!=="none"&&v.push(...c5(l,h,f,y));const C=[l,...v],E=await Oi(t,m),k=[];let T=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&k.push(E[w]),c){const _=a5(r,i,y);k.push(E[_[0]],E[_[1]])}if(T=[...T,{placement:r,overflows:k}],!k.every(_=>_<=0)){var O,N;const _=(((O=o.flip)==null?void 0:O.index)||0)+1,R=C[_];if(R)return{data:{index:_,overflows:T},reset:{placement:R}};let H=(N=T.filter(q=>q.overflows[0]<=0).sort((q,W)=>q.overflows[1]-W.overflows[1])[0])==null?void 0:N.placement;if(!H)switch(d){case"bestFit":{var P;const q=(P=T.map(W=>[W.placement,W.overflows.filter(Q=>Q>0).reduce((Q,te)=>Q+te,0)]).sort((W,Q)=>W[1]-Q[1])[0])==null?void 0:P[0];q&&(H=q);break}case"initialPlacement":H=l;break}if(r!==H)return{reset:{placement:H}}}return{}}}};function gm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ym(e){return o5.some(t=>e[t]>=0)}const h5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=An(e,t);switch(r){case"referenceHidden":{const i=await Oi(t,{...o,elementContext:"reference"}),l=gm(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:ym(l)}}}case"escaped":{const i=await Oi(t,{...o,altBoundary:!0}),l=gm(i,n.floating);return{data:{escapedOffsets:l,escaped:ym(l)}}}default:return{}}}}};async function m5(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=$n(n),a=Po(n),s=To(n)==="y",u=["left","top"].includes(l)?-1:1,c=i&&s?-1:1,p=An(t,e);let{mainAxis:d,crossAxis:f,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return a&&typeof h=="number"&&(f=a==="end"?h*-1:h),s?{x:f*c,y:d*u}:{x:d*u,y:f*c}}const g5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await m5(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},y5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:w=>{let{x:g,y}=w;return{x:g,y}}},...s}=An(e,t),u={x:n,y:r},c=await Oi(t,s),p=To($n(o)),d=df(p);let f=u[d],h=u[p];if(i){const w=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=f+c[w],v=f-c[g];f=zc(y,f,v)}if(l){const w=p==="y"?"top":"left",g=p==="y"?"bottom":"right",y=h+c[w],v=h-c[g];h=zc(y,h,v)}const m=a.fn({...t,[d]:f,[p]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},v5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:s=!0,crossAxis:u=!0}=An(e,t),c={x:n,y:r},p=To(o),d=df(p);let f=c[d],h=c[p];const m=An(a,t),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){const v=d==="y"?"height":"width",C=i.reference[d]-i.floating[v]+w.mainAxis,E=i.reference[d]+i.reference[v]-w.mainAxis;fE&&(f=E)}if(u){var g,y;const v=d==="y"?"width":"height",C=["top","left"].includes($n(o)),E=i.reference[p]-i.floating[v]+(C&&((g=l.offset)==null?void 0:g[p])||0)+(C?0:w.crossAxis),k=i.reference[p]+i.reference[v]+(C?0:((y=l.offset)==null?void 0:y[p])||0)-(C?w.crossAxis:0);hk&&(h=k)}return{[d]:f,[p]:h}}}},w5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=()=>{},...a}=An(e,t),s=await Oi(t,a),u=$n(n),c=Po(n),p=To(n)==="y",{width:d,height:f}=r.floating;let h,m;u==="top"||u==="bottom"?(h=u,m=c===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=u,h=c==="end"?"top":"bottom");const w=f-s[h],g=d-s[m],y=!t.middlewareData.shift;let v=w,C=g;if(p){const k=d-s.left-s.right;C=c||y?ir(g,k):k}else{const k=f-s.top-s.bottom;v=c||y?ir(w,k):k}if(y&&!c){const k=xt(s.left,0),T=xt(s.right,0),O=xt(s.top,0),N=xt(s.bottom,0);p?C=d-2*(k!==0||T!==0?k+T:xt(s.left,s.right)):v=f-2*(O!==0||N!==0?O+N:xt(s.top,s.bottom))}await l({...t,availableWidth:C,availableHeight:v});const E=await o.getDimensions(i.floating);return d!==E.width||f!==E.height?{reset:{rects:!0}}:{}}}};function ar(e){return cv(e)?(e.nodeName||"").toLowerCase():"#document"}function St(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ln(e){var t;return(t=(cv(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function cv(e){return e instanceof Node||e instanceof St(e).Node}function _n(e){return e instanceof Element||e instanceof St(e).Element}function cn(e){return e instanceof HTMLElement||e instanceof St(e).HTMLElement}function vm(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof St(e).ShadowRoot}function Bi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function x5(e){return["table","td","th"].includes(ar(e))}function gf(e){const t=yf(),n=Ft(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function b5(e){let t=bo(e);for(;cn(t)&&!ms(t);){if(gf(t))return t;t=bo(t)}return null}function yf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ms(e){return["html","body","#document"].includes(ar(e))}function Ft(e){return St(e).getComputedStyle(e)}function gs(e){return _n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function bo(e){if(ar(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vm(e)&&e.host||Ln(e);return vm(t)?t.host:t}function pv(e){const t=bo(e);return ms(t)?e.ownerDocument?e.ownerDocument.body:e.body:cn(t)&&Bi(t)?t:pv(t)}function xa(e,t){var n;t===void 0&&(t=[]);const r=pv(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=St(r);return o?t.concat(i,i.visualViewport||[],Bi(r)?r:[]):t.concat(r,xa(r))}function fv(e){const t=Ft(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=cn(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=ya(n)!==i||ya(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function vf(e){return _n(e)?e:e.contextElement}function ao(e){const t=vf(e);if(!cn(t))return lr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=fv(t);let l=(i?ya(n.width):n.width)/r,a=(i?ya(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const k5=lr(0);function dv(e){const t=St(e);return!yf()||!t.visualViewport?k5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function S5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==St(e)?!1:t}function Ar(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=vf(e);let l=lr(1);t&&(r?_n(r)&&(l=ao(r)):l=ao(e));const a=S5(i,n,r)?dv(i):lr(0);let s=(o.left+a.x)/l.x,u=(o.top+a.y)/l.y,c=o.width/l.x,p=o.height/l.y;if(i){const d=St(i),f=r&&_n(r)?St(r):r;let h=d.frameElement;for(;h&&r&&f!==d;){const m=ao(h),w=h.getBoundingClientRect(),g=Ft(h),y=w.left+(h.clientLeft+parseFloat(g.paddingLeft))*m.x,v=w.top+(h.clientTop+parseFloat(g.paddingTop))*m.y;s*=m.x,u*=m.y,c*=m.x,p*=m.y,s+=y,u+=v,h=St(h).frameElement}}return wa({width:c,height:p,x:s,y:u})}function C5(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=cn(n),i=Ln(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a=lr(1);const s=lr(0);if((o||!o&&r!=="fixed")&&((ar(n)!=="body"||Bi(i))&&(l=gs(n)),cn(n))){const u=Ar(n);a=ao(n),s.x=u.x+n.clientLeft,s.y=u.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+s.x,y:t.y*a.y-l.scrollTop*a.y+s.y}}function E5(e){return Array.from(e.getClientRects())}function hv(e){return Ar(Ln(e)).left+gs(e).scrollLeft}function P5(e){const t=Ln(e),n=gs(e),r=e.ownerDocument.body,o=xt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=xt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+hv(e);const a=-n.scrollTop;return Ft(r).direction==="rtl"&&(l+=xt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}function T5(e,t){const n=St(e),r=Ln(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const u=yf();(!u||u&&t==="fixed")&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}function O5(e,t){const n=Ar(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=cn(e)?ao(e):lr(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y,s=o*i.x,u=r*i.y;return{width:l,height:a,x:s,y:u}}function wm(e,t,n){let r;if(t==="viewport")r=T5(e,n);else if(t==="document")r=P5(Ln(e));else if(_n(t))r=O5(t,n);else{const o=dv(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return wa(r)}function mv(e,t){const n=bo(e);return n===t||!_n(n)||ms(n)?!1:Ft(n).position==="fixed"||mv(n,t)}function A5(e,t){const n=t.get(e);if(n)return n;let r=xa(e).filter(a=>_n(a)&&ar(a)!=="body"),o=null;const i=Ft(e).position==="fixed";let l=i?bo(e):e;for(;_n(l)&&!ms(l);){const a=Ft(l),s=gf(l);!s&&a.position==="fixed"&&(o=null),(i?!s&&!o:!s&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Bi(l)&&!s&&mv(e,l))?r=r.filter(c=>c!==l):o=a,l=bo(l)}return t.set(e,r),r}function $5(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?A5(t,this._c):[].concat(n),r],a=l[0],s=l.reduce((u,c)=>{const p=wm(t,c,o);return u.top=xt(p.top,u.top),u.right=ir(p.right,u.right),u.bottom=ir(p.bottom,u.bottom),u.left=xt(p.left,u.left),u},wm(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function _5(e){return fv(e)}function R5(e,t,n){const r=cn(t),o=Ln(t),i=n==="fixed",l=Ar(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const s=lr(0);if(r||!r&&!i)if((ar(t)!=="body"||Bi(o))&&(a=gs(t)),r){const u=Ar(t,!0,i,t);s.x=u.x+t.clientLeft,s.y=u.y+t.clientTop}else o&&(s.x=hv(o));return{x:l.left+a.scrollLeft-s.x,y:l.top+a.scrollTop-s.y,width:l.width,height:l.height}}function xm(e,t){return!cn(e)||Ft(e).position==="fixed"?null:t?t(e):e.offsetParent}function gv(e,t){const n=St(e);if(!cn(e))return n;let r=xm(e,t);for(;r&&x5(r)&&Ft(r).position==="static";)r=xm(r,t);return r&&(ar(r)==="html"||ar(r)==="body"&&Ft(r).position==="static"&&!gf(r))?n:r||b5(e)||n}const L5=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||gv,i=this.getDimensions;return{reference:R5(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function D5(e){return Ft(e).direction==="rtl"}const z5={convertOffsetParentRelativeRectToViewportRelativeRect:C5,getDocumentElement:Ln,getClippingRect:$5,getOffsetParent:gv,getElementRects:L5,getClientRects:E5,getDimensions:_5,getScale:ao,isElement:_n,isRTL:D5};function N5(e,t){let n=null,r;const o=Ln(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function l(a,s){a===void 0&&(a=!1),s===void 0&&(s=1),i();const{left:u,top:c,width:p,height:d}=e.getBoundingClientRect();if(a||t(),!p||!d)return;const f=vl(c),h=vl(o.clientWidth-(u+p)),m=vl(o.clientHeight-(c+d)),w=vl(u),y={rootMargin:-f+"px "+-h+"px "+-m+"px "+-w+"px",threshold:xt(0,ir(1,s))||1};let v=!0;function C(E){const k=E[0].intersectionRatio;if(k!==s){if(!v)return l();k?l(!1,k):r=setTimeout(()=>{l(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(C,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,y)}n.observe(e)}return l(!0),i}function I5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,u=vf(e),c=o||i?[...u?xa(u):[],...xa(t)]:[];c.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const p=u&&a?N5(u,n):null;let d=-1,f=null;l&&(f=new ResizeObserver(g=>{let[y]=g;y&&y.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{f&&f.observe(t)})),n()}),u&&!s&&f.observe(u),f.observe(t));let h,m=s?Ar(e):null;s&&w();function w(){const g=Ar(e);m&&(g.x!==m.x||g.y!==m.y||g.width!==m.width||g.height!==m.height)&&n(),m=g,h=requestAnimationFrame(w)}return n(),()=>{c.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),p&&p(),f&&f.disconnect(),f=null,s&&cancelAnimationFrame(h)}}const F5=(e,t,n)=>{const r=new Map,o={platform:z5,...n},i={...o.platform,_c:r};return f5(e,t,{...o,platform:i})},j5=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mm({element:r.current,padding:o}).fn(n):{}:r?mm({element:r,padding:o}).fn(n):{}}}};var Bl=typeof document<"u"?x.useLayoutEffect:x.useEffect;function ba(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ba(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ba(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function yv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bm(e,t){const n=yv(e);return Math.round(t*n)/n}function km(e){const t=x.useRef(e);return Bl(()=>{t.current=e}),t}function M5(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:a=!0,whileElementsMounted:s,open:u}=e,[c,p]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,f]=x.useState(r);ba(d,r)||f(r);const[h,m]=x.useState(null),[w,g]=x.useState(null),y=x.useCallback(Q=>{Q!=k.current&&(k.current=Q,m(Q))},[m]),v=x.useCallback(Q=>{Q!==T.current&&(T.current=Q,g(Q))},[g]),C=i||h,E=l||w,k=x.useRef(null),T=x.useRef(null),O=x.useRef(c),N=km(s),P=km(o),_=x.useCallback(()=>{if(!k.current||!T.current)return;const Q={placement:t,strategy:n,middleware:d};P.current&&(Q.platform=P.current),F5(k.current,T.current,Q).then(te=>{const z={...te,isPositioned:!0};R.current&&!ba(O.current,z)&&(O.current=z,Ba.flushSync(()=>{p(z)}))})},[d,t,n,P]);Bl(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,p(Q=>({...Q,isPositioned:!1})))},[u]);const R=x.useRef(!1);Bl(()=>(R.current=!0,()=>{R.current=!1}),[]),Bl(()=>{if(C&&(k.current=C),E&&(T.current=E),C&&E){if(N.current)return N.current(C,E,_);_()}},[C,E,_,N]);const H=x.useMemo(()=>({reference:k,floating:T,setReference:y,setFloating:v}),[y,v]),q=x.useMemo(()=>({reference:C,floating:E}),[C,E]),W=x.useMemo(()=>{const Q={position:n,left:0,top:0};if(!q.floating)return Q;const te=bm(q.floating,c.x),z=bm(q.floating,c.y);return a?{...Q,transform:"translate("+te+"px, "+z+"px)",...yv(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:z}},[n,a,q.floating,c.x,c.y]);return x.useMemo(()=>({...c,update:_,refs:H,elements:q,floatingStyles:W}),[c,_,H,q,W])}const B5=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return x.createElement(Ot.svg,ge({},i,{ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:x.createElement("polygon",{points:"0,0 30,0 15,10"}))}),U5=B5;function H5(e){const[t,n]=x.useState(void 0);return vo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let l,a;if("borderBoxSize"in i){const s=i.borderBoxSize,u=Array.isArray(s)?s[0]:s;l=u.inlineSize,a=u.blockSize}else l=e.offsetWidth,a=e.offsetHeight;n({width:l,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const vv="Popper",[wv,xv]=Kp(vv),[W5,bv]=wv(vv),V5=e=>{const{__scopePopper:t,children:n}=e,[r,o]=x.useState(null);return x.createElement(W5,{scope:t,anchor:r,onAnchorChange:o},n)},G5="PopperAnchor",q5=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=bv(G5,n),l=x.useRef(null),a=Jt(t,l);return x.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:x.createElement(Ot.div,ge({},o,{ref:a}))}),kv="PopperContent",[Y5,Q5]=wv(kv),K5=x.forwardRef((e,t)=>{var n,r,o,i,l,a,s,u;const{__scopePopper:c,side:p="bottom",sideOffset:d=0,align:f="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:w=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:v=!1,avoidCollisions:C=!0,onPlaced:E,...k}=e,T=bv(kv,c),[O,N]=x.useState(null),P=Jt(t,Be=>N(Be)),[_,R]=x.useState(null),H=H5(_),q=(n=H==null?void 0:H.width)!==null&&n!==void 0?n:0,W=(r=H==null?void 0:H.height)!==null&&r!==void 0?r:0,Q=p+(f!=="center"?"-"+f:""),te=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},z=Array.isArray(w)?w:[w],G=z.length>0,S={padding:te,boundary:z.filter(e4),altBoundary:G},{refs:X,floatingStyles:I,placement:b,isPositioned:U,middlewareData:Y}=M5({strategy:"fixed",placement:Q,whileElementsMounted:I5,elements:{reference:T.anchor},middleware:[g5({mainAxis:d+W,alignmentAxis:h}),C&&y5({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?v5():void 0,...S}),C&&d5({...S}),w5({...S,apply:({elements:Be,rects:se,availableWidth:Fe,availableHeight:fe})=>{const{width:ze,height:hn}=se.reference,Ee=Be.floating.style;Ee.setProperty("--radix-popper-available-width",`${Fe}px`),Ee.setProperty("--radix-popper-available-height",`${fe}px`),Ee.setProperty("--radix-popper-anchor-width",`${ze}px`),Ee.setProperty("--radix-popper-anchor-height",`${hn}px`)}}),_&&j5({element:_,padding:m}),t4({arrowWidth:q,arrowHeight:W}),v&&h5({strategy:"referenceHidden"})]}),[A,ne]=Sv(b),B=un(E);vo(()=>{U&&(B==null||B())},[U,B]);const ye=(o=Y.arrow)===null||o===void 0?void 0:o.x,ie=(i=Y.arrow)===null||i===void 0?void 0:i.y,pe=((l=Y.arrow)===null||l===void 0?void 0:l.centerOffset)!==0,[J,Ie]=x.useState();return vo(()=>{O&&Ie(window.getComputedStyle(O).zIndex)},[O]),x.createElement("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:U?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(a=Y.transformOrigin)===null||a===void 0?void 0:a.x,(s=Y.transformOrigin)===null||s===void 0?void 0:s.y].join(" ")},dir:e.dir},x.createElement(Y5,{scope:c,placedSide:A,onArrowChange:R,arrowX:ye,arrowY:ie,shouldHideArrow:pe},x.createElement(Ot.div,ge({"data-side":A,"data-align":ne},k,{ref:P,style:{...k.style,animation:U?void 0:"none",opacity:(u=Y.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),X5="PopperArrow",Z5={top:"bottom",right:"left",bottom:"top",left:"right"},J5=x.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Q5(X5,r),l=Z5[i.placedSide];return x.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},x.createElement(U5,ge({},o,{ref:n,style:{...o.style,display:"block"}})))});function e4(e){return e!==null}const t4=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;const{placement:a,rects:s,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,d=p?0:e.arrowWidth,f=p?0:e.arrowHeight,[h,m]=Sv(a),w={start:"0%",center:"50%",end:"100%"}[m],g=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+d/2,y=((i=(l=u.arrow)===null||l===void 0?void 0:l.y)!==null&&i!==void 0?i:0)+f/2;let v="",C="";return h==="bottom"?(v=p?w:`${g}px`,C=`${-f}px`):h==="top"?(v=p?w:`${g}px`,C=`${s.floating.height+f}px`):h==="right"?(v=`${-f}px`,C=p?w:`${y}px`):h==="left"&&(v=`${s.floating.width+f}px`,C=p?w:`${y}px`),{data:{x:v,y:C}}}});function Sv(e){const[t,n="center"]=e.split("-");return[t,n]}const n4=V5,r4=q5,o4=K5,i4=J5,l4=x.forwardRef((e,t)=>x.createElement(Ot.span,ge({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),a4=l4,[ys,w_]=Kp("Tooltip",[xv]),vs=xv(),s4="TooltipProvider",u4=700,Ic="tooltip.open",[c4,wf]=ys(s4),p4=e=>{const{__scopeTooltip:t,delayDuration:n=u4,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[l,a]=x.useState(!0),s=x.useRef(!1),u=x.useRef(0);return x.useEffect(()=>{const c=u.current;return()=>window.clearTimeout(c)},[]),x.createElement(c4,{scope:t,isOpenDelayed:l,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:x.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:x.useCallback(c=>{s.current=c},[]),disableHoverableContent:o},i)},xf="Tooltip",[f4,ws]=ys(xf),d4=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:l,delayDuration:a}=e,s=wf(xf,e.__scopeTooltip),u=vs(t),[c,p]=x.useState(null),d=Il(),f=x.useRef(0),h=l??s.disableHoverableContent,m=a??s.delayDuration,w=x.useRef(!1),[g=!1,y]=x1({prop:r,defaultProp:o,onChange:T=>{T?(s.onOpen(),document.dispatchEvent(new CustomEvent(Ic))):s.onClose(),i==null||i(T)}}),v=x.useMemo(()=>g?w.current?"delayed-open":"instant-open":"closed",[g]),C=x.useCallback(()=>{window.clearTimeout(f.current),w.current=!1,y(!0)},[y]),E=x.useCallback(()=>{window.clearTimeout(f.current),y(!1)},[y]),k=x.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{w.current=!0,y(!0)},m)},[m,y]);return x.useEffect(()=>()=>window.clearTimeout(f.current),[]),x.createElement(n4,u,x.createElement(f4,{scope:t,contentId:d,open:g,stateAttribute:v,trigger:c,onTriggerChange:p,onTriggerEnter:x.useCallback(()=>{s.isOpenDelayed?k():C()},[s.isOpenDelayed,k,C]),onTriggerLeave:x.useCallback(()=>{h?E():window.clearTimeout(f.current)},[E,h]),onOpen:C,onClose:E,disableHoverableContent:h},n))},Sm="TooltipTrigger",h4=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ws(Sm,n),i=wf(Sm,n),l=vs(n),a=x.useRef(null),s=Jt(t,a,o.onTriggerChange),u=x.useRef(!1),c=x.useRef(!1),p=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),x.createElement(r4,ge({asChild:!0},l),x.createElement(Ot.button,ge({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:s,onPointerMove:Xe(e.onPointerMove,d=>{d.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),c.current=!0)}),onPointerLeave:Xe(e.onPointerLeave,()=>{o.onTriggerLeave(),c.current=!1}),onPointerDown:Xe(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Xe(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Xe(e.onBlur,o.onClose),onClick:Xe(e.onClick,o.onClose)})))}),m4="TooltipPortal",[x_,g4]=ys(m4,{forceMount:void 0}),Ai="TooltipContent",y4=x.forwardRef((e,t)=>{const n=g4(Ai,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,l=ws(Ai,e.__scopeTooltip);return x.createElement(qa,{present:r||l.open},l.disableHoverableContent?x.createElement(Cv,ge({side:o},i,{ref:t})):x.createElement(v4,ge({side:o},i,{ref:t})))}),v4=x.forwardRef((e,t)=>{const n=ws(Ai,e.__scopeTooltip),r=wf(Ai,e.__scopeTooltip),o=x.useRef(null),i=Jt(t,o),[l,a]=x.useState(null),{trigger:s,onClose:u}=n,c=o.current,{onPointerInTransitChange:p}=r,d=x.useCallback(()=>{a(null),p(!1)},[p]),f=x.useCallback((h,m)=>{const w=h.currentTarget,g={x:h.clientX,y:h.clientY},y=S4(g,w.getBoundingClientRect()),v=C4(g,y),C=E4(m.getBoundingClientRect()),E=T4([...v,...C]);a(E),p(!0)},[p]);return x.useEffect(()=>()=>d(),[d]),x.useEffect(()=>{if(s&&c){const h=w=>f(w,c),m=w=>f(w,s);return s.addEventListener("pointerleave",h),c.addEventListener("pointerleave",m),()=>{s.removeEventListener("pointerleave",h),c.removeEventListener("pointerleave",m)}}},[s,c,f,d]),x.useEffect(()=>{if(l){const h=m=>{const w=m.target,g={x:m.clientX,y:m.clientY},y=(s==null?void 0:s.contains(w))||(c==null?void 0:c.contains(w)),v=!P4(g,l);y?d():v&&(d(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[s,c,l,u,d]),x.createElement(Cv,ge({},e,{ref:i}))}),[w4,x4]=ys(xf,{isInside:!1}),Cv=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:l,...a}=e,s=ws(Ai,n),u=vs(n),{onClose:c}=s;return x.useEffect(()=>(document.addEventListener(Ic,c),()=>document.removeEventListener(Ic,c)),[c]),x.useEffect(()=>{if(s.trigger){const p=d=>{const f=d.target;f!=null&&f.contains(s.trigger)&&c()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[s.trigger,c]),x.createElement(t5,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:c},x.createElement(o4,ge({"data-state":s.stateAttribute},u,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),x.createElement(b1,null,r),x.createElement(w4,{scope:n,isInside:!0},x.createElement(a4,{id:s.contentId,role:"tooltip"},o||r))))}),b4="TooltipArrow",k4=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=vs(n);return x4(b4,n).isInside?null:x.createElement(i4,ge({},o,r,{ref:t}))});function S4(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function C4(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function E4(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function P4(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,l=t.length-1;ir!=c>r&&n<(u-a)*(r-s)/(c-s)+a&&(o=!o)}return o}function T4(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),O4(t)}function O4(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],l=n[n.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const A4=p4,$4=d4,_4=h4,Ev=y4,R4=k4,xs=_4;function Ui({children:e}){return L.jsx(A4,{children:L.jsx($4,{children:e})})}Ui.displayName="ToolTip";const Hi=x.forwardRef(({className:e,children:t,sideOffset:n=0,arrowClassName:r,...o},i)=>L.jsx(Ev,{ref:i,sideOffset:n,dir:"auto",className:On("opencopilot-text-primary opencopilot-font-medium opencopilot-px-2 opencopilot-bg-accent opencopilot-z-[50000] opencopilot-py-1 opencopilot-overflow-hidden opencopilot-shadow opencopilot-min-w-fit opencopilot-max-w-[15rem] opencopilot-select-none opencopilot-rounded-sm opencopilot-p-0.5 opencopilot-text-xs opencopilot-leading-none","opencopilot-animate-in opencopilot-fade-in-0 opencopilot-slide-in-from-bottom-5 data-[state=closed]:animate-out data-[state=closed]:opencopilot-slide-in-from-top-0",e),...o,children:L.jsxs(L.Fragment,{children:[t,L.jsx(R4,{className:On("opencopilot-fill-current opencopilot-text-accent opencopilot-animate-in opencopilot-slide-in-from-top-1 opencopilot-ease-out data-[state=closed]:opencopilot-animate-out",r)})]})}));Hi.displayName=Ev.displayName;function bf({text:e,every:t,onFinish:n,shouldStart:r=!0}){const[o,i]=x.useState(""),[l,a]=x.useState(0),[s,u]=x.useState(!1),c=t||1e-5;return x.useEffect(()=>{if(r)if(l{i(e.substring(0,l+1)),a(d=>d+1)},c);return()=>{clearInterval(p)}}else u(!0),typeof n=="function"&&n()},[e,l,c,n,r]),{displayText:o,isComplete:s,text:e}}const Cm=["http","https","mailto","tel"];function L4(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let o=-1;for(;++oo||(o=t.indexOf("#"),o!==-1&&r>o)?t:"javascript:void(0)"}/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT - */var z4=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};const Tv=_r(z4);function li(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Pm(e.position):"start"in e||"end"in e?Pm(e):"line"in e||"column"in e?jc(e):""}function jc(e){return Tm(e&&e.line)+":"+Tm(e&&e.column)}function Pm(e){return jc(e&&e.start)+"-"+jc(e&&e.end)}function Tm(e){return e&&typeof e=="number"?e:1}class Mt extends Error{constructor(t,n,r){const o=[null,null];let i={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const l=r.indexOf(":");l===-1?o[1]=r:(o[0]=r.slice(0,l),o[1]=r.slice(l+1))}n&&("type"in n||"position"in n?n.position&&(i=n.position):"start"in n||"end"in n?i=n:("line"in n||"column"in n)&&(i.start=n)),this.name=li(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=i.start.line,this.column=i.start.column,this.position=i,this.source=o[0],this.ruleId=o[1],this.file,this.actual,this.expected,this.url,this.note}}Mt.prototype.file="";Mt.prototype.name="";Mt.prototype.reason="";Mt.prototype.message="";Mt.prototype.stack="";Mt.prototype.fatal=null;Mt.prototype.column=null;Mt.prototype.line=null;Mt.prototype.source=null;Mt.prototype.ruleId=null;Mt.prototype.position=null;const nn={basename:N4,dirname:I4,extname:F4,join:j4,sep:"/"};function N4(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Wi(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.charCodeAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;o--;)if(e.charCodeAt(o)===47){if(i){n=o+1;break}}else l<0&&(i=!0,l=o+1),a>-1&&(e.charCodeAt(o)===t.charCodeAt(a--)?a<0&&(r=o):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function I4(e){if(Wi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function F4(e){Wi(e);let t=e.length,n=-1,r=0,o=-1,i=0,l;for(;t--;){const a=e.charCodeAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function j4(...e){let t=-1,n;for(;++t0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function B4(e,t){let n="",r=0,o=-1,i=0,l=-1,a,s;for(;++l<=e.length;){if(l2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),o=l,i=0;continue}}else if(n.length>0){n="",r=0,o=l,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),r=l-o-1;o=l,i=0}else a===46&&i>-1?i++:i=-1}return n}function Wi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const U4={cwd:H4};function H4(){return"/"}function Mc(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function W4(e){if(typeof e=="string")e=new URL(e);else if(!Mc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return V4(e)}function V4(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n"u"||Ul.call(t,o)},Dm=function(t,n){$m&&n.name==="__proto__"?$m(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},zm=function(t,n){if(n==="__proto__")if(Ul.call(t,n)){if(_m)return _m(t,n).value}else return;return t[n]},q4=function e(){var t,n,r,o,i,l,a=arguments[0],s=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},s=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});sl.length;let s;a&&l.push(o);try{s=e.apply(this,l)}catch(u){const c=u;if(a&&n)throw c;return o(c)}a||(s instanceof Promise?s.then(i,o):s instanceof Error?o(s):i(s))}function o(l,...a){n||(n=!0,t(l,...a))}function i(l){o(null,l)}}const K4=_v().freeze(),$v={}.hasOwnProperty;function _v(){const e=Y4(),t=[];let n={},r,o=-1;return i.data=l,i.Parser=void 0,i.Compiler=void 0,i.freeze=a,i.attachers=t,i.use=s,i.parse=u,i.stringify=c,i.run=p,i.runSync=d,i.process=f,i.processSync=h,i;function i(){const m=_v();let w=-1;for(;++w{if(k||!T||!O)E(k);else{const N=i.stringify(T,O);N==null||(J4(N)?O.value=N:O.result=N),E(k,O)}});function E(k,T){k||!T?v(k):y?y(T):w(null,T)}}}function h(m){let w;i.freeze(),du("processSync",i.Parser),hu("processSync",i.Compiler);const g=Wo(m);return i.process(g,y),jm("processSync","process",w),g;function y(v){w=!0,Am(v)}}}function Im(e,t){return typeof e=="function"&&e.prototype&&(X4(e.prototype)||t in e.prototype)}function X4(e){let t;for(t in e)if($v.call(e,t))return!0;return!1}function du(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function hu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function mu(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Fm(e){if(!Bc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function jm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wo(e){return Z4(e)?e:new Ov(e)}function Z4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function J4(e){return typeof e=="string"||Tv(e)}const eP={};function tP(e,t){const n=t||eP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Rv(e,r,o)}function Rv(e,t,n){if(nP(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Mm(e.children,t,n)}return Array.isArray(e)?Mm(e,t,n):""}function Mm(e,t,n){const r=[];let o=-1;for(;++oo?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);i0?(Ct(e,e.length,0,t),e):t}const Bm={}.hasOwnProperty;function Lv(e){const t={};let n=-1;for(;++nl))return;const T=t.events.length;let O=T,N,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(N){P=t.events[O][1].end;break}N=!0}for(g(r),k=T;kv;){const E=n[C];t.containerState=E[1],E[0].exit.call(t,e)}n.length=v}function y(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function dP(e,t,n){return he(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Sa(e){if(e===null||Se(e)||$r(e))return 1;if(bs(e))return 2}function ks(e,t,n){const r=[];let o=-1;for(;++o1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);Hm(p,-s),Hm(d,s),l={type:s>1?"strongSequence":"emphasisSequence",start:p,end:Object.assign({},e[r][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={type:s>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},l.start),e[n][1].start=Object.assign({},a.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Rt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Rt(u,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",i,t]]),u=Rt(u,ks(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Rt(u,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Rt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Ct(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n0&&ae(k)?he(e,y,"linePrefix",i+1)(k):y(k)}function y(k){return k===null||K(k)?e.check(Vm,m,C)(k):(e.enter("codeFlowValue"),v(k))}function v(k){return k===null||K(k)?(e.exit("codeFlowValue"),y(k)):(e.consume(k),v)}function C(k){return e.exit("codeFenced"),t(k)}function E(k,T,O){let N=0;return P;function P(W){return k.enter("lineEnding"),k.consume(W),k.exit("lineEnding"),_}function _(W){return k.enter("codeFencedFence"),ae(W)?he(k,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):R(W)}function R(W){return W===a?(k.enter("codeFencedFenceSequence"),H(W)):O(W)}function H(W){return W===a?(N++,k.consume(W),H):N>=l?(k.exit("codeFencedFenceSequence"),ae(W)?he(k,q,"whitespace")(W):q(W)):O(W)}function q(W){return W===null||K(W)?(k.exit("codeFencedFence"),T(W)):O(W)}}}function EP(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i)}function i(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const gu={name:"codeIndented",tokenize:TP},PP={tokenize:OP,partial:!0};function TP(e,t,n){const r=this;return o;function o(u){return e.enter("codeIndented"),he(e,i,"linePrefix",4+1)(u)}function i(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):K(u)?e.attempt(PP,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||K(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function OP(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):K(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):he(e,i,"linePrefix",4+1)(l)}function i(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):K(l)?o(l):n(l)}}const AP={name:"codeText",tokenize:RP,resolve:$P,previous:_P};function $P(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Fv(e,t,n,r,o,i,l,a,s){const u=s||Number.POSITIVE_INFINITY;let c=0;return p;function p(g){return g===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(g),e.exit(i),d):g===null||g===32||g===41||ka(g)?n(g):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(g))}function d(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(a),d(g)):g===null||g===60||K(g)?n(g):(e.consume(g),g===92?h:f)}function h(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function m(g){return!c&&(g===null||g===41||Se(g))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(g)):c999||f===null||f===91||f===93&&!s||f===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(f):f===93?(e.exit(i),e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):K(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||K(f)||a++>999?(e.exit("chunkString"),c(f)):(e.consume(f),s||(s=!ae(f)),f===92?d:p)}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,p):p(f)}}function Mv(e,t,n,r,o,i){let l;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(o),e.consume(d),e.exit(o),l=d===40?41:d,s):n(d)}function s(d){return d===l?(e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):(e.enter(i),u(d))}function u(d){return d===l?(e.exit(i),s(l)):d===null?n(d):K(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),he(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===l||d===null||K(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?p:c)}function p(d){return d===l||d===92?(e.consume(d),c):c(d)}}function ai(e,t){let n;return r;function r(o){return K(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):ae(o)?he(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}function Xt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const jP={name:"definition",tokenize:BP},MP={tokenize:UP,partial:!0};function BP(e,t,n){const r=this;let o;return i;function i(f){return e.enter("definition"),l(f)}function l(f){return jv.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return o=Xt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),s):n(f)}function s(f){return Se(f)?ai(e,u)(f):u(f)}function u(f){return Fv(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(MP,p,p)(f)}function p(f){return ae(f)?he(e,d,"whitespace")(f):d(f)}function d(f){return f===null||K(f)?(e.exit("definition"),r.parser.defined.push(o),t(f)):n(f)}}function UP(e,t,n){return r;function r(a){return Se(a)?ai(e,o)(a):n(a)}function o(a){return Mv(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return ae(a)?he(e,l,"whitespace")(a):l(a)}function l(a){return a===null||K(a)?t(a):n(a)}}const HP={name:"hardBreakEscape",tokenize:WP};function WP(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return K(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const VP={name:"headingAtx",tokenize:qP,resolve:GP};function GP(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ct(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function qP(e,t,n){let r=0;return o;function o(c){return e.enter("atxHeading"),i(c)}function i(c){return e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&r++<6?(e.consume(c),l):c===null||Se(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||K(c)?(e.exit("atxHeading"),t(c)):ae(c)?he(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||Se(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const YP=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],qm=["pre","script","style","textarea"],QP={name:"htmlFlow",tokenize:JP,resolveTo:ZP,concrete:!0},KP={tokenize:tT,partial:!0},XP={tokenize:eT,partial:!0};function ZP(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function JP(e,t,n){const r=this;let o,i,l,a,s;return u;function u(b){return c(b)}function c(b){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(b),p}function p(b){return b===33?(e.consume(b),d):b===47?(e.consume(b),i=!0,m):b===63?(e.consume(b),o=3,r.interrupt?t:S):at(b)?(e.consume(b),l=String.fromCharCode(b),w):n(b)}function d(b){return b===45?(e.consume(b),o=2,f):b===91?(e.consume(b),o=5,a=0,h):at(b)?(e.consume(b),o=4,r.interrupt?t:S):n(b)}function f(b){return b===45?(e.consume(b),r.interrupt?t:S):n(b)}function h(b){const U="CDATA[";return b===U.charCodeAt(a++)?(e.consume(b),a===U.length?r.interrupt?t:R:h):n(b)}function m(b){return at(b)?(e.consume(b),l=String.fromCharCode(b),w):n(b)}function w(b){if(b===null||b===47||b===62||Se(b)){const U=b===47,Y=l.toLowerCase();return!U&&!i&&qm.includes(Y)?(o=1,r.interrupt?t(b):R(b)):YP.includes(l.toLowerCase())?(o=6,U?(e.consume(b),g):r.interrupt?t(b):R(b)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(b):i?y(b):v(b))}return b===45||rt(b)?(e.consume(b),l+=String.fromCharCode(b),w):n(b)}function g(b){return b===62?(e.consume(b),r.interrupt?t:R):n(b)}function y(b){return ae(b)?(e.consume(b),y):P(b)}function v(b){return b===47?(e.consume(b),P):b===58||b===95||at(b)?(e.consume(b),C):ae(b)?(e.consume(b),v):P(b)}function C(b){return b===45||b===46||b===58||b===95||rt(b)?(e.consume(b),C):E(b)}function E(b){return b===61?(e.consume(b),k):ae(b)?(e.consume(b),E):v(b)}function k(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),s=b,T):ae(b)?(e.consume(b),k):O(b)}function T(b){return b===s?(e.consume(b),s=null,N):b===null||K(b)?n(b):(e.consume(b),T)}function O(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||Se(b)?E(b):(e.consume(b),O)}function N(b){return b===47||b===62||ae(b)?v(b):n(b)}function P(b){return b===62?(e.consume(b),_):n(b)}function _(b){return b===null||K(b)?R(b):ae(b)?(e.consume(b),_):n(b)}function R(b){return b===45&&o===2?(e.consume(b),Q):b===60&&o===1?(e.consume(b),te):b===62&&o===4?(e.consume(b),X):b===63&&o===3?(e.consume(b),S):b===93&&o===5?(e.consume(b),G):K(b)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(KP,I,H)(b)):b===null||K(b)?(e.exit("htmlFlowData"),H(b)):(e.consume(b),R)}function H(b){return e.check(XP,q,I)(b)}function q(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),W}function W(b){return b===null||K(b)?H(b):(e.enter("htmlFlowData"),R(b))}function Q(b){return b===45?(e.consume(b),S):R(b)}function te(b){return b===47?(e.consume(b),l="",z):R(b)}function z(b){if(b===62){const U=l.toLowerCase();return qm.includes(U)?(e.consume(b),X):R(b)}return at(b)&&l.length<8?(e.consume(b),l+=String.fromCharCode(b),z):R(b)}function G(b){return b===93?(e.consume(b),S):R(b)}function S(b){return b===62?(e.consume(b),X):b===45&&o===2?(e.consume(b),S):R(b)}function X(b){return b===null||K(b)?(e.exit("htmlFlowData"),I(b)):(e.consume(b),X)}function I(b){return e.exit("htmlFlow"),t(b)}}function eT(e,t,n){const r=this;return o;function o(l){return K(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):n(l)}function i(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function tT(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Vi,t,n)}}const nT={name:"htmlText",tokenize:rT};function rT(e,t,n){const r=this;let o,i,l;return a;function a(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),s}function s(S){return S===33?(e.consume(S),u):S===47?(e.consume(S),E):S===63?(e.consume(S),v):at(S)?(e.consume(S),O):n(S)}function u(S){return S===45?(e.consume(S),c):S===91?(e.consume(S),i=0,h):at(S)?(e.consume(S),y):n(S)}function c(S){return S===45?(e.consume(S),f):n(S)}function p(S){return S===null?n(S):S===45?(e.consume(S),d):K(S)?(l=p,te(S)):(e.consume(S),p)}function d(S){return S===45?(e.consume(S),f):p(S)}function f(S){return S===62?Q(S):S===45?d(S):p(S)}function h(S){const X="CDATA[";return S===X.charCodeAt(i++)?(e.consume(S),i===X.length?m:h):n(S)}function m(S){return S===null?n(S):S===93?(e.consume(S),w):K(S)?(l=m,te(S)):(e.consume(S),m)}function w(S){return S===93?(e.consume(S),g):m(S)}function g(S){return S===62?Q(S):S===93?(e.consume(S),g):m(S)}function y(S){return S===null||S===62?Q(S):K(S)?(l=y,te(S)):(e.consume(S),y)}function v(S){return S===null?n(S):S===63?(e.consume(S),C):K(S)?(l=v,te(S)):(e.consume(S),v)}function C(S){return S===62?Q(S):v(S)}function E(S){return at(S)?(e.consume(S),k):n(S)}function k(S){return S===45||rt(S)?(e.consume(S),k):T(S)}function T(S){return K(S)?(l=T,te(S)):ae(S)?(e.consume(S),T):Q(S)}function O(S){return S===45||rt(S)?(e.consume(S),O):S===47||S===62||Se(S)?N(S):n(S)}function N(S){return S===47?(e.consume(S),Q):S===58||S===95||at(S)?(e.consume(S),P):K(S)?(l=N,te(S)):ae(S)?(e.consume(S),N):Q(S)}function P(S){return S===45||S===46||S===58||S===95||rt(S)?(e.consume(S),P):_(S)}function _(S){return S===61?(e.consume(S),R):K(S)?(l=_,te(S)):ae(S)?(e.consume(S),_):N(S)}function R(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),o=S,H):K(S)?(l=R,te(S)):ae(S)?(e.consume(S),R):(e.consume(S),q)}function H(S){return S===o?(e.consume(S),o=void 0,W):S===null?n(S):K(S)?(l=H,te(S)):(e.consume(S),H)}function q(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Se(S)?N(S):(e.consume(S),q)}function W(S){return S===47||S===62||Se(S)?N(S):n(S)}function Q(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function te(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),z}function z(S){return ae(S)?he(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):G(S)}function G(S){return e.enter("htmlTextData"),l(S)}}const Cf={name:"labelEnd",tokenize:uT,resolveTo:sT,resolveAll:aT},oT={tokenize:cT},iT={tokenize:pT},lT={tokenize:fT};function aT(e){let t=-1;for(;++t=3&&(u===null||K(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===o?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),ae(u)?he(e,a,"whitespace")(u):a(u))}}const pt={name:"list",tokenize:bT,continuation:{tokenize:kT},exit:CT},wT={tokenize:ET,partial:!0},xT={tokenize:ST,partial:!0};function bT(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return a;function a(f){const h=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Uc(f)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Hl,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(f)}return n(f)}function s(f){return Uc(f)&&++l<10?(e.consume(f),s):(!r.interrupt||l<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Vi,r.interrupt?n:c,e.attempt(wT,d,p))}function c(f){return r.containerState.initialBlankLine=!0,i++,d(f)}function p(f){return ae(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),d):n(f)}function d(f){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function kT(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Vi,o,i);function o(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,he(e,t,"listItemIndent",r.containerState.size+1)(a)}function i(a){return r.containerState.furtherBlankLines||!ae(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xT,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,he(e,e.attempt(pt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ST(e,t,n){const r=this;return he(e,o,"listItemIndent",r.containerState.size+1);function o(i){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(i):n(i)}}function CT(e){e.exit(this.containerState.type)}function ET(e,t,n){const r=this;return he(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function o(i){const l=r.events[r.events.length-1];return!ae(i)&&l&&l[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Ym={name:"setextUnderline",tokenize:TT,resolveTo:PT};function PT(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const l={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",l,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=l,e.push(["exit",l,t]),e}function TT(e,t,n){const r=this;let o;return i;function i(u){let c=r.events.length,p;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){p=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),o=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===o?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),ae(u)?he(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||K(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const OT={tokenize:AT};function AT(e){const t=this,n=e.attempt(Vi,r,e.attempt(this.parser.constructs.flowInitial,o,he(e,e.attempt(this.parser.constructs.flow,o,e.attempt(DP,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const $T={resolveAll:Uv()},_T=Bv("string"),RT=Bv("text");function Bv(e){return{tokenize:t,resolveAll:Uv(e==="text"?LT:void 0)};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,l,a);return l;function l(c){return u(c)?i(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),s}function s(c){return u(c)?(n.exit("data"),i(c)):(n.consume(c),s)}function u(c){if(c===null)return!0;const p=o[c];let d=-1;if(p)for(;++d-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}i>0&&l.push(e[o].slice(0,i))}return l}function NT(e,t){let n=-1;const r=[];let o;for(;++ne.length){for(;o--;)if(e.charCodeAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,a=t.length-1;for(;o--;)if(e.charCodeAt(o)===47){if(i){n=o+1;break}}else l<0&&(i=!0,l=o+1),a>-1&&(e.charCodeAt(o)===t.charCodeAt(a--)?a<0&&(r=o):(a=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function N4(e){if(Wi(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function I4(e){Wi(e);let t=e.length,n=-1,r=0,o=-1,i=0,l;for(;t--;){const a=e.charCodeAt(t);if(a===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),a===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function F4(...e){let t=-1,n;for(;++t0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function M4(e,t){let n="",r=0,o=-1,i=0,l=-1,a,s;for(;++l<=e.length;){if(l2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),o=l,i=0;continue}}else if(n.length>0){n="",r=0,o=l,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),r=l-o-1;o=l,i=0}else a===46&&i>-1?i++:i=-1}return n}function Wi(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const B4={cwd:U4};function U4(){return"/"}function jc(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function H4(e){if(typeof e=="string")e=new URL(e);else if(!jc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return W4(e)}function W4(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n"u"||Ul.call(t,o)},Lm=function(t,n){Am&&n.name==="__proto__"?Am(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Dm=function(t,n){if(n==="__proto__")if(Ul.call(t,n)){if($m)return $m(t,n).value}else return;return t[n]},G4=function e(){var t,n,r,o,i,l,a=arguments[0],s=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},s=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});sl.length;let s;a&&l.push(o);try{s=e.apply(this,l)}catch(u){const c=u;if(a&&n)throw c;return o(c)}a||(s instanceof Promise?s.then(i,o):s instanceof Error?o(s):i(s))}function o(l,...a){n||(n=!0,t(l,...a))}function i(l){o(null,l)}}const Q4=$v().freeze(),Av={}.hasOwnProperty;function $v(){const e=q4(),t=[];let n={},r,o=-1;return i.data=l,i.Parser=void 0,i.Compiler=void 0,i.freeze=a,i.attachers=t,i.use=s,i.parse=u,i.stringify=c,i.run=p,i.runSync=d,i.process=f,i.processSync=h,i;function i(){const m=$v();let w=-1;for(;++w{if(k||!T||!O)E(k);else{const N=i.stringify(T,O);N==null||(Z4(N)?O.value=N:O.result=N),E(k,O)}});function E(k,T){k||!T?v(k):y?y(T):w(null,T)}}}function h(m){let w;i.freeze(),du("processSync",i.Parser),hu("processSync",i.Compiler);const g=Wo(m);return i.process(g,y),Fm("processSync","process",w),g;function y(v){w=!0,Om(v)}}}function Nm(e,t){return typeof e=="function"&&e.prototype&&(K4(e.prototype)||t in e.prototype)}function K4(e){let t;for(t in e)if(Av.call(e,t))return!0;return!1}function du(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function hu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function mu(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Im(e){if(!Mc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wo(e){return X4(e)?e:new Tv(e)}function X4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Z4(e){return typeof e=="string"||Pv(e)}const J4={};function eP(e,t){const n=t||J4,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _v(e,r,o)}function _v(e,t,n){if(tP(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return jm(e.children,t,n)}return Array.isArray(e)?jm(e,t,n):""}function jm(e,t,n){const r=[];let o=-1;for(;++oo?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);i0?(Ct(e,e.length,0,t),e):t}const Mm={}.hasOwnProperty;function Rv(e){const t={};let n=-1;for(;++nl))return;const T=t.events.length;let O=T,N,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(N){P=t.events[O][1].end;break}N=!0}for(g(r),k=T;kv;){const E=n[C];t.containerState=E[1],E[0].exit.call(t,e)}n.length=v}function y(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function fP(e,t,n){return he(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Sa(e){if(e===null||Se(e)||$r(e))return 1;if(bs(e))return 2}function ks(e,t,n){const r=[];let o=-1;for(;++o1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);Um(p,-s),Um(d,s),l={type:s>1?"strongSequence":"emphasisSequence",start:p,end:Object.assign({},e[r][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={type:s>1?"strong":"emphasis",start:Object.assign({},l.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},l.start),e[n][1].start=Object.assign({},a.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Rt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Rt(u,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",i,t]]),u=Rt(u,ks(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Rt(u,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Rt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Ct(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n0&&ae(k)?he(e,y,"linePrefix",i+1)(k):y(k)}function y(k){return k===null||K(k)?e.check(Wm,m,C)(k):(e.enter("codeFlowValue"),v(k))}function v(k){return k===null||K(k)?(e.exit("codeFlowValue"),y(k)):(e.consume(k),v)}function C(k){return e.exit("codeFenced"),t(k)}function E(k,T,O){let N=0;return P;function P(W){return k.enter("lineEnding"),k.consume(W),k.exit("lineEnding"),_}function _(W){return k.enter("codeFencedFence"),ae(W)?he(k,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):R(W)}function R(W){return W===a?(k.enter("codeFencedFenceSequence"),H(W)):O(W)}function H(W){return W===a?(N++,k.consume(W),H):N>=l?(k.exit("codeFencedFenceSequence"),ae(W)?he(k,q,"whitespace")(W):q(W)):O(W)}function q(W){return W===null||K(W)?(k.exit("codeFencedFence"),T(W)):O(W)}}}function CP(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i)}function i(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const gu={name:"codeIndented",tokenize:PP},EP={tokenize:TP,partial:!0};function PP(e,t,n){const r=this;return o;function o(u){return e.enter("codeIndented"),he(e,i,"linePrefix",4+1)(u)}function i(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):K(u)?e.attempt(EP,l,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||K(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),t(u)}}function TP(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):K(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):he(e,i,"linePrefix",4+1)(l)}function i(l){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(l):K(l)?o(l):n(l)}}const OP={name:"codeText",tokenize:_P,resolve:AP,previous:$P};function AP(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Iv(e,t,n,r,o,i,l,a,s){const u=s||Number.POSITIVE_INFINITY;let c=0;return p;function p(g){return g===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(g),e.exit(i),d):g===null||g===32||g===41||ka(g)?n(g):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),m(g))}function d(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(a),d(g)):g===null||g===60||K(g)?n(g):(e.consume(g),g===92?h:f)}function h(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function m(g){return!c&&(g===null||g===41||Se(g))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(g)):c999||f===null||f===91||f===93&&!s||f===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?n(f):f===93?(e.exit(i),e.enter(o),e.consume(f),e.exit(o),e.exit(r),t):K(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||K(f)||a++>999?(e.exit("chunkString"),c(f)):(e.consume(f),s||(s=!ae(f)),f===92?d:p)}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,p):p(f)}}function jv(e,t,n,r,o,i){let l;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(o),e.consume(d),e.exit(o),l=d===40?41:d,s):n(d)}function s(d){return d===l?(e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):(e.enter(i),u(d))}function u(d){return d===l?(e.exit(i),s(l)):d===null?n(d):K(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),he(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===l||d===null||K(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?p:c)}function p(d){return d===l||d===92?(e.consume(d),c):c(d)}}function ai(e,t){let n;return r;function r(o){return K(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):ae(o)?he(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}function Xt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const FP={name:"definition",tokenize:MP},jP={tokenize:BP,partial:!0};function MP(e,t,n){const r=this;let o;return i;function i(f){return e.enter("definition"),l(f)}function l(f){return Fv.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return o=Xt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),s):n(f)}function s(f){return Se(f)?ai(e,u)(f):u(f)}function u(f){return Iv(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(jP,p,p)(f)}function p(f){return ae(f)?he(e,d,"whitespace")(f):d(f)}function d(f){return f===null||K(f)?(e.exit("definition"),r.parser.defined.push(o),t(f)):n(f)}}function BP(e,t,n){return r;function r(a){return Se(a)?ai(e,o)(a):n(a)}function o(a){return jv(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return ae(a)?he(e,l,"whitespace")(a):l(a)}function l(a){return a===null||K(a)?t(a):n(a)}}const UP={name:"hardBreakEscape",tokenize:HP};function HP(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return K(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const WP={name:"headingAtx",tokenize:GP,resolve:VP};function VP(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ct(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function GP(e,t,n){let r=0;return o;function o(c){return e.enter("atxHeading"),i(c)}function i(c){return e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&r++<6?(e.consume(c),l):c===null||Se(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||K(c)?(e.exit("atxHeading"),t(c)):ae(c)?he(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||Se(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const qP=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Gm=["pre","script","style","textarea"],YP={name:"htmlFlow",tokenize:ZP,resolveTo:XP,concrete:!0},QP={tokenize:eT,partial:!0},KP={tokenize:JP,partial:!0};function XP(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ZP(e,t,n){const r=this;let o,i,l,a,s;return u;function u(b){return c(b)}function c(b){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(b),p}function p(b){return b===33?(e.consume(b),d):b===47?(e.consume(b),i=!0,m):b===63?(e.consume(b),o=3,r.interrupt?t:S):at(b)?(e.consume(b),l=String.fromCharCode(b),w):n(b)}function d(b){return b===45?(e.consume(b),o=2,f):b===91?(e.consume(b),o=5,a=0,h):at(b)?(e.consume(b),o=4,r.interrupt?t:S):n(b)}function f(b){return b===45?(e.consume(b),r.interrupt?t:S):n(b)}function h(b){const U="CDATA[";return b===U.charCodeAt(a++)?(e.consume(b),a===U.length?r.interrupt?t:R:h):n(b)}function m(b){return at(b)?(e.consume(b),l=String.fromCharCode(b),w):n(b)}function w(b){if(b===null||b===47||b===62||Se(b)){const U=b===47,Y=l.toLowerCase();return!U&&!i&&Gm.includes(Y)?(o=1,r.interrupt?t(b):R(b)):qP.includes(l.toLowerCase())?(o=6,U?(e.consume(b),g):r.interrupt?t(b):R(b)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(b):i?y(b):v(b))}return b===45||rt(b)?(e.consume(b),l+=String.fromCharCode(b),w):n(b)}function g(b){return b===62?(e.consume(b),r.interrupt?t:R):n(b)}function y(b){return ae(b)?(e.consume(b),y):P(b)}function v(b){return b===47?(e.consume(b),P):b===58||b===95||at(b)?(e.consume(b),C):ae(b)?(e.consume(b),v):P(b)}function C(b){return b===45||b===46||b===58||b===95||rt(b)?(e.consume(b),C):E(b)}function E(b){return b===61?(e.consume(b),k):ae(b)?(e.consume(b),E):v(b)}function k(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),s=b,T):ae(b)?(e.consume(b),k):O(b)}function T(b){return b===s?(e.consume(b),s=null,N):b===null||K(b)?n(b):(e.consume(b),T)}function O(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||Se(b)?E(b):(e.consume(b),O)}function N(b){return b===47||b===62||ae(b)?v(b):n(b)}function P(b){return b===62?(e.consume(b),_):n(b)}function _(b){return b===null||K(b)?R(b):ae(b)?(e.consume(b),_):n(b)}function R(b){return b===45&&o===2?(e.consume(b),Q):b===60&&o===1?(e.consume(b),te):b===62&&o===4?(e.consume(b),X):b===63&&o===3?(e.consume(b),S):b===93&&o===5?(e.consume(b),G):K(b)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(QP,I,H)(b)):b===null||K(b)?(e.exit("htmlFlowData"),H(b)):(e.consume(b),R)}function H(b){return e.check(KP,q,I)(b)}function q(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),W}function W(b){return b===null||K(b)?H(b):(e.enter("htmlFlowData"),R(b))}function Q(b){return b===45?(e.consume(b),S):R(b)}function te(b){return b===47?(e.consume(b),l="",z):R(b)}function z(b){if(b===62){const U=l.toLowerCase();return Gm.includes(U)?(e.consume(b),X):R(b)}return at(b)&&l.length<8?(e.consume(b),l+=String.fromCharCode(b),z):R(b)}function G(b){return b===93?(e.consume(b),S):R(b)}function S(b){return b===62?(e.consume(b),X):b===45&&o===2?(e.consume(b),S):R(b)}function X(b){return b===null||K(b)?(e.exit("htmlFlowData"),I(b)):(e.consume(b),X)}function I(b){return e.exit("htmlFlow"),t(b)}}function JP(e,t,n){const r=this;return o;function o(l){return K(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):n(l)}function i(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function eT(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Vi,t,n)}}const tT={name:"htmlText",tokenize:nT};function nT(e,t,n){const r=this;let o,i,l;return a;function a(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),s}function s(S){return S===33?(e.consume(S),u):S===47?(e.consume(S),E):S===63?(e.consume(S),v):at(S)?(e.consume(S),O):n(S)}function u(S){return S===45?(e.consume(S),c):S===91?(e.consume(S),i=0,h):at(S)?(e.consume(S),y):n(S)}function c(S){return S===45?(e.consume(S),f):n(S)}function p(S){return S===null?n(S):S===45?(e.consume(S),d):K(S)?(l=p,te(S)):(e.consume(S),p)}function d(S){return S===45?(e.consume(S),f):p(S)}function f(S){return S===62?Q(S):S===45?d(S):p(S)}function h(S){const X="CDATA[";return S===X.charCodeAt(i++)?(e.consume(S),i===X.length?m:h):n(S)}function m(S){return S===null?n(S):S===93?(e.consume(S),w):K(S)?(l=m,te(S)):(e.consume(S),m)}function w(S){return S===93?(e.consume(S),g):m(S)}function g(S){return S===62?Q(S):S===93?(e.consume(S),g):m(S)}function y(S){return S===null||S===62?Q(S):K(S)?(l=y,te(S)):(e.consume(S),y)}function v(S){return S===null?n(S):S===63?(e.consume(S),C):K(S)?(l=v,te(S)):(e.consume(S),v)}function C(S){return S===62?Q(S):v(S)}function E(S){return at(S)?(e.consume(S),k):n(S)}function k(S){return S===45||rt(S)?(e.consume(S),k):T(S)}function T(S){return K(S)?(l=T,te(S)):ae(S)?(e.consume(S),T):Q(S)}function O(S){return S===45||rt(S)?(e.consume(S),O):S===47||S===62||Se(S)?N(S):n(S)}function N(S){return S===47?(e.consume(S),Q):S===58||S===95||at(S)?(e.consume(S),P):K(S)?(l=N,te(S)):ae(S)?(e.consume(S),N):Q(S)}function P(S){return S===45||S===46||S===58||S===95||rt(S)?(e.consume(S),P):_(S)}function _(S){return S===61?(e.consume(S),R):K(S)?(l=_,te(S)):ae(S)?(e.consume(S),_):N(S)}function R(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),o=S,H):K(S)?(l=R,te(S)):ae(S)?(e.consume(S),R):(e.consume(S),q)}function H(S){return S===o?(e.consume(S),o=void 0,W):S===null?n(S):K(S)?(l=H,te(S)):(e.consume(S),H)}function q(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Se(S)?N(S):(e.consume(S),q)}function W(S){return S===47||S===62||Se(S)?N(S):n(S)}function Q(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function te(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),z}function z(S){return ae(S)?he(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):G(S)}function G(S){return e.enter("htmlTextData"),l(S)}}const Sf={name:"labelEnd",tokenize:sT,resolveTo:aT,resolveAll:lT},rT={tokenize:uT},oT={tokenize:cT},iT={tokenize:pT};function lT(e){let t=-1;for(;++t=3&&(u===null||K(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===o?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),ae(u)?he(e,a,"whitespace")(u):a(u))}}const pt={name:"list",tokenize:xT,continuation:{tokenize:bT},exit:ST},vT={tokenize:CT,partial:!0},wT={tokenize:kT,partial:!0};function xT(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return a;function a(f){const h=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Bc(f)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Hl,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(f)}return n(f)}function s(f){return Bc(f)&&++l<10?(e.consume(f),s):(!r.interrupt||l<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(Vi,r.interrupt?n:c,e.attempt(vT,d,p))}function c(f){return r.containerState.initialBlankLine=!0,i++,d(f)}function p(f){return ae(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),d):n(f)}function d(f){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function bT(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Vi,o,i);function o(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,he(e,t,"listItemIndent",r.containerState.size+1)(a)}function i(a){return r.containerState.furtherBlankLines||!ae(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wT,t,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,he(e,e.attempt(pt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function kT(e,t,n){const r=this;return he(e,o,"listItemIndent",r.containerState.size+1);function o(i){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(i):n(i)}}function ST(e){e.exit(this.containerState.type)}function CT(e,t,n){const r=this;return he(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function o(i){const l=r.events[r.events.length-1];return!ae(i)&&l&&l[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const qm={name:"setextUnderline",tokenize:PT,resolveTo:ET};function ET(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const l={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",l,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=l,e.push(["exit",l,t]),e}function PT(e,t,n){const r=this;let o;return i;function i(u){let c=r.events.length,p;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){p=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),o=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===o?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),ae(u)?he(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||K(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const TT={tokenize:OT};function OT(e){const t=this,n=e.attempt(Vi,r,e.attempt(this.parser.constructs.flowInitial,o,he(e,e.attempt(this.parser.constructs.flow,o,e.attempt(LP,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const AT={resolveAll:Bv()},$T=Mv("string"),_T=Mv("text");function Mv(e){return{tokenize:t,resolveAll:Bv(e==="text"?RT:void 0)};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,l,a);return l;function l(c){return u(c)?i(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),s}function s(c){return u(c)?(n.exit("data"),i(c)):(n.consume(c),s)}function u(c){if(c===null)return!0;const p=o[c];let d=-1;if(p)for(;++d-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}i>0&&l.push(e[o].slice(0,i))}return l}function zT(e,t){let n=-1;const r=[];let o;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const KT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wv(e){return e.replace(KT,XT)}function XT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return Hv(n.slice(i?2:1),i?16:10)}return Sf(n)||e}const Vv={}.hasOwnProperty,ZT=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),JT(n)(QT(qT(n).document().write(YT()(e,t,!0))))};function JT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ee),autolinkProtocol:_,autolinkEmail:_,atxHeading:a(Fe),blockQuote:a(pe),characterEscape:_,characterReference:_,codeFenced:a(J),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(J,s),codeText:a(Ie,s),codeTextData:_,data:_,codeFlowValue:_,definition:a(Be),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(se),hardBreakEscape:a(fe),hardBreakTrailing:a(fe),htmlFlow:a(ze,s),htmlFlowData:_,htmlText:a(ze,s),htmlTextData:_,image:a(hn),label:s,link:a(Ee),listItem:a(dr),listItemValue:h,listOrdered:a(fr,f),listUnordered:a(fr),paragraph:a(yt),reference:Y,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Fe),strong:a(ee),thematicBreak:a($o)},exit:{atxHeading:c(),atxHeadingSequence:T,autolink:c(),autolinkEmail:ie,autolinkProtocol:ye,blockQuote:c(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:B,codeFenced:c(y),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:w,codeFlowValue:R,codeIndented:c(v),codeText:c(te),codeTextData:R,data:R,definition:c(),definitionDestinationString:k,definitionLabelString:C,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(q),hardBreakTrailing:c(q),htmlFlow:c(W),htmlFlowData:R,htmlText:c(Q),htmlTextData:R,image:c(G),label:X,labelText:S,lineEnding:H,link:c(z),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:A,resourceDestinationString:I,resourceTitleString:b,resource:U,setextHeading:c(P),setextHeadingLineSequence:N,setextHeadingText:O,strong:c(),thematicBreak:c()}};Gv(t,(e||{}).mdastExtensions||[]);const n={};return r;function r($){let j={type:"root",children:[]};const Z={stack:[j],tokenStack:[],config:t,enter:u,exit:p,buffer:s,resume:d,setData:i,getData:l},be=[];let ke=-1;for(;++ke<$.length;)if($[ke][1].type==="listOrdered"||$[ke][1].type==="listUnordered")if($[ke][0]==="enter")be.push(ke);else{const Ut=be.pop();ke=o($,Ut,ke)}for(ke=-1;++ke<$.length;){const Ut=t[$[ke][0]];Vv.call(Ut,$[ke][1].type)&&Ut[$[ke][1].type].call(Object.assign({sliceSerialize:$[ke][2].sliceSerialize},Z),$[ke][1])}if(Z.tokenStack.length>0){const Ut=Z.tokenStack[Z.tokenStack.length-1];(Ut[1]||Km).call(Z,void 0,Ut[0])}for(j.position={start:jn($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:jn($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},ke=-1;++ke{const r=this.data("settings");return ZT(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function nO(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function rO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` -`}]}function oO(e,t){const n=t.value?t.value+` -`:"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,o={};r&&(o.className=["language-"+r]);let i={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function iO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oo(e){const t=[];let n=-1,r=0,o=0;for(;++n55295&&i<57344){const a=e.charCodeAt(n+1);i<56320&&a>56319&&a<57344?(l=String.fromCharCode(i,a),o=1):l="�"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function qv(e,t){const n=String(t.identifier).toUpperCase(),r=Oo(n.toLowerCase()),o=e.footnoteOrder.indexOf(n);let i;o===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,i=e.footnoteOrder.length):(e.footnoteCounts[n]++,i=o+1);const l=e.footnoteCounts[n],a={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,a);const s={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,s),e.applyData(t,s)}function aO(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const o=String(r);return n[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},qv(e,{type:"footnoteReference",identifier:o,position:t.position})}function sO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uO(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function Yv(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function cO(e,t){const n=e.definition(t.identifier);if(!n)return Yv(e,t);const r={src:Oo(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const o={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,o),e.applyData(t,o)}function pO(e,t){const n={src:Oo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function fO(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function dO(e,t){const n=e.definition(t.identifier);if(!n)return Yv(e,t);const r={href:Oo(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const o={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function hO(e,t){const n={href:Oo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function mO(e,t,n){const r=e.all(t),o=n?gO(n):Qv(t),i={},l=[];if(typeof t.checked=="boolean"){const c=r[0];let p;c&&c.type==="element"&&c.tagName==="p"?p=c:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const QT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Hv(e){return e.replace(QT,KT)}function KT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return Uv(n.slice(i?2:1),i?16:10)}return kf(n)||e}const Wv={}.hasOwnProperty,XT=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),ZT(n)(YT(GT(n).document().write(qT()(e,t,!0))))};function ZT(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ee),autolinkProtocol:_,autolinkEmail:_,atxHeading:a(Fe),blockQuote:a(pe),characterEscape:_,characterReference:_,codeFenced:a(J),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(J,s),codeText:a(Ie,s),codeTextData:_,data:_,codeFlowValue:_,definition:a(Be),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(se),hardBreakEscape:a(fe),hardBreakTrailing:a(fe),htmlFlow:a(ze,s),htmlFlowData:_,htmlText:a(ze,s),htmlTextData:_,image:a(hn),label:s,link:a(Ee),listItem:a(dr),listItemValue:h,listOrdered:a(fr,f),listUnordered:a(fr),paragraph:a(yt),reference:Y,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Fe),strong:a(ee),thematicBreak:a($o)},exit:{atxHeading:c(),atxHeadingSequence:T,autolink:c(),autolinkEmail:ie,autolinkProtocol:ye,blockQuote:c(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:B,codeFenced:c(y),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:w,codeFlowValue:R,codeIndented:c(v),codeText:c(te),codeTextData:R,data:R,definition:c(),definitionDestinationString:k,definitionLabelString:C,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(q),hardBreakTrailing:c(q),htmlFlow:c(W),htmlFlowData:R,htmlText:c(Q),htmlTextData:R,image:c(G),label:X,labelText:S,lineEnding:H,link:c(z),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:A,resourceDestinationString:I,resourceTitleString:b,resource:U,setextHeading:c(P),setextHeadingLineSequence:N,setextHeadingText:O,strong:c(),thematicBreak:c()}};Vv(t,(e||{}).mdastExtensions||[]);const n={};return r;function r($){let j={type:"root",children:[]};const Z={stack:[j],tokenStack:[],config:t,enter:u,exit:p,buffer:s,resume:d,setData:i,getData:l},be=[];let ke=-1;for(;++ke<$.length;)if($[ke][1].type==="listOrdered"||$[ke][1].type==="listUnordered")if($[ke][0]==="enter")be.push(ke);else{const Ut=be.pop();ke=o($,Ut,ke)}for(ke=-1;++ke<$.length;){const Ut=t[$[ke][0]];Wv.call(Ut,$[ke][1].type)&&Ut[$[ke][1].type].call(Object.assign({sliceSerialize:$[ke][2].sliceSerialize},Z),$[ke][1])}if(Z.tokenStack.length>0){const Ut=Z.tokenStack[Z.tokenStack.length-1];(Ut[1]||Qm).call(Z,void 0,Ut[0])}for(j.position={start:jn($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:jn($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},ke=-1;++ke{const r=this.data("settings");return XT(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function tO(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function nO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` +`}]}function rO(e,t){const n=t.value?t.value+` +`:"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,o={};r&&(o.className=["language-"+r]);let i={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function oO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oo(e){const t=[];let n=-1,r=0,o=0;for(;++n55295&&i<57344){const a=e.charCodeAt(n+1);i<56320&&a>56319&&a<57344?(l=String.fromCharCode(i,a),o=1):l="�"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Gv(e,t){const n=String(t.identifier).toUpperCase(),r=Oo(n.toLowerCase()),o=e.footnoteOrder.indexOf(n);let i;o===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,i=e.footnoteOrder.length):(e.footnoteCounts[n]++,i=o+1);const l=e.footnoteCounts[n],a={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,a);const s={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,s),e.applyData(t,s)}function lO(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const o=String(r);return n[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},Gv(e,{type:"footnoteReference",identifier:o,position:t.position})}function aO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sO(e,t){if(e.dangerous){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null}function qv(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+r};const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=r:o.push({type:"text",value:r}),o}function uO(e,t){const n=e.definition(t.identifier);if(!n)return qv(e,t);const r={src:Oo(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);const o={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,o),e.applyData(t,o)}function cO(e,t){const n={src:Oo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function pO(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function fO(e,t){const n=e.definition(t.identifier);if(!n)return qv(e,t);const r={href:Oo(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);const o={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function dO(e,t){const n={href:Oo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function hO(e,t,n){const r=e.all(t),o=n?mO(n):Yv(t),i={},l=[];if(typeof t.checked=="boolean"){const c=r[0];let p;c&&c.type==="element"&&c.tagName==="p"?p=c:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a1}function yO(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o-1?r.offset:null}}}function kO(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Ef(t.children[1]),s=Pf(t.children[t.children.length-1]);a.line&&s.line&&(l.position={start:a,end:s}),o.push(l)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function SO(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Jm(t.slice(o),o>0,!1)),i.join("")}function Jm(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===Xm||i===Zm;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===Xm||i===Zm;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function PO(e,t){const n={type:"text",value:EO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function TO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const OO={blockquote:nO,break:rO,code:oO,delete:iO,emphasis:lO,footnoteReference:qv,footnote:aO,heading:sO,html:uO,imageReference:cO,image:pO,inlineCode:fO,linkReference:dO,link:hO,listItem:mO,list:yO,paragraph:vO,root:wO,strong:xO,table:kO,tableCell:CO,tableRow:SO,text:PO,thematicBreak:TO,toml:wl,yaml:wl,definition:wl,footnoteDefinition:wl};function wl(){return null}const Tf=function(e){if(e==null)return RO;if(typeof e=="string")return _O(e);if(typeof e=="object")return Array.isArray(e)?AO(e):$O(e);if(typeof e=="function")return Ss(e);throw new Error("Expected function, string, or object as test")};function AO(e){const t=[];let n=-1;for(;++n":""))+")"})}return p;function p(){let d=[],f,h,m;if((!t||o(a,s,u[u.length-1]||null))&&(d=zO(n(a,u)),d[0]===eg))return d;if(a.children&&d[0]!==DO)for(h=(r?a.children.length:-1)+i,m=u.concat(a);h>-1&&h{const o=ng(r.identifier);o&&!tg.call(t,o)&&(t[o]=r)}),n;function n(r){const o=ng(r);return o&&tg.call(t,o)?t[o]:null}}function ng(e){return String(e||"").toUpperCase()}const Ca={}.hasOwnProperty;function FO(e,t){const n=t||{},r=n.allowDangerousHtml||!1,o={};return l.dangerous=r,l.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,l.footnoteLabel=n.footnoteLabel||"Footnotes",l.footnoteLabelTagName=n.footnoteLabelTagName||"h2",l.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},l.footnoteBackLabel=n.footnoteBackLabel||"Back to content",l.unknownHandler=n.unknownHandler,l.passThrough=n.passThrough,l.handlers={...OO,...n.handlers},l.definition=IO(e),l.footnoteById=o,l.footnoteOrder=[],l.footnoteCounts={},l.patch=jO,l.applyData=MO,l.one=a,l.all=s,l.wrap=UO,l.augment=i,Of(e,"footnoteDefinition",u=>{const c=String(u.identifier).toUpperCase();Ca.call(o,c)||(o[c]=u)}),l;function i(u,c){if(u&&"data"in u&&u.data){const p=u.data;p.hName&&(c.type!=="element"&&(c={type:"element",tagName:"",properties:{},children:[]}),c.tagName=p.hName),c.type==="element"&&p.hProperties&&(c.properties={...c.properties,...p.hProperties}),"children"in c&&c.children&&p.hChildren&&(c.children=p.hChildren)}if(u){const p="type"in u?u:{position:u};NO(p)||(c.position={start:Ef(p),end:Pf(p)})}return c}function l(u,c,p,d){return Array.isArray(p)&&(d=p,p={}),i(u,{type:"element",tagName:c,properties:p||{},children:d||[]})}function a(u,c){return Zv(l,u,c)}function s(u){return Af(l,u)}}function jO(e,t){e.position&&(t.position=bO(e))}function MO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&i&&(n.properties={...n.properties,...i}),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function Zv(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return Ca.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:Af(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):BO(e,t)}function Af(e,t){const n=[];if("children"in t){const r=t.children;let o=-1;for(;++o1}function gO(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o-1?r.offset:null}}}function bO(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=Cf(t.children[1]),s=Ef(t.children[t.children.length-1]);a.line&&s.line&&(l.position={start:a,end:s}),o.push(l)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function kO(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,a=l?l.length:t.children.length;let s=-1;const u=[];for(;++s0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Zm(t.slice(o),o>0,!1)),i.join("")}function Zm(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===Km||i===Xm;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===Km||i===Xm;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function EO(e,t){const n={type:"text",value:CO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function PO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const TO={blockquote:tO,break:nO,code:rO,delete:oO,emphasis:iO,footnoteReference:Gv,footnote:lO,heading:aO,html:sO,imageReference:uO,image:cO,inlineCode:pO,linkReference:fO,link:dO,listItem:hO,list:gO,paragraph:yO,root:vO,strong:wO,table:bO,tableCell:SO,tableRow:kO,text:EO,thematicBreak:PO,toml:wl,yaml:wl,definition:wl,footnoteDefinition:wl};function wl(){return null}const Pf=function(e){if(e==null)return _O;if(typeof e=="string")return $O(e);if(typeof e=="object")return Array.isArray(e)?OO(e):AO(e);if(typeof e=="function")return Ss(e);throw new Error("Expected function, string, or object as test")};function OO(e){const t=[];let n=-1;for(;++n":""))+")"})}return p;function p(){let d=[],f,h,m;if((!t||o(a,s,u[u.length-1]||null))&&(d=DO(n(a,u)),d[0]===Jm))return d;if(a.children&&d[0]!==LO)for(h=(r?a.children.length:-1)+i,m=u.concat(a);h>-1&&h{const o=tg(r.identifier);o&&!eg.call(t,o)&&(t[o]=r)}),n;function n(r){const o=tg(r);return o&&eg.call(t,o)?t[o]:null}}function tg(e){return String(e||"").toUpperCase()}const Ca={}.hasOwnProperty;function IO(e,t){const n=t||{},r=n.allowDangerousHtml||!1,o={};return l.dangerous=r,l.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,l.footnoteLabel=n.footnoteLabel||"Footnotes",l.footnoteLabelTagName=n.footnoteLabelTagName||"h2",l.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},l.footnoteBackLabel=n.footnoteBackLabel||"Back to content",l.unknownHandler=n.unknownHandler,l.passThrough=n.passThrough,l.handlers={...TO,...n.handlers},l.definition=NO(e),l.footnoteById=o,l.footnoteOrder=[],l.footnoteCounts={},l.patch=FO,l.applyData=jO,l.one=a,l.all=s,l.wrap=BO,l.augment=i,Tf(e,"footnoteDefinition",u=>{const c=String(u.identifier).toUpperCase();Ca.call(o,c)||(o[c]=u)}),l;function i(u,c){if(u&&"data"in u&&u.data){const p=u.data;p.hName&&(c.type!=="element"&&(c={type:"element",tagName:"",properties:{},children:[]}),c.tagName=p.hName),c.type==="element"&&p.hProperties&&(c.properties={...c.properties,...p.hProperties}),"children"in c&&c.children&&p.hChildren&&(c.children=p.hChildren)}if(u){const p="type"in u?u:{position:u};zO(p)||(c.position={start:Cf(p),end:Ef(p)})}return c}function l(u,c,p,d){return Array.isArray(p)&&(d=p,p={}),i(u,{type:"element",tagName:c,properties:p||{},children:d||[]})}function a(u,c){return Xv(l,u,c)}function s(u){return Of(l,u)}}function FO(e,t){e.position&&(t.position=xO(e))}function jO(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;typeof r=="string"&&(n.type==="element"?n.tagName=r:n={type:"element",tagName:r,properties:{},children:[]}),n.type==="element"&&i&&(n.properties={...n.properties,...i}),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function Xv(e,t,n){const r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return Ca.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?{...t,children:Of(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,n):MO(e,t)}function Of(e,t){const n=[];if("children"in t){const r=t.children;let o=-1;for(;++o0&&n.push({type:"text",value:` -`}),n}function HO(e){const t=[];let n=-1;for(;++n1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&p.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(p)}const u=o[o.length-1];if(u&&u.type==="element"&&u.tagName==="p"){const p=u.children[u.children.length-1];p&&p.type==="text"?p.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...s)}else o.push(...s);const c={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+l},children:e.wrap(o,!0)};e.patch(r,c),t.push(c)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:` +`}),n}function UO(e){const t=[];let n=-1;for(;++n1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&p.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(p)}const u=o[o.length-1];if(u&&u.type==="element"&&u.tagName==="p"){const p=u.children[u.children.length-1];p&&p.type==="text"?p.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...s)}else o.push(...s);const c={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+l},children:e.wrap(o,!0)};e.patch(r,c),t.push(c)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:` -`}]}}function Jv(e,t){const n=FO(e,t),r=n.one(e,null),o=HO(n);return o&&r.children.push({type:"text",value:` -`},o),Array.isArray(r)?{type:"root",children:r}:r}const WO=function(e,t){return e&&"run"in e?GO(e,t):qO(e||t)},VO=WO;function GO(e,t){return(n,r,o)=>{e.run(Jv(n,t),r,i=>{o(i)})}}function qO(e){return t=>Jv(t,e)}var ew={exports:{}},YO="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",QO=YO,KO=QO;function tw(){}function nw(){}nw.resetWarningCache=tw;var XO=function(){function e(r,o,i,l,a,s){if(s!==KO){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:nw,resetWarningCache:tw};return n.PropTypes=n,n};ew.exports=XO();var ZO=ew.exports;const re=_r(ZO);class Gi{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Gi.prototype.property={};Gi.prototype.normal={};Gi.prototype.space=null;function rw(e,t){const n={},r={};let o=-1;for(;++o4&&n.slice(0,4)==="data"&&r3.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(og,a3);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!og.test(i)){let l=i.replace(o3,l3);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=$f}return new o(r,t)}function l3(e){return"-"+e.toLowerCase()}function a3(e){return e.charAt(1).toUpperCase()}const ig={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},s3=rw([lw,iw,uw,cw,t3],"html"),u3=rw([lw,iw,uw,cw,n3],"svg");function c3(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{Of(t,"element",(n,r,o)=>{const i=o;let l;if(e.allowedElements?l=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(l=e.disallowedElements.includes(n.tagName)),!l&&e.allowElement&&typeof r=="number"&&(l=!e.allowElement(n,r,i)),l&&typeof r=="number")return e.unwrapDisallowed&&n.children?i.children.splice(r,1,...n.children):i.children.splice(r,1),r})}}function p3(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function f3(e){return e.join(" ").trim()}function d3(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var _f={exports:{}},lg=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,h3=/\n/g,m3=/^\s*/,g3=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,y3=/^:\s*/,v3=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,w3=/^[;\s]*/,x3=/^\s+|\s+$/g,b3=` -`,ag="/",sg="*",yr="",k3="comment",S3="declaration",C3=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(h){var m=h.match(h3);m&&(n+=m.length);var w=h.lastIndexOf(b3);r=~w?h.length-w:r+h.length}function i(){var h={line:n,column:r};return function(m){return m.position=new l(h),u(),m}}function l(h){this.start=h,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function s(h){var m=h.exec(e);if(m){var w=m[0];return o(w),e=e.slice(w.length),m}}function u(){s(m3)}function c(h){var m;for(h=h||[];m=p();)m!==!1&&h.push(m);return h}function p(){var h=i();if(!(ag!=e.charAt(0)||sg!=e.charAt(1))){for(var m=2;yr!=e.charAt(m)&&(sg!=e.charAt(m)||ag!=e.charAt(m+1));)++m;if(m+=2,yr===e.charAt(m-1))return a("End of comment missing");var w=e.slice(2,m-2);return r+=2,o(w),e=e.slice(m),r+=2,h({type:k3,comment:w})}}function d(){var h=i(),m=s(g3);if(m){if(p(),!s(y3))return a("property missing ':'");var w=s(v3),g=h({type:S3,property:ug(m[0].replace(lg,yr)),value:w?ug(w[0].replace(lg,yr)):yr});return s(w3),g}}function f(){var h=[];c(h);for(var m;m=d();)m!==!1&&(h.push(m),c(h));return h}return u(),f()};function ug(e){return e?e.replace(x3,yr):yr}var E3=C3;function pw(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,o=E3(e),i=typeof t=="function",l,a,s=0,u=o.length;s0?le.createElement(f,s,p):le.createElement(f,s)}function $3(e){let t=-1;for(;++t for more info)`),delete xl[i]}const t=K4().use(tO).use(e.remarkPlugins||[]).use(VO,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(c3,e),n=new Ov;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let o=le.createElement(le.Fragment,{},fw({options:e,schema:s3,listDepth:0},r));return e.className&&(o=le.createElement("div",{className:e.className},o)),o}dw.propTypes={children:re.string,className:re.string,allowElement:re.func,allowedElements:re.arrayOf(re.string),disallowedElements:re.arrayOf(re.string),unwrapDisallowed:re.bool,remarkPlugins:re.arrayOf(re.oneOfType([re.object,re.func,re.arrayOf(re.oneOfType([re.bool,re.string,re.object,re.func,re.arrayOf(re.any)]))])),rehypePlugins:re.arrayOf(re.oneOfType([re.object,re.func,re.arrayOf(re.oneOfType([re.bool,re.string,re.object,re.func,re.arrayOf(re.any)]))])),sourcePos:re.bool,rawSourcePos:re.bool,skipHtml:re.bool,includeElementIndex:re.bool,transformLinkUri:re.oneOfType([re.func,re.bool]),linkTarget:re.oneOfType([re.func,re.string]),transformImageUri:re.func,components:re.object};const N3={tokenize:U3,partial:!0},hw={tokenize:H3,partial:!0},mw={tokenize:W3,partial:!0},gw={tokenize:V3,partial:!0},I3={tokenize:G3,partial:!0},yw={tokenize:M3,previous:ww},vw={tokenize:B3,previous:xw},Dn={tokenize:j3,previous:bw},dn={},F3={text:dn};let hr=48;for(;hr<123;)dn[hr]=Dn,hr++,hr===58?hr=65:hr===91&&(hr=97);dn[43]=Dn;dn[45]=Dn;dn[46]=Dn;dn[95]=Dn;dn[72]=[Dn,vw];dn[104]=[Dn,vw];dn[87]=[Dn,yw];dn[119]=[Dn,yw];function j3(e,t,n){const r=this;let o,i;return l;function l(p){return!qc(p)||!bw.call(r,r.previous)||Rf(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(p))}function a(p){return qc(p)?(e.consume(p),a):p===64?(e.consume(p),s):n(p)}function s(p){return p===46?e.check(I3,c,u)(p):p===45||p===95||rt(p)?(i=!0,e.consume(p),s):c(p)}function u(p){return e.consume(p),o=!0,s}function c(p){return i&&o&&at(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function M3(e,t,n){const r=this;return o;function o(l){return l!==87&&l!==119||!ww.call(r,r.previous)||Rf(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(N3,e.attempt(hw,e.attempt(mw,i),n),n)(l))}function i(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function B3(e,t,n){const r=this;let o="",i=!1;return l;function l(p){return(p===72||p===104)&&xw.call(r,r.previous)&&!Rf(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),a):n(p)}function a(p){if(at(p)&&o.length<5)return o+=String.fromCodePoint(p),e.consume(p),a;if(p===58){const d=o.toLowerCase();if(d==="http"||d==="https")return e.consume(p),s}return n(p)}function s(p){return p===47?(e.consume(p),i?u:(i=!0,s)):n(p)}function u(p){return p===null||ka(p)||Se(p)||$r(p)||bs(p)?n(p):e.attempt(hw,e.attempt(mw,c),n)(p)}function c(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function U3(e,t,n){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),i):n(l)}function i(l){return l===null?n(l):t(l)}}function H3(e,t,n){let r,o,i;return l;function l(u){return u===46||u===95?e.check(gw,s,a)(u):u===null||Se(u)||$r(u)||u!==45&&bs(u)?s(u):(i=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(o=r,r=void 0),e.consume(u),l}function s(u){return o||r||!i?n(u):t(u)}}function W3(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const q3={tokenize:tA,partial:!0};function Y3(){return{document:{91:{tokenize:Z3,continuation:{tokenize:J3},exit:eA}},text:{91:{tokenize:X3},93:{add:"after",tokenize:Q3,resolveTo:K3}}}}function Q3(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const s=r.events[o][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return n(s);const u=Xt(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function K3(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function X3(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,l;return a;function a(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),s}function s(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(p){if(i>999||p===93&&!l||p===null||p===91||Se(p))return n(p);if(p===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return o.includes(Xt(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Se(p)||(l=!0),i++,e.consume(p),p===92?c:u}function c(p){return p===91||p===92||p===93?(e.consume(p),i++,u):u(p)}}function Z3(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l=0,a;return s;function s(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(h)}function c(h){if(l>999||h===93&&!a||h===null||h===91||Se(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Xt(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Se(h)||(a=!0),l++,e.consume(h),h===92?p:c}function p(h){return h===91||h===92||h===93?(e.consume(h),l++,c):c(h)}function d(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),he(e,f,"gfmFootnoteDefinitionWhitespace")):n(h)}function f(h){return t(h)}}function J3(e,t,n){return e.check(Vi,t,e.attempt(q3,t,n))}function eA(e){e.exit("gfmFootnoteDefinition")}function tA(e,t,n){const r=this;return he(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(i):n(i)}}function nA(e){let n=(e||{}).singleTilde;const r={tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(l,a){let s=-1;for(;++s1?s(h):(l.consume(h),p++,f);if(p<2&&!n)return s(h);const w=l.exit("strikethroughSequenceTemporary"),g=Sa(h);return w._open=!g||g===2&&!!m,w._close=!m||m===2&&!!g,a(h)}}}class rA{constructor(){this.map=[]}add(t,n,r){oA(this,t,n,r)}consume(t){if(this.map.sort((i,l)=>i[0]-l[0]),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1])),r.push(this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function oA(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o-1;){const q=r.events[_][1].type;if(q==="lineEnding"||q==="linePrefix")_--;else break}const R=_>-1?r.events[_][1].type:null,H=R==="tableHead"||R==="tableRow"?k:s;return H===k&&r.parser.lazy[r.now().line]?n(P):H(P)}function s(P){return e.enter("tableHead"),e.enter("tableRow"),u(P)}function u(P){return P===124||(l=!0,i+=1),c(P)}function c(P){return P===null?n(P):K(P)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),f):n(P):ae(P)?he(e,c,"whitespace")(P):(i+=1,l&&(l=!1,o+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),l=!0,c):(e.enter("data"),p(P)))}function p(P){return P===null||P===124||Se(P)?(e.exit("data"),c(P)):(e.consume(P),P===92?d:p)}function d(P){return P===92||P===124?(e.consume(P),p):p(P)}function f(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),l=!1,ae(P)?he(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):h(P))}function h(P){return P===45||P===58?w(P):P===124?(l=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),m):E(P)}function m(P){return ae(P)?he(e,w,"whitespace")(P):w(P)}function w(P){return P===58?(i+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),g):P===45?(i+=1,g(P)):P===null||K(P)?C(P):E(P)}function g(P){return P===45?(e.enter("tableDelimiterFiller"),y(P)):E(P)}function y(P){return P===45?(e.consume(P),y):P===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(P))}function v(P){return ae(P)?he(e,C,"whitespace")(P):C(P)}function C(P){return P===124?h(P):P===null||K(P)?!l||o!==i?E(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):E(P)}function E(P){return n(P)}function k(P){return e.enter("tableRow"),T(P)}function T(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),T):P===null||K(P)?(e.exit("tableRow"),t(P)):ae(P)?he(e,T,"whitespace")(P):(e.enter("data"),O(P))}function O(P){return P===null||P===124||Se(P)?(e.exit("data"),T(P)):(e.consume(P),P===92?N:O)}function N(P){return P===92||P===124?(e.consume(P),O):O(P)}}function sA(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,c,p;const d=new rA;for(;++nn[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return o!==void 0&&(i.end=Object.assign({},Br(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function pg(e,t,n,r,o){const i=[],l=Br(t.events,n);o&&(o.end=Object.assign({},l),i.push(["exit",o,t])),r.end=Object.assign({},l),i.push(["exit",r,t]),e.add(n+1,0,i)}function Br(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const uA={tokenize:pA},cA={text:{91:uA}};function pA(e,t,n){const r=this;return o;function o(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),i)}function i(s){return Se(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return K(s)?t(s):ae(s)?e.check({tokenize:fA},t,n)(s):n(s)}}function fA(e,t,n){return he(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function dA(e){return Lv([F3,Y3(),nA(e),lA,cA])}function fg(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function hA(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const mA={}.hasOwnProperty,gA=function(e,t,n,r){let o,i;typeof t=="string"||t instanceof RegExp?(i=[[t,n]],o=r):(i=t,o=n),o||(o={});const l=Tf(o.ignore||[]),a=yA(i);let s=-1;for(;++s0?{type:"text",value:T}:void 0),T!==!1&&(w!==E&&v.push({type:"text",value:p.value.slice(w,E)}),Array.isArray(T)?v.push(...T):T&&v.push(T),w=E+C[0].length,y=!0),!h.global)break;C=h.exec(p.value)}return y?(we}const xu="phrasing",bu=["autolink","link","image","label"],vA={transforms:[EA],enter:{literalAutolink:xA,literalAutolinkEmail:ku,literalAutolinkHttp:ku,literalAutolinkWww:ku},exit:{literalAutolink:CA,literalAutolinkEmail:SA,literalAutolinkHttp:bA,literalAutolinkWww:kA}},wA={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xu,notInConstruct:bu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xu,notInConstruct:bu},{character:":",before:"[ps]",after:"\\/",inConstruct:xu,notInConstruct:bu}]};function xA(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ku(e){this.config.enter.autolinkProtocol.call(this,e)}function bA(e){this.config.exit.autolinkProtocol.call(this,e)}function kA(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function SA(e){this.config.exit.autolinkEmail.call(this,e)}function CA(e){this.exit(e)}function EA(e){gA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,PA],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,TA]],{ignore:["link","linkReference"]})}function PA(e,t,n,r,o){let i="";if(!kw(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!OA(n)))return!1;const l=AA(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:i+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function TA(e,t,n,r){return!kw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function OA(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function AA(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=fg(e,"(");let i=fg(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function kw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||$r(n)||bs(n))&&(!t||n!==47)}function Sw(e){return e.label||!e.identifier?e.label||"":Wv(e.identifier)}function $A(e,t,n){const r=t.indexStack,o=e.children||[],i=t.createTracker(n),l=[];let a=-1;for(r.push(-1);++a{e.run(Zv(n,t),r,i=>{o(i)})}}function GO(e){return t=>Zv(t,e)}var Jv={exports:{}},qO="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",YO=qO,QO=YO;function ew(){}function tw(){}tw.resetWarningCache=ew;var KO=function(){function e(r,o,i,l,a,s){if(s!==QO){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:tw,resetWarningCache:ew};return n.PropTypes=n,n};Jv.exports=KO();var XO=Jv.exports;const re=_r(XO);class Gi{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Gi.prototype.property={};Gi.prototype.normal={};Gi.prototype.space=null;function nw(e,t){const n={},r={};let o=-1;for(;++o4&&n.slice(0,4)==="data"&&n3.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(rg,l3);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!rg.test(i)){let l=i.replace(r3,i3);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=Af}return new o(r,t)}function i3(e){return"-"+e.toLowerCase()}function l3(e){return e.charAt(1).toUpperCase()}const og={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},a3=nw([iw,ow,sw,uw,e3],"html"),s3=nw([iw,ow,sw,uw,t3],"svg");function u3(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{Tf(t,"element",(n,r,o)=>{const i=o;let l;if(e.allowedElements?l=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(l=e.disallowedElements.includes(n.tagName)),!l&&e.allowElement&&typeof r=="number"&&(l=!e.allowElement(n,r,i)),l&&typeof r=="number")return e.unwrapDisallowed&&n.children?i.children.splice(r,1,...n.children):i.children.splice(r,1),r})}}function c3(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function p3(e){return e.join(" ").trim()}function f3(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var $f={exports:{}},ig=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,d3=/\n/g,h3=/^\s*/,m3=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,g3=/^:\s*/,y3=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,v3=/^[;\s]*/,w3=/^\s+|\s+$/g,x3=` +`,lg="/",ag="*",yr="",b3="comment",k3="declaration",S3=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(h){var m=h.match(d3);m&&(n+=m.length);var w=h.lastIndexOf(x3);r=~w?h.length-w:r+h.length}function i(){var h={line:n,column:r};return function(m){return m.position=new l(h),u(),m}}function l(h){this.start=h,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function a(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function s(h){var m=h.exec(e);if(m){var w=m[0];return o(w),e=e.slice(w.length),m}}function u(){s(h3)}function c(h){var m;for(h=h||[];m=p();)m!==!1&&h.push(m);return h}function p(){var h=i();if(!(lg!=e.charAt(0)||ag!=e.charAt(1))){for(var m=2;yr!=e.charAt(m)&&(ag!=e.charAt(m)||lg!=e.charAt(m+1));)++m;if(m+=2,yr===e.charAt(m-1))return a("End of comment missing");var w=e.slice(2,m-2);return r+=2,o(w),e=e.slice(m),r+=2,h({type:b3,comment:w})}}function d(){var h=i(),m=s(m3);if(m){if(p(),!s(g3))return a("property missing ':'");var w=s(y3),g=h({type:k3,property:sg(m[0].replace(ig,yr)),value:w?sg(w[0].replace(ig,yr)):yr});return s(v3),g}}function f(){var h=[];c(h);for(var m;m=d();)m!==!1&&(h.push(m),c(h));return h}return u(),f()};function sg(e){return e?e.replace(w3,yr):yr}var C3=S3;function cw(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,o=C3(e),i=typeof t=="function",l,a,s=0,u=o.length;s0?le.createElement(f,s,p):le.createElement(f,s)}function A3(e){let t=-1;for(;++t for more info)`),delete xl[i]}const t=Q4().use(eO).use(e.remarkPlugins||[]).use(WO,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(u3,e),n=new Tv;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let o=le.createElement(le.Fragment,{},pw({options:e,schema:a3,listDepth:0},r));return e.className&&(o=le.createElement("div",{className:e.className},o)),o}fw.propTypes={children:re.string,className:re.string,allowElement:re.func,allowedElements:re.arrayOf(re.string),disallowedElements:re.arrayOf(re.string),unwrapDisallowed:re.bool,remarkPlugins:re.arrayOf(re.oneOfType([re.object,re.func,re.arrayOf(re.oneOfType([re.bool,re.string,re.object,re.func,re.arrayOf(re.any)]))])),rehypePlugins:re.arrayOf(re.oneOfType([re.object,re.func,re.arrayOf(re.oneOfType([re.bool,re.string,re.object,re.func,re.arrayOf(re.any)]))])),sourcePos:re.bool,rawSourcePos:re.bool,skipHtml:re.bool,includeElementIndex:re.bool,transformLinkUri:re.oneOfType([re.func,re.bool]),linkTarget:re.oneOfType([re.func,re.string]),transformImageUri:re.func,components:re.object};const z3={tokenize:B3,partial:!0},dw={tokenize:U3,partial:!0},hw={tokenize:H3,partial:!0},mw={tokenize:W3,partial:!0},N3={tokenize:V3,partial:!0},gw={tokenize:j3,previous:vw},yw={tokenize:M3,previous:ww},Dn={tokenize:F3,previous:xw},dn={},I3={text:dn};let hr=48;for(;hr<123;)dn[hr]=Dn,hr++,hr===58?hr=65:hr===91&&(hr=97);dn[43]=Dn;dn[45]=Dn;dn[46]=Dn;dn[95]=Dn;dn[72]=[Dn,yw];dn[104]=[Dn,yw];dn[87]=[Dn,gw];dn[119]=[Dn,gw];function F3(e,t,n){const r=this;let o,i;return l;function l(p){return!Gc(p)||!xw.call(r,r.previous)||_f(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(p))}function a(p){return Gc(p)?(e.consume(p),a):p===64?(e.consume(p),s):n(p)}function s(p){return p===46?e.check(N3,c,u)(p):p===45||p===95||rt(p)?(i=!0,e.consume(p),s):c(p)}function u(p){return e.consume(p),o=!0,s}function c(p){return i&&o&&at(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function j3(e,t,n){const r=this;return o;function o(l){return l!==87&&l!==119||!vw.call(r,r.previous)||_f(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(z3,e.attempt(dw,e.attempt(hw,i),n),n)(l))}function i(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function M3(e,t,n){const r=this;let o="",i=!1;return l;function l(p){return(p===72||p===104)&&ww.call(r,r.previous)&&!_f(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),a):n(p)}function a(p){if(at(p)&&o.length<5)return o+=String.fromCodePoint(p),e.consume(p),a;if(p===58){const d=o.toLowerCase();if(d==="http"||d==="https")return e.consume(p),s}return n(p)}function s(p){return p===47?(e.consume(p),i?u:(i=!0,s)):n(p)}function u(p){return p===null||ka(p)||Se(p)||$r(p)||bs(p)?n(p):e.attempt(dw,e.attempt(hw,c),n)(p)}function c(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function B3(e,t,n){let r=0;return o;function o(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),o):l===46&&r===3?(e.consume(l),i):n(l)}function i(l){return l===null?n(l):t(l)}}function U3(e,t,n){let r,o,i;return l;function l(u){return u===46||u===95?e.check(mw,s,a)(u):u===null||Se(u)||$r(u)||u!==45&&bs(u)?s(u):(i=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(o=r,r=void 0),e.consume(u),l}function s(u){return o||r||!i?n(u):t(u)}}function H3(e,t){let n=0,r=0;return o;function o(l){return l===40?(n++,e.consume(l),o):l===41&&r0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const G3={tokenize:eA,partial:!0};function q3(){return{document:{91:{tokenize:X3,continuation:{tokenize:Z3},exit:J3}},text:{91:{tokenize:K3},93:{add:"after",tokenize:Y3,resolveTo:Q3}}}}function Y3(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const s=r.events[o][1];if(s.type==="labelImage"){l=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return a;function a(s){if(!l||!l._balanced)return n(s);const u=Xt(r.sliceSerialize({start:l.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(s):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s))}}function Q3(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function K3(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,l;return a;function a(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),s}function s(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(p){if(i>999||p===93&&!l||p===null||p===91||Se(p))return n(p);if(p===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return o.includes(Xt(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Se(p)||(l=!0),i++,e.consume(p),p===92?c:u}function c(p){return p===91||p===92||p===93?(e.consume(p),i++,u):u(p)}}function X3(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l=0,a;return s;function s(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(h)}function c(h){if(l>999||h===93&&!a||h===null||h===91||Se(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Xt(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Se(h)||(a=!0),l++,e.consume(h),h===92?p:c}function p(h){return h===91||h===92||h===93?(e.consume(h),l++,c):c(h)}function d(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),he(e,f,"gfmFootnoteDefinitionWhitespace")):n(h)}function f(h){return t(h)}}function Z3(e,t,n){return e.check(Vi,t,e.attempt(G3,t,n))}function J3(e){e.exit("gfmFootnoteDefinition")}function eA(e,t,n){const r=this;return he(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(i):n(i)}}function tA(e){let n=(e||{}).singleTilde;const r={tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(l,a){let s=-1;for(;++s1?s(h):(l.consume(h),p++,f);if(p<2&&!n)return s(h);const w=l.exit("strikethroughSequenceTemporary"),g=Sa(h);return w._open=!g||g===2&&!!m,w._close=!m||m===2&&!!g,a(h)}}}class nA{constructor(){this.map=[]}add(t,n,r){rA(this,t,n,r)}consume(t){if(this.map.sort((i,l)=>i[0]-l[0]),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1])),r.push(this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function rA(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o-1;){const q=r.events[_][1].type;if(q==="lineEnding"||q==="linePrefix")_--;else break}const R=_>-1?r.events[_][1].type:null,H=R==="tableHead"||R==="tableRow"?k:s;return H===k&&r.parser.lazy[r.now().line]?n(P):H(P)}function s(P){return e.enter("tableHead"),e.enter("tableRow"),u(P)}function u(P){return P===124||(l=!0,i+=1),c(P)}function c(P){return P===null?n(P):K(P)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),f):n(P):ae(P)?he(e,c,"whitespace")(P):(i+=1,l&&(l=!1,o+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),l=!0,c):(e.enter("data"),p(P)))}function p(P){return P===null||P===124||Se(P)?(e.exit("data"),c(P)):(e.consume(P),P===92?d:p)}function d(P){return P===92||P===124?(e.consume(P),p):p(P)}function f(P){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(P):(e.enter("tableDelimiterRow"),l=!1,ae(P)?he(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):h(P))}function h(P){return P===45||P===58?w(P):P===124?(l=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),m):E(P)}function m(P){return ae(P)?he(e,w,"whitespace")(P):w(P)}function w(P){return P===58?(i+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),g):P===45?(i+=1,g(P)):P===null||K(P)?C(P):E(P)}function g(P){return P===45?(e.enter("tableDelimiterFiller"),y(P)):E(P)}function y(P){return P===45?(e.consume(P),y):P===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(P))}function v(P){return ae(P)?he(e,C,"whitespace")(P):C(P)}function C(P){return P===124?h(P):P===null||K(P)?!l||o!==i?E(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(P)):E(P)}function E(P){return n(P)}function k(P){return e.enter("tableRow"),T(P)}function T(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),T):P===null||K(P)?(e.exit("tableRow"),t(P)):ae(P)?he(e,T,"whitespace")(P):(e.enter("data"),O(P))}function O(P){return P===null||P===124||Se(P)?(e.exit("data"),T(P)):(e.consume(P),P===92?N:O)}function N(P){return P===92||P===124?(e.consume(P),O):O(P)}}function aA(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],l=[0,0,0,0],a=!1,s=0,u,c,p;const d=new nA;for(;++nn[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return o!==void 0&&(i.end=Object.assign({},Br(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function cg(e,t,n,r,o){const i=[],l=Br(t.events,n);o&&(o.end=Object.assign({},l),i.push(["exit",o,t])),r.end=Object.assign({},l),i.push(["exit",r,t]),e.add(n+1,0,i)}function Br(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const sA={tokenize:cA},uA={text:{91:sA}};function cA(e,t,n){const r=this;return o;function o(s){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(s):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),i)}function i(s){return Se(s)?(e.enter("taskListCheckValueUnchecked"),e.consume(s),e.exit("taskListCheckValueUnchecked"),l):s===88||s===120?(e.enter("taskListCheckValueChecked"),e.consume(s),e.exit("taskListCheckValueChecked"),l):n(s)}function l(s){return s===93?(e.enter("taskListCheckMarker"),e.consume(s),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(s)}function a(s){return K(s)?t(s):ae(s)?e.check({tokenize:pA},t,n)(s):n(s)}}function pA(e,t,n){return he(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function fA(e){return Rv([I3,q3(),tA(e),iA,uA])}function pg(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function dA(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const hA={}.hasOwnProperty,mA=function(e,t,n,r){let o,i;typeof t=="string"||t instanceof RegExp?(i=[[t,n]],o=r):(i=t,o=n),o||(o={});const l=Pf(o.ignore||[]),a=gA(i);let s=-1;for(;++s0?{type:"text",value:T}:void 0),T!==!1&&(w!==E&&v.push({type:"text",value:p.value.slice(w,E)}),Array.isArray(T)?v.push(...T):T&&v.push(T),w=E+C[0].length,y=!0),!h.global)break;C=h.exec(p.value)}return y?(we}const xu="phrasing",bu=["autolink","link","image","label"],yA={transforms:[CA],enter:{literalAutolink:wA,literalAutolinkEmail:ku,literalAutolinkHttp:ku,literalAutolinkWww:ku},exit:{literalAutolink:SA,literalAutolinkEmail:kA,literalAutolinkHttp:xA,literalAutolinkWww:bA}},vA={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xu,notInConstruct:bu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xu,notInConstruct:bu},{character:":",before:"[ps]",after:"\\/",inConstruct:xu,notInConstruct:bu}]};function wA(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ku(e){this.config.enter.autolinkProtocol.call(this,e)}function xA(e){this.config.exit.autolinkProtocol.call(this,e)}function bA(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function kA(e){this.config.exit.autolinkEmail.call(this,e)}function SA(e){this.exit(e)}function CA(e){mA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,EA],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,PA]],{ignore:["link","linkReference"]})}function EA(e,t,n,r,o){let i="";if(!bw(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!TA(n)))return!1;const l=OA(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:i+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function PA(e,t,n,r){return!bw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function TA(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function OA(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=pg(e,"(");let i=pg(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function bw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||$r(n)||bs(n))&&(!t||n!==47)}function kw(e){return e.label||!e.identifier?e.label||"":Hv(e.identifier)}function AA(e,t,n){const r=t.indexStack,o=e.children||[],i=t.createTracker(n),l=[];let a=-1;for(r.push(-1);++a `}return` -`}const RA=/\r?\n|\r/g;function LA(e,t){const n=[];let r=0,o=0,i;for(;i=RA.exec(e);)l(e.slice(r,i.index)),n.push(i[0]),r=i.index+i[0].length,o++;return l(e.slice(r)),n.join("");function l(a){n.push(t(a,o,!a))}}function Cw(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function DA(e,t){return mg(e,t.inConstruct,!0)&&!mg(e,t.notInConstruct,!1)}function mg(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r=u||c+10?" ":"")),o.shift(4),i+=o.move(LA($A(e,n,o.current()),YA)),l(),i}function YA(e,t,n){return t===0?e:(n?"":" ")+e}function Tw(e,t,n){const r=t.indexStack,o=e.children||[],i=[];let l=-1,a=n.before;r.push(-1);let s=t.createTracker(n);for(;++l0&&(a==="\r"||a===` -`)&&u.type==="html"&&(i[i.length-1]=i[i.length-1].replace(/(\r?\n|\r)$/," "),a=" ",s=t.createTracker(n),s.move(i.join(""))),i.push(s.move(t.handle(u,e,t,{...s.current(),before:a,after:c}))),a=i[i.length-1].slice(-1)}return r.pop(),i.join("")}const QA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ow.peek=e$;const KA={canContainEols:["delete"],enter:{strikethrough:ZA},exit:{strikethrough:JA}},XA={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:QA}],handlers:{delete:Ow}};function ZA(e){this.enter({type:"delete",children:[]},e)}function JA(e){this.exit(e)}function Ow(e,t,n,r){const o=Cs(r),i=n.enter("strikethrough");let l=o.move("~~");return l+=Tw(e,n,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),i(),l}function e$(){return"~"}Aw.peek=t$;function Aw(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++is&&(s=e[u].length);++wa[w])&&(a[w]=y)}h.push(g)}i[u]=h,l[u]=m}let c=-1;if(typeof n=="object"&&"length"in n)for(;++ca[c]&&(a[c]=g),d[c]=g),p[c]=y}i.splice(1,0,p),l.splice(1,0,d),u=-1;const f=[];for(;++un==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function a$(e){this.exit(e),this.setData("inTable")}function s$(e){this.enter({type:"tableRow",children:[]},e)}function Su(e){this.exit(e)}function vg(e){this.enter({type:"tableCell",children:[]},e)}function u$(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,c$));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function c$(e,t){return t==="|"?t:e}function p$(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`}const _A=/\r?\n|\r/g;function RA(e,t){const n=[];let r=0,o=0,i;for(;i=_A.exec(e);)l(e.slice(r,i.index)),n.push(i[0]),r=i.index+i[0].length,o++;return l(e.slice(r)),n.join("");function l(a){n.push(t(a,o,!a))}}function Sw(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function LA(e,t){return hg(e,t.inConstruct,!0)&&!hg(e,t.notInConstruct,!1)}function hg(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r=u||c+10?" ":"")),o.shift(4),i+=o.move(RA(AA(e,n,o.current()),qA)),l(),i}function qA(e,t,n){return t===0?e:(n?"":" ")+e}function Pw(e,t,n){const r=t.indexStack,o=e.children||[],i=[];let l=-1,a=n.before;r.push(-1);let s=t.createTracker(n);for(;++l0&&(a==="\r"||a===` +`)&&u.type==="html"&&(i[i.length-1]=i[i.length-1].replace(/(\r?\n|\r)$/," "),a=" ",s=t.createTracker(n),s.move(i.join(""))),i.push(s.move(t.handle(u,e,t,{...s.current(),before:a,after:c}))),a=i[i.length-1].slice(-1)}return r.pop(),i.join("")}const YA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Tw.peek=JA;const QA={canContainEols:["delete"],enter:{strikethrough:XA},exit:{strikethrough:ZA}},KA={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:YA}],handlers:{delete:Tw}};function XA(e){this.enter({type:"delete",children:[]},e)}function ZA(e){this.exit(e)}function Tw(e,t,n,r){const o=Cs(r),i=n.enter("strikethrough");let l=o.move("~~");return l+=Pw(e,n,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),i(),l}function JA(){return"~"}Ow.peek=e$;function Ow(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++is&&(s=e[u].length);++wa[w])&&(a[w]=y)}h.push(g)}i[u]=h,l[u]=m}let c=-1;if(typeof n=="object"&&"length"in n)for(;++ca[c]&&(a[c]=g),d[c]=g),p[c]=y}i.splice(1,0,p),l.splice(1,0,d),u=-1;const f=[];for(;++un==="none"?null:n),children:[]},e),this.setData("inTable",!0)}function l$(e){this.exit(e),this.setData("inTable")}function a$(e){this.enter({type:"tableRow",children:[]},e)}function Su(e){this.exit(e)}function yg(e){this.enter({type:"tableCell",children:[]},e)}function s$(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,u$));const n=this.stack[this.stack.length-1];n.value=t,this.exit(e)}function u$(e,t){return t==="|"?t:e}function c$(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:l,tableRow:a,tableCell:s,inlineCode:d}};function l(f,h,m,w){return u(c(f,m,w),f.align)}function a(f,h,m,w){const g=p(f,m,w),y=u([g]);return y.slice(0,y.indexOf(` -`))}function s(f,h,m,w){const g=m.enter("tableCell"),y=m.enter("phrasing"),v=Tw(f,m,{...w,before:i,after:i});return y(),g(),v}function u(f,h){return n$(f,{align:h,alignDelimiters:r,padding:n,stringLength:o})}function c(f,h,m){const w=f.children;let g=-1;const y=[],v=h.enter("table");for(;++g-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let l=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(i+" ".repeat(l-i.length)),a.shift(l);const s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),c);return s(),u;function c(p,d,f){return d?(f?"":" ".repeat(l))+p:(f?i:i+" ".repeat(l-i.length))+p}}const m$={exit:{taskListCheckValueChecked:wg,taskListCheckValueUnchecked:wg,paragraph:y$}},g$={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:v$}};function wg(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function y$(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1],r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,l;for(;++i1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var E$=["秒","分钟","小时","天","周","个月","年"];function P$(e,t){if(t===0)return["刚刚","片刻后"];var n=E$[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var Yc={},$w=function(e,t){Yc[e]=t},T$=function(e){return Yc[e]||Yc.en_US},Cu=[60,60,24,7,365/7/12,12];function xg(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function O$(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=Cu[o]&&o(o===0?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function A$(e,t){var n=t?xg(t):new Date;return(+n-+xg(e))/1e3}var $$=function(e,t,n){var r=A$(e,n&&n.relativeDate);return O$(r,T$(t))};$w("en_US",C$);$w("zh_CN",P$);function _$(e){const t=new Date(e),n=t.getHours(),r=String(t.getMinutes()).padStart(2,"0"),o=n>=12?"PM":"AM";return`${n%12||12}:${r} ${o}`}function R$(){const[e,t]=x.useState(!1),n=async r=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(r),t(!0),!0}catch(o){return console.warn("Copy failed",o),t(!1),!1}};return x.useEffect(()=>{if(e){const r=setTimeout(()=>{t(!1)},5e3);return()=>clearTimeout(r)}},[e]),[e,n]}function L$(e){return zr({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}}]})(e)}function D$(e){return zr({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"}}]})(e)}function z$(){return Date.now()}function N$(){var n,r,o,i;const e=Qp();return{notify:new Audio((r=(n=e==null?void 0:e.data)==null?void 0:n.sound_effects)==null?void 0:r.response),submit:new Audio((i=(o=e==null?void 0:e.data)==null?void 0:o.sound_effects)==null?void 0:i.submit)}}function bg(e){return typeof e=="string"?e.trim().length===0:Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:e===void 0}function Lf(){return Math.random().toString(36).substring(2,15)}function I$(e){return e[e.length-1]}function F$(e){let t=[];return e&&e.forEach(n=>{n.from_user?t.push({from:"user",content:n.message,id:n.id,timestamp:new Date(n.created_at)}):t.push({from:"bot",id:n.id,timestamp:new Date(n.created_at),type:"text",response:{text:n.message}})}),t}const _w=x.createContext(void 0),j$=({children:e})=>{const{data:t}=Qp(),[n,r]=x.useState([]);x.useLayoutEffect(()=>{t!=null&&t.history&&r(F$(t==null?void 0:t.history))},[t==null?void 0:t.history]);const o=N$(),[i,l]=x.useState(!1),[a,s]=x.useState(null),{axiosInstance:u}=p1(),c=Ni(),p=m=>{var g;m.from==="user"?o==null||o.submit.play():(g=o==null?void 0:o.notify)==null||g.play();const w={...m,timestamp:m.timestamp?m.timestamp:z$()};r(y=>[...y,w])},d=async m=>{m.from==="user"&&p(m),s(null),l(!0);try{const{data:w,status:g,statusText:y}=await u.post("/chat/send",{...m,headers:c==null?void 0:c.headers,user:c==null?void 0:c.user});g===200?p({...w,id:Lf(),from:"bot"}):s({message:m,reason:y})}catch(w){s({message:m,reason:w==null?void 0:w.message})}finally{l(!1)}};function f(){r([])}const h={messages:n,sendMessage:d,loading:i,failedMessage:a,reset:f};return L.jsx(_w.Provider,{value:h,children:e})},$i=()=>{const e=x.useContext(_w);if(!e)throw new Error("useChat must be used within a ChatProvider");return e};function Rw({error:e}){return L.jsx("img",{className:On("opencopilot-h-7 opencopilot-w-7 opencopilot-rounded-lg opencopilot-shrink-0 opencopilot-object-cover opencopilot-aspect-square hover:opencopilot-shadow",e&&"border opencopilot-border-rose-500 opencopilot-shadow-none"),src:"https://cdn.dribbble.com/users/281679/screenshots/14897126/media/f52c47307ac2daa0c727b1840c41d5ab.png?compress=1&resize=1600x1200&vertical=center",alt:"bot's avatar"})}function M$(){var t;const e=Ni();return L.jsxs(Ui,{children:[L.jsx(Hi,{hidden:!(e!=null&&e.user),side:"top",align:"center",children:(t=e==null?void 0:e.user)==null?void 0:t.name}),L.jsx(xs,{asChild:!0,children:L.jsx("div",{className:"opencopilot-rounded-lg opencopilot-shrink-0 opencopilot-bg-accent opencopilot-h-7 opencopilot-w-7 opencopilot-object-cover opencopilot-aspect-square hover:opencopilot-shadow opencopilot-border-primary-light opencopilot-border opencopilot-flex opencopilot-items-center opencopilot-justify-center",children:L.jsx("span",{className:"opencopilot-text-xl opencopilot-text-primary opencopilot-fill-current",children:L.jsx(k$,{})})})})]})}function kg({message:e,timestamp:t,id:n}){var s;const{displayText:r}=kf({text:e,every:1e-4,shouldStart:!0}),[o,i]=R$(),{messages:l}=$i(),a=((s=I$(l))==null?void 0:s.id)===n;return L.jsxs("div",{className:"opencopilot-p-2 group opencopilot-w-full opencopilot-shrink-0",children:[L.jsxs("div",{className:"opencopilot-flex opencopilot-select-none opencopilot-items-start opencopilot-gap-3 opencopilot-w-full",dir:"auto",children:[L.jsx(Rw,{}),L.jsx("div",{className:"opencopilot-space-y-2 opencopilot-flex-1",children:L.jsx("div",{className:"opencopilot-w-fit",children:L.jsx("div",{dir:"auto",children:L.jsx(dw,{remarkPlugins:[b$],className:"opencopilot-prose opencopilot-prose-slate opencopilot-font-medium opencopilot-text-sm opencopilot-prose-sm prose-h1:opencopilot-font-medium prose-h2:opencopilot-font-normal prose-headings:opencopilot-my-1 opencopilot-max-w-full",children:r})})})})]}),a&&L.jsxs("div",{className:"opencopilot-w-full opencopilot-ps-10 opencopilot-flex opencopilot-items-center opencopilot-justify-between",children:[L.jsx("div",{children:t&&L.jsxs("span",{className:"opencopilot-text-xs opencopilot-m-0",children:["Bot · ",$$(t)]})}),L.jsx("button",{className:"opencopilot-text-lg opencopilot-justify-self-end",onClick:()=>i(r),children:o?L.jsx(L$,{className:"opencopilot-text-emerald-500"}):L.jsx(D$,{})})]})]})}function B$(){const{displayText:e}=kf({text:"Bot is Thinking..."});return L.jsxs("div",{className:"opencopilot-p-2 opencopilot-flex opencopilot-items-center opencopilot-shrink-0 opencopilot-gap-3 opencopilot-w-full",children:[L.jsx("div",{className:"loading opencopilot-flex-col opencopilot-w-7 opencopilot-flex opencopilot-h-7 opencopilot-bg-accent opencopilot-text-primary opencopilot-rounded-lg opencopilot-shrink-0 opencopilot-mt-auto flex-center",children:L.jsx(qC,{height:"15",width:"15",color:"var(--opencopilot-primary-clr)",visible:!0})}),L.jsx("div",{className:"opencopilot-space-y-2 opencopilot-flex-1",children:L.jsx("div",{className:"mesg_body opencopilot-w-fit opencopilot-whitespace-nowrap opencopilot-max-w-full",children:L.jsx("p",{className:"opencopilot-text-sm opencopilot-lowercase",children:e})})})]})}function U$({content:e,timestamp:t}){return L.jsxs("div",{dir:"auto",className:"opencopilot-w-full opencopilot-overflow-x-auto opencopilot-shrink-0 opencopilot-max-w-full last-of-type:opencopilot-mb-10 opencopilot-bg-accent opencopilot-p-2 opencopilot-flex opencopilot-gap-3 opencopilot-items-center",children:[L.jsx(M$,{}),L.jsx("div",{children:L.jsxs(Ui,{children:[L.jsx(xs,{asChild:!0,children:L.jsx("p",{className:"opencopilot-prose opencopilot-prose-slate opencopilot-font-medium opencopilot-text-sm opencopilot-prose-sm",children:e})}),L.jsx(Hi,{children:L.jsx("span",{children:t&&_$(t)})})]})})]})}function H$({message:e}){const{displayText:t}=kf({text:"Error sending the message.",every:.001});return L.jsx("div",{className:"opencopilot-clear-both opencopilot-shrink-0 opencopilot-w-full opencopilot-p-2",children:L.jsxs("div",{className:"opencopilot-flex opencopilot-items-center opencopilot-gap-3 opencopilot-w-full",children:[L.jsx(Rw,{error:!0}),L.jsx("div",{className:"opencopilot-text-rose-500 opencopilot-text-sm",children:t})]})})}const W$=e=>[(n,r)=>{if(e.current){const{scrollWidth:o,scrollHeight:i}=e.current,l=o-e.current.clientWidth,a=i-e.current.clientHeight,s=n/100*l,u=r/100*a;e.current.scrollTo(s,u)}}];function V$(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var G$=x.useLayoutEffect,q$=function(t){var n=x.useRef(t);return G$(function(){n.current=t}),n},Sg=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},Y$=function(t,n){var r=x.useRef();return x.useCallback(function(o){t.current=o,r.current&&Sg(r.current,null),r.current=n,n&&Sg(n,o)},[n])},Cg={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Q$=function(t){Object.keys(Cg).forEach(function(n){t.style.setProperty(n,Cg[n],"important")})},Eg=Q$,it=null,Pg=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function K$(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),it||(it=document.createElement("textarea"),it.setAttribute("tabindex","-1"),it.setAttribute("aria-hidden","true"),Eg(it)),it.parentNode===null&&document.body.appendChild(it);var o=e.paddingSize,i=e.borderSize,l=e.sizingStyle,a=l.boxSizing;Object.keys(l).forEach(function(d){var f=d;it.style[f]=l[f]}),Eg(it),it.value=t;var s=Pg(it,e);it.value=t,s=Pg(it,e),it.value="x";var u=it.scrollHeight-o,c=u*n;a==="border-box"&&(c=c+o+i),s=Math.max(c,s);var p=u*r;return a==="border-box"&&(p=p+o+i),s=Math.min(p,s),[s,u]}var Tg=function(){},X$=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},Z$=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],J$=!!document.documentElement.currentStyle,e_=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=X$(Z$,n),o=r.boxSizing;if(o==="")return null;J$&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),l=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:l}},t_=e_;function Lw(e,t,n){var r=q$(n);x.useLayoutEffect(function(){var o=function(l){return r.current(l)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var n_=function(t){Lw(window,"resize",t)},r_=function(t){Lw(document.fonts,"loadingdone",t)},o_=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],i_=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,l=t.onChange,a=l===void 0?Tg:l,s=t.onHeightChange,u=s===void 0?Tg:s,c=V$(t,o_),p=c.value!==void 0,d=x.useRef(null),f=Y$(d,n),h=x.useRef(0),m=x.useRef(),w=function(){var v=d.current,C=r&&m.current?m.current:t_(v);if(C){m.current=C;var E=K$(C,v.value||v.placeholder||"x",i,o),k=E[0],T=E[1];h.current!==k&&(h.current=k,v.style.setProperty("height",k+"px","important"),u(k,{rowHeight:T}))}},g=function(v){p||w(),a(v)};return x.useLayoutEffect(w),n_(w),r_(w),x.createElement("textarea",ge({},c,{onChange:g,ref:f}))},l_=x.forwardRef(i_);function a_(e){return zr({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M1 1.91L1.78 1.5L15 7.44899V8.3999L1.78 14.33L1 13.91L2.58311 8L1 1.91ZM3.6118 8.5L2.33037 13.1295L13.5 7.8999L2.33037 2.83859L3.6118 7.43874L9 7.5V8.5H3.6118Z"}}]})(e)}function s_(e){return zr({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M13.1459 11.0499L12.9716 9.05752L15.3462 8.84977C14.4471 7.98322 13.2242 7.4503 11.8769 7.4503C9.11547 7.4503 6.87689 9.68888 6.87689 12.4503C6.87689 15.2117 9.11547 17.4503 11.8769 17.4503C13.6977 17.4503 15.2911 16.4771 16.1654 15.0224L18.1682 15.5231C17.0301 17.8487 14.6405 19.4503 11.8769 19.4503C8.0109 19.4503 4.87689 16.3163 4.87689 12.4503C4.87689 8.58431 8.0109 5.4503 11.8769 5.4503C13.8233 5.4503 15.5842 6.24474 16.853 7.52706L16.6078 4.72412L18.6002 4.5498L19.1231 10.527L13.1459 11.0499Z",fill:"currentColor"}}]})(e)}function u_(e){return zr({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M3 12h1m8 -9v1m8 8h1m-15.4 -6.4l.7 .7m12.1 -.7l-.7 .7"}},{tag:"path",attr:{d:"M9 16a5 5 0 1 1 6 0a3.5 3.5 0 0 0 -1 3a2 2 0 0 1 -4 0a3.5 3.5 0 0 0 -1 -3"}},{tag:"path",attr:{d:"M9.7 17l4.6 0"}}]})(e)}function c_(){const{data:e}=Qp(),{messages:t,sendMessage:n}=$i();return L.jsx(L.Fragment,{children:bg(t)&&!bg(e==null?void 0:e.inital_questions)&&L.jsxs("div",{className:"opencopilot-flex opencopilot-items-center opencopilot-gap-4 opencopilot-justify-between opencopilot-w-full opencopilot-px-4",children:[L.jsx("div",{className:"opencopilot-flex opencopilot-items-center opencopilot-flex-wrap opencopilot-gap-2 opencopilot-flex-1",children:e==null?void 0:e.inital_questions.map((r,o)=>L.jsx("button",{className:"opencopilot-text-xs opencopilot-w-fit opencopilot-font-semibold opencopilot-whitespace-nowrap opencopilot-px-2.5 opencopilot-py-1 opencopilot-rounded-full opencopilot-bg-accent opencopilot-text-primary",onClick:()=>{n({from:"user",content:r,id:Lf()})},children:r},o))}),L.jsxs(Ui,{children:[L.jsx(xs,{children:L.jsx("span",{className:"opencopilot-text-xl opencopilot-text-primary opencopilot-mb-auto",children:L.jsx(u_,{})})}),L.jsx(Hi,{asChild:!0,children:L.jsx("span",{className:"opencopilot-text-xs opencopilot-font-medium fade-in-bottom opencopilot-px-2 opencopilot-py-1 opencopilot-mb-3",children:"suggestions"})})]})]})})}function p_(){const[e,t]=x.useState(""),n=x.useRef(null),{sendMessage:r,reset:o,messages:i}=$i(),{loading:l}=$i(),a=e.trim().length>0,s=c=>{const p=c.currentTarget.value;t(p)};function u(){e.trim().length>0&&(t(""),r({from:"user",content:e,id:Lf()}))}return L.jsxs("footer",{className:"opencopilot-p-2 opencopilot-flex opencopilot-w-full opencopilot-flex-col opencopilot-gap-2",children:[L.jsx("div",{className:"opencopilot-overflow-y-auto opencopilot-w-full ",children:L.jsx(c_,{})}),L.jsxs("div",{className:"opencopilot-w-full opencopilot-flex opencopilot-items-center opencopilot-ring-[#334155]/60 opencopilot-transition-colors opencopilot-justify-between opencopilot-ring-1 opencopilot-overflow-hidden focus-within:opencopilot-ring-primary opencopilot-gap-2 opencopilot-bg-accent opencopilot-p-2 opencopilot-rounded-2xl",children:[L.jsx("div",{className:"opencopilot-flex-1",children:L.jsx(l_,{dir:"auto",ref:n,autoFocus:!0,onKeyDown:c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),u())},disabled:l,maxRows:4,rows:1,value:e,onChange:s,className:"opencopilot-w-full opencopilot-resize-none opencopilot-bg-transparent focus-visible:opencopilot-outline-none opencopilot-border-none focus:opencopilot-outline-none focus:opencopilot-border-none opencopilot-scrollbar-thin opencopilot-leading-tight opencopilot-whitespace-pre-wrap opencopilot-py-1.5 opencopilot-px-4 placeholder:opencopilot-align-middle opencopilot-overflow-auto opencopilot-outline-none opencopilot-text-accent2 opencopilot-text-[14px] placeholder:opencopilot-text-xs opencopilot-font-normal"})}),L.jsxs("div",{className:"opencopilot-flex opencopilot-items-center opencopilot-justify-center opencopilot-gap-2 opencopilot-h-fit opencopilot-px-2 opencopilot-text-lg",children:[L.jsxs(Ui,{children:[L.jsx(xs,{asChild:!0,children:L.jsx("button",{onClick:o,className:"opencopilot-text-xl disabled:opencopilot-opacity-40 disabled:opencopilot-pointer-events-none disabled:opencopilot-cursor-not-allowed opencopilot-text-[#5e5c5e] opencopilot-transition-all",disabled:!(i.length>0),children:L.jsx(s_,{})})}),L.jsx(Hi,{children:"reset chat"})]}),L.jsx("button",{onClick:u,className:"opencopilot-text-xl disabled:opencopilot-opacity-40 disabled:opencopilot-pointer-events-none disabled:opencopilot-cursor-not-allowed opencopilot-text-[#5e5c5e] opencopilot-transition-all",disabled:l||!a,children:L.jsx(a_,{})})]})]})]})}function f_({data:e,render:t,fallback:n}){return e.length===0?n:e.map((r,o)=>t(r,o))}function d_(){const e=x.useRef(null),[t]=W$(e),{messages:n,loading:r,failedMessage:o}=$i(),i=Ni(),l=i==null?void 0:i.initialMessage;return x.useEffect(()=>{t(0,100)},[]),x.useEffect(()=>{t(0,100)},[n,t]),L.jsxs("div",{className:"opencopilot-w-full opencopilot-flex opencopilot-h-full opencopilot-flex-col opencopilot-items-start opencopilot-relative",children:[L.jsx(HC,{}),L.jsx("main",{ref:e,className:"opencopilot-flex-1 opencopilot-w-full opencopilot-overflow-x-hidden opencopilot-shrink-0 opencopilot-overflow-auto opencopilot-scrollbar-thin opencopilot-scroll-smooth",children:L.jsxs("div",{className:"opencopilot-flex opencopilot-h-fit opencopilot-mt-auto opencopilot-flex-col opencopilot-py-2 opencopilot-max-h-full opencopilot-items-center opencopilot-gap-1 last:fade-in-right",children:[l&&L.jsx(kg,{message:l}),L.jsx(f_,{fallback:L.jsx("hr",{}),data:n,render:(a,s)=>{if(a.from==="bot"){if(a.type==="text")return L.jsx(kg,{timestamp:a.timestamp,id:a.id,message:a.response.text},s)}else if(a.from==="user")return L.jsx(U$,{id:a.id,timestamp:a.timestamp,content:a.content},s)}}),r&&L.jsx(B$,{}),o&&L.jsx(H$,{message:o})]})}),L.jsx(p_,{})]})}function h_(){return L.jsx(j$,{children:L.jsx(d_,{})})}const m_=typeof window>"u";function g_({triggerSelector:e}){const[t,n]=H0();return x.useEffect(()=>{if(m_)return;const r=document.querySelector(e);if(r)return r.addEventListener("click",n),()=>r.removeEventListener("click",n);console.warn("The trigger element can't be found, make sure it is present in the DOM")},[e,n]),L.jsx("div",{className:On(t&&"!opencopilot-z-[100000] opencopilot-transition-all opencopilot-shadow-lg opencopilot-ease-in sm:opencopilot-w-96 opencopilot-fixed opencopilot-w-screen opencopilot-h-screen opencopilot-top-0 opencopilot-bottom-0 opencopilot-right-0"),children:L.jsx("div",{"data-open":t,className:On("opencopilot-font-inter opencopilot-overflow-hidden opencopilot-h-full sm:opencopilot-rounded-xl opencopilot-bg-white","opencopilot-opacity-0 opencopilot-transition-opacity opencopilot-ease",t&&"opencopilot-opacity-100 opencopilot-animate-in opencopilot-fade-in",!t&&"opencopilot-hidden opencopilot-animate-out opencopilot-fade-out"),children:L.jsx(h_,{})})})}function y_({triggerSelector:e,...t}){const n=document.createElement("style");n.innerHTML=lk,document.body.appendChild(n);const r=document.createElement("div");r.id="opencopilot-aicopilot",document.body.appendChild(r),Eu.createRoot(r).render(L.jsx(_S,{options:{...t},children:L.jsx(g_,{triggerSelector:e})}))}window.initAiCoPilot=y_; +`))}function s(f,h,m,w){const g=m.enter("tableCell"),y=m.enter("phrasing"),v=Pw(f,m,{...w,before:i,after:i});return y(),g(),v}function u(f,h){return t$(f,{align:h,alignDelimiters:r,padding:n,stringLength:o})}function c(f,h,m){const w=f.children;let g=-1;const y=[],v=h.enter("table");for(;++g-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let l=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=n.createTracker(r);a.move(i+" ".repeat(l-i.length)),a.shift(l);const s=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,a.current()),c);return s(),u;function c(p,d,f){return d?(f?"":" ".repeat(l))+p:(f?i:i+" ".repeat(l-i.length))+p}}const h$={exit:{taskListCheckValueChecked:vg,taskListCheckValueUnchecked:vg,paragraph:g$}},m$={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:y$}};function vg(e){const t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function g$(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1],r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,l;for(;++i1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var C$=["秒","分钟","小时","天","周","个月","年"];function E$(e,t){if(t===0)return["刚刚","片刻后"];var n=C$[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var qc={},Aw=function(e,t){qc[e]=t},P$=function(e){return qc[e]||qc.en_US},Cu=[60,60,24,7,365/7/12,12];function wg(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function T$(e,t){var n=e<0?1:0;e=Math.abs(e);for(var r=e,o=0;e>=Cu[o]&&o(o===0?9:1)&&(o+=1),t(e,o,r)[n].replace("%s",e.toString())}function O$(e,t){var n=t?wg(t):new Date;return(+n-+wg(e))/1e3}var A$=function(e,t,n){var r=O$(e,n&&n.relativeDate);return T$(r,P$(t))};Aw("en_US",S$);Aw("zh_CN",E$);function $$(e){const t=new Date(e),n=t.getHours(),r=String(t.getMinutes()).padStart(2,"0"),o=n>=12?"PM":"AM";return`${n%12||12}:${r} ${o}`}function _$(){const[e,t]=x.useState(!1),n=async r=>{if(!(navigator!=null&&navigator.clipboard))return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(r),t(!0),!0}catch(o){return console.warn("Copy failed",o),t(!1),!1}};return x.useEffect(()=>{if(e){const r=setTimeout(()=>{t(!1)},5e3);return()=>clearTimeout(r)}},[e]),[e,n]}function R$(e){return zr({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}}]})(e)}function L$(e){return zr({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"}}]})(e)}function D$(){return Date.now()}function z$(){var n,r,o,i;const e=Yp();return{notify:new Audio((r=(n=e==null?void 0:e.data)==null?void 0:n.sound_effects)==null?void 0:r.response),submit:new Audio((i=(o=e==null?void 0:e.data)==null?void 0:o.sound_effects)==null?void 0:i.submit)}}function xg(e){return typeof e=="string"?e.trim().length===0:Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:e===void 0}function Rf(){return Math.random().toString(36).substring(2,15)}function N$(e){return e[e.length-1]}function I$(e){let t=[];return e&&e.forEach(n=>{n.from_user?t.push({from:"user",content:n.message,id:n.id,timestamp:new Date(n.created_at)}):t.push({from:"bot",id:n.id,timestamp:new Date(n.created_at),type:"text",response:{text:n.message}})}),t}const $w=x.createContext(void 0),F$=({children:e})=>{const{data:t}=Yp(),[n,r]=x.useState([]);x.useLayoutEffect(()=>{t!=null&&t.history&&r(I$(t==null?void 0:t.history))},[t==null?void 0:t.history]);const o=z$(),[i,l]=x.useState(!1),[a,s]=x.useState(null),{axiosInstance:u}=c1(),c=Ni(),p=m=>{var g;m.from==="user"?o==null||o.submit.play():(g=o==null?void 0:o.notify)==null||g.play();const w={...m,timestamp:m.timestamp?m.timestamp:D$()};r(y=>[...y,w])},d=async m=>{m.from==="user"&&p(m),s(null),l(!0);try{const{data:w,status:g,statusText:y}=await u.post("/chat/send",{...m,headers:c==null?void 0:c.headers,user:c==null?void 0:c.user});g===200?p({...w,id:Rf(),from:"bot"}):s({message:m,reason:y})}catch(w){s({message:m,reason:w==null?void 0:w.message})}finally{l(!1)}};function f(){r([])}const h={messages:n,sendMessage:d,loading:i,failedMessage:a,reset:f};return L.jsx($w.Provider,{value:h,children:e})},$i=()=>{const e=x.useContext($w);if(!e)throw new Error("useChat must be used within a ChatProvider");return e};function _w({error:e}){return L.jsx("img",{className:On("opencopilot-h-7 opencopilot-w-7 opencopilot-rounded-lg opencopilot-shrink-0 opencopilot-object-cover opencopilot-aspect-square hover:opencopilot-shadow",e&&"border opencopilot-border-rose-500 opencopilot-shadow-none"),src:"https://cdn.dribbble.com/users/281679/screenshots/14897126/media/f52c47307ac2daa0c727b1840c41d5ab.png?compress=1&resize=1600x1200&vertical=center",alt:"bot's avatar"})}function j$(){var t;const e=Ni();return L.jsxs(Ui,{children:[L.jsx(Hi,{hidden:!(e!=null&&e.user),side:"top",align:"center",children:(t=e==null?void 0:e.user)==null?void 0:t.name}),L.jsx(xs,{asChild:!0,children:L.jsx("div",{className:"opencopilot-rounded-lg opencopilot-shrink-0 opencopilot-bg-accent opencopilot-h-7 opencopilot-w-7 opencopilot-object-cover opencopilot-aspect-square hover:opencopilot-shadow opencopilot-border-primary-light opencopilot-border opencopilot-flex opencopilot-items-center opencopilot-justify-center",children:L.jsx("span",{className:"opencopilot-text-xl opencopilot-text-primary opencopilot-fill-current",children:L.jsx(b$,{})})})})]})}function bg({message:e,timestamp:t,id:n}){var s;const{displayText:r}=bf({text:e,every:1e-4,shouldStart:!0}),[o,i]=_$(),{messages:l}=$i(),a=((s=N$(l))==null?void 0:s.id)===n;return L.jsxs("div",{className:"opencopilot-p-2 group opencopilot-w-full opencopilot-shrink-0",children:[L.jsxs("div",{className:"opencopilot-flex opencopilot-select-none opencopilot-items-start opencopilot-gap-3 opencopilot-w-full",dir:"auto",children:[L.jsx(_w,{}),L.jsx("div",{className:"opencopilot-space-y-2 opencopilot-flex-1",children:L.jsx("div",{className:"opencopilot-w-fit",children:L.jsx("div",{dir:"auto",children:L.jsx(fw,{remarkPlugins:[x$],className:"opencopilot-prose opencopilot-prose-slate opencopilot-font-medium opencopilot-text-sm opencopilot-prose-sm prose-h1:opencopilot-font-medium prose-h2:opencopilot-font-normal prose-headings:opencopilot-my-1 opencopilot-max-w-full",children:r})})})})]}),a&&L.jsxs("div",{className:"opencopilot-w-full opencopilot-ps-10 opencopilot-flex opencopilot-items-center opencopilot-justify-between",children:[L.jsx("div",{children:t&&L.jsxs("span",{className:"opencopilot-text-xs opencopilot-m-0",children:["Bot · ",A$(t)]})}),L.jsx("button",{className:"opencopilot-text-lg opencopilot-justify-self-end",onClick:()=>i(r),children:o?L.jsx(R$,{className:"opencopilot-text-emerald-500"}):L.jsx(L$,{})})]})]})}function M$(){const{displayText:e}=bf({text:"Bot is Thinking..."});return L.jsxs("div",{className:"opencopilot-p-2 opencopilot-flex opencopilot-items-center opencopilot-shrink-0 opencopilot-gap-3 opencopilot-w-full",children:[L.jsx("div",{className:"loading opencopilot-flex-col opencopilot-w-7 opencopilot-flex opencopilot-h-7 opencopilot-bg-accent opencopilot-text-primary opencopilot-rounded-lg opencopilot-shrink-0 opencopilot-mt-auto flex-center",children:L.jsx(GC,{height:"15",width:"15",color:"var(--opencopilot-primary-clr)",visible:!0})}),L.jsx("div",{className:"opencopilot-space-y-2 opencopilot-flex-1",children:L.jsx("div",{className:"mesg_body opencopilot-w-fit opencopilot-whitespace-nowrap opencopilot-max-w-full",children:L.jsx("p",{className:"opencopilot-text-sm opencopilot-lowercase",children:e})})})]})}function B$({content:e,timestamp:t}){return L.jsxs("div",{dir:"auto",className:"opencopilot-w-full opencopilot-overflow-x-auto opencopilot-shrink-0 opencopilot-max-w-full last-of-type:opencopilot-mb-10 opencopilot-bg-accent opencopilot-p-2 opencopilot-flex opencopilot-gap-3 opencopilot-items-center",children:[L.jsx(j$,{}),L.jsx("div",{children:L.jsxs(Ui,{children:[L.jsx(xs,{asChild:!0,children:L.jsx("p",{className:"opencopilot-prose opencopilot-prose-slate opencopilot-font-medium opencopilot-text-sm opencopilot-prose-sm",children:e})}),L.jsx(Hi,{children:L.jsx("span",{children:t&&$$(t)})})]})})]})}function U$({message:e}){const{displayText:t}=bf({text:"Error sending the message.",every:.001});return L.jsx("div",{className:"opencopilot-clear-both opencopilot-shrink-0 opencopilot-w-full opencopilot-p-2",children:L.jsxs("div",{className:"opencopilot-flex opencopilot-items-center opencopilot-gap-3 opencopilot-w-full",children:[L.jsx(_w,{error:!0}),L.jsx("div",{className:"opencopilot-text-rose-500 opencopilot-text-sm",children:t})]})})}const H$=e=>[(n,r)=>{if(e.current){const{scrollWidth:o,scrollHeight:i}=e.current,l=o-e.current.clientWidth,a=i-e.current.clientHeight,s=n/100*l,u=r/100*a;e.current.scrollTo(s,u)}}];function W$(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var V$=x.useLayoutEffect,G$=function(t){var n=x.useRef(t);return V$(function(){n.current=t}),n},kg=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},q$=function(t,n){var r=x.useRef();return x.useCallback(function(o){t.current=o,r.current&&kg(r.current,null),r.current=n,n&&kg(n,o)},[n])},Sg={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Y$=function(t){Object.keys(Sg).forEach(function(n){t.style.setProperty(n,Sg[n],"important")})},Cg=Y$,it=null,Eg=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function Q$(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),it||(it=document.createElement("textarea"),it.setAttribute("tabindex","-1"),it.setAttribute("aria-hidden","true"),Cg(it)),it.parentNode===null&&document.body.appendChild(it);var o=e.paddingSize,i=e.borderSize,l=e.sizingStyle,a=l.boxSizing;Object.keys(l).forEach(function(d){var f=d;it.style[f]=l[f]}),Cg(it),it.value=t;var s=Eg(it,e);it.value=t,s=Eg(it,e),it.value="x";var u=it.scrollHeight-o,c=u*n;a==="border-box"&&(c=c+o+i),s=Math.max(c,s);var p=u*r;return a==="border-box"&&(p=p+o+i),s=Math.min(p,s),[s,u]}var Pg=function(){},K$=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},X$=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Z$=!!document.documentElement.currentStyle,J$=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=K$(X$,n),o=r.boxSizing;if(o==="")return null;Z$&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),l=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:l}},e_=J$;function Rw(e,t,n){var r=G$(n);x.useLayoutEffect(function(){var o=function(l){return r.current(l)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var t_=function(t){Rw(window,"resize",t)},n_=function(t){Rw(document.fonts,"loadingdone",t)},r_=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],o_=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,l=t.onChange,a=l===void 0?Pg:l,s=t.onHeightChange,u=s===void 0?Pg:s,c=W$(t,r_),p=c.value!==void 0,d=x.useRef(null),f=q$(d,n),h=x.useRef(0),m=x.useRef(),w=function(){var v=d.current,C=r&&m.current?m.current:e_(v);if(C){m.current=C;var E=Q$(C,v.value||v.placeholder||"x",i,o),k=E[0],T=E[1];h.current!==k&&(h.current=k,v.style.setProperty("height",k+"px","important"),u(k,{rowHeight:T}))}},g=function(v){p||w(),a(v)};return x.useLayoutEffect(w),t_(w),n_(w),x.createElement("textarea",ge({},c,{onChange:g,ref:f}))},i_=x.forwardRef(o_);function l_(e){return zr({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M1 1.91L1.78 1.5L15 7.44899V8.3999L1.78 14.33L1 13.91L2.58311 8L1 1.91ZM3.6118 8.5L2.33037 13.1295L13.5 7.8999L2.33037 2.83859L3.6118 7.43874L9 7.5V8.5H3.6118Z"}}]})(e)}function a_(e){return zr({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M13.1459 11.0499L12.9716 9.05752L15.3462 8.84977C14.4471 7.98322 13.2242 7.4503 11.8769 7.4503C9.11547 7.4503 6.87689 9.68888 6.87689 12.4503C6.87689 15.2117 9.11547 17.4503 11.8769 17.4503C13.6977 17.4503 15.2911 16.4771 16.1654 15.0224L18.1682 15.5231C17.0301 17.8487 14.6405 19.4503 11.8769 19.4503C8.0109 19.4503 4.87689 16.3163 4.87689 12.4503C4.87689 8.58431 8.0109 5.4503 11.8769 5.4503C13.8233 5.4503 15.5842 6.24474 16.853 7.52706L16.6078 4.72412L18.6002 4.5498L19.1231 10.527L13.1459 11.0499Z",fill:"currentColor"}}]})(e)}function s_(e){return zr({tag:"svg",attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M3 12h1m8 -9v1m8 8h1m-15.4 -6.4l.7 .7m12.1 -.7l-.7 .7"}},{tag:"path",attr:{d:"M9 16a5 5 0 1 1 6 0a3.5 3.5 0 0 0 -1 3a2 2 0 0 1 -4 0a3.5 3.5 0 0 0 -1 -3"}},{tag:"path",attr:{d:"M9.7 17l4.6 0"}}]})(e)}function u_(){const{data:e}=Yp(),{messages:t,sendMessage:n}=$i();return L.jsx(L.Fragment,{children:xg(t)&&!xg(e==null?void 0:e.inital_questions)&&L.jsxs("div",{className:"opencopilot-flex opencopilot-items-center opencopilot-gap-4 opencopilot-justify-between opencopilot-w-full opencopilot-px-4",children:[L.jsx("div",{className:"opencopilot-flex opencopilot-items-center opencopilot-flex-wrap opencopilot-gap-2 opencopilot-flex-1",children:e==null?void 0:e.inital_questions.map((r,o)=>L.jsx("button",{className:"opencopilot-text-xs opencopilot-w-fit opencopilot-font-semibold opencopilot-whitespace-nowrap opencopilot-px-2.5 opencopilot-py-1 opencopilot-rounded-full opencopilot-bg-accent opencopilot-text-primary",onClick:()=>{n({from:"user",content:r,id:Rf()})},children:r},o))}),L.jsxs(Ui,{children:[L.jsx(xs,{children:L.jsx("span",{className:"opencopilot-text-xl opencopilot-text-primary opencopilot-mb-auto",children:L.jsx(s_,{})})}),L.jsx(Hi,{asChild:!0,children:L.jsx("span",{className:"opencopilot-text-xs opencopilot-font-medium fade-in-bottom opencopilot-px-2 opencopilot-py-1 opencopilot-mb-3",children:"suggestions"})})]})]})})}function c_(){const[e,t]=x.useState(""),n=x.useRef(null),{sendMessage:r,reset:o,messages:i}=$i(),{loading:l}=$i(),a=e.trim().length>0,s=c=>{const p=c.currentTarget.value;t(p)};function u(){e.trim().length>0&&(t(""),r({from:"user",content:e,id:Rf()}))}return L.jsxs("footer",{className:"opencopilot-p-2 opencopilot-flex opencopilot-w-full opencopilot-flex-col opencopilot-gap-2",children:[L.jsx("div",{className:"opencopilot-overflow-y-auto opencopilot-w-full ",children:L.jsx(u_,{})}),L.jsxs("div",{className:"opencopilot-w-full opencopilot-flex opencopilot-items-center opencopilot-ring-[#334155]/60 opencopilot-transition-colors opencopilot-justify-between opencopilot-ring-1 opencopilot-overflow-hidden focus-within:opencopilot-ring-primary opencopilot-gap-2 opencopilot-bg-accent opencopilot-p-2 opencopilot-rounded-2xl",children:[L.jsx("div",{className:"opencopilot-flex-1",children:L.jsx(i_,{dir:"auto",ref:n,autoFocus:!0,onKeyDown:c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),u())},disabled:l,maxRows:4,rows:1,value:e,onChange:s,className:"opencopilot-w-full opencopilot-resize-none opencopilot-bg-transparent focus-visible:opencopilot-outline-none opencopilot-border-none focus:opencopilot-outline-none focus:opencopilot-border-none opencopilot-scrollbar-thin opencopilot-leading-tight opencopilot-whitespace-pre-wrap opencopilot-py-1.5 opencopilot-px-4 placeholder:opencopilot-align-middle opencopilot-overflow-auto opencopilot-outline-none opencopilot-text-accent2 opencopilot-text-[14px] placeholder:opencopilot-text-xs opencopilot-font-normal"})}),L.jsxs("div",{className:"opencopilot-flex opencopilot-items-center opencopilot-justify-center opencopilot-gap-2 opencopilot-h-fit opencopilot-px-2 opencopilot-text-lg",children:[L.jsxs(Ui,{children:[L.jsx(xs,{asChild:!0,children:L.jsx("button",{onClick:o,className:"opencopilot-text-xl disabled:opencopilot-opacity-40 disabled:opencopilot-pointer-events-none disabled:opencopilot-cursor-not-allowed opencopilot-text-[#5e5c5e] opencopilot-transition-all",disabled:!(i.length>0),children:L.jsx(a_,{})})}),L.jsx(Hi,{children:"reset chat"})]}),L.jsx("button",{onClick:u,className:"opencopilot-text-xl disabled:opencopilot-opacity-40 disabled:opencopilot-pointer-events-none disabled:opencopilot-cursor-not-allowed opencopilot-text-[#5e5c5e] opencopilot-transition-all",disabled:l||!a,children:L.jsx(l_,{})})]})]})]})}function p_({data:e,render:t,fallback:n}){return e.length===0?n:e.map((r,o)=>t(r,o))}function f_(){const e=x.useRef(null),[t]=H$(e),{messages:n,loading:r,failedMessage:o}=$i(),i=Ni(),l=i==null?void 0:i.initialMessage;return x.useEffect(()=>{t(0,100)},[]),x.useEffect(()=>{t(0,100)},[n,t]),L.jsxs("div",{className:"opencopilot-w-full opencopilot-flex opencopilot-h-full opencopilot-flex-col opencopilot-items-start opencopilot-relative",children:[L.jsx(UC,{}),L.jsx("main",{ref:e,className:"opencopilot-flex-1 opencopilot-w-full opencopilot-overflow-x-hidden opencopilot-shrink-0 opencopilot-overflow-auto opencopilot-scrollbar-thin opencopilot-scroll-smooth",children:L.jsxs("div",{className:"opencopilot-flex opencopilot-h-fit opencopilot-mt-auto opencopilot-flex-col opencopilot-py-2 opencopilot-max-h-full opencopilot-items-center opencopilot-gap-1 last:fade-in-right",children:[l&&L.jsx(bg,{message:l}),L.jsx(p_,{fallback:L.jsx("hr",{}),data:n,render:(a,s)=>{if(a.from==="bot"){if(a.type==="text")return L.jsx(bg,{timestamp:a.timestamp,id:a.id,message:a.response.text},s)}else if(a.from==="user")return L.jsx(B$,{id:a.id,timestamp:a.timestamp,content:a.content},s)}}),r&&L.jsx(M$,{}),o&&L.jsx(U$,{message:o})]})}),L.jsx(c_,{})]})}function d_(){return L.jsx(F$,{children:L.jsx(f_,{})})}const h_=typeof window>"u";function m_({triggerSelector:e}){const[t,n]=U0();return x.useEffect(()=>{if(h_)return;const r=document.querySelector(e);if(r)return r.addEventListener("click",n),()=>r.removeEventListener("click",n);console.warn("The trigger element can't be found, make sure it is present in the DOM")},[e,n]),L.jsx("div",{className:On(t&&"!opencopilot-z-[100000] opencopilot-transition-all opencopilot-shadow-lg opencopilot-ease-in sm:opencopilot-w-96 opencopilot-fixed opencopilot-w-screen opencopilot-h-screen opencopilot-top-0 opencopilot-bottom-0 opencopilot-right-0"),children:L.jsx("div",{"data-open":t,className:On("opencopilot-font-inter opencopilot-overflow-hidden opencopilot-h-full sm:opencopilot-rounded-xl opencopilot-bg-white","opencopilot-opacity-0 opencopilot-transition-opacity opencopilot-ease",t&&"opencopilot-opacity-100 opencopilot-animate-in opencopilot-fade-in",!t&&"opencopilot-hidden opencopilot-animate-out opencopilot-fade-out"),children:L.jsx(d_,{})})})}function g_({triggerSelector:e,...t}){const n=document.createElement("style");n.innerHTML=ik,document.body.appendChild(n);const r=document.createElement("div");r.id="opencopilot-aicopilot",document.body.appendChild(r),Eu.createRoot(r).render(L.jsx($S,{options:{...t},children:L.jsx(m_,{triggerSelector:e})}))}window.initAiCoPilot=g_; From a7774e87daa7f35c4b744feb0fab9c74d4de90dd Mon Sep 17 00:00:00 2001 From: ah7255703 Date: Wed, 6 Dec 2023 23:12:35 +0200 Subject: [PATCH 5/6] Release 1.4.0 --- copilot-widget/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copilot-widget/package.json b/copilot-widget/package.json index d5876c85e..784330bbf 100644 --- a/copilot-widget/package.json +++ b/copilot-widget/package.json @@ -1,7 +1,7 @@ { "name": "@openchatai/copilot-widget", "private": false, - "version": "1.3.1", + "version": "1.4.0", "type": "module", "scripts": { "dev": "vite", From 32903d33bf2bcfeea5a449868d21cc943f441069 Mon Sep 17 00:00:00 2001 From: ah7255703 Date: Wed, 6 Dec 2023 23:13:27 +0200 Subject: [PATCH 6/6] Update @openchatai/copilot-widget to version 1.4.0 --- dashboard/package.json | 2 +- dashboard/pnpm-lock.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dashboard/package.json b/dashboard/package.json index 3b027bab6..4c27ed8ed 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@hookform/resolvers": "^3.3.1", - "@openchatai/copilot-widget": "^1.3.1", + "@openchatai/copilot-widget": "^1.4.0", "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-alert-dialog": "^1.0.5", "@radix-ui/react-avatar": "^1.0.4", diff --git a/dashboard/pnpm-lock.yaml b/dashboard/pnpm-lock.yaml index 181e4af79..44bbf9537 100644 --- a/dashboard/pnpm-lock.yaml +++ b/dashboard/pnpm-lock.yaml @@ -9,8 +9,8 @@ dependencies: specifier: ^3.3.1 version: 3.3.2(react-hook-form@7.47.0) '@openchatai/copilot-widget': - specifier: ^1.3.1 - version: 1.3.1(react-dom@18.2.0)(react@18.2.0) + specifier: ^1.4.0 + version: 1.4.0(react-dom@18.2.0)(react@18.2.0) '@radix-ui/react-accordion': specifier: ^1.1.2 version: 1.1.2(@types/react-dom@18.2.13)(@types/react@18.2.28)(react-dom@18.2.0)(react@18.2.0) @@ -444,8 +444,8 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 - /@openchatai/copilot-widget@1.3.1(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-hWcBwlOk/Rxxg1E7AJfW79QlZxK0KFazdz9P7ZF7uo7GuEdN9uDz/LtDntdkkWXyCM0HtMf/lyCfsoWrnTCzoQ==} + /@openchatai/copilot-widget@1.4.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-Iv9NGNmwj3MomXOzqIoCjsBV27MAnDFnHBj6TOGEO7CK5r0ZMYok14JrrpU9aS5AObB049nFwq7VOOIzsEBJnA==} peerDependencies: react: ^18.x react-dom: ^18.x