@runmedev/react-components 0.1.1 → 3.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app/index.js CHANGED
@@ -6668,9 +6668,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
6668
6668
  `});++r<t.length;)r&&n.push({type:"text",value:`
6669
6669
  `}),n.push(t[r]);return e&&t.length>0&&n.push({type:"text",value:`
6670
6670
  `}),n}function V2(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function z2(t,e){const n=vV(t,e),r=n.one(t,void 0),s=iV(n),c=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&c.children.push({type:"text",value:`
6671
- `},s),c}function wV(t,e){return t&&"run"in t?async function(n,r){const s=z2(n,{file:r,...e});await t.run(s,r)}:function(n,r){return z2(n,{file:r,...t||e})}}function H2(t){if(t)throw t}var Qm,W2;function SV(){if(W2)return Qm;W2=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(l){return typeof Array.isArray=="function"?Array.isArray(l):e.call(l)==="[object Array]"},c=function(l){if(!l||e.call(l)!=="[object Object]")return!1;var a=t.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&t.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!a&&!d)return!1;var f;for(f in l);return typeof f>"u"||t.call(l,f)},i=function(l,a){n&&a.name==="__proto__"?n(l,a.name,{enumerable:!0,configurable:!0,value:a.newValue,writable:!0}):l[a.name]=a.newValue},o=function(l,a){if(a==="__proto__")if(t.call(l,a)){if(r)return r(l,a).value}else return;return l[a]};return Qm=function u(){var l,a,d,f,p,v,m=arguments[0],b=1,y=arguments.length,_=!1;for(typeof m=="boolean"&&(_=m,m=arguments[1]||{},b=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});b<y;++b)if(l=arguments[b],l!=null)for(a in l)d=o(m,a),f=o(l,a),m!==f&&(_&&f&&(c(f)||(p=s(f)))?(p?(p=!1,v=d&&s(d)?d:[]):v=d&&c(d)?d:{},i(m,{name:a,newValue:u(_,v,f)})):typeof f<"u"&&i(m,{name:a,newValue:f}));return m},Qm}var xV=SV();const ev=Kc(xV);function Gv(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function CV(){const t=[],e={run:n,use:r};return e;function n(...s){let c=-1;const i=s.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);o(null,...s);function o(u,...l){const a=t[++c];let d=-1;if(u){i(u);return}for(;++d<s.length;)(l[d]===null||l[d]===void 0)&&(l[d]=s[d]);s=l,a?EV(a,o)(...l):i(null,...l)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),e}}function EV(t,e){let n;return r;function r(...i){const o=t.length>i.length;let u;o&&i.push(s);try{u=t.apply(this,i)}catch(l){const a=l;if(o&&n)throw a;return s(a)}o||(u&&u.then&&typeof u.then=="function"?u.then(c,s):u instanceof Error?s(u):c(u))}function s(i,...o){n||(n=!0,e(i,...o))}function c(i){s(null,i)}}const ms={basename:jV,dirname:kV,extname:TV,join:OV,sep:"/"};function jV(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');hu(t);let n=0,r=-1,s=t.length,c;if(e===void 0||e.length===0||e.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(c){n=s+1;break}}else r<0&&(c=!0,r=s+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let i=-1,o=e.length-1;for(;s--;)if(t.codePointAt(s)===47){if(c){n=s+1;break}}else i<0&&(c=!0,i=s+1),o>-1&&(t.codePointAt(s)===e.codePointAt(o--)?o<0&&(r=s):(o=-1,r=i));return n===r?r=i:r<0&&(r=t.length),t.slice(n,r)}function kV(t){if(hu(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function TV(t){hu(t);let e=t.length,n=-1,r=0,s=-1,c=0,i;for(;e--;){const o=t.codePointAt(e);if(o===47){if(i){r=e+1;break}continue}n<0&&(i=!0,n=e+1),o===46?s<0?s=e:c!==1&&(c=1):s>-1&&(c=-1)}return s<0||n<0||c===0||c===1&&s===n-1&&s===r+1?"":t.slice(s,n)}function OV(...t){let e=-1,n;for(;++e<t.length;)hu(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":AV(n)}function AV(t){hu(t);const e=t.codePointAt(0)===47;let n=IV(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function IV(t,e){let n="",r=0,s=-1,c=0,i=-1,o,u;for(;++i<=t.length;){if(i<t.length)o=t.codePointAt(i);else{if(o===47)break;o=47}if(o===47){if(!(s===i-1||c===1))if(s!==i-1&&c===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),s=i,c=0;continue}}else if(n.length>0){n="",r=0,s=i,c=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(s+1,i):n=t.slice(s+1,i),r=i-s-1;s=i,c=0}else o===46&&c>-1?c++:c=-1}return n}function hu(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const RV={cwd:NV};function NV(){return"/"}function Zv(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function LV(t){if(typeof t=="string")t=new URL(t);else if(!Zv(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return DV(t)}function DV(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const r=e.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(e)}const tv=["history","path","basename","stem","extname","dirname"];class Mk{constructor(e){let n;e?Zv(e)?n={path:e}:typeof e=="string"||MV(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":RV.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<tv.length;){const c=tv[r];c in n&&n[c]!==void 0&&n[c]!==null&&(this[c]=c==="history"?[...n[c]]:n[c])}let s;for(s in n)tv.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?ms.basename(this.path):void 0}set basename(e){rv(e,"basename"),nv(e,"basename"),this.path=ms.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ms.dirname(this.path):void 0}set dirname(e){G2(this.basename,"dirname"),this.path=ms.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ms.extname(this.path):void 0}set extname(e){if(nv(e,"extname"),G2(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ms.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Zv(e)&&(e=LV(e)),rv(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ms.basename(this.path,this.extname):void 0}set stem(e){rv(e,"stem"),nv(e,"stem"),this.path=ms.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){const s=this.message(e,n,r);throw s.fatal=!0,s}info(e,n,r){const s=this.message(e,n,r);return s.fatal=void 0,s}message(e,n,r){const s=new Bn(e,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function nv(t,e){if(t&&t.includes(ms.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+ms.sep+"`")}function rv(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function G2(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function MV(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const PV=function(t){const r=this.constructor.prototype,s=r[t],c=function(){return s.apply(c,arguments)};return Object.setPrototypeOf(c,r),c},$V={}.hasOwnProperty;class U0 extends PV{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=CV()}copy(){const e=new U0;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];e.use(...r)}return e.data(ev(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(ov("data",this.frozen),this.namespace[e]=n,this):$V.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ov("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(e,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Pd(e),r=this.parser||this.Parser;return sv("parse",r),r(String(n),n)}process(e,n){const r=this;return this.freeze(),sv("process",this.parser||this.Parser),iv("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(c,i){const o=Pd(e),u=r.parse(o);r.run(u,o,function(a,d,f){if(a||!d||!f)return l(a);const p=d,v=r.stringify(p,f);FV(v)?f.value=v:f.result=v,l(a,f)});function l(a,d){a||!d?i(a):c?c(d):n(void 0,d)}}}processSync(e){let n=!1,r;return this.freeze(),sv("processSync",this.parser||this.Parser),iv("processSync",this.compiler||this.Compiler),this.process(e,s),Y2("processSync","process",n),r;function s(c,i){n=!0,H2(c),r=i}}run(e,n,r){Z2(e),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?c(void 0,r):new Promise(c);function c(i,o){const u=Pd(n);s.run(e,u,l);function l(a,d,f){const p=d||e;a?o(a):i?i(p):r(void 0,p,f)}}}runSync(e,n){let r=!1,s;return this.run(e,n,c),Y2("runSync","run",r),s;function c(i,o){H2(i),s=o,r=!0}}stringify(e,n){this.freeze();const r=Pd(n),s=this.compiler||this.Compiler;return iv("stringify",s),Z2(e),s(e,r)}use(e,...n){const r=this.attachers,s=this.namespace;if(ov("use",this.frozen),e!=null)if(typeof e=="function")u(e,n);else if(typeof e=="object")Array.isArray(e)?o(e):i(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function c(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[a,...d]=l;u(a,d)}else i(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function i(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(s.settings=ev(!0,s.settings,l.settings))}function o(l){let a=-1;if(l!=null)if(Array.isArray(l))for(;++a<l.length;){const d=l[a];c(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,a){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===l){f=d;break}if(f===-1)r.push([l,...a]);else if(a.length>0){let[p,...v]=a;const m=r[f][1];Gv(m)&&Gv(p)&&(p=ev(!0,m,p)),r[f]=[l,p,...v]}}}}const BV=new U0().freeze();function sv(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function iv(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function ov(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Z2(t){if(!Gv(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Y2(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Pd(t){return UV(t)?t:new Mk(t)}function UV(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function FV(t){return typeof t=="string"||VV(t)}function VV(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const zV="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",K2=[],X2={allowDangerousHtml:!0},HV=/^(https?|ircs?|mailto|xmpp)$/i,WV=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function GV(t){const e=ZV(t),n=YV(t);return KV(e.runSync(e.parse(n),n),t)}function ZV(t){const e=t.rehypePlugins||K2,n=t.remarkPlugins||K2,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...X2}:X2;return BV().use(jF).use(n).use(wV,r).use(e)}function YV(t){const e=t.children||"",n=new Mk;return typeof e=="string"&&(n.value=e),n}function KV(t,e){const n=e.allowedElements,r=e.allowElement,s=e.components,c=e.disallowedElements,i=e.skipHtml,o=e.unwrapDisallowed,u=e.urlTransform||XV;for(const a of WV)Object.hasOwn(e,a.from)&&(""+a.from+(a.to?"use `"+a.to+"` instead":"remove it")+zV+a.id,void 0);return Dk(t,l),iB(t,{Fragment:J.Fragment,components:s,ignoreInvalidStyle:!0,jsx:J.jsx,jsxs:J.jsxs,passKeys:!0,passNode:!0});function l(a,d,f){if(a.type==="raw"&&f&&typeof d=="number")return i?f.children.splice(d,1):f.children[d]={type:"text",value:a.value},d;if(a.type==="element"){let p;for(p in Xm)if(Object.hasOwn(Xm,p)&&Object.hasOwn(a.properties,p)){const v=a.properties[p],m=Xm[p];(m===null||m.includes(a.tagName))&&(a.properties[p]=u(String(v||""),p,a))}}if(a.type==="element"){let p=n?!n.includes(a.tagName):c?c.includes(a.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(a,d,f)),p&&f&&typeof d=="number")return o&&a.children?f.children.splice(d,1,...a.children):f.children.splice(d,1),d}}}function XV(t){const e=t.indexOf(":"),n=t.indexOf("?"),r=t.indexOf("#"),s=t.indexOf("/");return e===-1||s!==-1&&e>s||n!==-1&&e>n||r!==-1&&e>r||HV.test(t.slice(0,e))?t:""}const Pk=({role:t,children:e})=>{const n=t===ri.USER?"self-end":"self-start",r=t===ri.USER?"indigo":"gray";return J.jsx(Nh,{highContrast:!0,color:r,className:`${n} max-w-[80%] break-words m-1`,children:J.jsx(Rc,{children:e})})},qV=({block:t})=>J.jsx(Pk,{role:ri.USER,children:t.contents}),JV=({block:t})=>J.jsx(Pk,{role:ri.ASSISTANT,children:J.jsx(GV,{components:{code:({children:e,...n})=>J.jsx("pre",{className:"whitespace-pre-wrap",children:J.jsx("code",{...n,children:String(e).replace(/\n$/,"")})})},children:t.contents})}),QV=D.memo(({block:t,isRecentCodeBlock:e,onClick:n})=>{const{runCodeBlock:r}=Xi(),{settings:s}=es(),c=t.contents.split(/&&|;|\n|\\n/)[0],i=()=>{n?n():r(t)},o=s.webApp.invertedOrder?"justify-end":"justify-start",u=J.jsx("span",{className:"text-xs text-gray-400 p-2",children:"Press CTRL+ENTER to run"});return J.jsxs("div",{className:`flex ${o} items-center h-full`,children:[e&&s.webApp.invertedOrder&&u,J.jsxs("div",{className:"flex items-center m-1 p-2 bg-[#1e1e1e] rounded-md max-w-[80%] cursor-pointer",onClick:i,children:[J.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#d4d4d4",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:J.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),J.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#d4d4d4",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-1",children:[J.jsx("polyline",{points:"4 17 10 11 4 5"}),J.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),J.jsx("span",{className:"text-sm text-[#d4d4d4] italic truncate max-w-2/3",children:c})]}),e&&!s.webApp.invertedOrder&&u]})},(t,e)=>t.block.id===e.block.id&&JSON.stringify(t.block.contents)===JSON.stringify(e.block.contents)&&t.isRecentCodeBlock===e.isRecentCodeBlock),q2=({block:t,isRecentCodeBlock:e})=>{if(t.kind===vs.CODE)return J.jsx(QV,{block:t,isRecentCodeBlock:e},t.id);switch(t.role){case ri.USER:return J.jsx(qV,{block:t});case ri.ASSISTANT:return J.jsx(JV,{block:t});default:return null}},J2=()=>{const{useColumns:t,isTyping:e}=Xi(),{settings:n}=es(),{chat:r}=t(),s=D.useRef(null);D.useEffect(()=>{var u;n.webApp.invertedOrder||(u=s.current)==null||u.scrollIntoView({behavior:"smooth"})},[r,n.webApp.invertedOrder]);const c=n.webApp.invertedOrder?0:r.length-1,o=J.jsx("div",{className:"flex justify-start items-center h-full",children:J.jsx(q2,{block:pP})});return J.jsxs("div",{className:"overflow-y-clip p-1 flex flex-col whitespace-pre-wrap",children:[e&&n.webApp.invertedOrder&&o,r.map((u,l)=>J.jsx(q2,{block:u,isRecentCodeBlock:u.kind===vs.CODE&&l===c&&!e},l)),e&&!n.webApp.invertedOrder&&o,J.jsx("div",{ref:s})]})},Q2=()=>{const{sendUserBlock:t,isInputDisabled:e}=Xi(),[n,r]=D.useState(""),s=D.useRef(null);D.useEffect(()=>{var o;(o=s.current)==null||o.focus()},[]);const c=o=>{o.preventDefault(),n.trim()&&(t(n),r(""))},i=o=>{if(o.key==="Enter"&&!o.shiftKey){o.preventDefault();const u=o.currentTarget.form;u&&u.requestSubmit()}};return J.jsx("form",{onSubmit:c,className:"flex w-full",children:J.jsxs(In,{className:"w-full flex flex-nowrap items-start gap-4 m-2",children:[J.jsx(ih,{name:"userInput",value:n,onChange:o=>r(o.target.value),onKeyDown:i,placeholder:"Enter your question",size:"3",className:"flex-grow min-w-0",ref:s,rows:2,style:{resize:"vertical"}}),J.jsx(Di,{type:"submit",disabled:e,children:J.jsx(k$,{})})]})})};function ex(){const{useColumns:t,runCodeBlock:e}=Xi(),{settings:n}=es(),{chat:r}=t(),s=D.useRef(null);D.useEffect(()=>{const i=u=>{if(u.ctrlKey&&u.key==="Enter"){const l=n.webApp.invertedOrder?r[0]:r[r.length-1];(l==null?void 0:l.kind)===vs.CODE&&e(l)}},o=s.current;if(o)return o.addEventListener("keydown",i),()=>o.removeEventListener("keydown",i)},[r,e,n.webApp.invertedOrder]);const c=n.webApp.invertedOrder?"flex-col":"flex-col-reverse";return J.jsxs("div",{ref:s,className:"flex flex-col h-full",children:[J.jsx(tn,{size:"5",weight:"bold",className:"mb-2",children:"How can I help you?"}),J.jsx(Lh,{type:"auto",scrollbars:"vertical",className:"flex-1 p-4",children:J.jsx("div",{className:`flex ${c} h-full w-full`,children:n.webApp.invertedOrder?J.jsxs(J.Fragment,{children:[J.jsx(Q2,{}),J.jsx(J2,{})]}):J.jsxs(J.Fragment,{children:[J.jsx(Q2,{}),J.jsx(J2,{})]})})})]})}const ez=()=>{const{useColumns:t}=Xi(),{files:e}=t(),n=D.useRef(null),r=()=>{var i;(i=n.current)==null||i.scrollIntoView({behavior:"smooth"})},s=D.useMemo(()=>{let i=mn(yc,{});return e.length>0&&(i=e[e.length-1]),i},[e]);D.useEffect(()=>{r()},[s]);const c=s.fileSearchResults.length>0;return J.jsxs("div",{className:"flex flex-col h-full",children:[J.jsx(tn,{size:"5",weight:"bold",className:"mb-2",children:"Files"}),J.jsx(Lh,{type:"auto",scrollbars:"vertical",className:"flex-1 pt-4",children:c?J.jsxs("div",{className:"grow",children:[s.fileSearchResults.map(i=>J.jsx("div",{className:"mb-2",children:J.jsx(bs,{p:"2",style:{borderRadius:"6px",border:"1px solid var(--gray-5)"},children:J.jsx(tn,{size:"2",weight:"medium",children:J.jsx(Ag,{href:i.Link,target:"_blank",className:"text-blue-500 hover:underline",children:i.FileName})})})},i.FileID)),J.jsx("div",{ref:n,className:"h-1"})]}):J.jsxs("div",{children:[J.jsx("div",{children:"No search results yet"}),J.jsx("div",{ref:n,className:"h-1"})]})})]})},tz=Gi("ChVnb29nbGUvcnBjL2NvZGUucHJvdG8SCmdvb2dsZS5ycGMqtwIKBENvZGUSBgoCT0sQABINCglDQU5DRUxMRUQQARILCgdVTktOT1dOEAISFAoQSU5WQUxJRF9BUkdVTUVOVBADEhUKEURFQURMSU5FX0VYQ0VFREVEEAQSDQoJTk9UX0ZPVU5EEAUSEgoOQUxSRUFEWV9FWElTVFMQBhIVChFQRVJNSVNTSU9OX0RFTklFRBAHEhMKD1VOQVVUSEVOVElDQVRFRBAQEhYKElJFU09VUkNFX0VYSEFVU1RFRBAIEhcKE0ZBSUxFRF9QUkVDT05ESVRJT04QCRILCgdBQk9SVEVEEAoSEAoMT1VUX09GX1JBTkdFEAsSEQoNVU5JTVBMRU1FTlRFRBAMEgwKCElOVEVSTkFMEA0SDwoLVU5BVkFJTEFCTEUQDhINCglEQVRBX0xPU1MQD0JYCg5jb20uZ29vZ2xlLnJwY0IJQ29kZVByb3RvUAFaM2dvb2dsZS5nb2xhbmcub3JnL2dlbnByb3RvL2dvb2dsZWFwaXMvcnBjL2NvZGU7Y29kZaICA1JQQ2IGcHJvdG8z"),nz=EN(tz,0),Yv=Ph(nz);function rz(){const{runnerError:t}=es(),[e]=o9(),n=D.useMemo(()=>t&&!(t instanceof Error)?Yv[t.code]??t.code:e.get("error"),[t,e]),r=D.useMemo(()=>t&&!(t instanceof Error)?t.message:e.get("error_description"),[t,e]),s=()=>{window.location.href="/oidc/login"};return J.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:[n&&J.jsxs(Nh,{color:"red",children:[J.jsxs(Rc,{className:"font-bold",children:["Error: ",n]}),r&&J.jsx(Rc,{children:r})]}),J.jsx(Di,{size:"4",onClick:s,className:"cursor-pointer",children:"Login"})]})}const sz=()=>J.jsxs(gE,{size:"3",style:{padding:"2rem",textAlign:"center"},children:[J.jsx(aE,{size:"8",mb:"4",children:"404"}),J.jsx(tn,{size:"5",color:"gray",children:"Page not found"}),J.jsx(tn,{as:"p",mt:"4",children:"The page you're looking for doesn't exist or has been moved."}),J.jsxs(tn,{as:"p",mt:"4",children:["Click"," ",J.jsx(Ag,{href:"/",underline:"always",children:"here"})," ","to go back home."]})]});function iz(){const t=tg(),{settings:e,updateSettings:n,runnerError:r,defaultSettings:s}=es(),[c,i]=D.useState(!1),[o,u]=D.useState(e.agentEndpoint),[l,a]=D.useState(e.webApp.runner),[d,f]=D.useState(e.webApp.invertedOrder),p=()=>{n({agentEndpoint:o,webApp:{runner:l,reconnect:e.webApp.reconnect,invertedOrder:d}}),i(!0)};D.useEffect(()=>{c&&(i(!1),r&&t("/"))},[r,c,t]);const v=()=>{u(s.agentEndpoint),a(s.webApp.runner),f(s.webApp.invertedOrder)},m=D.useMemo(()=>{if(r instanceof Error)return r.message},[r]),b=o!==e.agentEndpoint||l!==e.webApp.runner||d!==e.webApp.invertedOrder;return J.jsxs(bs,{className:"w-full mx-auto",children:[J.jsx(tn,{size:"5",weight:"bold",className:"mb-2",children:"Settings"}),J.jsxs(bs,{className:"mt-4",children:[J.jsxs(In,{direction:"column",gap:"4",children:[J.jsxs(In,{direction:"column",gap:"2",children:[J.jsx(tn,{size:"3",weight:"bold",children:"Agent Endpoint Configuration"}),J.jsx(tn,{size:"2",color:"gray",children:"Configure the endpoint URL for the AI agent. Changes will take effect after saving."}),J.jsx(ih,{size:"3",placeholder:"Enter AI endpoint URL",value:o,onChange:y=>u(y.target.value)})]}),J.jsxs(In,{direction:"column",gap:"2",children:[J.jsx(tn,{size:"3",weight:"bold",children:"Runner Endpoint Configuration"}),J.jsx(tn,{size:"2",color:"gray",children:"Configure the WebSocket endpoint URL for the runner. Changes will take effect after saving."}),r&&J.jsx(Nh,{color:"red",children:J.jsxs(Rc,{className:"font-bold",children:["Runner error",m?": "+m:""]})}),J.jsx(ih,{size:"3",placeholder:"Enter Runner WebSocket endpoint URL",value:l,onChange:y=>a(y.target.value)}),J.jsx(tn,{size:"2",color:"gray",children:"Revert will reset endpoints to the default values, including protocol http(s), based on the current page."})]}),J.jsxs(In,{direction:"column",gap:"2",children:[J.jsx(tn,{size:"3",weight:"bold",children:"User Experience Mode"}),J.jsx(tn,{as:"label",size:"2",children:J.jsxs(In,{gap:"2",children:["Document Mode",J.jsx(bE,{checked:d,onCheckedChange:f}),"Console Mode"]})})]})]}),J.jsxs(In,{gap:"3",justify:"end",mt:"4",children:[J.jsx(Di,{size:"2",variant:"soft",onClick:()=>t("/"),children:"Back"}),J.jsx(Di,{size:"2",variant:"soft",onClick:v,children:"Revert"}),J.jsx(Di,{size:"2",onClick:p,disabled:!b,children:"Save"})]})]})]})}function Ct(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function tx(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function sf(...t){return e=>{let n=!1;const r=t.map(s=>{const c=tx(s,e);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let s=0;s<r.length;s++){const c=r[s];typeof c=="function"?c():tx(t[s],null)}}}}function sr(...t){return D.useCallback(sf(...t),t)}function fu(t,e=[]){let n=[];function r(c,i){const o=D.createContext(i),u=n.length;n=[...n,i];const l=d=>{var y;const{scope:f,children:p,...v}=d,m=((y=f==null?void 0:f[t])==null?void 0:y[u])||o,b=D.useMemo(()=>v,Object.values(v));return J.jsx(m.Provider,{value:b,children:p})};l.displayName=c+"Provider";function a(d,f){var m;const p=((m=f==null?void 0:f[t])==null?void 0:m[u])||o,v=D.useContext(p);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${c}\``)}return[l,a]}const s=()=>{const c=n.map(i=>D.createContext(i));return function(o){const u=(o==null?void 0:o[t])||c;return D.useMemo(()=>({[`__scope${t}`]:{...o,[t]:u}}),[o,u])}};return s.scopeName=t,[r,oz(s,...e)]}function oz(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const i=r.reduce((o,{useScope:u,scopeName:l})=>{const d=u(c)[`__scope${l}`];return{...o,...d}},{});return D.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}var Mo=globalThis!=null&&globalThis.document?D.useLayoutEffect:()=>{},az=vx[" useInsertionEffect ".trim().toString()]||Mo;function $k({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,c,i]=lz({defaultProp:e,onChange:n}),o=t!==void 0,u=o?t:s;{const a=D.useRef(t!==void 0);D.useEffect(()=>{const d=a.current;d!==o&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),a.current=o},[o,r])}const l=D.useCallback(a=>{var d;if(o){const f=cz(a)?a(t):a;f!==t&&((d=i.current)==null||d.call(i,f))}else c(a)},[o,t,c,i]);return[u,l]}function lz({defaultProp:t,onChange:e}){const[n,r]=D.useState(t),s=D.useRef(n),c=D.useRef(e);return az(()=>{c.current=e},[e]),D.useEffect(()=>{var i;s.current!==n&&((i=c.current)==null||i.call(c,n),s.current=n)},[n,s]),[n,r,c]}function cz(t){return typeof t=="function"}function bh(t){const e=uz(t),n=D.forwardRef((r,s)=>{const{children:c,...i}=r,o=D.Children.toArray(c),u=o.find(hz);if(u){const l=u.props.children,a=o.map(d=>d===u?D.Children.count(l)>1?D.Children.only(null):D.isValidElement(l)?l.props.children:null:d);return J.jsx(e,{...i,ref:s,children:D.isValidElement(l)?D.cloneElement(l,void 0,a):null})}return J.jsx(e,{...i,ref:s,children:c})});return n.displayName=`${t}.Slot`,n}function uz(t){const e=D.forwardRef((n,r)=>{const{children:s,...c}=n;if(D.isValidElement(s)){const i=pz(s),o=fz(c,s.props);return s.type!==D.Fragment&&(o.ref=r?sf(r,i):i),D.cloneElement(s,o)}return D.Children.count(s)>1?D.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var dz=Symbol("radix.slottable");function hz(t){return D.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===dz}function fz(t,e){const n={...e};for(const r in e){const s=t[r],c=e[r];/^on[A-Z]/.test(r)?s&&c?n[r]=(...o)=>{const u=c(...o);return s(...o),u}:s&&(n[r]=s):r==="style"?n[r]={...s,...c}:r==="className"&&(n[r]=[s,c].filter(Boolean).join(" "))}return{...t,...n}}function pz(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var mz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],lr=mz.reduce((t,e)=>{const n=bh(`Primitive.${e}`),r=D.forwardRef((s,c)=>{const{asChild:i,...o}=s,u=i?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),J.jsx(u,{...o,ref:c})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Bk(t,e){t&&og.flushSync(()=>t.dispatchEvent(e))}function Uk(t){const e=t+"CollectionProvider",[n,r]=fu(e),[s,c]=n(e,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:b,children:y}=m,_=Qn.useRef(null),S=Qn.useRef(new Map).current;return J.jsx(s,{scope:b,itemMap:S,collectionRef:_,children:y})};i.displayName=e;const o=t+"CollectionSlot",u=bh(o),l=Qn.forwardRef((m,b)=>{const{scope:y,children:_}=m,S=c(o,y),C=sr(b,S.collectionRef);return J.jsx(u,{ref:C,children:_})});l.displayName=o;const a=t+"CollectionItemSlot",d="data-radix-collection-item",f=bh(a),p=Qn.forwardRef((m,b)=>{const{scope:y,children:_,...S}=m,C=Qn.useRef(null),x=sr(b,C),j=c(a,y);return Qn.useEffect(()=>(j.itemMap.set(C,{ref:C,...S}),()=>void j.itemMap.delete(C))),J.jsx(f,{[d]:"",ref:x,children:_})});p.displayName=a;function v(m){const b=c(t+"CollectionConsumer",m);return Qn.useCallback(()=>{const _=b.collectionRef.current;if(!_)return[];const S=Array.from(_.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((j,k)=>S.indexOf(j.ref.current)-S.indexOf(k.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:l,ItemSlot:p},v,r]}var vz=D.createContext(void 0);function Fk(t){const e=D.useContext(vz);return t||e||"ltr"}function ii(t){const e=D.useRef(t);return D.useEffect(()=>{e.current=t}),D.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function gz(t,e=globalThis==null?void 0:globalThis.document){const n=ii(t);D.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var bz="DismissableLayer",Kv="dismissableLayer.update",yz="dismissableLayer.pointerDownOutside",_z="dismissableLayer.focusOutside",nx,Vk=D.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zk=D.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:i,onDismiss:o,...u}=t,l=D.useContext(Vk),[a,d]=D.useState(null),f=(a==null?void 0:a.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=D.useState({}),v=sr(e,k=>d(k)),m=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(b),_=a?m.indexOf(a):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,C=_>=y,x=xz(k=>{const T=k.target,A=[...l.branches].some(L=>L.contains(T));!C||A||(s==null||s(k),i==null||i(k),k.defaultPrevented||o==null||o())},f),j=Cz(k=>{const T=k.target;[...l.branches].some(L=>L.contains(T))||(c==null||c(k),i==null||i(k),k.defaultPrevented||o==null||o())},f);return gz(k=>{_===l.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&o&&(k.preventDefault(),o()))},f),D.useEffect(()=>{if(a)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(nx=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(a)),l.layers.add(a),rx(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=nx)}},[a,f,n,l]),D.useEffect(()=>()=>{a&&(l.layers.delete(a),l.layersWithOutsidePointerEventsDisabled.delete(a),rx())},[a,l]),D.useEffect(()=>{const k=()=>p({});return document.addEventListener(Kv,k),()=>document.removeEventListener(Kv,k)},[]),J.jsx(lr.div,{...u,ref:v,style:{pointerEvents:S?C?"auto":"none":void 0,...t.style},onFocusCapture:Ct(t.onFocusCapture,j.onFocusCapture),onBlurCapture:Ct(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Ct(t.onPointerDownCapture,x.onPointerDownCapture)})});zk.displayName=bz;var wz="DismissableLayerBranch",Sz=D.forwardRef((t,e)=>{const n=D.useContext(Vk),r=D.useRef(null),s=sr(e,r);return D.useEffect(()=>{const c=r.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),J.jsx(lr.div,{...t,ref:s})});Sz.displayName=wz;function xz(t,e=globalThis==null?void 0:globalThis.document){const n=ii(t),r=D.useRef(!1),s=D.useRef(()=>{});return D.useEffect(()=>{const c=o=>{if(o.target&&!r.current){let u=function(){Hk(yz,n,l,{discrete:!0})};const l={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=u,e.addEventListener("click",s.current,{once:!0})):u()}else e.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",c),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function Cz(t,e=globalThis==null?void 0:globalThis.document){const n=ii(t),r=D.useRef(!1);return D.useEffect(()=>{const s=c=>{c.target&&!r.current&&Hk(_z,n,{originalEvent:c},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function rx(){const t=new CustomEvent(Kv);document.dispatchEvent(t)}function Hk(t,e,n,{discrete:r}){const s=n.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Bk(s,c):s.dispatchEvent(c)}var av=0;function Ez(){D.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??sx()),document.body.insertAdjacentElement("beforeend",t[1]??sx()),av++,()=>{av===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),av--}},[])}function sx(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var lv="focusScope.autoFocusOnMount",cv="focusScope.autoFocusOnUnmount",ix={bubbles:!1,cancelable:!0},jz="FocusScope",Wk=D.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:c,...i}=t,[o,u]=D.useState(null),l=ii(s),a=ii(c),d=D.useRef(null),f=sr(e,m=>u(m)),p=D.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;D.useEffect(()=>{if(r){let m=function(S){if(p.paused||!o)return;const C=S.target;o.contains(C)?d.current=C:Li(d.current,{select:!0})},b=function(S){if(p.paused||!o)return;const C=S.relatedTarget;C!==null&&(o.contains(C)||Li(d.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const x of S)x.removedNodes.length>0&&Li(o)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const _=new MutationObserver(y);return o&&_.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),_.disconnect()}}},[r,o,p.paused]),D.useEffect(()=>{if(o){ax.add(p);const m=document.activeElement;if(!o.contains(m)){const y=new CustomEvent(lv,ix);o.addEventListener(lv,l),o.dispatchEvent(y),y.defaultPrevented||(kz(Rz(Gk(o)),{select:!0}),document.activeElement===m&&Li(o))}return()=>{o.removeEventListener(lv,l),setTimeout(()=>{const y=new CustomEvent(cv,ix);o.addEventListener(cv,a),o.dispatchEvent(y),y.defaultPrevented||Li(m??document.body,{select:!0}),o.removeEventListener(cv,a),ax.remove(p)},0)}}},[o,l,a,p]);const v=D.useCallback(m=>{if(!n&&!r||p.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(b&&y){const _=m.currentTarget,[S,C]=Tz(_);S&&C?!m.shiftKey&&y===C?(m.preventDefault(),n&&Li(S,{select:!0})):m.shiftKey&&y===S&&(m.preventDefault(),n&&Li(C,{select:!0})):y===_&&m.preventDefault()}},[n,r,p.paused]);return J.jsx(lr.div,{tabIndex:-1,...i,ref:f,onKeyDown:v})});Wk.displayName=jz;function kz(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Li(r,{select:e}),document.activeElement!==n)return}function Tz(t){const e=Gk(t),n=ox(e,t),r=ox(e.reverse(),t);return[n,r]}function Gk(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function ox(t,e){for(const n of t)if(!Oz(n,{upTo:e}))return n}function Oz(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Az(t){return t instanceof HTMLInputElement&&"select"in t}function Li(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Az(t)&&e&&t.select()}}var ax=Iz();function Iz(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=lx(t,e),t.unshift(e)},remove(e){var n;t=lx(t,e),(n=t[0])==null||n.resume()}}}function lx(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function Rz(t){return t.filter(e=>e.tagName!=="A")}var Nz=vx[" useId ".trim().toString()]||(()=>{}),Lz=0;function Xv(t){const[e,n]=D.useState(Nz());return Mo(()=>{n(r=>r??String(Lz++))},[t]),t||(e?`radix-${e}`:"")}var Dz="Arrow",Zk=D.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...c}=t;return J.jsx(lr.svg,{...c,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:J.jsx("polygon",{points:"0,0 30,0 15,10"})})});Zk.displayName=Dz;var Mz=Zk;function Pz(t){const[e,n]=D.useState(void 0);return Mo(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const c=s[0];let i,o;if("borderBoxSize"in c){const u=c.borderBoxSize,l=Array.isArray(u)?u[0]:u;i=l.inlineSize,o=l.blockSize}else i=t.offsetWidth,o=t.offsetHeight;n({width:i,height:o})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var F0="Popper",[Yk,Kk]=fu(F0),[$z,Xk]=Yk(F0),qk=t=>{const{__scopePopper:e,children:n}=t,[r,s]=D.useState(null);return J.jsx($z,{scope:e,anchor:r,onAnchorChange:s,children:n})};qk.displayName=F0;var Jk="PopperAnchor",Qk=D.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,c=Xk(Jk,n),i=D.useRef(null),o=sr(e,i);return D.useEffect(()=>{c.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:J.jsx(lr.div,{...s,ref:o})});Qk.displayName=Jk;var V0="PopperContent",[Bz,Uz]=Yk(V0),e5=D.forwardRef((t,e)=>{var V,ce,oe,xe,he,Pe;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:c="center",alignOffset:i=0,arrowPadding:o=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:a=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:v,...m}=t,b=Xk(V0,n),[y,_]=D.useState(null),S=sr(e,Ie=>_(Ie)),[C,x]=D.useState(null),j=Pz(C),k=(j==null?void 0:j.width)??0,T=(j==null?void 0:j.height)??0,A=r+(c!=="center"?"-"+c:""),L=typeof a=="number"?a:{top:0,right:0,bottom:0,left:0,...a},N=Array.isArray(l)?l:[l],M=N.length>0,F={padding:L,boundary:N.filter(Vz),altBoundary:M},{refs:Z,floatingStyles:Y,placement:X,isPositioned:Q,middlewareData:$}=pC({strategy:"fixed",placement:A,whileElementsMounted:(...Ie)=>hC(...Ie,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[mC({mainAxis:s+T,alignmentAxis:i}),u&&vC({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?gC():void 0,...F}),u&&bC({...F}),yC({...F,apply:({elements:Ie,rects:Ye,availableWidth:be,availableHeight:je})=>{const{width:ie,height:se}=Ye.reference,ue=Ie.floating.style;ue.setProperty("--radix-popper-available-width",`${be}px`),ue.setProperty("--radix-popper-available-height",`${je}px`),ue.setProperty("--radix-popper-anchor-width",`${ie}px`),ue.setProperty("--radix-popper-anchor-height",`${se}px`)}}),C&&wC({element:C,padding:o}),zz({arrowWidth:k,arrowHeight:T}),f&&_C({strategy:"referenceHidden",...F})]}),[U,I]=r5(X),W=ii(v);Mo(()=>{Q&&(W==null||W())},[Q,W]);const G=(V=$.arrow)==null?void 0:V.x,B=(ce=$.arrow)==null?void 0:ce.y,ee=((oe=$.arrow)==null?void 0:oe.centerOffset)!==0,[re,K]=D.useState();return Mo(()=>{y&&K(window.getComputedStyle(y).zIndex)},[y]),J.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:Q?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(xe=$.transformOrigin)==null?void 0:xe.x,(he=$.transformOrigin)==null?void 0:he.y].join(" "),...((Pe=$.hide)==null?void 0:Pe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:J.jsx(Bz,{scope:n,placedSide:U,onArrowChange:x,arrowX:G,arrowY:B,shouldHideArrow:ee,children:J.jsx(lr.div,{"data-side":U,"data-align":I,...m,ref:S,style:{...m.style,animation:Q?void 0:"none"}})})})});e5.displayName=V0;var t5="PopperArrow",Fz={top:"bottom",right:"left",bottom:"top",left:"right"},n5=D.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,c=Uz(t5,r),i=Fz[c.placedSide];return J.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:J.jsx(Mz,{...s,ref:n,style:{...s.style,display:"block"}})})});n5.displayName=t5;function Vz(t){return t!==null}var zz=t=>({name:"transformOrigin",options:t,fn(e){var b,y,_;const{placement:n,rects:r,middlewareData:s}=e,i=((b=s.arrow)==null?void 0:b.centerOffset)!==0,o=i?0:t.arrowWidth,u=i?0:t.arrowHeight,[l,a]=r5(n),d={start:"0%",center:"50%",end:"100%"}[a],f=(((y=s.arrow)==null?void 0:y.x)??0)+o/2,p=(((_=s.arrow)==null?void 0:_.y)??0)+u/2;let v="",m="";return l==="bottom"?(v=i?d:`${f}px`,m=`${-u}px`):l==="top"?(v=i?d:`${f}px`,m=`${r.floating.height+u}px`):l==="right"?(v=`${-u}px`,m=i?d:`${p}px`):l==="left"&&(v=`${r.floating.width+u}px`,m=i?d:`${p}px`),{data:{x:v,y:m}}}});function r5(t){const[e,n="center"]=t.split("-");return[e,n]}var Hz=qk,Wz=Qk,Gz=e5,Zz=n5;function Yz(t,e){return D.useReducer((n,r)=>e[n][r]??n,t)}var of=t=>{const{present:e,children:n}=t,r=Kz(e),s=typeof n=="function"?n({present:r.isPresent}):D.Children.only(n),c=sr(r.ref,Xz(s));return typeof n=="function"||r.isPresent?D.cloneElement(s,{ref:c}):null};of.displayName="Presence";function Kz(t){const[e,n]=D.useState(),r=D.useRef(null),s=D.useRef(t),c=D.useRef("none"),i=t?"mounted":"unmounted",[o,u]=Yz(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D.useEffect(()=>{const l=$d(r.current);c.current=o==="mounted"?l:"none"},[o]),Mo(()=>{const l=r.current,a=s.current;if(a!==t){const f=c.current,p=$d(l);t?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(a&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,u]),Mo(()=>{if(e){let l;const a=e.ownerDocument.defaultView??window,d=p=>{const m=$d(r.current).includes(p.animationName);if(p.target===e&&m&&(u("ANIMATION_END"),!s.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",l=a.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},f=p=>{p.target===e&&(c.current=$d(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{a.clearTimeout(l),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:D.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function $d(t){return(t==null?void 0:t.animationName)||"none"}function Xz(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var uv="rovingFocusGroup.onEntryFocus",qz={bubbles:!1,cancelable:!0},pu="RovingFocusGroup",[qv,s5,Jz]=Uk(pu),[Qz,i5]=fu(pu,[Jz]),[eH,tH]=Qz(pu),o5=D.forwardRef((t,e)=>J.jsx(qv.Provider,{scope:t.__scopeRovingFocusGroup,children:J.jsx(qv.Slot,{scope:t.__scopeRovingFocusGroup,children:J.jsx(nH,{...t,ref:e})})}));o5.displayName=pu;var nH=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:c,currentTabStopId:i,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:a=!1,...d}=t,f=D.useRef(null),p=sr(e,f),v=Fk(c),[m,b]=$k({prop:i,defaultProp:o??null,onChange:u,caller:pu}),[y,_]=D.useState(!1),S=ii(l),C=s5(n),x=D.useRef(!1),[j,k]=D.useState(0);return D.useEffect(()=>{const T=f.current;if(T)return T.addEventListener(uv,S),()=>T.removeEventListener(uv,S)},[S]),J.jsx(eH,{scope:n,orientation:r,dir:v,loop:s,currentTabStopId:m,onItemFocus:D.useCallback(T=>b(T),[b]),onItemShiftTab:D.useCallback(()=>_(!0),[]),onFocusableItemAdd:D.useCallback(()=>k(T=>T+1),[]),onFocusableItemRemove:D.useCallback(()=>k(T=>T-1),[]),children:J.jsx(lr.div,{tabIndex:y||j===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...t.style},onMouseDown:Ct(t.onMouseDown,()=>{x.current=!0}),onFocus:Ct(t.onFocus,T=>{const A=!x.current;if(T.target===T.currentTarget&&A&&!y){const L=new CustomEvent(uv,qz);if(T.currentTarget.dispatchEvent(L),!L.defaultPrevented){const N=C().filter(X=>X.focusable),M=N.find(X=>X.active),F=N.find(X=>X.id===m),Y=[M,F,...N].filter(Boolean).map(X=>X.ref.current);c5(Y,a)}}x.current=!1}),onBlur:Ct(t.onBlur,()=>_(!1))})})}),a5="RovingFocusGroupItem",l5=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:c,children:i,...o}=t,u=Xv(),l=c||u,a=tH(a5,n),d=a.currentTabStopId===l,f=s5(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:m}=a;return D.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),J.jsx(qv.ItemSlot,{scope:n,id:l,focusable:r,active:s,children:J.jsx(lr.span,{tabIndex:d?0:-1,"data-orientation":a.orientation,...o,ref:e,onMouseDown:Ct(t.onMouseDown,b=>{r?a.onItemFocus(l):b.preventDefault()}),onFocus:Ct(t.onFocus,()=>a.onItemFocus(l)),onKeyDown:Ct(t.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){a.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=iH(b,a.orientation,a.dir);if(y!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let S=f().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();const C=S.indexOf(b.currentTarget);S=a.loop?oH(S,C+1):S.slice(C+1)}setTimeout(()=>c5(S))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});l5.displayName=a5;var rH={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sH(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function iH(t,e,n){const r=sH(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return rH[r]}function c5(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function oH(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var aH=o5,lH=l5,Jv=["Enter"," "],cH=["ArrowDown","PageUp","Home"],u5=["ArrowUp","PageDown","End"],uH=[...cH,...u5],dH={ltr:[...Jv,"ArrowRight"],rtl:[...Jv,"ArrowLeft"]},hH={ltr:["ArrowLeft"],rtl:["ArrowRight"]},mu="Menu",[Zc,fH,pH]=Uk(mu),[$o,d5]=fu(mu,[pH,Kk,i5]),af=Kk(),h5=i5(),[mH,nl]=$o(mu),[vH,vu]=$o(mu),f5=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:s,onOpenChange:c,modal:i=!0}=t,o=af(e),[u,l]=D.useState(null),a=D.useRef(!1),d=ii(c),f=Fk(s);return D.useEffect(()=>{const p=()=>{a.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>a.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),J.jsx(Hz,{...o,children:J.jsx(mH,{scope:e,open:n,onOpenChange:d,content:u,onContentChange:l,children:J.jsx(vH,{scope:e,onClose:D.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:a,dir:f,modal:i,children:r})})})};f5.displayName=mu;var gH="MenuAnchor",z0=D.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=af(n);return J.jsx(Wz,{...s,...r,ref:e})});z0.displayName=gH;var bH="MenuPortal",[KW,p5]=$o(bH,{forceMount:void 0}),Pr="MenuContent",[yH,H0]=$o(Pr),m5=D.forwardRef((t,e)=>{const n=p5(Pr,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,c=nl(Pr,t.__scopeMenu),i=vu(Pr,t.__scopeMenu);return J.jsx(Zc.Provider,{scope:t.__scopeMenu,children:J.jsx(of,{present:r||c.open,children:J.jsx(Zc.Slot,{scope:t.__scopeMenu,children:i.modal?J.jsx(_H,{...s,ref:e}):J.jsx(wH,{...s,ref:e})})})})}),_H=D.forwardRef((t,e)=>{const n=nl(Pr,t.__scopeMenu),r=D.useRef(null),s=sr(e,r);return D.useEffect(()=>{const c=r.current;if(c)return _6(c)},[]),J.jsx(W0,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ct(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),wH=D.forwardRef((t,e)=>{const n=nl(Pr,t.__scopeMenu);return J.jsx(W0,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),SH=bh("MenuContent.ScrollLock"),W0=D.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:c,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:v,...m}=t,b=nl(Pr,n),y=vu(Pr,n),_=af(n),S=h5(n),C=fH(n),[x,j]=D.useState(null),k=D.useRef(null),T=sr(e,k,b.onContentChange),A=D.useRef(0),L=D.useRef(""),N=D.useRef(0),M=D.useRef(null),F=D.useRef("right"),Z=D.useRef(0),Y=v?Yx:D.Fragment,X=v?{as:SH,allowPinchZoom:!0}:void 0,Q=U=>{var V,ce;const I=L.current+U,W=C().filter(oe=>!oe.disabled),G=document.activeElement,B=(V=W.find(oe=>oe.ref.current===G))==null?void 0:V.textValue,ee=W.map(oe=>oe.textValue),re=LH(ee,I,B),K=(ce=W.find(oe=>oe.textValue===re))==null?void 0:ce.ref.current;(function oe(xe){L.current=xe,window.clearTimeout(A.current),xe!==""&&(A.current=window.setTimeout(()=>oe(""),1e3))})(I),K&&setTimeout(()=>K.focus())};D.useEffect(()=>()=>window.clearTimeout(A.current),[]),Ez();const $=D.useCallback(U=>{var W,G;return F.current===((W=M.current)==null?void 0:W.side)&&MH(U,(G=M.current)==null?void 0:G.area)},[]);return J.jsx(yH,{scope:n,searchRef:L,onItemEnter:D.useCallback(U=>{$(U)&&U.preventDefault()},[$]),onItemLeave:D.useCallback(U=>{var I;$(U)||((I=k.current)==null||I.focus(),j(null))},[$]),onTriggerLeave:D.useCallback(U=>{$(U)&&U.preventDefault()},[$]),pointerGraceTimerRef:N,onPointerGraceIntentChange:D.useCallback(U=>{M.current=U},[]),children:J.jsx(Y,{...X,children:J.jsx(Wk,{asChild:!0,trapped:s,onMountAutoFocus:Ct(c,U=>{var I;U.preventDefault(),(I=k.current)==null||I.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:J.jsx(zk,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:J.jsx(aH,{asChild:!0,...S,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:j,onEntryFocus:Ct(u,U=>{y.isUsingKeyboardRef.current||U.preventDefault()}),preventScrollOnEntryFocus:!0,children:J.jsx(Gz,{role:"menu","aria-orientation":"vertical","data-state":I5(b.open),"data-radix-menu-content":"",dir:y.dir,..._,...m,ref:T,style:{outline:"none",...m.style},onKeyDown:Ct(m.onKeyDown,U=>{const W=U.target.closest("[data-radix-menu-content]")===U.currentTarget,G=U.ctrlKey||U.altKey||U.metaKey,B=U.key.length===1;W&&(U.key==="Tab"&&U.preventDefault(),!G&&B&&Q(U.key));const ee=k.current;if(U.target!==ee||!uH.includes(U.key))return;U.preventDefault();const K=C().filter(V=>!V.disabled).map(V=>V.ref.current);u5.includes(U.key)&&K.reverse(),RH(K)}),onBlur:Ct(t.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(A.current),L.current="")}),onPointerMove:Ct(t.onPointerMove,Yc(U=>{const I=U.target,W=Z.current!==U.clientX;if(U.currentTarget.contains(I)&&W){const G=U.clientX>Z.current?"right":"left";F.current=G,Z.current=U.clientX}}))})})})})})})});m5.displayName=Pr;var xH="MenuGroup",G0=D.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return J.jsx(lr.div,{role:"group",...r,ref:e})});G0.displayName=xH;var CH="MenuLabel",v5=D.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return J.jsx(lr.div,{...r,ref:e})});v5.displayName=CH;var yh="MenuItem",cx="menu.itemSelect",lf=D.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...s}=t,c=D.useRef(null),i=vu(yh,t.__scopeMenu),o=H0(yh,t.__scopeMenu),u=sr(e,c),l=D.useRef(!1),a=()=>{const d=c.current;if(!n&&d){const f=new CustomEvent(cx,{bubbles:!0,cancelable:!0});d.addEventListener(cx,p=>r==null?void 0:r(p),{once:!0}),Bk(d,f),f.defaultPrevented?l.current=!1:i.onClose()}};return J.jsx(g5,{...s,ref:u,disabled:n,onClick:Ct(t.onClick,a),onPointerDown:d=>{var f;(f=t.onPointerDown)==null||f.call(t,d),l.current=!0},onPointerUp:Ct(t.onPointerUp,d=>{var f;l.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:Ct(t.onKeyDown,d=>{const f=o.searchRef.current!=="";n||f&&d.key===" "||Jv.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});lf.displayName=yh;var g5=D.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...c}=t,i=H0(yh,n),o=h5(n),u=D.useRef(null),l=sr(e,u),[a,d]=D.useState(!1),[f,p]=D.useState("");return D.useEffect(()=>{const v=u.current;v&&p((v.textContent??"").trim())},[c.children]),J.jsx(Zc.ItemSlot,{scope:n,disabled:r,textValue:s??f,children:J.jsx(lH,{asChild:!0,...o,focusable:!r,children:J.jsx(lr.div,{role:"menuitem","data-highlighted":a?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...c,ref:l,onPointerMove:Ct(t.onPointerMove,Yc(v=>{r?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ct(t.onPointerLeave,Yc(v=>i.onItemLeave(v))),onFocus:Ct(t.onFocus,()=>d(!0)),onBlur:Ct(t.onBlur,()=>d(!1))})})})}),EH="MenuCheckboxItem",b5=D.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...s}=t;return J.jsx(x5,{scope:t.__scopeMenu,checked:n,children:J.jsx(lf,{role:"menuitemcheckbox","aria-checked":_h(n)?"mixed":n,...s,ref:e,"data-state":Y0(n),onSelect:Ct(s.onSelect,()=>r==null?void 0:r(_h(n)?!0:!n),{checkForDefaultPrevented:!1})})})});b5.displayName=EH;var y5="MenuRadioGroup",[jH,kH]=$o(y5,{value:void 0,onValueChange:()=>{}}),_5=D.forwardRef((t,e)=>{const{value:n,onValueChange:r,...s}=t,c=ii(r);return J.jsx(jH,{scope:t.__scopeMenu,value:n,onValueChange:c,children:J.jsx(G0,{...s,ref:e})})});_5.displayName=y5;var w5="MenuRadioItem",S5=D.forwardRef((t,e)=>{const{value:n,...r}=t,s=kH(w5,t.__scopeMenu),c=n===s.value;return J.jsx(x5,{scope:t.__scopeMenu,checked:c,children:J.jsx(lf,{role:"menuitemradio","aria-checked":c,...r,ref:e,"data-state":Y0(c),onSelect:Ct(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});S5.displayName=w5;var Z0="MenuItemIndicator",[x5,TH]=$o(Z0,{checked:!1}),C5=D.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...s}=t,c=TH(Z0,n);return J.jsx(of,{present:r||_h(c.checked)||c.checked===!0,children:J.jsx(lr.span,{...s,ref:e,"data-state":Y0(c.checked)})})});C5.displayName=Z0;var OH="MenuSeparator",E5=D.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return J.jsx(lr.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});E5.displayName=OH;var AH="MenuArrow",j5=D.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=af(n);return J.jsx(Zz,{...s,...r,ref:e})});j5.displayName=AH;var IH="MenuSub",[XW,k5]=$o(IH),mc="MenuSubTrigger",T5=D.forwardRef((t,e)=>{const n=nl(mc,t.__scopeMenu),r=vu(mc,t.__scopeMenu),s=k5(mc,t.__scopeMenu),c=H0(mc,t.__scopeMenu),i=D.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:u}=c,l={__scopeMenu:t.__scopeMenu},a=D.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return D.useEffect(()=>a,[a]),D.useEffect(()=>{const d=o.current;return()=>{window.clearTimeout(d),u(null)}},[o,u]),J.jsx(z0,{asChild:!0,...l,children:J.jsx(g5,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":I5(n.open),...t,ref:sf(e,s.onTriggerChange),onClick:d=>{var f;(f=t.onClick)==null||f.call(t,d),!(t.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ct(t.onPointerMove,Yc(d=>{c.onItemEnter(d),!d.defaultPrevented&&!t.disabled&&!n.open&&!i.current&&(c.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),a()},100))})),onPointerLeave:Ct(t.onPointerLeave,Yc(d=>{var p,v;a();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const m=(v=n.content)==null?void 0:v.dataset.side,b=m==="right",y=b?-5:5,_=f[b?"left":"right"],S=f[b?"right":"left"];c.onPointerGraceIntentChange({area:[{x:d.clientX+y,y:d.clientY},{x:_,y:f.top},{x:S,y:f.top},{x:S,y:f.bottom},{x:_,y:f.bottom}],side:m}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(d),d.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:Ct(t.onKeyDown,d=>{var p;const f=c.searchRef.current!=="";t.disabled||f&&d.key===" "||dH[r.dir].includes(d.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),d.preventDefault())})})})});T5.displayName=mc;var O5="MenuSubContent",A5=D.forwardRef((t,e)=>{const n=p5(Pr,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,c=nl(Pr,t.__scopeMenu),i=vu(Pr,t.__scopeMenu),o=k5(O5,t.__scopeMenu),u=D.useRef(null),l=sr(e,u);return J.jsx(Zc.Provider,{scope:t.__scopeMenu,children:J.jsx(of,{present:r||c.open,children:J.jsx(Zc.Slot,{scope:t.__scopeMenu,children:J.jsx(W0,{id:o.contentId,"aria-labelledby":o.triggerId,...s,ref:l,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:a=>{var d;i.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),a.preventDefault()},onCloseAutoFocus:a=>a.preventDefault(),onFocusOutside:Ct(t.onFocusOutside,a=>{a.target!==o.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:Ct(t.onEscapeKeyDown,a=>{i.onClose(),a.preventDefault()}),onKeyDown:Ct(t.onKeyDown,a=>{var p;const d=a.currentTarget.contains(a.target),f=hH[i.dir].includes(a.key);d&&f&&(c.onOpenChange(!1),(p=o.trigger)==null||p.focus(),a.preventDefault())})})})})})});A5.displayName=O5;function I5(t){return t?"open":"closed"}function _h(t){return t==="indeterminate"}function Y0(t){return _h(t)?"indeterminate":t?"checked":"unchecked"}function RH(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function NH(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function LH(t,e,n){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,c=n?t.indexOf(n):-1;let i=NH(t,Math.max(c,0));s.length===1&&(i=i.filter(l=>l!==n));const u=i.find(l=>l.toLowerCase().startsWith(s.toLowerCase()));return u!==n?u:void 0}function DH(t,e){const{x:n,y:r}=t;let s=!1;for(let c=0,i=e.length-1;c<e.length;i=c++){const o=e[c],u=e[i],l=o.x,a=o.y,d=u.x,f=u.y;a>r!=f>r&&n<(d-l)*(r-a)/(f-a)+l&&(s=!s)}return s}function MH(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return DH(n,e)}function Yc(t){return e=>e.pointerType==="mouse"?t(e):void 0}var PH=f5,$H=z0,BH=m5,UH=G0,FH=v5,VH=lf,zH=b5,HH=_5,WH=S5,GH=C5,ZH=E5,YH=j5,KH=T5,XH=A5,cf="DropdownMenu",[qH,qW]=fu(cf,[d5]),cr=d5(),[JH,R5]=qH(cf),N5=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:s,defaultOpen:c,onOpenChange:i,modal:o=!0}=t,u=cr(e),l=D.useRef(null),[a,d]=$k({prop:s,defaultProp:c??!1,onChange:i,caller:cf});return J.jsx(JH,{scope:e,triggerId:Xv(),triggerRef:l,contentId:Xv(),open:a,onOpenChange:d,onOpenToggle:D.useCallback(()=>d(f=>!f),[d]),modal:o,children:J.jsx(PH,{...u,open:a,onOpenChange:d,dir:r,modal:o,children:n})})};N5.displayName=cf;var L5="DropdownMenuTrigger",D5=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=t,c=R5(L5,n),i=cr(n);return J.jsx($H,{asChild:!0,...i,children:J.jsx(lr.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:sf(e,c.triggerRef),onPointerDown:Ct(t.onPointerDown,o=>{!r&&o.button===0&&o.ctrlKey===!1&&(c.onOpenToggle(),c.open||o.preventDefault())}),onKeyDown:Ct(t.onKeyDown,o=>{r||(["Enter"," "].includes(o.key)&&c.onOpenToggle(),o.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});D5.displayName=L5;var M5="DropdownMenuContent",P5=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=R5(M5,n),c=cr(n),i=D.useRef(!1);return J.jsx(BH,{id:s.contentId,"aria-labelledby":s.triggerId,...c,...r,ref:e,onCloseAutoFocus:Ct(t.onCloseAutoFocus,o=>{var u;i.current||(u=s.triggerRef.current)==null||u.focus(),i.current=!1,o.preventDefault()}),onInteractOutside:Ct(t.onInteractOutside,o=>{const u=o.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,a=u.button===2||l;(!s.modal||a)&&(i.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});P5.displayName=M5;var QH="DropdownMenuGroup",eW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(UH,{...s,...r,ref:e})});eW.displayName=QH;var tW="DropdownMenuLabel",nW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(FH,{...s,...r,ref:e})});nW.displayName=tW;var rW="DropdownMenuItem",$5=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(VH,{...s,...r,ref:e})});$5.displayName=rW;var sW="DropdownMenuCheckboxItem",iW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(zH,{...s,...r,ref:e})});iW.displayName=sW;var oW="DropdownMenuRadioGroup",aW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(HH,{...s,...r,ref:e})});aW.displayName=oW;var lW="DropdownMenuRadioItem",cW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(WH,{...s,...r,ref:e})});cW.displayName=lW;var uW="DropdownMenuItemIndicator",dW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(GH,{...s,...r,ref:e})});dW.displayName=uW;var hW="DropdownMenuSeparator",fW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(ZH,{...s,...r,ref:e})});fW.displayName=hW;var pW="DropdownMenuArrow",mW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(YH,{...s,...r,ref:e})});mW.displayName=pW;var vW="DropdownMenuSubTrigger",gW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(KH,{...s,...r,ref:e})});gW.displayName=vW;var bW="DropdownMenuSubContent",yW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(XH,{...s,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yW.displayName=bW;var _W=N5,wW=D5,SW=P5,xW=$5;function CW(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,c;for(c=0;c<r.length;c++)s=r[c],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}var EW=["color"],jW=D.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,s=CW(t,EW);return D.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),D.createElement("path",{d:"M7.5 0.875C5.49797 0.875 3.875 2.49797 3.875 4.5C3.875 6.15288 4.98124 7.54738 6.49373 7.98351C5.2997 8.12901 4.27557 8.55134 3.50407 9.31167C2.52216 10.2794 2.02502 11.72 2.02502 13.5999C2.02502 13.8623 2.23769 14.0749 2.50002 14.0749C2.76236 14.0749 2.97502 13.8623 2.97502 13.5999C2.97502 11.8799 3.42786 10.7206 4.17091 9.9883C4.91536 9.25463 6.02674 8.87499 7.49995 8.87499C8.97317 8.87499 10.0846 9.25463 10.8291 9.98831C11.5721 10.7206 12.025 11.8799 12.025 13.5999C12.025 13.8623 12.2376 14.0749 12.5 14.0749C12.7623 14.075 12.975 13.8623 12.975 13.6C12.975 11.72 12.4778 10.2794 11.4959 9.31166C10.7244 8.55135 9.70025 8.12903 8.50625 7.98352C10.0187 7.5474 11.125 6.15289 11.125 4.5C11.125 2.49797 9.50203 0.875 7.5 0.875ZM4.825 4.5C4.825 3.02264 6.02264 1.825 7.5 1.825C8.97736 1.825 10.175 3.02264 10.175 4.5C10.175 5.97736 8.97736 7.175 7.5 7.175C6.02264 7.175 4.825 5.97736 4.825 4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});class vc extends Error{}vc.prototype.name="InvalidTokenError";function kW(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function TW(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return kW(e)}catch{return atob(e)}}function OW(t,e){if(typeof t!="string")throw new vc("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,r=t.split(".")[n];if(typeof r!="string")throw new vc(`Invalid token specified: missing part #${n+1}`);let s;try{s=TW(r)}catch(c){throw new vc(`Invalid token specified: invalid base64 for part #${n+1} (${c.message})`)}try{return JSON.parse(s)}catch(c){throw new vc(`Invalid token specified: invalid json for part #${n+1} (${c.message})`)}}var dv={exports:{}},hv={exports:{}},ux;function AW(){return ux||(ux=1,function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(n,r){return n<<r|n>>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return e.rotl(n,8)&16711935|e.rotl(n,24)&4278255360;for(var r=0;r<n.length;r++)n[r]=e.endian(n[r]);return n},randomBytes:function(n){for(var r=[];n>0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],s=0,c=0;s<n.length;s++,c+=8)r[c>>>5]|=n[s]<<24-c%32;return r},wordsToBytes:function(n){for(var r=[],s=0;s<n.length*32;s+=8)r.push(n[s>>>5]>>>24-s%32&255);return r},bytesToHex:function(n){for(var r=[],s=0;s<n.length;s++)r.push((n[s]>>>4).toString(16)),r.push((n[s]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],s=0;s<n.length;s+=2)r.push(parseInt(n.substr(s,2),16));return r},bytesToBase64:function(n){for(var r=[],s=0;s<n.length;s+=3)for(var c=n[s]<<16|n[s+1]<<8|n[s+2],i=0;i<4;i++)s*8+i*6<=n.length*8?r.push(t.charAt(c>>>6*(3-i)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],s=0,c=0;s<n.length;c=++s%4)c!=0&&r.push((t.indexOf(n.charAt(s-1))&Math.pow(2,-2*c+8)-1)<<c*2|t.indexOf(n.charAt(s))>>>6-c*2);return r}};hv.exports=e}()),hv.exports}var fv,dx;function hx(){if(dx)return fv;dx=1;var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],r=0;r<e.length;r++)n.push(e.charCodeAt(r)&255);return n},bytesToString:function(e){for(var n=[],r=0;r<e.length;r++)n.push(String.fromCharCode(e[r]));return n.join("")}}};return fv=t,fv}/*!
6671
+ `},s),c}function wV(t,e){return t&&"run"in t?async function(n,r){const s=z2(n,{file:r,...e});await t.run(s,r)}:function(n,r){return z2(n,{file:r,...t||e})}}function H2(t){if(t)throw t}var Qm,W2;function SV(){if(W2)return Qm;W2=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(l){return typeof Array.isArray=="function"?Array.isArray(l):e.call(l)==="[object Array]"},c=function(l){if(!l||e.call(l)!=="[object Object]")return!1;var a=t.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&t.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!a&&!d)return!1;var f;for(f in l);return typeof f>"u"||t.call(l,f)},i=function(l,a){n&&a.name==="__proto__"?n(l,a.name,{enumerable:!0,configurable:!0,value:a.newValue,writable:!0}):l[a.name]=a.newValue},o=function(l,a){if(a==="__proto__")if(t.call(l,a)){if(r)return r(l,a).value}else return;return l[a]};return Qm=function u(){var l,a,d,f,p,v,m=arguments[0],b=1,y=arguments.length,_=!1;for(typeof m=="boolean"&&(_=m,m=arguments[1]||{},b=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});b<y;++b)if(l=arguments[b],l!=null)for(a in l)d=o(m,a),f=o(l,a),m!==f&&(_&&f&&(c(f)||(p=s(f)))?(p?(p=!1,v=d&&s(d)?d:[]):v=d&&c(d)?d:{},i(m,{name:a,newValue:u(_,v,f)})):typeof f<"u"&&i(m,{name:a,newValue:f}));return m},Qm}var xV=SV();const ev=Kc(xV);function Gv(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function CV(){const t=[],e={run:n,use:r};return e;function n(...s){let c=-1;const i=s.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);o(null,...s);function o(u,...l){const a=t[++c];let d=-1;if(u){i(u);return}for(;++d<s.length;)(l[d]===null||l[d]===void 0)&&(l[d]=s[d]);s=l,a?EV(a,o)(...l):i(null,...l)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),e}}function EV(t,e){let n;return r;function r(...i){const o=t.length>i.length;let u;o&&i.push(s);try{u=t.apply(this,i)}catch(l){const a=l;if(o&&n)throw a;return s(a)}o||(u&&u.then&&typeof u.then=="function"?u.then(c,s):u instanceof Error?s(u):c(u))}function s(i,...o){n||(n=!0,e(i,...o))}function c(i){s(null,i)}}const ms={basename:jV,dirname:kV,extname:TV,join:OV,sep:"/"};function jV(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');hu(t);let n=0,r=-1,s=t.length,c;if(e===void 0||e.length===0||e.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(c){n=s+1;break}}else r<0&&(c=!0,r=s+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let i=-1,o=e.length-1;for(;s--;)if(t.codePointAt(s)===47){if(c){n=s+1;break}}else i<0&&(c=!0,i=s+1),o>-1&&(t.codePointAt(s)===e.codePointAt(o--)?o<0&&(r=s):(o=-1,r=i));return n===r?r=i:r<0&&(r=t.length),t.slice(n,r)}function kV(t){if(hu(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function TV(t){hu(t);let e=t.length,n=-1,r=0,s=-1,c=0,i;for(;e--;){const o=t.codePointAt(e);if(o===47){if(i){r=e+1;break}continue}n<0&&(i=!0,n=e+1),o===46?s<0?s=e:c!==1&&(c=1):s>-1&&(c=-1)}return s<0||n<0||c===0||c===1&&s===n-1&&s===r+1?"":t.slice(s,n)}function OV(...t){let e=-1,n;for(;++e<t.length;)hu(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":AV(n)}function AV(t){hu(t);const e=t.codePointAt(0)===47;let n=IV(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function IV(t,e){let n="",r=0,s=-1,c=0,i=-1,o,u;for(;++i<=t.length;){if(i<t.length)o=t.codePointAt(i);else{if(o===47)break;o=47}if(o===47){if(!(s===i-1||c===1))if(s!==i-1&&c===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),s=i,c=0;continue}}else if(n.length>0){n="",r=0,s=i,c=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(s+1,i):n=t.slice(s+1,i),r=i-s-1;s=i,c=0}else o===46&&c>-1?c++:c=-1}return n}function hu(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const RV={cwd:NV};function NV(){return"/"}function Zv(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function LV(t){if(typeof t=="string")t=new URL(t);else if(!Zv(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return DV(t)}function DV(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const r=e.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(e)}const tv=["history","path","basename","stem","extname","dirname"];class Mk{constructor(e){let n;e?Zv(e)?n={path:e}:typeof e=="string"||MV(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":RV.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<tv.length;){const c=tv[r];c in n&&n[c]!==void 0&&n[c]!==null&&(this[c]=c==="history"?[...n[c]]:n[c])}let s;for(s in n)tv.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?ms.basename(this.path):void 0}set basename(e){rv(e,"basename"),nv(e,"basename"),this.path=ms.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ms.dirname(this.path):void 0}set dirname(e){G2(this.basename,"dirname"),this.path=ms.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ms.extname(this.path):void 0}set extname(e){if(nv(e,"extname"),G2(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ms.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Zv(e)&&(e=LV(e)),rv(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ms.basename(this.path,this.extname):void 0}set stem(e){rv(e,"stem"),nv(e,"stem"),this.path=ms.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){const s=this.message(e,n,r);throw s.fatal=!0,s}info(e,n,r){const s=this.message(e,n,r);return s.fatal=void 0,s}message(e,n,r){const s=new Bn(e,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function nv(t,e){if(t&&t.includes(ms.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+ms.sep+"`")}function rv(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function G2(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function MV(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const PV=function(t){const r=this.constructor.prototype,s=r[t],c=function(){return s.apply(c,arguments)};return Object.setPrototypeOf(c,r),c},$V={}.hasOwnProperty;class U0 extends PV{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=CV()}copy(){const e=new U0;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];e.use(...r)}return e.data(ev(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(ov("data",this.frozen),this.namespace[e]=n,this):$V.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ov("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(e,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Pd(e),r=this.parser||this.Parser;return sv("parse",r),r(String(n),n)}process(e,n){const r=this;return this.freeze(),sv("process",this.parser||this.Parser),iv("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(c,i){const o=Pd(e),u=r.parse(o);r.run(u,o,function(a,d,f){if(a||!d||!f)return l(a);const p=d,v=r.stringify(p,f);FV(v)?f.value=v:f.result=v,l(a,f)});function l(a,d){a||!d?i(a):c?c(d):n(void 0,d)}}}processSync(e){let n=!1,r;return this.freeze(),sv("processSync",this.parser||this.Parser),iv("processSync",this.compiler||this.Compiler),this.process(e,s),Y2("processSync","process",n),r;function s(c,i){n=!0,H2(c),r=i}}run(e,n,r){Z2(e),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?c(void 0,r):new Promise(c);function c(i,o){const u=Pd(n);s.run(e,u,l);function l(a,d,f){const p=d||e;a?o(a):i?i(p):r(void 0,p,f)}}}runSync(e,n){let r=!1,s;return this.run(e,n,c),Y2("runSync","run",r),s;function c(i,o){H2(i),s=o,r=!0}}stringify(e,n){this.freeze();const r=Pd(n),s=this.compiler||this.Compiler;return iv("stringify",s),Z2(e),s(e,r)}use(e,...n){const r=this.attachers,s=this.namespace;if(ov("use",this.frozen),e!=null)if(typeof e=="function")u(e,n);else if(typeof e=="object")Array.isArray(e)?o(e):i(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function c(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[a,...d]=l;u(a,d)}else i(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function i(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(s.settings=ev(!0,s.settings,l.settings))}function o(l){let a=-1;if(l!=null)if(Array.isArray(l))for(;++a<l.length;){const d=l[a];c(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,a){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===l){f=d;break}if(f===-1)r.push([l,...a]);else if(a.length>0){let[p,...v]=a;const m=r[f][1];Gv(m)&&Gv(p)&&(p=ev(!0,m,p)),r[f]=[l,p,...v]}}}}const BV=new U0().freeze();function sv(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function iv(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function ov(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Z2(t){if(!Gv(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Y2(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Pd(t){return UV(t)?t:new Mk(t)}function UV(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function FV(t){return typeof t=="string"||VV(t)}function VV(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const zV="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",K2=[],X2={allowDangerousHtml:!0},HV=/^(https?|ircs?|mailto|xmpp)$/i,WV=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function GV(t){const e=ZV(t),n=YV(t);return KV(e.runSync(e.parse(n),n),t)}function ZV(t){const e=t.rehypePlugins||K2,n=t.remarkPlugins||K2,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...X2}:X2;return BV().use(jF).use(n).use(wV,r).use(e)}function YV(t){const e=t.children||"",n=new Mk;return typeof e=="string"&&(n.value=e),n}function KV(t,e){const n=e.allowedElements,r=e.allowElement,s=e.components,c=e.disallowedElements,i=e.skipHtml,o=e.unwrapDisallowed,u=e.urlTransform||XV;for(const a of WV)Object.hasOwn(e,a.from)&&(""+a.from+(a.to?"use `"+a.to+"` instead":"remove it")+zV+a.id,void 0);return Dk(t,l),iB(t,{Fragment:J.Fragment,components:s,ignoreInvalidStyle:!0,jsx:J.jsx,jsxs:J.jsxs,passKeys:!0,passNode:!0});function l(a,d,f){if(a.type==="raw"&&f&&typeof d=="number")return i?f.children.splice(d,1):f.children[d]={type:"text",value:a.value},d;if(a.type==="element"){let p;for(p in Xm)if(Object.hasOwn(Xm,p)&&Object.hasOwn(a.properties,p)){const v=a.properties[p],m=Xm[p];(m===null||m.includes(a.tagName))&&(a.properties[p]=u(String(v||""),p,a))}}if(a.type==="element"){let p=n?!n.includes(a.tagName):c?c.includes(a.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(a,d,f)),p&&f&&typeof d=="number")return o&&a.children?f.children.splice(d,1,...a.children):f.children.splice(d,1),d}}}function XV(t){const e=t.indexOf(":"),n=t.indexOf("?"),r=t.indexOf("#"),s=t.indexOf("/");return e===-1||s!==-1&&e>s||n!==-1&&e>n||r!==-1&&e>r||HV.test(t.slice(0,e))?t:""}const Pk=({role:t,children:e})=>{const n=t===ri.USER?"self-end":"self-start",r=t===ri.USER?"indigo":"gray";return J.jsx(Nh,{highContrast:!0,color:r,className:`${n} max-w-[80%] break-words m-1`,children:J.jsx(Rc,{children:e})})},qV=({block:t})=>J.jsx(Pk,{role:ri.USER,children:t.contents}),JV=({block:t})=>J.jsx(Pk,{role:ri.ASSISTANT,children:J.jsx(GV,{components:{code:({children:e,...n})=>J.jsx("pre",{className:"whitespace-pre-wrap",children:J.jsx("code",{...n,children:String(e).replace(/\n$/,"")})})},children:t.contents})}),QV=D.memo(({block:t,isRecentCodeBlock:e,onClick:n})=>{var l,a;const{runCodeBlock:r}=Xi(),{settings:s}=es(),c=((a=(l=t.contents)==null?void 0:l.split(/&&|;|\n|\\n/)[0])==null?void 0:a.substring(0,50))||"",i=()=>{n?n():r(t)},o=s.webApp.invertedOrder?"justify-end":"justify-start",u=J.jsx("span",{className:"text-xs text-gray-400 p-2",children:"Press CTRL+ENTER to run"});return J.jsxs("div",{className:`flex ${o} items-center h-full`,children:[e&&s.webApp.invertedOrder&&u,J.jsxs("div",{className:"flex items-center m-1 p-2 bg-[#1e1e1e] rounded-md max-w-[60%] cursor-pointer",onClick:i,children:[J.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#d4d4d4",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:J.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),J.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#d4d4d4",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-1",children:[J.jsx("polyline",{points:"4 17 10 11 4 5"}),J.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]}),J.jsx("span",{className:"text-sm text-[#d4d4d4] italic truncate max-w-4/5",children:c})]}),e&&!s.webApp.invertedOrder&&u]})},(t,e)=>t.block.id===e.block.id&&JSON.stringify(t.block.contents)===JSON.stringify(e.block.contents)&&t.isRecentCodeBlock===e.isRecentCodeBlock),q2=({block:t,isRecentCodeBlock:e})=>{if(t.kind===vs.CODE)return J.jsx(QV,{block:t,isRecentCodeBlock:e},t.id);switch(t.role){case ri.USER:return J.jsx(qV,{block:t});case ri.ASSISTANT:return J.jsx(JV,{block:t});default:return null}},J2=()=>{const{useColumns:t,isTyping:e}=Xi(),{settings:n}=es(),{chat:r}=t(),s=D.useRef(null);D.useEffect(()=>{var u;n.webApp.invertedOrder||(u=s.current)==null||u.scrollIntoView({behavior:"smooth"})},[r,n.webApp.invertedOrder]);const c=n.webApp.invertedOrder?0:r.length-1,o=J.jsx("div",{className:"flex justify-start items-center h-full",children:J.jsx(q2,{block:pP})});return J.jsxs("div",{className:"overflow-y-clip p-1 flex flex-col whitespace-pre-wrap",children:[e&&n.webApp.invertedOrder&&o,r.map((u,l)=>J.jsx(q2,{block:u,isRecentCodeBlock:u.kind===vs.CODE&&l===c&&!e},l)),e&&!n.webApp.invertedOrder&&o,J.jsx("div",{ref:s})]})},Q2=()=>{const{sendUserBlock:t,isInputDisabled:e}=Xi(),[n,r]=D.useState(""),s=D.useRef(null);D.useEffect(()=>{var o;(o=s.current)==null||o.focus()},[]);const c=o=>{o.preventDefault(),n.trim()&&(t(n),r(""))},i=o=>{if(o.key==="Enter"&&!o.shiftKey){o.preventDefault();const u=o.currentTarget.form;u&&u.requestSubmit()}};return J.jsx("form",{onSubmit:c,className:"flex w-full",children:J.jsxs(In,{className:"w-full flex flex-nowrap items-start gap-4 m-2",children:[J.jsx(ih,{name:"userInput",value:n,onChange:o=>r(o.target.value),onKeyDown:i,placeholder:"Enter your question",size:"3",className:"flex-grow min-w-0",ref:s,rows:2,style:{resize:"vertical"}}),J.jsx(Di,{type:"submit",disabled:e,children:J.jsx(k$,{})})]})})};function ex(){const{useColumns:t,runCodeBlock:e}=Xi(),{settings:n}=es(),{chat:r}=t(),s=D.useRef(null);D.useEffect(()=>{const i=u=>{if(u.ctrlKey&&u.key==="Enter"){const l=n.webApp.invertedOrder?r[0]:r[r.length-1];(l==null?void 0:l.kind)===vs.CODE&&e(l)}},o=s.current;if(o)return o.addEventListener("keydown",i),()=>o.removeEventListener("keydown",i)},[r,e,n.webApp.invertedOrder]);const c=n.webApp.invertedOrder?"flex-col":"flex-col-reverse";return J.jsxs("div",{ref:s,className:"flex flex-col h-full",children:[J.jsx(tn,{size:"5",weight:"bold",className:"mb-2",children:"How can I help you?"}),J.jsx(Lh,{type:"auto",scrollbars:"vertical",className:"flex-1 p-4",children:J.jsx("div",{className:`flex ${c} h-full w-full`,children:n.webApp.invertedOrder?J.jsxs(J.Fragment,{children:[J.jsx(Q2,{}),J.jsx(J2,{})]}):J.jsxs(J.Fragment,{children:[J.jsx(Q2,{}),J.jsx(J2,{})]})})})]})}const ez=()=>{const{useColumns:t}=Xi(),{files:e}=t(),n=D.useRef(null),r=()=>{var i;(i=n.current)==null||i.scrollIntoView({behavior:"smooth"})},s=D.useMemo(()=>{let i=mn(yc,{});return e.length>0&&(i=e[e.length-1]),i},[e]);D.useEffect(()=>{r()},[s]);const c=s.fileSearchResults.length>0;return J.jsxs("div",{className:"flex flex-col h-full",children:[J.jsx(tn,{size:"5",weight:"bold",className:"mb-2",children:"Files"}),J.jsx(Lh,{type:"auto",scrollbars:"vertical",className:"flex-1 pt-4",children:c?J.jsxs("div",{className:"grow",children:[s.fileSearchResults.map(i=>J.jsx("div",{className:"mb-2",children:J.jsx(bs,{p:"2",style:{borderRadius:"6px",border:"1px solid var(--gray-5)"},children:J.jsx(tn,{size:"2",weight:"medium",children:J.jsx(Ag,{href:i.Link,target:"_blank",className:"text-blue-500 hover:underline",children:i.FileName})})})},i.FileID)),J.jsx("div",{ref:n,className:"h-1"})]}):J.jsxs("div",{children:[J.jsx("div",{children:"No search results yet"}),J.jsx("div",{ref:n,className:"h-1"})]})})]})},tz=Gi("ChVnb29nbGUvcnBjL2NvZGUucHJvdG8SCmdvb2dsZS5ycGMqtwIKBENvZGUSBgoCT0sQABINCglDQU5DRUxMRUQQARILCgdVTktOT1dOEAISFAoQSU5WQUxJRF9BUkdVTUVOVBADEhUKEURFQURMSU5FX0VYQ0VFREVEEAQSDQoJTk9UX0ZPVU5EEAUSEgoOQUxSRUFEWV9FWElTVFMQBhIVChFQRVJNSVNTSU9OX0RFTklFRBAHEhMKD1VOQVVUSEVOVElDQVRFRBAQEhYKElJFU09VUkNFX0VYSEFVU1RFRBAIEhcKE0ZBSUxFRF9QUkVDT05ESVRJT04QCRILCgdBQk9SVEVEEAoSEAoMT1VUX09GX1JBTkdFEAsSEQoNVU5JTVBMRU1FTlRFRBAMEgwKCElOVEVSTkFMEA0SDwoLVU5BVkFJTEFCTEUQDhINCglEQVRBX0xPU1MQD0JYCg5jb20uZ29vZ2xlLnJwY0IJQ29kZVByb3RvUAFaM2dvb2dsZS5nb2xhbmcub3JnL2dlbnByb3RvL2dvb2dsZWFwaXMvcnBjL2NvZGU7Y29kZaICA1JQQ2IGcHJvdG8z"),nz=EN(tz,0),Yv=Ph(nz);function rz(){const{runnerError:t}=es(),[e]=o9(),n=D.useMemo(()=>t&&!(t instanceof Error)?Yv[t.code]??t.code:e.get("error"),[t,e]),r=D.useMemo(()=>t&&!(t instanceof Error)?t.message:e.get("error_description"),[t,e]),s=()=>{window.location.href="/oidc/login"};return J.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:[n&&J.jsxs(Nh,{color:"red",children:[J.jsxs(Rc,{className:"font-bold",children:["Error: ",n]}),r&&J.jsx(Rc,{children:r})]}),J.jsx(Di,{size:"4",onClick:s,className:"cursor-pointer",children:"Login"})]})}const sz=()=>J.jsxs(gE,{size:"3",style:{padding:"2rem",textAlign:"center"},children:[J.jsx(aE,{size:"8",mb:"4",children:"404"}),J.jsx(tn,{size:"5",color:"gray",children:"Page not found"}),J.jsx(tn,{as:"p",mt:"4",children:"The page you're looking for doesn't exist or has been moved."}),J.jsxs(tn,{as:"p",mt:"4",children:["Click"," ",J.jsx(Ag,{href:"/",underline:"always",children:"here"})," ","to go back home."]})]});function iz(){const t=tg(),{settings:e,updateSettings:n,runnerError:r,defaultSettings:s}=es(),[c,i]=D.useState(!1),[o,u]=D.useState(e.agentEndpoint),[l,a]=D.useState(e.webApp.runner),[d,f]=D.useState(e.webApp.invertedOrder),p=()=>{n({agentEndpoint:o,webApp:{runner:l,reconnect:e.webApp.reconnect,invertedOrder:d}}),i(!0)};D.useEffect(()=>{c&&(i(!1),r&&t("/"))},[r,c,t]);const v=()=>{u(s.agentEndpoint),a(s.webApp.runner),f(s.webApp.invertedOrder)},m=D.useMemo(()=>{if(r instanceof Error)return r.message},[r]),b=o!==e.agentEndpoint||l!==e.webApp.runner||d!==e.webApp.invertedOrder;return J.jsxs(bs,{className:"w-full mx-auto",children:[J.jsx(tn,{size:"5",weight:"bold",className:"mb-2",children:"Settings"}),J.jsxs(bs,{className:"mt-4",children:[J.jsxs(In,{direction:"column",gap:"4",children:[J.jsxs(In,{direction:"column",gap:"2",children:[J.jsx(tn,{size:"3",weight:"bold",children:"Agent Endpoint Configuration"}),J.jsx(tn,{size:"2",color:"gray",children:"Configure the endpoint URL for the AI agent. Changes will take effect after saving."}),J.jsx(ih,{size:"3",placeholder:"Enter AI endpoint URL",value:o,onChange:y=>u(y.target.value)})]}),J.jsxs(In,{direction:"column",gap:"2",children:[J.jsx(tn,{size:"3",weight:"bold",children:"Runner Endpoint Configuration"}),J.jsx(tn,{size:"2",color:"gray",children:"Configure the WebSocket endpoint URL for the runner. Changes will take effect after saving."}),r&&J.jsx(Nh,{color:"red",children:J.jsxs(Rc,{className:"font-bold",children:["Runner error",m?": "+m:""]})}),J.jsx(ih,{size:"3",placeholder:"Enter Runner WebSocket endpoint URL",value:l,onChange:y=>a(y.target.value)}),J.jsx(tn,{size:"2",color:"gray",children:"Revert will reset endpoints to the default values, including protocol http(s), based on the current page."})]}),J.jsxs(In,{direction:"column",gap:"2",children:[J.jsx(tn,{size:"3",weight:"bold",children:"User Experience Mode"}),J.jsx(tn,{as:"label",size:"2",children:J.jsxs(In,{gap:"2",children:["Document Mode",J.jsx(bE,{checked:d,onCheckedChange:f}),"Console Mode"]})})]})]}),J.jsxs(In,{gap:"3",justify:"end",mt:"4",children:[J.jsx(Di,{size:"2",variant:"soft",onClick:()=>t("/"),children:"Back"}),J.jsx(Di,{size:"2",variant:"soft",onClick:v,children:"Revert"}),J.jsx(Di,{size:"2",onClick:p,disabled:!b,children:"Save"})]})]})]})}function Ct(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function tx(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function sf(...t){return e=>{let n=!1;const r=t.map(s=>{const c=tx(s,e);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let s=0;s<r.length;s++){const c=r[s];typeof c=="function"?c():tx(t[s],null)}}}}function sr(...t){return D.useCallback(sf(...t),t)}function fu(t,e=[]){let n=[];function r(c,i){const o=D.createContext(i),u=n.length;n=[...n,i];const l=d=>{var y;const{scope:f,children:p,...v}=d,m=((y=f==null?void 0:f[t])==null?void 0:y[u])||o,b=D.useMemo(()=>v,Object.values(v));return J.jsx(m.Provider,{value:b,children:p})};l.displayName=c+"Provider";function a(d,f){var m;const p=((m=f==null?void 0:f[t])==null?void 0:m[u])||o,v=D.useContext(p);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${c}\``)}return[l,a]}const s=()=>{const c=n.map(i=>D.createContext(i));return function(o){const u=(o==null?void 0:o[t])||c;return D.useMemo(()=>({[`__scope${t}`]:{...o,[t]:u}}),[o,u])}};return s.scopeName=t,[r,oz(s,...e)]}function oz(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const i=r.reduce((o,{useScope:u,scopeName:l})=>{const d=u(c)[`__scope${l}`];return{...o,...d}},{});return D.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return n.scopeName=e.scopeName,n}var Mo=globalThis!=null&&globalThis.document?D.useLayoutEffect:()=>{},az=vx[" useInsertionEffect ".trim().toString()]||Mo;function $k({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[s,c,i]=lz({defaultProp:e,onChange:n}),o=t!==void 0,u=o?t:s;{const a=D.useRef(t!==void 0);D.useEffect(()=>{const d=a.current;d!==o&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),a.current=o},[o,r])}const l=D.useCallback(a=>{var d;if(o){const f=cz(a)?a(t):a;f!==t&&((d=i.current)==null||d.call(i,f))}else c(a)},[o,t,c,i]);return[u,l]}function lz({defaultProp:t,onChange:e}){const[n,r]=D.useState(t),s=D.useRef(n),c=D.useRef(e);return az(()=>{c.current=e},[e]),D.useEffect(()=>{var i;s.current!==n&&((i=c.current)==null||i.call(c,n),s.current=n)},[n,s]),[n,r,c]}function cz(t){return typeof t=="function"}function bh(t){const e=uz(t),n=D.forwardRef((r,s)=>{const{children:c,...i}=r,o=D.Children.toArray(c),u=o.find(hz);if(u){const l=u.props.children,a=o.map(d=>d===u?D.Children.count(l)>1?D.Children.only(null):D.isValidElement(l)?l.props.children:null:d);return J.jsx(e,{...i,ref:s,children:D.isValidElement(l)?D.cloneElement(l,void 0,a):null})}return J.jsx(e,{...i,ref:s,children:c})});return n.displayName=`${t}.Slot`,n}function uz(t){const e=D.forwardRef((n,r)=>{const{children:s,...c}=n;if(D.isValidElement(s)){const i=pz(s),o=fz(c,s.props);return s.type!==D.Fragment&&(o.ref=r?sf(r,i):i),D.cloneElement(s,o)}return D.Children.count(s)>1?D.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var dz=Symbol("radix.slottable");function hz(t){return D.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===dz}function fz(t,e){const n={...e};for(const r in e){const s=t[r],c=e[r];/^on[A-Z]/.test(r)?s&&c?n[r]=(...o)=>{const u=c(...o);return s(...o),u}:s&&(n[r]=s):r==="style"?n[r]={...s,...c}:r==="className"&&(n[r]=[s,c].filter(Boolean).join(" "))}return{...t,...n}}function pz(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var mz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],lr=mz.reduce((t,e)=>{const n=bh(`Primitive.${e}`),r=D.forwardRef((s,c)=>{const{asChild:i,...o}=s,u=i?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),J.jsx(u,{...o,ref:c})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Bk(t,e){t&&og.flushSync(()=>t.dispatchEvent(e))}function Uk(t){const e=t+"CollectionProvider",[n,r]=fu(e),[s,c]=n(e,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:b,children:y}=m,_=Qn.useRef(null),S=Qn.useRef(new Map).current;return J.jsx(s,{scope:b,itemMap:S,collectionRef:_,children:y})};i.displayName=e;const o=t+"CollectionSlot",u=bh(o),l=Qn.forwardRef((m,b)=>{const{scope:y,children:_}=m,S=c(o,y),C=sr(b,S.collectionRef);return J.jsx(u,{ref:C,children:_})});l.displayName=o;const a=t+"CollectionItemSlot",d="data-radix-collection-item",f=bh(a),p=Qn.forwardRef((m,b)=>{const{scope:y,children:_,...S}=m,C=Qn.useRef(null),x=sr(b,C),j=c(a,y);return Qn.useEffect(()=>(j.itemMap.set(C,{ref:C,...S}),()=>void j.itemMap.delete(C))),J.jsx(f,{[d]:"",ref:x,children:_})});p.displayName=a;function v(m){const b=c(t+"CollectionConsumer",m);return Qn.useCallback(()=>{const _=b.collectionRef.current;if(!_)return[];const S=Array.from(_.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((j,k)=>S.indexOf(j.ref.current)-S.indexOf(k.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:l,ItemSlot:p},v,r]}var vz=D.createContext(void 0);function Fk(t){const e=D.useContext(vz);return t||e||"ltr"}function ii(t){const e=D.useRef(t);return D.useEffect(()=>{e.current=t}),D.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function gz(t,e=globalThis==null?void 0:globalThis.document){const n=ii(t);D.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var bz="DismissableLayer",Kv="dismissableLayer.update",yz="dismissableLayer.pointerDownOutside",_z="dismissableLayer.focusOutside",nx,Vk=D.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zk=D.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:i,onDismiss:o,...u}=t,l=D.useContext(Vk),[a,d]=D.useState(null),f=(a==null?void 0:a.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=D.useState({}),v=sr(e,k=>d(k)),m=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(b),_=a?m.indexOf(a):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,C=_>=y,x=xz(k=>{const T=k.target,A=[...l.branches].some(L=>L.contains(T));!C||A||(s==null||s(k),i==null||i(k),k.defaultPrevented||o==null||o())},f),j=Cz(k=>{const T=k.target;[...l.branches].some(L=>L.contains(T))||(c==null||c(k),i==null||i(k),k.defaultPrevented||o==null||o())},f);return gz(k=>{_===l.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&o&&(k.preventDefault(),o()))},f),D.useEffect(()=>{if(a)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(nx=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(a)),l.layers.add(a),rx(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=nx)}},[a,f,n,l]),D.useEffect(()=>()=>{a&&(l.layers.delete(a),l.layersWithOutsidePointerEventsDisabled.delete(a),rx())},[a,l]),D.useEffect(()=>{const k=()=>p({});return document.addEventListener(Kv,k),()=>document.removeEventListener(Kv,k)},[]),J.jsx(lr.div,{...u,ref:v,style:{pointerEvents:S?C?"auto":"none":void 0,...t.style},onFocusCapture:Ct(t.onFocusCapture,j.onFocusCapture),onBlurCapture:Ct(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Ct(t.onPointerDownCapture,x.onPointerDownCapture)})});zk.displayName=bz;var wz="DismissableLayerBranch",Sz=D.forwardRef((t,e)=>{const n=D.useContext(Vk),r=D.useRef(null),s=sr(e,r);return D.useEffect(()=>{const c=r.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),J.jsx(lr.div,{...t,ref:s})});Sz.displayName=wz;function xz(t,e=globalThis==null?void 0:globalThis.document){const n=ii(t),r=D.useRef(!1),s=D.useRef(()=>{});return D.useEffect(()=>{const c=o=>{if(o.target&&!r.current){let u=function(){Hk(yz,n,l,{discrete:!0})};const l={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=u,e.addEventListener("click",s.current,{once:!0})):u()}else e.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",c),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function Cz(t,e=globalThis==null?void 0:globalThis.document){const n=ii(t),r=D.useRef(!1);return D.useEffect(()=>{const s=c=>{c.target&&!r.current&&Hk(_z,n,{originalEvent:c},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function rx(){const t=new CustomEvent(Kv);document.dispatchEvent(t)}function Hk(t,e,n,{discrete:r}){const s=n.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Bk(s,c):s.dispatchEvent(c)}var av=0;function Ez(){D.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??sx()),document.body.insertAdjacentElement("beforeend",t[1]??sx()),av++,()=>{av===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),av--}},[])}function sx(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var lv="focusScope.autoFocusOnMount",cv="focusScope.autoFocusOnUnmount",ix={bubbles:!1,cancelable:!0},jz="FocusScope",Wk=D.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:c,...i}=t,[o,u]=D.useState(null),l=ii(s),a=ii(c),d=D.useRef(null),f=sr(e,m=>u(m)),p=D.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;D.useEffect(()=>{if(r){let m=function(S){if(p.paused||!o)return;const C=S.target;o.contains(C)?d.current=C:Li(d.current,{select:!0})},b=function(S){if(p.paused||!o)return;const C=S.relatedTarget;C!==null&&(o.contains(C)||Li(d.current,{select:!0}))},y=function(S){if(document.activeElement===document.body)for(const x of S)x.removedNodes.length>0&&Li(o)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const _=new MutationObserver(y);return o&&_.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),_.disconnect()}}},[r,o,p.paused]),D.useEffect(()=>{if(o){ax.add(p);const m=document.activeElement;if(!o.contains(m)){const y=new CustomEvent(lv,ix);o.addEventListener(lv,l),o.dispatchEvent(y),y.defaultPrevented||(kz(Rz(Gk(o)),{select:!0}),document.activeElement===m&&Li(o))}return()=>{o.removeEventListener(lv,l),setTimeout(()=>{const y=new CustomEvent(cv,ix);o.addEventListener(cv,a),o.dispatchEvent(y),y.defaultPrevented||Li(m??document.body,{select:!0}),o.removeEventListener(cv,a),ax.remove(p)},0)}}},[o,l,a,p]);const v=D.useCallback(m=>{if(!n&&!r||p.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(b&&y){const _=m.currentTarget,[S,C]=Tz(_);S&&C?!m.shiftKey&&y===C?(m.preventDefault(),n&&Li(S,{select:!0})):m.shiftKey&&y===S&&(m.preventDefault(),n&&Li(C,{select:!0})):y===_&&m.preventDefault()}},[n,r,p.paused]);return J.jsx(lr.div,{tabIndex:-1,...i,ref:f,onKeyDown:v})});Wk.displayName=jz;function kz(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Li(r,{select:e}),document.activeElement!==n)return}function Tz(t){const e=Gk(t),n=ox(e,t),r=ox(e.reverse(),t);return[n,r]}function Gk(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function ox(t,e){for(const n of t)if(!Oz(n,{upTo:e}))return n}function Oz(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Az(t){return t instanceof HTMLInputElement&&"select"in t}function Li(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Az(t)&&e&&t.select()}}var ax=Iz();function Iz(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=lx(t,e),t.unshift(e)},remove(e){var n;t=lx(t,e),(n=t[0])==null||n.resume()}}}function lx(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function Rz(t){return t.filter(e=>e.tagName!=="A")}var Nz=vx[" useId ".trim().toString()]||(()=>{}),Lz=0;function Xv(t){const[e,n]=D.useState(Nz());return Mo(()=>{n(r=>r??String(Lz++))},[t]),t||(e?`radix-${e}`:"")}var Dz="Arrow",Zk=D.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...c}=t;return J.jsx(lr.svg,{...c,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:J.jsx("polygon",{points:"0,0 30,0 15,10"})})});Zk.displayName=Dz;var Mz=Zk;function Pz(t){const[e,n]=D.useState(void 0);return Mo(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const c=s[0];let i,o;if("borderBoxSize"in c){const u=c.borderBoxSize,l=Array.isArray(u)?u[0]:u;i=l.inlineSize,o=l.blockSize}else i=t.offsetWidth,o=t.offsetHeight;n({width:i,height:o})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var F0="Popper",[Yk,Kk]=fu(F0),[$z,Xk]=Yk(F0),qk=t=>{const{__scopePopper:e,children:n}=t,[r,s]=D.useState(null);return J.jsx($z,{scope:e,anchor:r,onAnchorChange:s,children:n})};qk.displayName=F0;var Jk="PopperAnchor",Qk=D.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,c=Xk(Jk,n),i=D.useRef(null),o=sr(e,i);return D.useEffect(()=>{c.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:J.jsx(lr.div,{...s,ref:o})});Qk.displayName=Jk;var V0="PopperContent",[Bz,Uz]=Yk(V0),e5=D.forwardRef((t,e)=>{var V,ce,oe,xe,he,Pe;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:c="center",alignOffset:i=0,arrowPadding:o=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:a=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:v,...m}=t,b=Xk(V0,n),[y,_]=D.useState(null),S=sr(e,Ie=>_(Ie)),[C,x]=D.useState(null),j=Pz(C),k=(j==null?void 0:j.width)??0,T=(j==null?void 0:j.height)??0,A=r+(c!=="center"?"-"+c:""),L=typeof a=="number"?a:{top:0,right:0,bottom:0,left:0,...a},N=Array.isArray(l)?l:[l],M=N.length>0,F={padding:L,boundary:N.filter(Vz),altBoundary:M},{refs:Z,floatingStyles:Y,placement:X,isPositioned:Q,middlewareData:$}=pC({strategy:"fixed",placement:A,whileElementsMounted:(...Ie)=>hC(...Ie,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[mC({mainAxis:s+T,alignmentAxis:i}),u&&vC({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?gC():void 0,...F}),u&&bC({...F}),yC({...F,apply:({elements:Ie,rects:Ye,availableWidth:be,availableHeight:je})=>{const{width:ie,height:se}=Ye.reference,ue=Ie.floating.style;ue.setProperty("--radix-popper-available-width",`${be}px`),ue.setProperty("--radix-popper-available-height",`${je}px`),ue.setProperty("--radix-popper-anchor-width",`${ie}px`),ue.setProperty("--radix-popper-anchor-height",`${se}px`)}}),C&&wC({element:C,padding:o}),zz({arrowWidth:k,arrowHeight:T}),f&&_C({strategy:"referenceHidden",...F})]}),[U,I]=r5(X),W=ii(v);Mo(()=>{Q&&(W==null||W())},[Q,W]);const G=(V=$.arrow)==null?void 0:V.x,B=(ce=$.arrow)==null?void 0:ce.y,ee=((oe=$.arrow)==null?void 0:oe.centerOffset)!==0,[re,K]=D.useState();return Mo(()=>{y&&K(window.getComputedStyle(y).zIndex)},[y]),J.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:Q?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(xe=$.transformOrigin)==null?void 0:xe.x,(he=$.transformOrigin)==null?void 0:he.y].join(" "),...((Pe=$.hide)==null?void 0:Pe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:J.jsx(Bz,{scope:n,placedSide:U,onArrowChange:x,arrowX:G,arrowY:B,shouldHideArrow:ee,children:J.jsx(lr.div,{"data-side":U,"data-align":I,...m,ref:S,style:{...m.style,animation:Q?void 0:"none"}})})})});e5.displayName=V0;var t5="PopperArrow",Fz={top:"bottom",right:"left",bottom:"top",left:"right"},n5=D.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,c=Uz(t5,r),i=Fz[c.placedSide];return J.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:J.jsx(Mz,{...s,ref:n,style:{...s.style,display:"block"}})})});n5.displayName=t5;function Vz(t){return t!==null}var zz=t=>({name:"transformOrigin",options:t,fn(e){var b,y,_;const{placement:n,rects:r,middlewareData:s}=e,i=((b=s.arrow)==null?void 0:b.centerOffset)!==0,o=i?0:t.arrowWidth,u=i?0:t.arrowHeight,[l,a]=r5(n),d={start:"0%",center:"50%",end:"100%"}[a],f=(((y=s.arrow)==null?void 0:y.x)??0)+o/2,p=(((_=s.arrow)==null?void 0:_.y)??0)+u/2;let v="",m="";return l==="bottom"?(v=i?d:`${f}px`,m=`${-u}px`):l==="top"?(v=i?d:`${f}px`,m=`${r.floating.height+u}px`):l==="right"?(v=`${-u}px`,m=i?d:`${p}px`):l==="left"&&(v=`${r.floating.width+u}px`,m=i?d:`${p}px`),{data:{x:v,y:m}}}});function r5(t){const[e,n="center"]=t.split("-");return[e,n]}var Hz=qk,Wz=Qk,Gz=e5,Zz=n5;function Yz(t,e){return D.useReducer((n,r)=>e[n][r]??n,t)}var of=t=>{const{present:e,children:n}=t,r=Kz(e),s=typeof n=="function"?n({present:r.isPresent}):D.Children.only(n),c=sr(r.ref,Xz(s));return typeof n=="function"||r.isPresent?D.cloneElement(s,{ref:c}):null};of.displayName="Presence";function Kz(t){const[e,n]=D.useState(),r=D.useRef(null),s=D.useRef(t),c=D.useRef("none"),i=t?"mounted":"unmounted",[o,u]=Yz(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D.useEffect(()=>{const l=$d(r.current);c.current=o==="mounted"?l:"none"},[o]),Mo(()=>{const l=r.current,a=s.current;if(a!==t){const f=c.current,p=$d(l);t?u("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(a&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,u]),Mo(()=>{if(e){let l;const a=e.ownerDocument.defaultView??window,d=p=>{const m=$d(r.current).includes(p.animationName);if(p.target===e&&m&&(u("ANIMATION_END"),!s.current)){const b=e.style.animationFillMode;e.style.animationFillMode="forwards",l=a.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=b)})}},f=p=>{p.target===e&&(c.current=$d(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{a.clearTimeout(l),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:D.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function $d(t){return(t==null?void 0:t.animationName)||"none"}function Xz(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var uv="rovingFocusGroup.onEntryFocus",qz={bubbles:!1,cancelable:!0},pu="RovingFocusGroup",[qv,s5,Jz]=Uk(pu),[Qz,i5]=fu(pu,[Jz]),[eH,tH]=Qz(pu),o5=D.forwardRef((t,e)=>J.jsx(qv.Provider,{scope:t.__scopeRovingFocusGroup,children:J.jsx(qv.Slot,{scope:t.__scopeRovingFocusGroup,children:J.jsx(nH,{...t,ref:e})})}));o5.displayName=pu;var nH=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:c,currentTabStopId:i,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:a=!1,...d}=t,f=D.useRef(null),p=sr(e,f),v=Fk(c),[m,b]=$k({prop:i,defaultProp:o??null,onChange:u,caller:pu}),[y,_]=D.useState(!1),S=ii(l),C=s5(n),x=D.useRef(!1),[j,k]=D.useState(0);return D.useEffect(()=>{const T=f.current;if(T)return T.addEventListener(uv,S),()=>T.removeEventListener(uv,S)},[S]),J.jsx(eH,{scope:n,orientation:r,dir:v,loop:s,currentTabStopId:m,onItemFocus:D.useCallback(T=>b(T),[b]),onItemShiftTab:D.useCallback(()=>_(!0),[]),onFocusableItemAdd:D.useCallback(()=>k(T=>T+1),[]),onFocusableItemRemove:D.useCallback(()=>k(T=>T-1),[]),children:J.jsx(lr.div,{tabIndex:y||j===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...t.style},onMouseDown:Ct(t.onMouseDown,()=>{x.current=!0}),onFocus:Ct(t.onFocus,T=>{const A=!x.current;if(T.target===T.currentTarget&&A&&!y){const L=new CustomEvent(uv,qz);if(T.currentTarget.dispatchEvent(L),!L.defaultPrevented){const N=C().filter(X=>X.focusable),M=N.find(X=>X.active),F=N.find(X=>X.id===m),Y=[M,F,...N].filter(Boolean).map(X=>X.ref.current);c5(Y,a)}}x.current=!1}),onBlur:Ct(t.onBlur,()=>_(!1))})})}),a5="RovingFocusGroupItem",l5=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:c,children:i,...o}=t,u=Xv(),l=c||u,a=tH(a5,n),d=a.currentTabStopId===l,f=s5(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:m}=a;return D.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),J.jsx(qv.ItemSlot,{scope:n,id:l,focusable:r,active:s,children:J.jsx(lr.span,{tabIndex:d?0:-1,"data-orientation":a.orientation,...o,ref:e,onMouseDown:Ct(t.onMouseDown,b=>{r?a.onItemFocus(l):b.preventDefault()}),onFocus:Ct(t.onFocus,()=>a.onItemFocus(l)),onKeyDown:Ct(t.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){a.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const y=iH(b,a.orientation,a.dir);if(y!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let S=f().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();const C=S.indexOf(b.currentTarget);S=a.loop?oH(S,C+1):S.slice(C+1)}setTimeout(()=>c5(S))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});l5.displayName=a5;var rH={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sH(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function iH(t,e,n){const r=sH(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return rH[r]}function c5(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function oH(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var aH=o5,lH=l5,Jv=["Enter"," "],cH=["ArrowDown","PageUp","Home"],u5=["ArrowUp","PageDown","End"],uH=[...cH,...u5],dH={ltr:[...Jv,"ArrowRight"],rtl:[...Jv,"ArrowLeft"]},hH={ltr:["ArrowLeft"],rtl:["ArrowRight"]},mu="Menu",[Zc,fH,pH]=Uk(mu),[$o,d5]=fu(mu,[pH,Kk,i5]),af=Kk(),h5=i5(),[mH,nl]=$o(mu),[vH,vu]=$o(mu),f5=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:s,onOpenChange:c,modal:i=!0}=t,o=af(e),[u,l]=D.useState(null),a=D.useRef(!1),d=ii(c),f=Fk(s);return D.useEffect(()=>{const p=()=>{a.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>a.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),J.jsx(Hz,{...o,children:J.jsx(mH,{scope:e,open:n,onOpenChange:d,content:u,onContentChange:l,children:J.jsx(vH,{scope:e,onClose:D.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:a,dir:f,modal:i,children:r})})})};f5.displayName=mu;var gH="MenuAnchor",z0=D.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=af(n);return J.jsx(Wz,{...s,...r,ref:e})});z0.displayName=gH;var bH="MenuPortal",[KW,p5]=$o(bH,{forceMount:void 0}),Pr="MenuContent",[yH,H0]=$o(Pr),m5=D.forwardRef((t,e)=>{const n=p5(Pr,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,c=nl(Pr,t.__scopeMenu),i=vu(Pr,t.__scopeMenu);return J.jsx(Zc.Provider,{scope:t.__scopeMenu,children:J.jsx(of,{present:r||c.open,children:J.jsx(Zc.Slot,{scope:t.__scopeMenu,children:i.modal?J.jsx(_H,{...s,ref:e}):J.jsx(wH,{...s,ref:e})})})})}),_H=D.forwardRef((t,e)=>{const n=nl(Pr,t.__scopeMenu),r=D.useRef(null),s=sr(e,r);return D.useEffect(()=>{const c=r.current;if(c)return _6(c)},[]),J.jsx(W0,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ct(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),wH=D.forwardRef((t,e)=>{const n=nl(Pr,t.__scopeMenu);return J.jsx(W0,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),SH=bh("MenuContent.ScrollLock"),W0=D.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:c,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:v,...m}=t,b=nl(Pr,n),y=vu(Pr,n),_=af(n),S=h5(n),C=fH(n),[x,j]=D.useState(null),k=D.useRef(null),T=sr(e,k,b.onContentChange),A=D.useRef(0),L=D.useRef(""),N=D.useRef(0),M=D.useRef(null),F=D.useRef("right"),Z=D.useRef(0),Y=v?Yx:D.Fragment,X=v?{as:SH,allowPinchZoom:!0}:void 0,Q=U=>{var V,ce;const I=L.current+U,W=C().filter(oe=>!oe.disabled),G=document.activeElement,B=(V=W.find(oe=>oe.ref.current===G))==null?void 0:V.textValue,ee=W.map(oe=>oe.textValue),re=LH(ee,I,B),K=(ce=W.find(oe=>oe.textValue===re))==null?void 0:ce.ref.current;(function oe(xe){L.current=xe,window.clearTimeout(A.current),xe!==""&&(A.current=window.setTimeout(()=>oe(""),1e3))})(I),K&&setTimeout(()=>K.focus())};D.useEffect(()=>()=>window.clearTimeout(A.current),[]),Ez();const $=D.useCallback(U=>{var W,G;return F.current===((W=M.current)==null?void 0:W.side)&&MH(U,(G=M.current)==null?void 0:G.area)},[]);return J.jsx(yH,{scope:n,searchRef:L,onItemEnter:D.useCallback(U=>{$(U)&&U.preventDefault()},[$]),onItemLeave:D.useCallback(U=>{var I;$(U)||((I=k.current)==null||I.focus(),j(null))},[$]),onTriggerLeave:D.useCallback(U=>{$(U)&&U.preventDefault()},[$]),pointerGraceTimerRef:N,onPointerGraceIntentChange:D.useCallback(U=>{M.current=U},[]),children:J.jsx(Y,{...X,children:J.jsx(Wk,{asChild:!0,trapped:s,onMountAutoFocus:Ct(c,U=>{var I;U.preventDefault(),(I=k.current)==null||I.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:J.jsx(zk,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:J.jsx(aH,{asChild:!0,...S,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:j,onEntryFocus:Ct(u,U=>{y.isUsingKeyboardRef.current||U.preventDefault()}),preventScrollOnEntryFocus:!0,children:J.jsx(Gz,{role:"menu","aria-orientation":"vertical","data-state":I5(b.open),"data-radix-menu-content":"",dir:y.dir,..._,...m,ref:T,style:{outline:"none",...m.style},onKeyDown:Ct(m.onKeyDown,U=>{const W=U.target.closest("[data-radix-menu-content]")===U.currentTarget,G=U.ctrlKey||U.altKey||U.metaKey,B=U.key.length===1;W&&(U.key==="Tab"&&U.preventDefault(),!G&&B&&Q(U.key));const ee=k.current;if(U.target!==ee||!uH.includes(U.key))return;U.preventDefault();const K=C().filter(V=>!V.disabled).map(V=>V.ref.current);u5.includes(U.key)&&K.reverse(),RH(K)}),onBlur:Ct(t.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(A.current),L.current="")}),onPointerMove:Ct(t.onPointerMove,Yc(U=>{const I=U.target,W=Z.current!==U.clientX;if(U.currentTarget.contains(I)&&W){const G=U.clientX>Z.current?"right":"left";F.current=G,Z.current=U.clientX}}))})})})})})})});m5.displayName=Pr;var xH="MenuGroup",G0=D.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return J.jsx(lr.div,{role:"group",...r,ref:e})});G0.displayName=xH;var CH="MenuLabel",v5=D.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return J.jsx(lr.div,{...r,ref:e})});v5.displayName=CH;var yh="MenuItem",cx="menu.itemSelect",lf=D.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...s}=t,c=D.useRef(null),i=vu(yh,t.__scopeMenu),o=H0(yh,t.__scopeMenu),u=sr(e,c),l=D.useRef(!1),a=()=>{const d=c.current;if(!n&&d){const f=new CustomEvent(cx,{bubbles:!0,cancelable:!0});d.addEventListener(cx,p=>r==null?void 0:r(p),{once:!0}),Bk(d,f),f.defaultPrevented?l.current=!1:i.onClose()}};return J.jsx(g5,{...s,ref:u,disabled:n,onClick:Ct(t.onClick,a),onPointerDown:d=>{var f;(f=t.onPointerDown)==null||f.call(t,d),l.current=!0},onPointerUp:Ct(t.onPointerUp,d=>{var f;l.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:Ct(t.onKeyDown,d=>{const f=o.searchRef.current!=="";n||f&&d.key===" "||Jv.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});lf.displayName=yh;var g5=D.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...c}=t,i=H0(yh,n),o=h5(n),u=D.useRef(null),l=sr(e,u),[a,d]=D.useState(!1),[f,p]=D.useState("");return D.useEffect(()=>{const v=u.current;v&&p((v.textContent??"").trim())},[c.children]),J.jsx(Zc.ItemSlot,{scope:n,disabled:r,textValue:s??f,children:J.jsx(lH,{asChild:!0,...o,focusable:!r,children:J.jsx(lr.div,{role:"menuitem","data-highlighted":a?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...c,ref:l,onPointerMove:Ct(t.onPointerMove,Yc(v=>{r?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ct(t.onPointerLeave,Yc(v=>i.onItemLeave(v))),onFocus:Ct(t.onFocus,()=>d(!0)),onBlur:Ct(t.onBlur,()=>d(!1))})})})}),EH="MenuCheckboxItem",b5=D.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...s}=t;return J.jsx(x5,{scope:t.__scopeMenu,checked:n,children:J.jsx(lf,{role:"menuitemcheckbox","aria-checked":_h(n)?"mixed":n,...s,ref:e,"data-state":Y0(n),onSelect:Ct(s.onSelect,()=>r==null?void 0:r(_h(n)?!0:!n),{checkForDefaultPrevented:!1})})})});b5.displayName=EH;var y5="MenuRadioGroup",[jH,kH]=$o(y5,{value:void 0,onValueChange:()=>{}}),_5=D.forwardRef((t,e)=>{const{value:n,onValueChange:r,...s}=t,c=ii(r);return J.jsx(jH,{scope:t.__scopeMenu,value:n,onValueChange:c,children:J.jsx(G0,{...s,ref:e})})});_5.displayName=y5;var w5="MenuRadioItem",S5=D.forwardRef((t,e)=>{const{value:n,...r}=t,s=kH(w5,t.__scopeMenu),c=n===s.value;return J.jsx(x5,{scope:t.__scopeMenu,checked:c,children:J.jsx(lf,{role:"menuitemradio","aria-checked":c,...r,ref:e,"data-state":Y0(c),onSelect:Ct(r.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,n)},{checkForDefaultPrevented:!1})})})});S5.displayName=w5;var Z0="MenuItemIndicator",[x5,TH]=$o(Z0,{checked:!1}),C5=D.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...s}=t,c=TH(Z0,n);return J.jsx(of,{present:r||_h(c.checked)||c.checked===!0,children:J.jsx(lr.span,{...s,ref:e,"data-state":Y0(c.checked)})})});C5.displayName=Z0;var OH="MenuSeparator",E5=D.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return J.jsx(lr.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});E5.displayName=OH;var AH="MenuArrow",j5=D.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=af(n);return J.jsx(Zz,{...s,...r,ref:e})});j5.displayName=AH;var IH="MenuSub",[XW,k5]=$o(IH),mc="MenuSubTrigger",T5=D.forwardRef((t,e)=>{const n=nl(mc,t.__scopeMenu),r=vu(mc,t.__scopeMenu),s=k5(mc,t.__scopeMenu),c=H0(mc,t.__scopeMenu),i=D.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:u}=c,l={__scopeMenu:t.__scopeMenu},a=D.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return D.useEffect(()=>a,[a]),D.useEffect(()=>{const d=o.current;return()=>{window.clearTimeout(d),u(null)}},[o,u]),J.jsx(z0,{asChild:!0,...l,children:J.jsx(g5,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":I5(n.open),...t,ref:sf(e,s.onTriggerChange),onClick:d=>{var f;(f=t.onClick)==null||f.call(t,d),!(t.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ct(t.onPointerMove,Yc(d=>{c.onItemEnter(d),!d.defaultPrevented&&!t.disabled&&!n.open&&!i.current&&(c.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),a()},100))})),onPointerLeave:Ct(t.onPointerLeave,Yc(d=>{var p,v;a();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const m=(v=n.content)==null?void 0:v.dataset.side,b=m==="right",y=b?-5:5,_=f[b?"left":"right"],S=f[b?"right":"left"];c.onPointerGraceIntentChange({area:[{x:d.clientX+y,y:d.clientY},{x:_,y:f.top},{x:S,y:f.top},{x:S,y:f.bottom},{x:_,y:f.bottom}],side:m}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(d),d.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:Ct(t.onKeyDown,d=>{var p;const f=c.searchRef.current!=="";t.disabled||f&&d.key===" "||dH[r.dir].includes(d.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),d.preventDefault())})})})});T5.displayName=mc;var O5="MenuSubContent",A5=D.forwardRef((t,e)=>{const n=p5(Pr,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,c=nl(Pr,t.__scopeMenu),i=vu(Pr,t.__scopeMenu),o=k5(O5,t.__scopeMenu),u=D.useRef(null),l=sr(e,u);return J.jsx(Zc.Provider,{scope:t.__scopeMenu,children:J.jsx(of,{present:r||c.open,children:J.jsx(Zc.Slot,{scope:t.__scopeMenu,children:J.jsx(W0,{id:o.contentId,"aria-labelledby":o.triggerId,...s,ref:l,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:a=>{var d;i.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),a.preventDefault()},onCloseAutoFocus:a=>a.preventDefault(),onFocusOutside:Ct(t.onFocusOutside,a=>{a.target!==o.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:Ct(t.onEscapeKeyDown,a=>{i.onClose(),a.preventDefault()}),onKeyDown:Ct(t.onKeyDown,a=>{var p;const d=a.currentTarget.contains(a.target),f=hH[i.dir].includes(a.key);d&&f&&(c.onOpenChange(!1),(p=o.trigger)==null||p.focus(),a.preventDefault())})})})})})});A5.displayName=O5;function I5(t){return t?"open":"closed"}function _h(t){return t==="indeterminate"}function Y0(t){return _h(t)?"indeterminate":t?"checked":"unchecked"}function RH(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function NH(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function LH(t,e,n){const s=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,c=n?t.indexOf(n):-1;let i=NH(t,Math.max(c,0));s.length===1&&(i=i.filter(l=>l!==n));const u=i.find(l=>l.toLowerCase().startsWith(s.toLowerCase()));return u!==n?u:void 0}function DH(t,e){const{x:n,y:r}=t;let s=!1;for(let c=0,i=e.length-1;c<e.length;i=c++){const o=e[c],u=e[i],l=o.x,a=o.y,d=u.x,f=u.y;a>r!=f>r&&n<(d-l)*(r-a)/(f-a)+l&&(s=!s)}return s}function MH(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return DH(n,e)}function Yc(t){return e=>e.pointerType==="mouse"?t(e):void 0}var PH=f5,$H=z0,BH=m5,UH=G0,FH=v5,VH=lf,zH=b5,HH=_5,WH=S5,GH=C5,ZH=E5,YH=j5,KH=T5,XH=A5,cf="DropdownMenu",[qH,qW]=fu(cf,[d5]),cr=d5(),[JH,R5]=qH(cf),N5=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:s,defaultOpen:c,onOpenChange:i,modal:o=!0}=t,u=cr(e),l=D.useRef(null),[a,d]=$k({prop:s,defaultProp:c??!1,onChange:i,caller:cf});return J.jsx(JH,{scope:e,triggerId:Xv(),triggerRef:l,contentId:Xv(),open:a,onOpenChange:d,onOpenToggle:D.useCallback(()=>d(f=>!f),[d]),modal:o,children:J.jsx(PH,{...u,open:a,onOpenChange:d,dir:r,modal:o,children:n})})};N5.displayName=cf;var L5="DropdownMenuTrigger",D5=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=t,c=R5(L5,n),i=cr(n);return J.jsx($H,{asChild:!0,...i,children:J.jsx(lr.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:sf(e,c.triggerRef),onPointerDown:Ct(t.onPointerDown,o=>{!r&&o.button===0&&o.ctrlKey===!1&&(c.onOpenToggle(),c.open||o.preventDefault())}),onKeyDown:Ct(t.onKeyDown,o=>{r||(["Enter"," "].includes(o.key)&&c.onOpenToggle(),o.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});D5.displayName=L5;var M5="DropdownMenuContent",P5=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=R5(M5,n),c=cr(n),i=D.useRef(!1);return J.jsx(BH,{id:s.contentId,"aria-labelledby":s.triggerId,...c,...r,ref:e,onCloseAutoFocus:Ct(t.onCloseAutoFocus,o=>{var u;i.current||(u=s.triggerRef.current)==null||u.focus(),i.current=!1,o.preventDefault()}),onInteractOutside:Ct(t.onInteractOutside,o=>{const u=o.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,a=u.button===2||l;(!s.modal||a)&&(i.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});P5.displayName=M5;var QH="DropdownMenuGroup",eW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(UH,{...s,...r,ref:e})});eW.displayName=QH;var tW="DropdownMenuLabel",nW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(FH,{...s,...r,ref:e})});nW.displayName=tW;var rW="DropdownMenuItem",$5=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(VH,{...s,...r,ref:e})});$5.displayName=rW;var sW="DropdownMenuCheckboxItem",iW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(zH,{...s,...r,ref:e})});iW.displayName=sW;var oW="DropdownMenuRadioGroup",aW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(HH,{...s,...r,ref:e})});aW.displayName=oW;var lW="DropdownMenuRadioItem",cW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(WH,{...s,...r,ref:e})});cW.displayName=lW;var uW="DropdownMenuItemIndicator",dW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(GH,{...s,...r,ref:e})});dW.displayName=uW;var hW="DropdownMenuSeparator",fW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(ZH,{...s,...r,ref:e})});fW.displayName=hW;var pW="DropdownMenuArrow",mW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(YH,{...s,...r,ref:e})});mW.displayName=pW;var vW="DropdownMenuSubTrigger",gW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(KH,{...s,...r,ref:e})});gW.displayName=vW;var bW="DropdownMenuSubContent",yW=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=cr(n);return J.jsx(XH,{...s,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yW.displayName=bW;var _W=N5,wW=D5,SW=P5,xW=$5;function CW(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,c;for(c=0;c<r.length;c++)s=r[c],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}var EW=["color"],jW=D.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,s=CW(t,EW);return D.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s,{ref:e}),D.createElement("path",{d:"M7.5 0.875C5.49797 0.875 3.875 2.49797 3.875 4.5C3.875 6.15288 4.98124 7.54738 6.49373 7.98351C5.2997 8.12901 4.27557 8.55134 3.50407 9.31167C2.52216 10.2794 2.02502 11.72 2.02502 13.5999C2.02502 13.8623 2.23769 14.0749 2.50002 14.0749C2.76236 14.0749 2.97502 13.8623 2.97502 13.5999C2.97502 11.8799 3.42786 10.7206 4.17091 9.9883C4.91536 9.25463 6.02674 8.87499 7.49995 8.87499C8.97317 8.87499 10.0846 9.25463 10.8291 9.98831C11.5721 10.7206 12.025 11.8799 12.025 13.5999C12.025 13.8623 12.2376 14.0749 12.5 14.0749C12.7623 14.075 12.975 13.8623 12.975 13.6C12.975 11.72 12.4778 10.2794 11.4959 9.31166C10.7244 8.55135 9.70025 8.12903 8.50625 7.98352C10.0187 7.5474 11.125 6.15289 11.125 4.5C11.125 2.49797 9.50203 0.875 7.5 0.875ZM4.825 4.5C4.825 3.02264 6.02264 1.825 7.5 1.825C8.97736 1.825 10.175 3.02264 10.175 4.5C10.175 5.97736 8.97736 7.175 7.5 7.175C6.02264 7.175 4.825 5.97736 4.825 4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});class vc extends Error{}vc.prototype.name="InvalidTokenError";function kW(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function TW(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return kW(e)}catch{return atob(e)}}function OW(t,e){if(typeof t!="string")throw new vc("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,r=t.split(".")[n];if(typeof r!="string")throw new vc(`Invalid token specified: missing part #${n+1}`);let s;try{s=TW(r)}catch(c){throw new vc(`Invalid token specified: invalid base64 for part #${n+1} (${c.message})`)}try{return JSON.parse(s)}catch(c){throw new vc(`Invalid token specified: invalid json for part #${n+1} (${c.message})`)}}var dv={exports:{}},hv={exports:{}},ux;function AW(){return ux||(ux=1,function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(n,r){return n<<r|n>>>32-r},rotr:function(n,r){return n<<32-r|n>>>r},endian:function(n){if(n.constructor==Number)return e.rotl(n,8)&16711935|e.rotl(n,24)&4278255360;for(var r=0;r<n.length;r++)n[r]=e.endian(n[r]);return n},randomBytes:function(n){for(var r=[];n>0;n--)r.push(Math.floor(Math.random()*256));return r},bytesToWords:function(n){for(var r=[],s=0,c=0;s<n.length;s++,c+=8)r[c>>>5]|=n[s]<<24-c%32;return r},wordsToBytes:function(n){for(var r=[],s=0;s<n.length*32;s+=8)r.push(n[s>>>5]>>>24-s%32&255);return r},bytesToHex:function(n){for(var r=[],s=0;s<n.length;s++)r.push((n[s]>>>4).toString(16)),r.push((n[s]&15).toString(16));return r.join("")},hexToBytes:function(n){for(var r=[],s=0;s<n.length;s+=2)r.push(parseInt(n.substr(s,2),16));return r},bytesToBase64:function(n){for(var r=[],s=0;s<n.length;s+=3)for(var c=n[s]<<16|n[s+1]<<8|n[s+2],i=0;i<4;i++)s*8+i*6<=n.length*8?r.push(t.charAt(c>>>6*(3-i)&63)):r.push("=");return r.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var r=[],s=0,c=0;s<n.length;c=++s%4)c!=0&&r.push((t.indexOf(n.charAt(s-1))&Math.pow(2,-2*c+8)-1)<<c*2|t.indexOf(n.charAt(s))>>>6-c*2);return r}};hv.exports=e}()),hv.exports}var fv,dx;function hx(){if(dx)return fv;dx=1;var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],r=0;r<e.length;r++)n.push(e.charCodeAt(r)&255);return n},bytesToString:function(e){for(var n=[],r=0;r<e.length;r++)n.push(String.fromCharCode(e[r]));return n.join("")}}};return fv=t,fv}/*!
6672
6672
  * Determine if an object is a Buffer
6673
6673
  *
6674
6674
  * @author Feross Aboukhadijeh <https://feross.org>
6675
6675
  * @license MIT
6676
- */var pv,fx;function IW(){if(fx)return pv;fx=1,pv=function(n){return n!=null&&(t(n)||e(n)||!!n._isBuffer)};function t(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function e(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&t(n.slice(0,0))}return pv}var px;function RW(){return px||(px=1,function(){var t=AW(),e=hx().utf8,n=IW(),r=hx().bin,s=function(c,i){c.constructor==String?i&&i.encoding==="binary"?c=r.stringToBytes(c):c=e.stringToBytes(c):n(c)?c=Array.prototype.slice.call(c,0):!Array.isArray(c)&&c.constructor!==Uint8Array&&(c=c.toString());for(var o=t.bytesToWords(c),u=c.length*8,l=1732584193,a=-271733879,d=-1732584194,f=271733878,p=0;p<o.length;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360;o[u>>>5]|=128<<u%32,o[(u+64>>>9<<4)+14]=u;for(var v=s._ff,m=s._gg,b=s._hh,y=s._ii,p=0;p<o.length;p+=16){var _=l,S=a,C=d,x=f;l=v(l,a,d,f,o[p+0],7,-680876936),f=v(f,l,a,d,o[p+1],12,-389564586),d=v(d,f,l,a,o[p+2],17,606105819),a=v(a,d,f,l,o[p+3],22,-1044525330),l=v(l,a,d,f,o[p+4],7,-176418897),f=v(f,l,a,d,o[p+5],12,1200080426),d=v(d,f,l,a,o[p+6],17,-1473231341),a=v(a,d,f,l,o[p+7],22,-45705983),l=v(l,a,d,f,o[p+8],7,1770035416),f=v(f,l,a,d,o[p+9],12,-1958414417),d=v(d,f,l,a,o[p+10],17,-42063),a=v(a,d,f,l,o[p+11],22,-1990404162),l=v(l,a,d,f,o[p+12],7,1804603682),f=v(f,l,a,d,o[p+13],12,-40341101),d=v(d,f,l,a,o[p+14],17,-1502002290),a=v(a,d,f,l,o[p+15],22,1236535329),l=m(l,a,d,f,o[p+1],5,-165796510),f=m(f,l,a,d,o[p+6],9,-1069501632),d=m(d,f,l,a,o[p+11],14,643717713),a=m(a,d,f,l,o[p+0],20,-373897302),l=m(l,a,d,f,o[p+5],5,-701558691),f=m(f,l,a,d,o[p+10],9,38016083),d=m(d,f,l,a,o[p+15],14,-660478335),a=m(a,d,f,l,o[p+4],20,-405537848),l=m(l,a,d,f,o[p+9],5,568446438),f=m(f,l,a,d,o[p+14],9,-1019803690),d=m(d,f,l,a,o[p+3],14,-187363961),a=m(a,d,f,l,o[p+8],20,1163531501),l=m(l,a,d,f,o[p+13],5,-1444681467),f=m(f,l,a,d,o[p+2],9,-51403784),d=m(d,f,l,a,o[p+7],14,1735328473),a=m(a,d,f,l,o[p+12],20,-1926607734),l=b(l,a,d,f,o[p+5],4,-378558),f=b(f,l,a,d,o[p+8],11,-2022574463),d=b(d,f,l,a,o[p+11],16,1839030562),a=b(a,d,f,l,o[p+14],23,-35309556),l=b(l,a,d,f,o[p+1],4,-1530992060),f=b(f,l,a,d,o[p+4],11,1272893353),d=b(d,f,l,a,o[p+7],16,-155497632),a=b(a,d,f,l,o[p+10],23,-1094730640),l=b(l,a,d,f,o[p+13],4,681279174),f=b(f,l,a,d,o[p+0],11,-358537222),d=b(d,f,l,a,o[p+3],16,-722521979),a=b(a,d,f,l,o[p+6],23,76029189),l=b(l,a,d,f,o[p+9],4,-640364487),f=b(f,l,a,d,o[p+12],11,-421815835),d=b(d,f,l,a,o[p+15],16,530742520),a=b(a,d,f,l,o[p+2],23,-995338651),l=y(l,a,d,f,o[p+0],6,-198630844),f=y(f,l,a,d,o[p+7],10,1126891415),d=y(d,f,l,a,o[p+14],15,-1416354905),a=y(a,d,f,l,o[p+5],21,-57434055),l=y(l,a,d,f,o[p+12],6,1700485571),f=y(f,l,a,d,o[p+3],10,-1894986606),d=y(d,f,l,a,o[p+10],15,-1051523),a=y(a,d,f,l,o[p+1],21,-2054922799),l=y(l,a,d,f,o[p+8],6,1873313359),f=y(f,l,a,d,o[p+15],10,-30611744),d=y(d,f,l,a,o[p+6],15,-1560198380),a=y(a,d,f,l,o[p+13],21,1309151649),l=y(l,a,d,f,o[p+4],6,-145523070),f=y(f,l,a,d,o[p+11],10,-1120210379),d=y(d,f,l,a,o[p+2],15,718787259),a=y(a,d,f,l,o[p+9],21,-343485551),l=l+_>>>0,a=a+S>>>0,d=d+C>>>0,f=f+x>>>0}return t.endian([l,a,d,f])};s._ff=function(c,i,o,u,l,a,d){var f=c+(i&o|~i&u)+(l>>>0)+d;return(f<<a|f>>>32-a)+i},s._gg=function(c,i,o,u,l,a,d){var f=c+(i&u|o&~u)+(l>>>0)+d;return(f<<a|f>>>32-a)+i},s._hh=function(c,i,o,u,l,a,d){var f=c+(i^o^u)+(l>>>0)+d;return(f<<a|f>>>32-a)+i},s._ii=function(c,i,o,u,l,a,d){var f=c+(o^(i|~u))+(l>>>0)+d;return(f<<a|f>>>32-a)+i},s._blocksize=16,s._digestsize=16,dv.exports=function(c,i){if(c==null)throw new Error("Illegal argument "+c);var o=t.wordsToBytes(s(c,i));return i&&i.asBytes?o:i&&i.asString?r.bytesToString(o):t.bytesToHex(o)}}()),dv.exports}var NW=RW();const LW=Kc(NW),DW=(t=24)=>{const e=zh()||"unauthenticated";try{const r=OW(e).sub||"unauthenticated";return`https://www.gravatar.com/avatar/${LW(r.trim().toLowerCase())}?s=${t}&d=identicon`}catch{return"unauthenticated"}},MW=()=>J.jsxs(_W,{children:[J.jsx(wW,{asChild:!0,children:J.jsx("span",{children:J.jsxs(C6,{className:"inline-flex size-[24px] select-none items-center justify-center overflow-hidden rounded-full bg-blackA1 align-middle cursor-pointer",children:[J.jsx(E6,{className:"size-full rounded-[inherit] object-cover",src:DW()}),J.jsx(j6,{className:"leading-1 flex size-full items-center justify-center bg-white text-[15px] font-medium text-violet11",delayMs:600,children:J.jsx(jW,{})})]})})}),J.jsx(SW,{sideOffset:8,className:"z-50 min-w-[120px] rounded-md bg-white p-2 shadow-lg border border-gray-200",children:J.jsx(xW,{asChild:!0,children:J.jsx("a",{href:"/oidc/logout",className:"block w-full px-3 py-2 text-md text-gray-700 hover:bg-gray-100 rounded cursor-pointer",children:"Logout"})})})]}),PW=()=>{const{resetSession:t}=Xi();return J.jsxs(J.Fragment,{children:[J.jsx(Oc,{to:"/",onClick:t,children:J.jsxs(In,{className:"cursor-pointer",gap:"1",align:"center",children:[J.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:J.jsx("path",{d:"M7.5 0.875C7.77614 0.875 8 1.09886 8 1.375V7.5H14.125C14.4011 7.5 14.625 7.72386 14.625 8C14.625 8.27614 14.4011 8.5 14.125 8.5H8V14.625C8 14.9011 7.77614 15.125 7.5 15.125C7.22386 15.125 7 14.9011 7 14.625V8.5H0.875C0.598858 8.5 0.375 8.27614 0.375 8C0.375 7.72386 0.598858 7.5 0.875 7.5H7V1.375C7 1.09886 7.22386 0.875 7.5 0.875Z",fill:"currentColor"})}),J.jsx(tn,{children:"New Session"})]})}),J.jsx(Oc,{to:"/settings",children:J.jsxs(In,{className:"cursor-pointer",gap:"1",align:"center",children:[J.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:J.jsx("path",{d:"M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1887 4.92117C11.558 5.44798 11.8173 6.0575 11.9332 6.71638L13.5 7.07183V7.92897L11.9334 8.28444C11.8176 8.94342 11.5585 9.55301 11.1892 10.0798L12.0459 11.4394L11.4398 12.0455L10.0797 11.1889C9.55252 11.5583 8.94242 11.8176 8.28355 11.9334L7.92809 13.5002H7.07095L6.71543 11.9332C6.0569 11.8174 5.44772 11.5582 4.92116 11.189L3.56055 12.0455L2.95445 11.4394L3.81107 10.0794C3.4418 9.55266 3.18265 8.94307 3.06681 8.28395L1.50002 7.92897V7.07183L3.06697 6.71632C3.18305 6.05684 3.44247 5.44693 3.81203 4.91979L2.95424 3.56079L3.56034 2.9547L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.97496 7.50008C9.97496 8.86866 8.86863 9.97499 7.50005 9.97499C6.13146 9.97499 5.02513 8.86866 5.02513 7.50008C5.02513 6.13149 6.13146 5.02516 7.50005 5.02516C8.86863 5.02516 9.97496 6.13149 9.97496 7.50008Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),J.jsx(tn,{children:"Settings"})]})}),J.jsx(MW,{})]})};function dc({branding:t,left:e,middle:n,right:r}){return J.jsxs(bs,{className:"w-screen h-[95vh] max-w-[95%] mx-auto flex flex-col",children:[J.jsx(bs,{className:"w-full p-3 mb-1 border-b",children:J.jsxs(In,{align:"center",justify:"between",children:[J.jsx(Oc,{to:"/",children:J.jsxs(In,{align:"center",gap:"2",children:[J.jsx("img",{src:t.logo,className:"h-6 w-6"}),J.jsx(tn,{size:"5",weight:"bold",className:"text-black",children:t.name})]})}),J.jsx(In,{gap:"4",children:J.jsx(PW,{})})]})}),J.jsxs(In,{className:"w-full h-[95%] flex-1 gap-2",children:[J.jsx(bs,{className:"flex-2 flex flex-col h-full p-2 border-r border-gray-400",children:e??J.jsx("div",{})}),J.jsx(bs,{className:"flex-3 flex flex-col h-full p-2 border-r border-gray-400",children:n??J.jsx("div",{})}),J.jsx(bs,{className:"flex-1 flex flex-col h-full p-2",children:r??J.jsx("div",{})})]})]})}function $W({branding:t}){const{settings:e,runnerError:n}=es();return D.useEffect(()=>{if(!n)return;const r="/settings",s=window.location.pathname;if(s===r||s==="/login"||s==="/oidc/login")return;const c=e.requireAuth?"/oidc/login":"/login";if(!(n instanceof Error)&&!(n instanceof Event)){const o=n.code===Yv.UNAUTHENTICATED||n.code===Yv.PERMISSION_DENIED?c:r;window.location.href=o;return}window.location.href=r},[n,e.requireAuth]),J.jsx(t9,{children:J.jsxs(IO,{children:[J.jsx(Ta,{path:"/",element:J.jsx(dc,{branding:t,left:J.jsx(ex,{}),middle:J.jsx(h2,{}),right:J.jsx(ez,{})})}),J.jsx(Ta,{path:"/settings",element:J.jsx(dc,{branding:t,left:J.jsx(ex,{}),middle:J.jsx(h2,{}),right:J.jsx(iz,{})})}),J.jsx(Ta,{path:"/oidc/*",element:J.jsx(dc,{branding:t,middle:J.jsx("div",{children:"OIDC routes are exclusively handled by the server."})})}),J.jsx(Ta,{path:"/login",element:J.jsx(dc,{branding:t,left:J.jsx(rz,{})})}),J.jsx(Ta,{path:"*",element:J.jsx(dc,{branding:t,left:J.jsx(sz,{})})})]})})}function BW({branding:t,initialState:e={}}){return J.jsxs(J.Fragment,{children:[J.jsx("title",{children:t.name}),J.jsx("meta",{name:"description",content:"An AI Assistant For Your Cloud"}),J.jsx("link",{rel:"icon",href:t.logo}),J.jsx(lE,{accentColor:"gray",scaling:"100%",radius:"small",children:J.jsx(lP,{requireAuth:e==null?void 0:e.requireAuth,webApp:e==null?void 0:e.webApp,children:J.jsx(uP,{children:J.jsx(fP,{children:J.jsx($W,{branding:t})})})})})]})}const UW="data:image/svg+xml,%3csvg%20width='4323'%20height='3982'%20viewBox='0%200%204323%203982'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M410%2070H3913C4100.78%2070%204253%20222.223%204253%20410V3571.71C4253%203759.49%204100.78%203911.71%203913%203911.71H410C222.223%203911.71%2070%203759.49%2070%203571.71V410C70%20222.223%20222.223%2070%20410%2070Z'%20fill='%235B3ADF'%20stroke='%235B3ADF'%20stroke-width='140'/%3e%3cpath%20d='M3008.16%201861.6C3108.62%201919.34%203108.47%202064.32%203007.89%202121.85L1469.08%203002.07C1369.02%203059.31%201244.48%202986.99%201244.6%202871.71L1246.43%201108.08C1246.55%20992.806%201371.24%20920.742%201471.18%20978.185L3008.16%201861.6Z'%20fill='white'/%3e%3c/svg%3e",FW=window.__INITIAL_STATE__||{};F4.createRoot(document.getElementById("root")).render(J.jsx(BW,{branding:{name:"Runme Assistant",logo:UW},initialState:FW}));
6676
+ */var pv,fx;function IW(){if(fx)return pv;fx=1,pv=function(n){return n!=null&&(t(n)||e(n)||!!n._isBuffer)};function t(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function e(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&t(n.slice(0,0))}return pv}var px;function RW(){return px||(px=1,function(){var t=AW(),e=hx().utf8,n=IW(),r=hx().bin,s=function(c,i){c.constructor==String?i&&i.encoding==="binary"?c=r.stringToBytes(c):c=e.stringToBytes(c):n(c)?c=Array.prototype.slice.call(c,0):!Array.isArray(c)&&c.constructor!==Uint8Array&&(c=c.toString());for(var o=t.bytesToWords(c),u=c.length*8,l=1732584193,a=-271733879,d=-1732584194,f=271733878,p=0;p<o.length;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360;o[u>>>5]|=128<<u%32,o[(u+64>>>9<<4)+14]=u;for(var v=s._ff,m=s._gg,b=s._hh,y=s._ii,p=0;p<o.length;p+=16){var _=l,S=a,C=d,x=f;l=v(l,a,d,f,o[p+0],7,-680876936),f=v(f,l,a,d,o[p+1],12,-389564586),d=v(d,f,l,a,o[p+2],17,606105819),a=v(a,d,f,l,o[p+3],22,-1044525330),l=v(l,a,d,f,o[p+4],7,-176418897),f=v(f,l,a,d,o[p+5],12,1200080426),d=v(d,f,l,a,o[p+6],17,-1473231341),a=v(a,d,f,l,o[p+7],22,-45705983),l=v(l,a,d,f,o[p+8],7,1770035416),f=v(f,l,a,d,o[p+9],12,-1958414417),d=v(d,f,l,a,o[p+10],17,-42063),a=v(a,d,f,l,o[p+11],22,-1990404162),l=v(l,a,d,f,o[p+12],7,1804603682),f=v(f,l,a,d,o[p+13],12,-40341101),d=v(d,f,l,a,o[p+14],17,-1502002290),a=v(a,d,f,l,o[p+15],22,1236535329),l=m(l,a,d,f,o[p+1],5,-165796510),f=m(f,l,a,d,o[p+6],9,-1069501632),d=m(d,f,l,a,o[p+11],14,643717713),a=m(a,d,f,l,o[p+0],20,-373897302),l=m(l,a,d,f,o[p+5],5,-701558691),f=m(f,l,a,d,o[p+10],9,38016083),d=m(d,f,l,a,o[p+15],14,-660478335),a=m(a,d,f,l,o[p+4],20,-405537848),l=m(l,a,d,f,o[p+9],5,568446438),f=m(f,l,a,d,o[p+14],9,-1019803690),d=m(d,f,l,a,o[p+3],14,-187363961),a=m(a,d,f,l,o[p+8],20,1163531501),l=m(l,a,d,f,o[p+13],5,-1444681467),f=m(f,l,a,d,o[p+2],9,-51403784),d=m(d,f,l,a,o[p+7],14,1735328473),a=m(a,d,f,l,o[p+12],20,-1926607734),l=b(l,a,d,f,o[p+5],4,-378558),f=b(f,l,a,d,o[p+8],11,-2022574463),d=b(d,f,l,a,o[p+11],16,1839030562),a=b(a,d,f,l,o[p+14],23,-35309556),l=b(l,a,d,f,o[p+1],4,-1530992060),f=b(f,l,a,d,o[p+4],11,1272893353),d=b(d,f,l,a,o[p+7],16,-155497632),a=b(a,d,f,l,o[p+10],23,-1094730640),l=b(l,a,d,f,o[p+13],4,681279174),f=b(f,l,a,d,o[p+0],11,-358537222),d=b(d,f,l,a,o[p+3],16,-722521979),a=b(a,d,f,l,o[p+6],23,76029189),l=b(l,a,d,f,o[p+9],4,-640364487),f=b(f,l,a,d,o[p+12],11,-421815835),d=b(d,f,l,a,o[p+15],16,530742520),a=b(a,d,f,l,o[p+2],23,-995338651),l=y(l,a,d,f,o[p+0],6,-198630844),f=y(f,l,a,d,o[p+7],10,1126891415),d=y(d,f,l,a,o[p+14],15,-1416354905),a=y(a,d,f,l,o[p+5],21,-57434055),l=y(l,a,d,f,o[p+12],6,1700485571),f=y(f,l,a,d,o[p+3],10,-1894986606),d=y(d,f,l,a,o[p+10],15,-1051523),a=y(a,d,f,l,o[p+1],21,-2054922799),l=y(l,a,d,f,o[p+8],6,1873313359),f=y(f,l,a,d,o[p+15],10,-30611744),d=y(d,f,l,a,o[p+6],15,-1560198380),a=y(a,d,f,l,o[p+13],21,1309151649),l=y(l,a,d,f,o[p+4],6,-145523070),f=y(f,l,a,d,o[p+11],10,-1120210379),d=y(d,f,l,a,o[p+2],15,718787259),a=y(a,d,f,l,o[p+9],21,-343485551),l=l+_>>>0,a=a+S>>>0,d=d+C>>>0,f=f+x>>>0}return t.endian([l,a,d,f])};s._ff=function(c,i,o,u,l,a,d){var f=c+(i&o|~i&u)+(l>>>0)+d;return(f<<a|f>>>32-a)+i},s._gg=function(c,i,o,u,l,a,d){var f=c+(i&u|o&~u)+(l>>>0)+d;return(f<<a|f>>>32-a)+i},s._hh=function(c,i,o,u,l,a,d){var f=c+(i^o^u)+(l>>>0)+d;return(f<<a|f>>>32-a)+i},s._ii=function(c,i,o,u,l,a,d){var f=c+(o^(i|~u))+(l>>>0)+d;return(f<<a|f>>>32-a)+i},s._blocksize=16,s._digestsize=16,dv.exports=function(c,i){if(c==null)throw new Error("Illegal argument "+c);var o=t.wordsToBytes(s(c,i));return i&&i.asBytes?o:i&&i.asString?r.bytesToString(o):t.bytesToHex(o)}}()),dv.exports}var NW=RW();const LW=Kc(NW),DW=(t=24)=>{const e=zh()||"unauthenticated";try{const r=OW(e).sub||"unauthenticated";return`https://www.gravatar.com/avatar/${LW(r.trim().toLowerCase())}?s=${t}&d=identicon`}catch{return"unauthenticated"}},MW=()=>J.jsxs(_W,{children:[J.jsx(wW,{asChild:!0,children:J.jsx("span",{children:J.jsxs(C6,{className:"inline-flex size-[24px] select-none items-center justify-center overflow-hidden rounded-full bg-blackA1 align-middle cursor-pointer",children:[J.jsx(E6,{className:"size-full rounded-[inherit] object-cover",src:DW()}),J.jsx(j6,{className:"leading-1 flex size-full items-center justify-center bg-white text-[15px] font-medium text-violet11",delayMs:600,children:J.jsx(jW,{})})]})})}),J.jsx(SW,{sideOffset:8,className:"z-50 min-w-[120px] rounded-md bg-white p-2 shadow-lg border border-gray-200",children:J.jsx(xW,{asChild:!0,children:J.jsx("a",{href:"/oidc/logout",className:"block w-full px-3 py-2 text-md text-gray-700 hover:bg-gray-100 rounded cursor-pointer",children:"Logout"})})})]}),PW=()=>{const{resetSession:t}=Xi();return J.jsxs(J.Fragment,{children:[J.jsx(Oc,{to:"/",onClick:t,children:J.jsxs(In,{className:"cursor-pointer",gap:"1",align:"center",children:[J.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:J.jsx("path",{d:"M7.5 0.875C7.77614 0.875 8 1.09886 8 1.375V7.5H14.125C14.4011 7.5 14.625 7.72386 14.625 8C14.625 8.27614 14.4011 8.5 14.125 8.5H8V14.625C8 14.9011 7.77614 15.125 7.5 15.125C7.22386 15.125 7 14.9011 7 14.625V8.5H0.875C0.598858 8.5 0.375 8.27614 0.375 8C0.375 7.72386 0.598858 7.5 0.875 7.5H7V1.375C7 1.09886 7.22386 0.875 7.5 0.875Z",fill:"currentColor"})}),J.jsx(tn,{children:"New Session"})]})}),J.jsx(Oc,{to:"/settings",children:J.jsxs(In,{className:"cursor-pointer",gap:"1",align:"center",children:[J.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:J.jsx("path",{d:"M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1887 4.92117C11.558 5.44798 11.8173 6.0575 11.9332 6.71638L13.5 7.07183V7.92897L11.9334 8.28444C11.8176 8.94342 11.5585 9.55301 11.1892 10.0798L12.0459 11.4394L11.4398 12.0455L10.0797 11.1889C9.55252 11.5583 8.94242 11.8176 8.28355 11.9334L7.92809 13.5002H7.07095L6.71543 11.9332C6.0569 11.8174 5.44772 11.5582 4.92116 11.189L3.56055 12.0455L2.95445 11.4394L3.81107 10.0794C3.4418 9.55266 3.18265 8.94307 3.06681 8.28395L1.50002 7.92897V7.07183L3.06697 6.71632C3.18305 6.05684 3.44247 5.44693 3.81203 4.91979L2.95424 3.56079L3.56034 2.9547L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.97496 7.50008C9.97496 8.86866 8.86863 9.97499 7.50005 9.97499C6.13146 9.97499 5.02513 8.86866 5.02513 7.50008C5.02513 6.13149 6.13146 5.02516 7.50005 5.02516C8.86863 5.02516 9.97496 6.13149 9.97496 7.50008Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}),J.jsx(tn,{children:"Settings"})]})}),J.jsx(MW,{})]})};function dc({branding:t,left:e,middle:n,right:r}){return J.jsxs(bs,{className:"w-screen h-[95vh] max-w-[95%] mx-auto flex flex-col",children:[J.jsx(bs,{className:"w-full p-3 mb-1 border-b",children:J.jsxs(In,{align:"center",justify:"between",children:[J.jsx(Oc,{to:"/",children:J.jsxs(In,{align:"center",gap:"2",children:[J.jsx("img",{src:t.logo,className:"h-6 w-6"}),J.jsx(tn,{size:"5",weight:"bold",className:"text-black",children:t.name})]})}),J.jsx(In,{gap:"4",children:J.jsx(PW,{})})]})}),J.jsxs(In,{className:"w-full h-[95%] flex-1 gap-2",children:[J.jsx(bs,{className:"flex-none w-[33.33%] flex flex-col h-full p-2 border-r border-gray-400",children:e??J.jsx("div",{})}),J.jsx(bs,{className:"flex-none w-[50.00%] flex flex-col h-full p-2 border-r border-gray-400",children:n??J.jsx("div",{})}),J.jsx(bs,{className:"flex-none w-[16.67%] flex flex-col h-full p-2",children:r??J.jsx("div",{})})]})]})}function $W({branding:t}){const{settings:e,runnerError:n}=es();return D.useEffect(()=>{if(!n)return;const r="/settings",s=window.location.pathname;if(s===r||s==="/login"||s==="/oidc/login")return;const c=e.requireAuth?"/oidc/login":"/login";if(!(n instanceof Error)&&!(n instanceof Event)){const o=n.code===Yv.UNAUTHENTICATED||n.code===Yv.PERMISSION_DENIED?c:r;window.location.href=o;return}window.location.href=r},[n,e.requireAuth]),J.jsx(t9,{children:J.jsxs(IO,{children:[J.jsx(Ta,{path:"/",element:J.jsx(dc,{branding:t,left:J.jsx(ex,{}),middle:J.jsx(h2,{}),right:J.jsx(ez,{})})}),J.jsx(Ta,{path:"/settings",element:J.jsx(dc,{branding:t,left:J.jsx(ex,{}),middle:J.jsx(h2,{}),right:J.jsx(iz,{})})}),J.jsx(Ta,{path:"/oidc/*",element:J.jsx(dc,{branding:t,middle:J.jsx("div",{children:"OIDC routes are exclusively handled by the server."})})}),J.jsx(Ta,{path:"/login",element:J.jsx(dc,{branding:t,left:J.jsx(rz,{})})}),J.jsx(Ta,{path:"*",element:J.jsx(dc,{branding:t,left:J.jsx(sz,{})})})]})})}function BW({branding:t,initialState:e={}}){return J.jsxs(J.Fragment,{children:[J.jsx("title",{children:t.name}),J.jsx("meta",{name:"description",content:"An AI Assistant For Your Cloud"}),J.jsx("link",{rel:"icon",href:t.logo}),J.jsx(lE,{accentColor:"gray",scaling:"100%",radius:"small",children:J.jsx(lP,{requireAuth:e==null?void 0:e.requireAuth,webApp:e==null?void 0:e.webApp,children:J.jsx(uP,{children:J.jsx(fP,{children:J.jsx($W,{branding:t})})})})})]})}const UW="data:image/svg+xml,%3csvg%20width='4323'%20height='3982'%20viewBox='0%200%204323%203982'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M410%2070H3913C4100.78%2070%204253%20222.223%204253%20410V3571.71C4253%203759.49%204100.78%203911.71%203913%203911.71H410C222.223%203911.71%2070%203759.49%2070%203571.71V410C70%20222.223%20222.223%2070%20410%2070Z'%20fill='%235B3ADF'%20stroke='%235B3ADF'%20stroke-width='140'/%3e%3cpath%20d='M3008.16%201861.6C3108.62%201919.34%203108.47%202064.32%203007.89%202121.85L1469.08%203002.07C1369.02%203059.31%201244.48%202986.99%201244.6%202871.71L1246.43%201108.08C1246.55%20992.806%201371.24%20920.742%201471.18%20978.185L3008.16%201861.6Z'%20fill='white'/%3e%3c/svg%3e",FW=window.__INITIAL_STATE__||{};F4.createRoot(document.getElementById("root")).render(J.jsx(BW,{branding:{name:"Runme Assistant",logo:UW},initialState:FW}));
@@ -1 +1 @@
1
- {"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Chat.tsx"],"names":[],"mappings":"AA8QA,iBAAS,IAAI,4CAiDZ;AAED,eAAe,IAAI,CAAA"}
1
+ {"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/Chat.tsx"],"names":[],"mappings":"AA+QA,iBAAS,IAAI,4CAiDZ;AAED,eAAe,IAAI,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAEnC,iBAAS,MAAM,CAAC,EACd,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,WAAW,CAAA;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB,2CAuCA;AAED,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAGnC,iBAAS,MAAM,CAAC,EACd,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,WAAW,CAAA;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACxB,2CAuCA;AAED,eAAe,MAAM,CAAA"}