diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 000000000..c283cf25e Binary files /dev/null and b/.DS_Store differ diff --git a/copilot-widget/index.html b/copilot-widget/index.html index c9285d408..ed2f1c497 100644 --- a/copilot-widget/index.html +++ b/copilot-widget/index.html @@ -75,7 +75,7 @@

diff --git a/copilot-widget/package.json b/copilot-widget/package.json index 778805e5a..9e2b57dde 100644 --- a/copilot-widget/package.json +++ b/copilot-widget/package.json @@ -1,7 +1,7 @@ { "name": "@openchatai/copilot-widget", "private": false, - "version": "2.5.3", + "version": "2.5.4", "type": "module", "scripts": { "dev": "vite", diff --git a/copilot-widget/scripts/update-lib.sh b/copilot-widget/scripts/update-lib.sh old mode 100644 new mode 100755 diff --git a/dashboard/package.json b/dashboard/package.json index 92655ae0f..82ad3d60b 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -13,7 +13,7 @@ "dependencies": { "@hookform/resolvers": "^3.3.1", "@kbox-labs/react-echarts": "^1.0.3", - "@openchatai/copilot-widget": "^2.5.3", + "@openchatai/copilot-widget": "^2.5.4", "@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 95f7f42b0..6f70a07c8 100644 --- a/dashboard/pnpm-lock.yaml +++ b/dashboard/pnpm-lock.yaml @@ -12,8 +12,8 @@ dependencies: specifier: ^1.0.3 version: 1.0.3(echarts@5.4.3)(react@18.2.0) '@openchatai/copilot-widget': - specifier: ^2.5.3 - version: 2.5.3(react@18.2.0) + specifier: ^2.5.4 + version: 2.5.4(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) @@ -706,8 +706,8 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 - /@openchatai/copilot-widget@2.5.3(react@18.2.0): - resolution: {integrity: sha512-pgPAGlIXZgNP7iSNs3jkkz+rq/E7zuUnqBwhYteS1lDjms2QrOIDtwmOyDxeLBYDZGg/YQvfaG8xl4gzNTk6/g==} + /@openchatai/copilot-widget@2.5.4(react@18.2.0): + resolution: {integrity: sha512-ZW7RDsMbSX/f50ZTQj0GMzD3+vA8LxcGAH0wuEDEmkvgFdJ/BNtZGtXV4yonPZ38ePcxehE7zeHHHUSRxE9YUw==} peerDependencies: react: ^18.x dependencies: diff --git a/dashboard/public/pilot.js b/dashboard/public/pilot.js index a95b5cfe1..89f0eba0b 100644 --- a/dashboard/public/pilot.js +++ b/dashboard/public/pilot.js @@ -69,7 +69,7 @@ Error generating stack: `+i.message+` `&&e.push(Zc),i!==null&&e.push(ge(at(""+i))),null;case"input":e.push(Ln("input")),a=f=l=i=null;for(s in n)if(At.call(n,s)&&(u=n[s],u!=null))switch(s){case"children":case"dangerouslySetInnerHTML":throw Error(he(399,"input"));case"defaultChecked":a=u;break;case"defaultValue":l=u;break;case"checked":f=u;break;case"value":i=u;break;default:jt(e,r,s,u)}return f!==null?jt(e,r,"checked",f):a!==null&&jt(e,r,"checked",a),i!==null?jt(e,r,"value",i):l!==null&&jt(e,r,"value",l),e.push(Sy),null;case"menuitem":e.push(Ln("menuitem"));for(var p in n)if(At.call(n,p)&&(i=n[p],i!=null))switch(p){case"children":case"dangerouslySetInnerHTML":throw Error(he(400));default:jt(e,r,p,i)}return e.push(Er),null;case"title":e.push(Ln("title")),i=null;for(c in n)if(At.call(n,c)&&(s=n[c],s!=null))switch(c){case"children":i=s;break;case"dangerouslySetInnerHTML":throw Error(he(434));default:jt(e,r,c,s)}return e.push(Er),i;case"listing":case"pre":e.push(Ln(t)),s=i=null;for(a in n)if(At.call(n,a)&&(l=n[a],l!=null))switch(a){case"children":i=l;break;case"dangerouslySetInnerHTML":s=l;break;default:jt(e,r,a,l)}if(e.push(Er),s!=null){if(i!=null)throw Error(he(60));if(typeof s!="object"||!("__html"in s))throw Error(he(61));n=s.__html,n!=null&&(typeof n=="string"&&0"),$O=q(''),PO=q(""),AO=q(''),NO=q(""),DO=q(""),IO=q("");function Cy(e,t,n){if(Z(e,AO),n===null)throw Error(he(395));return Z(e,n),He(e,LO)}var jO=q('"),HO=q('"),qO=q('"),QO=q(''),XO=q(""),JO=q(''),e$=q(""),t$=q(''),r$=q(""),o$=q(''),s$=q("");function l$(e,t,n,r){switch(n.insertionMode){case 0:case 1:return Z(e,jO),Z(e,t.segmentPrefix),Z(e,ge(r.toString(16))),He(e,BO);case 2:return Z(e,HO),Z(e,t.segmentPrefix),Z(e,ge(r.toString(16))),He(e,VO);case 3:return Z(e,qO),Z(e,t.segmentPrefix),Z(e,ge(r.toString(16))),He(e,GO);case 4:return Z(e,QO),Z(e,t.segmentPrefix),Z(e,ge(r.toString(16))),He(e,KO);case 5:return Z(e,JO),Z(e,t.segmentPrefix),Z(e,ge(r.toString(16))),He(e,ZO);case 6:return Z(e,t$),Z(e,t.segmentPrefix),Z(e,ge(r.toString(16))),He(e,n$);case 7:return Z(e,o$),Z(e,t.segmentPrefix),Z(e,ge(r.toString(16))),He(e,i$);default:throw Error(he(397))}}function a$(e,t){switch(t.insertionMode){case 0:case 1:return He(e,UO);case 2:return He(e,WO);case 3:return He(e,YO);case 4:return He(e,XO);case 5:return He(e,e$);case 6:return He(e,r$);case 7:return He(e,s$);default:throw Error(he(397))}}var u$=q('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),c$=q('$RS("'),f$=q('","'),d$=q('")<\/script>'),p$=q('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),h$=q('$RC("'),m$=q('","'),g$=q('")<\/script>'),y$=q('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),w$=q('$RX("'),v$=q('"'),x$=q(")<\/script>"),ef=q(","),b$=/[<\u2028\u2029]/g;function tf(e){return JSON.stringify(e).replace(b$,function(t){switch(t){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var as=Object.assign,k$=Symbol.for("react.element"),Pb=Symbol.for("react.portal"),Ab=Symbol.for("react.fragment"),Lb=Symbol.for("react.strict_mode"),Nb=Symbol.for("react.profiler"),Db=Symbol.for("react.provider"),Ib=Symbol.for("react.context"),Fb=Symbol.for("react.forward_ref"),zb=Symbol.for("react.suspense"),Mb=Symbol.for("react.suspense_list"),jb=Symbol.for("react.memo"),Ph=Symbol.for("react.lazy"),S$=Symbol.for("react.scope"),E$=Symbol.for("react.debug_trace_mode"),C$=Symbol.for("react.legacy_hidden"),T$=Symbol.for("react.default_value"),Ty=Symbol.iterator;function Ld(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 Ab:return"Fragment";case Pb:return"Portal";case Nb:return"Profiler";case Lb:return"StrictMode";case zb:return"Suspense";case Mb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ib:return(e.displayName||"Context")+".Consumer";case Db:return(e._context.displayName||"Context")+".Provider";case Fb:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jb:return t=e.displayName||null,t!==null?t:Ld(e.type)||"Memo";case Ph:t=e._payload,e=e._init;try{return Ld(e(t))}catch{}}return null}var Bb={};function _y(e,t){if(e=e.contextTypes,!e)return Bb;var n={},r;for(r in e)n[r]=t[r];return n}var co=null;function Du(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var n=t.parent;if(e===null){if(n!==null)throw Error(he(401))}else{if(n===null)throw Error(he(401));Du(e,n)}t.context._currentValue=t.value}}function Ub(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&Ub(e)}function Hb(e){var t=e.parent;t!==null&&Hb(t),e.context._currentValue=e.value}function Vb(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(he(402));e.depth===t.depth?Du(e,t):Vb(e,t)}function Wb(e,t){var n=t.parent;if(n===null)throw Error(he(402));e.depth===n.depth?Du(e,n):Wb(e,n),t.context._currentValue=t.value}function Qa(e){var t=co;t!==e&&(t===null?Hb(e):e===null?Ub(t):t.depth===e.depth?Du(t,e):t.depth>e.depth?Vb(t,e):Wb(t,e),co=e)}var Oy={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function $y(e,t,n,r){var o=e.state!==void 0?e.state:null;e.updater=Oy,e.props=n,e.state=o;var i={queue:[],replace:!1};e._reactInternals=i;var s=t.contextType;if(e.context=typeof s=="object"&&s!==null?s._currentValue:r,s=t.getDerivedStateFromProps,typeof s=="function"&&(s=s(n,o),o=s==null?o:as({},o,s),e.state=o),typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function"&&(typeof e.UNSAFE_componentWillMount=="function"||typeof e.componentWillMount=="function"))if(t=e.state,typeof e.componentWillMount=="function"&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount=="function"&&e.UNSAFE_componentWillMount(),t!==e.state&&Oy.enqueueReplaceState(e,e.state,null),i.queue!==null&&0>=s,o-=s,{id:1<<32-ua(t)+o|n<>>=0,e===0?32:31-(O$(e)/$$|0)|0}function P$(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var A$=typeof Object.is=="function"?Object.is:P$,fr=null,Ah=null,ca=null,ze=null,Qi=!1,Ka=!1,Ls=0,Ar=null,Iu=0;function oo(){if(fr===null)throw Error(he(321));return fr}function Ry(){if(0e.progressiveChunkSize)r.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(r),Cy(t,e.responseState,r.id),Tl(e,t,n);else{if(He(t,PO),n=r.completedSegments,n.length!==1)throw Error(he(391));Fu(e,t,n[0])}return He(t,DO)}function zy(e,t,n){return l$(t,e.responseState,n.formatContext,n.id),Fu(e,t,n),a$(t,n.formatContext)}function My(e,t,n){for(var r=n.completedSegments,o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o},rk=function(e,t){if(e==null)return{};var n,r,o=X$(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},J$=E.createContext(null);function Fd(e){var t=e.children,n=rk(e,["children"]);return typeof t!="string"&&(t=z$(t)),de.createElement("template",nk({},n,{dangerouslySetInnerHTML:{__html:t}}))}function zd(e){var t=e.root,n=e.children;return Qs.createPortal(n,t)}function Z$(e){var t=E.forwardRef(function(n,r){var o,i,s=n.mode,l=n.delegatesFocus,a=n.styleSheets,u=n.ssr,f=n.children,c=rk(n,["mode","delegatesFocus","styleSheets","ssr","children"]),p=(i=E.useRef((o=r)&&o.current),E.useEffect(function(){o&&(o.current=i.current)},[o]),i),d=E.useState(null),m=K$(d,2),g=m[0],v=m[1],h="node_".concat(s).concat(l);return E.useLayoutEffect(function(){if(p.current)try{if(typeof r=="function"&&r(p.current),u){var y=p.current.shadowRoot;return void v(y)}var w=p.current.attachShadow({mode:s,delegatesFocus:l});a.length>0&&(w.adoptedStyleSheets=a),v(w)}catch(k){(function(C){var b=C.error,T=C.styleSheets,O=C.root;switch(b.name){case"NotSupportedError":T.length>0&&(O.adoptedStyleSheets=T);break;default:throw b}})({error:k,styleSheets:a,root:g})}},[r,p,a]),de.createElement(de.Fragment,null,de.createElement(e.tag,nk({key:h,ref:p},c),(g||u)&&de.createElement(J$.Provider,{value:g},u?de.createElement(Fd,{shadowroot:s,shadowrootmode:s},e.render({root:g,ssr:u,children:f})):de.createElement(zd,{root:g},e.render({root:g,ssr:u,children:f})))))});return t.propTypes={mode:ne.oneOf(["open","closed"]),delegatesFocus:ne.bool,styleSheets:ne.arrayOf(ne.instanceOf(globalThis.CSSStyleSheet)),ssr:ne.bool,children:ne.node},t.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},t}Fd.propTypes={children:ne.oneOfType([ne.string,ne.node])},Fd.defaultProps={children:""},zd.propTypes={root:ne.object.isRequired,children:ne.node},zd.defaultProps={children:null};var rf=new Map;function eR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(r){return r.children};return new Proxy(e,{get:function(r,o){var i=W$(o,{separator:"-"}),s="".concat(t,"-").concat(i);return rf.has(s)||rf.set(s,Z$({tag:i,render:n})),rf.get(s)}})}var tR=eR();const nR='.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.isolate{isolation:isolate}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.z-\\[50000\\]{z-index:50000}.clear-both{clear:both}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.h-10{height:2.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-full{max-height:100%}.w-7{width:1.75rem}.w-9{width:2.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.max-w-\\[15rem\\]{max-width:15rem}.max-w-\\[70\\%\\]{max-width:70%}.max-w-full{max-width:100%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.resize-none{resize:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-px{gap:1px}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-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))}.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))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.scroll-smooth{scroll-behavior:smooth}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-none{border-style:none}.border-accent{border-color:var(--opencopilot-accent-clr)}.border-primary{border-color:var(--opencopilot-primary-clr)}.border-rose-500{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity))}.border-b-black\\/10{border-bottom-color:#0000001a}.bg-accent{background-color:var(--opencopilot-accent-clr)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\\/50{background-color:#00000080}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--opencopilot-primary-clr)}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.fill-current{fill:currentColor}.stroke-emerald-500{stroke:#10b981}.stroke-rose-500{stroke:#f43f5e}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.ps-10{padding-inline-start:2.5rem}.text-center{text-align:center}.text-start{text-align:start}.text-\\[14px\\]{font-size:14px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-tight{line-height:1.25}.text-\\[\\#5e5c5e\\]{--tw-text-opacity: 1;color:rgb(94 92 94 / var(--tw-text-opacity))}.text-accent{color:var(--opencopilot-accent-clr)}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.text-primary{color:var(--opencopilot-primary-clr)}.text-rose-500{--tw-text-opacity: 1;color:rgb(244 63 94 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-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)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-\\[\\#334155\\]\\/60{--tw-ring-color: rgb(51 65 85 / .6)}.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)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.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}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,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))}}.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}.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}.fade-in-0{--tw-enter-opacity: 0}.fade-in-10{--tw-enter-opacity: .1}.fade-out{--tw-exit-opacity: 0}.slide-in-from-bottom-5{--tw-enter-translate-y: 1.25rem}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}.paused{animation-play-state:paused}.scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=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}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=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}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=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}.prose :where(pre code):not(:where([class~=not-prose],[class~=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}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.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-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--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-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--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}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding:.1428571em .3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding:.6666667em 1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-left:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:1em;padding-bottom:.6666667em;padding-left:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.6666667em 1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.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-kbd: #0f172a;--tw-prose-kbd-shadows: 15 23 42;--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-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--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}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*{scrollbar-color:initial;scrollbar-width:initial}*,: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: }svg{width:1em;height:1em;vector-effect:non-scaling-stroke;stroke-width:1.5}@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}.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}.no-scrollbar::-webkit-scrollbar{display:none}@keyframes text-blur-out{0%{filter:blur(.01)}to{filter:blur(12px) opacity(0%)}}.text-blur-out{animation:text-blur-out 1.2s cubic-bezier(.55,.085,.68,.53) both}.\\*\\:fill-emerald-500>*{fill:#10b981}.\\*\\:fill-rose-500>*{fill:#f43f5e}.placeholder\\:align-middle::-moz-placeholder{vertical-align:middle}.placeholder\\:align-middle::placeholder{vertical-align:middle}.placeholder\\:text-xs::-moz-placeholder{font-size:.75rem;line-height:1rem}.placeholder\\:text-xs::placeholder{font-size:.75rem;line-height:1rem}.last-of-type\\:mb-10:last-of-type{margin-bottom:2.5rem}.focus-within\\:ring-primary:focus-within{--tw-ring-color: var(--opencopilot-primary-clr)}.data-\\[state\\=open\\]\\: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\\]\\: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\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:slide-in-from-top-0[data-state=closed]{--tw-enter-translate-y: -0px}.data-\\[state\\=closed\\]\\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\\[state\\=open\\]\\:slide-in-from-bottom-3[data-state=open]{--tw-enter-translate-y: .75rem}.prose-headings\\:my-1 :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose],[class~=not-prose] *))){margin-top:.25rem;margin-bottom:.25rem}.prose-h1\\:font-medium :is(:where(h1):not(:where([class~=not-prose],[class~=not-prose] *))){font-weight:500}.prose-h2\\:font-normal :is(:where(h2):not(:where([class~=not-prose],[class~=not-prose] *))){font-weight:400}.hover\\:bg-accent:hover{background-color:var(--opencopilot-accent-clr)}.hover\\:bg-rose-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 164 175 / var(--tw-bg-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\: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\\:border-none:focus{border-style:none}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--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)}.active\\:\\*\\:scale-105>*:active{--tw-scale-x: 1.05;--tw-scale-y: 1.05;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))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width: 640px){.sm\\:text-left{text-align:left}}.rtl\\:rotate-180:where([dir=rtl],[dir=rtl] *){--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\\:-scale-x-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -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))}.\\[\\&\\>button\\]\\:p-1>button{padding:.25rem}.\\[\\&\\>svg\\]\\:size-4>svg{width:1rem;height:1rem}\n',rR={ok:"Ok",agree:"Agree",cancel:"Cancel","yes-exit":"Yes, Exit","yes-reset":"Yes, Reset","no-cancel":"No, Cancel","are-you-sure":"Are you sure?",recording:"Recording","thank-you":"Thank you"},oR={ok:"حسنا",agree:"موافق",cancel:"إلغاء","yes-exit":"نعم، اخرج","yes-reset":"نعم، إعادة تعيين","no-cancel":"لا، إلغاء","are-you-sure":"هل أنت متأكد؟",recording:"تسجيل","thank-you":"شكرا"},iR={en:rR,ar:oR};function sR(e,t){const n=iR[t];return n&&n[e]||""}const[zu,lR]=mi();function aR({children:e}){const t=gi();return console.log(t),R.jsx(lR,{value:{get:n=>sR(n,t.language??"en"),lang:t.language??"en"},children:e})}const uR="@openchatai/copilot-widget",cR="2.5.3",fR="module",dR={dev:"vite",clean:"rm -rf ./dist ./dist-embed","build:embed":"tsc && vite build","build:lib":"vite build -c vite.lib.config.ts",lint:"eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",preview:"vite preview",release:"release-it",prepublishOnly:"pnpm clean && pnpm build:lib && pnpm build:embed","update-dashboard-pilot":"pnpm build:embed && mv ./dist-embed/*.js ../dashboard/public/pilot.js"},pR={react:"^18.x"},hR={"@radix-ui/react-popover":"^1.0.7","@radix-ui/react-slot":"^1.0.2","@radix-ui/react-tooltip":"^1.0.7","@tailwindcss/typography":"^0.5.10","@types/node":"^20.11.14","@types/react":"^18.2.48","@types/react-dom":"^18.2.18","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","@vitejs/plugin-react":"^4.2.1",autoprefixer:"^10.4.17",axios:"^1.6.7","class-variance-authority":"^0.7.0",clsx:"^2.1.0",eslint:"^8.56.0","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.3.5",postcss:"^8.4.33",prettier:"^2.8.8",react:"^18.2.0","react-dom":"^18.2.0","react-loader-spinner":"^5.4.5","react-markdown":"^8.0.7","react-shadow":"^20.4.0","react-textarea-autosize":"^8.5.3","release-it":"^17.0.3","remark-gfm":"^3.0.1","socket.io-client":"^4.7.4",swr:"^2.2.4","tailwind-merge":"^1.14.0","tailwind-scrollbar":"^3.0.5",tailwindcss:"^3.4.1","tailwindcss-animate":"^1.0.7","timeago.js":"^4.0.2",typescript:"^5.3.3",vite:"^4.5.2","vite-plugin-dts":"^3.7.2","vite-tsconfig-paths":"^4.3.1"},mR=["dist","dist-embed"],gR={url:"https://github.com/openchatai/OpenCopilot/issues"},yR={name:"openchatai",url:"https://github.com/openchatai"},wR="./dist/index.js",vR="./dist/index.d.ts",xR={".":{require:"./dist/index.cjs.js",import:"./dist/index.es.js",default:"./dist/index.es.js",types:"./dist/index.d.ts"}},bR={"lucide-react":"^0.298.0"},kR={name:uR,private:!1,version:cR,type:fR,scripts:dR,peerDependencies:pR,devDependencies:hR,files:mR,bugs:gR,author:yR,main:wR,types:vR,exports:xR,dependencies:bR};function SR(e){return kR[e]}const ER=SR("version"),CR={"--opencopilot-primary-clr":"hsl(200 18% 46%)","--opencopilot-accent-clr":"hsl(300, 7%, 97%)"};function TR({children:e,options:t,containerProps:n}){const{style:r,...o}=n||{};return R.jsxs(tR.div,{...o,"data-version":ER,style:{width:"100%",height:"100%",pointerEvents:"none",...CR,...r},children:[R.jsx(nT,{data:t,children:R.jsx(aR,{children:R.jsx(iT,{children:R.jsx($_,{children:e})})})}),R.jsx("style",{children:nR})]})}function ok(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;te&&(t=0,r=n,n=new Map)}return{get:function(s){var l=n.get(s);if(l!==void 0)return l;if((l=r.get(s))!==void 0)return o(s,l),l},set:function(s,l){n.has(s)?n.set(s,l):o(s,l)}}}var lk="!";function DR(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(s){for(var l=[],a=0,u=0,f,c=0;cu?f-u:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}}}function IR(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 FR(e){return{cache:NR(e.cacheSize),splitModifiers:DR(e),...$R(e)}}var zR=/\s+/;function MR(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(zR).map(function(s){var l=n(s),a=l.modifiers,u=l.hasImportantModifier,f=l.baseClassName,c=l.maybePostfixModifierPosition,p=r(c?f.substring(0,c):f),d=!!c;if(!p){if(!c)return{isTailwindClass:!1,originalClassName:s};if(p=r(f),!p)return{isTailwindClass:!1,originalClassName:s};d=!1}var m=IR(a).join(":"),g=u?m+lk:m;return{isTailwindClass:!0,modifierId:g,classGroupId:p,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(function(s){if(!s.isTailwindClass)return!0;var l=s.modifierId,a=s.classGroupId,u=s.hasPostfixModifier,f=l+a;return i.has(f)?!1:(i.add(f),o(a,u).forEach(function(c){return i.add(l+c)}),!0)}).reverse().map(function(s){return s.originalClassName}).join(" ")}function jR(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o},rk=function(e,t){if(e==null)return{};var n,r,o=X$(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},J$=E.createContext(null);function Fd(e){var t=e.children,n=rk(e,["children"]);return typeof t!="string"&&(t=z$(t)),de.createElement("template",nk({},n,{dangerouslySetInnerHTML:{__html:t}}))}function zd(e){var t=e.root,n=e.children;return Qs.createPortal(n,t)}function Z$(e){var t=E.forwardRef(function(n,r){var o,i,s=n.mode,l=n.delegatesFocus,a=n.styleSheets,u=n.ssr,f=n.children,c=rk(n,["mode","delegatesFocus","styleSheets","ssr","children"]),p=(i=E.useRef((o=r)&&o.current),E.useEffect(function(){o&&(o.current=i.current)},[o]),i),d=E.useState(null),m=K$(d,2),g=m[0],v=m[1],h="node_".concat(s).concat(l);return E.useLayoutEffect(function(){if(p.current)try{if(typeof r=="function"&&r(p.current),u){var y=p.current.shadowRoot;return void v(y)}var w=p.current.attachShadow({mode:s,delegatesFocus:l});a.length>0&&(w.adoptedStyleSheets=a),v(w)}catch(k){(function(C){var b=C.error,T=C.styleSheets,O=C.root;switch(b.name){case"NotSupportedError":T.length>0&&(O.adoptedStyleSheets=T);break;default:throw b}})({error:k,styleSheets:a,root:g})}},[r,p,a]),de.createElement(de.Fragment,null,de.createElement(e.tag,nk({key:h,ref:p},c),(g||u)&&de.createElement(J$.Provider,{value:g},u?de.createElement(Fd,{shadowroot:s,shadowrootmode:s},e.render({root:g,ssr:u,children:f})):de.createElement(zd,{root:g},e.render({root:g,ssr:u,children:f})))))});return t.propTypes={mode:ne.oneOf(["open","closed"]),delegatesFocus:ne.bool,styleSheets:ne.arrayOf(ne.instanceOf(globalThis.CSSStyleSheet)),ssr:ne.bool,children:ne.node},t.defaultProps={mode:"open",delegatesFocus:!1,styleSheets:[],ssr:!1,children:null},t}Fd.propTypes={children:ne.oneOfType([ne.string,ne.node])},Fd.defaultProps={children:""},zd.propTypes={root:ne.object.isRequired,children:ne.node},zd.defaultProps={children:null};var rf=new Map;function eR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(r){return r.children};return new Proxy(e,{get:function(r,o){var i=W$(o,{separator:"-"}),s="".concat(t,"-").concat(i);return rf.has(s)||rf.set(s,Z$({tag:i,render:n})),rf.get(s)}})}var tR=eR();const nR='.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.isolate{isolation:isolate}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.z-\\[50000\\]{z-index:50000}.clear-both{clear:both}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-10{width:2.5rem;height:2.5rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.h-10{height:2.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-full{max-height:100%}.w-7{width:1.75rem}.w-9{width:2.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-fit{min-width:-moz-fit-content;min-width:fit-content}.max-w-\\[15rem\\]{max-width:15rem}.max-w-\\[70\\%\\]{max-width:70%}.max-w-full{max-width:100%}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.cursor-not-allowed{cursor:not-allowed}.resize-none{resize:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-px{gap:1px}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-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))}.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))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.scroll-smooth{scroll-behavior:smooth}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-none{border-style:none}.border-accent{border-color:var(--opencopilot-accent-clr)}.border-primary{border-color:var(--opencopilot-primary-clr)}.border-rose-500{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity))}.border-b-black\\/10{border-bottom-color:#0000001a}.bg-accent{background-color:var(--opencopilot-accent-clr)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\\/50{background-color:#00000080}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-primary{background-color:var(--opencopilot-primary-clr)}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.fill-current{fill:currentColor}.stroke-emerald-500{stroke:#10b981}.stroke-rose-500{stroke:#f43f5e}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.ps-10{padding-inline-start:2.5rem}.text-center{text-align:center}.text-start{text-align:start}.text-\\[14px\\]{font-size:14px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-tight{line-height:1.25}.text-\\[\\#5e5c5e\\]{--tw-text-opacity: 1;color:rgb(94 92 94 / var(--tw-text-opacity))}.text-accent{color:var(--opencopilot-accent-clr)}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))}.text-primary{color:var(--opencopilot-primary-clr)}.text-rose-500{--tw-text-opacity: 1;color:rgb(244 63 94 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-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)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-\\[\\#334155\\]\\/60{--tw-ring-color: rgb(51 65 85 / .6)}.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)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.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}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,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))}}.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}.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}.fade-in-0{--tw-enter-opacity: 0}.fade-in-10{--tw-enter-opacity: .1}.fade-out{--tw-exit-opacity: 0}.slide-in-from-bottom-5{--tw-enter-translate-y: 1.25rem}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}.paused{animation-play-state:paused}.scrollbar-thin{scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.scrollbar-thin{scrollbar-width:thin}.scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=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}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=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}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=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}.prose :where(pre code):not(:where([class~=not-prose],[class~=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}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.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-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--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-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--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}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-left:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-left:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding:.1428571em .3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding:.6666667em 1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-left:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>*:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-left:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:1em;padding-bottom:.6666667em;padding-left:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding:.6666667em 1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-left:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-right:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.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-kbd: #0f172a;--tw-prose-kbd-shadows: 15 23 42;--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-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--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}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*{scrollbar-color:initial;scrollbar-width:initial}*,: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: }svg{width:1em;height:1em;vector-effect:non-scaling-stroke;stroke-width:1.5}@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}.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}.no-scrollbar::-webkit-scrollbar{display:none}@keyframes text-blur-out{0%{filter:blur(.01)}to{filter:blur(12px) opacity(0%)}}.text-blur-out{animation:text-blur-out 1.2s cubic-bezier(.55,.085,.68,.53) both}.\\*\\:fill-emerald-500>*{fill:#10b981}.\\*\\:fill-rose-500>*{fill:#f43f5e}.placeholder\\:align-middle::-moz-placeholder{vertical-align:middle}.placeholder\\:align-middle::placeholder{vertical-align:middle}.placeholder\\:text-xs::-moz-placeholder{font-size:.75rem;line-height:1rem}.placeholder\\:text-xs::placeholder{font-size:.75rem;line-height:1rem}.last-of-type\\:mb-10:last-of-type{margin-bottom:2.5rem}.focus-within\\:ring-primary:focus-within{--tw-ring-color: var(--opencopilot-primary-clr)}.data-\\[state\\=open\\]\\: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\\]\\: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\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:slide-in-from-top-0[data-state=closed]{--tw-enter-translate-y: -0px}.data-\\[state\\=closed\\]\\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\\[state\\=open\\]\\:slide-in-from-bottom-3[data-state=open]{--tw-enter-translate-y: .75rem}.prose-headings\\:my-1 :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose],[class~=not-prose] *))){margin-top:.25rem;margin-bottom:.25rem}.prose-h1\\:font-medium :is(:where(h1):not(:where([class~=not-prose],[class~=not-prose] *))){font-weight:500}.prose-h2\\:font-normal :is(:where(h2):not(:where([class~=not-prose],[class~=not-prose] *))){font-weight:400}.hover\\:bg-accent:hover{background-color:var(--opencopilot-accent-clr)}.hover\\:bg-rose-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 164 175 / var(--tw-bg-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\: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\\:border-none:focus{border-style:none}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--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)}.active\\:\\*\\:scale-105>*:active{--tw-scale-x: 1.05;--tw-scale-y: 1.05;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))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width: 640px){.sm\\:text-left{text-align:left}}.rtl\\:rotate-180:where([dir=rtl],[dir=rtl] *){--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rtl\\:-scale-x-100:where([dir=rtl],[dir=rtl] *){--tw-scale-x: -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))}.\\[\\&\\>button\\]\\:p-1>button{padding:.25rem}.\\[\\&\\>svg\\]\\:size-4>svg{width:1rem;height:1rem}\n',rR={ok:"Ok",agree:"Agree",cancel:"Cancel","yes-exit":"Yes, Exit","yes-reset":"Yes, Reset","no-cancel":"No, Cancel","are-you-sure":"Are you sure?",recording:"Recording","thank-you":"Thank you"},oR={ok:"حسنا",agree:"موافق",cancel:"إلغاء","yes-exit":"نعم، اخرج","yes-reset":"نعم، إعادة تعيين","no-cancel":"لا، إلغاء","are-you-sure":"هل أنت متأكد؟",recording:"تسجيل","thank-you":"شكرا"},iR={en:rR,ar:oR};function sR(e,t){const n=iR[t];return n&&n[e]||""}const[zu,lR]=mi();function aR({children:e}){const t=gi();return console.log(t),R.jsx(lR,{value:{get:n=>sR(n,t.language??"en"),lang:t.language??"en"},children:e})}const uR="@openchatai/copilot-widget",cR="2.5.4",fR="module",dR={dev:"vite",clean:"rm -rf ./dist ./dist-embed","build:embed":"tsc && vite build","build:lib":"vite build -c vite.lib.config.ts",lint:"eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",preview:"vite preview",release:"release-it",prepublishOnly:"pnpm clean && pnpm build:lib && pnpm build:embed","update-dashboard-pilot":"pnpm build:embed && mv ./dist-embed/*.js ../dashboard/public/pilot.js"},pR={react:"^18.x"},hR={"@radix-ui/react-popover":"^1.0.7","@radix-ui/react-slot":"^1.0.2","@radix-ui/react-tooltip":"^1.0.7","@tailwindcss/typography":"^0.5.10","@types/node":"^20.11.14","@types/react":"^18.2.48","@types/react-dom":"^18.2.18","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0","@vitejs/plugin-react":"^4.2.1",autoprefixer:"^10.4.17",axios:"^1.6.7","class-variance-authority":"^0.7.0",clsx:"^2.1.0",eslint:"^8.56.0","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-refresh":"^0.3.5",postcss:"^8.4.33",prettier:"^2.8.8",react:"^18.2.0","react-dom":"^18.2.0","react-loader-spinner":"^5.4.5","react-markdown":"^8.0.7","react-shadow":"^20.4.0","react-textarea-autosize":"^8.5.3","release-it":"^17.0.3","remark-gfm":"^3.0.1","socket.io-client":"^4.7.4",swr:"^2.2.4","tailwind-merge":"^1.14.0","tailwind-scrollbar":"^3.0.5",tailwindcss:"^3.4.1","tailwindcss-animate":"^1.0.7","timeago.js":"^4.0.2",typescript:"^5.3.3",vite:"^4.5.2","vite-plugin-dts":"^3.7.2","vite-tsconfig-paths":"^4.3.1"},mR=["dist","dist-embed"],gR={url:"https://github.com/openchatai/OpenCopilot/issues"},yR={name:"openchatai",url:"https://github.com/openchatai"},wR="./dist/index.js",vR="./dist/index.d.ts",xR={".":{require:"./dist/index.cjs.js",import:"./dist/index.es.js",default:"./dist/index.es.js",types:"./dist/index.d.ts"}},bR={"lucide-react":"^0.298.0"},kR={name:uR,private:!1,version:cR,type:fR,scripts:dR,peerDependencies:pR,devDependencies:hR,files:mR,bugs:gR,author:yR,main:wR,types:vR,exports:xR,dependencies:bR};function SR(e){return kR[e]}const ER=SR("version"),CR={"--opencopilot-primary-clr":"hsl(200 18% 46%)","--opencopilot-accent-clr":"hsl(300, 7%, 97%)"};function TR({children:e,options:t,containerProps:n}){const{style:r,...o}=n||{};return R.jsxs(tR.div,{...o,"data-version":ER,style:{width:"100%",height:"100%",pointerEvents:"none",...CR,...r},children:[R.jsx(nT,{data:t,children:R.jsx(aR,{children:R.jsx(iT,{children:R.jsx($_,{children:e})})})}),R.jsx("style",{children:nR})]})}function ok(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;te&&(t=0,r=n,n=new Map)}return{get:function(s){var l=n.get(s);if(l!==void 0)return l;if((l=r.get(s))!==void 0)return o(s,l),l},set:function(s,l){n.has(s)?n.set(s,l):o(s,l)}}}var lk="!";function DR(e){var t=e.separator||":",n=t.length===1,r=t[0],o=t.length;return function(s){for(var l=[],a=0,u=0,f,c=0;cu?f-u:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}}}function IR(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 FR(e){return{cache:NR(e.cacheSize),splitModifiers:DR(e),...$R(e)}}var zR=/\s+/;function MR(e,t){var n=t.splitModifiers,r=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(zR).map(function(s){var l=n(s),a=l.modifiers,u=l.hasImportantModifier,f=l.baseClassName,c=l.maybePostfixModifierPosition,p=r(c?f.substring(0,c):f),d=!!c;if(!p){if(!c)return{isTailwindClass:!1,originalClassName:s};if(p=r(f),!p)return{isTailwindClass:!1,originalClassName:s};d=!1}var m=IR(a).join(":"),g=u?m+lk:m;return{isTailwindClass:!0,modifierId:g,classGroupId:p,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(function(s){if(!s.isTailwindClass)return!0;var l=s.modifierId,a=s.classGroupId,u=s.hasPostfixModifier,f=l+a;return i.has(f)?!1:(i.add(f),o(a,u).forEach(function(c){return i.add(l+c)}),!0)}).reverse().map(function(s){return s.originalClassName}).join(" ")}function jR(){for(var e=arguments.length,t=new Array(e),n=0;n Action: action.name = data.name action.description = data.description action.operation_id = data.operation_id - action.base_uri = data.api_endpoint + action.api_endpoint = data.api_endpoint action.request_type = data.request_type action.payload = data.payload action.updated_at = datetime.datetime.utcnow() diff --git a/llm-server/requirements.txt b/llm-server/requirements.txt index e29ccff1d..e323e2d5d 100644 --- a/llm-server/requirements.txt +++ b/llm-server/requirements.txt @@ -169,4 +169,5 @@ wrapt==1.16.0 wsproto==1.2.0 yarl==1.9.4 zipp==3.17.0 -aioredis==2.0.1 \ No newline at end of file +aioredis==2.0.1 +scrapingbee==2.0.1 \ No newline at end of file diff --git a/llm-server/routes/action/action_controller.py b/llm-server/routes/action/action_controller.py index eab9d748e..e2cf996e4 100644 --- a/llm-server/routes/action/action_controller.py +++ b/llm-server/routes/action/action_controller.py @@ -99,7 +99,6 @@ def add_action(chatbot_id): @action.route("/bot//action/", methods=["PATCH"]) def update_single_action(chatbot_id: str, action_id: str): action_dto = ActionDTO(bot_id=chatbot_id, **request.get_json()) - # Todo make sure either both or non go in saved_action = update_action(action_id, action_dto) action_vector_service.update_action_by_operation_id(action_dto) diff --git a/llm-server/routes/flow/api_info.py b/llm-server/routes/flow/api_info.py index 76104bdeb..4cd32fc48 100644 --- a/llm-server/routes/flow/api_info.py +++ b/llm-server/routes/flow/api_info.py @@ -3,15 +3,15 @@ class ApiInfo: def __init__( - self, - endpoint: Optional[str], - method: Optional[str], - path_params: Any, - query_params: Any, - body_schema: Any, + self, + endpoint: Optional[str], + method: Optional[str], + path_params: Any, + query_params: Any, + body_schema: Any, ) -> None: self.endpoint = endpoint self.method = method - self.path_params: Any = {"properties": path_params} - self.query_params: Any = {"properties": query_params} + self.path_params: Any = path_params + self.query_params: Any = query_params self.body_schema = body_schema diff --git a/llm-server/routes/flow/generate_openapi_payload.py b/llm-server/routes/flow/generate_openapi_payload.py index 4334bf577..3c21be578 100644 --- a/llm-server/routes/flow/generate_openapi_payload.py +++ b/llm-server/routes/flow/generate_openapi_payload.py @@ -52,7 +52,7 @@ async def generate_api_payload( body_schema=body_schema, ) - if api_info.path_params["properties"]: + if api_info.path_params: api_info.path_params = await gen_params_from_schema( json.dumps(api_info.path_params, separators=(",", ":")), text, @@ -60,7 +60,7 @@ async def generate_api_payload( current_state, ) - if api_info.query_params["properties"]: + if api_info.query_params: api_info.query_params = await gen_params_from_schema( json.dumps(api_info.query_params, separators=(",", ":")), text, diff --git a/llm-server/routes/flow/utils/process_conversation_step.py b/llm-server/routes/flow/utils/process_conversation_step.py index d8a2280db..3d58d671d 100644 --- a/llm-server/routes/flow/utils/process_conversation_step.py +++ b/llm-server/routes/flow/utils/process_conversation_step.py @@ -111,7 +111,9 @@ def is_it_informative_or_actionable( messages.extend(chat_history[-6:]) messages.append(HumanMessage(content=current_message)) messages.append( - HumanMessage(content="Return the corresponding json for the last user input") + HumanMessage( + content="Return the corresponding json for the last user input, without any commentary." + ) ) content = cast(str, chat(messages=messages).content) diff --git a/llm-server/routes/search/search_service.py b/llm-server/routes/search/search_service.py new file mode 100644 index 000000000..877130636 --- /dev/null +++ b/llm-server/routes/search/search_service.py @@ -0,0 +1,107 @@ +import uuid +from shared.utils.opencopilot_utils.get_embeddings import get_embeddings +from utils.llm_consts import VectorCollections, initialize_qdrant_client +from qdrant_client import models +from typing import Dict, List, Optional +import operator +from copy import deepcopy + +client = initialize_qdrant_client() +embedding = get_embeddings() + + +# Data structure (you might want to define a custom class/dataclass) +class Item: + title: str + heading_text: str + heading_id: str + + def __init__(self, title: str, heading_text: str, heading_id: str): + self.title = title + self.heading_text = heading_text + self.heading_id = heading_id + + +# Function to add vectors to Qdrant +def add_cmdbar_data(items: List[Item], metadata: Dict[str, str]) -> None: + points = [] # Batch of points to insert + + titles = list(map(operator.attrgetter("title"), items)) + headings = list(map(operator.attrgetter("heading_text"), items)) + + # this logic has to be removed, currently we are only using the html title.... + title_embedding = None + if len(titles) > 3 and (titles[0] == titles[1] == titles[2] == titles[3]): + e = embedding.embed_query(titles[0]) + title_embeddings = [e for _ in range(len(titles))] + + else: + title_embeddings = embedding.embed_documents(titles) + + description_embeddings = embedding.embed_documents(headings) + for index, item in enumerate(items): + title_embedding = title_embeddings[index] + description_embedding = description_embeddings[index] + _metadata = deepcopy(metadata) + _metadata["title"] = item.title + _metadata["description"] = item.heading_text or "" + _metadata["heading_id"] = item.heading_id or "" + + points.append( + models.PointStruct( + id=uuid.uuid4().hex, # Placeholder - See explanation below + payload={"metadata": _metadata}, + vector={ + "description": title_embedding, + "title": description_embedding, + }, + ) + ) + + # Perform a single batch insert + client.upsert(collection_name=VectorCollections.neural_search, points=points) + + +# Function to search with weights +def weighted_search( + query: str, title_weight: float = 0.7, description_weight: float = 0.3 +) -> List[models.ScoredPoint]: + query_embedding = embedding.embed_query(query) + + # Search title and descriptions + title_results = client.search( + collection_name=VectorCollections.neural_search, + query_vector=models.NamedVector(name="title", vector=query_embedding), + with_payload=True, + with_vector=False, + ) + + description_results = client.search( + collection_name=VectorCollections.neural_search, + query_vector=models.NamedVector(name="description", vector=query_embedding), + with_payload=True, + with_vector=False, + ) + + # Build a lookup for description results + description_lookup = {result.id: result for result in description_results} + + # Combine, weigh, and sort results + results: List[models.ScoredPoint] = [] + for title_result in title_results: + matching_desc_result = description_lookup.get(title_result.id) + if matching_desc_result: + combined_score = (title_weight * title_result.score) + ( + description_weight * matching_desc_result.score + ) + results.append( + models.ScoredPoint( + version=1, + id=title_result.id, + payload=title_result.payload, + score=combined_score, + ) + ) + + results.sort(key=lambda x: x.score, reverse=True) + return results diff --git a/llm-server/shared/utils/opencopilot_utils/get_embeddings.py b/llm-server/shared/utils/opencopilot_utils/get_embeddings.py index 64384eac2..8275acf61 100644 --- a/llm-server/shared/utils/opencopilot_utils/get_embeddings.py +++ b/llm-server/shared/utils/opencopilot_utils/get_embeddings.py @@ -14,7 +14,9 @@ @lru_cache(maxsize=1) def get_embeddings(): - embedding_provider = os.environ.get("EMBEDDING_PROVIDER", EmbeddingProvider.OPENAI.value) + embedding_provider = os.environ.get( + "EMBEDDING_PROVIDER", EmbeddingProvider.OPENAI.value + ) if embedding_provider == EmbeddingProvider.azure.value: deployment = os.environ.get("AZURE_OPENAI_EMBEDDING_MODEL_NAME") @@ -23,9 +25,9 @@ def get_embeddings(): return OpenAIEmbeddings( deployment=deployment, client=client, - chunk_size=8, + chunk_size=1000, ) - + elif embedding_provider == EmbeddingProvider.openchat.value: logger.info("Got ollama embedding provider", provider=embedding_provider) return OllamaEmbeddings(base_url=f"{LOCAL_IP}:11434", model="openchat") @@ -45,4 +47,4 @@ def get_embeddings(): raise ValueError( f"Embedding service '{embedding_provider}' is not currently available. " f"Available services: {available_providers}" - ) \ No newline at end of file + ) diff --git a/llm-server/utils/llm_consts.py b/llm-server/utils/llm_consts.py index f7f6fd134..23ba0e4b8 100644 --- a/llm-server/utils/llm_consts.py +++ b/llm-server/utils/llm_consts.py @@ -40,6 +40,7 @@ class VectorCollections: flows = "flows" actions = "actions" knowledgebase = "knowledgebase" + neural_search = "neural_search" class ChatStrategy: diff --git a/llm-server/utils/vector_store_setup.py b/llm-server/utils/vector_store_setup.py index 32a7b6d56..a9c54afe2 100644 --- a/llm-server/utils/vector_store_setup.py +++ b/llm-server/utils/vector_store_setup.py @@ -1,6 +1,8 @@ from qdrant_client import QdrantClient, models import os +import qdrant_client + from utils.llm_consts import VectorCollections, initialize_qdrant_client vector_size = int(os.getenv("VECTOR_SIZE", "1536")) @@ -24,6 +26,26 @@ def try_create_collection(name: str, vectors_config: models.VectorParams): print(f"{name} collection already exists, ignoring") +# quick fix, connect to the try_create_collection function +def try_create_neural_search_collection(name: str, vector_params: models.VectorParams): + try: + client.create_collection( + collection_name=name, + vectors_config={ + "title": vector_params, + "description": vector_params, + }, + ) + + client.create_payload_index( + collection_name=name, + field_name="metadata.bot_id", + field_schema=models.PayloadFieldSchema.KEYWORD, + ) + except Exception: + print(f"{name} collection already exists, ignoring") + + vector_params = models.VectorParams(size=vector_size, distance=models.Distance.COSINE) @@ -31,3 +53,5 @@ def init_qdrant_collections(): try_create_collection(VectorCollections.knowledgebase, vector_params) try_create_collection(VectorCollections.actions, vector_params) try_create_collection(VectorCollections.flows, vector_params) + try_create_collection(VectorCollections.flows, vector_params) + try_create_neural_search_collection(VectorCollections.neural_search, vector_params) diff --git a/llm-server/workers/tasks/url_parsers.py b/llm-server/workers/tasks/url_parsers.py index a6462aac2..ce8d3f4f0 100644 --- a/llm-server/workers/tasks/url_parsers.py +++ b/llm-server/workers/tasks/url_parsers.py @@ -1,12 +1,11 @@ import io import json -from typing import List, Union +from typing import List, Optional, Tuple, Union from PyPDF2 import PdfReader from enum import Enum from abc import ABC, abstractmethod -from bs4 import BeautifulSoup - +from bs4 import BeautifulSoup, Tag from utils.get_logger import CustomLogger import requests @@ -25,12 +24,22 @@ def __repr__(self): class ContentParser(ABC): @abstractmethod - def parse(self, content) -> List[LinkInformation]: + def get_url_fragments(self, content) -> List[LinkInformation]: + pass + + @abstractmethod + def parse_text_content(self, content) -> str: + pass + + @abstractmethod + def find_all_headings_and_highlights( + self, content: str + ) -> Tuple[str, List[Tuple[str, str]]]: pass class TextContentParser(ContentParser): - def parse(self, content) -> List[LinkInformation]: + def get_url_fragments(self, content) -> List[LinkInformation]: soup = BeautifulSoup(content, "lxml") links = soup.find_all("a") @@ -57,9 +66,36 @@ def parse(self, content) -> List[LinkInformation]: results.append(LinkInformation("", "", text_content)) return results + # for now i am returning only the headings and the page title. We will enhance this later to also have highlights + def find_all_headings_and_highlights( + self, content: str + ) -> Tuple[str, List[Tuple[str, str]]]: + soup = BeautifulSoup(content, "lxml") + title_tag = soup.title + title = "" + if title_tag is not None: + title = title_tag.get_text(strip=True) + + headings: List[Tuple[str, str]] = [] + + for heading in soup.find_all(["h1", "h2", "h3", "h4", "h5", "h6"]): + heading_text = heading.get_text(strip=True) + + # Check if the heading or one of its children has an 'id' attribute + id_tag = heading.find(attrs={"id": True}) + if id_tag: + heading_id = id_tag["id"] + headings.append((heading_text, heading_id)) + + return title, headings + + def parse_text_content(self, content) -> str: + text = BeautifulSoup(content, "lxml").get_text() + return text + class JsonContentParser(ContentParser): - def parse(self, content) -> Union[LinkInformation, None]: + def get_url_fragments(self, content) -> Union[LinkInformation, None]: try: json_data = json.loads(content) # Convert JSON object to a string representation @@ -69,9 +105,17 @@ def parse(self, content) -> Union[LinkInformation, None]: print(f"Failed to parse JSON content: {e}") return None + def find_all_headings_and_highlights(self, content: str): + raise NotImplementedError() + + @abstractmethod + def parse_text_content(self, content) -> str: + result = self.get_url_fragments(content) + return result.target_text if result else "" + class PDFContentParser(ContentParser): - def parse(self, content) -> Union[LinkInformation, None]: + def get_url_fragments(self, content) -> Union[LinkInformation, None]: try: pdf_file = PdfReader(io.BytesIO(content)) text = "" @@ -85,6 +129,14 @@ def parse(self, content) -> Union[LinkInformation, None]: print(f"Failed to parse PDF content: {e}") return None + def find_all_headings_and_highlights(self, content: str): + raise NotImplementedError() + + def parse_text_content(self, content) -> str: + result = self.get_url_fragments(content) + + return result.target_text if result else "" + class ContentType(Enum): PDF = "pdf" @@ -108,6 +160,7 @@ def get_parser(url) -> ContentParser: # Add more parsers as needed for different content types raise ValueError(f"No parser available for content type: {content_type}") + def identify_content_type(url): try: response = requests.head(url) diff --git a/llm-server/workers/tasks/web_crawl.py b/llm-server/workers/tasks/web_crawl.py index eb597e0b9..37379a539 100644 --- a/llm-server/workers/tasks/web_crawl.py +++ b/llm-server/workers/tasks/web_crawl.py @@ -1,11 +1,11 @@ -from typing import Optional +from typing import Set from urllib.parse import urlparse, urljoin from celery import shared_task import traceback from langchain.text_splitter import RecursiveCharacterTextSplitter -from abc import ABC, abstractmethod +from routes.search.search_service import add_cmdbar_data, Item from shared.utils.opencopilot_utils.init_vector_store import init_vector_store from shared.utils.opencopilot_utils.interfaces import StoreOptions from shared.models.opencopilot_db.website_data_sources import ( @@ -15,55 +15,49 @@ ) from utils.llm_consts import WEB_CRAWL_STRATEGY, max_pages_to_crawl from models.repository.copilot_settings import ChatbotSettingCRUD -from workers.tasks.url_parsers import ParserFactory +from workers.tasks.url_parsers import ParserFactory, TextContentParser from workers.utils.remove_escape_sequences import remove_escape_sequences from utils.get_logger import CustomLogger -import io -import json -from PyPDF2 import PdfReader from workers.tasks.web_scraping_strategy import get_scraper from bs4 import BeautifulSoup logger = CustomLogger(__name__) -def get_links(url: str, strategy=WEB_CRAWL_STRATEGY) -> list: +def get_links(url: str, strategy=WEB_CRAWL_STRATEGY) -> Set[str]: if url.endswith((".jpg", ".jpeg", ".png", ".gif", ".bmp", ".mp4", ".avi", ".mkv")): - return [] + return set() scraper = get_scraper(strategy) html = scraper.extract_data(url) if html: soup = BeautifulSoup(html, "lxml") - base_url = urlparse(url).scheme + "://" + urlparse(url).hostname + # base_url = urlparse(url).scheme + "://" + urlparse(url).hostname links = [a.get("href") for a in soup.find_all("a", href=True)] # Only apply urljoin if the link isn't already an http or https absolute_links = [ - urljoin(base_url, link) if not link.startswith("http") else link + urljoin(url, link) if not link.startswith("http") else link for link in links ] - same_host_links = [ - link - for link in absolute_links - if urlparse(link).hostname == urlparse(url).hostname - ] + same_host_links: Set[str] = set() + + for abslink in absolute_links: + if abslink.startswith(url): + same_host_links.add(abslink.split("#")[0]) - same_host_links = [ - urlparse(link)._replace(path=urlparse(link).path.rstrip("/")).geturl() - for link in same_host_links - ] return same_host_links else: print("Failed to retrieve content.") - return [] + return set() -def scrape_url(url: str, strategy=WEB_CRAWL_STRATEGY) -> Optional[str]: +def scrape_url(url: str, bot_id: str): try: + strategy = WEB_CRAWL_STRATEGY # for external sources always use text content parser, because we don't know the content type if strategy != "requests": parser = TextContentParser() @@ -71,12 +65,19 @@ def scrape_url(url: str, strategy=WEB_CRAWL_STRATEGY) -> Optional[str]: parser = ParserFactory.get_parser(url) scraper = get_scraper(strategy) - response = scraper.extract_data(url) + content = scraper.extract_data(url) + + title, headings = parser.find_all_headings_and_highlights(content) + items = [ + Item(title=title, heading_text=heading_text, heading_id=heading_id) + for heading_text, heading_id in headings + ] - return parser.parse(response) + add_cmdbar_data(items, {"url": url, "bot_id": bot_id}) + return parser.parse_text_content(content) except ValueError as e: # Log an error message if no parser is available for the content type - logger.error(str(e)) + logger.error("SCRAPE_URL_FN", error=e) return None @@ -97,7 +98,7 @@ def scrape_website(url: str, bot_id: str, max_pages: int) -> int: info=f"Reached max pages to crawl for chatbot {bot_id}. Stopping crawl.", ) - visited_urls = set() + visited_urls: Set[str] = set() # Use a queue for breadth-first scraping queue = [url] @@ -116,43 +117,37 @@ def scrape_website(url: str, bot_id: str, max_pages: int) -> int: ): continue - contents = scrape_url(current_url) - - for content in contents or []: - # Check if scraping was successful - if content is not None: - # Process the scraped content as needed - target_text = remove_escape_sequences(content.target_text) - text_splitter = RecursiveCharacterTextSplitter( - chunk_size=1000, chunk_overlap=200, length_function=len - ) - docs = text_splitter.create_documents([target_text]) - init_vector_store( - docs, - StoreOptions( - namespace="knowledgebase", - metadata={ - "bot_id": bot_id, - "link": current_url, - "title": content.link_text, - "scroll_id": content.href, - }, - ), - ) - create_website_data_source( - chatbot_id=bot_id, url=current_url, status="SUCCESS" - ) - - total_pages_scraped += 1 - - # Get links on the current page - links = get_links(current_url) - - # Add new links to the queue - queue.extend(links) + content = scrape_url(current_url, bot_id=bot_id) + + total_pages_scraped += 1 + visited_urls.add(current_url) + + if content is not None: + # Process the scraped content as needed + target_text = remove_escape_sequences(content) + text_splitter = RecursiveCharacterTextSplitter( + chunk_size=1000, chunk_overlap=200, length_function=len + ) + docs = text_splitter.create_documents([target_text]) + init_vector_store( + docs, + StoreOptions( + namespace="knowledgebase", + metadata={"bot_id": bot_id, "link": current_url}, + ), + ) + create_website_data_source( + chatbot_id=bot_id, url=current_url, status="SUCCESS" + ) + + # Get links on the current page + links = get_links(current_url) + + # Add new links to the queue + queue.extend(links) except Exception as e: - logger.error(f"Error scraping {current_url}: {e}") + logger.error("WEB_SCRAPE_ERROR", error=e) # Mark the URL as visited visited_urls.add(current_url) @@ -160,7 +155,7 @@ def scrape_website(url: str, bot_id: str, max_pages: int) -> int: return total_pages_scraped -@shared_task +@shared_task(enable_trace=True) def web_crawl(url, bot_id: str): try: # setting = ChatbotSettings.get_chatbot_setting(bot_id) @@ -197,46 +192,3 @@ def resume_failed_website_scrape(website_data_source_id: str): url = website_data_source.url scrape_website(url, website_data_source.bot_id, max_pages_to_crawl) - - -class ContentParser(ABC): - @abstractmethod - def parse(self, content): - pass - - -class TextContentParser(ContentParser): - def parse(self, content): - soup = BeautifulSoup(content, "lxml") - text_content = " ".join( - [ - p.text.strip() - for p in soup.find_all(["p", "h1", "h2", "h3", "h4", "h5", "h6"]) - ] - ) - return text_content - - -class JsonContentParser(ContentParser): - def parse(self, content): - try: - json_data = json.loads(content) - # Convert JSON object to a string representation - return json.dumps(json_data, indent=2) - except json.JSONDecodeError as e: - logger.error(f"Failed to parse JSON content: {e}") - return None - - -class PDFContentParser(ContentParser): - def parse(self, content): - try: - with io.BytesIO(content) as pdf_file: - reader = PdfReader(pdf_file) - text_content = "" - for page in reader.pages: - text_content += page.extract_text() + "\n" - return text_content - except Exception as e: - logger.error(f"Failed to parse PDF content: {e}") - return None diff --git a/llm-server/workers/tasks/web_scraping_strategy.py b/llm-server/workers/tasks/web_scraping_strategy.py index 4688cb4d6..4cf357641 100644 --- a/llm-server/workers/tasks/web_scraping_strategy.py +++ b/llm-server/workers/tasks/web_scraping_strategy.py @@ -8,8 +8,8 @@ class WebScraperStrategy(ABC): @abstractmethod - def extract_data(self, url): - pass + def extract_data(self, url) -> str: + return "" class RequestsWebScraperStrategy(WebScraperStrategy): @@ -37,7 +37,7 @@ def extract_data(self, url): "render_js": True, }, ) - return response.content + return response.text @lru_cache(maxsize=1)