(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,572677,e=>{"use strict";var t=e.i(16043);let r=t.forwardRef(function({title:e,titleId:r,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))});e.s(["f",0,r],572677)},531397,e=>{"use strict";var t=e.i(16043);let r=t.forwardRef(function({title:e,titleId:r,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))});e.s(["f",0,r],531397)},915663,e=>{"use strict";var t=e.i(16043);let r=t.forwardRef(function({title:e,titleId:r,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"}))});e.s(["f",0,r],915663)},485741,e=>{"use strict";var t=e.i(16043);let r=t.forwardRef(function({title:e,titleId:r,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"}))});e.s(["f",0,r],485741)},194215,e=>{"use strict";var t=e.i(16043);let r=t.forwardRef(function({title:e,titleId:r,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))});e.s(["f",0,r],194215)},828342,e=>{"use strict";function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function r(e){for(var r=1;re(r(r({},t),n)),n;function n(e,...r){let i="string"==typeof e?[e]:e.raw,{alignValues:l=!1,escapeSpecialCharacters:a=Array.isArray(e),trimWhitespace:o=!0}=t,s="";for(let e=0;e" "===t[0]||" "===t[0]?t.slice(e):t).join("\n")}return o&&(s=s.trim()),a&&(s=s.replace(/\\n/g,"\n").replace(/\\t/g," ").replace(/\\r/g,"\r").replace(/\\v/g,"\v").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\0/g,"\0").replace(/\\x([\da-fA-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16))).replace(/\\u\{([\da-fA-F]{1,6})\}/g,(e,t)=>String.fromCodePoint(parseInt(t,16))).replace(/\\u([\da-fA-F]{4})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))),"u">typeof Bun&&(s=s.replace(/\\u(?:\{([\da-fA-F]{1,6})\}|([\da-fA-F]{4}))/g,(e,t,r)=>{var n;return String.fromCodePoint(parseInt(null!=(n=null!=t?t:r)?n:"",16))})),s}}({});e.s(["f",0,n])},694913,864226,e=>{"use strict";var t=e.i(126435),r=e.i(403908);let n=/[#.]/g;var i=e.i(301800),l=e.i(773601),a=e.i(237925);function o(e,t,l){let o=l?function(e){let t=new Map;for(let r of e)t.set(r.toLowerCase(),r);return t}(l):void 0;return function(l,c,...d){let u;if(null==l)u={type:"root",children:[]},d.unshift(c);else{let f=(u=function(e,t){let r,i,l=e||"",a={},o=0;for(;o{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(207298),i=e.i(961160),l=e.i(429332),a=e.i(96659),o=e.i(16043),s=e.i(85194),c=e.i(136562),d=e.i(913743),u=e.i(18914),f=e.i(19532),m=e.i(551280),h=e.i(758427),p=e.i(468149);let g="data-message-chrome",b={[g]:""},x=`[${g}]`;e.s(["Y",0,x,"q",0,b],412217);let y=/^ {0,3}(`{3,}|~{3,})/,v=/^ {0,3}<[a-zA-Z/!?]/,w=/^ {0,3}\[[^\]]+\]:/,j=/^#{1,6}(\s|$)/,k=/^(`{3,}|~{3,})/,N=/^(\s|[-*+]\s|\d{1,9}[.)]\s|>|\||<|\[|---|\*\*\*|___)/;function A(e,t){let r=y.exec(e);if(!r)return t;let n=r[1];return null===t?{marker:n[0],length:n.length}:n[0]===t.marker&&n.length>=t.length&&e.trim()===n?null:t}let C=(0,l.default)(()=>e.A(747765).then(e=>e.ChatroomMathMarkdown),{loadableGenerated:{modules:[817481]}}),_="pointer-events-none sticky top-12 z-10 h-0",S="pointer-events-auto absolute right-2 top-2 flex items-center",E="mt-6 mb-4 text-foreground",L=e=>{let n,i,l=(0,r.c)(3),{children:a}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,c.f)(E,"border-b border-border pb-1 text-2xl font-bold"),l[0]=n):n=l[0],l[1]!==a?(i=(0,t.jsx)("h1",{className:n,children:a}),l[1]=a,l[2]=i):i=l[2],i},F=e=>{let n,i,l=(0,r.c)(3),{children:a}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,c.f)(E,"text-2xl font-bold"),l[0]=n):n=l[0],l[1]!==a?(i=(0,t.jsx)("h2",{className:n,children:a}),l[1]=a,l[2]=i):i=l[2],i},B=e=>{let n,i,l=(0,r.c)(3),{children:a}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,c.f)(E,"text-base font-medium"),l[0]=n):n=l[0],l[1]!==a?(i=(0,t.jsx)("h3",{className:n,children:a}),l[1]=a,l[2]=i):i=l[2],i},D=e=>{let n,i,l=(0,r.c)(3),{children:a}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,c.f)(E,"text-base font-medium"),l[0]=n):n=l[0],l[1]!==a?(i=(0,t.jsx)("h4",{className:n,children:a}),l[1]=a,l[2]=i):i=l[2],i},O=e=>{let n,i,l=(0,r.c)(3),{children:a}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,c.f)(E,"text-base font-medium"),l[0]=n):n=l[0],l[1]!==a?(i=(0,t.jsx)("h5",{className:n,children:a}),l[1]=a,l[2]=i):i=l[2],i},T=e=>{let n,i,l=(0,r.c)(3),{children:a}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,c.f)(E,"text-sm font-medium"),l[0]=n):n=l[0],l[1]!==a?(i=(0,t.jsx)("h6",{className:n,children:a}),l[1]=a,l[2]=i):i=l[2],i},$=e=>{let n,i=(0,r.c)(2),{children:l}=e;return i[0]!==l?(n=(0,t.jsx)("blockquote",{className:"mb-4 border-l-2 border-border pl-4 italic",children:l}),i[0]=l,i[1]=n):n=i[1],n},I=e=>{let n,i=(0,r.c)(2),{children:l}=e;return i[0]!==l?(n=(0,t.jsx)("p",{className:"mb-4 break-words text-sm font-normal leading-7",children:l}),i[0]=l,i[1]=n):n=i[1],n},M=e=>{let n,i=(0,r.c)(2),{children:l}=e;return i[0]!==l?(n=(0,t.jsx)("div",{className:"markdown-table my-6 overflow-x-auto rounded-lg border border-border bg-card text-foreground",children:(0,t.jsx)("table",{className:"w-full border-collapse",children:l})}),i[0]=l,i[1]=n):n=i[1],n},R=e=>{let n,i=(0,r.c)(2),{children:l}=e;return i[0]!==l?(n=(0,t.jsx)("thead",{className:"whitespace-nowrap border-b border-border text-foreground",children:l}),i[0]=l,i[1]=n):n=i[1],n},z=e=>{let n,i=(0,r.c)(2),{children:l}=e;return i[0]!==l?(n=(0,t.jsx)("tbody",{children:l}),i[0]=l,i[1]=n):n=i[1],n},P=e=>{let n,i=(0,r.c)(2),{children:l}=e;return i[0]!==l?(n=(0,t.jsx)("tr",{className:"border-b border-border last:border-b-0",children:l}),i[0]=l,i[1]=n):n=i[1],n},U=e=>{let n,i=(0,r.c)(2),{children:l}=e;return i[0]!==l?(n=(0,t.jsx)("th",{className:"border-r border-border p-3 text-left font-medium last:border-r-0",children:l}),i[0]=l,i[1]=n):n=i[1],n},H=e=>{let n,i=(0,r.c)(2),{children:l}=e;return i[0]!==l?(n=(0,t.jsx)("td",{className:"border-r border-border p-3 text-left last:border-r-0",children:l}),i[0]=l,i[1]=n):n=i[1],n},W=e=>{let n,i,l=(0,r.c)(4);if(l[0]!==e){let{node:t,...r}=e;n=r,l[0]=e,l[1]=n}else n=l[1];return l[2]!==n?(i=(0,t.jsx)("ul",{...n,className:"list-disc pl-8"}),l[2]=n,l[3]=i):i=l[3],i},Z=e=>{let n,i,l=(0,r.c)(4);if(l[0]!==e){let{node:t,...r}=e;n=r,l[0]=e,l[1]=n}else n=l[1];return l[2]!==n?(i=(0,t.jsx)("ol",{...n,className:"list-decimal pl-8"}),l[2]=n,l[3]=i):i=l[3],i},V=e=>{let n,i=(0,r.c)(2),{children:l}=e;return i[0]!==l?(n=(0,t.jsx)("li",{className:"mt-1.5",children:l}),i[0]=l,i[1]=n):n=i[1],n},q=()=>{let e,n=(0,r.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("hr",{className:"my-6 border-t border-border"}),n[0]=e):e=n[0],e},G=e=>{let n,i=(0,r.c)(3),{src:l,alt:o}=e;if("string"!=typeof l||!l)return null;let s=o??"";return i[0]!==l||i[1]!==s?(n=(0,t.jsx)(a.default,{src:l,alt:s,width:0,height:0,sizes:"100vw",className:"w-full h-auto max-w-full rounded-lg",unoptimized:!0}),i[0]=l,i[1]=s,i[2]=n):n=i[2],n},X="opacity-0 transition-opacity duration-100 group-hover/codeblock:opacity-100",Y="inline-flex rounded-md bg-popover",Q=e=>{let n,i,l=(0,r.c)(3),{text:a}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,c.f)(Y,X),l[0]=n):n=l[0],l[1]!==a?(i=(0,t.jsx)("span",{className:n,children:(0,t.jsx)(h.f,{text:a,hideCopyText:!0,className:"hover:bg-card-hover",size:"sm",variant:"ghost"})}),l[1]=a,l[2]=i):i=l[2],i},K=e=>{let n,l,a,s,f,m,h=(0,r.c)(30),{children:p}=e,{resolvedTheme:g}=(0,i.i)();if(h[0]!==p){let e,{className:t,children:r}=o.default.Children.toArray(p)[0].props;n=r,h[3]===Symbol.for("react.memo_cache_sentinel")?(e=/language-(\w+)/,h[3]=e):e=h[3],l=e.exec(t||""),h[0]=p,h[1]=n,h[2]=l}else n=h[1],l=h[2];let x=l,y=x?x[1]:null;if(y){let e,r,i,l,a,o,s,f="dark"===g?u.N:u.L,m=String(n);h[4]!==m?(e=m.trimEnd(),h[4]=m,h[5]=e):e=h[5];let p=e;return h[6]===Symbol.for("react.memo_cache_sentinel")?(r=(0,c.f)(Y,"h-8 select-none items-center px-1.5 text-xs leading-none text-muted-foreground",X),h[6]=r):r=h[6],h[7]!==y?(i=(0,t.jsx)("span",{className:r,children:y}),h[7]=y,h[8]=i):i=h[8],h[9]!==p?(l=(0,t.jsx)(Q,{text:p}),h[9]=p,h[10]=l):l=h[10],h[11]!==i||h[12]!==l?(a=(0,t.jsx)("div",{className:_,...b,children:(0,t.jsxs)("div",{className:S,children:[i,l]})}),h[11]=i,h[12]=l,h[13]=a):a=h[13],h[14]!==p||h[15]!==y||h[16]!==f?(o=(0,t.jsx)(d.f,{code:p,lang:y,theme:f}),h[14]=p,h[15]=y,h[16]=f,h[17]=o):o=h[17],h[18]!==a||h[19]!==o?(s=(0,t.jsxs)("div",{className:"relative group/codeblock mb-4",children:[a,o]}),h[18]=a,h[19]=o,h[20]=s):s=h[20],s}let v=String(n);h[21]!==v?(a=v.trimEnd(),h[21]=v,h[22]=a):a=h[22];let w=a;return h[23]!==w?(s=(0,t.jsx)("div",{className:_,...b,children:(0,t.jsx)("div",{className:S,children:(0,t.jsx)(Q,{text:w})})}),h[23]=w,h[24]=s):s=h[24],h[25]!==w?(f=(0,t.jsx)("pre",{className:"overflow-x-auto rounded-lg border border-border bg-card p-4",children:(0,t.jsx)("code",{className:"bg-transparent font-mono text-sm text-foreground",children:w})}),h[25]=w,h[26]=f):f=h[26],h[27]!==s||h[28]!==f?(m=(0,t.jsxs)("div",{className:"relative group/codeblock mb-4",children:[s,f]}),h[27]=s,h[28]=f,h[29]=m):m=h[29],m},J=(0,n.f)((0,c.f)("rounded-md bg-card-hover px-1.5 py-0.5 font-mono text-sm leading-6 break-words","[.markdown-table_td_&]:break-normal [.markdown-table_td_&]:whitespace-pre","[.markdown-table_th_&]:break-normal [.markdown-table_th_&]:whitespace-pre"),{variants:{variant:{classic:"text-foreground",subtle:"border border-border text-foreground"}},defaultVariants:{variant:"classic"}}),ee=(0,n.f)((0,c.f)("min-w-0 w-full","[&>ol]:mb-4 [&>ul]:mb-4","[&>*:last-child]:mb-0","[&_li>p]:mb-0"),{variants:{variant:{classic:"",subtle:"[&_h1]:text-2xl [&_h2]:text-xl"}},defaultVariants:{variant:"classic"}}),et=e=>{let n,i=(0,r.c)(2),{children:l}=e;return i[0]!==l?(n=(0,t.jsx)("strong",{className:"font-medium",children:l}),i[0]=l,i[1]=n):n=i[1],n},er=e=>{let n,i,l,a=(0,r.c)(6);return a[0]!==e?({children:n,...i}=e,a[0]=e,a[1]=n,a[2]=i):(n=a[1],i=a[2]),a[3]!==n||a[4]!==i?(l=(0,t.jsx)("details",{...i,className:"group/details mb-4 overflow-hidden rounded-lg border border-border bg-card px-4 text-foreground open:pb-3",children:n}),a[3]=n,a[4]=i,a[5]=l):l=a[5],l},en=e=>{let n,i,l,a,o=(0,r.c)(7);return o[0]!==e?({children:n,...i}=e,o[0]=e,o[1]=n,o[2]=i):(n=o[1],i=o[2]),o[3]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("span",{"aria-hidden":!0,className:"text-xs transition-transform duration-200 group-open/details:rotate-90",children:"▶"}),o[3]=l):l=o[3],o[4]!==n||o[5]!==i?(a=(0,t.jsxs)("summary",{...i,className:"-mx-4 flex cursor-pointer list-none select-none items-center gap-2 px-4 py-3 font-medium text-foreground transition-colors hover:bg-card-hover [&::-webkit-details-marker]:hidden",children:[l,n]}),o[4]=n,o[5]=i,o[6]=a):a=o[6],a},ei=[],el=(0,o.memo)(e=>{let n,i=(0,r.c)(5),{markdown:l,components:a,rehypePlugins:o,disallowedElements:c}=e;return i[0]!==a||i[1]!==c||i[2]!==l||i[3]!==o?(n=(0,t.jsx)(s.f,{remarkPlugins:p.z,rehypePlugins:o,disallowedElements:c,components:a,children:l}),i[0]=a,i[1]=c,i[2]=l,i[3]=o,i[4]=n):n=i[4],n});e.s(["f",0,e=>{let n,i,l,a,s,d,u,h,g,b,x=(0,r.c)(37),{children:y,className:_,linkClassName:S,disableLink:E,shouldRenderRawHtml:X,disallowedElements:Y,codeVariant:Q,isStreaming:ea}=e,eo=void 0===y?"":y,es=void 0===_?"":_,ec=void 0===S?"":S,ed=void 0!==E&&E,eu=void 0===X||X,ef=void 0===Y?ei:Y,em=void 0===Q?"classic":Q,eh=void 0!==ea&&ea;if(x[0]!==em)n=e=>{let n,i,l,a,o,s=(0,r.c)(10);if(s[0]!==e){let{node:t,className:r,children:a,...o}=e;i=r,n=a,l=o,s[0]=e,s[1]=n,s[2]=i,s[3]=l}else n=s[1],i=s[2],l=s[3];return s[4]!==i?(a=(0,c.f)(J({variant:em}),i),s[4]=i,s[5]=a):a=s[5],s[6]!==n||s[7]!==l||s[8]!==a?(o=(0,t.jsx)("code",{...l,className:a,children:n}),s[6]=n,s[7]=l,s[8]=a,s[9]=o):o=s[9],o},x[0]=em,x[1]=n;else n=x[1];if(x[2]!==ed||x[3]!==ec){let e;e={disableLink:ed,linkClassName:ec},i=({node:r,...n})=>e.disableLink?(0,t.jsx)("span",{...n}):(0,t.jsx)(m.b,{className:e.linkClassName,...n,children:n.children}),x[2]=ed,x[3]=ec,x[4]=i}else i=x[4];x[5]!==i||x[6]!==n?(l={h1:L,h2:F,h3:B,h4:D,h5:O,h6:T,blockquote:$,p:I,pre:K,code:n,table:M,thead:R,tbody:z,tr:P,th:U,td:H,ul:W,ol:Z,li:V,hr:q,a:i,strong:et,img:G,details:er,summary:en},x[5]=i,x[6]=n,x[7]=l):l=x[7];let ep=l,eg=(0,f.f)(eo);x[8]!==eu?(a=(0,p.C)(eu),x[8]=eu,x[9]=a):a=x[9];let eb=a;x[10]!==es||x[11]!==em?(s=(0,c.f)(ee({variant:em}),es),x[10]=es,x[11]=em,x[12]=s):s=x[12];let ex=s;if(x[13]!==eo||x[14]!==ep||x[15]!==ex||x[16]!==ef||x[17]!==eh||x[18]!==eb){let e,r=eh?function(e){let t=e.split("\n");if(function(e){let t=null;for(let r of e){if(null===t&&(v.test(r)||w.test(r)))return!0;t=A(r,t)}return!1}(t))return[e];let r=[],n=0,i=null;for(let[e,l]of t.entries()){let a=null!==i;if(i=A(l,i),a||null!==i||""!==l.trim())continue;let o=t[e+1];if(void 0===o||!(""!==o.trim()&&(j.test(o)||k.test(o)||!N.test(o))))continue;let s=t.slice(n,e).join("\n");""!==s.trim()&&(r.push(s),n=e+1)}return r.push(t.slice(n).join("\n")),r}(eo):[eo];d=ex,x[21]!==ep||x[22]!==ef||x[23]!==eb?(e=(e,r)=>(0,t.jsxs)(o.default.Fragment,{children:[r>0?"\n":null,(0,t.jsx)(el,{markdown:e,components:ep,rehypePlugins:eb,disallowedElements:ef})]},r),x[21]=ep,x[22]=ef,x[23]=eb,x[24]=e):e=x[24],u=r.map(e),x[13]=eo,x[14]=ep,x[15]=ex,x[16]=ef,x[17]=eh,x[18]=eb,x[19]=d,x[20]=u}else d=x[19],u=x[20];x[25]!==d||x[26]!==u?(h=(0,t.jsx)("div",{className:d,children:u}),x[25]=d,x[26]=u,x[27]=h):h=x[27];let ey=h;return eg?(x[28]!==eo||x[29]!==ep||x[30]!==ex||x[31]!==ef||x[32]!==eu?(g=(0,t.jsx)(C,{shouldRenderRawHtml:eu,disallowedElements:ef,components:ep,className:ex,children:eo}),x[28]=eo,x[29]=ep,x[30]=ex,x[31]=ef,x[32]=eu,x[33]=g):g=x[33],x[34]!==ey||x[35]!==g?(b=(0,t.jsx)(o.Suspense,{fallback:ey,children:g}),x[34]=ey,x[35]=g,x[36]=b):b=x[36],b):ey}],707028)},913743,9634,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(647204),i=e.i(16043),l=e.i(136562),a=e.i(535072);let o=()=>{if("u"0?e:void 0};var s=e.i(866969),c=e.i(67089);let d=null,u=new Map,f=null,m=0,h=(e,t)=>{let r=u.get(e);r&&(u.delete(e),clearTimeout(r.timeoutId),r.resolve(t))},p=()=>{let e,t=(0,r.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={highlight:g},t[0]=e):e=t[0],e};function g(t,r,i){return(({code:t,lang:r,theme:i})=>new Promise(l=>{let a=(()=>{if(f)return null;if(d)return d;let t=(0,n.$)(()=>e.r(405266)(Worker));return(0,n.V)(t)?((0,c.L)("Failed to initialize highlight worker",{message:"Failed to initialize highlight worker",error:t.error,metadata:{location:"highlight.singleton.ts"}}),f=t.error instanceof Error?t.error:Error(String(t.error)),d=null,null):((d=t.data).onmessage=e=>{let{id:t,lines:r,preStyle:n,error:i}=e.data;if(i){(0,c.L)("highlight worker processing error",{message:"highlight worker processing error",error:i,metadata:{location:"highlight.singleton.ts"}}),h(t,null);return}m=0,h(t,{lines:r??[],preStyle:n??""})},d.onerror=e=>{for(let t of((0,c.L)("highlight worker script error",{message:"highlight worker script error",error:e,metadata:{location:"highlight.singleton.ts"}}),(m+=1)>2&&(f=Error(e.message||"highlight worker script error")),d?.terminate(),d=null,u.keys()))h(t,null)},d)})();if(!a)return void l(null);let o=crypto.randomUUID(),s=setTimeout(()=>h(o,null),1e4);u.set(o,{resolve:l,timeoutId:s});let p=(0,n.$)(()=>a.postMessage({id:o,code:t,lang:r,theme:i}));(0,n.V)(p)&&h(o,null)}))({code:t,lang:r,theme:i})}e.s(["f",0,p],9634);let b=(0,i.memo)(e=>{let n,i=(0,r.c)(2),{html:l}=e;return i[0]!==l?(n=(0,t.jsx)("div",{dangerouslySetInnerHTML:{__html:l}}),i[0]=l,i[1]=n):n=i[1],n}),x=(0,i.memo)(e=>{let n,i=(0,r.c)(2),{text:l}=e,a=l||" ";return i[0]!==a?(n=(0,t.jsx)("div",{children:a}),i[0]=a,i[1]=n):n=i[1],n});e.s(["f",0,({code:e,lang:c,theme:d,roundedCorners:u=!0,border:f=!0,codeBackgroundClassName:m="bg-doc-surface",lineNumbers:h=!1,wrap:g=!1})=>{let[y,v]=(0,i.useState)([]),[w,j]=(0,i.useState)({}),[k,N]=(0,i.useState)(""),A=(0,i.useRef)(!1),C=(0,i.useRef)(null),_=(0,i.useRef)(0),{highlight:S}=p(),E=((e=500)=>{let t=(0,i.useMemo)(o,[]),r=(0,a.o)("(min-width: 768px)");return(0,i.useMemo)(()=>void 0!==t?t<2?4e3:t<4?2e3:e:r?e:2e3,[t,r,e])})(500),L=(0,i.useCallback)(e=>{var t;let r,n=(t=e.preStyle,r={},t&&t.split(";").forEach(e=>{let[t,n]=e.split(/:(.*)/s);t&&n&&(r[t.trim().replaceAll(/-(\w)/g,(e,t)=>t.toUpperCase())]=n.trim())}),r);n.backgroundColor="transparent",n.whiteSpace="pre",j(n)},[]);(0,i.useEffect)(()=>{let e=!1;return(0,n.$)(()=>S("",c,d)).then(t=>{e||!(0,n.V)(t)&&t.data&&L(t.data)}),()=>{e=!0}},[c,d,S,L]),(0,i.useEffect)(()=>{C.current={code:e,lang:c,theme:d},_.current=0},[e,c,d]);let F=(0,i.useCallback)(async()=>{if(A.current||!C.current)return;A.current=!0;let e=C.current;C.current=null;let t=await (0,n.$)(()=>S(e.code,e.lang,e.theme));(0,n.V)(t)||!t.data?(_.current+=1,_.current<=5&&(C.current??=e)):(_.current=0,L(t.data),v(t.data.lines),N(e.code)),A.current=!1},[S,L]);!function(e){let t,n,l=(0,r.c)(5),{run:a,intervalMs:o,jobKey:c}=e;l[0]!==a?(t=()=>{a()},l[0]=a,l[1]=t):t=l[1],l[2]!==c||l[3]!==a?(n=[c,a],l[2]=c,l[3]=a,l[4]=n):n=l[4],(0,i.useEffect)(t,n),(0,s.f)(a,o)}({run:(0,i.useCallback)(()=>{F()},[F]),intervalMs:E,jobKey:`${c}|${d}|${e}`});let B=(0,i.useMemo)(()=>k&&e.startsWith(k)?e.substring(k.length):e,[e,k]);(0,i.useEffect)(()=>{k&&!e.startsWith(k)&&v([])},[e,k]);let D=(0,i.useMemo)(()=>B.split("\n"),[B]);return(0,t.jsx)("pre",{className:(0,l.f)("highlights overflow-x-auto min-w-0",f&&"border border-border",u&&"rounded-lg"),style:w,children:(0,t.jsxs)("code",{className:(0,l.f)("p-4",g?"block whitespace-pre-wrap break-words":"inline-block min-w-full whitespace-pre",!h&&!g&&"md:whitespace-pre-wrap",h&&"[counter-reset:line] [&>div]:before:[counter-increment:line] [&>div]:before:content-[counter(line)] [&>div]:before:mr-3 [&>div]:before:inline-block [&>div]:before:w-7 [&>div]:before:text-right [&>div]:before:tabular-nums [&>div]:before:select-none [&>div]:before:text-faint",h&&g&&"[&>div]:pl-10 [&>div]:-indent-10",m),children:[y.map((e,r)=>(0,t.jsx)(b,{html:e},`h-${r}`)),D.slice(+!!k).map((e,r)=>(0,t.jsx)(x,{text:e},`r-${r}`))]})})}],913743)},18914,e=>{"use strict";let t="#03080A",r="#FCFCFE";function n(e){return{comment:e.muted,punctuation:e.muted,string:e.string,"diff.plus":e.string,link_uri:e.string,number:e.constant,boolean:e.constant,constant:e.constant,attribute:e.constant,variant:e.constant,"selector.class":e.constant,"selector.id":e.constant,"selector.pseudo":e.constant,keyword:e.keyword,operator:e.keyword,preproc:e.keyword,link_text:e.keyword,function:e.function,constructor:e.function,type:e.type,namespace:e.type,enum:e.type,variable:e.foreground,property:e.property,tag:e.tag,selector:e.tag,"diff.minus":e.tag,"string.regex":e.regex,title:{color:e.foreground,font_weight:700},"emphasis.strong":{color:e.foreground,font_weight:700},emphasis:{font_style:"italic"}}}let i="openrouter-light",l="openrouter-dark",a={name:i,appearance:"light",style:{"editor.background":"#FFFFFF","editor.foreground":t,syntax:n({foreground:t,muted:"#03080AB0",string:"#007544",constant:"#8A6000",keyword:"#0352C9",function:"#800080",type:"#4682B4",property:"#7B68EE",tag:"#BF0024",regex:"#2E8B57"})}},o={name:l,appearance:"dark",style:{"editor.background":"#03080A","editor.foreground":r,syntax:n({foreground:r,muted:"#FCFCFEA0",string:"#34DFAA",constant:"#FFAB00",keyword:"#4D8DFF",function:"#DA70D6",type:"#40E0D0",property:"#FFBB28",tag:"#FF2D55",regex:"#9ACD32"})}};e.s(["N",0,l,"L",0,i,"Y",0,o,"l",0,a])},551280,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(531397),i=e.i(196991),l=e.i(16043),a=e.i(136562);e.s(["o",0,e=>{let i,l,o=(0,r.c)(4),{className:s}=e;return o[0]!==s?(i=(0,a.f)("ml-1 inline-block w-4",s),o[0]=s,o[1]=i):i=o[1],o[2]!==i?(l=(0,t.jsx)(n.f,{className:i}),o[2]=i,o[3]=l):l=o[3],l},"b",0,e=>{let n,o,s,c,d,u,f,m,h,p,g,b=(0,r.c)(26);b[0]!==e?({className:o,href:c,children:n,target:f,rel:u,"aria-describedby":s,...d}=e,b[0]=e,b[1]=n,b[2]=o,b[3]=s,b[4]=c,b[5]=d,b[6]=u,b[7]=f):(n=b[1],o=b[2],s=b[3],c=b[4],d=b[5],u=b[6],f=b[7]);let x=c?.startsWith("http"),y=f??(x?"_blank":void 0),v="_blank"===y,w=(0,l.useId)();b[8]!==s||b[9]!==w||b[10]!==v?(m=v?[s,w].filter(Boolean).join(" "):s,b[8]=s,b[9]=w,b[10]=v,b[11]=m):m=b[11];let j=m;b[12]!==o?(h=(0,a.f)(o,"underline underline-offset-2 decoration-current/40 hover:text-accent-foreground hover:decoration-current transition-colors"),b[12]=o,b[13]=h):h=b[13];let k=u??(v?"noopener noreferrer":void 0);return b[14]!==w||b[15]!==v?(p=v&&(0,t.jsx)("span",{id:w,hidden:!0,children:(0,t.jsx)(i.T,{children:"Opens in new tab"})}),b[14]=w,b[15]=v,b[16]=p):p=b[16],b[17]!==n||b[18]!==c||b[19]!==d||b[20]!==j||b[21]!==y||b[22]!==h||b[23]!==k||b[24]!==p?(g=(0,t.jsxs)("a",{...d,href:c,className:h,target:y,rel:k,"aria-describedby":j,children:[n,p]}),b[17]=n,b[18]=c,b[19]=d,b[20]=j,b[21]=y,b[22]=h,b[23]=k,b[24]=p,b[25]=g):g=b[25],g}],551280)},19532,e=>{"use strict";var t=e.i(539758);let r=/^[ \t>]*(?:(?:[-*+]|\d{1,9}[.)])[ \t]+[ \t>]*)*(?:`{3,}|~{3,})[ \t]*math\b/m,n=/&(?:dollar|#0*36|#[xX]0*24);/g;e.s(["f",0,e=>{let i=e.replace(n,()=>"$");return i.includes("$$")||(0,t.v)(i)||r.test(e)}])},953401,e=>{"use strict";let t=(0,e.i(16043).createContext)(!1);e.s(["f",0,t])},866969,e=>{"use strict";var t=e.i(663456),r=e.i(16043),n=e.i(143253);e.s(["f",0,function(e,i){let l,a,o,s,c=(0,t.c)(6),d=(0,r.useRef)(e);c[0]!==e?(l=()=>{d.current=e},a=[e],c[0]=e,c[1]=l,c[2]=a):(l=c[1],a=c[2]),(0,n.f)(l,a),c[3]!==i?(o=()=>{if(null===i)return;let e=setInterval(()=>{d.current()},i);return()=>{clearInterval(e)}},s=[i],c[3]=i,c[4]=o,c[5]=s):(o=c[4],s=c[5]),(0,r.useEffect)(o,s)}])},769715,e=>{e.q("/_next/static/immutable/media/highlight.worker.3-ioem5915ckg.ts")},405266,e=>{e.v(e.r(510914).f("static/immutable/chunks/turbopack-worker-38eq_8frvyaul.js",["static/immutable/chunks/0t_n-r81acfo9.js","static/immutable/chunks/418fptazfd3br.js","static/immutable/chunks/turbopack-0bzpzepyyv54r.js","static/immutable/chunks/turbopack-35u-62ruoxs7i.js"]))},790870,e=>{"use strict";let t={Quality:"quality",Budget:"budget",Fast:"fast"},r=[{id:t.Quality,label:"Quality",emoji:"🏆",permaslugs:["~anthropic/claude-opus-latest","~openai/gpt-sol-latest","~google/gemini-pro-latest"]},{id:t.Budget,label:"Budget",emoji:"💰",permaslugs:["~google/gemini-flash-latest","deepseek/deepseek-v4-flash","~moonshotai/kimi-latest"]},{id:t.Fast,label:"Fast",emoji:"⚡",permaslugs:["~google/gemini-flash-latest","deepseek/deepseek-v4-flash","~moonshotai/kimi-latest"]}],n=t.Quality;e.s(["b",0,"~anthropic/claude-opus-latest","j",0,n,"p",0,r,"t",0,t])},473028,e=>{"use strict";var t=e.i(647204);let r=/^[A-Za-z0-9+/\-_=\s]*$/,n=/^$/,i="data:",l=";base64,";function a(e){let t=r.test(e);return n.test(""),t}e.s(["k",0,function(e){let r=e.indexOf(";");if(e.startsWith(i)&&r>i.length&&e.startsWith(l,r)){let n=e.slice(i.length,r),o=e.slice(r+l.length);if(n&&o&&!n.includes(":")&&a(o))return(0,t.N)({mimeType:n,base64:o})}return function(e){let[r,n]=e.split(";");if(!r||!n)return(0,t.Y)({location:"decodeBase64DataURL",message:"Invalid base64 data URL: missing data prefix or base64 payload"});let i=r.split(":")[1],l=n.split(",")[1];return i&&l?a(l)?(0,t.N)({mimeType:i,base64:l}):(0,t.Y)({location:"decodeBase64DataURL",message:"Invalid base64 data URL: payload is not base64-encoded data"}):(0,t.Y)({location:"decodeBase64DataURL",message:"Invalid base64 data URL: missing mime type or base64 content"})}(e)},"d",0,function({mimeType:e,base64:t}){return`data:${e};base64,${t}`},"i",0,function(e){return e.startsWith("data:")&&e.includes(";base64,",5)&&!e.includes("\n")&&!e.includes("\r")&&!e.includes("\u2028")&&!e.includes("\u2029")}])},820223,e=>{"use strict";let t;var r=e.i(647204),n=e.i(167182);let i="function"==typeof n.Buffer,l="function"==typeof TextDecoder?new TextDecoder:void 0,a="function"==typeof TextEncoder?new TextEncoder:void 0,o=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),s=(t={},o.forEach((e,r)=>t[e]=r),t),c=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,d=String.fromCharCode.bind(String),u="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),f=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),m="function"==typeof btoa?e=>btoa(e):i?e=>n.Buffer.from(e,"binary").toString("base64"):e=>{let t,r,n,i,l="",a=e.length%3;for(let a=0;a255||(n=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw TypeError("invalid character found");l+=o[(t=r<<16|n<<8|i)>>18&63]+o[t>>12&63]+o[t>>6&63]+o[63&t]}return a?l.slice(0,a-3)+"===".substring(a):l},h=i?e=>n.Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;rt?f(h(e)):h(e),g=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?d(192|t>>>6)+d(128|63&t):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|63&t)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|63&t)},b=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=i?e=>n.Buffer.from(e,"utf8").toString("base64"):a?e=>h(a.encode(e)):e=>m(e.replace(b,g)),y=(e,t=!1)=>t?f(x(e)):x(e),v=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,w=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return d((t>>>10)+55296)+d((1023&t)+56320);case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},j="function"==typeof atob?e=>atob(e.replace(/[^A-Za-z0-9\+\/]/g,"")):i?e=>n.Buffer.from(e,"base64").toString("binary"):e=>{let t,r,n;if(e=e.replace(/\s+/g,""),!c.test(e))throw TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let i=[];for(let l=0;l>16&255)):64===n?i.push(d(t>>16&255,t>>8&255)):i.push(d(t>>16&255,t>>8&255,255&t));return i.join("")},k=i?e=>u(n.Buffer.from(e,"base64")):e=>u(j(e).split("").map(e=>e.charCodeAt(0))),N=e=>k(C(e)),A=i?e=>n.Buffer.from(e,"base64").toString("utf8"):l?e=>l.decode(k(e)):e=>j(e).replace(v,w),C=e=>e.replace(/[-_]/g,e=>"-"==e?"+":"/").replace(/[^A-Za-z0-9\+\/]/g,"");function _(e){let t=0,r=0,n=!1,i=!1;for(let l=0;l=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122){if(r>0)return!1;t+=1}else if(43===a||47===a){if(r>0)return!1;n=!0,t+=1}else if(45===a||95===a){if(r>0)return!1;i=!0,t+=1}else if(61===a){if((r+=1)>2)return!1}else if(!(32===a||a>=9&&a<=13||160===a||5760===a||a>=8192&&a<=8202||8232===a||8233===a||8239===a||8287===a||12288===a||65279===a))return!1}let l=0===r||(t+r)%4==0;return t>0&&!(n&&i)&&t%4!=1&&l}let S=/^data:[^,]{0,255};base64,/i;e.s(["T",0,function(e){try{if(!_(e))return;let t=e.replaceAll(/\s/g,""),n=(0,r.$)(()=>new Uint8Array(N(t)));return(0,r.C)(n)?n.data:void 0}finally{/(?:)/.test("")}},"L",0,function(e){return p(e)},"Y",0,function(e){return y(e)},"D",0,function(e){return"data:"===e.slice(0,5).toLowerCase()},"o",0,function(e){try{return _(e.replace(S,""))}finally{/(?:)/.test("")}}],820223)},404142,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(136562),i=e.i(139697),l=e.i(875910),a=e.i(751155),o=e.i(656921);e.i(707060);var s=e.i(196991),c=e.i(288265),d=e.i(859986),u=e.i(651681);let f={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};f.node;let m=(0,u.f)(f);e.i(406201);var h=e.i(967605);function p(e){let n,i=(0,r.c)(8),{title:l,isExpanded:a,onToggle:o,newAction:s,newActionPlacement:c}=e;if(a||void 0===o){let e;return i[0]!==s||i[1]!==c||i[2]!==o||i[3]!==l?(e=(0,t.jsx)(b,{title:l,onToggle:o,newAction:s,newActionPlacement:c}),i[0]=s,i[1]=c,i[2]=o,i[3]=l,i[4]=e):e=i[4],e}return i[5]!==s||i[6]!==o?(n=(0,t.jsx)(x,{onToggle:o,newAction:s}),i[5]=s,i[6]=o,i[7]=n):n=i[7],n}function g(e){let i,l,a,o=(0,r.c)(5),{backAction:s}=e,c=s.href;return o[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,n.f)("flex h-10 w-full items-center gap-2 rounded-md px-2","text-sm hover:bg-card-hover"),l=(0,t.jsx)(d.f,{className:"size-3.5 shrink-0"}),o[0]=i,o[1]=l):(i=o[0],l=o[1]),o[2]!==s.href||o[3]!==s.label?(a=(0,t.jsx)("div",{className:"-mx-2 -mt-px shrink-0 border-b border-border px-2 pb-2",children:(0,t.jsxs)(h.Link,{href:c,variant:"subtle",className:i,children:[l,s.label]})}),o[2]=s.href,o[3]=s.label,o[4]=a):a=o[4],a}function b(e){let l,o,s,d,u,f,h,p=(0,r.c)(29),{title:g,onToggle:b,newAction:x,newActionPlacement:y}=e,v=(0,c.f)(),w=x.icon,j="header"===y;return p[0]!==g?(l=(0,t.jsx)("h3",{className:"text-base font-medium text-foreground",children:g}),p[0]=g,p[1]=l):l=p[1],p[2]!==w||p[3]!==j||p[4]!==x.ariaLabel||p[5]!==x.isDisabled||p[6]!==x.label||p[7]!==x.onClick?(o=j?(0,t.jsx)(a.Tooltip,{side:"bottom",delay:0,content:x.label,children:(0,t.jsx)(i.Button,{size:"icon",variant:"ghost","aria-label":x.ariaLabel,onClick:x.onClick,disabled:x.isDisabled,className:"shrink-0",children:(0,t.jsx)(w,{className:"size-5 text-muted-foreground"})})}):null,p[2]=w,p[3]=j,p[4]=x.ariaLabel,p[5]=x.isDisabled,p[6]=x.label,p[7]=x.onClick,p[8]=o):o=p[8],p[9]!==v||p[10]!==b?(s=b?(0,t.jsx)(i.Button,{size:"icon",variant:"ghost","aria-label":v("Toggle sidebar"),onClick:e=>{e.stopPropagation(),b()},className:"shrink-0",children:(0,t.jsx)(m,{className:"size-5 text-muted-foreground"})}):null,p[9]=v,p[10]=b,p[11]=s):s=p[11],p[12]!==o||p[13]!==s?(d=(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[o,s]}),p[12]=o,p[13]=s,p[14]=d):d=p[14],p[15]!==l||p[16]!==d?(u=(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 px-1",children:[l,d]}),p[15]=l,p[16]=d,p[17]=u):u=p[17],p[18]!==w||p[19]!==j||p[20]!==x.ariaLabel||p[21]!==x.isDisabled||p[22]!==x.label||p[23]!==x.onClick||p[24]!==x.shortcutHint?(f=j?null:(0,t.jsxs)(i.Button,{align:"start",variant:"outline",size:"sm",tone:"strong",onClick:x.onClick,disabled:x.isDisabled,"aria-label":x.ariaLabel,className:(0,n.f)("w-full gap-3","hover:bg-card-hover"),children:[(0,t.jsx)(w,{className:"size-4 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{children:x.label}),x.shortcutHint&&(0,t.jsx)("span",{className:"ml-auto hidden text-xs text-muted-foreground md:inline",children:x.shortcutHint})]}),p[18]=w,p[19]=j,p[20]=x.ariaLabel,p[21]=x.isDisabled,p[22]=x.label,p[23]=x.onClick,p[24]=x.shortcutHint,p[25]=f):f=p[25],p[26]!==u||p[27]!==f?(h=(0,t.jsxs)(t.Fragment,{children:[u,f]}),p[26]=u,p[27]=f,p[28]=h):h=p[28],h}function x(e){let n,o,d,u,f,h,p,g,b,x,y,v=(0,r.c)(27),{onToggle:w,newAction:j}=e,k=(0,c.f)(),N=j.icon;return v[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)(s.T,{children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Toggle sidebar",(0,t.jsx)(l.f,{children:"["})]})}),v[0]=n):n=v[0],v[1]!==k?(o=k("Toggle sidebar"),v[1]=k,v[2]=o):o=v[2],v[3]!==w?(d=e=>{e.stopPropagation(),w()},v[3]=w,v[4]=d):d=v[4],v[5]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(m,{className:"size-5 text-muted-foreground"}),v[5]=u):u=v[5],v[6]!==o||v[7]!==d?(f=(0,t.jsx)(a.Tooltip,{side:"right",delay:0,content:n,children:(0,t.jsx)(i.Button,{size:"icon",variant:"ghost","aria-label":o,onClick:d,className:"shrink-0",children:u})}),v[6]=o,v[7]=d,v[8]=f):f=v[8],v[9]!==j.shortcutHint?(h=j.shortcutHint&&(0,t.jsx)(l.f,{children:j.shortcutHint}),v[9]=j.shortcutHint,v[10]=h):h=v[10],v[11]!==j.label||v[12]!==h?(p=(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[j.label,h]}),v[11]=j.label,v[12]=h,v[13]=p):p=v[13],v[14]!==N?(g=(0,t.jsx)(N,{className:"size-5"}),v[14]=N,v[15]=g):g=v[15],v[16]!==j.ariaLabel||v[17]!==j.isDisabled||v[18]!==j.onClick||v[19]!==g?(b=(0,t.jsx)(i.Button,{size:"icon",variant:"ghost",onClick:j.onClick,disabled:j.isDisabled,"aria-label":j.ariaLabel,className:"shrink-0",children:g}),v[16]=j.ariaLabel,v[17]=j.isDisabled,v[18]=j.onClick,v[19]=g,v[20]=b):b=v[20],v[21]!==p||v[22]!==b?(x=(0,t.jsx)(a.Tooltip,{side:"right",delay:0,content:p,children:b}),v[21]=p,v[22]=b,v[23]=x):x=v[23],v[24]!==x||v[25]!==f?(y=(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-1",children:[f,x]}),v[24]=x,v[25]=f,v[26]=y):y=v[26],y}e.s(["f",0,e=>{let i,l,a,s,c,d,u,f,m,h,b,x,y,v,w,j,k,N,A,C,_=(0,r.c)(44);_[0]!==e?({children:l,title:x,isCollapsed:a,onToggle:c,newAction:s,newActionPlacement:f,backAction:i,isEmbedded:m,containerClassName:h,className:b,ref:u,...d}=e,_[0]=e,_[1]=i,_[2]=l,_[3]=a,_[4]=s,_[5]=c,_[6]=d,_[7]=u,_[8]=f,_[9]=m,_[10]=h,_[11]=b,_[12]=x):(i=_[1],l=_[2],a=_[3],s=_[4],c=_[5],d=_[6],u=_[7],f=_[8],m=_[9],h=_[10],b=_[11],x=_[12]);let S=void 0===f?"row":f,E=void 0!==m&&m,L=void 0===h?"":h,F=void 0===b?"":b,B=E||!a,D=E?void 0:c,O=void 0===D?null:"[";(0,o.f)(O,c),_[13]!==i||_[14]!==L||_[15]!==E||_[16]!==B?(y=(0,n.f)(function({isEmbedded:e,isExpanded:t,hasBackAction:r}){return e?"flex h-full w-full shrink-0 flex-col p-px":(0,n.f)("flex h-full shrink-0 flex-col p-px","transition-[width] duration-quick ease-smooth-out","bg-background border-r border-border",t?"w-65":"w-13.5",r&&"animate-in fade-in-0 slide-in-from-right-2 duration-medium ease-smooth-out")}({isEmbedded:E,isExpanded:B,hasBackAction:void 0!==i}),L),_[13]=i,_[14]=L,_[15]=E,_[16]=B,_[17]=y):y=_[17],_[18]!==F?(v=(0,n.f)("flex h-full w-full flex-col gap-2 p-2",F),_[18]=F,_[19]=v):v=_[19],_[20]!==i||_[21]!==B?(w=B&&i?(0,t.jsx)(g,{backAction:i}):null,_[20]=i,_[21]=B,_[22]=w):w=_[22],_[23]!==B||_[24]!==s||_[25]!==S||_[26]!==x||_[27]!==D?(j=(0,t.jsx)(p,{title:x,isExpanded:B,onToggle:D,newAction:s,newActionPlacement:S}),_[23]=B,_[24]=s,_[25]=S,_[26]=x,_[27]=D,_[28]=j):j=_[28];let T=B?"opacity-100 visible pointer-events-auto h-auto":"opacity-0 invisible pointer-events-none h-0";return _[29]!==T?(k=(0,n.f)("flex-1 min-h-0 overflow-hidden",T,"transition-[opacity,visibility,height] duration-fast ease-smooth-out","py-px"),_[29]=T,_[30]=k):k=_[30],_[31]!==l||_[32]!==k?(N=(0,t.jsx)("div",{className:k,children:l}),_[31]=l,_[32]=k,_[33]=N):N=_[33],_[34]!==N||_[35]!==v||_[36]!==w||_[37]!==j?(A=(0,t.jsxs)("div",{className:v,children:[w,j,N]}),_[34]=N,_[35]=v,_[36]=w,_[37]=j,_[38]=A):A=_[38],_[39]!==d||_[40]!==u||_[41]!==A||_[42]!==y?(C=(0,t.jsx)("aside",{ref:u,...d,className:y,children:A}),_[39]=d,_[40]=u,_[41]=A,_[42]=y,_[43]=C):C=_[43],C}],404142)},649896,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(657288),i=e.i(279496),l=e.i(136562),a=e.i(139697),o=e.i(181870);e.i(707060);var s=e.i(288265);e.s(["f",0,function(e){let c,d,u,f,m,h,p,g=(0,r.c)(16),{placeholder:b,value:x,onValueChange:y}=e,v=(0,s.f)();return g[0]===Symbol.for("react.memo_cache_sentinel")?(c=(0,l.f)("flex h-8 shrink-0 items-center gap-3 rounded-md pl-3 pr-1","border border-border bg-background","focus-within:border-focus-border focus-within:shadow-focus"),d=(0,t.jsx)(n.f,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted-foreground"}),g[0]=c,g[1]=d):(c=g[0],d=g[1]),g[2]!==y?(u=e=>y(e.target.value),g[2]=y,g[3]=u):u=g[3],g[4]===Symbol.for("react.memo_cache_sentinel")?(f=(0,l.f)("h-full flex-1 min-w-0 border-0 bg-transparent px-0 shadow-none","focus-visible:border-transparent focus-visible:shadow-none focus:bg-transparent focus:ring-0","dark:bg-transparent dark:focus:bg-transparent"),g[4]=f):f=g[4],g[5]!==b||g[6]!==u||g[7]!==x?(m=(0,t.jsx)(o.f,{placeholder:b,value:x,onChange:u,className:f}),g[5]=b,g[6]=u,g[7]=x,g[8]=m):m=g[8],g[9]!==v||g[10]!==y||g[11]!==x?(h=x&&(0,t.jsx)(a.Button,{variant:"ghost",size:"icon-3xs",tone:"subdued",glyph:"sm","aria-label":v("Clear search"),onClick:()=>y(""),className:"shrink-0",children:(0,t.jsx)(i.f,{className:"size-3.5"})}),g[9]=v,g[10]=y,g[11]=x,g[12]=h):h=g[12],g[13]!==m||g[14]!==h?(p=(0,t.jsxs)("div",{className:c,children:[d,m,h]}),g[13]=m,g[14]=h,g[15]=p):p=g[15],p}])},543696,e=>{"use strict";var t=e.i(733442);e.s(["f",0,function(e){let{isSignedIn:r,clerkOrgId:n,workspacePartitionId:i}=e;if(!r)return`${t.E}:guest:${t.t}`;let l=null===i?"":`:ws:${i}`;return n?`${t.E}:${n}${l}:${t.t}`:`${t.E}${l}:${t.t}`}])},907781,e=>{"use strict";var t=e.i(663456),r=e.i(73668);e.i(16043);var n=e.i(215370),i=e.i(543696);e.s(["f",0,function(){let e,l=(0,t.c)(4),{isLoading:a,isOrgLoading:o,clerkOrg:s,isSignedIn:c}=(0,r.useEntity)(),d=(0,n.f)();s?.id;e:{let t;if(!(!a&&!o)||!d.isReady){e=null;break e}let r=!0===c,n=s?.id;l[0]!==r||l[1]!==n||l[2]!==d.partitionId?(t=(0,i.f)({isSignedIn:r,clerkOrgId:n,workspacePartitionId:d.partitionId}),l[0]=r,l[1]=n,l[2]=d.partitionId,l[3]=t):t=l[3],e=t}return e}])},660298,e=>{"use strict";e.s(["f",0,function(e,{date:t=new Date().toDateString(),name:r="OpenRouter Chat",ext:n=".md"}={}){let i=`${r} ${t}${n}`.trim(),l=i.length>100?`${i.slice(0,100-n.length)}${n}`:i,a=new Blob([e],{type:"text/markdown;charset=utf-8;"}),o=document.createElement("a"),s=URL.createObjectURL(a);o.setAttribute("href",s),o.setAttribute("download",l),o.style.visibility="hidden",document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(s),4e4)}])},215370,784814,e=>{"use strict";var t=e.i(376885),r=e.i(128564),n=e.i(427150);function i(e){let{activeWorkspaceId:t,defaultWorkspaceId:r}=e;return t&&r?t===r?null:t:null}e.s(["X",0,i,"Q",0,function(e,t){return(e.workspaceId??null)===t}],784814);let l={isReady:!1,partitionId:null},a={isReady:!0,partitionId:null},o=null;e.s(["f",0,function(){let{isLoaded:e,isSignedIn:s,userId:c,orgId:d}=(0,t.f)(),{workspaces:u,activeWorkspaceId:f,defaultWorkspaceId:m,didFetchFail:h}=(0,r.Z)({isEnabled:!0===s});if(!e)return l;if(!s||!(0,n.f)(c))return a;let p=d??null;if(void 0===u)return h&&o?.userId===c&&o.orgId===p?{isReady:!0,partitionId:o.partitionId}:l;let g=i({activeWorkspaceId:f,defaultWorkspaceId:m});return o={userId:c,orgId:p,partitionId:g},{isReady:!0,partitionId:g}}],215370)},510914,e=>{"use strict";e.s(["f",0,function(t,r){return(n,i)=>(function(t,r,n,i){let l="SharedWorker"===t.name,a=e.b,o=[n.map(t=>e.h("string"==typeof t?t:t.path,a)).reverse(),e.X,a],s=["NEXT_DEPLOYMENT_ID","NEXT_CLIENT_ASSET_SUFFIX"];for(let e=0;e