PageSourceSearch

https://chat-gpt-web-lemon.vercel.app/_next/static/chunks/628.b1c80fb4d40ff044.js

js chat-gpt-web-lemon.vercel.app collected 2026-10-03 06:25:32 UTC 97,725 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[628,2386,9799],{24333:function(e,t,n){"use strict";var a,s,r=n(52846);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}t.Z=function(e){return r.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),a||(a=r.createElement("defs",null,r.createElement("path",{id:"clear_svg__a",d:"M0 0h16v16H0z"}))),r.createElement("g",null,s||(s=r.createElement("mask",{id:"clear_svg__b",fill:"#fff"},r.createElement("use",{xlinkHref:"#clear_svg__a"}))),r.createElement("g",{mask:"url(#clear_svg__b)"},r.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M1 9.67h8.67l1-9.67H0l1 9.67Z",transform:"translate(2.667 5)"}),r.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M0 0v3.33",transform:"translate(6.667 8.334)"}),r.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M0 0v3.33",transform:"translate(9.334 8.333)"}),r.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"m0 4 5.44-4L8 4",transform:"translate(4 1)"}))))}},49111:function(e,t,n){"use strict";var a,s,r=n(52846);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}t.Z=function(e){return r.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"#fff"},e),a||(a=r.createElement("rect",{width:"100%",height:"100%",fill:"none"})),s||(s=r.createElement("g",{className:"loading_svg__currentLayer"},r.createElement("circle",{cx:4,cy:8,r:1.926,fill:"#333"},r.createElement("animate",{attributeName:"r",begin:"0s",calcMode:"linear",dur:"0.8s",from:2,repeatCount:"indefinite",to:2,values:"2;1.2;2"}),r.createElement("animate",{attributeName:"fill-opacity",begin:"0s",calcMode:"linear",dur:"0.8s",from:1,repeatCount:"indefinite",to:1,values:"1;.5;1"})),r.createElement("circle",{cx:8,cy:8,r:1.274,fill:"#333",fillOpacity:.3},r.createElement("animate",{attributeName:"r",begin:"0s",calcMode:"linear",dur:"0.8s",from:1.2,repeatCount:"indefinite",to:1.2,values:"1.2;2;1.2"}),r.createElement("animate",{attributeName:"fill-opacity",begin:"0s",calcMode:"linear",dur:"0.8s",from:.5,repeatCount:"indefinite",to:.5,values:".5;1;.5"})),r.createElement("circle",{cx:12,cy:8,r:1.926,fill:"#333"},r.createElement("animate",{attributeName:"r",begin:"0s",calcMode:"linear",dur:"0.8s",from:2,repeatCount:"indefinite",to:2,values:"2;1.2;2"}),r.createElement("animate",{attributeName:"fill-opacity",begin:"0s",calcMode:"linear",dur:"0.8s",from:1,repeatCount:"indefinite",to:1,values:"1;.5;1"})))))}},76058:function(e,t,n){"use strict";var a,s,r=n(52846);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}t.Z=function(e){return r.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),a||(a=r.createElement("defs",null,r.createElement("path",{id:"prompt_svg__a",d:"M0 0h16v16H0z"}))),r.createElement("g",null,s||(s=r.createElement("mask",{id:"prompt_svg__b",fill:"#fff"},r.createElement("use",{xlinkHref:"#prompt_svg__a"}))),r.createElement("g",{mask:"url(#prompt_svg__b)"},r.createElement("path",{style:{stroke:"#333",strokeWidth:1.3,strokeOpacity:1,strokeDasharray:"0 0"},d:"m1.367 1.367 1.41 1.41M4.667 0v2m0 0V0m3.295 1.367-1.41 1.41m0 0 1.41-1.41m1.371 3.3h-2m0 0h2m-1.37 3.295-1.41-1.41m0 0 1.41 1.41M4.666 9.333v-2m0 0v2m-3.3-1.37 1.41-1.41m0 0-1.41 1.41M0 4.666h2m0 0H0",transform:"translate(5.333 1.333)"}),r.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M8.01 0 0 8.01",transform:"translate(1.848 6.138)"}))))}},76908:function(e,t,n){"use strict";var a,s,r=n(52846);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}t.Z=function(e){return r.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),a||(a=r.createElement("defs",null,r.createElement("path",{id:"return_svg__a",d:"M0 0h16v16H0z"}))),r.createElement("g",null,s||(s=r.createElement("mask",{id:"return_svg__b",fill:"#fff"},r.createElement("use",{xlinkHref:"#return_svg__a"}))),r.createElement("g",{mask:"url(#return_svg__b)"},r.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M2.33 0 0 2l2.33 2.33",transform:"translate(2 2.667)"}),r.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M0 0h7.66c2.3 0 4.25 1.87 4.34 4.17.09 2.42-1.91 4.5-4.34 4.5H2",transform:"translate(2 4.667)"}))))}},12637:function(e,t,n){"use strict";var a,s,r=n(52846);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}t.Z=function(e){return r.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),a||(a=r.createElement("defs",null,r.createElement("path",{id:"share_svg__a",d:"M0 0h16v16H0z"}))),r.createElement("g",null,s||(s=r.createElement("mask",{id:"share_svg__b",fill:"#fff"},r.createElement("use",{xlinkHref:"#share_svg__a"}))),r.createElement("g",{mask:"url(#share_svg__b)"},r.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M6.67 3.67C1.67 3.67 0 7.33 0 13c0 0 2-5 6.67-5v3.67l6-5.67-6-6v3.67Z",transform:"translate(2 1.333)"}))))}},32360:function(e,t,n){"use strict";n.d(t,{UK:function(){return o},YZ:function(){return i},x6:function(){return l}});var a=n(2265),s=n(90261),r=n(13894);function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,n]=(0,s.lr)();(0,a.useEffect)(()=>{let a=!1;t.forEach((n,s)=>{"function"==typeof e[s]&&(e[s](n),t.delete(s),a=!0)}),a&&n(t)},[t,e])}let l=/^[::]/;function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function t(e){return e.match(l)?e.slice(1):e}return{match:function(n){let a=t(n),s="function"==typeof e[a];return{matched:s,invoke:()=>s&&e[a](n)}},search:function(n){let a=t(n),s=r.ZP.Chat.Commands;return Object.keys(e).filter(e=>e.startsWith(a)).map(e=>({title:s[e],content:":"+e}))}}}},59799:function(e,t,n){"use strict";let a,s;n.r(t),n.d(t,{Chat:function(){return nm},ChatAction:function(){return nl},ChatActions:function(){return no},DeleteImageButton:function(){return nd},EditMessageModal:function(){return nc},PromptHints:function(){return nr},SessionConfigModel:function(){return na},ShortcutKeyModal:function(){return nh}});var r,i,l,o,c,d,h,u,m,p,g,f,v,x,w,y,_,k,j,C,E,b,S,M,N,O,P,Z,T,A,L,D,I,H,R,K,z,F,B,U,W,V,G,X,Q,q,Y,J,$,ee,et,en,ea,es,er=n(57437),ei=n(38648),el=n(2265),eo=n(52846);function ec(){return(ec=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var ed=function(e){return eo.createElement("svg",ec({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),c||(c=eo.createElement("defs",null,eo.createElement("path",{id:"send-white_svg__a",d:"M0 0h16v16H0z"}))),eo.createElement("g",null,d||(d=eo.createElement("mask",{id:"send-white_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#send-white_svg__a"}))),eo.createElement("g",{mask:"url(#send-white_svg__b)"},eo.createElement("path",{style:{stroke:"#fff",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M0 4.71 6.67 6l1.67 6.67L12.67 0 0 4.71Z",transform:"translate(1.333 2)"}),eo.createElement("path",{style:{stroke:"#fff",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M0 1.89 1.89 0",transform:"translate(8.003 6.117)"}))))};function eh(){return(eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var eu=function(e){return eo.createElement("svg",eh({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),h||(h=eo.createElement("defs",null,eo.createElement("path",{id:"brain_svg__a",d:"M0 0h16v16H0z"}))),eo.createElement("g",null,u||(u=eo.createElement("mask",{id:"brain_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#brain_svg__a"}))),eo.createElement("g",{mask:"url(#brain_svg__b)"},eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M5.01 13.33c-.32-1.06-.82-1.86-1.48-2.38-.98-.78-2.56-.3-3.14-1.11-.58-.8.41-2.29.76-3.17.34-.88-1.33-1.19-1.13-1.44.13-.16.97-.64 2.53-1.44C3 1.26 4.63 0 7.47 0c4.24 0 5.86 3.6 5.86 5.89 0 2.29-1.96 4.76-4.75 5.29-.25.37.11 1.08 1.08 2.15",transform:"translate(1.333 1.333)"}),eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M2.1 3.33c-.19 1.09.04 1.6.69 1.53.65-.07 1.05-.34 1.18-.81 1.02.28 1.57.04 1.66-.72.12-1.15-.5-2.07-.75-2.07s-.91-.03-.91-.38C3.97.52 3.2.33 2.5.33c-.69 0-.27-.47-1.23-.29C.64.17.26.44.13.88c-.22.84-.16 1.43.19 1.78.35.34.94.56 1.78.67Z",transform:"translate(6.374 3.957)"}),eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M1.97 0c-.34.21-.8.56-1 .83-.49.69-.88 1.1-.97 1.54",transform:"translate(8.193 8.5)"}))))};function em(){return(em=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var ep=function(e){return eo.createElement("svg",em({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),m||(m=eo.createElement("defs",null,eo.createElement("path",{id:"rename_svg__a",d:"M0 0h16v16H0z"}))),eo.createElement("g",null,p||(p=eo.createElement("mask",{id:"rename_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#rename_svg__a"}))),eo.createElement("g",{mask:"url(#rename_svg__b)"},eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M2.83 13.2 13.2 2.83 10.37 0 0 10.37v2.83h2.83Z",transform:"translate(1.775 1.3)"}),eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"m0 0 2.83 2.83",transform:"translate(9.317 4.13)"}
1))))},eg=n(12637),ef=n(76908),ev=n(84193);function ex(){return(ex=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var ew=function(e){return eo.createElement("svg",ex({xmlns:"http://www.w3.org/2000/svg",fill:"none",width:16,height:16,viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"speak_svg__w-4 speak_svg__h-4"},e),g||(g=eo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 0 1 0 12.728M16.463 8.288a5.25 5.25 0 0 1 0 7.424M6.75 8.25l4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25h2.24z"})))};function ey(){return(ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var e_=function(e){return eo.createElement("svg",ey({xmlns:"http://www.w3.org/2000/svg",fill:"none",width:16,height:16,viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"speak-stop_svg__w-4 speak-stop_svg__h-4"},e),f||(f=eo.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 9.75 19.5 12m0 0 2.25 2.25M19.5 12l2.25-2.25M19.5 12l-2.25 2.25m-10.5-6 4.72-4.72a.75.75 0 0 1 1.28.53v15.88a.75.75 0 0 1-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.009 9.009 0 0 1 2.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25h2.24Z"})))},ek=n(24053),ej=n(49111),eC=n(76058),eE=n(22774),eb=n(14845),eS=n(68397),eM=n(98829);function eN(){return(eN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var eO=function(e){return eo.createElement("svg",eN({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),eo.createElement("path",{style:{fill:"#333",opacity:1},d:"M13.275-.275c.261.26.392.576.392.945v10.66c0 .37-.131.684-.392.945a1.288 1.288 0 0 1-.945.392H1.67c-.37 0-.684-.13-.945-.392a1.288 1.288 0 0 1-.392-.945V.67c0-.37.13-.684.392-.945.26-.261.576-.392.945-.392h10.66c.369 0 .684.13.945.392zM1.667 11.33c0 .002 0 .003.003.003h10.66c.002 0 .003 0 .003-.003V.67c0-.002 0-.003-.003-.003H1.67c-.002 0-.003 0-.003.003z",transform:"translate(1 2)"}),eo.createElement("path",{style:{fill:"#333",opacity:1},d:"M9.763 7.507a.666.666 0 0 1-.867 0L7 5.878 5.104 7.506a.665.665 0 0 1-.867.001L2.331 5.878.434 7.506a.66.66 0 0 1-.485.16.66.66 0 0 1-.53-.338.665.665 0 0 1 .147-.834l2.33-2a.666.666 0 0 1 .867 0L4.67 6.123l1.897-1.629a.666.666 0 0 1 .868 0l1.897 1.629 1.906-1.63a.668.668 0 0 1 .867.002l2.33 2a.66.66 0 0 1 .23.455.661.661 0 0 1-.252.575.666.666 0 0 1-.846-.019l-1.897-1.628z",transform:"translate(1 2)"}),v||(v=eo.createElement("defs",null,eo.createElement("path",{id:"break_svg__a",d:"M0 0h16v16H0z"}))))};function eP(){return(eP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var eZ=function(e){return eo.createElement("svg",eP({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),eo.createElement("g",null,x||(x=eo.createElement("mask",{id:"chat-settings_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#chat-settings_svg__a"}))),eo.createElement("g",{mask:"url(#chat-settings_svg__b)"},eo.createElement("path",{style:{fill:"#333",opacity:1},d:"M6.728 14.598a.665.665 0 0 1-.828.434 7.294 7.294 0 0 1-3.187-1.945.666.666 0 0 1-.026-.896c.207-.241.31-.527.31-.857 0-.37-.13-.685-.389-.944A1.286 1.286 0 0 0 1.663 10h-.08a.662.662 0 0 1-.665-.288.665.665 0 0 1-.098-.235 7.234 7.234 0 0 1 .188-3.675.662.662 0 0 1 .635-.465h.02c.37 0 .684-.13.944-.392.26-.26.39-.574.39-.942 0-.215-.045-.415-.134-.6a.666.666 0 0 1 .148-.78A7.292 7.292 0 0 1 6.034.932a.666.666 0 0 1 .774.34c.11.219.272.394.483.524.216.135.454.202.712.202.254 0 .488-.067.703-.201.211-.131.372-.306.483-.524a.666.666 0 0 1 .773-.34 7.404 7.404 0 0 1 3.03 1.688.664.664 0 0 1 .143.8c-.09.174-.135.368-.135.583 0 .366.13.68.392.941.262.262.575.393.941.393h.03a.664.664 0 0 1 .636.465c.22.695.331 1.43.331 2.201a7.34 7.34 0 0 1-.143 1.474.66.66 0 0 1-.27.411.666.666 0 0 1-.478.115 1 1 0 0 0-.106-.003c-.367 0-.681.13-.941.39-.261.26-.392.574-.392.943 0 .322.106.61.317.865a.662.662 0 0 1 .1.686.671.671 0 0 1-.133.202 7.294 7.294 0 0 1-3.187 1.945.674.674 0 0 1-.503-.047.659.659 0 0 1-.325-.387 1.311 1.311 0 0 0-.477-.667 1.288 1.288 0 0 0-.789-.26c-.297 0-.564.087-.798.26-.23.17-.389.393-.477.667zm3.52-1.032c.626-.253 1.191-.6 1.696-1.042a2.603 2.603 0 0 1-.277-1.19 2.642 2.642 0 0 1 .784-1.888 2.646 2.646 0 0 1 1.51-.753 6.393 6.393 0 0 0-.118-2.067 2.655 2.655 0 0 1-1.394-.738 2.656 2.656 0 0 1-.782-1.884c0-.239.029-.468.087-.687a6.05 6.05 0 0 0-1.693-.954c-.182.22-.398.41-.65.566-.431.268-.9.402-1.408.402-.511 0-.983-.134-1.414-.401a2.632 2.632 0 0 1-.653-.567 5.936 5.936 0 0 0-1.69.957 2.74 2.74 0 0 1-.125 1.72c-.134.319-.324.601-.57.847a2.641 2.641 0 0 1-1.389.738 5.903 5.903 0 0 0-.12 2.069 2.642 2.642 0 0 1 1.509.753 2.654 2.654 0 0 1 .779 1.888c0 .433-.091.831-.274 1.192.504.44 1.068.787 1.692 1.04.172-.272.393-.507.664-.707.47-.348 1-.522 1.591-.522.587 0 1.115.174 1.584.523.27.2.49.435.661.705z"}),eo.createElement("path",{style:{fill:"#333",opacity:1},d:"M10.122 10.122a2.987 2.987 0 0 1-2.125.881 2.969 2.969 0 0 1-2.122-.883 2.983 2.983 0 0 1-.64-.955A2.984 2.984 0 0 1 5 7.997a2.974 2.974 0 0 1 .876-2.12A2.974 2.974 0 0 1 7.996 5c.407 0 .797.078 1.169.235.36.151.678.364.955.64a2.969 2.969 0 0 1 .883 2.122 2.987 2.987 0 0 1-.881 2.125zM7.997 6.333c-.461 0-.854.162-1.178.486a1.603 1.603 0 0 0-.486 1.178c0 .462.163.857.488 1.183.324.327.716.49 1.176.49.46 0 .855-.164 1.182-.491.327-.327.491-.721.491-1.182 0-.46-.163-.852-.49-1.
1176a1.618 1.618 0 0 0-1.183-.488z"}))),w||(w=eo.createElement("defs",null,eo.createElement("path",{id:"chat-settings_svg__a",d:"M0 0h16v16H0z"}))))},eT=n(24333);function eA(){return(eA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var eL=function(e){return eo.createElement("svg",eA({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),eo.createElement("g",null,y||(y=eo.createElement("mask",{id:"pin_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#pin_svg__a"}))),eo.createElement("g",{mask:"url(#pin_svg__b)"},eo.createElement("path",{style:{fill:"#333",opacity:1},d:"m6.685 8.81-4 5.44-.537-.394-.397-.536 5.42-4.01a.666.666 0 0 1 .866.062l.532.528 2.07 2.063-.471.473-.472-.472c.3-.3.457-.62.472-.963.015-.353-.108-.798-.37-1.333a.665.665 0 0 1 .017-.616l2.36-4.25a.662.662 0 0 1 .679-.336l1.65.24-.096.66-.472.471-3.77-3.77.472-.471.66-.096.24 1.65a.664.664 0 0 1-.337.678l-4.25 2.36a.665.665 0 0 1-.646.001c-.479-.265-.903-.388-1.27-.369-.358.018-.69.18-.996.487l-.471-.471.471-.472 2.06 2.06.52.52a.665.665 0 0 1 .066.867zM5.61 8.02l.537.396-.472.471-.52-.52-2.06-2.06a.665.665 0 0 1 0-.943c.548-.548 1.172-.84 1.87-.875.622-.032 1.283.146 1.984.533l-.322.584-.324-.583 4.25-2.36.324.583-.66.096-.24-1.65a.664.664 0 0 1 .66-.763.665.665 0 0 1 .471.195l3.77 3.77a.666.666 0 0 1-.567 1.131l-1.65-.24.096-.66.583.324-2.36 4.25-.583-.323.599-.293c.36.738.527 1.396.503 1.974-.029.689-.316 1.305-.86 1.85a.664.664 0 0 1-.842.083.667.667 0 0 1-.101-.082l-2.068-2.062-.531-.527.47-.473.396.535-5.42 4.01a.663.663 0 0 1-.791.002.664.664 0 0 1-.142-.932z"}))),_||(_=eo.createElement("defs",null,eo.createElement("path",{id:"pin_
1svg__a",d:"M0 0h16v16H0z"}))))},eD=n(12402),eI=n(38669),eH=n(82985);function eR(){return(eR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var eK=function(e){return eo.createElement("svg",eR({xmlns:"http://www.w3.org/2000/svg",fill:"none",height:16,width:16,xmlSpace:"preserve"},e),k||(k=eo.createElement("rect",{width:"100%",height:"100%"})),j||(j=eo.createElement("g",{className:"image_svg__currentLayer"},eo.createElement("g",{fill:"#333"},eo.createElement("path",{d:"M2.47 2.47h1.977v-.782H1.688v2.76h.781zM11.553 1.688v.781h1.978v1.978h.78V1.688zM13.53 13.53h-1.977v.782h2.759v-2.76h-.781zM2.47 11.553h-.782v2.759h2.76v-.781H2.468zM8.83 6.243c.682 0 1.237-.555 1.237-1.236S9.512 3.77 8.83 3.77a1.238 1.238 0 0 0 0 2.473zM3.77 12.23h8.46V9.71l-1.527-1.611-1.85 1.077-2.578-1.842L3.77 9.977z"})))))};function ez(){return(ez=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var eF=function(e){return eo.createElement("svg",ez({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),C||(C=eo.createElement("defs",null,eo.createElement("path",{id:"light_svg__a",d:"M0 0h16v16H0z"}))),eo.createElement("g",null,E||(E=eo.createElement("mask",{id:"light_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#light_svg__a"}))),eo.createElement("g",{mask:"url(#light_svg__b)"},eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M8.67 4.33C8.67 1.94 6.73 0 4.33 0 1.94 0 0 1.94 0 4.33a4.334 4.334 0 1 0 8.67 0Z",transform:"translate(3.667 3.667)"}),eo.createElement("path",{fillRule:"evenodd",style:{fill:"#333"},d:"M1.67.83C1.67.37 1.29 0 .83 0 .37 0 0 .37 0 .83c0 .46.37.84.83.84.46 0 .84-.38.84-.84Z",transform:"translate(7.167 .333)"}),eo.createElement("path",{fillRule:"evenodd",style:{fill:"#333"},d:"M1.67.83C1.67.37 1.29 0 .83 0 .37 0 0 .37 0 .83c0 .46.37.84.83.84.46 0 .84-.38.84-.84Z",transform:"translate(12 2.333)"}),eo.createElement("path",{fillRule:"evenodd",style:{fill:"#333"},d:"M1.67.83C1.67.37 1.29 0 .83 0 .37 0 0 .37 0 .83c0 .46.37.84.83.84.46 0 .84-.38.84-.84Z",transform:"translate(14 7.167)"}),eo.createElement("path",{fillRule:"evenodd",style:{fill:"#333"},d:"M1.67.83C1.67.37 1.29 0 .83 0 .37 0 0 .37 0 .83c0 .46.37.84.83.84.46 0 .84-.38.84-.84Z",transform:"translate(12 12)"}),eo.createElement("path",{fillRule:"evenodd",style:{fill:"#333"},d:"M1.67.83C1.67.37 1.29 0 .83 0 .37 0 0 .37 0 .83c0 .46.37.84.83.84.46 0 .84-.38.84-.84Z",transform:"translate(7.167 14)"}),eo.createElement("path",{fillRule:"evenodd",style:{fill:"#333"},d:"M1.67.83C1.67.37 1.29 0 .83 0 .37 0 0 .37 0 .83c0 .46.37.84.83.84.46 0 .84-.38.84-.84Z",transform:"translate(2.333 12)"}),eo.createElement("path",{fillRule:"evenodd",style:{fill:"#333"},d:"M1.67.83C1.67.37 1.29 0 .83 0 .37 0 0 .37 0 .83c0 .46.37.84.83.84.46 0 .84-.38.84-.84Z",transform:"translate(.333 7.167)"}),eo.createElement("path",{fillRule:"evenodd",style:{fill:"#333"},d:"M1.67.83C1.67.37 1.29 0 .83 0 .37 0 0 .37 0 .83c0 .46.37.84.83.84.46 0 .84-.38.84-.84Z",transform:"translate(2.333 2.333)"}))))};function eB(){return(eB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var eU=function(e){return eo.createElement("svg",eB({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),b||(b=eo.createElement("defs",null,eo.createElement("path",{id:"dark_svg__a",d:"M0 0h16v16H0z"}))),eo.createElement("g",null,S||(S=eo.createElement("mask",{id:"dark_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#dark_svg__a"}))),eo.createElement("g",{mask:"url(#dark_svg__b)"},eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M6.67 0C2.98 0 0 2.98 0 6.67a6.66 6.66 0 0 0 6.67 6.66c3.68 0 6.66-2.98 6.66-6.66 0-.47-.04-.92-.13-1.35a4.251 4.251 0 0 1-4.11 3.16c-2.34 0-4.24-1.89-4.24-4.24 0-1.97 1.34-3.63 3.17-4.1C7.58.05 7.13 0 6.67 0Z",transform:"translate(1.333 1.333)"}))))};function eW(){return(eW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var eV=function(e){return eo.createElement("svg",eW({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),M||(M=eo.createElement("defs",null,eo.createElement("path",{id:"auto_svg__a",d:"M0 0h16v16H0z"}
1))),eo.createElement("g",null,N||(N=eo.createElement("mask",{id:"auto_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#auto_svg__a"}))),eo.createElement("g",{mask:"url(#auto_svg__b)"},eo.createElement("path",{style:{stroke:"#333",strokeWidth:1,strokeOpacity:1,strokeDasharray:"0 0"},d:"m0 5.337.73-1.67m3.938 1.67-.73-1.67M.728 3.67 2.33 0l1.61 3.67M.73 3.667h3.21",transform:"translate(5.667 5.333)"}),eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M13.07 5.33A6.672 6.672 0 0 0 0 5.33l2-.66",transform:"translate(1.333 1.333)"}),eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M0 0a6.672 6.672 0 0 0 13.07 0l-1.74.67",transform:"translate(1.333 9.333)"}))))};function eG(){return(eG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var eX=function(e){return eo.createElement("svg",eG({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),O||(O=eo.createElement("defs",null,eo.createElement("path",{id:"bottom_svg__a",d:"M0 0h16v16H0z"}))),eo.createElement("g",null,P||(P=eo.createElement("mask",{id:"bottom_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#bottom_svg__a"}))),eo.createElement("g",{mask:"url(#bottom_svg__b)"},eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M8 0 4 4 0 0",transform:"translate(4 4)"}),eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M8 0 4 4 0 0",transform:"translate(4 8)"}))))};function eQ(){return(eQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var eq=function(e){return eo.createElement("svg",eQ({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),Z||(Z=eo.createElement("defs",null,eo.createElement("path",{id:"pause_svg__a",d:"M0 0h16v16H0z"}))),eo.createElement("g",null,T||(T=eo.createElement("mask",{id:"pause_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#pause_svg__a"}))),eo.createElement("g",{mask:"url(#pause_svg__b)"},eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M13.33 6.67A6.66 6.66 0 0 0 6.67 0C2.98 0 0 2.98 0 6.67a6.66 6.66 0 0 0 6.67 6.66c3.68 0 6.66-2.98 6.66-6.66Z",transform:"translate(1.333 1.333)"}),eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M0 0v4",transform:"translate(6.333 6)"}),eo.createElement("path",{style:{stroke:"#333",strokeWidth:1.3333333333333333,strokeOpacity:1,strokeDasharray:"0 0"},d:"M0 0v4",transform:"translate(9.667 6)"}))))};function eY(){return(eY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var eJ=function(e){return eo.createElement("svg",eY({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),eo.createElement("g",null,A||(A=eo.createElement("mask",{id:"robot_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#robot_svg__a"}))),eo.createElement("g",{mask:"url(#robot_svg__b)"},eo.createElement("path",{style:{fill:"#333",opacity:1},d:"M3.67 13.67h8.66c.002 0 .003-.001.003-.003V6.334H3.67c-.002 0-.003 0-.003.003v7.33c0 .002 0 .003.003.003zm0 1.333c-.37 0-.684-.13-.945-.391a1.288 1.288 0 0 1-.392-.945v-7.33c0-.37.13-.685.392-.946.26-.26.576-.391.945-.391h8.66c.37 0 .684.13.945.391.261.261.392.577.392.946v7.33c0 .369-.13.684-.392.945a1.288 1.288 0 0 1-.945.391z"}),eo.createElement("path",{style:{fill:"#333",opacity:1},d:"M9.819 6.127a.666.666 0 0 1-1.05-.81l1.67-2.67a.665.665 0 0 1 1.107-.034.663.663 0 0 1 .023.74l-1.67 2.67a.665.665 0 0 1-.08.104zM7.293 5.434a.665.665 0 0 1-1.01.779.665.665 0 0 1-.178-.19l-1.67-2.67a.665.665 0 0 1 .952-.89
16.665.665 0 0 1 .178.19l1.67 2.67a.665.665 0 0 1 .058.117z"}),eo.createElement("path",{style:{fill:"#333",opacity:1},d:"M11.337 2.333c-.003 0-.004.001-.004.004l-.001-.01a.007.007 0 0 0 .005.003h-.007v.007c0-.002 0-.004-.002-.005l.009.001zm0-1.333c.366 0 .679.131.939.394.258.261.387.575.387.943 0 .364-.13.676-.39.936s-.572.39-.936.39c-.368 0-.682-.129-.943-.388A1.273 1.273 0 0 1 10 2.337c0-.37.13-.685.391-.946.262-.26.577-.391.946-.391zM4.67 2.333c-.002 0-.003.001-.003.004 0-.005 0-.008-.002-.01a.007.007 0 0 0 .005.003h-.006v.007c0-.002-.001-.004-.003-.005l.009.001zM4.67 1c.366 0 .679.131.939.394.258.261.388.575.388.943 0 .364-.13.676-.39.936s-.573.39-.937.39c-.367 0-.681-.129-.943-.388a1.273 1.273 0 0 1-.394-.938c0-.37.13-.685.392-.946.26-.26.576-.391.945-.391zM6.663 10.003h2.67c.184 0 .34-.065.469-.194a.655.655 0 0 0 .195-.479.638.638 0 0 0-.196-.467.638.638 0 0 0-.468-.196h-2.67a.638.638 0 0 0-.467.196A.638.638 0 0 0 6 9.33c0 .188.065.347.195.479.128.13.284.194.468.194zm0 1.334a1.974 1.974 0 0 1-1.416-.59 2.001 2.001 0 0 1 1.416-3.413h2.67a1.99 1.99 0 0 1 1.41.587 1.99 1.99 0 0 1 .587 1.409 2.002 2.002 0 0 1-1.997 2.007zM2 10.663h1.003a.666.666 0 1 1 0 1.334h-1.67a.666.666 0 0 1-.666-.667V8a.665.665 0 0 1 .666-.667h1.67a.665.665 0 0 1 .555 1.037.665.665 0 0 1-.555.297H2zM14.8 7.346a.664.664 0 0 1 .537.654v3.33a.666.666 0 0 1-.667.667H13a.666.666 0 1 1 0-1.334h1.003V8.667H13a.665.665 0 0 1-.471-1.138.664.664 0 0 1 .471-.196h1.67c.044 0 .087.005.13.013z"}))),L||(L=eo.createElement("defs",null,eo.createElement("path",{id:"robot_svg__a",d:"M0 0h16v16H0z"}))))};function e$(){return(e$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var e0=function(e){return eo.createElement("svg",e$({width:16,height:16,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),D||(D=eo.createElement("path",{d:"M42 7H6a2 2 0 0 0-2 2v30a2 2 0 0 0 2 2h36a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2Z",stroke:"#333",strokeWidth:4})),I||(I=eo.createElement("path",{d:"M30 30V18l8 12V18M10 30V18l8 12V18",stroke:"#333",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})),H||(H=eo.createElement("path",{d:"M24 20v1M24 27v1",stroke:"#333",strokeWidth:4,strokeLinecap:"round"})))};function e3(){return(e3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var e1=function(e){return eo.createElement("svg",e3({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"#333",className:"hd_svg__bi hd_svg__bi-badge-hd"},e),R||(R=eo.createElement("path",{d:"M7.396 11V5.001H6.209v2.44H3.687V5H2.5v6h1.187V8.43h2.522V11zM8.5 5.001V11h2.188c1.811 0 2.685-1.107 2.685-3.015 0-1.894-.86-2.984-2.684-2.984zm1.187.967h.843c1.112 0 1.622.686 1.622 2.04 0 1.353-.505 2.02-1.622 2.02h-.843z"})),K||(K=eo.createElement("path",{d:"M14 3a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zM2 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2z"})))};function e6(){return(e6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var e2=function(e){return eo.createElement("svg",e6({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"#333",className:"palette_svg__bi palette_svg__bi-palette"},e),z||(z=eo.createElement("path",{d:"M8 5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3m4 3a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M5.5 7a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m.5 6a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"})),F||(F=eo.createElement("path",{d:"M16 8c0 3.15-1.866 2.585-3.567 2.07C11.42 9.763 10.465 9.473 10 10c-.603.683-.475 1.819-.351 2.92C9.826 14.495 9.996 16 8 16a8 8 0 1 1 8-8m-8 7c.611 0 .654-.171.655-.176.078-.146.124-.464.07-1.119-.014-.168-.037-.37-.061-.591-.052-.464-.112-1.005-.118-1.462-.01-.707.083-1.61.704-2.314.369-.417.845-.578 1.272-.618.404-.038.812.026 1.16.104.343.077.702.186 1.025.284l.028.008c.346.105.658.199.953.266.653.148.904.083.991.024C14.717 9.38 15 9.161 15 8a7 7 0 1 0-7 7"})))};function e4(){return(e4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var e8=function(e){return eo.createElement("svg",e4({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16,fill:"none"},e),eo.createElement("g",null,B||(B=eo.createElement("mask",{id:"plugin_svg__b",fill:"#fff"},eo.createElement("use",{xlinkHref:"#plugin_svg__a"}))),eo.createElement("g",{mask:"url(#plugin_svg__b)"},eo.createElement("path",{style:{fill:"#333",opacity:1},d:"M6.945 1.725c.261.26.392.576.392.945V6c0 .37-.13.684-.392.945A1.288 1.288 0 0 1 6 7.337H2.67c-.37 0-.684-.13-.945-.392A1.288 1.288 0 0 1 1.333 6V2.67c0-.37.13-.684.392-.945.26-.261.576-.392.945-.392H6c.37 0 .684.13.945.392zM2.667 6c0 .002 0 .003.003.003H6c.002 0 .003 0 .003-.003V2.67c0-.002 0-.003-.003-.003H2.67c-.002 0-.003 0-.003.003zM6.945 9.058c.261.261.392.576.392.945v3.33c0 .37-.13.685-.392.946A1.288 1.288 0 0 1 6 14.67H2.67c-.37 0-.684-.13-.945-.391a1.288 1.288 0 0 1-.392-.946v-3.33c0-.369.13-.684.392-.945.26-.26.576-.391.945-.391H6c.37 0 .684.13.945.391zm-4.278 4.275c0 .003 0 .004.003.004H6c.002 0 .003-.001.003-.004v-3.33c0-.002 0-.003-.003-.003H2.67c-.002 0-.003.001-.003.003zM13.789 6.455a2.987 2.987 0 0 1-2.126.882c-.407 0-.797-.08-1.169-.238a2.97 2.97 0 0 1-.952-.645 2.983 2.983 0 0 1-.64-.956 2.984 2.984 0 0 1-.235-1.168 2.974 2.974 0 0 1 .876-2.12 2.973 2.973 0 0 1 2.12-.877c.407 0 .796.079 1.169.235.36.151.678.365.955.64a2.97 2.97 0 0 1 .883 2.122 2.988 2.988 0 0 1-.882 2.125zm-2.126-3.788c-.46 0-.853.162-1.177.486A1.603 1.603 0 0 0 10 4.33c0 .462.162.857.487 1.184.325.326.717.49 1.176.49.461 0 .855-.164 1.183-.492.327-.327.49-.721.49-1.182 0-.46-.163-.851-.489-1.176a1.618 1.618 0 0 0-1.184-.487zM14.278 9.058c.261.261.392.576.392.945v3.33c0 .37-.13.685-.392.946a1.288 1.288 0 0 1-.945.391h-3.33c-.369 0-.684-.13-.945-.391a1.288 1.288 0 0 1-.391-.946v-3.33c0-.369.13-.684.391-.945.261-.26.576-.391.945-.391h3.33c.37 0 .684.13.945.391zM10 13.333c0 .003.001.004.003.004h3.33c.003 0 .004-.001.004-.004v-3.33c0-.002-.001-.003-.004-.003h-3.33c-.002 0-.003.001-.003.003z"}))),U||(U=eo.createElement("defs",null,eo.createElement("path",{id:"plugin_svg__a",d:"M0 0h16v16H0z"}))))};function e7(){return(e7=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var e9=function(e){return eo.createElement("svg",e7({width:16,height:16,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),W||(W=eo.createElement("path",{d:"M42 7H6a2 2 0 0 0-2 2v28a2 2 0 0 0 2 2h36a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2Z",stroke:"#000",strokeWidth:3,strokeLinejoin:"round"})),V||(V=eo.createElement("path",{d:"M12 19h2M21 19h2M29 19h7M12 28h24",stroke:"#000",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})))};function e5(){return(e5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var te=function(e){return eo.createElement("svg",e5({width:16,height:16,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),G||(G=eo.createElement("path",{d:"M4 28a2 2 0 0 1 2-2h4v12H6a2 2 0 0 1-2-2v-8ZM38 26h4a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-4V26Z"})),X||(X=eo.createElement("path",{d:"M10 36V24c0-7.732 6.268-14 14-14s14 6.268 14 14v12M10 26H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h4
1V26Zm28 0h4a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-4V26Z",stroke:"#333",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})),Q||(Q=eo.createElement("path",{d:"M16 32h4l2-6 4 12 2-6h4",stroke:"#333",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})))},tt=n(44922),tn=n(92944),ta=n(26757),ts=n(24232),tr=n(90684),ti=n(89570),tl=n(13894),to=n(35499),tc=n(3109),td=n.n(tc),th=n(65878),tu=n(59208),tm=n(75591),tp=n(770),tg=n(83921),tf=n(61643),tv=n(32360),tx=n(58669),tw=n(79296),ty=n.n(tw),t_=n(25640),tk={src:"/_next/static/media/bot.0c800005.png"},tj=n(72495),tC=n(88809),tE=n.n(tC),tb=n(75504);function tS(e){let t=(0,tt.aK)().currentSession(),n=e=>e.content&&!e.isError&&!e.streaming,a=(0,el.useMemo)(()=>{var e;let n=Math.max(0,null!==(e=t.clearContextIndex)&&void 0!==e?e:0);return n===t.messages.length-1&&(n=0),t.messages.slice(n)},[t.messages,t.clearContextIndex]),s=(0,el.useMemo)(()=>a.filter((e,t)=>e.id&&n(e)&&(t>=a.length-1||n(a[t+1]))),[a]),r=s.length,i=(0,tt.MG)(),[l,o]=(0,el.useState)(""),[c,d]=(0,el.useState)(new Set),h=e=>0===l.length||c.has(e),u=e=>{let t=new Set;e.length>0&&s.forEach(n=>(0,tn.YK)(n).includes(e)?t.add(n.id):null),d(t)},{startIndex:m,endIndex:p,onClickIndex:g}=function(){let[e,t]=(0,el.useState)(),[n,a]=(0,el.useState)(),[s,r]=(0,el.useState)(!1);return(0,el.useEffect)(()=>{let e=e=>{"Shift"===e.key&&r(!0)},n=e=>{"Shift"===e.key&&(r(!1),t(void 0),a(void 0))};return window.addEventListener("keyup",n),window.addEventListener("keydown",e),()=>{window.removeEventListener("keyup",n),window.removeEventListener("keydown",e)}},[]),{onClickIndex:n=>{s&&void 0!==e?a(n):(t(n),a(void 0))},startIndex:e,endIndex:n}}(),f=()=>{e.updateSelection(e=>s.forEach(t=>e.add(t.id)))};return(0,el.useEffect)(()=>{e.defaultSelectAll&&f()},[]),(0,el.useEffect)(()=>{if(void 0===m||void 0===p)return;let[t,n]=[m,p].sort((e,t)=>e-t);e.updateSelection(e=>{for(let r=t;r<=n;r+=1){var a;e.add(null!==(a=s[r].id)&&void 0!==a?a:r)}})},[m,p]),(0,er.jsxs)("div",{className:tE()["message-selector"],children:[(0,er.jsxs)("div",{className:tE()["message-filter"],children:[(0,er.jsx)("input",{type:"text",placeholder:tl.ZP.Select.Search,className:(0,tb.Z)(tE()["filter-item"],tE()["search-bar"]),value:l,onInput:e=>{o(e.currentTarget.value),u(e.currentTarget.value)}}),(0,er.jsxs)("div",{className:tE().actions,children:[(0,er.jsx)(to.h,{text:tl.ZP.Select.All,bordered:!0,className:tE()["filter-item"],onClick:f}),(0,er.jsx)(to.h,{text:tl.ZP.Select.Latest,bordered:!0,className:tE()["filter-item"],onClick:()=>e.updateSelection(e=>{e.clear(),s.slice(r-4).forEach(t=>e.add(t.id))})}),(0,er.jsx)(to.h,{text:tl.ZP.Select.Clear,bordered:!0,className:tE()["filter-item"],onClick:()=>e.updateSelection(e=>e.clear())})]})]}),(0,er.jsx)("div",{className:tE().messages,children:s.map((n,a)=>{var s;if(!h(n.id))return null;let r=null!==(s=n.id)&&void 0!==s?s:a,l=e.selection.has(r);return(0,er.jsxs)("div",{className:(0,tb.Z)(tE().message,{[tE()["message-selected"]]:e.selection.has(n.id)}),onClick:()=>{e.updateSelection(e=>{e.has(r)?e.delete(r):e.add(r)}),g(a)},children:[(0,er.jsx)("div",{className:tE().avatar,children:"user"===n.role?(0,er.jsx)(tp.qE,{avatar:i.avatar}):(0,er.jsx)(tg.MaskAvatar,{avatar:t.mask.avatar,model:n.model||t.mask.modelConfig.model})}),(0,er.jsxs)("div",{className:tE().body,children:[(0,er.jsx)("div",{className:tE().date,children:new Date(n.date).toLocaleString()}),(0,er.jsx)("div",{className:(0,tb.Z)(tE().content,"one-line"),children:(0,tn.YK)(n)})]}),(0,er.jsx)("div",{className:tE().checkbox,children:(0,er.jsx)("input",{type:"checkbox",checked:l,readOnly:!0})})]},a)})})]})}var tM=n(20703),tN=n(99823),tO=n(94880),tP=n(1610);let tZ=(0,ts.default)(async()=>(await Promise.all([n.e(721),n.e(3954),n.e(6991),n.e(6303)]).then(n.bind(n,42896))).Markdown,{loadableGenerated:{webpack:()=>[42896]},loading:()=>(0,er.jsx)(ek.Z,{})});function tT(e){return(0,er.jsx)("div",{className:"modal-mask",children:(0,er.jsx)(th.u_,{title:tl.ZP.Export.Title,onClose:e.onClose,footer:(0,er.jsx)("div",{style:{width:"100%",textAlign:"center",fontSize:14,opacity:.5},children:tl.ZP.Exporter.Description.Title}),children:(0,er.jsx)("div",{style:{minHeight:"40vh"},children:(0,er.jsx)(tL,{})})})})}function tA(e){let t=e.steps,n=t.length;return(0,er.jsxs)("div",{className:ty().steps,children:[(0,er.jsx)("div",{className:ty()["steps-progress"],children:(0,er.jsx)("div",{className:ty()["steps-progress-inner"],style:{width:"".concat((e.index+1)/n*100,"%")}})}),(0,er.jsx)("div",{className:ty()["steps-inner"],children:t.map((t,n)=>(0,er.jsxs)("div",{className:(0,tb.Z)("clickable",ty().step,{[ty()["step-finished"]]:n<=e.index,[ty()["step-current"]]:n===e.index}),onClick:()=>{var t;null===(t=e.onStepChange)||void 0===t||t.call(e,n)},role:"button",children:[(0,er.jsx)("span",{className:ty()["step-index"],children:n+1}),(0,er.jsx)("span",{className:ty()["step-name"],children:t.name})]},n))})]})}function tL(){let e=[{name:tl.ZP.Export.Steps.Select,value:"select"},{name:tl.ZP.Export.Steps.Preview,value:"preview"}
1],{currentStep:t,setCurrentStepIndex:n,currentStepIndex:a}=function(e){let t=e.length,[n,a]=(0,el.useState)(0);return{currentStepIndex:n,setCurrentStepIndex:a,nextStep:()=>a((n+1)%t),prevStep:()=>a((n-1+t)%t),currentStep:e[n]}}(e),[s,r]=(0,el.useState)({format:"image",includeContext:!0});function i(e){let t={...s};e(t),r(t)}let l=(0,tt.aK)().currentSession(),{selection:o,updateSelection:c}=function(){let[e,t]=(0,el.useState)(new Set);return{selection:e,updateSelection:n=>{let a=new Set(e);n(a),t(a)}}}(),d=(0,el.useMemo)(()=>{let e=[];return s.includeContext&&e.push(...l.mask.context),e.push(...l.messages.filter(e=>o.has(e.id))),e},[s.includeContext,l.messages,l.mask.context,o]);return(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(tA,{steps:e,index:a,onStepChange:n}),(0,er.jsxs)("div",{className:ty()["message-exporter-body"],style:"select"!==t.value?{display:"none"}:{},children:[(0,er.jsxs)(th.aV,{children:[(0,er.jsx)(th.HC,{title:tl.ZP.Export.Format.Title,subTitle:tl.ZP.Export.Format.SubTitle,children:(0,er.jsx)(th.Ph,{value:s.format,onChange:e=>i(t=>t.format=e.currentTarget.value),children:["text","image","json"].map(e=>(0,er.jsx)("option",{value:e,children:e},e))})}),(0,er.jsx)(th.HC,{title:tl.ZP.Export.IncludeContext.Title,subTitle:tl.ZP.Export.IncludeContext.SubTitle,children:(0,er.jsx)("input",{type:"checkbox",checked:s.includeContext,onChange:e=>{i(t=>t.includeContext=e.currentTarget.checked)}})})]}),(0,er.jsx)(tS,{selection:o,updateSelection:c,defaultSelectAll:!0})]}),"preview"===t.value&&(0,er.jsx)("div",{className:ty()["message-exporter-body"],children:"text"===s.format?(0,er.jsx)(tK,{messages:d,topic:l.topic}):"json"===s.format?(0,er.jsx)(tz,{messages:d,topic:l.topic}):(0,er.jsx)(tR,{messages:d,topic:l.topic})})]})}function tD(e){let t=(0,el.useRef)(null);return(0,el.useEffect)(()=>{if(!t.current)return;let n=Array.from(t.current.getElementsByClassName(tm.yY));if(n.length!==e.messages.length)return;let a=n.map((e,t)=>{var n;let[a,s]=e.id.split(":");return{id:t.toString(),role:a,content:"user"===a?null!==(n=e.textContent)&&void 0!==n?n:"":e.innerHTML,date:""}});e.onRender(a)},[]),(0,er.jsx)("div",{ref:t,children:e.messages.map((e,t)=>(0,er.jsx)("div",{id:"".concat(e.role,":").concat(t),className:tm.yY,children:(0,er.jsx)(tZ,{content:(0,tn.YK)(e),defaultShow:!0})},t))})}function tI(e){var t;let[n,a]=(0,el.useState)(!1),[s,r]=(0,el.useState)(!1),i=(0,tt.MG)(),l=async()=>{var t;(null===(t=e.messages)||void 0===t?void 0:t.length)&&(a(!0),r(!0))};return(0,er.jsxs)(er.Fragment,{children:[(0,er.jsxs)("div",{className:ty()["preview-actions"],children:[e.showCopy&&(0,er.jsx)(to.h,{text:tl.ZP.Export.Copy,bordered:!0,shadow:!0,icon:(0,er.jsx)(ev.Z,{}),onClick:e.copy}),(0,er.jsx)(to.h,{text:tl.ZP.Export.Download,bordered:!0,shadow:!0,icon:(0,er.jsx)(tj.Z,{}),onClick:e.download}),(0,er.jsx)(to.h,{text:tl.ZP.Export.Share,bordered:!0,shadow:!0,icon:n?(0,er.jsx)(ek.Z,{}):(0,er.jsx)(eg.Z,{}),onClick:l})]}),(0,er.jsx)("div",{style:{position:"fixed",right:"200vw",pointerEvents:"none"},children:s&&(0,er.jsx)(tD,{messages:null!==(t=e.messages)&&void 0!==t?t:[],onRender:e=>{r(!1),(0,tP.Lw)(i.modelConfig.providerName).share(e).then(e=>{e&&((0,th.K4)({title:tl.ZP.Export.Share,children:[(0,er.jsx)("input",{type:"text",value:e,style:{width:"100%",maxWidth:"unset"},readOnly:!0,onClick:e=>e.currentTarget.select()},"input")],actions:[(0,er.jsx)(to.h,{icon:(0,er.jsx)(ev.Z,{}),text:tl.ZP.Chat.Actions.Copy,onClick:()=>(0,tn.vQ)(e)},"copy")]}),setTimeout(()=>{window.open(e,"_blank")},800))}).catch(e=>{console.error("[Share]",e),(0,th.CF)((0,tx.B)(e))}).finally(()=>a(!1))}})})]})}function tH(e){return e.avatar===tf._G?(0,er.jsx)("img",{src:tk.src,width:30,height:30,alt:"bot",className:"user-avatar"}):(0,er.jsx)(tp.qE,{avatar:e.avatar})}function tR(e){var t,n;let a=(0,tt.aK)().currentSession(),s=a.mask,r=(0,tt.MG)(),i=(0,el.useRef)(null),l=(0,tn.S0)(),o=async()=>{var t;(0,th.CF)(tl.ZP.Export.Image.Toast);let n=i.current;if(!n)return;let a=null===(t=(0,tO.Z)())||void 0===t?void 0:t.isApp;try{let t=await (0,tN.YM)(n);if(!t)return;if(l||a&&window.__TAURI__){if(a&&window.__TAURI__){let n=await window.__TAURI__.dialog.save({defaultPath:"".concat(e.topic,".png"),filters:[{name:"PNG Files",extensions:["png"]},{name:"All Files",extensions:["*"]}]});if(null!==n){let e=await fetch(t),a=await e.arrayBuffer(),s=new Uint8Array(a);await window.__TAURI__.fs.writeBinaryFile(n,s),(0,th.CF)(tl.ZP.Download.Success)}else(0,th.CF)(tl.ZP.Download.Failed)}else(0,th.vi)(t)}else{let n=document.createElement("a");n.download="".concat(e.topic,".png"),n.href=t,n.click(),c()}}catch(e){(0,th.CF)(tl.ZP.Download.Failed)}},c=()=>{let e=i.current;e&&(e.innerHTML=e.innerHTML)};return(0,er.jsxs)("div",{className:ty()["image-previewer"],children:[(0,er.jsx)(tI,{copy:()=>{(0,th.CF)(tl.ZP.Export.Image.Toast);let e=i.current;e&&(0,tN.SE)(e).then(e=>{if(e)try{navigator.clipboard.write([new ClipboardItem({"image/png":e})]).then(()=>{(0,th.CF)(tl.ZP.Copy.Success),c()})}catch(e){console.error("[Copy Image] ",e),(0,th.CF)(tl.ZP.Copy.Failed)}})},download:o,showCopy:!l,messages:e.messages}),(0,er.jsxs)("div",{className:(0,tb.Z)(ty()["preview-body"],ty()["default-theme"]),ref:i,children:[(0,er.jsxs)("div",{className:ty()["chat-info"],children:[(0,er.jsx)("div",{className:(0,tb.Z)(ty().logo,"no-dark"),children:(0,er.jsx)(tM.default,{src:t_.Z.src,alt:"logo",width:50,height:50})}),(0,er.jsxs)("div",{children:[(0,er.jsx)("div",{className:ty()["main-title"],children:"NextChat"}),(0,er.jsx)("div",{className:ty()["sub-title"],children:"github.com/ChatGPTNextWeb/ChatGPT-Next-Web"}),(0,er.jsxs)("div",{className:ty().icons,children:[(0,er.jsx)(tH,{avatar:r.avatar}),(0,er.jsx)("span",{className:ty()["icon-space"],children:"&"}),(0,er.jsx)(tH,{avatar:s.avatar})]})]}),(0,er.jsxs)("div",{children:[(0,er.jsxs)("div",{className:ty()["chat-info-item"],children:[tl.ZP.Exporter.Model,": ",s.modelConfig.model]}),(0,er.jsxs)("div",{className:ty()["chat-info-item"],children:[tl.ZP.Exporter.Messages,": ",e.messages.length]}),(0,er.jsxs)("div",{className:ty()["chat-info-item"],children:[tl.ZP.Exporter.Topic,": ",a.topic]}),(0,er.jsxs)("div",{className:ty()["chat-info-item"],children:[tl.ZP.Exporter.Time,":"," ",new Date(null!==(n=null===(t=e.messages.at(-1))||void 0===t?void 0:t.date)&&void 0!==n?n:Date.now()).toLocaleStr
1ing()]})]})]}),e.messages.map((e,t)=>(0,er.jsxs)("div",{className:(0,tb.Z)(ty().message,ty()["message-"+e.role]),children:[(0,er.jsx)("div",{className:ty().avatar,children:(0,er.jsx)(tH,{avatar:"user"===e.role?r.avatar:s.avatar})}),(0,er.jsxs)("div",{className:ty().body,children:[(0,er.jsx)(tZ,{content:(0,tn.YK)(e),fontSize:r.fontSize,fontFamily:r.fontFamily,defaultShow:!0}),1==(0,tn.Bs)(e).length&&(0,er.jsx)("img",{src:(0,tn.Bs)(e)[0],alt:"message",className:ty()["message-image"]},t),(0,tn.Bs)(e).length>1&&(0,er.jsx)("div",{className:ty()["message-images"],style:{"--image-count":(0,tn.Bs)(e).length},children:(0,tn.Bs)(e).map((e,t)=>(0,er.jsx)("img",{src:e,alt:"message",className:ty()["message-image-multi"]},t))})]})]},t))]})]})}function tK(e){let t="# ".concat(e.topic,"\n\n")+e.messages.map(e=>"user"===e.role?"## ".concat(tl.ZP.Export.MessageFromYou,":\n").concat((0,tn.YK)(e)):"## ".concat(tl.ZP.Export.MessageFromChatGPT,":\n").concat((0,tn.YK)(e).trim())).join("\n\n");return(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(tI,{copy:()=>{(0,tn.vQ)(t)},download:()=>{(0,tn.CP)(t,"".concat(e.topic,".md"))},showCopy:!0,messages:e.messages}),(0,er.jsx)("div",{className:"markdown-body",children:(0,er.jsx)("pre",{className:ty()["export-content"],children:t})})]})}function tz(e){let t={messages:[{role:"system",content:"".concat(tl.ZP.FineTuned.Sysmessage," ").concat(e.topic)},...e.messages.map(e=>({role:e.role,content:e.content}))]},n="```json\n"+JSON.stringify(t,null,2)+"\n```",a=JSON.stringify(t),s=()=>{(0,tn.vQ)(a)};return(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(tI,{copy:s,download:()=>{(0,tn.CP)(JSON.stringify(t),"".concat(e.topic,".json"))},showCopy:!1,messages:e.messages}),(0,er.jsx)("div",{className:"markdown-body",onClick:s,children:(0,er.jsx)(tZ,{content:n})})]})}var tF=n(20234),tB=n(8620),tU=n(27815),tW=n(37906);(r=q||(q={})).SILENT="silent",r.X_SOFT="x-soft",r.SOFT="soft",r.MEDIUM="medium",r.LOUD="loud",r.X_LOUD="x-LOUD",r.DEFAULT="default",(i=Y||(Y={})).X_SLOW="x-slow",i.SLOW="slow",i.MEDIUM="medium",i.FAST="fast",i.X_FAST="x-fast",i.DEFAULT="default",(l=J||(J={})).X_LOW="x-low",l.LOW="low",l.MEDIUM="medium",l.HIGH="high",l.X_HIGH="x-high",l.DEFAULT="default",(o=$||($={})).AUDIO_24KHZ_48KBITRATE_MONO_MP3="audio-24khz-48kbitrate-mono-mp3",o.AUDIO_24KHZ_96KBITRATE_MONO_MP3="audio-24khz-96kbitrate-mono-mp3",o.WEBM_24KHZ_16BIT_MONO_OPUS="webm-24khz-16bit-mono-opus";class tV{constructor(){this.pitch="+0Hz",this.rate=1,this.volume=100}}class tG{_log(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];this._enableLogger&&console.log(...t)}async _send(e){for(let e=1;e<=3&&this._ws.readyState!==this._ws.OPEN;e++)1==e&&(this._startTime=Date.now()),this._log("connecting: ",e),await this._initClient();this._ws.send(e)}_initClient(){return this._ws=new WebSocket(tG.SYNTH_URL),this._ws.binaryType="arraybuffer",new Promise((e,t)=>{this._ws.onopen=()=>{this._log("Connected in",(Date.now()-this._startTime)/1e3,"seconds"),this._send('Content-Type:application/json; charset=utf-8\r\nPath:speech.config\r\n\r\n\n                    {\n                        "context": {\n                            "synthesis": {\n                                "audio": {\n                                    "metadataoptions": {\n                                        "sentenceBoundaryEnabled": "false",\n                                        "wordBoundaryEnabled": "false"\n                                    },\n                                    "outputFormat": "'.concat(this._outputFormat,'" \n                                }\n                            }\n                        }\n                    }\n                ')).then(e)},this._ws.onmessage=e=>{let t=tB.Buffer.from(e.data),n=t.toString(),a=/X-RequestId:(.*?)\r\n/gm.exec(n)[1];n.includes("Path:turn.start")||(n.includes("Path:turn.end")?this._streams[a].push(null):n.includes("Path:response")||(n.includes("Path:audio")&&e.data instanceof ArrayBuffer?this._pushAudioData(t,a):this._log("UNKNOWN MESSAGE",n)))},this._ws.onclose=()=>{for(let e in this._log("disconnected after:",(Date.now()-this._startTime)/1e3,"seconds"),this._streams)this._streams[e].push(null)},this._ws.onerror=function(e){t("Connect Error: "+e)}})}_pushAudioData(e,t){let n=e.indexOf(tG.BINARY_DELIM)+tG.BINARY_DELIM.length,a=e.subarray(n);this._streams[t].push(a),this._log("received audio chunk, size: ",null==a?void 0:a.length)}_SSMLTemplate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t={...new tV,...t},'<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xml:lang="'.concat(this._voiceLocale,'">\n                <voice name="').concat(this._voice,'">\n                    <prosody pitch="').concat(t.pitch,'" rate="').concat(t.rate,'" volume="').concat(t.volume,'">\n                        ').concat(e,"\n                    </prosody> \n                </voice>\n            </speak>")}getVoices(){return fetch(tG.VOICES_URL).then(e=>{if(!e.ok)throw Error("Network response was not ok");return e.json()}).then(e=>e).catch(e=>{throw e})}async setMetadata(e,t,n){let a=this._voice,s=this._voiceLocale,r=this._outputFormat;if(this._voice=e,this._voiceLocale=n,!this._voiceLocale){let e=tG.VOICE_LANG_REGEX.exec(this._voice);if(!e)throw Error("Could not infer voiceLocale from voiceName!");this._voiceLocale=e[0]}this._outputFormat=t,(a!==this._voice||s!==this._voiceLocale||r!==this._outputFormat||this._ws.readyState!==this._ws.OPEN)&&(this._startTime=Date.now(),await this._initClient())}_metadataCheck(){if(!this._ws)throw Error("Speech synthesis not configured yet. Run setMetadata before calling toStream or toFile.")}close(){this._ws.close()}toStream(e,t){let{stream:n}=this._rawSSMLRequest(this._SSMLTemplate(e,t));return n}toArrayBuffer(e,t){return new Promise((n,a)=>{let s=[],r=this.toStream(e,t);r.on("data",e=>{s.push(e)}),r.on("end",()=>{n(tB.Buffer.concat(s).buffer)}),r.on("error",e=>{a(e)})})}rawToStream(e){let{stream:t}=this._rawSSMLRequest(e);return t}_rawSSMLRequest(e){this._metadataCheck();let t=(0,tU.randomBytes)(16).toString("hex"),n="X-RequestId:".concat(t,"\r\nContent-Type:application/ssml+xml\r\nPath:ssml\r\n\r\n\n                ")+e.trim(),a=this,s=new tW.Readable({read(){},destroy(e,n){delete a._streams[t],n(e)}});return this._streams[t]=s,this._send(n).then(),{stream:s,requestId:t}}constructor(e=!1){this._streams={},this._startTime=0,this._enableLogger=e}}tG.OUTPUT_FORMAT=$,tG.TRUSTED_CLIENT_TOKEN="6A5AA1D4EAFF4E9FB37E23D68491D6F4",tG.VOICES_URL="https://speech.platform.bing.com/consumer/speech/synthesize/readaloud/voices/list?trustedclienttoken=".concat(tG.TRUSTED_CLIENT_TOKEN),tG.SYNTH_URL="wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=".concat(tG.TRUSTED_CLIENT_TOKEN),tG.BINARY_DELIM="Path:audio\r\n",tG.VOICE_LANG_REGEX=/\w{2}-\w{2}/;var tX=n(10307),tQ=n(85564);function tq(){return(tq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var tY=function(e){return eo.createElement("svg",tq({width:24,height:24,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ee||(ee=eo.createElement("rect",{x:17,y:4,width:14,height:27,rx:7,stroke:"#333",strokeWidth:4,strokeLinejoin:"round"})),et||(et=eo.createElement("path",{d:"M9 23c0 8.284 6.716 15 15 15 8.284 0 15-6.716 15-15M24 38v6",stroke:"#333",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})))};function tJ(){return(tJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var t$=function(e){return eo.createElement("svg",tJ({width:24,height:24,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),en||(en=eo.createElement("path",{d:"M31 24V11a7 7 0 1 0-14 0v13a7 7 0 1 0 14 0Z",stroke:"#d0021b",strokeWidth:4,strokeLinejoin:"round"})),ea||(ea=eo.createElement("path",{d:"M9 23c0 8.284 6.716 15 15 15 1.753 0 3.436-.3 5-.853M39 23a14.95 14.95 0 0 1-1.248 6M24 38v6M42 42 6 6",stroke:"#d0021b",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})))};function t0(){return(t0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var t3=function(e){return eo.createElement("svg",t0({width:24,height:24,viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),es||(es=eo.createElement("path",{d:"M14.5 8a19.05 19.05 0 0 0-4.75 3.84C6.794 15.146 5 19.49 5 24.245 5 34.603 13.507 43 24 43s19-8.397 19-18.755c0-4.756-1.794-9.099-4.75-12.405A19.02 19.02 0 0 0 33.5 8M24 4v20",stroke:"#333",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})))},t1=n(2366),t6=n.n(t1),t2=n(27130);class t4{getByteFrequencyData(){return this.analyser.getByteFrequencyData(this.analyserData),this.analyserData}async initialize(){await this.context.audioWorklet.addModule("/audio-processor.js")}async startRecording(e){try{this.workletNode||await this.initialize(),this.stream=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,sampleRate:this.sampleRate,echoCancellation:!0,noiseSuppression:!0}}),await this.context.resume(),this.source=this.context.createMediaStreamSource(this.stream),this.workletNode=new AudioWorkletNode(this.context,"audio-recorder-processor"),this.workletNode.port.onmessage=t=>{if("audio"===t.data.eventType){let n=t.data.audioData,a=new Int16Array(n.length);for(let e=0;e<n.length;e++){let t=Math.max(-1,Math.min(1,n[e]));a[e]=t<0?32768*t:32767*t}let s=new Uint8Array(a.buffer);e(s),this.recordBuffer.push.apply(this.recordBuffer,a)}},this.source.connect(this.workletNode),this.source.connect(this.mergeNode,0,0),this.workletNode.connect(this.context.destination),this.workletNode.port.postMessage({command:"START_RECORDING"})}catch(e){throw console.error("Error starting recording:",e),e}}stopRecording(){if(!this.workletNode||!this.source||!this.stream)throw Error("Recording not started");this.workletNode.port.postMessage({command:"STOP_RECORDING"}),this.workletNode.disconnect(),this.source.disconnect(),this.stream.getTracks().forEac
1h(e=>e.stop())}startStreamingPlayback(){this.isPlaying=!0,this.nextPlayTime=this.context.currentTime}stopStreamingPlayback(){this.isPlaying=!1,this.playbackQueue.forEach(e=>e.stop()),this.playbackQueue=[],this.playBuffer=[]}playChunk(e){if(!this.isPlaying)return;let t=new Int16Array(e.buffer);this.playBuffer.push.apply(this.playBuffer,t);let n=new Float32Array(t.length);for(let e=0;e<t.length;e++)n[e]=t[e]/(t[e]<0?32768:32767);let a=this.context.createBuffer(1,n.length,this.sampleRate);a.getChannelData(0).set(n);let s=this.context.createBufferSource();s.buffer=a,s.connect(this.context.destination),s.connect(this.mergeNode,0,1);let r=a.length/this.sampleRate;s.start(this.nextPlayTime),this.playbackQueue.push(s),s.onended=()=>{let e=this.playbackQueue.indexOf(s);e>-1&&this.playbackQueue.splice(e,1)},this.nextPlayTime+=r,this.nextPlayTime<this.context.currentTime&&(this.nextPlayTime=this.context.currentTime)}_saveData(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n=e.buffer.byteLength,a=new Uint8Array(44),s=new DataView(a.buffer);return s.setUint32(0,1380533830,!1),s.setUint32(4,36+n,!0),s.setUint32(8,1463899717,!1),s.setUint32(12,1718449184,!1),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,this.sampleRate,!0),s.setUint32(28,4*this.sampleRate,!0),s.setUint16(32,2,!0),s.setUint16(34,t,!0),s.setUint32(36,1684108385,!1),s.setUint32(40,n,!0),new Blob([s,e.buffer],{type:"audio/mpeg"})}savePlayFile(){return this._saveData(new Int16Array(this.playBuffer))}saveRecordFile(e,t){let n=e?Math.floor(e*this.sampleRate/1e3):0,a=t?Math.floor(t*this.sampleRate/1e3):this.recordBuffer.length;return this._saveData(new Int16Array(this.recordBuffer.slice(n,a)))}async close(){var e,t,n;this.recordBuffer=[],null===(e=this.workletNode)||void 0===e||e.disconnect(),null===(t=this.source)||void 0===t||t.disconnect(),null===(n=this.stream)||void 0===n||n.getTracks().forEach(e=>e.stop()),await this.context.close()}constructor(){this.workletNode=null,this.stream=null,this.source=null,this.recordBuffer=[],this.sampleRate=24e3,this.nextPlayTime=0,this.isPlaying=!1,this.playbackQueue=[],this.playBuffer=[],this.context=new AudioContext({sampleRate:this.sampleRate}),this.mergeNode=new ChannelMergerNode(this.context,{numberOfInputs:2}),this.analyser=new AnalyserNode(this.context,{fftSize:256}),this.analyserData=new Uint8Array(this.analyser.frequencyBinCount),this.mergeNode.connect(this.analyser)}}var t8=n(69927),t7=n.n(t8);function t9(e){let{frequencies:t,isActive:n}=e,a=(0,el.useRef)(null),s=(0,el.useRef)([]),r=(0,el.useRef)(10),i=(0,el.useRef)(),l=(0,el.useCallback)(e=>{s.current.push(e),s.current.length>r.current&&s.current.shift()},[]);return(0,el.useEffect)(()=>{let e=a.current;if(!e)return;let r=e.getContext("2d");if(!r)return;let o=window.devicePixelRatio||1;e.width=e.offsetWidth*o,e.height=e.offsetHeight*o,r.scale(o,o);let c=()=>{if(r.clearRect(0,0,e.width,e.height),!t||!n){s.current=[];return}l(Array.from(t));let a=[],o=e.height/2,d=e.width/(t.length-1);r.beginPath(),r.moveTo(0,o);for(let n=0;n<t.length;n++){let i=n*d,l=t[n];s.current.length>0&&(l=(l+s.current.map(e=>e[n]||0).reduce((e,t)=>e+t,0))/(s.current.length+1));let c=l/255,h=o+e.height/2*c*Math.sin(.2*n+.002*Date.now());if(a.push([i,h]),0===n)r.moveTo(i,h);else{let e=a[n-1],t=(e[0]+i)/2;r.quadraticCurveTo(e[0],e[1],t,(e[1]+h)/2)}}for(let e=a.length-1;e>=0;e--){let[t,n]=a[e],s=o-(n-o);if(e===a.length-1)r.lineTo(t,s);else{let s=a[e+1],i=(s[0]+t)/2;r.quadraticCurveTo(s[0],o-(s[1]-o),i,o-((s[1]+n)/2-o))}}r.closePath();let h=r.createLinearGradient(0,0,e.width,0);h.addColorStop(0,"rgba(100, 180, 255, 0.95)"),h.addColorStop(.5,"rgba(140, 200, 255, 0.9)"),h.addColorStop(1,"rgba(180, 220, 255, 0.95)"),r.fillStyle=h,r.fill(),i.current=requestAnimationFrame(c)};return c(),()=>{i.current&&cancelAnimationFrame(i.current)}},[t,n,l]),(0,er.jsx)("div",{className:t7()["voice-print"],children:(0,er.jsx)("canvas",{ref:a})})}function t5(e){let{onClose:t,onStartVoice:n,onPausedVoice:a}=e,s=(0,tt.aK)(),r=s.currentSession(),i=(0,tt.MG)(),[l,o]=(0,el.useState)(""),[c,d]=(0,el.useState)(!1),[h,u]=(0,el.useState)(!1),[m,p]=(0,el.useState)(!1),[g,f]=(0,el.useState)("audio"),[v,x]=(0,el.useState)(!0),[w,y]=(0,el.useState)(),_=(0,el.useRef)(null),k=(0,el.useRef)(null),j=(0,el.useRef)(!1),C=i.realtimeConfig.temperature,E=i.realtimeConfig.apiKey,b=i.realtimeConfig.model,S="Azure"===i.realtimeConfig.provider,M=i.realtimeConfig.azure.endpoint,N=i.realtimeConfig.azure.deployment,O=i.realtimeConfig.voice,P=async()=>
1{if(!m){if(h)await Z();else try{p(!0),_.current=S?new t2.G2(new URL(M),{key:E},{deployment:N}):new t2.G2({key:E},{model:b}),await _.current.configure({instructions:"",voice:O,input_audio_transcription:{model:"whisper-1"},turn_detection:v?{type:"server_vad"}:null,tools:[],temperature:C,modalities:"audio"===g?["text","audio"]:["text"]}),T(),u(!0)}catch(e){console.error("Connection failed:",e),o("Connection failed")}finally{p(!1)}}},Z=async()=>{if(_.current)try{await _.current.close(),_.current=null,u(!1)}catch(e){console.error("Disconnect failed:",e)}},T=async()=>{if(_.current)try{for await(let e of _.current.events())"response"===e.type?await A(e):"input_audio"===e.type&&await L(e)}catch(e){_.current&&console.error("Response iteration error:",e)}},A=async e=>{for await(let n of e)if("message"===n.type&&"assistant"===n.role){let e=(0,tt.tn)({role:n.role,content:""});s.updateTargetSession(r,t=>{t.messages=t.messages.concat([e])});let a=!1;for await(let t of n){if("text"===t.type)for await(let n of t.textChunks())e.content+=n;else if("audio"===t.type){let n=async()=>{for await(let n of t.transcriptChunks())e.content+=n},s=async()=>{var e,n;for await(let s of(null===(e=k.current)||void 0===e||e.startStreamingPlayback(),t.audioChunks()))a=!0,null===(n=k.current)||void 0===n||n.playChunk(s)};await Promise.all([n(),s()])}s.updateTargetSession(r,e=>{e.messages=e.messages.concat()})}if(a){var t;let n=null===(t=k.current)||void 0===t?void 0:t.savePlayFile();(0,ta.Ix)(n).then(t=>{e.audio_url=t,s.updateTargetSession(r,e=>{e.messages=e.messages.concat()})})}}},L=async e=>{var t,n;if(await e.waitForCompletion(),e.transcription){let t=(0,tt.tn)({role:"user",content:e.transcription});s.updateTargetSession(r,e=>{e.messages=e.messages.concat([t])});let{audioStartMillis:a,audioEndMillis:i}=e,l=null===(n=k.current)||void 0===n?void 0:n.saveRecordFile(a,i);(0,ta.Ix)(l).then(e=>{t.audio_url=e,s.updateTargetSession(r,e=>{e.messages=e.messages.concat()})})}null===(t=k.current)||void 0===t||t.stopStreamingPlayback()},D=async()=>{if(!c&&_.current)try{k.current||(k.current=new t4,await k.current.initialize()),await k.current.startRecording(async e=>{var t;await (null===(t=_.current)||void 0===t?void 0:t.sendAudio(e))}),d(!0)}catch(e){console.error("Failed to start recording:",e)}else if(k.current)try{if(k.current.stopRecording(),!v){var e,t;let n=await (null===(e=_.current)||void 0===e?void 0:e.commitAudio());await L(n),await (null===(t=_.current)||void 0===t?void 0:t.generateResponse())}d(!1)}catch(e){console.error("Failed to stop recording:",e)}};(0,el.useEffect)(()=>{if(!j.current)return j.current=!0,(async()=>{let e=new t4;await e.initialize(),k.current=e,await P(),await D()})().catch(e=>{o(e),console.error(e)}),()=>{var e;c&&D(),null===(e=k.current)||void 0===e||e.close().catch(console.error),Z()}},[]),(0,el.useEffect)(()=>{let e;if(h&&c){let t=()=>{k.current&&y(k.current.getByteFrequencyData()),e=requestAnimationFrame(t)};e=requestAnimationFrame(t)}else y(void 0);return()=>{e&&cancelAnimationFrame(e)}},[h,c]),(0,el.useEffect)(()=>{var e;null===(e=_.current)||void 0===e||e.configure({voice:O})},[O]),(0,el.useEffect)(()=>{var e;null===(e=_.current)||void 0===e||e.configure({temperature:C})},[C]);let I=async()=>{null==t||t(),c&&await D(),Z().catch(console.error)};return(0,er.jsxs)("div",{className:t6()["realtime-chat"],children:[(0,er.jsx)("div",{className:(0,tb.Z)(t6()["circle-mic"],{[t6().pulse]:c}),children:(0,er.jsx)(t9,{frequencies:w,isActive:c})}),(0,er.jsxs)("div",{className:t6()["bottom-icons"],children:[(0,er.jsx)("div",{children:(0,er.jsx)(to.h,{icon:c?(0,er.jsx)(tY,{}):(0,er.jsx)(t$,{}),onClick:D,disabled:!h,shadow:!0,bordered:!0})}),(0,er.jsx)("div",{className:t6()["icon-center"],children:l}),(0,er.jsx)("div",{children:(0,er.jsx)(to.h,{icon:(0,er.jsx)(t3,{}),onClick:I,shadow:!0,bordered:!0})})]})]})}let ne=(0,tn.EN)(),nt=(a=null,s=null,{init:()=>{(a=new(window.AudioContext||window.webkitAudioContext)).suspend()},play:async(e,t)=>{s&&(s.stop(),s.disconnect());let n=await a.decodeAudioData(e);(s=a.createBufferSource()).buffer=n,s.connect(a.destination),a.resume().then(()=>{s.start()}),s.onended=t},stop:()=>{s&&(s.stop(),s.disconnect(),s=null),a&&(a.close(),a=null)}}),nn=(0,ts.default)(async()=>(await Promise.all([n.e(721),n.e(3954),n.e(6991),n.e(6303)]).then(n.bind(n,42896))).Markdown,{loadableGenerated:{webpack:()=>[42896]},loading:()=>(0,er.jsx)(ek.Z,{})});function na(e){let t=(0,tt.aK)(),n=t.currentSession(),a=(0,tf.Zy)(),s=(0,tu.s0)();return(0,er.jsx)("div",{className:"modal-mask",children:(0,er.jsx)(th.u_,{title:tl.ZP.Context.Edit,onClose:()=>e.onClose(),actions:[(0,er.jsx)(to.h,{icon:(0,er.jsx)(eM.Z,{}
1),bordered:!0,text:tl.ZP.Chat.Config.Reset,onClick:async()=>{await (0,th.i0)(tl.ZP.Memory.ResetConfirm)&&t.updateTargetSession(n,e=>e.memoryPrompt="")}},"reset"),(0,er.jsx)(to.h,{icon:(0,er.jsx)(ev.Z,{}),bordered:!0,text:tl.ZP.Chat.Config.SaveAs,onClick:()=>{s(tm.y$.Masks),setTimeout(()=>{a.create(n.mask)},500)}},"copy")],children:(0,er.jsx)(tg.MaskConfig,{mask:n.mask,updateMask:e=>{let a={...n.mask};e(a),t.updateTargetSession(n,e=>e.mask=a)},shouldSyncFromGlobal:!0,extraListItems:n.mask.modelConfig.sendMemory?(0,er.jsx)(th.HC,{className:"copyable",title:"".concat(tl.ZP.Memory.Title," (").concat(n.lastSummarizeIndex," of ").concat(n.messages.length,")"),subTitle:n.memoryPrompt||tl.ZP.Memory.EmptyContent}):(0,er.jsx)(er.Fragment,{})})})})}function ns(e){let t=(0,tt.aK)().currentSession().mask.context;return(0,er.jsxs)("div",{className:td()["prompt-toast"],children:[e.showToast&&t.length>0&&(0,er.jsxs)("div",{className:(0,tb.Z)(td()["prompt-toast-inner"],"clickable"),role:"button",onClick:()=>e.setShowModal(!0),children:[(0,er.jsx)(eu,{}),(0,er.jsx)("span",{className:td()["prompt-toast-content"],children:tl.ZP.Context.Toast(t.length)})]}),e.showModal&&(0,er.jsx)(na,{onClose:()=>e.setShowModal(!1)})]},"prompt-toast")}function nr(e){let t=0===e.prompts.length,[n,a]=(0,el.useState)(0),s=(0,el.useRef)(null);return((0,el.useEffect)(()=>{a(0)},[e.prompts.length]),(0,el.useEffect)(()=>{let r=r=>{if(t||r.metaKey||r.altKey||r.ctrlKey)return;let i=t=>{var i;r.stopPropagation(),r.preventDefault(),a(Math.max(0,Math.min(e.prompts.length-1,n+t))),null===(i=s.current)||void 0===i||i.scrollIntoView({block:"center"})};if("ArrowUp"===r.key)i(1);else if("ArrowDown"===r.key)i(-1);else if("Enter"===r.key){let t=e.prompts.at(n);t&&e.onPromptSelect(t)}};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e.prompts.length,n]),t)?null:(0,er.jsx)("div",{className:td()["prompt-hints"],children:e.prompts.map((t,r)=>(0,er.jsxs)("div",{ref:r===n?s:null,className:(0,tb.Z)(td()["prompt-hint"],{[td()["prompt-hint-selected"]]:r===n}),onClick:()=>e.onPromptSelect(t),onMouseEnter:()=>a(r),children:[(0,er.jsx)("div",{className:td()["hint-title"],children:t.title}),(0,er.jsx)("div",{className:td()["hint-content"],children:t.content})]},t.title+r.toString()))})}function ni(){let e=(0,tt.aK)(),t=e.currentSession();return(0,er.jsxs)("div",{className:td()["clear-context"],onClick:()=>e.updateTargetSession(t,e=>e.clearContextIndex=void 0),children:[(0,er.jsx)("div",{className:td()["clear-context-tips"],children:tl.ZP.Context.Clear}),(0,er.jsx)("div",{className:td()["clear-context-revert-btn"],children:tl.ZP.Context.Revert})]})}function nl(e){let t=(0,el.useRef)(null),n=(0,el.useRef)(null),[a,s]=(0,el.useState)({full:16,icon:16});function r(){if(!t.current||!n.current)return;let e=n.current.getBoundingClientRect().width,a=t.current.getBoundingClientRect().width;s({full:e+a,icon:a})}return(0,er.jsxs)("div",{className:(0,tb.Z)(td()["chat-input-action"],"clickable"),onClick:()=>{e.onClick(),setTimeout(r,1)},onMouseEnter:r,onTouchStart:r,style:{"--icon-width":"".concat(a.icon,"px"),"--full-width":"".concat(a.full,"px")},children:[(0,er.jsx)("div",{ref:t,className:td().icon,children:e.icon}),(0,er.jsx)("div",{className:td().text,ref:n,children:e.text})]})}function no(e){var t,n,a,s,r,i,l,o;let c=(0,tt.MG)(),d=(0,tu.s0)(),h=(0,tt.aK)(),u=(0,tt.RQ)(),m=h.currentSession(),p=c.theme,g=tr.L.hasPending(),f=m.mask.modelConfig.model,v=(null===(t=m.mask.modelConfig)||void 0===t?void 0:t.providerName)||tm.UT.OpenAI,x=(0,tF.l)(),w=(0,el.useMemo)(()=>{let e=x.filter(e=>e.available),t=e.find(e=>e.isDefault);return t?[t,...e.filter(e=>e!==t)]:e},[x]),y=(0,el.useMemo)(()=>{var e;let t=w.find(e=>{var t;return e.name==f&&(null==e?void 0:null===(t=e.provider)||void 0===t?void 0:t.providerName)==v});return null!==(e=null==t?void 0:t.displayName)&&void 0!==e?e:""},[w,f,v]),[_,k]=(0,el.useState)(!1),[j,C]=(0,el.useState)(!1),[E,b]=(0,el.useState)(!1),[S,M]=(0,el.useState)(!1),[N,O]=(0,el.useState)(!1),[P,Z]=(0,el.useState)(!1),T=null!==(i=null===(n=m.mask.modelConfig)||void 0===n?void 0:n.size)&&void 0!==i?i:"1024x1024",A=null!==(l=null===(a=m.mask.modelConfig)||void 0===a?void 0:a.quality)&&void 0!==l?l:"standard",L=null!==(o=null===(s=m.mask.modelConfig)||void 0===s?void 0:s.style)&&void 0!==o?o:"vivid",D=(0,tn.S0)();return(0,el.useEffect)(()=>{let t=(0,tn.Xf)(f);if(b(t),t||(e.setAttachImages([]),e.setUploading(!1)),!w.some(e=>
1e.name===f)&&w.length>0){var n;let e=w.find(e=>e.isDefault)||w[0];h.updateTargetSession(m,t=>{var n;t.mask.modelConfig.model=e.name,t.mask.modelConfig.providerName=null==e?void 0:null===(n=e.provider)||void 0===n?void 0:n.providerName}),(0,th.CF)((null==e?void 0:null===(n=e.provider)||void 0===n?void 0:n.providerName)=="ByteDance"?e.displayName:e.name)}},[h,f,w,m]),(0,er.jsxs)("div",{className:td()["chat-input-actions"],children:[(0,er.jsxs)(er.Fragment,{children:[g&&(0,er.jsx)(nl,{onClick:()=>tr.L.stopAll(),text:tl.ZP.Chat.InputActions.Stop,icon:(0,er.jsx)(eq,{})}),!e.hitBottom&&(0,er.jsx)(nl,{onClick:e.scrollToBottom,text:tl.ZP.Chat.InputActions.ToBottom,icon:(0,er.jsx)(eX,{})}),e.hitBottom&&(0,er.jsx)(nl,{onClick:e.showPromptModal,text:tl.ZP.Chat.InputActions.Settings,icon:(0,er.jsx)(eZ,{})}),E&&(0,er.jsx)(nl,{onClick:e.uploadImage,text:tl.ZP.Chat.InputActions.UploadImage,icon:e.uploading?(0,er.jsx)(ej.Z,{}):(0,er.jsx)(eK,{})}),(0,er.jsx)(nl,{onClick:function(){let e=[tt.Q2.Auto,tt.Q2.Light,tt.Q2.Dark],t=(e.indexOf(p)+1)%e.length,n=e[t];c.update(e=>e.theme=n)},text:tl.ZP.Chat.InputActions.Theme[p],icon:(0,er.jsx)(er.Fragment,{children:p===tt.Q2.Auto?(0,er.jsx)(eV,{}):p===tt.Q2.Light?(0,er.jsx)(eF,{}):p===tt.Q2.Dark?(0,er.jsx)(eU,{}):null})}),(0,er.jsx)(nl,{onClick:e.showPromptHints,text:tl.ZP.Chat.InputActions.Prompt,icon:(0,er.jsx)(eC.Z,{})}),(0,er.jsx)(nl,{onClick:()=>{d(tm.y$.Masks)},text:tl.ZP.Chat.InputActions.Masks,icon:(0,er.jsx)(eE.Z,{})}),(0,er.jsx)(nl,{text:tl.ZP.Chat.InputActions.Clear,icon:(0,er.jsx)(eO,{}),onClick:()=>{h.updateTargetSession(m,e=>{e.clearContextIndex===e.messages.length?e.clearContextIndex=void 0:(e.clearContextIndex=e.messages.length,e.memoryPrompt="")})}}),(0,er.jsx)(nl,{onClick:()=>k(!0),text:y,icon:(0,er.jsx)(eJ,{})}),_&&(0,er.jsx)(th.Qf,{defaultSelectedValue:"".concat(f,"@").concat(v),items:w.map(e=>{var t,n,a;return{title:"".concat(e.displayName).concat((null==e?void 0:null===(t=e.provider)||void 0===t?void 0:t.providerName)?" ("+(null==e?void 0:null===(n=e.provider)||void 0===n?void 0:n.providerName)+")":""),value:"".concat(e.name,"@").concat(null==e?void 0:null===(a=e.provider)||void 0===a?void 0:a.providerName)}}),onClose:()=>k(!1),onSelection:e=>{if(0===e.length)return;let[t,n]=(0,tQ.En)(e[0]);if(h.updateTargetSession(m,e=>{e.mask.modelConfig.model=t,e.mask.modelConfig.providerName=n,e.mask.syncGlobalConfig=!1}),"ByteDance"==n){var a;let e=w.find(e=>{var a;return e.name==t&&(null==e?void 0:null===(a=e.provider)||void 0===a?void 0:a.providerName)==n});(0,th.CF)(null!==(a=null==e?void 0:e.displayName)&&void 0!==a?a:"")}else(0,th.CF)(t)}}),(0,tn.Wu)(f)&&(0,er.jsx)(nl,{onClick:()=>M(!0),text:T,icon:(0,er.jsx)(e0,{})}),S&&(0,er.jsx)(th.Qf,{defaultSelectedValue:T,items:["1024x1024","1792x1024","1024x1792"].map(e=>({title:e,value:e})),onClose:()=>M(!1),onSelection:e=>{if(0===e.length)return;let t=e[0];h.updateTargetSession(m,e=>{e.mask.modelConfig.size=t}),(0,th.CF)(t)}}),(0,tn.Wu)(f)&&(0,er.jsx)(nl,{onClick:()=>O(!0),text:A,icon:(0,er.jsx)(e1,{})}),N&&(0,er.jsx)(th.Qf,{defaultSelectedValue:A,items:["standard","hd"].map(e=>({title:e,value:e})),onClose:()=>O(!1),onSelection:e=>{if(0===e.length)return;let t=e[0];h.updateTargetSession(m,e=>{e.mask.modelConfig.quality=t}),(0,th.CF)(t)}}),(0,tn.Wu)(f)&&(0,er.jsx)(nl,{onClick:()=>Z(!0),text:L,icon:(0,er.jsx)(e2,{})}),P&&(0,er.jsx)(th.Qf,{defaultSelectedValue:L,items:["vivid","natural"].map(e=>({title:e,value:e})),onClose:()=>Z(!1),onSelection:e=>{if(0===e.length)return;let t=e[0];h.updateTargetSession(m,e=>{e.mask.modelConfig.style=t}),(0,th.CF)(t)}}),(0,tn.up)(v,f)&&(0,er.jsx)(nl,{onClick:()=>{0==u.getAll().length?d(tm.y$.Plugins):C(!0)},text:tl.ZP.Plugin.Name,icon:(0,er.jsx)(e8,{})}),j&&(0,er.jsx)(th.Qf,{multiple:!0,defaultSelectedValue:null===(r=h.currentSession().mask)||void 0===r?void 0:r.plugin,items:u.getAll().map(e=>({title:"".concat(null==e?void 0:e.title,"@").concat(null==e?void 0:e.version),value:null==e?void 0:e.id})),onClose:()=>C(!1),onSelection:e=>{h.updateTargetSession(m,t=>{t.mask.plugin=e})}}),!D&&(0,er.jsx)(nl,{onClick:()=>e.setShowShortcutKeyModal(!0),text:tl.ZP.Chat.ShortcutKey.Title,icon:(0,er.jsx)(e9,{})})]}),(0,er.jsx)("div",{className:td()["chat-input-actions-end"],children:c.realtimeConfig.enable&&(0,er.jsx)(nl,{onClick:()=>e.setShowChatSidePanel(!0),text:"Realtime Chat",icon:(0,er.jsx)(te,{})})})]})}function nc(e){let t=(0,tt.aK)(),n=t.currentSession(),[a,s]=(0,el.useState)(n.messages.slice());return(0,er.jsx)("div",{className:"modal-mask",children:(0,er.jsxs)(th.u_,{title:tl.ZP.Chat.EditMessage.Title,onClose:e.onClose,actions:[(0,er.jsx)(to.h,{text:tl.ZP.UI.Cancel,icon:(0,er.jsx)(eH.Z,{}),onClick:()=>{e.onClose()}},"cancel"),(0,er.jsx)(to.h,{type:"primary",text:tl.ZP.UI.Confirm,icon:(0,er.jsx)(eD.Z,{}),onClick:()=>{t.updateTargetSession(n,e=>e.messages=a),e.onClose()}},"ok")],children:[(0,er.jsx)(th.aV,{children:(0,er.jsx)(th.HC,{title:tl.ZP.Chat.EditMessage.Topic.Title,subTitle:tl.ZP.Chat.EditMessage.Topic.SubTitle,children:(0,er.jsx)("input",{type:"text",value:n.topic,onInput:e=>t.updateTargetSession(n,t=>t.topic=e.currentTarget.value)})})}),(0,er.jsx)(tg.ContextPrompts,{context:a,updateContext:e=>{let t=a.slice();e(t),s(t)}})]})})}
1function nd(e){return(0,er.jsx)("div",{className:td()["delete-image"],onClick:e.deleteImage,children:(0,er.jsx)(eT.Z,{})})}function nh(e){let t=navigator.platform.toUpperCase().indexOf("MAC")>=0,n=[{title:tl.ZP.Chat.ShortcutKey.newChat,keys:t?["⌘","Shift","O"]:["Ctrl","Shift","O"]},{title:tl.ZP.Chat.ShortcutKey.focusInput,keys:["Shift","Esc"]},{title:tl.ZP.Chat.ShortcutKey.copyLastCode,keys:t?["⌘","Shift",";"]:["Ctrl","Shift",";"]},{title:tl.ZP.Chat.ShortcutKey.copyLastMessage,keys:t?["⌘","Shift","C"]:["Ctrl","Shift","C"]},{title:tl.ZP.Chat.ShortcutKey.showShortcutKey,keys:t?["⌘","/"]:["Ctrl","/"]}];return(0,er.jsx)("div",{className:"modal-mask",children:(0,er.jsx)(th.u_,{title:tl.ZP.Chat.ShortcutKey.Title,onClose:e.onClose,actions:[(0,er.jsx)(to.h,{type:"primary",text:tl.ZP.UI.Confirm,icon:(0,er.jsx)(eD.Z,{}),onClick:()=>{e.onClose()}},"ok")],children:(0,er.jsx)("div",{className:td()["shortcut-key-container"],children:(0,er.jsx)("div",{className:td()["shortcut-key-grid"],children:n.map((e,t)=>(0,er.jsxs)("div",{className:td()["shortcut-key-item"],children:[(0,er.jsx)("div",{className:td()["shortcut-key-title"],children:e.title}),(0,er.jsx)("div",{className:td()["shortcut-key-keys"],children:e.keys.map((e,t)=>(0,er.jsx)("div",{className:td()["shortcut-key"],children:(0,er.jsx)("span",{children:e})},t))})]},t))})})})})}function nu(){var e,t,a;let s=(0,tt.aK)(),r=s.currentSession(),i=(0,tt.MG)(),l=i.fontSize,o=i.fontFamily,[c,d]=(0,el.useState)(!1),h=(0,el.useRef)(null),[u,m]=(0,el.useState)(""),[p,g]=(0,el.useState)(!1),{submitKey:f,shouldSubmit:v}=function(){let e=(0,tt.MG)(),t=e.submitKey,n=(0,el.useRef)(!1);return(0,el.useEffect)(()=>{let e=()=>{n.current=!0},t=()=>{n.current=!1};return window.addEventListener("compositionstart",e),window.addEventListener("compositionend",t),()=>{window.removeEventListener("compositionstart",e),window.removeEventListener("compositionend",t)}},[]),{submitKey:t,shouldSubmit:t=>229!=t.keyCode&&"Enter"===t.key&&("Enter"!==t.key||!t.nativeEvent.isComposing&&!n.current)&&(e.submitKey===tt.mQ.AltEnter&&t.altKey||e.submitKey===tt.mQ.CtrlEnter&&t.ctrlKey||e.submitKey===tt.mQ.ShiftEnter&&t.shiftKey||e.submitKey===tt.mQ.MetaEnter&&t.metaKey||e.submitKey===tt.mQ.Enter&&!t.altKey&&!t.ctrlKey&&!t.shiftKey&&!t.metaKey)}}(),x=(0,el.useRef)(null),w=null!=x&&!!x.current&&1>=Math.abs(x.current.scrollHeight-(x.current.scrollTop+x.current.clientHeight)),y=(0,el.useMemo)(()=>{var e;let t=null===(e=x.current)||void 0===e?void 0:e.lastElementChild;return null!=x&&!!x.current&&!!t&&t.getBoundingClientRect().top-x.current.getBoundingClientRect().top<100},[null==x?void 0:null===(e=x.current)||void 0===e?void 0:e.scrollHeight]),_=""!==u,{setAutoScroll:k,scrollDomToBottom:j}=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],[n,a]=(0,el.useState)(!0);function s(){let t=e.current;t&&requestAnimationFrame(()=>{a(!0),t.scrollTo(0,t.scrollHeight)})}return(0,el.useEffect)(()=>{n&&!t&&s()}),{scrollRef:e,autoScroll:n,setAutoScroll:a,scrollDomToBottom:s}}(x,(w||y)&&!_),[C,E]=(0,el.useState)(!0),b=(0,tn.S0)(),S=(0,tu.s0)(),[M,N]=(0,el.useState)([]),[O,P]=(0,el.useState)(!1),Z=(0,ti.f)(),[T,A]=(0,el.useState)([]),L=(0,ei.y1)(e=>{A(Z.search(e))},100,{leading:!0,trailing:!0}),[D,I]=(0,el.useState)(2),H=(0,ei.y1)(()=>{let e=h.current?(0,tn.lx)(h.current):1;I(Math.min(20,Math.max(2+Number(!b),e)))},100,{leading:!0,trailing:!0});(0,el.useEffect)(H,[u]);let R=(0,tv.UK)({new:()=>s.newSession(),newm:()=>S(tm.y$.NewChat),prev:()=>s.nextSession(-1),next:()=>s.nextSession(1),clear:()=>s.updateTargetSession(r,e=>e.clearContextIndex=e.messages.length),fork:()=>s.forkSession(),del:()=>s.deleteSession(s.currentSessionIndex)}),K=e=>{m(e);let t=e.trim().length;0===t?A([]):e.match(tv.x6)?A(R.search(e)):!i.disablePromptHint&&t<30&&e.startsWith("/")&&L(e.slice(1))},z=e=>{var t;if(""===e.trim()&&(0,tX.Z)(M))return;let n=R.match(e);if(n.matched){m(""),A([]),n.invoke();return}g(!0),s.onUserInput(e,M).then(()=>g(!1)),N([]),s.setLastInput(e),m(""),A([]),b||null===(t=h.current)||void 0===t||t.focus(),k(!0)},F=e=>{tr.L.stop(r.id,e)};(0,el.useEffect)(()=>{s.updateTargetSession(r,e=>{let t=Date.now()-tm.tb;
1e.messages.forEach(e=>{(e.isError||new Date(e.date).getTime()<t)&&(e.streaming&&(e.streaming=!1),0===e.content.length&&(e.isError=!0,e.content=(0,tx.B)({error:!0,message:"empty response"})))}),e.mask.syncGlobalConfig&&(console.log("[Mask] syncing from global, name = ",e.mask.name),e.mask.modelConfig={...i.modelConfig})})},[r]);let B=e=>{s.updateTargetSession(r,t=>t.messages=t.messages.filter(t=>t.id!==e))},U=e=>{B(e)},W=e=>{var t;let n,a;let i=r.messages.findIndex(t=>t.id===e.id);if(i<0||i>=r.messages.length){console.error("[Chat] failed to find resending message",e);return}if("assistant"===e.role){a=e;for(let e=i;e>=0;e-=1)if("user"===r.messages[e].role){n=r.messages[e];break}}else if("user"===e.role){n=e;for(let e=i;e<r.messages.length;e+=1)if("assistant"===r.messages[e].role){a=r.messages[e];break}}if(void 0===n){console.error("[Chat] failed to resend",e);return}B(n.id),B(null==a?void 0:a.id),g(!0);let l=(0,tn.YK)(n),o=(0,tn.Bs)(n);s.onUserInput(l,o).then(()=>g(!1)),null===(t=h.current)||void 0===t||t.focus()},V=e=>{s.updateTargetSession(r,t=>t.mask.context.push(e)),(0,th.CF)(tl.ZP.Chat.Actions.PinToastContent,{text:tl.ZP.Chat.Actions.PinToastAction,onClick:()=>{ex(!0)}})},G=(0,tt._X)(),[X,Q]=(0,el.useState)(!1),[q,Y]=(0,el.useState)(!1);async function J(e){if(X)nt.stop(),Q(!1);else{var t;let a;t=new tP.ti(tm.k8.GPT);let s=tt.MG.getState();Y(!0),nt.init();let{markdownToTxt:r}=n(69549),i=r(e);if(s.ttsConfig.engine!==tm.Xu){let e=G.edgeVoiceName(),t=new tG;await t.setMetadata(e,$.AUDIO_24KHZ_96KBITRATE_MONO_MP3),a=await t.toArrayBuffer(i)}else a=await t.llm.speech({model:s.ttsConfig.model,input:i,voice:s.ttsConfig.voice,speed:s.ttsConfig.speed});Q(!0),nt.play(a,()=>{Q(!1)}).catch(e=>{console.error("[OpenAI Speech]",e),(0,th.CF)((0,tx.B)(e)),Q(!1)}).finally(()=>Y(!1))}}let ee=(0,el.useMemo)(()=>r.mask.hideContext?[]:r.mask.context.slice(),[r.mask.context,r.mask.hideContext]);if(0===ee.length&&(null===(t=r.messages.at(0))||void 0===t?void 0:t.content)!==tt.ux.content){let e=Object.assign({},tt.ux);G.isAuthorized()||(e.content=tl.ZP.Error.Unauthorized),ee.push(e)}let et=(0,el.useMemo)(()=>ee.concat(r.messages).concat(p?[{...(0,tt.tn)({role:"assistant",content:"……"}),preview:!0}]:[]).concat(u.length>0&&i.sendPreviewBubble?[{...(0,tt.tn)({role:"user",content:u}),preview:!0}]:[]),[i.sendPreviewBubble,ee,p,r.messages,u]),[en,ea]=(0,el.useState)(Math.max(0,et.length-tm.nS));function es(e){ea(e=Math.max(0,e=Math.min(et.length-tm.nS,e)))}let eo=(0,el.useMemo)(()=>{let e=Math.min(en+3*tm.nS,et.length);return et.slice(en,e)},[en,et]),ec=e=>{let t=e.scrollTop+e.clientHeight,n=e.clientHeight,a=e.scrollTop<=n,s=t>=e.scrollHeight-n,r=t>=e.scrollHeight-(b?4:10),i=en-tm.nS,l=en+tm.nS;a&&!s?es(i):s&&es(l),E(r),k(r)};function eh(){es(et.length-tm.nS),j()}let eu=(null!==(a=r.clearContextIndex)&&void 0!==a?a:-1)>=0?r.clearContextIndex+ee.length-en:-1,[em,ex]=(0,el.useState)(!1),ey=(0,el.useMemo)(()=>(0,tO.Z)(),[]),ek=!b,eC=!b&&!(null==ey?void 0:ey.isApp);(0,tv.YZ)({fill:m,submit:e=>{z(e)},code:e=>{G.disableFastLink||(console.log("[Command] got code from url: ",e),(0,th.i0)(tl.ZP.URLCommand.Code+"code = ".concat(e)).then(t=>{t&&G.update(t=>t.accessCode=e)}))},settings:e=>{if(!G.disableFastLink)try{let t=JSON.parse(e);console.log("[Command] got settings from url: ",t),(t.key||t.url)&&(0,th.i0)(tl.ZP.URLCommand.Settings+"\n".concat(JSON.stringify(t,null,4))).then(e=>{e&&(t.key&&G.update(e=>e.openaiApiKey=t.key),t.url&&G.update(e=>e.openaiUrl=t.url),G.update(e=>e.useCustomConfig=!0))})}catch(t){console.error("[Command] failed to get settings from url: ",e)}}});let[eE,eN]=(0,el.useState)(!1);(0,el.useEffect)(()=>{let e=(0,tm.AI)(r.id),t=ne.getItem(e);t&&0===u.length&&(m(t),ne.removeItem(e));let n=h.current;return()=>{var t;ne.setItem(e,null!==(t=null==n?void 0:n.value)&&void 0!==t?t:"")}},[]);let eO=(0,el.useCallback)(async e=>{let t=s.currentSession().mask.modelConfig.model;if((0,tn.Xf)(t)){for(let t of(e.clipboardData||window.clipboardData).items)if("file"===t.kind&&t.type.startsWith("image/")){e.preventDefault();let n=t.getAsFile();if(n){let e=[];e.push(...M),e.push(...await new Promise((e,t)=>
1{P(!0);let a=[];(0,ta.Ix)(n).then(t=>{a.push(t),P(!1),e(a)}).catch(e=>{P(!1),t(e)})}));let t=e.length;t>3&&e.splice(3,t-3),N(e)}}}},[M,s]);async function eP(){let e=[];e.push(...M),e.push(...await new Promise((e,t)=>{let n=document.createElement("input");n.type="file",n.accept="image/png, image/jpeg, image/webp, image/heic, image/heif",n.multiple=!0,n.onchange=n=>{P(!0);let a=n.target.files,s=[];for(let r=0;r<a.length;r++){let i=n.target.files[r];(0,ta.Ix)(i).then(t=>{s.push(t),(3===s.length||s.length===a.length)&&(P(!1),e(s))}).catch(e=>{P(!1),t(e)})}},n.click()}));let t=e.length;t>3&&e.splice(3,t-3),N(e)}let[eZ,eA]=(0,el.useState)(!1);(0,el.useEffect)(()=>{let e=e=>{if((e.metaKey||e.ctrlKey)&&e.shiftKey&&"o"===e.key.toLowerCase())e.preventDefault(),setTimeout(()=>{s.newSession(),S(tm.y$.Chat)},10);else if(e.shiftKey&&"escape"===e.key.toLowerCase()){var t;e.preventDefault(),null===(t=h.current)||void 0===t||t.focus()}else if((e.metaKey||e.ctrlKey)&&e.shiftKey&&"Semicolon"===e.code){e.preventDefault();let t=document.querySelectorAll(".copy-code-button");t.length>0&&t[t.length-1].click()}else if((e.metaKey||e.ctrlKey)&&e.shiftKey&&"c"===e.key.toLowerCase()){e.preventDefault();let t=eo.filter(e=>"user"!==e.role).pop();if(t){let e=(0,tn.YK)(t);(0,tn.vQ)(e)}}else(e.metaKey||e.ctrlKey)&&"/"===e.key&&(e.preventDefault(),eA(!0))};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[eo,s,S]);let[eH,eR]=(0,el.useState)(!1);return(0,er.jsxs)(er.Fragment,{children:[(0,er.jsxs)("div",{className:td().chat,children:[(0,er.jsxs)("div",{className:"window-header","data-tauri-drag-region":!0,children:[b&&(0,er.jsx)("div",{className:"window-actions",children:(0,er.jsx)("div",{className:"window-action-button",children:(0,er.jsx)(to.h,{icon:(0,er.jsx)(ef.Z,{}),bordered:!0,title:tl.ZP.Chat.Actions.ChatList,onClick:()=>S(tm.y$.Home)})})}),(0,er.jsxs)("div",{className:(0,tb.Z)("window-header-title",td()["chat-body-title"]),children:[(0,er.jsx)("div",{className:(0,tb.Z)("window-header-main-title",td()["chat-body-main-title"]),onClickCapture:()=>eN(!0),children:r.topic?r.topic:tt.HX}),(0,er.jsx)("div",{className:"window-header-sub-title",children:tl.ZP.Chat.SubTitle(r.messages.length)})]}),(0,er.jsxs)("div",{className:"window-actions",children:[(0,er.jsx)("div",{className:"window-action-button",children:(0,er.jsx)(to.h,{icon:(0,er.jsx)(eM.Z,{}),bordered:!0,title:tl.ZP.Chat.Actions.RefreshTitle,onClick:()=>{(0,th.CF)(tl.ZP.Chat.Actions.RefreshToast),s.summarizeSession(!0,r)}})}),!b&&(0,er.jsx)("div",{className:"window-action-button",children:(0,er.jsx)(to.h,{icon:(0,er.jsx)(ep,{}),bordered:!0,title:tl.ZP.Chat.EditMessage.Title,aria:tl.ZP.Chat.EditMessage.Title,onClick:()=>eN(!0)})}),(0,er.jsx)("div",{className:"window-action-button",children:(0,er.jsx)(to.h,{icon:(0,er.jsx)(eg.Z,{}),bordered:!0,title:tl.ZP.Chat.Actions.Export,onClick:()=>{d(!0)}})}),eC&&(0,er.jsx)("div",{className:"window-action-button",children:(0,er.jsx)(to.h,{icon:i.tightBorder?(0,er.jsx)(eS.Z,{}):(0,er.jsx)(eb.Z,{}),bordered:!0,title:tl.ZP.Chat.Actions.FullScreen,aria:tl.ZP.Chat.Actions.FullScreen,onClick:()=>{i.update(e=>e.tightBorder=!e.tightBorder)}})})]}),(0,er.jsx)(ns,{showToast:!C,showModal:em,setShowModal:ex})]}),(0,er.jsxs)("div",{className:td()["chat-main"],children:[(0,er.jsxs)("div",{className:td()["chat-body-container"],children:[(0,er.jsx)("div",{className:td()["chat-body"],ref:x,onScroll:e=>ec(e.currentTarget),onMouseDown:()=>{var e;return null===(e=h.current)||void 0===e?void 0:e.blur()},onTouchStart:()=>{var e;null===(e=h.current)||void 0===e||e.blur(),k(!1)},children:eo.map((e,t)=>{var n,a,c;let d="user"===e.role,h=t<ee.length,u=t>0&&!(e.preview||0===e.content.length)&&!h,p=e.preview||e.streaming;return(0,er.jsxs)(el.Fragment,{children:[(0,er.jsx)("div",{className:d?td()["chat-message-user"]:td()["chat-message"],children:(0,er.jsxs)("div",{className:td()["chat-message-container"],children:[(0,er.jsxs)("div",{className:td()["chat-message-header"],children:[(0,er.jsxs)("div",{className:td()["chat-message-avatar"],children:[(0,er.jsx)("div",{className:td()["chat-message-edit"],children:(0,er.jsx)(to.h,{icon:(0,er.jsx)(ep,{}),aria:tl.ZP.Chat.Actions.Edit,onClick:async()=>{let t=await (0,th.G5)(tl.ZP.Chat.Actions.Edit,(0,tn.YK)(e),10),n=t,a=(0,tn.Bs)(e);if(a.length>0){n=[{type:"text",text:t}];for(let e=0;e<a.length;e++)n.push({type:"image_url",image_url:{url:a[e]}})}s.updateTargetSession(r,t=>{let a=t.mask.context.concat(t.messages).find(t=>
1t.id===e.id);a&&(a.content=n)})}})}),d?(0,er.jsx)(tp.qE,{avatar:i.avatar}):(0,er.jsx)(er.Fragment,{children:["system"].includes(e.role)?(0,er.jsx)(tp.qE,{avatar:"2699-fe0f"}):(0,er.jsx)(tg.MaskAvatar,{avatar:r.mask.avatar,model:e.model||r.mask.modelConfig.model})})]}),!d&&(0,er.jsx)("div",{className:td()["chat-model-name"],children:e.model}),u&&(0,er.jsx)("div",{className:td()["chat-message-actions"],children:(0,er.jsx)("div",{className:td()["chat-input-actions"],children:e.streaming?(0,er.jsx)(nl,{text:tl.ZP.Chat.Actions.Stop,icon:(0,er.jsx)(eq,{}),onClick:()=>{var n;return F(null!==(n=e.id)&&void 0!==n?n:t)}}):(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)(nl,{text:tl.ZP.Chat.Actions.Retry,icon:(0,er.jsx)(eM.Z,{}),onClick:()=>W(e)}),(0,er.jsx)(nl,{text:tl.ZP.Chat.Actions.Delete,icon:(0,er.jsx)(eT.Z,{}),onClick:()=>{var n;return U(null!==(n=e.id)&&void 0!==n?n:t)}}),(0,er.jsx)(nl,{text:tl.ZP.Chat.Actions.Pin,icon:(0,er.jsx)(eL,{}),onClick:()=>V(e)}),(0,er.jsx)(nl,{text:tl.ZP.Chat.Actions.Copy,icon:(0,er.jsx)(ev.Z,{}),onClick:()=>(0,tn.vQ)((0,tn.YK)(e))}),i.ttsConfig.enable&&(0,er.jsx)(nl,{text:X?tl.ZP.Chat.Actions.StopSpeech:tl.ZP.Chat.Actions.Speech,icon:X?(0,er.jsx)(e_,{}):(0,er.jsx)(ew,{}),onClick:()=>J((0,tn.YK)(e))})]})})})]}),(null==e?void 0:null===(n=e.tools)||void 0===n?void 0:n.length)==0&&p&&(0,er.jsx)("div",{className:td()["chat-message-status"],children:tl.ZP.Chat.Typing}),(null==e?void 0:null===(a=e.tools)||void 0===a?void 0:a.length)>0&&(0,er.jsx)("div",{className:td()["chat-message-tools"],children:null==e?void 0:null===(c=e.tools)||void 0===c?void 0:c.map(e=>{var t;return(0,er.jsxs)("div",{title:null==e?void 0:e.errorMsg,className:td()["chat-message-tool"],children:[!1===e.isError?(0,er.jsx)(eD.Z,{}):!0===e.isError?(0,er.jsx)(eI.Z,{}):(0,er.jsx)(ej.Z,{}),(0,er.jsx)("span",{children:null==e?void 0:null===(t=e.function)||void 0===t?void 0:t.name})]},e.id)})}),(0,er.jsxs)("div",{className:td()["chat-message-item"],children:[(0,er.jsx)(nn,{content:(0,tn.YK)(e),loading:(e.preview||e.streaming)&&0===e.content.length&&!d,onDoubleClickCapture:()=>{b&&m((0,tn.YK)(e))},fontSize:l,fontFamily:o,parentRef:x,defaultShow:t>=eo.length-6},e.streaming?"loading":"done"),1==(0,tn.Bs)(e).length&&(0,er.jsx)("img",{className:td()["chat-message-item-image"],src:(0,tn.Bs)(e)[0],alt:""}),(0,tn.Bs)(e).length>1&&(0,er.jsx)("div",{className:td()["chat-message-item-images"],style:{"--image-count":(0,tn.Bs)(e).length},children:(0,tn.Bs)(e).map((e,t)=>(0,er.jsx)("img",{className:td()["chat-message-item-image-multi"],src:e,alt:""},t))})]}),(null==e?void 0:e.audio_url)&&(0,er.jsx)("div",{className:td()["chat-message-audio"],children:(0,er.jsx)("audio",{src:e.audio_url,controls:!0})}),(0,er.jsx)("div",{className:td()["chat-message-action-date"],children:h?tl.ZP.Chat.IsContext:e.date.toLocaleString()})]})}),t===eu-1&&(0,er.jsx)(ni,{})]},e.id)})}),(0,er.jsxs)("div",{className:td()["chat-input-panel"],children:[(0,er.jsx)(nr,{prompts:T,onPromptSelect:e=>{setTimeout(()=>{var t;A([]);let n=R.match(e.content);n.matched?(n.invoke(),m("")):m(e.content),null===(t=h.current)||void 0===t||t.focus()},30)}}),(0,er.jsx)(no,{uploadImage:eP,setAttachImages:N,setUploading:P,showPromptModal:()=>ex(!0),scrollToBottom:eh,hitBottom:C,uploading:O,showPromptHints:()=>{var e;if(T.length>0){A([]);return}null===(e=h.current)||void 0===e||e.focus(),m("/"),L("")},setShowShortcutKeyModal:eA,setUserInput:m,setShowChatSidePanel:eR}),(0,er.jsxs)("label",{className:(0,tb.Z)(td()["chat-input-panel-inner"],{[td()["chat-input-panel-inner-attach"]]:0!==M.length}),htmlFor:"chat-input",children:[(0,er.jsx)("textarea",{id:"chat-input",ref:h,className:td()["chat-input"],placeholder:tl.ZP.Chat.Input(f),onInput:e=>K(e.currentTarget.value),value:u,onKeyDown:e=>{if("ArrowUp"===e.key&&u.length<=0&&!(e.metaKey||e.altKey||e.ctrlKey)){var t;m(null!==(t=s.lastInput)&&void 0!==t?t:""),e.preventDefault();return}v(e)&&0===T.length&&(z(u),e.preventDefault())},onFocus:eh,onClick:eh,onPaste:eO,rows:D,autoFocus:ek,style:{fontSize:i.fontSize,fontFamily:i.fontFamily}}),0!=M.length&&(0,er.jsx)("div",{className:td()["attach-images"],children:M.map((e,t)=>(0,er.jsx)("div",{className:td()["attach-image"],style:{backgroundImage:'url("'.concat(e,'")')},children:(0,er.jsx)("div",{className:td()["attach-image-mask"],children:(0,er.jsx)(nd,{deleteImage:()=>
1{N(M.filter((e,n)=>n!==t))}})})},t))}),(0,er.jsx)(to.h,{icon:(0,er.jsx)(ed,{}),text:tl.ZP.Chat.Send,className:td()["chat-input-send"],type:"primary",onClick:()=>z(u)})]})]})]}),(0,er.jsx)("div",{className:(0,tb.Z)(td()["chat-side-panel"],{[td().mobile]:b,[td()["chat-side-panel-show"]]:eH}),children:eH&&(0,er.jsx)(t5,{onClose:()=>{eR(!1)},onStartVoice:async()=>{console.log("start voice")}})})]})]},r.id),c&&(0,er.jsx)(tT,{onClose:()=>d(!1)}),eE&&(0,er.jsx)(nc,{onClose:()=>{eN(!1)}}),eZ&&(0,er.jsx)(nh,{onClose:()=>eA(!1)})]})}function nm(){let e=(0,tt.aK)().currentSession();return(0,er.jsx)(nu,{},e.id)}},79296:function(e){e.exports={"message-exporter-body":"exporter_message-exporter-body__ieezO","export-content":"exporter_export-content__bLZvx",steps:"exporter_steps__6n3hv","steps-progress":"exporter_steps-progress__BaZCB","steps-progress-inner":"exporter_steps-progress-inner__Bx3Y4","steps-inner":"exporter_steps-inner__EVqvK",step:"exporter_step__WhCEO","step-finished":"exporter_step-finished__eBg9d","step-current":"exporter_step-current__oh5Mc","step-index":"exporter_step-index__bWRYR","step-name":"exporter_step-name__aj81m","preview-actions":"exporter_preview-actions__EdSLJ","image-previewer":"exporter_image-previewer__uKfNQ","preview-body":"exporter_preview-body__qK5Zf","chat-info":"exporter_chat-info__N_j5m",icons:"exporter_icons__7WRoV",logo:"exporter_logo__zu13e","main-title":"exporter_main-title__jjxAd","sub-title":"exporter_sub-title__p1RCl","icon-space":"exporter_icon-space__u_tMK","chat-info-item":"exporter_chat-info-item__3D12j",message:"exporter_message__3aahS",avatar:"exporter_avatar__fGOtt",body:"exporter_body__gcKIl","message-image":"exporter_message-image__ofOeC","message-images":"exporter_message-images__oJoIX","message-image-multi":"exporter_message-image-multi__jzQdX","message-assistant":"exporter_message-assistant__sDmHi","message-user":"exporter_message-user__2t254"}},88809:function(e){e.exports={"message-selector":"message-selector_message-selector__dOKbo","message-filter":"message-selector_message-filter__Q5XSd","search-bar":"message-selector_search-bar__4E5gq",actions:"message-selector_actions__MyZCT",messages:"message-selector_messages__GbOLr",message:"message-selector_message___TaV9","message-selected":"message-selector_message-selected__b3mDv",avatar:"message-selector_avatar__HCJ8t",body:"message-selector_body__rKEIZ",date:"message-selector_date__vc48w",content:"message-selector_content__Z9W8L",checkbox:"message-selector_checkbox__erPyd"}},2366:function(e){e.exports={"realtime-chat":"realtime-chat_realtime-chat__g_U_c","circle-mic":"realtime-chat_circle-mic__SfmZp","icon-center":"realtime-chat_icon-center__3JpXN","bottom-icons":"realtime-chat_bottom-icons__siVHg","icon-left":"realtime-chat_icon-left__O_fpx","icon-right":"realtime-chat_icon-right__3eC9i",mobile:"realtime-chat_mobile__WtJW9",pulse:"realtime-chat_pulse__DSlz2"}},69927:function(e){e.exports={"voice-print":"voice-print_voice-print__GHMDU"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.