(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,57100,e=>{"use strict";e.s(["composeRefs",()=>r,"useComposedRefs",()=>o]);var t=e.i(65765);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function r(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return e=>{let r=!1,o=t.map(t=>{let o=n(t,e);return r||"function"!=typeof o||(r=!0),o});if(r)return()=>{for(let e=0;e<o.length;e++){let r=o[e];"function"==typeof r?r():n(t[e],null)}}}}function o(){for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.useCallback(r(...n),n)}},92371,e=>{"use strict";e.s(["Textarea",()=>r]);var t=e.i(59992),n=e.i(96745);function r(e){let{className:r,...o}=e;return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,n.cn)("flex min-h-20 w-full rounded-md border border-solid border-border bg-transparent px-3 py-2 text-base outline-none transition-[color,box-shadow,border-color] duration-150 ease-in-out placeholder:text-muted-foreground hover:border-[var(--ds-color-border-hover)] focus-visible:border-[var(--border-focus)] focus-visible:[box-shadow:var(--ring-focus-sm)] read-only:focus-visible:border-border read-only:focus-visible:[box-shadow:none] disabled:cursor-not-allowed disabled:opacity-50 disabled:focus-visible:border-border disabled:focus-visible:[box-shadow:none]",r),...o})}},49091,35182,e=>{"use strict";function t(e){let t=null==e?"":String(e);return""===t?'""':/[\s#"'\\\n]/.test(t)||t!==t.trim()?'"'.concat(t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t}function n(e){let t=String(e).split(/\r?\n/),n={},r=/^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/;for(let e=0;e<t.length;e++){let o=t[e],l=r.exec(o);l&&(n[l[1]]=function(e){let t=e.trimEnd();return t.length>=2&&'"'===t[0]&&'"'===t[t.length-1]?t.slice(1,-1).replace(/\\(.)/g,(e,t)=>"n"===t?"\n":'"'===t?'"':"\\"===t?"\\":"\\".concat(t)):t.length>=2&&"'"===t[0]&&"'"===t[t.length-1]?t.slice(1,-1):e}(l[2]))}return n}function r(e,n){let r=Array.isArray(e)?e:[],o=new Set;for(let e=0;e<r.length;e++){let t=r[e];t&&"object"==typeof t&&"string"==typeof t.key&&o.add(t.key)}let l=[];for(let e=0;e<r.length;e++){let o=r[e];if(!o||"object"!=typeof o||"string"!=typeof o.key)continue;let s=o.key;if(!Object.prototype.hasOwnProperty.call(n,s))continue;let i=n[s];null!=i&&""!==String(i).trim()&&l.push("".concat(s,"=").concat(t(String(i))))}let s=Object.keys(n).filter(e=>!o.has(e)).sort();for(let e=0;e<s.length;e++){let r=s[e],o=n[r];null!=o&&""!==String(o).trim()&&l.push("".concat(r,"=").concat(t(String(o))))}let i=l.join("\n");return i.length>0?"".concat(i,"\n"):""}e.s(["buildEnvFileContentFromForm",()=>r,"parseEnvContentToMap",()=>n],49091),e.s(["loadDemoSingleMessage",()=>c,"loadSystemEnv",()=>s,"saveSystemEnv",()=>i,"saveSystemMcpJson",()=>a],35182);var o=e.i(61293),l=e.i(10602);async function s(e,t,n){return(0,o.get)((0,l.buildSystemEnvApiUrl)(e,t,n))}async function i(e,t,n,r){await (0,o.patch)((0,l.buildSystemEnvApiUrl)(e,t,n),{content:r})}async function a(e,t,n,r){await (0,o.patch)((0,l.buildSystemMcpJsonApiUrl)(e,t,n),{content:r})}async function c(){return(0,o.get)("/api/demo/single-message")}},29716,e=>{"use strict";e.s(["LLM_MODEL_KEY",()=>t,"LLM_PROVIDER_ID_KEY",()=>n,"PERMISSION_MODE_EMPTY_SENTINEL",()=>i,"WS_ALLOW_TOOL_ASK_ALLOWED",()=>s,"WS_ALLOW_TOOL_ASK_KEY",()=>o,"WS_PERMISSION_MODE_ALLOWED",()=>l,"WS_PERMISSION_MODE_KEY",()=>r]);let t="LLM_MODEL",n="LLM_PROVIDER_ID",r="WS_PERMISSION_MODE",o="WS_ALLOW_TOOL_ASK",l=["acceptEdits","plan","default","dontAsk","bypassPermissions"],s=new Set(["0","1"]),i="__empty__"},71331,e=>{e.v("/app/_next/static/media/upload-file.88541e18.png")}]);