From 3ea85a6d59dc5bb594ea3421f172bc67b1cd3f3d Mon Sep 17 00:00:00 2001 From: aries_ckt <916701291@qq.com> Date: Fri, 3 Nov 2023 17:50:01 +0800 Subject: [PATCH] feat:web add reference --- pilot/scene/chat_knowledge/v1/chat.py | 12 +++++++----- pilot/server/static/404.html | 2 +- pilot/server/static/404/index.html | 2 +- .../_buildManifest.js | 2 +- .../_ssgManifest.js | 0 ...4.f9e3c1ab25dda485.js => 304.406e3b6b89d8e49a.js} | 2 +- .../_next/static/chunks/604.0b6534ada5e802bc.js | 1 - .../_next/static/chunks/604.3bbbeaa2c767e7dc.js | 1 + ...-7394a5c2fd417054.js => _app-41ccdddf1de778e7.js} | 2 +- .../static/chunks/pages/database-2066e1a37e227df6.js | 1 + .../static/chunks/pages/database-ed7e37a49de751e1.js | 1 - .../chunks/pages/knowledge-40fc3593b22ec10a.js | 1 + .../chunks/pages/knowledge-c73b240310994685.js | 1 - ...cb320c82fd7041.js => webpack-77553ab117b6c794.js} | 2 +- .../static/_next/static/css/6e82c5f591153e56.css | 3 --- .../static/_next/static/css/d07b94ffd4f33c05.css | 3 +++ pilot/server/static/agent/index.html | 2 +- pilot/server/static/chat/[scene]/[id]/index.html | 2 +- pilot/server/static/chat/index.html | 2 +- pilot/server/static/database/index.html | 2 +- pilot/server/static/index.html | 2 +- pilot/server/static/knowledge/chunk/index.html | 2 +- pilot/server/static/knowledge/index.html | 2 +- pilot/server/static/models/index.html | 2 +- pilot/server/static/prompt/index.html | 2 +- 25 files changed, 28 insertions(+), 26 deletions(-) rename pilot/server/static/_next/static/{2DHoqE6YLNDUgtBJJVe8p => Kx09a-jiuL7Kdi7fpiNnT}/_buildManifest.js (81%) rename pilot/server/static/_next/static/{2DHoqE6YLNDUgtBJJVe8p => Kx09a-jiuL7Kdi7fpiNnT}/_ssgManifest.js (100%) rename pilot/server/static/_next/static/chunks/{304.f9e3c1ab25dda485.js => 304.406e3b6b89d8e49a.js} (74%) delete mode 100644 pilot/server/static/_next/static/chunks/604.0b6534ada5e802bc.js create mode 100644 pilot/server/static/_next/static/chunks/604.3bbbeaa2c767e7dc.js rename pilot/server/static/_next/static/chunks/pages/{_app-7394a5c2fd417054.js => _app-41ccdddf1de778e7.js} (92%) create mode 100644 pilot/server/static/_next/static/chunks/pages/database-2066e1a37e227df6.js delete mode 100644 pilot/server/static/_next/static/chunks/pages/database-ed7e37a49de751e1.js create mode 100644 pilot/server/static/_next/static/chunks/pages/knowledge-40fc3593b22ec10a.js delete mode 100644 pilot/server/static/_next/static/chunks/pages/knowledge-c73b240310994685.js rename pilot/server/static/_next/static/chunks/{webpack-fbcb320c82fd7041.js => webpack-77553ab117b6c794.js} (60%) delete mode 100644 pilot/server/static/_next/static/css/6e82c5f591153e56.css create mode 100644 pilot/server/static/_next/static/css/d07b94ffd4f33c05.css diff --git a/pilot/scene/chat_knowledge/v1/chat.py b/pilot/scene/chat_knowledge/v1/chat.py index 4f3646718..d57b32b25 100644 --- a/pilot/scene/chat_knowledge/v1/chat.py +++ b/pilot/scene/chat_knowledge/v1/chat.py @@ -130,19 +130,21 @@ def parse_source_view(self, sources: List): build knowledge reference view message to web { "title":"References", - "reference":{ + "references":[{ "name":"aa.pdf", "pages":["1","2","3"] - }, + }] } """ - references = {"title": "References", "reference": {}} + references = {"title": "References", "references": []} for item in sources: + reference = {} source = item["source"] if "source" in item else "" - references["reference"]["name"] = source + reference["name"] = source pages = item["pages"] if "pages" in item else [] if len(pages) > 0: - references["reference"]["pages"] = pages + reference["pages"] = pages + references["references"].append(reference) html = ( f"""{json.dumps(references, ensure_ascii=False)}""" ) diff --git a/pilot/server/static/404.html b/pilot/server/static/404.html index 63a2f9803..cb2ecf3aa 100644 --- a/pilot/server/static/404.html +++ b/pilot/server/static/404.html @@ -1 +1 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/pilot/server/static/404/index.html b/pilot/server/static/404/index.html index 63a2f9803..cb2ecf3aa 100644 --- a/pilot/server/static/404/index.html +++ b/pilot/server/static/404/index.html @@ -1 +1 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/pilot/server/static/_next/static/2DHoqE6YLNDUgtBJJVe8p/_buildManifest.js b/pilot/server/static/_next/static/Kx09a-jiuL7Kdi7fpiNnT/_buildManifest.js similarity index 81% rename from pilot/server/static/_next/static/2DHoqE6YLNDUgtBJJVe8p/_buildManifest.js rename to pilot/server/static/_next/static/Kx09a-jiuL7Kdi7fpiNnT/_buildManifest.js index 95dcfcb73..004ab89c7 100644 --- a/pilot/server/static/_next/static/2DHoqE6YLNDUgtBJJVe8p/_buildManifest.js +++ b/pilot/server/static/_next/static/Kx09a-jiuL7Kdi7fpiNnT/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(s,c,a,e,t,n,b,d,k,h,i,u){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[b,s,c,a,n,d,"static/chunks/539-dcd22f1f6b99ebee.js","static/chunks/pages/index-195d2b50dab810dd.js"],"/_error":["static/chunks/pages/_error-dee72aff9b2e2c12.js"],"/agent":[s,c,e,k,t,"static/chunks/pages/agent-25358689f05784e9.js"],"/chat":["static/chunks/pages/chat-4b4742a8b97ead61.js"],"/chat/[scene]/[id]":["static/chunks/pages/chat/[scene]/[id]-c4ba90e8044f953b.js"],"/database":[s,c,a,e,t,n,h,"static/chunks/643-d8f53f40dd3c5b40.js","static/chunks/pages/database-ed7e37a49de751e1.js"],"/knowledge":[i,s,c,e,k,t,n,"static/chunks/63-d9f1013be8e4599a.js","static/chunks/pages/knowledge-c73b240310994685.js"],"/knowledge/chunk":[e,t,"static/chunks/pages/knowledge/chunk-e27c2e349b868b28.js"],"/models":[i,s,c,a,u,h,"static/chunks/pages/models-fab5e316babfc6de.js"],"/prompt":[b,s,c,a,u,d,"static/chunks/45-9ff739c09925ea35.js","static/chunks/61-d2f6cba798a49339.js","static/chunks/367-2a6e805cba0c79d3.js","static/chunks/pages/prompt-f7fa6931310ae8ba.js"],sortedPages:["/","/_app","/_error","/agent","/chat","/chat/[scene]/[id]","/database","/knowledge","/knowledge/chunk","/models","/prompt"]}}("static/chunks/44-941ba89e47567ba3.js","static/chunks/479-68b22ee2b7a47fb3.js","static/chunks/9-bb2c54d5c06ba4bf.js","static/chunks/442-197e6cbc1e54109a.js","static/chunks/813-cce9482e33f2430c.js","static/chunks/411-d9eba2657c72f766.js","static/chunks/29107295-90b90cb30c825230.js","static/chunks/719-5a18c3c696beda6f.js","static/chunks/365-2cad3676ccbb1b1a.js","static/chunks/928-74244889bd7f2699.js","static/chunks/75fc9c18-a784766a129ec5fb.js","static/chunks/815-fa0a8da2d0a72116.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(s,c,a,e,t,n,b,d,k,h,i,f){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[b,s,c,a,n,d,"static/chunks/539-dcd22f1f6b99ebee.js","static/chunks/pages/index-195d2b50dab810dd.js"],"/_error":["static/chunks/pages/_error-dee72aff9b2e2c12.js"],"/agent":[s,c,e,k,t,"static/chunks/pages/agent-25358689f05784e9.js"],"/chat":["static/chunks/pages/chat-4b4742a8b97ead61.js"],"/chat/[scene]/[id]":["static/chunks/pages/chat/[scene]/[id]-c4ba90e8044f953b.js"],"/database":[s,c,a,e,t,n,h,"static/chunks/643-d8f53f40dd3c5b40.js","static/chunks/pages/database-2066e1a37e227df6.js"],"/knowledge":[i,s,c,e,k,t,n,"static/chunks/63-d9f1013be8e4599a.js","static/chunks/pages/knowledge-40fc3593b22ec10a.js"],"/knowledge/chunk":[e,t,"static/chunks/pages/knowledge/chunk-e27c2e349b868b28.js"],"/models":[i,s,c,a,f,h,"static/chunks/pages/models-fab5e316babfc6de.js"],"/prompt":[b,s,c,a,f,d,"static/chunks/45-9ff739c09925ea35.js","static/chunks/61-d2f6cba798a49339.js","static/chunks/367-2a6e805cba0c79d3.js","static/chunks/pages/prompt-f7fa6931310ae8ba.js"],sortedPages:["/","/_app","/_error","/agent","/chat","/chat/[scene]/[id]","/database","/knowledge","/knowledge/chunk","/models","/prompt"]}}("static/chunks/44-941ba89e47567ba3.js","static/chunks/479-68b22ee2b7a47fb3.js","static/chunks/9-bb2c54d5c06ba4bf.js","static/chunks/442-197e6cbc1e54109a.js","static/chunks/813-cce9482e33f2430c.js","static/chunks/411-d9eba2657c72f766.js","static/chunks/29107295-90b90cb30c825230.js","static/chunks/719-5a18c3c696beda6f.js","static/chunks/365-2cad3676ccbb1b1a.js","static/chunks/928-74244889bd7f2699.js","static/chunks/75fc9c18-a784766a129ec5fb.js","static/chunks/815-fa0a8da2d0a72116.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/pilot/server/static/_next/static/2DHoqE6YLNDUgtBJJVe8p/_ssgManifest.js b/pilot/server/static/_next/static/Kx09a-jiuL7Kdi7fpiNnT/_ssgManifest.js similarity index 100% rename from pilot/server/static/_next/static/2DHoqE6YLNDUgtBJJVe8p/_ssgManifest.js rename to pilot/server/static/_next/static/Kx09a-jiuL7Kdi7fpiNnT/_ssgManifest.js diff --git a/pilot/server/static/_next/static/chunks/304.f9e3c1ab25dda485.js b/pilot/server/static/_next/static/chunks/304.406e3b6b89d8e49a.js similarity index 74% rename from pilot/server/static/_next/static/chunks/304.f9e3c1ab25dda485.js rename to pilot/server/static/_next/static/chunks/304.406e3b6b89d8e49a.js index 0cd7e35d9..a065ea081 100644 --- a/pilot/server/static/_next/static/chunks/304.f9e3c1ab25dda485.js +++ b/pilot/server/static/_next/static/chunks/304.406e3b6b89d8e49a.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[304],{39156:function(e,t,l){"use strict";l.d(t,{Z:function(){return m}});var a=l(85893),n=l(41118),s=l(30208),r=l(40911),c=l(58234);function i(e){let{chart:t}=e;return(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(n.Z,{className:"h-full",sx:{background:"transparent"},children:(0,a.jsxs)(s.Z,{className:"h-full",children:[(0,a.jsx)(r.ZP,{gutterBottom:!0,component:"div",children:t.chart_name}),(0,a.jsx)(r.ZP,{gutterBottom:!0,level:"body3",children:t.chart_desc}),(0,a.jsx)("div",{className:"h-[300px]",children:(0,a.jsx)(c.k,{style:{height:"100%"},options:{autoFit:!0,type:"interval",data:t.values,encode:{x:"name",y:"value",color:"type"},axis:{x:{labelAutoRotate:!1}}}})})]})})})}function o(e){let{chart:t}=e;return(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(n.Z,{className:"h-full",sx:{background:"transparent"},children:(0,a.jsxs)(s.Z,{className:"h-full",children:[(0,a.jsx)(r.ZP,{gutterBottom:!0,component:"div",children:t.chart_name}),(0,a.jsx)(r.ZP,{gutterBottom:!0,level:"body3",children:t.chart_desc}),(0,a.jsx)("div",{className:"h-[300px]",children:(0,a.jsx)(c.k,{style:{height:"100%"},options:{autoFit:!0,type:"view",data:t.values,children:[{type:"line",encode:{x:"name",y:"value",color:"type",shape:"smooth"}},{type:"area",encode:{x:"name",y:"value",color:"type",shape:"smooth"},legend:!1,style:{fillOpacity:.15}}],axis:{x:{labelAutoRotate:!1}}}})})]})})})}var d=l(61685),u=l(96486);function h(e){var t,l;let{chart:c}=e,i=(0,u.groupBy)(c.values,"type");return(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(n.Z,{className:"h-full overflow-auto",sx:{background:"transparent"},children:(0,a.jsxs)(s.Z,{className:"h-full",children:[(0,a.jsx)(r.ZP,{gutterBottom:!0,component:"div",children:c.chart_name}),(0,a.jsx)(r.ZP,{gutterBottom:!0,level:"body3",children:c.chart_desc}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)(d.Z,{"aria-label":"basic table",stripe:"odd",hoverRow:!0,borderAxis:"bothBetween",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{children:Object.keys(i).map(e=>(0,a.jsx)("th",{children:e},e))})}),(0,a.jsx)("tbody",{children:null===(t=Object.values(i))||void 0===t?void 0:null===(l=t[0])||void 0===l?void 0:l.map((e,t)=>{var l;return(0,a.jsx)("tr",{children:null===(l=Object.keys(i))||void 0===l?void 0:l.map(e=>{var l;return(0,a.jsx)("td",{children:(null==i?void 0:null===(l=i[e])||void 0===l?void 0:l[t].value)||""},e)})},t)})})]})})]})})})}var x=l(67294),m=function(e){let{chartsData:t}=e,l=(0,x.useMemo)(()=>{if(t){let e=[],l=null==t?void 0:t.filter(e=>"IndicatorValue"===e.chart_type);l.length>0&&e.push({charts:l,type:"IndicatorValue"});let a=null==t?void 0:t.filter(e=>"IndicatorValue"!==e.chart_type),n=a.length,s=0;return[[0],[1],[2],[1,2],[1,3],[2,1,2],[2,1,3],[3,1,3],[3,2,3]][n].forEach(t=>{if(t>0){let l=a.slice(s,s+t);s+=t,e.push({charts:l})}}),e}},[t]);return(0,a.jsx)("div",{className:"flex flex-col gap-3",children:null==l?void 0:l.map((e,t)=>(0,a.jsx)("div",{className:"".concat((null==e?void 0:e.type)!=="IndicatorValue"?"flex gap-3":""),children:e.charts.map(e=>"IndicatorValue"===e.chart_type?(0,a.jsx)("div",{className:"flex flex-row gap-3",children:e.values.map(e=>(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(n.Z,{sx:{background:"transparent"},children:(0,a.jsxs)(s.Z,{className:"justify-around",children:[(0,a.jsx)(r.ZP,{gutterBottom:!0,component:"div",children:e.name}),(0,a.jsx)(r.ZP,{children:e.value})]})})},e.name))},e.chart_uid):"LineChart"===e.chart_type?(0,a.jsx)(o,{chart:e},e.chart_uid):"BarChart"===e.chart_type?(0,a.jsx)(i,{chart:e},e.chart_uid):"Table"===e.chart_type?(0,a.jsx)(h,{chart:e},e.chart_uid):void 0)},"chart_row_".concat(t)))})}},70803:function(e,t,l){"use strict";l.d(t,{Z:function(){return B}});var a=l(85893),n=l(67294),s=l(2453),r=l(83062),c=l(31365),i=l(71577),o=l(49591),d=l(88484),u=l(29158),h=l(50489),x=l(41468),m=function(e){var t;let{convUid:l,chatMode:m,onComplete:p,...v}=e,[f,j]=(0,n.useState)(!1),[g,y]=s.ZP.useMessage(),[b,Z]=(0,n.useState)([]),[w,N]=(0,n.useState)(),{model:_}=(0,n.useContext)(x.p),P=async e=>{var t;if(!e){s.ZP.error("Please select the *.(csv|xlsx|xls) file");return}if(!/\.(csv|xlsx|xls)$/.test(null!==(t=e.file.name)&&void 0!==t?t:"")){s.ZP.error("File type must be csv, xlsx or xls");return}Z([e.file])},C=async()=>{j(!0);try{let e=new FormData;e.append("doc_file",b[0]),g.open({content:"Uploading ".concat(b[0].name),type:"loading",duration:0});let[t]=await (0,h.Vx)((0,h.qn)({convUid:l,chatMode:m,data:e,model:_,config:{timeout:36e5,onUploadProgress:e=>{let t=Math.ceil(e.loaded/(e.total||0)*100);N(t)}}}));if(t)return;s.ZP.success("success"),null==p||p()}catch(e){s.ZP.error((null==e?void 0:e.message)||"Upload Error")}finally{j(!1),g.destroy()}};return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[y,(0,a.jsx)(r.Z,{placement:"bottom",title:"File cannot be changed after upload",children:(0,a.jsx)(c.default,{disabled:f,className:"mr-1",beforeUpload:()=>!1,fileList:b,name:"file",accept:".csv,.xlsx,.xls",multiple:!1,onChange:P,showUploadList:{showDownloadIcon:!1,showPreviewIcon:!1,showRemoveIcon:!1},itemRender:()=>(0,a.jsx)(a.Fragment,{}),...v,children:(0,a.jsx)(i.ZP,{className:"flex justify-center items-center",type:"primary",disabled:f,icon:(0,a.jsx)(o.Z,{}),children:"Select File"})})}),(0,a.jsx)(i.ZP,{type:"primary",loading:f,className:"flex justify-center items-center",disabled:!b.length,icon:(0,a.jsx)(d.Z,{}),onClick:C,children:f?100===w?"Analysis":"Uploading":"Upload"}),!!b.length&&(0,a.jsxs)("div",{className:"mt-2 text-gray-500 text-sm flex items-center",children:[(0,a.jsx)(u.Z,{className:"mr-2"}),(0,a.jsx)("span",{children:null===(t=b[0])||void 0===t?void 0:t.name})]})]})})},p=function(e){let{onComplete:t}=e,{currentDialogue:l,scene:s,chatId:r}=(0,n.useContext)(x.p);return"chat_excel"!==s?null:(0,a.jsx)("div",{className:"max-w-md h-full relative",children:l?(0,a.jsxs)("div",{className:"flex h-8 overflow-hidden rounded",children:[(0,a.jsx)("div",{className:"flex items-center justify-center px-2 bg-gray-600 text-lg",children:(0,a.jsx)(u.Z,{className:"text-white"})}),(0,a.jsx)("div",{className:"flex items-center justify-center px-3 bg-gray-100 text-xs rounded-tr rounded-br dark:text-gray-800 truncate",children:l.select_param})]}):(0,a.jsx)(m,{convUid:r,chatMode:s,onComplete:t})})};l(23293);var v=l(78045),f=l(16165),j=l(96991),g=function(){return(0,a.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",children:(0,a.jsx)("path",{d:"M602.24 246.72a17.28 17.28 0 0 0-11.84-16.32l-42.88-14.4A90.56 90.56 0 0 1 490.24 160l-14.4-42.88a17.28 17.28 0 0 0-32 0L428.8 160a90.56 90.56 0 0 1-57.28 57.28l-42.88 14.4a17.28 17.28 0 0 0 0 32l42.88 14.4a90.56 90.56 0 0 1 57.28 57.28l14.4 42.88a17.28 17.28 0 0 0 32 0l14.4-42.88a90.56 90.56 0 0 1 57.28-57.28l42.88-14.4a17.28 17.28 0 0 0 12.48-16.96z m301.12 221.76l-48.32-16a101.44 101.44 0 0 1-64-64l-16-48.32a19.2 19.2 0 0 0-36.8 0l-16 48.32a101.44 101.44 0 0 1-64 64l-48.32 16a19.2 19.2 0 0 0 0 36.8l48.32 16a101.44 101.44 0 0 1 64 64l16 48.32a19.2 19.2 0 0 0 36.8 0l16-48.32a101.44 101.44 0 0 1 64-64l48.32-16a19.2 19.2 0 0 0 0-36.8z m-376.64 195.52l-64-20.8a131.84 131.84 0 0 1-83.52-83.52l-20.8-64a25.28 25.28 0 0 0-47.68 0l-20.8 64a131.84 131.84 0 0 1-82.24 83.52l-64 20.8a25.28 25.28 0 0 0 0 47.68l64 20.8a131.84 131.84 0 0 1 83.52 83.84l20.8 64a25.28 25.28 0 0 0 47.68 0l20.8-64a131.84 131.84 0 0 1 83.52-83.52l64-20.8a25.28 25.28 0 0 0 0-47.68z","p-id":"3992"})})};function y(){let{isContract:e,setIsContract:t,scene:l}=(0,n.useContext)(x.p),s=l&&["chat_with_db_execute","chat_dashboard"].includes(l);return s?(0,a.jsxs)(v.ZP.Group,{value:e,defaultValue:!0,buttonStyle:"solid",onChange:()=>{t(!e)},children:[(0,a.jsxs)(v.ZP.Button,{value:!1,children:[(0,a.jsx)(f.Z,{component:g,className:"mr-1"}),"Preview"]}),(0,a.jsxs)(v.ZP.Button,{value:!0,children:[(0,a.jsx)(j.Z,{className:"mr-1"}),"Editor"]})]}):null}var b=l(81799),Z=function(){return(0,a.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4870",children:(0,a.jsx)("path",{d:"M511.875 128.125c-211.875 0-383.75 76.25-383.75 170.625 0 94.375 171.875 170.625 383.75 170.625 211.875 0 383.75-76.25 383.75-170.625C896.25 204.375 724.375 128.125 511.875 128.125M128.125 383.75l0 128.125c0 94.375 171.875 170.625 383.75 170.625 211.875 0 383.75-76.25 383.75-170.625l0-128.125c0 94.375-171.875 170.625-383.75 170.625C300 555 128.125 478.125 128.125 383.75M128.125 597.5l0 128.125c0 94.375 171.875 170.625 383.75 170.625 211.875 0 383.75-76.25 383.75-170.625l0-128.125c0 94.375-171.875 170.625-383.75 170.625C300 768.125 128.125 691.875 128.125 597.5z","p-id":"4871"})})},w=l(2093),N=l(51009),_=function(){let{scene:e,dbParam:t,setDbParam:l}=(0,n.useContext)(x.p),[s,r]=(0,n.useState)({});(0,w.Z)(async()=>{let[,t]=await (0,h.Vx)((0,h.vD)(e));r(null!=t?t:{})},[e]);let c=(0,n.useMemo)(()=>Object.entries(s).map(e=>{let[t,l]=e;return{label:t,value:l}}),[s]);return((0,n.useEffect)(()=>{c.length&&!t&&l(c[0].value)},[c,l,t]),c.length)?(0,a.jsx)(N.default,{value:t,className:"w-36",onChange:e=>{l(e)},children:c.map(e=>(0,a.jsxs)(N.default.Option,{children:[(0,a.jsx)(f.Z,{component:Z,className:"mr-1"}),e.label]},e.value))}):null},P=l(577),C=l(67421),k=function(){let{t:e}=(0,C.$G)(),{agentList:t,setAgentList:l}=(0,n.useContext)(x.p),{data:s=[]}=(0,P.Z)(async()=>{let[,e]=await (0,h.Vx)((0,h.N6)());return e&&e.length&&(null==l||l([e[0].name])),null!=e?e:[]});return s.length?(0,a.jsx)(N.default,{className:"w-60",value:t,mode:"multiple",maxTagCount:1,maxTagTextLength:12,placeholder:e("Select_Plugins"),options:s.map(e=>({label:e.name,value:e.name})),allowClear:!0,onChange:e=>{null==l||l(e)}}):null},B=function(e){let{refreshHistory:t,modelChange:l}=e,{scene:s,refreshDialogList:r}=(0,n.useContext)(x.p);return(0,a.jsxs)("div",{className:"w-full py-2 px-4 md:px-4 flex flex-wrap items-center justify-center border-b border-gray-100 gap-1 md:gap-4",children:[(0,a.jsx)(b.Z,{onChange:l}),(0,a.jsx)(_,{}),"chat_excel"===s&&(0,a.jsx)(p,{onComplete:()=>{null==r||r(),null==t||t()}}),"chat_agent"===s&&(0,a.jsx)(k,{}),(0,a.jsx)(y,{})]})}},81799:function(e,t,l){"use strict";l.d(t,{A:function(){return u}});var a=l(85893),n=l(41468),s=l(51009),r=l(19284),c=l(25675),i=l.n(c),o=l(67294),d=l(67421);function u(e,t){var l;let{width:n,height:s}=t||{};return e?(0,a.jsx)(i(),{className:"rounded-full border border-gray-200 object-contain bg-white inline-block",width:n||24,height:s||24,src:(null===(l=r.H[e])||void 0===l?void 0:l.icon)||"/models/huggingface.svg",alt:"llm"}):null}t.Z=function(e){let{onChange:t}=e,{t:l}=(0,d.$G)(),{modelList:c,model:i}=(0,o.useContext)(n.p);return!c||c.length<=0?null:(0,a.jsx)(s.default,{value:i,placeholder:l("choose_model"),className:"w-52",onChange:e=>{null==t||t(e)},children:c.map(e=>{var t;return(0,a.jsx)(s.default.Option,{children:(0,a.jsxs)("div",{className:"flex items-center",children:[u(e),(0,a.jsx)("span",{className:"ml-2",children:(null===(t=r.H[e])||void 0===t?void 0:t.label)||e})]})},e)})})}},99513:function(e,t,l){"use strict";l.d(t,{Z:function(){return d}});var a=l(85893),n=l(77119),s=l(63764),r=l(94184),c=l.n(r),i=l(67294),o=l(36782);function d(e){let{className:t,value:l,language:n="mysql",onChange:r,thoughts:d}=e,u=(0,i.useMemo)(()=>"mysql"!==n?l:d&&d.length>0?(0,o.WU)("-- ".concat(d," \n").concat(l)):(0,o.WU)(l),[l,d]);return(0,a.jsx)(s.ZP,{className:c()(t),value:u,language:n,onChange:r,theme:"vs-dark",options:{minimap:{enabled:!1},wordWrap:"on"}})}s._m.config({monaco:n})},30119:function(e,t,l){"use strict";l.d(t,{Tk:function(){return i},PR:function(){return o}});var a=l(2453),n=l(6154),s=l(83454);let r=n.Z.create({baseURL:s.env.API_BASE_URL});r.defaults.timeout=1e4,r.interceptors.response.use(e=>e.data,e=>Promise.reject(e)),l(96486);let c={"content-type":"application/json"},i=(e,t)=>{if(t){let l=Object.keys(t).filter(e=>void 0!==t[e]&&""!==t[e]).map(e=>"".concat(e,"=").concat(t[e])).join("&");l&&(e+="?".concat(l))}return r.get("/api"+e,{headers:c}).then(e=>e).catch(e=>{a.ZP.error(e),Promise.reject(e)})},o=(e,t)=>r.post(e,t,{headers:c}).then(e=>e).catch(e=>{a.ZP.error(e),Promise.reject(e)})},23293:function(){}}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[304],{39156:function(e,t,l){"use strict";l.d(t,{Z:function(){return m}});var a=l(85893),n=l(41118),s=l(30208),r=l(40911),c=l(58234);function i(e){let{chart:t}=e;return(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(n.Z,{className:"h-full",sx:{background:"transparent"},children:(0,a.jsxs)(s.Z,{className:"h-full",children:[(0,a.jsx)(r.ZP,{gutterBottom:!0,component:"div",children:t.chart_name}),(0,a.jsx)(r.ZP,{gutterBottom:!0,level:"body3",children:t.chart_desc}),(0,a.jsx)("div",{className:"h-[300px]",children:(0,a.jsx)(c.k,{style:{height:"100%"},options:{autoFit:!0,type:"interval",data:t.values,encode:{x:"name",y:"value",color:"type"},axis:{x:{labelAutoRotate:!1}}}})})]})})})}function o(e){let{chart:t}=e;return(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(n.Z,{className:"h-full",sx:{background:"transparent"},children:(0,a.jsxs)(s.Z,{className:"h-full",children:[(0,a.jsx)(r.ZP,{gutterBottom:!0,component:"div",children:t.chart_name}),(0,a.jsx)(r.ZP,{gutterBottom:!0,level:"body3",children:t.chart_desc}),(0,a.jsx)("div",{className:"h-[300px]",children:(0,a.jsx)(c.k,{style:{height:"100%"},options:{autoFit:!0,type:"view",data:t.values,children:[{type:"line",encode:{x:"name",y:"value",color:"type",shape:"smooth"}},{type:"area",encode:{x:"name",y:"value",color:"type",shape:"smooth"},legend:!1,style:{fillOpacity:.15}}],axis:{x:{labelAutoRotate:!1}}}})})]})})})}var d=l(61685),u=l(96486);function h(e){var t,l;let{chart:c}=e,i=(0,u.groupBy)(c.values,"type");return(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(n.Z,{className:"h-full overflow-auto",sx:{background:"transparent"},children:(0,a.jsxs)(s.Z,{className:"h-full",children:[(0,a.jsx)(r.ZP,{gutterBottom:!0,component:"div",children:c.chart_name}),(0,a.jsx)(r.ZP,{gutterBottom:!0,level:"body3",children:c.chart_desc}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)(d.Z,{"aria-label":"basic table",stripe:"odd",hoverRow:!0,borderAxis:"bothBetween",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{children:Object.keys(i).map(e=>(0,a.jsx)("th",{children:e},e))})}),(0,a.jsx)("tbody",{children:null===(t=Object.values(i))||void 0===t?void 0:null===(l=t[0])||void 0===l?void 0:l.map((e,t)=>{var l;return(0,a.jsx)("tr",{children:null===(l=Object.keys(i))||void 0===l?void 0:l.map(e=>{var l;return(0,a.jsx)("td",{children:(null==i?void 0:null===(l=i[e])||void 0===l?void 0:l[t].value)||""},e)})},t)})})]})})]})})})}var x=l(67294),m=function(e){let{chartsData:t}=e,l=(0,x.useMemo)(()=>{if(t){let e=[],l=null==t?void 0:t.filter(e=>"IndicatorValue"===e.chart_type);l.length>0&&e.push({charts:l,type:"IndicatorValue"});let a=null==t?void 0:t.filter(e=>"IndicatorValue"!==e.chart_type),n=a.length,s=0;return[[0],[1],[2],[1,2],[1,3],[2,1,2],[2,1,3],[3,1,3],[3,2,3]][n].forEach(t=>{if(t>0){let l=a.slice(s,s+t);s+=t,e.push({charts:l})}}),e}},[t]);return(0,a.jsx)("div",{className:"flex flex-col gap-3",children:null==l?void 0:l.map((e,t)=>(0,a.jsx)("div",{className:"".concat((null==e?void 0:e.type)!=="IndicatorValue"?"flex gap-3":""),children:e.charts.map(e=>"IndicatorValue"===e.chart_type?(0,a.jsx)("div",{className:"flex flex-row gap-3",children:e.values.map(e=>(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(n.Z,{sx:{background:"transparent"},children:(0,a.jsxs)(s.Z,{className:"justify-around",children:[(0,a.jsx)(r.ZP,{gutterBottom:!0,component:"div",children:e.name}),(0,a.jsx)(r.ZP,{children:e.value})]})})},e.name))},e.chart_uid):"LineChart"===e.chart_type?(0,a.jsx)(o,{chart:e},e.chart_uid):"BarChart"===e.chart_type?(0,a.jsx)(i,{chart:e},e.chart_uid):"Table"===e.chart_type?(0,a.jsx)(h,{chart:e},e.chart_uid):void 0)},"chart_row_".concat(t)))})}},70803:function(e,t,l){"use strict";l.d(t,{Z:function(){return U}});var a=l(85893),n=l(67294),s=l(2453),r=l(83062),c=l(31365),i=l(71577),o=l(49591),d=l(88484),u=l(29158),h=l(50489),x=l(41468),m=function(e){var t;let{convUid:l,chatMode:m,onComplete:p,...v}=e,[f,j]=(0,n.useState)(!1),[g,y]=s.ZP.useMessage(),[b,Z]=(0,n.useState)([]),[w,N]=(0,n.useState)(),{model:_}=(0,n.useContext)(x.p),P=async e=>{var t;if(!e){s.ZP.error("Please select the *.(csv|xlsx|xls) file");return}if(!/\.(csv|xlsx|xls)$/.test(null!==(t=e.file.name)&&void 0!==t?t:"")){s.ZP.error("File type must be csv, xlsx or xls");return}Z([e.file])},C=async()=>{j(!0);try{let e=new FormData;e.append("doc_file",b[0]),g.open({content:"Uploading ".concat(b[0].name),type:"loading",duration:0});let[t]=await (0,h.Vx)((0,h.qn)({convUid:l,chatMode:m,data:e,model:_,config:{timeout:36e5,onUploadProgress:e=>{let t=Math.ceil(e.loaded/(e.total||0)*100);N(t)}}}));if(t)return;s.ZP.success("success"),null==p||p()}catch(e){s.ZP.error((null==e?void 0:e.message)||"Upload Error")}finally{j(!1),g.destroy()}};return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[y,(0,a.jsx)(r.Z,{placement:"bottom",title:"File cannot be changed after upload",children:(0,a.jsx)(c.default,{disabled:f,className:"mr-1",beforeUpload:()=>!1,fileList:b,name:"file",accept:".csv,.xlsx,.xls",multiple:!1,onChange:P,showUploadList:{showDownloadIcon:!1,showPreviewIcon:!1,showRemoveIcon:!1},itemRender:()=>(0,a.jsx)(a.Fragment,{}),...v,children:(0,a.jsx)(i.ZP,{className:"flex justify-center items-center",type:"primary",disabled:f,icon:(0,a.jsx)(o.Z,{}),children:"Select File"})})}),(0,a.jsx)(i.ZP,{type:"primary",loading:f,className:"flex justify-center items-center",disabled:!b.length,icon:(0,a.jsx)(d.Z,{}),onClick:C,children:f?100===w?"Analysis":"Uploading":"Upload"}),!!b.length&&(0,a.jsxs)("div",{className:"mt-2 text-gray-500 text-sm flex items-center",children:[(0,a.jsx)(u.Z,{className:"mr-2"}),(0,a.jsx)("span",{children:null===(t=b[0])||void 0===t?void 0:t.name})]})]})})},p=function(e){let{onComplete:t}=e,{currentDialogue:l,scene:s,chatId:r}=(0,n.useContext)(x.p);return"chat_excel"!==s?null:(0,a.jsx)("div",{className:"max-w-md h-full relative",children:l?(0,a.jsxs)("div",{className:"flex h-8 overflow-hidden rounded",children:[(0,a.jsx)("div",{className:"flex items-center justify-center px-2 bg-gray-600 text-lg",children:(0,a.jsx)(u.Z,{className:"text-white"})}),(0,a.jsx)("div",{className:"flex items-center justify-center px-3 bg-gray-100 text-xs rounded-tr rounded-br dark:text-gray-800 truncate",children:l.select_param})]}):(0,a.jsx)(m,{convUid:r,chatMode:s,onComplete:t})})};l(23293);var v=l(78045),f=l(16165),j=l(96991),g=function(){return(0,a.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",children:(0,a.jsx)("path",{d:"M602.24 246.72a17.28 17.28 0 0 0-11.84-16.32l-42.88-14.4A90.56 90.56 0 0 1 490.24 160l-14.4-42.88a17.28 17.28 0 0 0-32 0L428.8 160a90.56 90.56 0 0 1-57.28 57.28l-42.88 14.4a17.28 17.28 0 0 0 0 32l42.88 14.4a90.56 90.56 0 0 1 57.28 57.28l14.4 42.88a17.28 17.28 0 0 0 32 0l14.4-42.88a90.56 90.56 0 0 1 57.28-57.28l42.88-14.4a17.28 17.28 0 0 0 12.48-16.96z m301.12 221.76l-48.32-16a101.44 101.44 0 0 1-64-64l-16-48.32a19.2 19.2 0 0 0-36.8 0l-16 48.32a101.44 101.44 0 0 1-64 64l-48.32 16a19.2 19.2 0 0 0 0 36.8l48.32 16a101.44 101.44 0 0 1 64 64l16 48.32a19.2 19.2 0 0 0 36.8 0l16-48.32a101.44 101.44 0 0 1 64-64l48.32-16a19.2 19.2 0 0 0 0-36.8z m-376.64 195.52l-64-20.8a131.84 131.84 0 0 1-83.52-83.52l-20.8-64a25.28 25.28 0 0 0-47.68 0l-20.8 64a131.84 131.84 0 0 1-82.24 83.52l-64 20.8a25.28 25.28 0 0 0 0 47.68l64 20.8a131.84 131.84 0 0 1 83.52 83.84l20.8 64a25.28 25.28 0 0 0 47.68 0l20.8-64a131.84 131.84 0 0 1 83.52-83.52l64-20.8a25.28 25.28 0 0 0 0-47.68z","p-id":"3992"})})};function y(){let{isContract:e,setIsContract:t,scene:l}=(0,n.useContext)(x.p),s=l&&["chat_with_db_execute","chat_dashboard"].includes(l);return s?(0,a.jsxs)(v.ZP.Group,{value:e,defaultValue:!0,buttonStyle:"solid",onChange:()=>{t(!e)},children:[(0,a.jsxs)(v.ZP.Button,{value:!1,children:[(0,a.jsx)(f.Z,{component:g,className:"mr-1"}),"Preview"]}),(0,a.jsxs)(v.ZP.Button,{value:!0,children:[(0,a.jsx)(j.Z,{className:"mr-1"}),"Editor"]})]}):null}var b=l(81799),Z=function(){return(0,a.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4870",children:(0,a.jsx)("path",{d:"M511.875 128.125c-211.875 0-383.75 76.25-383.75 170.625 0 94.375 171.875 170.625 383.75 170.625 211.875 0 383.75-76.25 383.75-170.625C896.25 204.375 724.375 128.125 511.875 128.125M128.125 383.75l0 128.125c0 94.375 171.875 170.625 383.75 170.625 211.875 0 383.75-76.25 383.75-170.625l0-128.125c0 94.375-171.875 170.625-383.75 170.625C300 555 128.125 478.125 128.125 383.75M128.125 597.5l0 128.125c0 94.375 171.875 170.625 383.75 170.625 211.875 0 383.75-76.25 383.75-170.625l0-128.125c0 94.375-171.875 170.625-383.75 170.625C300 768.125 128.125 691.875 128.125 597.5z","p-id":"4871"})})},w=l(2093),N=l(51009),_=function(){let{scene:e,dbParam:t,setDbParam:l}=(0,n.useContext)(x.p),[s,r]=(0,n.useState)({});(0,w.Z)(async()=>{let[,t]=await (0,h.Vx)((0,h.vD)(e));r(null!=t?t:{})},[e]);let c=(0,n.useMemo)(()=>Object.entries(s).map(e=>{let[t,l]=e;return{label:t,value:l}}),[s]);return((0,n.useEffect)(()=>{c.length&&!t&&l(c[0].value)},[c,l,t]),c.length)?(0,a.jsx)(N.default,{value:t,className:"w-36",onChange:e=>{l(e)},children:c.map(e=>(0,a.jsxs)(N.default.Option,{children:[(0,a.jsx)(f.Z,{component:Z,className:"mr-1"}),e.label]},e.value))}):null},P=l(577),C=l(11163),k=l(67421),B=function(){let{push:e}=(0,C.useRouter)(),{t}=(0,k.$G)(),{agentList:l,setAgentList:s}=(0,n.useContext)(x.p),{data:r=[]}=(0,P.Z)(async()=>{let[,e]=await (0,h.Vx)((0,h.N6)());return e&&e.length&&(null==s||s([e[0].name])),null!=e?e:[]});return r.length?(0,a.jsx)(N.default,{className:"w-60",value:l,mode:"multiple",maxTagCount:1,maxTagTextLength:12,placeholder:t("Select_Plugins"),options:r.map(e=>({label:e.name,value:e.name})),allowClear:!0,onChange:e=>{null==s||s(e)}}):(0,a.jsx)(i.ZP,{type:"primary",onClick:()=>{e("/agent")},children:t("To_Plugin_Market")})},U=function(e){let{refreshHistory:t,modelChange:l}=e,{scene:s,refreshDialogList:r}=(0,n.useContext)(x.p);return(0,a.jsxs)("div",{className:"w-full py-2 px-4 md:px-4 flex flex-wrap items-center justify-center border-b border-gray-100 gap-1 md:gap-4",children:[(0,a.jsx)(b.Z,{onChange:l}),(0,a.jsx)(_,{}),"chat_excel"===s&&(0,a.jsx)(p,{onComplete:()=>{null==r||r(),null==t||t()}}),"chat_agent"===s&&(0,a.jsx)(B,{}),(0,a.jsx)(y,{})]})}},81799:function(e,t,l){"use strict";l.d(t,{A:function(){return u}});var a=l(85893),n=l(41468),s=l(51009),r=l(19284),c=l(25675),i=l.n(c),o=l(67294),d=l(67421);function u(e,t){var l;let{width:n,height:s}=t||{};return e?(0,a.jsx)(i(),{className:"rounded-full border border-gray-200 object-contain bg-white inline-block",width:n||24,height:s||24,src:(null===(l=r.H[e])||void 0===l?void 0:l.icon)||"/models/huggingface.svg",alt:"llm"}):null}t.Z=function(e){let{onChange:t}=e,{t:l}=(0,d.$G)(),{modelList:c,model:i}=(0,o.useContext)(n.p);return!c||c.length<=0?null:(0,a.jsx)(s.default,{value:i,placeholder:l("choose_model"),className:"w-52",onChange:e=>{null==t||t(e)},children:c.map(e=>{var t;return(0,a.jsx)(s.default.Option,{children:(0,a.jsxs)("div",{className:"flex items-center",children:[u(e),(0,a.jsx)("span",{className:"ml-2",children:(null===(t=r.H[e])||void 0===t?void 0:t.label)||e})]})},e)})})}},99513:function(e,t,l){"use strict";l.d(t,{Z:function(){return d}});var a=l(85893),n=l(77119),s=l(63764),r=l(94184),c=l.n(r),i=l(67294),o=l(36782);function d(e){let{className:t,value:l,language:n="mysql",onChange:r,thoughts:d}=e,u=(0,i.useMemo)(()=>"mysql"!==n?l:d&&d.length>0?(0,o.WU)("-- ".concat(d," \n").concat(l)):(0,o.WU)(l),[l,d]);return(0,a.jsx)(s.ZP,{className:c()(t),value:u,language:n,onChange:r,theme:"vs-dark",options:{minimap:{enabled:!1},wordWrap:"on"}})}s._m.config({monaco:n})},30119:function(e,t,l){"use strict";l.d(t,{Tk:function(){return i},PR:function(){return o}});var a=l(2453),n=l(6154),s=l(83454);let r=n.Z.create({baseURL:s.env.API_BASE_URL});r.defaults.timeout=1e4,r.interceptors.response.use(e=>e.data,e=>Promise.reject(e)),l(96486);let c={"content-type":"application/json"},i=(e,t)=>{if(t){let l=Object.keys(t).filter(e=>void 0!==t[e]&&""!==t[e]).map(e=>"".concat(e,"=").concat(t[e])).join("&");l&&(e+="?".concat(l))}return r.get("/api"+e,{headers:c}).then(e=>e).catch(e=>{a.ZP.error(e),Promise.reject(e)})},o=(e,t)=>r.post(e,t,{headers:c}).then(e=>e).catch(e=>{a.ZP.error(e),Promise.reject(e)})},23293:function(){}}]); \ No newline at end of file diff --git a/pilot/server/static/_next/static/chunks/604.0b6534ada5e802bc.js b/pilot/server/static/_next/static/chunks/604.0b6534ada5e802bc.js deleted file mode 100644 index 42a2d2f68..000000000 --- a/pilot/server/static/_next/static/chunks/604.0b6534ada5e802bc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[604],{24093:function(e,l,t){t.r(l),t.d(l,{default:function(){return ev}});var r=t(85893),a=t(67294),s=t(2093),n=t(1375),o=t(2453),i=t(58989),c=t(83454),d=e=>{let{queryAgentURL:l="/api/v1/chat/completions"}=e,t=(0,a.useMemo)(()=>new AbortController,[]),r=(0,a.useCallback)(async e=>{let{context:r,data:a,chatId:s,onMessage:d,onClose:u,onDone:x,onError:m}=e;if(!r){o.ZP.warning(i.Z.t("NoContextTip"));return}let h={...a,conv_uid:s,user_input:r};if(!h.conv_uid){o.ZP.error("conv_uid 不存在,请刷新后重试");return}try{var p;await (0,n.L)("".concat(null!==(p=c.env.API_BASE_URL)&&void 0!==p?p:"").concat(l),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h),signal:t.signal,openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===n.a)return},onclose(){t.abort(),null==u||u()},onerror(e){throw Error(e)},onmessage:e=>{var l;let t=null===(l=e.data)||void 0===l?void 0:l.replaceAll("\\n","\n");"[DONE]"===t?null==x||x():(null==t?void 0:t.startsWith("[ERROR]"))?null==m||m(null==t?void 0:t.replace("[ERROR]","")):null==d||d(t)}})}catch(e){t.abort(),null==m||m("Sorry, We meet some error, please try agin later.",e)}},[l]);return(0,a.useEffect)(()=>()=>{t.abort()},[]),r},u=t(39332),x=t(99513),m=t(24019),h=t(50888),p=t(97937),g=t(63606),v=t(50228),f=t(87547),b=t(89035),j=t(33035),y=t(12767),w=t(94184),Z=t.n(w),_=t(66309),N=t(81799),k=t(41468),C=t(57132),S=t(29158),P=t(98165),R=t(79166),E=t(93179),O=t(71577),D=t(38426),M=t(20640),I=t.n(M);let L={code(e){var l;let{inline:t,node:a,className:s,children:n,style:i,...c}=e,d=/language-(\w+)/.exec(s||"");return!t&&d?(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(O.ZP,{className:"absolute right-3 top-2 text-gray-300 hover:!text-gray-200 bg-gray-700",type:"text",icon:(0,r.jsx)(C.Z,{}),onClick:()=>{let e=I()(n);o.ZP[e?"success":"error"](e?"Copy success":"Copy failed")}}),(0,r.jsx)(E.Z,{language:null!==(l=null==d?void 0:d[1])&&void 0!==l?l:"javascript",style:R.Z,children:n})]}):(0,r.jsx)("code",{...c,style:i,className:"px-[6px] py-[2px] rounded bg-gray-700 text-gray-100 dark:bg-gray-100 dark:text-gray-800 text-sm",children:n})},ul(e){let{children:l}=e;return(0,r.jsx)("ul",{className:"py-1",children:l})},ol(e){let{children:l}=e;return(0,r.jsx)("ol",{className:"py-1",children:l})},li(e){let{children:l,ordered:t}=e;return(0,r.jsx)("li",{className:"text-sm leading-7 ml-5 pl-2 text-gray-600 dark:text-gray-300 ".concat(t?"list-decimal":"list-disc"),children:l})},table(e){let{children:l}=e;return(0,r.jsx)("table",{className:"my-2 rounded-tl-md rounded-tr-md max-w-full bg-white dark:bg-gray-900 text-sm rounded-lg overflow-hidden",children:l})},thead(e){let{children:l}=e;return(0,r.jsx)("thead",{className:"bg-[#fafafa] dark:bg-black font-semibold",children:l})},th(e){let{children:l}=e;return(0,r.jsx)("th",{className:"!text-left p-4",children:l})},td(e){let{children:l}=e;return(0,r.jsx)("td",{className:"p-4 border-t border-[#f0f0f0] dark:border-gray-700",children:l})},h1(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-2xl font-bold my-4 border-b border-slate-300 pb-4",children:l})},h2(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-xl font-bold my-3",children:l})},h3(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-lg font-semibold my-2",children:l})},h4(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-base font-semibold my-1",children:l})},a(e){let{children:l,href:t}=e;return(0,r.jsxs)("div",{className:"inline-block text-blue-600 dark:text-blue-400",children:[(0,r.jsx)(S.Z,{className:"mr-1"}),(0,r.jsx)("a",{href:t,target:"_blank",children:l})]})},img(e){let{src:l,alt:t}=e;return(0,r.jsx)("div",{children:(0,r.jsx)(D.Z,{className:"min-h-[1rem] max-w-full max-h-full border rounded",src:l,alt:t,placeholder:(0,r.jsx)(_.Z,{icon:(0,r.jsx)(P.Z,{spin:!0}),color:"processing",children:"Image Loading..."}),fallback:"/images/fallback.png"})})},blockquote(e){let{children:l}=e;return(0,r.jsx)("blockquote",{className:"py-4 px-6 border-l-4 border-blue-600 rounded bg-white my-2 text-gray-500 dark:bg-slate-800 dark:text-gray-200 dark:border-white shadow-sm",children:l})}},A={todo:{bgClass:"bg-gray-500",icon:(0,r.jsx)(m.Z,{className:"ml-2"})},runing:{bgClass:"bg-blue-500",icon:(0,r.jsx)(h.Z,{className:"ml-2"})},failed:{bgClass:"bg-red-500",icon:(0,r.jsx)(p.Z,{className:"ml-2"})},completed:{bgClass:"bg-green-500",icon:(0,r.jsx)(g.Z,{className:"ml-2"})}};function T(e){return e.replaceAll("\\n","\n").replace(/]+)>/gi,"").replace(/]+)>/gi,"")}var F=(0,a.memo)(function(e){let{children:l,content:t,isChartChat:s,onLinkClick:n}=e,{scene:o}=(0,a.useContext)(k.p),{context:i,model_name:c,role:d}=t,u="view"===d,{relations:x,value:m,cachePlguinContext:h}=(0,a.useMemo)(()=>{if("string"!=typeof i)return{relations:[],value:"",cachePlguinContext:[]};let[e,l]=i.split(" relations:"),t=l?l.split(","):[],r=[],a=0,s=e.replace(/]*>[^<]*<\/dbgpt-view>/gi,e=>{try{var l;console.log(e);let t=e.replaceAll("\n","\\n").replace(/<[^>]*>|<\/[^>]*>/gm,""),s=JSON.parse(t),n="".concat(a,"");return r.push({...s,result:T(null!==(l=s.result)&&void 0!==l?l:"")}),a++,n}catch(l){return console.log(l.message,l),e}});return{relations:t,cachePlguinContext:r,value:s}},[i]),p=(0,a.useMemo)(()=>({"custom-view"(e){var l;let{children:t}=e,a=+t.toString();if(!h[a])return t;let{name:s,status:n,err_msg:o,result:i}=h[a],{bgClass:c,icon:d}=null!==(l=A[n])&&void 0!==l?l:{};return(0,r.jsxs)("div",{className:"bg-white dark:bg-[#212121] rounded-lg overflow-hidden my-2 flex flex-col lg:max-w-[80%]",children:[(0,r.jsxs)("div",{className:Z()("flex px-4 md:px-6 py-2 items-center text-white text-sm",c),children:[s,d]}),i?(0,r.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:(0,r.jsx)(j.D,{components:L,rehypePlugins:[y.Z],children:null!=i?i:""})}):(0,r.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:o})]})}}),[i,h]);return(0,r.jsxs)("div",{className:Z()("relative flex flex-wrap w-full px-2 sm:px-4 py-2 sm:py-6 rounded-xl break-words",{"bg-slate-100 dark:bg-[#353539]":u,"lg:w-full xl:w-full pl-0":["chat_with_db_execute","chat_dashboard"].includes(o)}),children:[(0,r.jsx)("div",{className:"mr-2 flex flex-shrink-0 items-center justify-center h-7 w-7 rounded-full text-lg sm:mr-4",children:u?(0,N.A)(c)||(0,r.jsx)(v.Z,{}):(0,r.jsx)(f.Z,{})}),(0,r.jsxs)("div",{className:"flex-1 overflow-hidden items-center text-md leading-8",children:[!u&&"string"==typeof i&&i,u&&s&&"object"==typeof i&&(0,r.jsxs)("div",{children:["[".concat(i.template_name,"]: "),(0,r.jsxs)("span",{className:"text-[#1677ff] cursor-pointer",onClick:n,children:[(0,r.jsx)(b.Z,{className:"mr-1"}),i.template_introduce||"More Details"]})]}),u&&"string"==typeof i&&(0,r.jsx)(j.D,{components:{...L,...p},rehypePlugins:[y.Z],children:T(m)}),!!(null==x?void 0:x.length)&&(0,r.jsx)("div",{className:"flex flex-wrap mt-2",children:null==x?void 0:x.map((e,l)=>(0,r.jsx)(_.Z,{color:"#108ee9",children:e},e+l))})]}),l]})}),H=t(59301),V=t(41132),$=t(74312),q=t(3414),z=t(72868),J=t(59562),W=t(14553),G=t(25359),B=t(7203),K=t(48665),Q=t(26047),U=t(99056),X=t(57814),Y=t(63955),ee=t(33028),el=t(40911),et=t(66478),er=t(83062),ea=t(50489),es=t(67421),en=e=>{var l;let{conv_index:t,question:s,knowledge_space:n}=e,{t:i}=(0,es.$G)(),{chatId:c}=(0,a.useContext)(k.p),[d,u]=(0,a.useState)(""),[x,m]=(0,a.useState)(4),[h,p]=(0,a.useState)(""),g=(0,a.useRef)(null),[v,f]=o.ZP.useMessage(),[b,j]=(0,a.useState)({});(0,a.useEffect)(()=>{(0,ea.Vx)((0,ea.Lu)()).then(e=>{var l;console.log(e),j(null!==(l=e[1])&&void 0!==l?l:{})}).catch(e=>{console.log(e)})},[]);let y=(0,a.useCallback)((e,l)=>{l?(0,ea.Vx)((0,ea.Eb)(c,t)).then(e=>{var l,t,r,a;let s=null!==(l=e[1])&&void 0!==l?l:{};u(null!==(t=s.ques_type)&&void 0!==t?t:""),m(parseInt(null!==(r=s.score)&&void 0!==r?r:"4")),p(null!==(a=s.messages)&&void 0!==a?a:"")}).catch(e=>{console.log(e)}):(u(""),m(4),p(""))},[c,t]),w=(0,$.Z)(q.Z)(e=>{let{theme:l}=e;return{backgroundColor:"dark"===l.palette.mode?"#FBFCFD":"#0E0E10",...l.typography["body-sm"],padding:l.spacing(1),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,width:"100%",height:"100%"}});return(0,r.jsxs)(z.L,{onOpenChange:y,children:[f,(0,r.jsx)(er.Z,{title:i("Rating"),children:(0,r.jsx)(J.Z,{slots:{root:W.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,r.jsx)(H.Z,{})})}),(0,r.jsxs)(G.Z,{children:[(0,r.jsx)(B.Z,{disabled:!0,sx:{minHeight:0}}),(0,r.jsx)(K.Z,{sx:{width:"100%",maxWidth:350,display:"grid",gap:3,padding:1},children:(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault();let l={conv_uid:c,conv_index:t,question:s,knowledge_space:n,score:x,ques_type:d,messages:h};console.log(l),(0,ea.Vx)((0,ea.VC)({data:l})).then(e=>{v.open({type:"success",content:"save success"})}).catch(e=>{v.open({type:"error",content:"save error"})})},children:(0,r.jsxs)(Q.Z,{container:!0,spacing:.5,columns:13,sx:{flexGrow:1},children:[(0,r.jsx)(Q.Z,{xs:3,children:(0,r.jsx)(w,{children:i("Q_A_Category")})}),(0,r.jsx)(Q.Z,{xs:10,children:(0,r.jsx)(U.Z,{action:g,value:d,placeholder:"Choose one…",onChange:(e,l)=>u(null!=l?l:""),...d&&{endDecorator:(0,r.jsx)(W.ZP,{size:"sm",variant:"plain",color:"neutral",onMouseDown:e=>{e.stopPropagation()},onClick:()=>{var e;u(""),null===(e=g.current)||void 0===e||e.focusVisible()},children:(0,r.jsx)(V.Z,{})}),indicator:null},sx:{width:"100%"},children:null===(l=Object.keys(b))||void 0===l?void 0:l.map(e=>(0,r.jsx)(X.Z,{value:e,children:b[e]},e))})}),(0,r.jsx)(Q.Z,{xs:3,children:(0,r.jsx)(w,{children:(0,r.jsx)(er.Z,{title:(0,r.jsx)(K.Z,{children:(0,r.jsx)("div",{children:i("feed_back_desc")})}),variant:"solid",placement:"left",children:i("Q_A_Rating")})})}),(0,r.jsx)(Q.Z,{xs:10,sx:{pl:0,ml:0},children:(0,r.jsx)(Y.Z,{"aria-label":"Custom",step:1,min:0,max:5,valueLabelFormat:function(e){return({0:i("Lowest"),1:i("Missed"),2:i("Lost"),3:i("Incorrect"),4:i("Verbose"),5:i("Best")})[e]},valueLabelDisplay:"on",marks:[{value:0,label:"0"},{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"}],sx:{width:"90%",pt:3,m:2,ml:1},onChange:e=>{var l;return m(null===(l=e.target)||void 0===l?void 0:l.value)},value:x})}),(0,r.jsx)(Q.Z,{xs:13,children:(0,r.jsx)(ee.Z,{placeholder:i("Please_input_the_text"),value:h,onChange:e=>p(e.target.value),minRows:2,maxRows:4,endDecorator:(0,r.jsx)(el.ZP,{level:"body-xs",sx:{ml:"auto"},children:i("input_count")+h.length+i("input_unit")}),sx:{width:"100%",fontSize:14}})}),(0,r.jsx)(Q.Z,{xs:13,children:(0,r.jsx)(et.Z,{type:"submit",variant:"outlined",sx:{width:"100%",height:"100%"},children:i("submit")})})]})})})]})]})},eo=t(32983),ei=t(12069),ec=t(96486),ed=t.n(ec),eu=t(38954),ex=t(98399),em=e=>{var l;let{messages:t,onSubmit:n}=e,{dbParam:i,currentDialogue:c,scene:d,model:m,refreshDialogList:h,chatId:p,agentList:g}=(0,a.useContext)(k.p),{t:v}=(0,es.$G)(),f=(0,u.useSearchParams)(),b=null!==(l=f&&f.get("spaceNameOriginal"))&&void 0!==l?l:"",[j,y]=(0,a.useState)(!1),[w,_]=(0,a.useState)(!1),[S,P]=(0,a.useState)(t),[R,E]=(0,a.useState)(""),O=(0,a.useRef)(null),D=(0,a.useMemo)(()=>"chat_dashboard"===d,[d]),M=(0,a.useMemo)(()=>{switch(d){case"chat_agent":return g.join(",");case"chat_excel":return null==c?void 0:c.select_param;default:return b||i}},[d,g,c,i,b]),L=async e=>{if(!j&&e.trim())try{y(!0),await n(e,{select_param:null!=M?M:""})}finally{y(!1)}},A=e=>{try{return JSON.parse(e)}catch(l){return e}},[T,H]=o.ZP.useMessage(),V=async e=>{let l=null==e?void 0:e.replace(/\trelations:.*/g,""),t=I()(l);t?l?T.open({type:"success",content:v("Copy_success")}):T.open({type:"warning",content:v("Copy_nothing")}):T.open({type:"error",content:v("Copry_error")})};return(0,s.Z)(async()=>{let e=(0,ex.a_)();e&&e.id===p&&(await L(e.message),h(),localStorage.removeItem(ex.rU))},[p]),(0,a.useEffect)(()=>{let e=t;D&&(e=ed().cloneDeep(t).map(e=>((null==e?void 0:e.role)==="view"&&"string"==typeof(null==e?void 0:e.context)&&(e.context=A(null==e?void 0:e.context)),e))),P(e.filter(e=>["view","human"].includes(e.role)))},[D,t]),(0,a.useEffect)(()=>{setTimeout(()=>{var e;null===(e=O.current)||void 0===e||e.scrollTo(0,O.current.scrollHeight)},50)},[t]),(0,r.jsxs)(r.Fragment,{children:[H,(0,r.jsx)("div",{ref:O,className:"flex flex-1 overflow-y-auto pb-8 w-full flex-col",children:(0,r.jsx)("div",{className:"flex items-center flex-1 flex-col text-sm leading-6 text-slate-900 dark:text-slate-300 sm:text-base sm:leading-7",children:S.length?S.map((e,l)=>{var t;return(0,r.jsx)(F,{content:e,isChartChat:D,onLinkClick:()=>{_(!0),E(JSON.stringify(null==e?void 0:e.context,null,2))},children:"view"===e.role&&(0,r.jsxs)("div",{className:"flex w-full flex-row-reverse pt-2 md:pt-4 border-t border-gray-200 mt-2 md:mt-4",children:[(0,r.jsx)(en,{conv_index:Math.ceil((l+1)/2),question:null===(t=null==S?void 0:S.filter(l=>(null==l?void 0:l.role)==="human"&&(null==l?void 0:l.order)===e.order)[0])||void 0===t?void 0:t.context,knowledge_space:b||i||""}),(0,r.jsx)(er.Z,{title:v("Copy"),children:(0,r.jsx)(et.Z,{onClick:()=>V(null==e?void 0:e.context),slots:{root:W.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,r.jsx)(C.Z,{})})})]})},l)}):(0,r.jsx)(eo.Z,{image:"/empty.png",imageStyle:{width:320,height:320,margin:"0 auto",maxWidth:"100%",maxHeight:"100%"},className:"flex items-center justify-center flex-col h-full w-full",description:"Start a conversation"})})}),(0,r.jsx)("div",{className:Z()("relative after:absolute after:-top-8 after:h-8 after:w-full after:bg-gradient-to-t after:from-white after:to-transparent dark:after:from-[#212121]",{"cursor-not-allowed":"chat_excel"===d&&!(null==c?void 0:c.select_param)}),children:(0,r.jsxs)("div",{className:"flex flex-wrap w-full py-2 sm:pt-6 sm:pb-10",children:[m&&(0,r.jsx)("div",{className:"mr-2 flex items-center h-10",children:(0,N.A)(m)}),(0,r.jsx)(eu.Z,{loading:j,onSubmit:L})]})}),(0,r.jsx)(ei.default,{title:"JSON Editor",open:w,width:"60%",cancelButtonProps:{hidden:!0},onOk:()=>{_(!1)},onCancel:()=>{_(!1)},children:(0,r.jsx)(x.Z,{className:"w-full h-[500px]",language:"json",value:R})})]})},eh=t(70803),ep=t(39156),eg=t(45247),ev=()=>{var e;let l=(0,u.useSearchParams)(),{scene:t,chatId:n,model:o,setModel:i}=(0,a.useContext)(k.p),c=d({}),x=null!==(e=l&&l.get("initMessage"))&&void 0!==e?e:"",[m,h]=(0,a.useState)(!1),[p,g]=(0,a.useState)(),[v,f]=(0,a.useState)([]),b=async()=>{h(!0);let[,e]=await (0,ea.Vx)((0,ea.$i)(n));f(null!=e?e:[]),h(!1)},j=e=>{var l;let t=null===(l=e[e.length-1])||void 0===l?void 0:l.context;if(t)try{let e=JSON.parse(t);g((null==e?void 0:e.template_name)==="report"?null==e?void 0:e.charts:void 0)}catch(e){g(void 0)}};(0,s.Z)(async()=>{let e=(0,ex.a_)();e&&e.id===n||await b()},[x,n]),(0,a.useEffect)(()=>{var e,l;if(!v.length)return;let t=null===(e=null===(l=v.filter(e=>"view"===e.role))||void 0===l?void 0:l.slice(-1))||void 0===e?void 0:e[0];(null==t?void 0:t.model_name)&&i(t.model_name),j(v)},[v.length]);let y=(0,a.useCallback)((e,l)=>new Promise(r=>{let a=[...v,{role:"human",context:e,model_name:o,order:0,time_stamp:0},{role:"view",context:"",model_name:o,order:0,time_stamp:0}],s=a.length-1;f([...a]),c({context:e,data:{...l,chat_mode:t||"chat_normal",model_name:o},chatId:n,onMessage:e=>{a[s].context=e,f([...a])},onDone:()=>{j(a),r()},onClose:()=>{j(a),r()},onError:e=>{a[s].context=e,f([...a]),r()}})}),[v,c,o]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eg.Z,{visible:m}),(0,r.jsx)(eh.Z,{refreshHistory:b,modelChange:e=>{i(e)}}),(0,r.jsxs)("div",{className:"px-4 flex flex-1 flex-wrap overflow-hidden relative",children:[!!(null==p?void 0:p.length)&&(0,r.jsx)("div",{className:"w-full xl:w-3/4 h-3/5 xl:pr-4 xl:h-full overflow-y-auto",children:(0,r.jsx)(ep.Z,{chartsData:p})}),!(null==p?void 0:p.length)&&"chat_dashboard"===t&&(0,r.jsx)(eo.Z,{image:"/empty.png",imageStyle:{width:320,height:320,margin:"0 auto",maxWidth:"100%",maxHeight:"100%"},className:"w-full xl:w-3/4 h-3/5 xl:h-full pt-0 md:pt-10"}),(0,r.jsx)("div",{className:Z()("flex flex-1 flex-col overflow-hidden",{"px-0 xl:pl-4 h-2/5 xl:h-full border-t xl:border-t-0 xl:border-l":"chat_dashboard"===t,"h-full lg:px-8":"chat_dashboard"!==t}),children:(0,r.jsx)(em,{messages:v,onSubmit:y})})]})]})}},38954:function(e,l,t){t.d(l,{Z:function(){return j}});var r=t(85893),a=t(27496),s=t(59566),n=t(71577),o=t(67294),i=t(2487),c=t(83062),d=t(2453),u=t(74627),x=t(39479),m=t(51009),h=t(58299),p=t(577),g=t(30119),v=t(67421);let f=e=>{let{data:l,loading:t,submit:a,close:s}=e,{t:n}=(0,v.$G)(),o=e=>()=>{a(e),s()};return(0,r.jsx)("div",{style:{maxHeight:400,overflow:"auto"},children:(0,r.jsx)(i.Z,{dataSource:null==l?void 0:l.data,loading:t,rowKey:e=>e.prompt_name,renderItem:e=>(0,r.jsx)(i.Z.Item,{onClick:o(e.content),children:(0,r.jsx)(c.Z,{title:e.content,children:(0,r.jsx)(i.Z.Item.Meta,{style:{cursor:"copy"},title:e.prompt_name,description:n("Prompt_Info_Scene")+":".concat(e.chat_scene,",")+n("Prompt_Info_Sub_Scene")+":".concat(e.sub_chat_scene)})})},e.prompt_name)})})};var b=e=>{let{submit:l}=e,{t}=(0,v.$G)(),[a,s]=(0,o.useState)(!1),[n,i]=(0,o.useState)("common"),{data:b,loading:j}=(0,p.Z)(()=>(0,g.PR)("/prompt/list",{prompt_type:n}),{refreshDeps:[n],onError:e=>{d.ZP.error(null==e?void 0:e.message)}});return(0,r.jsx)(u.Z,{title:(0,r.jsx)(x.Z.Item,{label:"Prompt "+t("Type"),children:(0,r.jsx)(m.default,{style:{width:130},value:n,onChange:e=>{i(e)},options:[{label:t("Public")+" Prompts",value:"common"},{label:t("Private")+" Prompts",value:"private"}]})}),content:(0,r.jsx)(f,{data:b,loading:j,submit:l,close:()=>{s(!1)}}),placement:"topRight",trigger:"click",open:a,onOpenChange:e=>{s(e)},children:(0,r.jsx)(c.Z,{title:t("Click_Select")+" Prompt",children:(0,r.jsx)(h.Z,{className:"bottom-32"})})})},j=function(e){let{children:l,loading:t,onSubmit:i,...c}=e,[d,u]=(0,o.useState)("");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.default.TextArea,{className:"flex-1",size:"large",value:d,autoSize:{minRows:1,maxRows:4},...c,onPressEnter:e=>{if(d.trim()&&13===e.keyCode){if(e.shiftKey){u(e=>e+"\n");return}i(d),setTimeout(()=>{u("")},0)}},onChange:e=>{if("number"==typeof c.maxLength){u(e.target.value.substring(0,c.maxLength));return}u(e.target.value)}}),(0,r.jsx)(n.ZP,{className:"ml-2 flex items-center justify-center",size:"large",type:"text",loading:t,icon:(0,r.jsx)(a.Z,{}),onClick:()=>{i(d)}}),(0,r.jsx)(b,{submit:e=>{u(d+e)}}),l]})}},45247:function(e,l,t){var r=t(85893),a=t(50888);l.Z=function(e){let{visible:l}=e;return l?(0,r.jsx)("div",{className:"absolute w-full h-full top-0 left-0 flex justify-center items-center z-10 bg-white dark:bg-black bg-opacity-50 dark:bg-opacity-50 backdrop-blur-sm text-3xl animate-fade animate-duration-200",children:(0,r.jsx)(a.Z,{})}):null}}}]); \ No newline at end of file diff --git a/pilot/server/static/_next/static/chunks/604.3bbbeaa2c767e7dc.js b/pilot/server/static/_next/static/chunks/604.3bbbeaa2c767e7dc.js new file mode 100644 index 000000000..ec5108c66 --- /dev/null +++ b/pilot/server/static/_next/static/chunks/604.3bbbeaa2c767e7dc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[604],{24093:function(e,l,t){t.r(l),t.d(l,{default:function(){return ev}});var r=t(85893),a=t(67294),s=t(2093),n=t(1375),o=t(2453),i=t(58989),c=t(83454),d=e=>{let{queryAgentURL:l="/api/v1/chat/completions"}=e,t=(0,a.useMemo)(()=>new AbortController,[]),r=(0,a.useCallback)(async e=>{let{context:r,data:a,chatId:s,onMessage:d,onClose:u,onDone:x,onError:m}=e;if(!r){o.ZP.warning(i.Z.t("NoContextTip"));return}let h={...a,conv_uid:s,user_input:r};if(!h.conv_uid){o.ZP.error("conv_uid 不存在,请刷新后重试");return}try{var p;await (0,n.L)("".concat(null!==(p=c.env.API_BASE_URL)&&void 0!==p?p:"").concat(l),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h),signal:t.signal,openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===n.a)return},onclose(){t.abort(),null==u||u()},onerror(e){throw Error(e)},onmessage:e=>{var l;let t=null===(l=e.data)||void 0===l?void 0:l.replaceAll("\\n","\n");"[DONE]"===t?null==x||x():(null==t?void 0:t.startsWith("[ERROR]"))?null==m||m(null==t?void 0:t.replace("[ERROR]","")):null==d||d(t)}})}catch(e){t.abort(),null==m||m("Sorry, We meet some error, please try agin later.",e)}},[l]);return(0,a.useEffect)(()=>()=>{t.abort()},[]),r},u=t(39332),x=t(99513),m=t(24019),h=t(50888),p=t(97937),g=t(63606),v=t(50228),f=t(87547),b=t(89035),j=t(33035),y=t(12767),w=t(94184),Z=t.n(w),_=t(66309),N=t(81799),k=t(41468),C=t(57132),S=t(29158),P=t(98165),R=t(79166),E=t(93179),O=t(71577),D=t(38426),M=t(20640),I=t.n(M);let L={code(e){var l;let{inline:t,node:a,className:s,children:n,style:i,...c}=e,d=/language-(\w+)/.exec(s||"");return!t&&d?(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(O.ZP,{className:"absolute right-3 top-2 text-gray-300 hover:!text-gray-200 bg-gray-700",type:"text",icon:(0,r.jsx)(C.Z,{}),onClick:()=>{let e=I()(n);o.ZP[e?"success":"error"](e?"Copy success":"Copy failed")}}),(0,r.jsx)(E.Z,{language:null!==(l=null==d?void 0:d[1])&&void 0!==l?l:"javascript",style:R.Z,children:n})]}):(0,r.jsx)("code",{...c,style:i,className:"px-[6px] py-[2px] rounded bg-gray-700 text-gray-100 dark:bg-gray-100 dark:text-gray-800 text-sm",children:n})},ul(e){let{children:l}=e;return(0,r.jsx)("ul",{className:"py-1",children:l})},ol(e){let{children:l}=e;return(0,r.jsx)("ol",{className:"py-1",children:l})},li(e){let{children:l,ordered:t}=e;return(0,r.jsx)("li",{className:"text-sm leading-7 ml-5 pl-2 text-gray-600 dark:text-gray-300 ".concat(t?"list-decimal":"list-disc"),children:l})},table(e){let{children:l}=e;return(0,r.jsx)("table",{className:"my-2 rounded-tl-md rounded-tr-md max-w-full bg-white dark:bg-gray-900 text-sm rounded-lg overflow-hidden",children:l})},thead(e){let{children:l}=e;return(0,r.jsx)("thead",{className:"bg-[#fafafa] dark:bg-black font-semibold",children:l})},th(e){let{children:l}=e;return(0,r.jsx)("th",{className:"!text-left p-4",children:l})},td(e){let{children:l}=e;return(0,r.jsx)("td",{className:"p-4 border-t border-[#f0f0f0] dark:border-gray-700",children:l})},h1(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-2xl font-bold my-4 border-b border-slate-300 pb-4",children:l})},h2(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-xl font-bold my-3",children:l})},h3(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-lg font-semibold my-2",children:l})},h4(e){let{children:l}=e;return(0,r.jsx)("h3",{className:"text-base font-semibold my-1",children:l})},a(e){let{children:l,href:t}=e;return(0,r.jsxs)("div",{className:"inline-block text-blue-600 dark:text-blue-400",children:[(0,r.jsx)(S.Z,{className:"mr-1"}),(0,r.jsx)("a",{href:t,target:"_blank",children:l})]})},img(e){let{src:l,alt:t}=e;return(0,r.jsx)("div",{children:(0,r.jsx)(D.Z,{className:"min-h-[1rem] max-w-full max-h-full border rounded",src:l,alt:t,placeholder:(0,r.jsx)(_.Z,{icon:(0,r.jsx)(P.Z,{spin:!0}),color:"processing",children:"Image Loading..."}),fallback:"/images/fallback.png"})})},blockquote(e){let{children:l}=e;return(0,r.jsx)("blockquote",{className:"py-4 px-6 border-l-4 border-blue-600 rounded bg-white my-2 text-gray-500 dark:bg-slate-800 dark:text-gray-200 dark:border-white shadow-sm",children:l})},references(e){let l,{children:t}=e;try{l=JSON.parse(t)}catch(e){return console.log(e),(0,r.jsx)("p",{className:"text-sm",children:"Render Reference Error!"})}let a=null==l?void 0:l.references;return!a||(null==a?void 0:a.length)<1?null:(0,r.jsxs)("div",{className:"border-t-[1px] border-gray-300 mt-3 py-2",children:[(0,r.jsxs)("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:[(0,r.jsx)(S.Z,{className:"mr-2"}),(0,r.jsx)("span",{className:"font-semibold",children:l.title})]}),a.map((e,l)=>{var t;return(0,r.jsxs)("p",{className:"text-sm text-blue-400 dark:text-blue-400 font-normal block ml-4",children:[(0,r.jsx)("span",{className:"mr-4",children:e.name}),null==e?void 0:null===(t=e.pages)||void 0===t?void 0:t.map((l,t)=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:l},"file_page_".concat(t)),t<(null==e?void 0:e.pages.length)-1&&(0,r.jsx)("span",{children:","},"file_page__".concat(t))]}))]},"file_".concat(l))})]})}},A={todo:{bgClass:"bg-gray-500",icon:(0,r.jsx)(m.Z,{className:"ml-2"})},runing:{bgClass:"bg-blue-500",icon:(0,r.jsx)(h.Z,{className:"ml-2"})},failed:{bgClass:"bg-red-500",icon:(0,r.jsx)(p.Z,{className:"ml-2"})},completed:{bgClass:"bg-green-500",icon:(0,r.jsx)(g.Z,{className:"ml-2"})}};function F(e){return e.replaceAll("\\n","\n").replace(/]+)>/gi,"
").replace(/]+)>/gi,"")}var T=(0,a.memo)(function(e){let{children:l,content:t,isChartChat:s,onLinkClick:n}=e,{scene:o}=(0,a.useContext)(k.p),{context:i,model_name:c,role:d}=t,u="view"===d,{relations:x,value:m,cachePlguinContext:h}=(0,a.useMemo)(()=>{if("string"!=typeof i)return{relations:[],value:"",cachePlguinContext:[]};let[e,l]=i.split(" relations:"),t=l?l.split(","):[],r=[],a=0,s=e.replace(/]*>[^<]*<\/dbgpt-view>/gi,e=>{try{var l;console.log(e);let t=e.replaceAll("\n","\\n").replace(/<[^>]*>|<\/[^>]*>/gm,""),s=JSON.parse(t),n="".concat(a,"");return r.push({...s,result:F(null!==(l=s.result)&&void 0!==l?l:"")}),a++,n}catch(l){return console.log(l.message,l),e}});return{relations:t,cachePlguinContext:r,value:s}},[i]),p=(0,a.useMemo)(()=>({"custom-view"(e){var l;let{children:t}=e,a=+t.toString();if(!h[a])return t;let{name:s,status:n,err_msg:o,result:i}=h[a],{bgClass:c,icon:d}=null!==(l=A[n])&&void 0!==l?l:{};return(0,r.jsxs)("div",{className:"bg-white dark:bg-[#212121] rounded-lg overflow-hidden my-2 flex flex-col lg:max-w-[80%]",children:[(0,r.jsxs)("div",{className:Z()("flex px-4 md:px-6 py-2 items-center text-white text-sm",c),children:[s,d]}),i?(0,r.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:(0,r.jsx)(j.D,{components:L,rehypePlugins:[y.Z],children:null!=i?i:""})}):(0,r.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:o})]})}}),[i,h]);return(0,r.jsxs)("div",{className:Z()("relative flex flex-wrap w-full px-2 sm:px-4 py-2 sm:py-4 rounded-xl break-words",{"bg-slate-100 dark:bg-[#353539]":u,"lg:w-full xl:w-full pl-0":["chat_with_db_execute","chat_dashboard"].includes(o)}),children:[(0,r.jsx)("div",{className:"mr-2 flex flex-shrink-0 items-center justify-center h-7 w-7 rounded-full text-lg sm:mr-4",children:u?(0,N.A)(c)||(0,r.jsx)(v.Z,{}):(0,r.jsx)(f.Z,{})}),(0,r.jsxs)("div",{className:"flex-1 overflow-hidden items-center text-md leading-8",children:[!u&&"string"==typeof i&&i,u&&s&&"object"==typeof i&&(0,r.jsxs)("div",{children:["[".concat(i.template_name,"]: "),(0,r.jsxs)("span",{className:"text-[#1677ff] cursor-pointer",onClick:n,children:[(0,r.jsx)(b.Z,{className:"mr-1"}),i.template_introduce||"More Details"]})]}),u&&"string"==typeof i&&(0,r.jsx)(j.D,{components:{...L,...p},rehypePlugins:[y.Z],children:F(m)}),!!(null==x?void 0:x.length)&&(0,r.jsx)("div",{className:"flex flex-wrap mt-2",children:null==x?void 0:x.map((e,l)=>(0,r.jsx)(_.Z,{color:"#108ee9",children:e},e+l))})]}),l]})}),H=t(59301),J=t(41132),V=t(74312),$=t(3414),q=t(72868),z=t(59562),W=t(14553),G=t(25359),B=t(7203),K=t(48665),Q=t(26047),U=t(99056),X=t(57814),Y=t(63955),ee=t(33028),el=t(40911),et=t(66478),er=t(83062),ea=t(50489),es=t(67421),en=e=>{var l;let{conv_index:t,question:s,knowledge_space:n}=e,{t:i}=(0,es.$G)(),{chatId:c}=(0,a.useContext)(k.p),[d,u]=(0,a.useState)(""),[x,m]=(0,a.useState)(4),[h,p]=(0,a.useState)(""),g=(0,a.useRef)(null),[v,f]=o.ZP.useMessage(),[b,j]=(0,a.useState)({});(0,a.useEffect)(()=>{(0,ea.Vx)((0,ea.Lu)()).then(e=>{var l;console.log(e),j(null!==(l=e[1])&&void 0!==l?l:{})}).catch(e=>{console.log(e)})},[]);let y=(0,a.useCallback)((e,l)=>{l?(0,ea.Vx)((0,ea.Eb)(c,t)).then(e=>{var l,t,r,a;let s=null!==(l=e[1])&&void 0!==l?l:{};u(null!==(t=s.ques_type)&&void 0!==t?t:""),m(parseInt(null!==(r=s.score)&&void 0!==r?r:"4")),p(null!==(a=s.messages)&&void 0!==a?a:"")}).catch(e=>{console.log(e)}):(u(""),m(4),p(""))},[c,t]),w=(0,V.Z)($.Z)(e=>{let{theme:l}=e;return{backgroundColor:"dark"===l.palette.mode?"#FBFCFD":"#0E0E10",...l.typography["body-sm"],padding:l.spacing(1),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,width:"100%",height:"100%"}});return(0,r.jsxs)(q.L,{onOpenChange:y,children:[f,(0,r.jsx)(er.Z,{title:i("Rating"),children:(0,r.jsx)(z.Z,{slots:{root:W.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,r.jsx)(H.Z,{})})}),(0,r.jsxs)(G.Z,{children:[(0,r.jsx)(B.Z,{disabled:!0,sx:{minHeight:0}}),(0,r.jsx)(K.Z,{sx:{width:"100%",maxWidth:350,display:"grid",gap:3,padding:1},children:(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault();let l={conv_uid:c,conv_index:t,question:s,knowledge_space:n,score:x,ques_type:d,messages:h};console.log(l),(0,ea.Vx)((0,ea.VC)({data:l})).then(e=>{v.open({type:"success",content:"save success"})}).catch(e=>{v.open({type:"error",content:"save error"})})},children:(0,r.jsxs)(Q.Z,{container:!0,spacing:.5,columns:13,sx:{flexGrow:1},children:[(0,r.jsx)(Q.Z,{xs:3,children:(0,r.jsx)(w,{children:i("Q_A_Category")})}),(0,r.jsx)(Q.Z,{xs:10,children:(0,r.jsx)(U.Z,{action:g,value:d,placeholder:"Choose one…",onChange:(e,l)=>u(null!=l?l:""),...d&&{endDecorator:(0,r.jsx)(W.ZP,{size:"sm",variant:"plain",color:"neutral",onMouseDown:e=>{e.stopPropagation()},onClick:()=>{var e;u(""),null===(e=g.current)||void 0===e||e.focusVisible()},children:(0,r.jsx)(J.Z,{})}),indicator:null},sx:{width:"100%"},children:null===(l=Object.keys(b))||void 0===l?void 0:l.map(e=>(0,r.jsx)(X.Z,{value:e,children:b[e]},e))})}),(0,r.jsx)(Q.Z,{xs:3,children:(0,r.jsx)(w,{children:(0,r.jsx)(er.Z,{title:(0,r.jsx)(K.Z,{children:(0,r.jsx)("div",{children:i("feed_back_desc")})}),variant:"solid",placement:"left",children:i("Q_A_Rating")})})}),(0,r.jsx)(Q.Z,{xs:10,sx:{pl:0,ml:0},children:(0,r.jsx)(Y.Z,{"aria-label":"Custom",step:1,min:0,max:5,valueLabelFormat:function(e){return({0:i("Lowest"),1:i("Missed"),2:i("Lost"),3:i("Incorrect"),4:i("Verbose"),5:i("Best")})[e]},valueLabelDisplay:"on",marks:[{value:0,label:"0"},{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"}],sx:{width:"90%",pt:3,m:2,ml:1},onChange:e=>{var l;return m(null===(l=e.target)||void 0===l?void 0:l.value)},value:x})}),(0,r.jsx)(Q.Z,{xs:13,children:(0,r.jsx)(ee.Z,{placeholder:i("Please_input_the_text"),value:h,onChange:e=>p(e.target.value),minRows:2,maxRows:4,endDecorator:(0,r.jsx)(el.ZP,{level:"body-xs",sx:{ml:"auto"},children:i("input_count")+h.length+i("input_unit")}),sx:{width:"100%",fontSize:14}})}),(0,r.jsx)(Q.Z,{xs:13,children:(0,r.jsx)(et.Z,{type:"submit",variant:"outlined",sx:{width:"100%",height:"100%"},children:i("submit")})})]})})})]})]})},eo=t(32983),ei=t(12069),ec=t(96486),ed=t.n(ec),eu=t(38954),ex=t(98399),em=e=>{var l;let{messages:t,onSubmit:n}=e,{dbParam:i,currentDialogue:c,scene:d,model:m,refreshDialogList:h,chatId:p,agentList:g}=(0,a.useContext)(k.p),{t:v}=(0,es.$G)(),f=(0,u.useSearchParams)(),b=null!==(l=f&&f.get("spaceNameOriginal"))&&void 0!==l?l:"",[j,y]=(0,a.useState)(!1),[w,_]=(0,a.useState)(!1),[S,P]=(0,a.useState)(t),[R,E]=(0,a.useState)(""),O=(0,a.useRef)(null),D=(0,a.useMemo)(()=>"chat_dashboard"===d,[d]),M=(0,a.useMemo)(()=>{switch(d){case"chat_agent":return g.join(",");case"chat_excel":return null==c?void 0:c.select_param;default:return b||i}},[d,g,c,i,b]),L=async e=>{if(!j&&e.trim())try{y(!0),await n(e,{select_param:null!=M?M:""})}finally{y(!1)}},A=e=>{try{return JSON.parse(e)}catch(l){return e}},[F,H]=o.ZP.useMessage(),J=async e=>{let l=null==e?void 0:e.replace(/\trelations:.*/g,""),t=I()(l);t?l?F.open({type:"success",content:v("Copy_success")}):F.open({type:"warning",content:v("Copy_nothing")}):F.open({type:"error",content:v("Copry_error")})};return(0,s.Z)(async()=>{let e=(0,ex.a_)();e&&e.id===p&&(await L(e.message),h(),localStorage.removeItem(ex.rU))},[p]),(0,a.useEffect)(()=>{let e=t;D&&(e=ed().cloneDeep(t).map(e=>((null==e?void 0:e.role)==="view"&&"string"==typeof(null==e?void 0:e.context)&&(e.context=A(null==e?void 0:e.context)),e))),P(e.filter(e=>["view","human"].includes(e.role)))},[D,t]),(0,a.useEffect)(()=>{setTimeout(()=>{var e;null===(e=O.current)||void 0===e||e.scrollTo(0,O.current.scrollHeight)},50)},[t]),(0,r.jsxs)(r.Fragment,{children:[H,(0,r.jsx)("div",{ref:O,className:"flex flex-1 overflow-y-auto pb-8 w-full flex-col",children:(0,r.jsx)("div",{className:"flex items-center flex-1 flex-col text-sm leading-6 text-slate-900 dark:text-slate-300 sm:text-base sm:leading-7",children:S.length?S.map((e,l)=>{var t;return(0,r.jsx)(T,{content:e,isChartChat:D,onLinkClick:()=>{_(!0),E(JSON.stringify(null==e?void 0:e.context,null,2))},children:"view"===e.role&&(0,r.jsxs)("div",{className:"flex w-full flex-row-reverse pt-2 border-t border-gray-200",children:[(0,r.jsx)(en,{conv_index:Math.ceil((l+1)/2),question:null===(t=null==S?void 0:S.filter(l=>(null==l?void 0:l.role)==="human"&&(null==l?void 0:l.order)===e.order)[0])||void 0===t?void 0:t.context,knowledge_space:b||i||""}),(0,r.jsx)(er.Z,{title:v("Copy"),children:(0,r.jsx)(et.Z,{onClick:()=>J(null==e?void 0:e.context),slots:{root:W.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,r.jsx)(C.Z,{})})})]})},l)}):(0,r.jsx)(eo.Z,{image:"/empty.png",imageStyle:{width:320,height:320,margin:"0 auto",maxWidth:"100%",maxHeight:"100%"},className:"flex items-center justify-center flex-col h-full w-full",description:"Start a conversation"})})}),(0,r.jsx)("div",{className:Z()("relative after:absolute after:-top-8 after:h-8 after:w-full after:bg-gradient-to-t after:from-white after:to-transparent dark:after:from-[#212121]",{"cursor-not-allowed":"chat_excel"===d&&!(null==c?void 0:c.select_param)}),children:(0,r.jsxs)("div",{className:"flex flex-wrap w-full py-2 sm:pt-6 sm:pb-10",children:[m&&(0,r.jsx)("div",{className:"mr-2 flex items-center h-10",children:(0,N.A)(m)}),(0,r.jsx)(eu.Z,{loading:j,onSubmit:L})]})}),(0,r.jsx)(ei.default,{title:"JSON Editor",open:w,width:"60%",cancelButtonProps:{hidden:!0},onOk:()=>{_(!1)},onCancel:()=>{_(!1)},children:(0,r.jsx)(x.Z,{className:"w-full h-[500px]",language:"json",value:R})})]})},eh=t(70803),ep=t(39156),eg=t(45247),ev=()=>{var e;let l=(0,u.useSearchParams)(),{scene:t,chatId:n,model:o,setModel:i}=(0,a.useContext)(k.p),c=d({}),x=null!==(e=l&&l.get("initMessage"))&&void 0!==e?e:"",[m,h]=(0,a.useState)(!1),[p,g]=(0,a.useState)(),[v,f]=(0,a.useState)([]),b=async()=>{h(!0);let[,e]=await (0,ea.Vx)((0,ea.$i)(n));f(null!=e?e:[]),h(!1)},j=e=>{var l;let t=null===(l=e[e.length-1])||void 0===l?void 0:l.context;if(t)try{let e=JSON.parse(t);g((null==e?void 0:e.template_name)==="report"?null==e?void 0:e.charts:void 0)}catch(e){g(void 0)}};(0,s.Z)(async()=>{let e=(0,ex.a_)();e&&e.id===n||await b()},[x,n]),(0,a.useEffect)(()=>{var e,l;if(!v.length)return;let t=null===(e=null===(l=v.filter(e=>"view"===e.role))||void 0===l?void 0:l.slice(-1))||void 0===e?void 0:e[0];(null==t?void 0:t.model_name)&&i(t.model_name),j(v)},[v.length]);let y=(0,a.useCallback)((e,l)=>new Promise(r=>{let a=[...v,{role:"human",context:e,model_name:o,order:0,time_stamp:0},{role:"view",context:"",model_name:o,order:0,time_stamp:0}],s=a.length-1;f([...a]),c({context:e,data:{...l,chat_mode:t||"chat_normal",model_name:o},chatId:n,onMessage:e=>{a[s].context=e,f([...a])},onDone:()=>{j(a),r()},onClose:()=>{j(a),r()},onError:e=>{a[s].context=e,f([...a]),r()}})}),[v,c,o]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(eg.Z,{visible:m}),(0,r.jsx)(eh.Z,{refreshHistory:b,modelChange:e=>{i(e)}}),(0,r.jsxs)("div",{className:"px-4 flex flex-1 flex-wrap overflow-hidden relative",children:[!!(null==p?void 0:p.length)&&(0,r.jsx)("div",{className:"w-full xl:w-3/4 h-3/5 xl:pr-4 xl:h-full overflow-y-auto",children:(0,r.jsx)(ep.Z,{chartsData:p})}),!(null==p?void 0:p.length)&&"chat_dashboard"===t&&(0,r.jsx)(eo.Z,{image:"/empty.png",imageStyle:{width:320,height:320,margin:"0 auto",maxWidth:"100%",maxHeight:"100%"},className:"w-full xl:w-3/4 h-3/5 xl:h-full pt-0 md:pt-10"}),(0,r.jsx)("div",{className:Z()("flex flex-1 flex-col overflow-hidden",{"px-0 xl:pl-4 h-2/5 xl:h-full border-t xl:border-t-0 xl:border-l":"chat_dashboard"===t,"h-full lg:px-8":"chat_dashboard"!==t}),children:(0,r.jsx)(em,{messages:v,onSubmit:y})})]})]})}},38954:function(e,l,t){t.d(l,{Z:function(){return j}});var r=t(85893),a=t(27496),s=t(59566),n=t(71577),o=t(67294),i=t(2487),c=t(83062),d=t(2453),u=t(74627),x=t(39479),m=t(51009),h=t(58299),p=t(577),g=t(30119),v=t(67421);let f=e=>{let{data:l,loading:t,submit:a,close:s}=e,{t:n}=(0,v.$G)(),o=e=>()=>{a(e),s()};return(0,r.jsx)("div",{style:{maxHeight:400,overflow:"auto"},children:(0,r.jsx)(i.Z,{dataSource:null==l?void 0:l.data,loading:t,rowKey:e=>e.prompt_name,renderItem:e=>(0,r.jsx)(i.Z.Item,{onClick:o(e.content),children:(0,r.jsx)(c.Z,{title:e.content,children:(0,r.jsx)(i.Z.Item.Meta,{style:{cursor:"copy"},title:e.prompt_name,description:n("Prompt_Info_Scene")+":".concat(e.chat_scene,",")+n("Prompt_Info_Sub_Scene")+":".concat(e.sub_chat_scene)})})},e.prompt_name)})})};var b=e=>{let{submit:l}=e,{t}=(0,v.$G)(),[a,s]=(0,o.useState)(!1),[n,i]=(0,o.useState)("common"),{data:b,loading:j}=(0,p.Z)(()=>(0,g.PR)("/prompt/list",{prompt_type:n}),{refreshDeps:[n],onError:e=>{d.ZP.error(null==e?void 0:e.message)}});return(0,r.jsx)(u.Z,{title:(0,r.jsx)(x.Z.Item,{label:"Prompt "+t("Type"),children:(0,r.jsx)(m.default,{style:{width:130},value:n,onChange:e=>{i(e)},options:[{label:t("Public")+" Prompts",value:"common"},{label:t("Private")+" Prompts",value:"private"}]})}),content:(0,r.jsx)(f,{data:b,loading:j,submit:l,close:()=>{s(!1)}}),placement:"topRight",trigger:"click",open:a,onOpenChange:e=>{s(e)},children:(0,r.jsx)(c.Z,{title:t("Click_Select")+" Prompt",children:(0,r.jsx)(h.Z,{className:"bottom-32"})})})},j=function(e){let{children:l,loading:t,onSubmit:i,...c}=e,[d,u]=(0,o.useState)("");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.default.TextArea,{className:"flex-1",size:"large",value:d,autoSize:{minRows:1,maxRows:4},...c,onPressEnter:e=>{if(d.trim()&&13===e.keyCode){if(e.shiftKey){u(e=>e+"\n");return}i(d),setTimeout(()=>{u("")},0)}},onChange:e=>{if("number"==typeof c.maxLength){u(e.target.value.substring(0,c.maxLength));return}u(e.target.value)}}),(0,r.jsx)(n.ZP,{className:"ml-2 flex items-center justify-center",size:"large",type:"text",loading:t,icon:(0,r.jsx)(a.Z,{}),onClick:()=>{i(d)}}),(0,r.jsx)(b,{submit:e=>{u(d+e)}}),l]})}},45247:function(e,l,t){var r=t(85893),a=t(50888);l.Z=function(e){let{visible:l}=e;return l?(0,r.jsx)("div",{className:"absolute w-full h-full top-0 left-0 flex justify-center items-center z-10 bg-white dark:bg-black bg-opacity-50 dark:bg-opacity-50 backdrop-blur-sm text-3xl animate-fade animate-duration-200",children:(0,r.jsx)(a.Z,{})}):null}}}]); \ No newline at end of file diff --git a/pilot/server/static/_next/static/chunks/pages/_app-7394a5c2fd417054.js b/pilot/server/static/_next/static/chunks/pages/_app-41ccdddf1de778e7.js similarity index 92% rename from pilot/server/static/_next/static/chunks/pages/_app-7394a5c2fd417054.js rename to pilot/server/static/_next/static/chunks/pages/_app-41ccdddf1de778e7.js index d35332230..84ed3fda6 100644 --- a/pilot/server/static/_next/static/chunks/pages/_app-7394a5c2fd417054.js +++ b/pilot/server/static/_next/static/chunks/pages/_app-41ccdddf1de778e7.js @@ -134,7 +134,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case f:case i:case l:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case d:case g:case m:case s:return e;default:return t}}case o:return t}}}function C(e){return w(e)===f}t.AsyncMode=u,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=d,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return C(e)||w(e)===u},t.isConcurrentMode=C,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===l||e===a||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===v)},t.typeOf=w},21296:function(e,t,n){"use strict";e.exports=n(96103)},62705:function(e,t,n){var r=n(55639).Symbol;e.exports=r},44239:function(e,t,n){var r=n(62705),o=n(89607),i=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},27561:function(e,t,n){var r=n(67990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},31957:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},89607:function(e,t,n){var r=n(62705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},55639:function(e,t,n){var r=n(31957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},67990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:function(e,t,n){var r=n(13218),o=n(7771),i=n(14841),a=Math.max,l=Math.min;e.exports=function(e,t,n){var s,c,u,f,d,p,h=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var n=s,r=c;return s=c=void 0,h=t,f=e.apply(r,n)}function b(e){var n=e-p,r=e-h;return void 0===p||n>=t||n<0||g&&r>=u}function x(){var e,n,r,i=o();if(b(i))return w(i);d=setTimeout(x,(e=i-p,n=i-h,r=t-e,g?l(r,u-n):r))}function w(e){return(d=void 0,v&&s)?y(e):(s=c=void 0,f)}function C(){var e,n=o(),r=b(n);if(s=arguments,c=this,p=n,r){if(void 0===d)return h=e=p,d=setTimeout(x,t),m?y(e):f;if(g)return clearTimeout(d),d=setTimeout(x,t),y(p)}return void 0===d&&(d=setTimeout(x,t)),f}return t=i(t)||0,r(n)&&(m=!!n.leading,u=(g="maxWait"in n)?a(i(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),C.cancel=function(){void 0!==d&&clearTimeout(d),h=0,s=p=c=d=void 0},C.flush=function(){return void 0===d?f:w(o())},C}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},33448:function(e,t,n){var r=n(44239),o=n(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},23493:function(e,t,n){var r=n(23279),o=n(13218);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},14841:function(e,t,n){var r=n(27561),o=n(13218),i=n(33448),a=0/0,l=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):l.test(e)?a:+e}},83454:function(e,t,n){"use strict";var r,o;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(o=n.g.process)?void 0:o.env)?n.g.process:n(77663)},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(37262)}])},41468:function(e,t,n){"use strict";n.d(t,{R:function(){return c},p:function(){return s}});var r=n(85893),o=n(67294),i=n(50489),a=n(577),l=n(39332);let s=(0,o.createContext)({scene:"",chatId:"",modelList:[],model:"",dbParam:void 0,dialogueList:[],agentList:[],setAgentList:()=>{},setModel:()=>{},setIsContract:()=>{},setIsMenuExpand:()=>{},setDbParam:()=>void 0,queryDialogueList:()=>{},refreshDialogList:()=>{}}),c=e=>{var t,n,c;let{children:u}=e,f=(0,l.useSearchParams)(),d=null!==(t=null==f?void 0:f.get("id"))&&void 0!==t?t:"",p=null!==(n=null==f?void 0:f.get("scene"))&&void 0!==n?n:"",h=null!==(c=null==f?void 0:f.get("db_param"))&&void 0!==c?c:"",[m,g]=(0,o.useState)(!1),[v,y]=(0,o.useState)(""),[b,x]=(0,o.useState)("chat_dashboard"!==p),[w,C]=(0,o.useState)(h),[E,S]=(0,o.useState)([]),{run:$,data:O=[],refresh:k}=(0,a.Z)(async()=>{let[,e]=await (0,i.Vx)((0,i.iP)());return null!=e?e:[]},{manual:!0}),{data:Z=[]}=(0,a.Z)(async()=>{let[,e]=await (0,i.Vx)((0,i.Vw)());return null!=e?e:[]});(0,o.useEffect)(()=>{y(Z[0])},[Z,null==Z?void 0:Z.length]);let P=(0,o.useMemo)(()=>O.find(e=>e.conv_uid===d),[d,O]);return(0,r.jsx)(s.Provider,{value:{isContract:m,isMenuExpand:b,scene:p,chatId:d,modelList:Z,model:v,dbParam:w||h,dialogueList:O,agentList:E,setAgentList:S,setModel:y,setIsContract:g,setIsMenuExpand:x,setDbParam:C,queryDialogueList:$,refreshDialogList:k,currentDialogue:P},children:u})}},58989:function(e,t,n){"use strict";n.d(t,{Z:function(){return D}});let r={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class o{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||r,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=Array(e),n=0;n{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(e=>e!==t)}}emit(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{e(...n)})}if(this.observers["*"]){let t=[].concat(this.observers["*"]);t.forEach(t=>{t.apply(t,[e,...n])})}}}function l(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function s(e){return null==e?"":""+e}function c(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}let i="string"!=typeof t?[].concat(t):t.split(".");for(;i.length>1;){if(o())return{};let t=r(i.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function u(e,t,n){let{obj:r,k:o}=c(e,t,Object);r[o]=n}function f(e,t){let{obj:n,k:r}=c(e,t);if(n)return n[r]}function d(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function h(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,e=>p[e]):e}let m=[" ",",","?","!",";"];function g(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];let r=t.split(n),o=e;for(let e=0;ee+i;)i++,l=o[a=r.slice(e,e+i).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}let s=r.slice(e+i).join(n);if(s)return g(l,s,n);return}o=o[r[e]]}return o}function v(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class y extends a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));let l=f(this.data,a);return l||!i||"string"!=typeof n?l:g(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),u(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(let r in n)("string"==typeof n[r]||"[object Array]"===Object.prototype.toString.apply(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let l=f(this.data,a)||{};r?function e(t,n,r){for(let o in n)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof n[o]||n[o]instanceof String?r&&(t[o]=n[o]):e(t[o],n[o],r):t[o]=n[o]);return t}(l,n,o):l={...l,...n},u(this.data,a,l),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e),n=t&&Object.keys(t)||[];return!!n.find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var b={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))}),t}};let x={};class w extends a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,n){e.forEach(e=>{t[e]&&(n[e]=t[e])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=i.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;let n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,n){t=t||"",n=n||"";let r=m.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===r.length)return!0;let o=RegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`),i=!o.test(e);if(!i){let t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i}(e,n,r);if(i&&!a){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};let i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);let r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],s=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(s&&"cimode"===s.toLowerCase()){if(c){let e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l}:`${l}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l}:i}let u=this.resolve(e,t),f=u&&u.res,d=u&&u.usedKey||i,p=u&&u.exactUsedKey||i,h=Object.prototype.toString.apply(f),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,v="string"!=typeof f&&"boolean"!=typeof f&&"number"!=typeof f;if(g&&f&&v&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(h)&&!("string"==typeof m&&"[object Array]"===h)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,f,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u):e}if(o){let e="[object Array]"===h,n=e?[]:{},r=e?p:d;for(let e in f)if(Object.prototype.hasOwnProperty.call(f,e)){let i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=f[e])}f=n}}else if(g&&"string"==typeof m&&"[object Array]"===h)(f=f.join(m))&&(f=this.extendTranslation(f,e,t,n));else{let r=!1,a=!1,c=void 0!==t.count&&"string"!=typeof t.count,d=w.hasDefaultValue(t),p=c?this.pluralResolver.getSuffix(s,t.count,t):"",h=t.ordinal&&c?this.pluralResolver.getSuffix(s,t.count,{ordinal:!1}):"",m=t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(f)&&d&&(r=!0,f=m),this.isValidLookup(f)||(a=!0,f=i);let g=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,v=g&&a?void 0:f,y=d&&m!==f&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",s,l,i,y?m:f),o){let e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t{let o=d&&r!==f?r:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,l,n,o,y,t),this.emit("missingKey",e,l,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach(e=>{this.pluralResolver.getSuffixes(e,t).forEach(n=>{r([e],i+n,t[`defaultValue${n}`]||m)})}):r(e,i,m))}f=this.extendTranslation(f,e,t,u,n),a&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,r?f:void 0):this.options.parseMissingKeyHandler(f))}return r?(u.res=f,u):f}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){let a;n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let l="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(l){let t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language,n),l){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;a1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;let l=this.extractFromKey(e,a),s=l.key;n=s;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));let u=void 0!==a.count&&"string"!=typeof a.count,f=u&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);c.forEach(e=>{this.isValidLookup(t)||(i=e,!x[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(x[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(n=>{let i;if(this.isValidLookup(t))return;o=n;let l=[s];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(l,s,n,e,a);else{let e;u&&(e=this.pluralResolver.getSuffix(n,a.count,a));let t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(l.push(s+e),a.ordinal&&0===e.indexOf(r)&&l.push(s+e.replace(r,this.options.pluralSeparator)),f&&l.push(s+t)),d){let n=`${s}${this.options.contextSeparator}${a.context}`;l.push(n),u&&(l.push(n+e),a.ordinal&&0===e.indexOf(r)&&l.push(n+e.replace(r,this.options.pluralSeparator)),f&&l.push(n+t))}}for(;i=l.pop();)this.isValidLookup(t)||(r=i,t=this.getResource(n,e,i,a))}))})}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}function C(e){return e.charAt(0).toUpperCase()+e.slice(1)}class E{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=i.create("languageUtils")}getScriptPartFromCode(e){if(!(e=v(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=v(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){let t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=C(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=C(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=C(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(0>e.indexOf("-")&&0>n.indexOf("-"))&&0===e.indexOf(n))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach(e=>{0>r.indexOf(e)&&o(this.formatLanguageCode(e))}),r}}let S=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],$={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},O=["v1","v2","v3"],k=["v4"],Z={zero:0,one:1,two:2,few:3,many:4,other:5};class P{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=i.create("pluralResolver"),(!this.options.compatibilityJSON||k.includes(this.options.compatibilityJSON))&&("undefined"==typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){let e={};return S.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:$[t.fc]}})}),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(v(e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>Z[e]-Z[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){let n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));let o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!O.includes(this.options.compatibilityJSON)}}function j(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],i=function(e,t,n){let r=f(e,n);return void 0!==r?r:f(t,n)}(e,t,n);return!i&&o&&"string"==typeof n&&void 0===(i=g(e,n,r))&&(i=g(t,n,r)),i}class _{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=i.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});let t=e.interpolation;this.escape=void 0!==t.escape?t.escape:h,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?d(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?d(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?d(t.nestingPrefix):t.nestingPrefixEscaped||d("$t("),this.nestingSuffix=t.nestingSuffix?d(t.nestingSuffix):t.nestingSuffixEscaped||d(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=RegExp(e,"g");let t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=RegExp(t,"g");let n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=RegExp(n,"g")}interpolate(e,t,n,r){let o,i,a;let l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}let u=e=>{if(0>e.indexOf(this.formatSeparator)){let o=j(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}let o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(j(t,l,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();let f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,p=[{regex:this.regexpUnescape,safeValue:e=>c(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?c(this.escape(e)):c(e)}];return p.forEach(t=>{for(a=0;o=t.regex.exec(e);){let n=o[1].trim();if(void 0===(i=u(n))){if("function"==typeof f){let t=f(e,o,r);i="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else if(d){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=s(i));let l=t.safeValue(i);if(e=e.replace(o[0],l),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=this.maxReplaces)break}}),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){let n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;let r=e.split(RegExp(`${n}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);let a=i.match(/'/g),l=i.match(/"/g);(a&&a.length%2==0&&!l||l.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let l=[];(o=(o={...i}).replace&&"string"!=typeof o.replace?o.replace:o).applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){let e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),l=e,c=!0}if((r=t(a.call(this,n[1].trim(),o),o))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=s(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),c&&(r=l.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function R(e){let t={};return function(n,r,o){let i=r+JSON.stringify(o),a=t[i];return a||(a=e(v(r),o),t[i]=a),a(n)}}class A{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=i.create("formatter"),this.options=e,this.formats={number:R((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:R((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:R((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:R((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:R((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=R(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.split(this.formatSeparator),i=o.reduce((e,t)=>{let{formatName:o,formatOptions:i}=function(e){let t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){let r=e.split("(");t=r[0].toLowerCase().trim();let o=r[1].substring(0,r[1].length-1);if("currency"===t&&0>o.indexOf(":"))n.currency||(n.currency=o.trim());else if("relativetime"===t&&0>o.indexOf(":"))n.range||(n.range=o.trim());else{let e=o.split(";");e.forEach(e=>{if(!e)return;let[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,"");n[t.trim()]||(n[t.trim()]=o),"false"===o&&(n[t.trim()]=!1),"true"===o&&(n[t.trim()]=!0),isNaN(o)||(n[t.trim()]=parseInt(o,10))})}}return{formatName:t,formatOptions:n}}(t);if(this.formats[o]){let t=e;try{let a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,l,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class N extends a{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=i.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){let o={},i={},a={},l={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){let r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;let a={};this.queue.forEach(n=>{(function(e,t,n,r){let{obj:o,k:i}=c(e,t,Object);o[i]=o[i]||[],r&&(o[i]=o[i].concat(n)),r||o[i].push(n)})(n.loaded,[o],i),void 0!==n.pending[e]&&(delete n.pending[e],n.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});return}this.readingCalls++;let a=(a,l)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(a&&l&&r{this.read.call(this,e,t,n,r+1,2*o,i)},o);return}i(a,l)},l=this.backend[n].bind(this.backend);if(2===l.length){try{let n=l(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}return}return l(e,t,a)}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);let o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(null!=n&&""!==n){if(this.backend&&this.backend.create){let l={...i,isUpdate:o},s=this.backend.create.bind(this.backend);if(s.length<6)try{let o;(o=5===s.length?s(e,t,n,r,l):s(e,t,n,r))&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else s(e,t,n,r,a,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function T(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function M(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function I(){}class F extends a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=M(e),this.services={},this.logger=i,this.modules={external:[]},!function(e){let t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})}(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));let r=T();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...M(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?i.init(o(this.modules.logger),this.options):i.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=A);let n=new E(this.options);this.store=new y(this.options.resources,this.options);let a=this.services;a.logger=i,a.resourceStore=this.store,a.languageUtils=n,a.pluralResolver=new P(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),t&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(a.formatter=o(t),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new _(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new N(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=I),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});let a=l(),s=()=>{let e=(e,t)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),a}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I,n=t,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();let e=[],t=t=>{if(!t||"cimode"===t)return;let n=this.services.languageUtils.toResolveHierarchy(t);n.forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};if(r)t(r);else{let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.forEach(e=>t(e))}this.options.preload&&this.options.preload.forEach(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=l();return e||(e=this.languages),t||(t=this.options.ns),n||(n=I),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&b.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;let r=l();this.emit("languageChanging",e);let o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);let n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;let o=function(e,t){let i,a;if("object"!=typeof t){for(var l=arguments.length,s=Array(l>2?l-2:0),c=2;c`${i.keyPrefix}${u}${e}`):i.keyPrefix?`${i.keyPrefix}${u}${e}`:e,r.t(a,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;let i=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return -1===n||2===n};if(t.precheck){let e=t.precheck(this,i);if(void 0!==e)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!r||i(o,e)))}loadNamespaces(e,t){let n=l();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=l();"string"==typeof e&&(e=[e]);let r=this.options.preload||[],o=e.filter(e=>0>r.indexOf(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";let t=this.services&&this.services.languageUtils||new E(T());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new F(e,t)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I,n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},o=new F(r);return(void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new y(this.store.data,r),o.services.resourceStore=o.store),o.translator=new w(o.services,r),o.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{let{componentCls:t,width:n,notificationMarginEdge:r}=e,o=new y.E4("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),i=new y.E4("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),a=new y.E4("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:n},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${t}-top, &${t}-bottom`]:{marginInline:0},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:o}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:i}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:r,[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}}}};let E=e=>{let{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:o,notificationMarginBottom:i,borderRadiusLG:a,colorSuccess:l,colorInfo:s,colorWarning:c,colorError:u,colorTextHeading:f,notificationBg:d,notificationPadding:p,notificationMarginEdge:h,motionDurationMid:m,motionEaseInOut:g,fontSize:v,lineHeight:x,width:w,notificationIconSize:E,colorText:S}=e,$=`${n}-notice`,O=new y.E4("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:w},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),k=new y.E4("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:i,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}}),Z={position:"relative",width:w,maxWidth:`calc(100vw - ${2*h}px)`,marginBottom:i,marginInlineStart:"auto",padding:p,overflow:"hidden",lineHeight:x,wordWrap:"break-word",background:d,borderRadius:a,boxShadow:r,[`${n}-close-icon`]:{fontSize:v,cursor:"pointer"},[`${$}-message`]:{marginBottom:e.marginXS,color:f,fontSize:o,lineHeight:e.lineHeightLG},[`${$}-description`]:{fontSize:v,color:S},[`&${$}-closable ${$}-message`]:{paddingInlineEnd:e.paddingLG},[`${$}-with-icon ${$}-message`]:{marginBottom:e.marginXS,marginInlineStart:e.marginSM+E,fontSize:o},[`${$}-with-icon ${$}-description`]:{marginInlineStart:e.marginSM+E,fontSize:v},[`${$}-icon`]:{position:"absolute",fontSize:E,lineHeight:0,[`&-success${t}`]:{color:l},[`&-info${t}`]:{color:s},[`&-warning${t}`]:{color:c},[`&-error${t}`]:{color:u}},[`${$}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${$}-btn`]:{float:"right",marginTop:e.marginSM}};return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,b.Wf)(e)),{position:"fixed",zIndex:e.zIndexPopup,marginInlineEnd:h,[`${n}-hook-holder`]:{position:"relative"},[`&${n}-top, &${n}-bottom`]:{[$]:{marginInline:"auto auto"}},[`&${n}-topLeft, &${n}-bottomLeft`]:{[$]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${n}-fade-enter, ${n}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:g,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${n}-fade-leave`]:{animationTimingFunction:g,animationFillMode:"both",animationDuration:m,animationPlayState:"paused"},[`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]:{animationName:O,animationPlayState:"running"},[`${n}-fade-leave${n}-fade-leave-active`]:{animationName:k,animationPlayState:"running"}}),C(e)),{"&-rtl":{direction:"rtl",[`${$}-btn`]:{float:"left"}}})},{[n]:{[$]:Object.assign({},Z)}},{[`${$}-pure-panel`]:Object.assign(Object.assign({},Z),{margin:0})}]};var S=(0,x.Z)("Notification",e=>{let t=e.paddingMD,n=e.paddingLG,r=(0,w.TS)(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.fontSizeLG*e.lineHeightLG,notificationCloseButtonSize:.55*e.controlHeightLG,notificationMarginBottom:e.margin,notificationPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,notificationMarginEdge:e.marginLG,animationMaxHeight:150});return[E(r)]},e=>({zIndexPopup:e.zIndexPopupBase+50,width:384})),$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function O(e,t){return null===t||!1===t?null:t||i.createElement("span",{className:`${e}-close-x`},i.createElement(u.Z,{className:`${e}-close-icon`}))}d.Z,s.Z,c.Z,f.Z,p.Z;let k={success:s.Z,info:d.Z,error:c.Z,warning:f.Z},Z=e=>{let{prefixCls:t,icon:n,type:r,message:o,description:a,btn:l,role:s="alert"}=e,c=null;return n?c=i.createElement("span",{className:`${t}-icon`},n):r&&(c=i.createElement(k[r]||null,{className:m()(`${t}-icon`,`${t}-icon-${r}`)})),i.createElement("div",{className:m()({[`${t}-with-icon`]:c}),role:s},c,i.createElement("div",{className:`${t}-message`},o),i.createElement("div",{className:`${t}-description`},a),l&&i.createElement("div",{className:`${t}-btn`},l))};var P=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let j=e=>{let{children:t,prefixCls:n}=e,[,r]=S(n);return i.createElement(g.JB,{classNames:{list:r,notice:r}},t)},_=(e,t)=>{let{prefixCls:n,key:r}=t;return i.createElement(j,{prefixCls:n,key:r},e)},R=i.forwardRef((e,t)=>{let{top:n,bottom:r,prefixCls:o,getContainer:a,maxCount:l,rtl:s,onAllRemoved:c}=e,{getPrefixCls:u,getPopupContainer:f,notification:d}=i.useContext(v.E_),p=o||u("notification"),[h,y]=(0,g.lm)({prefixCls:p,style:e=>(function(e,t,n){let r;switch(e){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":r={left:0,top:t,bottom:"auto"};break;case"topRight":r={right:0,top:t,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n}}return r})(e,null!=n?n:24,null!=r?r:24),className:()=>m()({[`${p}-rtl`]:s}),motion:()=>({motionName:`${p}-fade`}),closable:!0,closeIcon:O(p),duration:4.5,getContainer:()=>(null==a?void 0:a())||(null==f?void 0:f())||document.body,maxCount:l,onAllRemoved:c,renderNotifications:_});return i.useImperativeHandle(t,()=>Object.assign(Object.assign({},h),{prefixCls:p,notification:d})),y});function A(e){let t=i.useRef(null),n=i.useMemo(()=>{let n=n=>{var r;if(!t.current)return;let{open:o,prefixCls:a,notification:l}=t.current,s=`${a}-notice`,{message:c,description:u,icon:f,type:d,btn:p,className:h,style:g,role:v="alert",closeIcon:y}=n,b=P(n,["message","description","icon","type","btn","className","style","role","closeIcon"]),x=O(s,y);return o(Object.assign(Object.assign({placement:null!==(r=null==e?void 0:e.placement)&&void 0!==r?r:"topRight"},b),{content:i.createElement(Z,{prefixCls:s,icon:f,type:d,message:c,description:u,btn:p,role:v}),className:m()(d&&`${s}-${d}`,h,null==l?void 0:l.className),style:Object.assign(Object.assign({},null==l?void 0:l.style),g),closeIcon:x,closable:!!x}))},r={open:n,destroy:e=>{var n,r;void 0!==e?null===(n=t.current)||void 0===n||n.close(e):null===(r=t.current)||void 0===r||r.destroy()}};return["success","info","warning","error"].forEach(e=>{r[e]=t=>n(Object.assign(Object.assign({},t),{type:e}))}),r},[]);return[n,i.createElement(R,Object.assign({key:"notification-holder"},e,{ref:t}))]}let N=null,T=e=>e(),M=[],I={};function F(){let{prefixCls:e,getContainer:t,rtl:n,maxCount:r,top:o,bottom:i}=I,a=null!=e?e:(0,l.w6)().getPrefixCls("notification"),s=(null==t?void 0:t())||document.body;return{prefixCls:a,getContainer:()=>s,rtl:n,maxCount:r,top:o,bottom:i}}let L=i.forwardRef((e,t)=>{let[n,r]=i.useState(F),[o,a]=A(n),s=(0,l.w6)(),c=s.getRootPrefixCls(),u=s.getIconPrefixCls(),f=s.getTheme(),d=()=>{r(F)};return i.useEffect(d,[]),i.useImperativeHandle(t,()=>{let e=Object.assign({},o);return Object.keys(e).forEach(t=>{e[t]=function(){return d(),o[t].apply(o,arguments)}}),{instance:e,sync:d}}),i.createElement(l.ZP,{prefixCls:c,iconPrefixCls:u,theme:f},a)});function B(){if(!N){let e=document.createDocumentFragment(),t={fragment:e};N=t,T(()=>{(0,a.s)(i.createElement(L,{ref:e=>{let{instance:n,sync:r}=e||{};Promise.resolve().then(()=>{!t.instance&&n&&(t.instance=n,t.sync=r,B())})}}),e)});return}N.instance&&(M.forEach(e=>{switch(e.type){case"open":T(()=>{N.instance.open(Object.assign(Object.assign({},I),e.config))});break;case"destroy":T(()=>{null==N||N.instance.destroy(e.key)})}}),M=[])}function D(e){M.push({type:"open",config:e}),B()}let z={open:D,destroy:function(e){M.push({type:"destroy",key:e}),B()},config:function(e){I=Object.assign(Object.assign({},I),e),T(()=>{var e;null===(e=null==N?void 0:N.sync)||void 0===e||e.call(N)})},useNotification:function(e){return A(e)},_InternalPanelDoNotUseOrYouWillBeFired:e=>{let{prefixCls:t,className:n,icon:r,type:o,message:a,description:l,btn:s,closable:c=!0,closeIcon:u}=e,f=$(e,["prefixCls","className","icon","type","message","description","btn","closable","closeIcon"]),{getPrefixCls:d}=i.useContext(v.E_),p=t||d("notification"),h=`${p}-notice`,[,y]=S(p);return i.createElement(g.qX,Object.assign({},f,{prefixCls:p,className:m()(n,y,`${h}-pure-panel`),eventKey:"pure",duration:null,closable:c,closeIcon:O(p,u),content:i.createElement(Z,{prefixCls:h,icon:r,type:o,message:a,description:l,btn:s})}))}};["success","info","warning","error"].forEach(e=>{z[e]=t=>D(Object.assign(Object.assign({},t),{type:e}))});let H=(e,t)=>e.then(e=>{let{data:n}=e;if(!n)throw Error("Network Error!");if(!n.success){if("*"===t||n.err_code&&t&&t.includes(n.err_code));else{var r;z.error({message:"Request error",description:null!==(r=null==n?void 0:n.err_msg)&&void 0!==r?r:"The interface is abnormal. Please try again later"})}}return[null,n.data,n,e]}).catch(e=>(z.error({message:"Request error",description:e.message}),[e,null,null,null])),V=()=>e_("/api/v1/chat/dialogue/scenes"),U=e=>e_("/api/v1/chat/dialogue/new",e),W=()=>ej("/api/v1/chat/db/list"),K=()=>ej("/api/v1/chat/db/support/type"),q=e=>e_("/api/v1/chat/db/delete?db_name=".concat(e)),G=e=>e_("/api/v1/chat/db/edit",e),X=e=>e_("/api/v1/chat/db/add",e),Y=e=>e_("/api/v1/chat/db/test/connect",e),J=()=>ej("/api/v1/chat/dialogue/list"),Q=()=>ej("/api/v1/model/types"),ee=e=>e_("/api/v1/chat/mode/params/list?chat_mode=".concat(e)),et=e=>ej("/api/v1/chat/dialogue/messages/history?con_uid=".concat(e)),en=e=>{let{convUid:t,chatMode:n,data:r,config:o,model:i}=e;return e_("/api/v1/chat/mode/params/file/load?conv_uid=".concat(t,"&chat_mode=").concat(n,"&model_name=").concat(i),r,{headers:{"Content-Type":"multipart/form-data"},...o})},er=e=>e_("/api/v1/chat/dialogue/delete?con_uid=".concat(e)),eo=e=>e_("/knowledge/".concat(e,"/arguments"),{}),ei=(e,t)=>e_("/knowledge/".concat(e,"/argument/save"),t),ea=()=>e_("/knowledge/space/list",{}),el=(e,t)=>e_("/knowledge/".concat(e,"/document/list"),t),es=(e,t)=>e_("/knowledge/".concat(e,"/document/add"),t),ec=e=>e_("/knowledge/space/add",e),eu=(e,t)=>e_("/knowledge/".concat(e,"/document/sync"),t),ef=(e,t)=>e_("/knowledge/".concat(e,"/document/upload"),t),ed=(e,t)=>e_("/knowledge/".concat(e,"/chunk/list"),t),ep=(e,t)=>e_("/knowledge/".concat(e,"/document/delete"),t),eh=e=>e_("/knowledge/space/delete",e),em=()=>ej("/api/v1/worker/model/list"),eg=e=>e_("/api/v1/worker/model/stop",e),ev=e=>e_("/api/v1/worker/model/start",e),ey=()=>ej("/api/v1/worker/model/params"),eb=e=>e_("/api/v1/agent/query",e),ex=e=>e_("/api/v1/agent/hub/update",null!=e?e:{channel:"",url:"",branch:"",authorization:""}),ew=e=>e_("/api/v1/agent/my",void 0,{params:{user:e}}),eC=(e,t)=>e_("/api/v1/agent/install",void 0,{params:{plugin_name:e,user:t},timeout:6e4}),eE=(e,t)=>e_("/api/v1/agent/uninstall",void 0,{params:{plugin_name:e,user:t},timeout:6e4}),eS=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return e_("/api/v1/personal/agent/upload",t,{params:{user:e},headers:{"Content-Type":"multipart/form-data"},...n})},e$=()=>ej("/api/v1/feedback/select",void 0),eO=(e,t)=>ej("/api/v1/feedback/find?conv_uid=".concat(e,"&conv_index=").concat(t),void 0),ek=e=>{let{data:t,config:n}=e;return e_("/api/v1/feedback/commit",t,{headers:{"Content-Type":"application/json"},...n})};var eZ=n(83454);let eP=o.Z.create({baseURL:null!==(r=eZ.env.API_BASE_URL)&&void 0!==r?r:"",timeout:1e4}),ej=(e,t,n)=>eP.get(e,{params:t,...n}),e_=(e,t,n)=>eP.post(e,t,n)},32665:function(e,t,n){"use strict";function r(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return r}}),n(38754),n(67294),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},41219:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return p},useSearchParams:function(){return h},usePathname:function(){return m},ServerInsertedHTMLContext:function(){return s.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return s.useServerInsertedHTML},useRouter:function(){return g},useParams:function(){return v},useSelectedLayoutSegments:function(){return y},useSelectedLayoutSegment:function(){return b},redirect:function(){return c.redirect},notFound:function(){return u.notFound}});let r=n(67294),o=n(27473),i=n(35802),a=n(32665),l=n(43512),s=n(98751),c=n(96885),u=n(86323),f=Symbol("internal for urlsearchparams readonly");function d(){return Error("ReadonlyURLSearchParams cannot be modified")}class p{[Symbol.iterator](){return this[f][Symbol.iterator]()}append(){throw d()}delete(){throw d()}set(){throw d()}sort(){throw d()}constructor(e){this[f]=e,this.entries=e.entries.bind(e),this.forEach=e.forEach.bind(e),this.get=e.get.bind(e),this.getAll=e.getAll.bind(e),this.has=e.has.bind(e),this.keys=e.keys.bind(e),this.values=e.values.bind(e),this.toString=e.toString.bind(e)}}function h(){(0,a.clientHookInServerComponentError)("useSearchParams");let e=(0,r.useContext)(i.SearchParamsContext),t=(0,r.useMemo)(()=>e?new p(e):null,[e]);return t}function m(){return(0,a.clientHookInServerComponentError)("usePathname"),(0,r.useContext)(i.PathnameContext)}function g(){(0,a.clientHookInServerComponentError)("useRouter");let e=(0,r.useContext)(o.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function v(){(0,a.clientHookInServerComponentError)("useParams");let e=(0,r.useContext)(o.GlobalLayoutRouterContext);return e?function e(t,n){void 0===n&&(n={});let r=t[1];for(let t of Object.values(r)){let r=t[0],o=Array.isArray(r),i=o?r[1]:r;!i||i.startsWith("__PAGE__")||(o&&(n[r[0]]=r[1]),n=e(t,n))}return n}(e.tree):null}function y(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,r.useContext)(o.LayoutRouterContext);return function e(t,n,r,o){let i;if(void 0===r&&(r=!0),void 0===o&&(o=[]),r)i=t[1][n];else{var a;let e=t[1];i=null!=(a=e.children)?a:Object.values(e)[0]}if(!i)return o;let s=i[0],c=(0,l.getSegmentValue)(s);return!c||c.startsWith("__PAGE__")?o:(o.push(c),e(i,n,!1,o))}(t,e)}function b(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=y(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},86323:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{notFound:function(){return r},isNotFoundError:function(){return o}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function o(e){return(null==e?void 0:e.digest)===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},96885:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return l},redirect:function(){return s},isRedirectError:function(){return c},getURLFromRedirectError:function(){return u},getRedirectTypeFromError:function(){return f}});let i=n(68214),a="NEXT_REDIRECT";function l(e,t){let n=Error(a);n.digest=a+";"+t+";"+e;let r=i.requestAsyncStorage.getStore();return r&&(n.mutableCookies=r.mutableCookies),n}function s(e,t){throw void 0===t&&(t="replace"),l(e,t)}function c(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;let[t,n,r]=e.digest.split(";",3);return t===a&&("replace"===n||"push"===n)&&"string"==typeof r}function u(e){return c(e)?e.digest.split(";",3)[2]:null}function f(e){if(!c(e))throw Error("Not a redirect error");return e.digest.split(";",3)[1]}(o=r||(r={})).push="push",o.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},43512:function(e,t){"use strict";function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},29382:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PrefetchKind:function(){return n},ACTION_REFRESH:function(){return o},ACTION_NAVIGATE:function(){return i},ACTION_RESTORE:function(){return a},ACTION_SERVER_PATCH:function(){return l},ACTION_PREFETCH:function(){return s},ACTION_FAST_REFRESH:function(){return c},ACTION_SERVER_ACTION:function(){return u}});let o="refresh",i="navigate",a="restore",l="server-patch",s="prefetch",c="fast-refresh",u="server-action";(r=n||(n={})).AUTO="auto",r.FULL="full",r.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75476:function(e,t){"use strict";function n(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},69873:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return y}});let r=n(38754),o=n(61757),i=o._(n(67294)),a=r._(n(68965)),l=n(38083),s=n(2478),c=n(76226);n(59941);let u=r._(n(31720)),f={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function d(e){return void 0!==e.default}function p(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function h(e,t,n,r,o,i,a){if(!e||e["data-loaded-src"]===t)return;e["data-loaded-src"]=t;let l="decode"in e?e.decode():Promise.resolve();l.catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("blur"===n&&i(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,o=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>o,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{o=!0,t.stopPropagation()}})}(null==o?void 0:o.current)&&o.current(e)}})}function m(e){let[t,n]=i.version.split("."),r=parseInt(t,10),o=parseInt(n,10);return r>18||18===r&&o>=3?{fetchPriority:e}:{fetchpriority:e}}let g=(0,i.forwardRef)((e,t)=>{let{imgAttributes:n,heightInt:r,widthInt:o,qualityInt:a,className:l,imgStyle:s,blurStyle:c,isLazy:u,fetchPriority:f,fill:d,placeholder:p,loading:g,srcString:v,config:y,unoptimized:b,loader:x,onLoadRef:w,onLoadingCompleteRef:C,setBlurComplete:E,setShowAltText:S,onLoad:$,onError:O,...k}=e;return g=u?"lazy":g,i.default.createElement("img",{...k,...m(f),loading:g,width:o,height:r,decoding:"async","data-nimg":d?"fill":"1",className:l,style:{...s,...c},...n,ref:(0,i.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(O&&(e.src=e.src),e.complete&&h(e,v,p,w,C,E,b))},[v,p,w,C,E,O,b,t]),onLoad:e=>{let t=e.currentTarget;h(t,v,p,w,C,E,b)},onError:e=>{S(!0),"blur"===p&&E(!0),O&&O(e)}})}),v=(0,i.forwardRef)((e,t)=>{var n;let r,o,{src:h,sizes:v,unoptimized:y=!1,priority:b=!1,loading:x,className:w,quality:C,width:E,height:S,fill:$,style:O,onLoad:k,onLoadingComplete:Z,placeholder:P="empty",blurDataURL:j,fetchPriority:_,layout:R,objectFit:A,objectPosition:N,lazyBoundary:T,lazyRoot:M,...I}=e,F=(0,i.useContext)(c.ImageConfigContext),L=(0,i.useMemo)(()=>{let e=f||F||s.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[F]),B=I.loader||u.default;delete I.loader;let D="__next_img_default"in B;if(D){if("custom"===L.loader)throw Error('Image with src "'+h+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=B;B=t=>{let{config:n,...r}=t;return e(r)}}if(R){"fill"===R&&($=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[R];e&&(O={...O,...e});let t={responsive:"100vw",fill:"100vw"}[R];t&&!v&&(v=t)}let z="",H=p(E),V=p(S);if("object"==typeof(n=h)&&(d(n)||void 0!==n.src)){let e=d(h)?h.default:h;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(r=e.blurWidth,o=e.blurHeight,j=j||e.blurDataURL,z=e.src,!$){if(H||V){if(H&&!V){let t=H/e.width;V=Math.round(e.height*t)}else if(!H&&V){let t=V/e.height;H=Math.round(e.width*t)}}else H=e.width,V=e.height}}let U=!b&&("lazy"===x||void 0===x);(!(h="string"==typeof h?h:z)||h.startsWith("data:")||h.startsWith("blob:"))&&(y=!0,U=!1),L.unoptimized&&(y=!0),D&&h.endsWith(".svg")&&!L.dangerouslyAllowSVG&&(y=!0),b&&(_="high");let[W,K]=(0,i.useState)(!1),[q,G]=(0,i.useState)(!1),X=p(C),Y=Object.assign($?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:A,objectPosition:N}:{},q?{}:{color:"transparent"},O),J="blur"===P&&j&&!W?{backgroundSize:Y.objectFit||"cover",backgroundPosition:Y.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:'url("data:image/svg+xml;charset=utf-8,'+(0,l.getImageBlurSvg)({widthInt:H,heightInt:V,blurWidth:r,blurHeight:o,blurDataURL:j,objectFit:Y.objectFit})+'")'}:{},Q=function(e){let{config:t,src:n,unoptimized:r,width:o,quality:i,sizes:a,loader:l}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:s,kind:c}=function(e,t,n){let{deviceSizes:r,allSizes:o}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:o.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:o,kind:"w"}}if("number"!=typeof t)return{widths:r,kind:"w"};let i=[...new Set([t,2*t].map(e=>o.find(t=>t>=e)||o[o.length-1]))];return{widths:i,kind:"x"}}(t,o,a),u=s.length-1;return{sizes:a||"w"!==c?a:"100vw",srcSet:s.map((e,r)=>l({config:t,src:n,quality:i,width:e})+" "+("w"===c?e:r+1)+c).join(", "),src:l({config:t,src:n,quality:i,width:s[u]})}}({config:L,src:h,unoptimized:y,width:H,quality:X,sizes:v,loader:B}),ee=h,et=(0,i.useRef)(k);(0,i.useEffect)(()=>{et.current=k},[k]);let en=(0,i.useRef)(Z);(0,i.useEffect)(()=>{en.current=Z},[Z]);let er={isLazy:U,imgAttributes:Q,heightInt:V,widthInt:H,qualityInt:X,className:w,imgStyle:Y,blurStyle:J,loading:x,config:L,fetchPriority:_,fill:$,unoptimized:y,placeholder:P,loader:B,srcString:ee,onLoadRef:et,onLoadingCompleteRef:en,setBlurComplete:K,setShowAltText:G,...I};return i.default.createElement(i.default.Fragment,null,i.default.createElement(g,{...er,ref:t}),b?i.default.createElement(a.default,null,i.default.createElement("link",{key:"__nimg-"+Q.src+Q.srcSet+Q.sizes,rel:"preload",as:"image",href:Q.srcSet?void 0:Q.src,imageSrcSet:Q.srcSet,imageSizes:Q.sizes,crossOrigin:I.crossOrigin,referrerPolicy:I.referrerPolicy,...m(_)})):null)}),y=v;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9940:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return x}});let r=n(38754),o=r._(n(67294)),i=n(65722),a=n(65723),l=n(28904),s=n(95514),c=n(27521),u=n(44293),f=n(27473),d=n(81307),p=n(75476),h=n(66318),m=n(29382),g=new Set;function v(e,t,n,r,o,i){if(!i&&!(0,a.isLocalURL)(t))return;if(!r.bypassPrefetchedCheck){let o=void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0,i=t+"%"+n+"%"+o;if(g.has(i))return;g.add(i)}let l=i?e.prefetch(t,o):e.prefetch(t,n,r);Promise.resolve(l).catch(e=>{})}function y(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let b=o.default.forwardRef(function(e,t){let n,r;let{href:l,as:g,children:b,prefetch:x=null,passHref:w,replace:C,shallow:E,scroll:S,locale:$,onClick:O,onMouseEnter:k,onTouchStart:Z,legacyBehavior:P=!1,...j}=e;n=b,P&&("string"==typeof n||"number"==typeof n)&&(n=o.default.createElement("a",null,n));let _=!1!==x,R=null===x?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,A=o.default.useContext(u.RouterContext),N=o.default.useContext(f.AppRouterContext),T=null!=A?A:N,M=!A,{href:I,as:F}=o.default.useMemo(()=>{if(!A){let e=y(l);return{href:e,as:g?y(g):e}}let[e,t]=(0,i.resolveHref)(A,l,!0);return{href:e,as:g?(0,i.resolveHref)(A,g):t||e}},[A,l,g]),L=o.default.useRef(I),B=o.default.useRef(F);P&&(r=o.default.Children.only(n));let D=P?r&&"object"==typeof r&&r.ref:t,[z,H,V]=(0,d.useIntersection)({rootMargin:"200px"}),U=o.default.useCallback(e=>{(B.current!==F||L.current!==I)&&(V(),B.current=F,L.current=I),z(e),D&&("function"==typeof D?D(e):"object"==typeof D&&(D.current=e))},[F,D,I,V,z]);o.default.useEffect(()=>{T&&H&&_&&v(T,I,F,{locale:$},{kind:R},M)},[F,I,H,$,_,null==A?void 0:A.locale,T,M,R]);let W={ref:U,onClick(e){P||"function"!=typeof O||O(e),P&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),T&&!e.defaultPrevented&&function(e,t,n,r,i,l,s,c,u,f){let{nodeName:d}=e.currentTarget,p="A"===d.toUpperCase();if(p&&(function(e){let t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!u&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let h=()=>{"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:l,locale:c,scroll:s}):t[i?"replace":"push"](r||n,{forceOptimisticNavigation:!f})};u?o.default.startTransition(h):h()}(e,T,I,F,C,E,S,$,M,_)},onMouseEnter(e){P||"function"!=typeof k||k(e),P&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),T&&(_||!M)&&v(T,I,F,{locale:$,priority:!0,bypassPrefetchedCheck:!0},{kind:R},M)},onTouchStart(e){P||"function"!=typeof Z||Z(e),P&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),T&&(_||!M)&&v(T,I,F,{locale:$,priority:!0,bypassPrefetchedCheck:!0},{kind:R},M)}};if((0,s.isAbsoluteUrl)(F))W.href=F;else if(!P||w||"a"===r.type&&!("href"in r.props)){let e=void 0!==$?$:null==A?void 0:A.locale,t=(null==A?void 0:A.isLocaleDomain)&&(0,p.getDomainLocale)(F,e,null==A?void 0:A.locales,null==A?void 0:A.domainLocales);W.href=t||(0,h.addBasePath)((0,c.addLocale)(F,e,null==A?void 0:A.defaultLocale))}return P?o.default.cloneElement(r,W):o.default.createElement("a",{...j,...W},n)}),x=b;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return s}});let r=n(67294),o=n(82997),i="function"==typeof IntersectionObserver,a=new Map,l=[];function s(e){let{rootRef:t,rootMargin:n,disabled:s}=e,c=s||!i,[u,f]=(0,r.useState)(!1),d=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{d.current=e},[]);(0,r.useEffect)(()=>{if(i){if(c||u)return;let e=d.current;if(e&&e.tagName){let r=function(e,t,n){let{id:r,observer:o,elements:i}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=l.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=a.get(r)))return t;let o=new Map,i=new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e);return t={id:n,observer:i,elements:o},l.push(n),a.set(n,t),t}(n);return i.set(e,t),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),a.delete(r);let e=l.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&l.splice(e,1)}}}(e,e=>e&&f(e),{root:null==t?void 0:t.current,rootMargin:n});return r}}else if(!u){let e=(0,o.requestIdleCallback)(()=>f(!0));return()=>(0,o.cancelIdleCallback)(e)}},[c,n,t,u,d.current]);let h=(0,r.useCallback)(()=>{f(!1)},[]);return[p,u,h]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38083:function(e,t){"use strict";function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:o,blurDataURL:i,objectFit:a}=e,l=r||t,s=o||n,c=i.startsWith("data:image/jpeg")?"%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='1 1'/%3E%3C/feComponentTransfer%3E%":"";return l&&s?"%3Csvg xmlns='http%3A//www.w3.org/2000/svg' viewBox='0 0 "+l+" "+s+"'%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+(r&&o?"1":"20")+"'/%3E"+c+"%3C/filter%3E%3Cimage preserveAspectRatio='none' filter='url(%23b)' x='0' y='0' height='100%25' width='100%25' href='"+i+"'/%3E%3C/svg%3E":"%3Csvg xmlns='http%3A//www.w3.org/2000/svg'%3E%3Cimage style='filter:blur(20px)' preserveAspectRatio='"+("contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none")+"' x='0' y='0' height='100%25' width='100%25' href='"+i+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},31720:function(e,t){"use strict";function n(e){let{config:t,src:n,width:r,quality:o}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(o||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},98751:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return i},useServerInsertedHTML:function(){return a}});let r=n(61757),o=r._(n(67294)),i=o.default.createContext(null);function a(e){let t=(0,o.useContext)(i);t&&t(e)}},37262:function(e,t,n){"use strict";let r,o;n.r(t),n.d(t,{default:function(){return eM}});var i=n(85893),a=n(67294),l=n(41468),s=n(50489),c=n(98399),u=function(){return(0,i.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,i.jsx)("path",{d:"M593.054 120.217C483.656 148.739 402.91 248.212 402.91 366.546c0 140.582 113.962 254.544 254.544 254.544 118.334 0 217.808-80.746 246.328-190.144C909.17 457.12 912 484.23 912 512c0 220.914-179.086 400-400 400S112 732.914 112 512s179.086-400 400-400c27.77 0 54.88 2.83 81.054 8.217z","p-id":"5941"})})},f=function(){return(0,i.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,i.jsx)("path",{d:"M554.6 64h-85.4v128h85.4V64z m258.2 87.4L736 228.2l59.8 59.8 76.8-76.8-59.8-59.8z m-601.6 0l-59.8 59.8 76.8 76.8 59.8-59.8-76.8-76.8zM512 256c-140.8 0-256 115.2-256 256s115.2 256 256 256 256-115.2 256-256-115.2-256-256-256z m448 213.4h-128v85.4h128v-85.4z m-768 0H64v85.4h128v-85.4zM795.8 736L736 795.8l76.8 76.8 59.8-59.8-76.8-76.8z m-567.6 0l-76.8 76.8 59.8 59.8 76.8-76.8-59.8-59.8z m326.4 96h-85.4v128h85.4v-128z","p-id":"7802"})})},d=n(59766),p=n(87462),h=n(63366),m=n(71387),g=n(70917);function v(e){let{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>t(null==e||0===Object.keys(e).length?n:e):t;return(0,i.jsx)(g.xB,{styles:r})}var y=n(56760),b=n(71927);let x="mode",w="color-scheme",C="data-color-scheme";function E(e){if("undefined"!=typeof window&&"system"===e){let e=window.matchMedia("(prefers-color-scheme: dark)");return e.matches?"dark":"light"}}function S(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function $(e,t){let n;if("undefined"!=typeof window){try{(n=localStorage.getItem(e)||void 0)||localStorage.setItem(e,t)}catch(e){}return n||t}}let O=["colorSchemes","components","generateCssVars","cssVarPrefix"];var k=n(1812),Z=n(13951),P=n(2548);let{CssVarsProvider:j,useColorScheme:_,getInitColorSchemeScript:R}=function(e){let{themeId:t,theme:n={},attribute:r=C,modeStorageKey:o=x,colorSchemeStorageKey:l=w,defaultMode:s="light",defaultColorScheme:c,disableTransitionOnChange:u=!1,resolveTheme:f,excludeVariablesFromRoot:g}=e;n.colorSchemes&&("string"!=typeof c||n.colorSchemes[c])&&("object"!=typeof c||n.colorSchemes[null==c?void 0:c.light])&&("object"!=typeof c||n.colorSchemes[null==c?void 0:c.dark])||console.error(`MUI: \`${c}\` does not exist in \`theme.colorSchemes\`.`);let k=a.createContext(void 0),Z="string"==typeof c?c:c.light,P="string"==typeof c?c:c.dark;return{CssVarsProvider:function({children:e,theme:m=n,modeStorageKey:C=o,colorSchemeStorageKey:Z=l,attribute:P=r,defaultMode:j=s,defaultColorScheme:_=c,disableTransitionOnChange:R=u,storageWindow:A="undefined"==typeof window?void 0:window,documentNode:N="undefined"==typeof document?void 0:document,colorSchemeNode:T="undefined"==typeof document?void 0:document.documentElement,colorSchemeSelector:M=":root",disableNestedContext:I=!1,disableStyleSheetGeneration:F=!1}){let L=a.useRef(!1),B=(0,y.Z)(),D=a.useContext(k),z=!!D&&!I,H=m[t],V=H||m,{colorSchemes:U={},components:W={},generateCssVars:K=()=>({vars:{},css:{}}),cssVarPrefix:q}=V,G=(0,h.Z)(V,O),X=Object.keys(U),Y="string"==typeof _?_:_.light,J="string"==typeof _?_:_.dark,{mode:Q,setMode:ee,systemMode:et,lightColorScheme:en,darkColorScheme:er,colorScheme:eo,setColorScheme:ei}=function(e){let{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=x,colorSchemeStorageKey:l=w,storageWindow:s="undefined"==typeof window?void 0:window}=e,c=o.join(","),[u,f]=a.useState(()=>{let e=$(i,t),o=$(`${l}-light`,n),a=$(`${l}-dark`,r);return{mode:e,systemMode:E(e),lightColorScheme:o,darkColorScheme:a}}),d=S(u,e=>"light"===e?u.lightColorScheme:"dark"===e?u.darkColorScheme:void 0),h=a.useCallback(e=>{f(n=>{if(e===n.mode)return n;let r=e||t;try{localStorage.setItem(i,r)}catch(e){}return(0,p.Z)({},n,{mode:r,systemMode:E(r)})})},[i,t]),m=a.useCallback(e=>{e?"string"==typeof e?e&&!c.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):f(t=>{let n=(0,p.Z)({},t);return S(t,t=>{try{localStorage.setItem(`${l}-${t}`,e)}catch(e){}"light"===t&&(n.lightColorScheme=e),"dark"===t&&(n.darkColorScheme=e)}),n}):f(t=>{let o=(0,p.Z)({},t),i=null===e.light?n:e.light,a=null===e.dark?r:e.dark;if(i){if(c.includes(i)){o.lightColorScheme=i;try{localStorage.setItem(`${l}-light`,i)}catch(e){}}else console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)}if(a){if(c.includes(a)){o.darkColorScheme=a;try{localStorage.setItem(`${l}-dark`,a)}catch(e){}}else console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)}return o}):f(e=>{try{localStorage.setItem(`${l}-light`,n),localStorage.setItem(`${l}-dark`,r)}catch(e){}return(0,p.Z)({},e,{lightColorScheme:n,darkColorScheme:r})})},[c,l,n,r]),g=a.useCallback(e=>{"system"===u.mode&&f(t=>(0,p.Z)({},t,{systemMode:null!=e&&e.matches?"dark":"light"}))},[u.mode]),v=a.useRef(g);return v.current=g,a.useEffect(()=>{let e=(...e)=>v.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>t.removeListener(e)},[]),a.useEffect(()=>{let e=e=>{let n=e.newValue;"string"==typeof e.key&&e.key.startsWith(l)&&(!n||c.match(n))&&(e.key.endsWith("light")&&m({light:n}),e.key.endsWith("dark")&&m({dark:n})),e.key===i&&(!n||["light","dark","system"].includes(n))&&h(n||t)};if(s)return s.addEventListener("storage",e),()=>s.removeEventListener("storage",e)},[m,h,i,l,c,t,s]),(0,p.Z)({},u,{colorScheme:d,setMode:h,setColorScheme:m})}({supportedColorSchemes:X,defaultLightColorScheme:Y,defaultDarkColorScheme:J,modeStorageKey:C,colorSchemeStorageKey:Z,defaultMode:j,storageWindow:A}),ea=Q,el=eo;z&&(ea=D.mode,el=D.colorScheme);let es=ea||("system"===j?s:j),ec=el||("dark"===es?J:Y),{css:eu,vars:ef}=K(),ed=(0,p.Z)({},G,{components:W,colorSchemes:U,cssVarPrefix:q,vars:ef,getColorSchemeSelector:e=>`[${P}="${e}"] &`}),ep={},eh={};Object.entries(U).forEach(([e,t])=>{let{css:n,vars:r}=K(e);ed.vars=(0,d.Z)(ed.vars,r),e===ec&&(Object.keys(t).forEach(e=>{t[e]&&"object"==typeof t[e]?ed[e]=(0,p.Z)({},ed[e],t[e]):ed[e]=t[e]}),ed.palette&&(ed.palette.colorScheme=e));let o="string"==typeof _?_:"dark"===j?_.dark:_.light;if(e===o){if(g){let t={};g(q).forEach(e=>{t[e]=n[e],delete n[e]}),ep[`[${P}="${e}"]`]=t}ep[`${M}, [${P}="${e}"]`]=n}else eh[`${":root"===M?"":M}[${P}="${e}"]`]=n}),ed.vars=(0,d.Z)(ed.vars,ef),a.useEffect(()=>{el&&T&&T.setAttribute(P,el)},[el,P,T]),a.useEffect(()=>{let e;if(R&&L.current&&N){let t=N.createElement("style");t.appendChild(N.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),N.head.appendChild(t),window.getComputedStyle(N.body),e=setTimeout(()=>{N.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[el,R,N]),a.useEffect(()=>(L.current=!0,()=>{L.current=!1}),[]);let em=a.useMemo(()=>({mode:ea,systemMode:et,setMode:ee,lightColorScheme:en,darkColorScheme:er,colorScheme:el,setColorScheme:ei,allColorSchemes:X}),[X,el,er,en,ea,ei,ee,et]),eg=!0;(F||z&&(null==B?void 0:B.cssVarPrefix)===q)&&(eg=!1);let ev=(0,i.jsxs)(a.Fragment,{children:[eg&&(0,i.jsxs)(a.Fragment,{children:[(0,i.jsx)(v,{styles:{[M]:eu}}),(0,i.jsx)(v,{styles:ep}),(0,i.jsx)(v,{styles:eh})]}),(0,i.jsx)(b.Z,{themeId:H?t:void 0,theme:f?f(ed):ed,children:e})]});return z?ev:(0,i.jsx)(k.Provider,{value:em,children:ev})},useColorScheme:()=>{let e=a.useContext(k);if(!e)throw Error((0,m.Z)(19));return e},getInitColorSchemeScript:e=>(function(e){let{defaultMode:t="light",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=x,colorSchemeStorageKey:a=w,attribute:l=C,colorSchemeNode:s="document.documentElement"}=e||{};return(0,i.jsx)("script",{dangerouslySetInnerHTML:{__html:`(function() { try { + */var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case f:case i:case l:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case d:case g:case m:case s:return e;default:return t}}case o:return t}}}function C(e){return w(e)===f}t.AsyncMode=u,t.ConcurrentMode=f,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=d,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return C(e)||w(e)===u},t.isConcurrentMode=C,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===l||e===a||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===v)},t.typeOf=w},21296:function(e,t,n){"use strict";e.exports=n(96103)},62705:function(e,t,n){var r=n(55639).Symbol;e.exports=r},44239:function(e,t,n){var r=n(62705),o=n(89607),i=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},27561:function(e,t,n){var r=n(67990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},31957:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},89607:function(e,t,n){var r=n(62705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),n=e[l];try{e[l]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[l]=n:delete e[l]),o}},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},55639:function(e,t,n){var r=n(31957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},67990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:function(e,t,n){var r=n(13218),o=n(7771),i=n(14841),a=Math.max,l=Math.min;e.exports=function(e,t,n){var s,c,u,f,d,p,h=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var n=s,r=c;return s=c=void 0,h=t,f=e.apply(r,n)}function b(e){var n=e-p,r=e-h;return void 0===p||n>=t||n<0||g&&r>=u}function x(){var e,n,r,i=o();if(b(i))return w(i);d=setTimeout(x,(e=i-p,n=i-h,r=t-e,g?l(r,u-n):r))}function w(e){return(d=void 0,v&&s)?y(e):(s=c=void 0,f)}function C(){var e,n=o(),r=b(n);if(s=arguments,c=this,p=n,r){if(void 0===d)return h=e=p,d=setTimeout(x,t),m?y(e):f;if(g)return clearTimeout(d),d=setTimeout(x,t),y(p)}return void 0===d&&(d=setTimeout(x,t)),f}return t=i(t)||0,r(n)&&(m=!!n.leading,u=(g="maxWait"in n)?a(i(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),C.cancel=function(){void 0!==d&&clearTimeout(d),h=0,s=p=c=d=void 0},C.flush=function(){return void 0===d?f:w(o())},C}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},33448:function(e,t,n){var r=n(44239),o=n(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},23493:function(e,t,n){var r=n(23279),o=n(13218);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return o(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:i,maxWait:t,trailing:a})}},14841:function(e,t,n){var r=n(27561),o=n(13218),i=n(33448),a=0/0,l=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):l.test(e)?a:+e}},83454:function(e,t,n){"use strict";var r,o;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(o=n.g.process)?void 0:o.env)?n.g.process:n(77663)},6840:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(37262)}])},41468:function(e,t,n){"use strict";n.d(t,{R:function(){return c},p:function(){return s}});var r=n(85893),o=n(67294),i=n(50489),a=n(577),l=n(39332);let s=(0,o.createContext)({scene:"",chatId:"",modelList:[],model:"",dbParam:void 0,dialogueList:[],agentList:[],setAgentList:()=>{},setModel:()=>{},setIsContract:()=>{},setIsMenuExpand:()=>{},setDbParam:()=>void 0,queryDialogueList:()=>{},refreshDialogList:()=>{}}),c=e=>{var t,n,c;let{children:u}=e,f=(0,l.useSearchParams)(),d=null!==(t=null==f?void 0:f.get("id"))&&void 0!==t?t:"",p=null!==(n=null==f?void 0:f.get("scene"))&&void 0!==n?n:"",h=null!==(c=null==f?void 0:f.get("db_param"))&&void 0!==c?c:"",[m,g]=(0,o.useState)(!1),[v,y]=(0,o.useState)(""),[b,x]=(0,o.useState)("chat_dashboard"!==p),[w,C]=(0,o.useState)(h),[E,S]=(0,o.useState)([]),{run:$,data:O=[],refresh:k}=(0,a.Z)(async()=>{let[,e]=await (0,i.Vx)((0,i.iP)());return null!=e?e:[]},{manual:!0}),{data:Z=[]}=(0,a.Z)(async()=>{let[,e]=await (0,i.Vx)((0,i.Vw)());return null!=e?e:[]});(0,o.useEffect)(()=>{y(Z[0])},[Z,null==Z?void 0:Z.length]);let P=(0,o.useMemo)(()=>O.find(e=>e.conv_uid===d),[d,O]);return(0,r.jsx)(s.Provider,{value:{isContract:m,isMenuExpand:b,scene:p,chatId:d,modelList:Z,model:v,dbParam:w||h,dialogueList:O,agentList:E,setAgentList:S,setModel:y,setIsContract:g,setIsMenuExpand:x,setDbParam:C,queryDialogueList:$,refreshDialogList:k,currentDialogue:P},children:u})}},58989:function(e,t,n){"use strict";n.d(t,{Z:function(){return D}});let r={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class o{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||r,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=Array(e),n=0;n{this.observers[e]=this.observers[e]||[],this.observers[e].push(t)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(e=>e!==t)}}emit(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{e(...n)})}if(this.observers["*"]){let t=[].concat(this.observers["*"]);t.forEach(t=>{t.apply(t,[e,...n])})}}}function l(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function s(e){return null==e?"":""+e}function c(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}let i="string"!=typeof t?[].concat(t):t.split(".");for(;i.length>1;){if(o())return{};let t=r(i.shift());!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function u(e,t,n){let{obj:r,k:o}=c(e,t,Object);r[o]=n}function f(e,t){let{obj:n,k:r}=c(e,t);if(n)return n[r]}function d(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function h(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,e=>p[e]):e}let m=[" ",",","?","!",";"];function g(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];let r=t.split(n),o=e;for(let e=0;ee+i;)i++,l=o[a=r.slice(e,e+i).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}let s=r.slice(e+i).join(n);if(s)return g(l,s,n);return}o=o[r[e]]}return o}function v(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class y extends a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));let l=f(this.data,a);return l||!i||"string"!=typeof n?l:g(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),u(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(let r in n)("string"==typeof n[r]||"[object Array]"===Object.prototype.toString.apply(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let l=f(this.data,a)||{};r?function e(t,n,r){for(let o in n)"__proto__"!==o&&"constructor"!==o&&(o in t?"string"==typeof t[o]||t[o]instanceof String||"string"==typeof n[o]||n[o]instanceof String?r&&(t[o]=n[o]):e(t[o],n[o],r):t[o]=n[o]);return t}(l,n,o):l={...l,...n},u(this.data,a,l),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e),n=t&&Object.keys(t)||[];return!!n.find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var b={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))}),t}};let x={};class w extends a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,n){e.forEach(e=>{t[e]&&(n[e]=t[e])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=i.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;let n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,n){t=t||"",n=n||"";let r=m.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===r.length)return!0;let o=RegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`),i=!o.test(e);if(!i){let t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i}(e,n,r);if(i&&!a){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};let i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);let r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],s=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(s&&"cimode"===s.toLowerCase()){if(c){let e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l}:`${l}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l}:i}let u=this.resolve(e,t),f=u&&u.res,d=u&&u.usedKey||i,p=u&&u.exactUsedKey||i,h=Object.prototype.toString.apply(f),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,v="string"!=typeof f&&"boolean"!=typeof f&&"number"!=typeof f;if(g&&f&&v&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(h)&&!("string"==typeof m&&"[object Array]"===h)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,f,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u):e}if(o){let e="[object Array]"===h,n=e?[]:{},r=e?p:d;for(let e in f)if(Object.prototype.hasOwnProperty.call(f,e)){let i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=f[e])}f=n}}else if(g&&"string"==typeof m&&"[object Array]"===h)(f=f.join(m))&&(f=this.extendTranslation(f,e,t,n));else{let r=!1,a=!1,c=void 0!==t.count&&"string"!=typeof t.count,d=w.hasDefaultValue(t),p=c?this.pluralResolver.getSuffix(s,t.count,t):"",h=t.ordinal&&c?this.pluralResolver.getSuffix(s,t.count,{ordinal:!1}):"",m=t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(f)&&d&&(r=!0,f=m),this.isValidLookup(f)||(a=!0,f=i);let g=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,v=g&&a?void 0:f,y=d&&m!==f&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",s,l,i,y?m:f),o){let e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t{let o=d&&r!==f?r:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,l,n,o,y,t),this.emit("missingKey",e,l,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach(e=>{this.pluralResolver.getSuffixes(e,t).forEach(n=>{r([e],i+n,t[`defaultValue${n}`]||m)})}):r(e,i,m))}f=this.extendTranslation(f,e,t,u,n),a&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,r?f:void 0):this.options.parseMissingKeyHandler(f))}return r?(u.res=f,u):f}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){let a;n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let l="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(l){let t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let s=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language,n),l){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;a1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;let l=this.extractFromKey(e,a),s=l.key;n=s;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));let u=void 0!==a.count&&"string"!=typeof a.count,f=u&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);c.forEach(e=>{this.isValidLookup(t)||(i=e,!x[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(x[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(n=>{let i;if(this.isValidLookup(t))return;o=n;let l=[s];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(l,s,n,e,a);else{let e;u&&(e=this.pluralResolver.getSuffix(n,a.count,a));let t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(l.push(s+e),a.ordinal&&0===e.indexOf(r)&&l.push(s+e.replace(r,this.options.pluralSeparator)),f&&l.push(s+t)),d){let n=`${s}${this.options.contextSeparator}${a.context}`;l.push(n),u&&(l.push(n+e),a.ordinal&&0===e.indexOf(r)&&l.push(n+e.replace(r,this.options.pluralSeparator)),f&&l.push(n+t))}}for(;i=l.pop();)this.isValidLookup(t)||(r=i,t=this.getResource(n,e,i,a))}))})}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}function C(e){return e.charAt(0).toUpperCase()+e.slice(1)}class E{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=i.create("languageUtils")}getScriptPartFromCode(e){if(!(e=v(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=v(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){let t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=C(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=C(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=C(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(0>e.indexOf("-")&&0>n.indexOf("-"))&&0===e.indexOf(n))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach(e=>{0>r.indexOf(e)&&o(this.formatLanguageCode(e))}),r}}let S=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],$={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},O=["v1","v2","v3"],k=["v4"],Z={zero:0,one:1,two:2,few:3,many:4,other:5};class P{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=i.create("pluralResolver"),(!this.options.compatibilityJSON||k.includes(this.options.compatibilityJSON))&&("undefined"==typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){let e={};return S.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:$[t.fc]}})}),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(v(e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>Z[e]-Z[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){let n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));let o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!O.includes(this.options.compatibilityJSON)}}function j(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4)||void 0===arguments[4]||arguments[4],i=function(e,t,n){let r=f(e,n);return void 0!==r?r:f(t,n)}(e,t,n);return!i&&o&&"string"==typeof n&&void 0===(i=g(e,n,r))&&(i=g(t,n,r)),i}class _{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=i.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});let t=e.interpolation;this.escape=void 0!==t.escape?t.escape:h,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?d(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?d(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?d(t.nestingPrefix):t.nestingPrefixEscaped||d("$t("),this.nestingSuffix=t.nestingSuffix?d(t.nestingSuffix):t.nestingSuffixEscaped||d(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=RegExp(e,"g");let t=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=RegExp(t,"g");let n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=RegExp(n,"g")}interpolate(e,t,n,r){let o,i,a;let l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}let u=e=>{if(0>e.indexOf(this.formatSeparator)){let o=j(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}let o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(j(t,l,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();let f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,p=[{regex:this.regexpUnescape,safeValue:e=>c(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?c(this.escape(e)):c(e)}];return p.forEach(t=>{for(a=0;o=t.regex.exec(e);){let n=o[1].trim();if(void 0===(i=u(n))){if("function"==typeof f){let t=f(e,o,r);i="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else if(d){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=s(i));let l=t.safeValue(i);if(e=e.replace(o[0],l),d?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=this.maxReplaces)break}}),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){let n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;let r=e.split(RegExp(`${n}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);let a=i.match(/'/g),l=i.match(/"/g);(a&&a.length%2==0&&!l||l.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){let l=[];(o=(o={...i}).replace&&"string"!=typeof o.replace?o.replace:o).applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){let e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),l=e,c=!0}if((r=t(a.call(this,n[1].trim(),o),o))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=s(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),c&&(r=l.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}function R(e){let t={};return function(n,r,o){let i=r+JSON.stringify(o),a=t[i];return a||(a=e(v(r),o),t[i]=a),a(n)}}class A{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=i.create("formatter"),this.options=e,this.formats={number:R((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:R((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:R((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:R((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:R((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=R(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.split(this.formatSeparator),i=o.reduce((e,t)=>{let{formatName:o,formatOptions:i}=function(e){let t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){let r=e.split("(");t=r[0].toLowerCase().trim();let o=r[1].substring(0,r[1].length-1);if("currency"===t&&0>o.indexOf(":"))n.currency||(n.currency=o.trim());else if("relativetime"===t&&0>o.indexOf(":"))n.range||(n.range=o.trim());else{let e=o.split(";");e.forEach(e=>{if(!e)return;let[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,"");n[t.trim()]||(n[t.trim()]=o),"false"===o&&(n[t.trim()]=!1),"true"===o&&(n[t.trim()]=!0),isNaN(o)||(n[t.trim()]=parseInt(o,10))})}}return{formatName:t,formatOptions:n}}(t);if(this.formats[o]){let t=e;try{let a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},l=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,l,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class N extends a{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=i.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){let o={},i={},a={},l={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){let r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;let a={};this.queue.forEach(n=>{(function(e,t,n,r){let{obj:o,k:i}=c(e,t,Object);o[i]=o[i]||[],r&&(o[i]=o[i].concat(n)),r||o[i].push(n)})(n.loaded,[o],i),void 0!==n.pending[e]&&(delete n.pending[e],n.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});return}this.readingCalls++;let a=(a,l)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(a&&l&&r{this.read.call(this,e,t,n,r+1,2*o,i)},o);return}i(a,l)},l=this.backend[n].bind(this.backend);if(2===l.length){try{let n=l(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}return}return l(e,t,a)}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);let o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(null!=n&&""!==n){if(this.backend&&this.backend.create){let l={...i,isUpdate:o},s=this.backend.create.bind(this.backend);if(s.length<6)try{let o;(o=5===s.length?s(e,t,n,r,l):s(e,t,n,r))&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else s(e,t,n,r,a,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}function T(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:(e,t,n,r)=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function M(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function I(){}class F extends a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=M(e),this.services={},this.logger=i,this.modules={external:[]},!function(e){let t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})}(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));let r=T();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options={...r,...this.options,...M(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?i.init(o(this.modules.logger),this.options):i.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=A);let n=new E(this.options);this.store=new y(this.options.resources,this.options);let a=this.services;a.logger=i,a.resourceStore=this.store,a.languageUtils=n,a.pluralResolver=new P(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),t&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(a.formatter=o(t),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new _(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new N(o(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=I),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});let a=l(),s=()=>{let e=(e,t)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),a}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I,n=t,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return n();let e=[],t=t=>{if(!t||"cimode"===t)return;let n=this.services.languageUtils.toResolveHierarchy(t);n.forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};if(r)t(r);else{let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.forEach(e=>t(e))}this.options.preload&&this.options.preload.forEach(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=l();return e||(e=this.languages),t||(t=this.options.ns),n||(n=I),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&b.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;let r=l();this.emit("languageChanging",e);let o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);let n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;let o=function(e,t){let i,a;if("object"!=typeof t){for(var l=arguments.length,s=Array(l>2?l-2:0),c=2;c`${i.keyPrefix}${u}${e}`):i.keyPrefix?`${i.keyPrefix}${u}${e}`:e,r.t(a,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;let i=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return -1===n||2===n};if(t.precheck){let e=t.precheck(this,i);if(void 0!==e)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!r||i(o,e)))}loadNamespaces(e,t){let n=l();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=l();"string"==typeof e&&(e=[e]);let r=this.options.preload||[],o=e.filter(e=>0>r.indexOf(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";let t=this.services&&this.services.languageUtils||new E(T());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new F(e,t)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:I,n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},o=new F(r);return(void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new y(this.store.data,r),o.services.resourceStore=o.store),o.translator=new w(o.services,r),o.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{let{componentCls:t,width:n,notificationMarginEdge:r}=e,o=new y.E4("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),i=new y.E4("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),a=new y.E4("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:n},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${t}-top, &${t}-bottom`]:{marginInline:0},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:o}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:i}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:r,[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:a}}}};let E=e=>{let{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:o,notificationMarginBottom:i,borderRadiusLG:a,colorSuccess:l,colorInfo:s,colorWarning:c,colorError:u,colorTextHeading:f,notificationBg:d,notificationPadding:p,notificationMarginEdge:h,motionDurationMid:m,motionEaseInOut:g,fontSize:v,lineHeight:x,width:w,notificationIconSize:E,colorText:S}=e,$=`${n}-notice`,O=new y.E4("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:w},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),k=new y.E4("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:i,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}}),Z={position:"relative",width:w,maxWidth:`calc(100vw - ${2*h}px)`,marginBottom:i,marginInlineStart:"auto",padding:p,overflow:"hidden",lineHeight:x,wordWrap:"break-word",background:d,borderRadius:a,boxShadow:r,[`${n}-close-icon`]:{fontSize:v,cursor:"pointer"},[`${$}-message`]:{marginBottom:e.marginXS,color:f,fontSize:o,lineHeight:e.lineHeightLG},[`${$}-description`]:{fontSize:v,color:S},[`&${$}-closable ${$}-message`]:{paddingInlineEnd:e.paddingLG},[`${$}-with-icon ${$}-message`]:{marginBottom:e.marginXS,marginInlineStart:e.marginSM+E,fontSize:o},[`${$}-with-icon ${$}-description`]:{marginInlineStart:e.marginSM+E,fontSize:v},[`${$}-icon`]:{position:"absolute",fontSize:E,lineHeight:0,[`&-success${t}`]:{color:l},[`&-info${t}`]:{color:s},[`&-warning${t}`]:{color:c},[`&-error${t}`]:{color:u}},[`${$}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.wireframe?"transparent":e.colorFillContent}},[`${$}-btn`]:{float:"right",marginTop:e.marginSM}};return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,b.Wf)(e)),{position:"fixed",zIndex:e.zIndexPopup,marginInlineEnd:h,[`${n}-hook-holder`]:{position:"relative"},[`&${n}-top, &${n}-bottom`]:{[$]:{marginInline:"auto auto"}},[`&${n}-topLeft, &${n}-bottomLeft`]:{[$]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${n}-fade-enter, ${n}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:g,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${n}-fade-leave`]:{animationTimingFunction:g,animationFillMode:"both",animationDuration:m,animationPlayState:"paused"},[`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]:{animationName:O,animationPlayState:"running"},[`${n}-fade-leave${n}-fade-leave-active`]:{animationName:k,animationPlayState:"running"}}),C(e)),{"&-rtl":{direction:"rtl",[`${$}-btn`]:{float:"left"}}})},{[n]:{[$]:Object.assign({},Z)}},{[`${$}-pure-panel`]:Object.assign(Object.assign({},Z),{margin:0})}]};var S=(0,x.Z)("Notification",e=>{let t=e.paddingMD,n=e.paddingLG,r=(0,w.TS)(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.fontSizeLG*e.lineHeightLG,notificationCloseButtonSize:.55*e.controlHeightLG,notificationMarginBottom:e.margin,notificationPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`,notificationMarginEdge:e.marginLG,animationMaxHeight:150});return[E(r)]},e=>({zIndexPopup:e.zIndexPopupBase+50,width:384})),$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function O(e,t){return null===t||!1===t?null:t||i.createElement("span",{className:`${e}-close-x`},i.createElement(u.Z,{className:`${e}-close-icon`}))}d.Z,s.Z,c.Z,f.Z,p.Z;let k={success:s.Z,info:d.Z,error:c.Z,warning:f.Z},Z=e=>{let{prefixCls:t,icon:n,type:r,message:o,description:a,btn:l,role:s="alert"}=e,c=null;return n?c=i.createElement("span",{className:`${t}-icon`},n):r&&(c=i.createElement(k[r]||null,{className:m()(`${t}-icon`,`${t}-icon-${r}`)})),i.createElement("div",{className:m()({[`${t}-with-icon`]:c}),role:s},c,i.createElement("div",{className:`${t}-message`},o),i.createElement("div",{className:`${t}-description`},a),l&&i.createElement("div",{className:`${t}-btn`},l))};var P=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let j=e=>{let{children:t,prefixCls:n}=e,[,r]=S(n);return i.createElement(g.JB,{classNames:{list:r,notice:r}},t)},_=(e,t)=>{let{prefixCls:n,key:r}=t;return i.createElement(j,{prefixCls:n,key:r},e)},R=i.forwardRef((e,t)=>{let{top:n,bottom:r,prefixCls:o,getContainer:a,maxCount:l,rtl:s,onAllRemoved:c}=e,{getPrefixCls:u,getPopupContainer:f,notification:d}=i.useContext(v.E_),p=o||u("notification"),[h,y]=(0,g.lm)({prefixCls:p,style:e=>(function(e,t,n){let r;switch(e){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":r={left:0,top:t,bottom:"auto"};break;case"topRight":r={right:0,top:t,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n}}return r})(e,null!=n?n:24,null!=r?r:24),className:()=>m()({[`${p}-rtl`]:s}),motion:()=>({motionName:`${p}-fade`}),closable:!0,closeIcon:O(p),duration:4.5,getContainer:()=>(null==a?void 0:a())||(null==f?void 0:f())||document.body,maxCount:l,onAllRemoved:c,renderNotifications:_});return i.useImperativeHandle(t,()=>Object.assign(Object.assign({},h),{prefixCls:p,notification:d})),y});function A(e){let t=i.useRef(null),n=i.useMemo(()=>{let n=n=>{var r;if(!t.current)return;let{open:o,prefixCls:a,notification:l}=t.current,s=`${a}-notice`,{message:c,description:u,icon:f,type:d,btn:p,className:h,style:g,role:v="alert",closeIcon:y}=n,b=P(n,["message","description","icon","type","btn","className","style","role","closeIcon"]),x=O(s,y);return o(Object.assign(Object.assign({placement:null!==(r=null==e?void 0:e.placement)&&void 0!==r?r:"topRight"},b),{content:i.createElement(Z,{prefixCls:s,icon:f,type:d,message:c,description:u,btn:p,role:v}),className:m()(d&&`${s}-${d}`,h,null==l?void 0:l.className),style:Object.assign(Object.assign({},null==l?void 0:l.style),g),closeIcon:x,closable:!!x}))},r={open:n,destroy:e=>{var n,r;void 0!==e?null===(n=t.current)||void 0===n||n.close(e):null===(r=t.current)||void 0===r||r.destroy()}};return["success","info","warning","error"].forEach(e=>{r[e]=t=>n(Object.assign(Object.assign({},t),{type:e}))}),r},[]);return[n,i.createElement(R,Object.assign({key:"notification-holder"},e,{ref:t}))]}let N=null,T=e=>e(),M=[],I={};function F(){let{prefixCls:e,getContainer:t,rtl:n,maxCount:r,top:o,bottom:i}=I,a=null!=e?e:(0,l.w6)().getPrefixCls("notification"),s=(null==t?void 0:t())||document.body;return{prefixCls:a,getContainer:()=>s,rtl:n,maxCount:r,top:o,bottom:i}}let L=i.forwardRef((e,t)=>{let[n,r]=i.useState(F),[o,a]=A(n),s=(0,l.w6)(),c=s.getRootPrefixCls(),u=s.getIconPrefixCls(),f=s.getTheme(),d=()=>{r(F)};return i.useEffect(d,[]),i.useImperativeHandle(t,()=>{let e=Object.assign({},o);return Object.keys(e).forEach(t=>{e[t]=function(){return d(),o[t].apply(o,arguments)}}),{instance:e,sync:d}}),i.createElement(l.ZP,{prefixCls:c,iconPrefixCls:u,theme:f},a)});function B(){if(!N){let e=document.createDocumentFragment(),t={fragment:e};N=t,T(()=>{(0,a.s)(i.createElement(L,{ref:e=>{let{instance:n,sync:r}=e||{};Promise.resolve().then(()=>{!t.instance&&n&&(t.instance=n,t.sync=r,B())})}}),e)});return}N.instance&&(M.forEach(e=>{switch(e.type){case"open":T(()=>{N.instance.open(Object.assign(Object.assign({},I),e.config))});break;case"destroy":T(()=>{null==N||N.instance.destroy(e.key)})}}),M=[])}function D(e){M.push({type:"open",config:e}),B()}let z={open:D,destroy:function(e){M.push({type:"destroy",key:e}),B()},config:function(e){I=Object.assign(Object.assign({},I),e),T(()=>{var e;null===(e=null==N?void 0:N.sync)||void 0===e||e.call(N)})},useNotification:function(e){return A(e)},_InternalPanelDoNotUseOrYouWillBeFired:e=>{let{prefixCls:t,className:n,icon:r,type:o,message:a,description:l,btn:s,closable:c=!0,closeIcon:u}=e,f=$(e,["prefixCls","className","icon","type","message","description","btn","closable","closeIcon"]),{getPrefixCls:d}=i.useContext(v.E_),p=t||d("notification"),h=`${p}-notice`,[,y]=S(p);return i.createElement(g.qX,Object.assign({},f,{prefixCls:p,className:m()(n,y,`${h}-pure-panel`),eventKey:"pure",duration:null,closable:c,closeIcon:O(p,u),content:i.createElement(Z,{prefixCls:h,icon:r,type:o,message:a,description:l,btn:s})}))}};["success","info","warning","error"].forEach(e=>{z[e]=t=>D(Object.assign(Object.assign({},t),{type:e}))});let H=(e,t)=>e.then(e=>{let{data:n}=e;if(!n)throw Error("Network Error!");if(!n.success){if("*"===t||n.err_code&&t&&t.includes(n.err_code));else{var r;z.error({message:"Request error",description:null!==(r=null==n?void 0:n.err_msg)&&void 0!==r?r:"The interface is abnormal. Please try again later"})}}return[null,n.data,n,e]}).catch(e=>(z.error({message:"Request error",description:e.message}),[e,null,null,null])),V=()=>eR("/api/v1/chat/dialogue/scenes"),U=e=>eR("/api/v1/chat/dialogue/new",e),W=()=>e_("/api/v1/chat/db/list"),K=()=>e_("/api/v1/chat/db/support/type"),q=e=>eR("/api/v1/chat/db/delete?db_name=".concat(e)),G=e=>eR("/api/v1/chat/db/edit",e),X=e=>eR("/api/v1/chat/db/add",e),Y=e=>eR("/api/v1/chat/db/test/connect",e),J=()=>e_("/api/v1/chat/dialogue/list"),Q=()=>e_("/api/v1/model/types"),ee=e=>eR("/api/v1/chat/mode/params/list?chat_mode=".concat(e)),et=e=>e_("/api/v1/chat/dialogue/messages/history?con_uid=".concat(e)),en=e=>{let{convUid:t,chatMode:n,data:r,config:o,model:i}=e;return eR("/api/v1/chat/mode/params/file/load?conv_uid=".concat(t,"&chat_mode=").concat(n,"&model_name=").concat(i),r,{headers:{"Content-Type":"multipart/form-data"},...o})},er=e=>eR("/api/v1/chat/dialogue/delete?con_uid=".concat(e)),eo=e=>eR("/knowledge/".concat(e,"/arguments"),{}),ei=(e,t)=>eR("/knowledge/".concat(e,"/argument/save"),t),ea=()=>eR("/knowledge/space/list",{}),el=(e,t)=>eR("/knowledge/".concat(e,"/document/list"),t),es=(e,t)=>eR("/knowledge/".concat(e,"/document/add"),t),ec=e=>eR("/knowledge/space/add",e),eu=(e,t)=>eR("/knowledge/".concat(e,"/document/sync"),t),ef=(e,t)=>eR("/knowledge/".concat(e,"/document/upload"),t),ed=(e,t)=>eR("/knowledge/".concat(e,"/chunk/list"),t),ep=(e,t)=>eR("/knowledge/".concat(e,"/document/delete"),t),eh=e=>eR("/knowledge/space/delete",e),em=()=>e_("/api/v1/worker/model/list"),eg=e=>eR("/api/v1/worker/model/stop",e),ev=e=>eR("/api/v1/worker/model/start",e),ey=()=>e_("/api/v1/worker/model/params"),eb=e=>eR("/api/v1/agent/query",e),ex=e=>eR("/api/v1/agent/hub/update",null!=e?e:{channel:"",url:"",branch:"",authorization:""}),ew=e=>eR("/api/v1/agent/my",void 0,{params:{user:e}}),eC=(e,t)=>eR("/api/v1/agent/install",void 0,{params:{plugin_name:e,user:t},timeout:6e4}),eE=(e,t)=>eR("/api/v1/agent/uninstall",void 0,{params:{plugin_name:e,user:t},timeout:6e4}),eS=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return eR("/api/v1/personal/agent/upload",t,{params:{user:e},headers:{"Content-Type":"multipart/form-data"},...n})},e$=()=>e_("/api/v1/feedback/select",void 0),eO=(e,t)=>e_("/api/v1/feedback/find?conv_uid=".concat(e,"&conv_index=").concat(t),void 0),ek=e=>{let{data:t,config:n}=e;return eR("/api/v1/feedback/commit",t,{headers:{"Content-Type":"application/json"},...n})};var eZ=n(83454);let eP=o.Z.create({baseURL:null!==(r=eZ.env.API_BASE_URL)&&void 0!==r?r:""}),ej=["/db/add","/db/test/connect","/db/summary","/params/file/load","/chat/prepare","/model/start","/model/stop","/editor/sql/run","/sql/editor/submit","/editor/chart/run","/chart/editor/submit","/document/upload","/document/sync","/agent/install","/agent/uninstall","/personal/agent/upload"];eP.interceptors.request.use(e=>{let t=ej.some(t=>{var n;return null===(n=e.url)||void 0===n?void 0:n.endsWith(t)});return e.timeout=t?6e4:1e4,e});let e_=(e,t,n)=>eP.get(e,{params:t,...n}),eR=(e,t,n)=>eP.post(e,t,n)},32665:function(e,t,n){"use strict";function r(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return r}}),n(38754),n(67294),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},41219:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return p},useSearchParams:function(){return h},usePathname:function(){return m},ServerInsertedHTMLContext:function(){return s.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return s.useServerInsertedHTML},useRouter:function(){return g},useParams:function(){return v},useSelectedLayoutSegments:function(){return y},useSelectedLayoutSegment:function(){return b},redirect:function(){return c.redirect},notFound:function(){return u.notFound}});let r=n(67294),o=n(27473),i=n(35802),a=n(32665),l=n(43512),s=n(98751),c=n(96885),u=n(86323),f=Symbol("internal for urlsearchparams readonly");function d(){return Error("ReadonlyURLSearchParams cannot be modified")}class p{[Symbol.iterator](){return this[f][Symbol.iterator]()}append(){throw d()}delete(){throw d()}set(){throw d()}sort(){throw d()}constructor(e){this[f]=e,this.entries=e.entries.bind(e),this.forEach=e.forEach.bind(e),this.get=e.get.bind(e),this.getAll=e.getAll.bind(e),this.has=e.has.bind(e),this.keys=e.keys.bind(e),this.values=e.values.bind(e),this.toString=e.toString.bind(e)}}function h(){(0,a.clientHookInServerComponentError)("useSearchParams");let e=(0,r.useContext)(i.SearchParamsContext),t=(0,r.useMemo)(()=>e?new p(e):null,[e]);return t}function m(){return(0,a.clientHookInServerComponentError)("usePathname"),(0,r.useContext)(i.PathnameContext)}function g(){(0,a.clientHookInServerComponentError)("useRouter");let e=(0,r.useContext)(o.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function v(){(0,a.clientHookInServerComponentError)("useParams");let e=(0,r.useContext)(o.GlobalLayoutRouterContext);return e?function e(t,n){void 0===n&&(n={});let r=t[1];for(let t of Object.values(r)){let r=t[0],o=Array.isArray(r),i=o?r[1]:r;!i||i.startsWith("__PAGE__")||(o&&(n[r[0]]=r[1]),n=e(t,n))}return n}(e.tree):null}function y(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,r.useContext)(o.LayoutRouterContext);return function e(t,n,r,o){let i;if(void 0===r&&(r=!0),void 0===o&&(o=[]),r)i=t[1][n];else{var a;let e=t[1];i=null!=(a=e.children)?a:Object.values(e)[0]}if(!i)return o;let s=i[0],c=(0,l.getSegmentValue)(s);return!c||c.startsWith("__PAGE__")?o:(o.push(c),e(i,n,!1,o))}(t,e)}function b(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=y(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},86323:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{notFound:function(){return r},isNotFoundError:function(){return o}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function o(e){return(null==e?void 0:e.digest)===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},96885:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return l},redirect:function(){return s},isRedirectError:function(){return c},getURLFromRedirectError:function(){return u},getRedirectTypeFromError:function(){return f}});let i=n(68214),a="NEXT_REDIRECT";function l(e,t){let n=Error(a);n.digest=a+";"+t+";"+e;let r=i.requestAsyncStorage.getStore();return r&&(n.mutableCookies=r.mutableCookies),n}function s(e,t){throw void 0===t&&(t="replace"),l(e,t)}function c(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;let[t,n,r]=e.digest.split(";",3);return t===a&&("replace"===n||"push"===n)&&"string"==typeof r}function u(e){return c(e)?e.digest.split(";",3)[2]:null}function f(e){if(!c(e))throw Error("Not a redirect error");return e.digest.split(";",3)[1]}(o=r||(r={})).push="push",o.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},43512:function(e,t){"use strict";function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},29382:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PrefetchKind:function(){return n},ACTION_REFRESH:function(){return o},ACTION_NAVIGATE:function(){return i},ACTION_RESTORE:function(){return a},ACTION_SERVER_PATCH:function(){return l},ACTION_PREFETCH:function(){return s},ACTION_FAST_REFRESH:function(){return c},ACTION_SERVER_ACTION:function(){return u}});let o="refresh",i="navigate",a="restore",l="server-patch",s="prefetch",c="fast-refresh",u="server-action";(r=n||(n={})).AUTO="auto",r.FULL="full",r.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75476:function(e,t){"use strict";function n(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},69873:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return y}});let r=n(38754),o=n(61757),i=o._(n(67294)),a=r._(n(68965)),l=n(38083),s=n(2478),c=n(76226);n(59941);let u=r._(n(31720)),f={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function d(e){return void 0!==e.default}function p(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function h(e,t,n,r,o,i,a){if(!e||e["data-loaded-src"]===t)return;e["data-loaded-src"]=t;let l="decode"in e?e.decode():Promise.resolve();l.catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("blur"===n&&i(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,o=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>o,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{o=!0,t.stopPropagation()}})}(null==o?void 0:o.current)&&o.current(e)}})}function m(e){let[t,n]=i.version.split("."),r=parseInt(t,10),o=parseInt(n,10);return r>18||18===r&&o>=3?{fetchPriority:e}:{fetchpriority:e}}let g=(0,i.forwardRef)((e,t)=>{let{imgAttributes:n,heightInt:r,widthInt:o,qualityInt:a,className:l,imgStyle:s,blurStyle:c,isLazy:u,fetchPriority:f,fill:d,placeholder:p,loading:g,srcString:v,config:y,unoptimized:b,loader:x,onLoadRef:w,onLoadingCompleteRef:C,setBlurComplete:E,setShowAltText:S,onLoad:$,onError:O,...k}=e;return g=u?"lazy":g,i.default.createElement("img",{...k,...m(f),loading:g,width:o,height:r,decoding:"async","data-nimg":d?"fill":"1",className:l,style:{...s,...c},...n,ref:(0,i.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(O&&(e.src=e.src),e.complete&&h(e,v,p,w,C,E,b))},[v,p,w,C,E,O,b,t]),onLoad:e=>{let t=e.currentTarget;h(t,v,p,w,C,E,b)},onError:e=>{S(!0),"blur"===p&&E(!0),O&&O(e)}})}),v=(0,i.forwardRef)((e,t)=>{var n;let r,o,{src:h,sizes:v,unoptimized:y=!1,priority:b=!1,loading:x,className:w,quality:C,width:E,height:S,fill:$,style:O,onLoad:k,onLoadingComplete:Z,placeholder:P="empty",blurDataURL:j,fetchPriority:_,layout:R,objectFit:A,objectPosition:N,lazyBoundary:T,lazyRoot:M,...I}=e,F=(0,i.useContext)(c.ImageConfigContext),L=(0,i.useMemo)(()=>{let e=f||F||s.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[F]),B=I.loader||u.default;delete I.loader;let D="__next_img_default"in B;if(D){if("custom"===L.loader)throw Error('Image with src "'+h+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=B;B=t=>{let{config:n,...r}=t;return e(r)}}if(R){"fill"===R&&($=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[R];e&&(O={...O,...e});let t={responsive:"100vw",fill:"100vw"}[R];t&&!v&&(v=t)}let z="",H=p(E),V=p(S);if("object"==typeof(n=h)&&(d(n)||void 0!==n.src)){let e=d(h)?h.default:h;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(r=e.blurWidth,o=e.blurHeight,j=j||e.blurDataURL,z=e.src,!$){if(H||V){if(H&&!V){let t=H/e.width;V=Math.round(e.height*t)}else if(!H&&V){let t=V/e.height;H=Math.round(e.width*t)}}else H=e.width,V=e.height}}let U=!b&&("lazy"===x||void 0===x);(!(h="string"==typeof h?h:z)||h.startsWith("data:")||h.startsWith("blob:"))&&(y=!0,U=!1),L.unoptimized&&(y=!0),D&&h.endsWith(".svg")&&!L.dangerouslyAllowSVG&&(y=!0),b&&(_="high");let[W,K]=(0,i.useState)(!1),[q,G]=(0,i.useState)(!1),X=p(C),Y=Object.assign($?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:A,objectPosition:N}:{},q?{}:{color:"transparent"},O),J="blur"===P&&j&&!W?{backgroundSize:Y.objectFit||"cover",backgroundPosition:Y.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:'url("data:image/svg+xml;charset=utf-8,'+(0,l.getImageBlurSvg)({widthInt:H,heightInt:V,blurWidth:r,blurHeight:o,blurDataURL:j,objectFit:Y.objectFit})+'")'}:{},Q=function(e){let{config:t,src:n,unoptimized:r,width:o,quality:i,sizes:a,loader:l}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:s,kind:c}=function(e,t,n){let{deviceSizes:r,allSizes:o}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:o.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:o,kind:"w"}}if("number"!=typeof t)return{widths:r,kind:"w"};let i=[...new Set([t,2*t].map(e=>o.find(t=>t>=e)||o[o.length-1]))];return{widths:i,kind:"x"}}(t,o,a),u=s.length-1;return{sizes:a||"w"!==c?a:"100vw",srcSet:s.map((e,r)=>l({config:t,src:n,quality:i,width:e})+" "+("w"===c?e:r+1)+c).join(", "),src:l({config:t,src:n,quality:i,width:s[u]})}}({config:L,src:h,unoptimized:y,width:H,quality:X,sizes:v,loader:B}),ee=h,et=(0,i.useRef)(k);(0,i.useEffect)(()=>{et.current=k},[k]);let en=(0,i.useRef)(Z);(0,i.useEffect)(()=>{en.current=Z},[Z]);let er={isLazy:U,imgAttributes:Q,heightInt:V,widthInt:H,qualityInt:X,className:w,imgStyle:Y,blurStyle:J,loading:x,config:L,fetchPriority:_,fill:$,unoptimized:y,placeholder:P,loader:B,srcString:ee,onLoadRef:et,onLoadingCompleteRef:en,setBlurComplete:K,setShowAltText:G,...I};return i.default.createElement(i.default.Fragment,null,i.default.createElement(g,{...er,ref:t}),b?i.default.createElement(a.default,null,i.default.createElement("link",{key:"__nimg-"+Q.src+Q.srcSet+Q.sizes,rel:"preload",as:"image",href:Q.srcSet?void 0:Q.src,imageSrcSet:Q.srcSet,imageSizes:Q.sizes,crossOrigin:I.crossOrigin,referrerPolicy:I.referrerPolicy,...m(_)})):null)}),y=v;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9940:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return x}});let r=n(38754),o=r._(n(67294)),i=n(65722),a=n(65723),l=n(28904),s=n(95514),c=n(27521),u=n(44293),f=n(27473),d=n(81307),p=n(75476),h=n(66318),m=n(29382),g=new Set;function v(e,t,n,r,o,i){if(!i&&!(0,a.isLocalURL)(t))return;if(!r.bypassPrefetchedCheck){let o=void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0,i=t+"%"+n+"%"+o;if(g.has(i))return;g.add(i)}let l=i?e.prefetch(t,o):e.prefetch(t,n,r);Promise.resolve(l).catch(e=>{})}function y(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let b=o.default.forwardRef(function(e,t){let n,r;let{href:l,as:g,children:b,prefetch:x=null,passHref:w,replace:C,shallow:E,scroll:S,locale:$,onClick:O,onMouseEnter:k,onTouchStart:Z,legacyBehavior:P=!1,...j}=e;n=b,P&&("string"==typeof n||"number"==typeof n)&&(n=o.default.createElement("a",null,n));let _=!1!==x,R=null===x?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,A=o.default.useContext(u.RouterContext),N=o.default.useContext(f.AppRouterContext),T=null!=A?A:N,M=!A,{href:I,as:F}=o.default.useMemo(()=>{if(!A){let e=y(l);return{href:e,as:g?y(g):e}}let[e,t]=(0,i.resolveHref)(A,l,!0);return{href:e,as:g?(0,i.resolveHref)(A,g):t||e}},[A,l,g]),L=o.default.useRef(I),B=o.default.useRef(F);P&&(r=o.default.Children.only(n));let D=P?r&&"object"==typeof r&&r.ref:t,[z,H,V]=(0,d.useIntersection)({rootMargin:"200px"}),U=o.default.useCallback(e=>{(B.current!==F||L.current!==I)&&(V(),B.current=F,L.current=I),z(e),D&&("function"==typeof D?D(e):"object"==typeof D&&(D.current=e))},[F,D,I,V,z]);o.default.useEffect(()=>{T&&H&&_&&v(T,I,F,{locale:$},{kind:R},M)},[F,I,H,$,_,null==A?void 0:A.locale,T,M,R]);let W={ref:U,onClick(e){P||"function"!=typeof O||O(e),P&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),T&&!e.defaultPrevented&&function(e,t,n,r,i,l,s,c,u,f){let{nodeName:d}=e.currentTarget,p="A"===d.toUpperCase();if(p&&(function(e){let t=e.currentTarget,n=t.getAttribute("target");return n&&"_self"!==n||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!u&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let h=()=>{"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:l,locale:c,scroll:s}):t[i?"replace":"push"](r||n,{forceOptimisticNavigation:!f})};u?o.default.startTransition(h):h()}(e,T,I,F,C,E,S,$,M,_)},onMouseEnter(e){P||"function"!=typeof k||k(e),P&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),T&&(_||!M)&&v(T,I,F,{locale:$,priority:!0,bypassPrefetchedCheck:!0},{kind:R},M)},onTouchStart(e){P||"function"!=typeof Z||Z(e),P&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),T&&(_||!M)&&v(T,I,F,{locale:$,priority:!0,bypassPrefetchedCheck:!0},{kind:R},M)}};if((0,s.isAbsoluteUrl)(F))W.href=F;else if(!P||w||"a"===r.type&&!("href"in r.props)){let e=void 0!==$?$:null==A?void 0:A.locale,t=(null==A?void 0:A.isLocaleDomain)&&(0,p.getDomainLocale)(F,e,null==A?void 0:A.locales,null==A?void 0:A.domainLocales);W.href=t||(0,h.addBasePath)((0,c.addLocale)(F,e,null==A?void 0:A.defaultLocale))}return P?o.default.cloneElement(r,W):o.default.createElement("a",{...j,...W},n)}),x=b;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return s}});let r=n(67294),o=n(82997),i="function"==typeof IntersectionObserver,a=new Map,l=[];function s(e){let{rootRef:t,rootMargin:n,disabled:s}=e,c=s||!i,[u,f]=(0,r.useState)(!1),d=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{d.current=e},[]);(0,r.useEffect)(()=>{if(i){if(c||u)return;let e=d.current;if(e&&e.tagName){let r=function(e,t,n){let{id:r,observer:o,elements:i}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=l.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=a.get(r)))return t;let o=new Map,i=new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e);return t={id:n,observer:i,elements:o},l.push(n),a.set(n,t),t}(n);return i.set(e,t),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),a.delete(r);let e=l.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&l.splice(e,1)}}}(e,e=>e&&f(e),{root:null==t?void 0:t.current,rootMargin:n});return r}}else if(!u){let e=(0,o.requestIdleCallback)(()=>f(!0));return()=>(0,o.cancelIdleCallback)(e)}},[c,n,t,u,d.current]);let h=(0,r.useCallback)(()=>{f(!1)},[]);return[p,u,h]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38083:function(e,t){"use strict";function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:o,blurDataURL:i,objectFit:a}=e,l=r||t,s=o||n,c=i.startsWith("data:image/jpeg")?"%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='1 1'/%3E%3C/feComponentTransfer%3E%":"";return l&&s?"%3Csvg xmlns='http%3A//www.w3.org/2000/svg' viewBox='0 0 "+l+" "+s+"'%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+(r&&o?"1":"20")+"'/%3E"+c+"%3C/filter%3E%3Cimage preserveAspectRatio='none' filter='url(%23b)' x='0' y='0' height='100%25' width='100%25' href='"+i+"'/%3E%3C/svg%3E":"%3Csvg xmlns='http%3A//www.w3.org/2000/svg'%3E%3Cimage style='filter:blur(20px)' preserveAspectRatio='"+("contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none")+"' x='0' y='0' height='100%25' width='100%25' href='"+i+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},31720:function(e,t){"use strict";function n(e){let{config:t,src:n,width:r,quality:o}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(o||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},98751:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return i},useServerInsertedHTML:function(){return a}});let r=n(61757),o=r._(n(67294)),i=o.default.createContext(null);function a(e){let t=(0,o.useContext)(i);t&&t(e)}},37262:function(e,t,n){"use strict";let r,o;n.r(t),n.d(t,{default:function(){return eM}});var i=n(85893),a=n(67294),l=n(41468),s=n(50489),c=n(98399),u=function(){return(0,i.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,i.jsx)("path",{d:"M593.054 120.217C483.656 148.739 402.91 248.212 402.91 366.546c0 140.582 113.962 254.544 254.544 254.544 118.334 0 217.808-80.746 246.328-190.144C909.17 457.12 912 484.23 912 512c0 220.914-179.086 400-400 400S112 732.914 112 512s179.086-400 400-400c27.77 0 54.88 2.83 81.054 8.217z","p-id":"5941"})})},f=function(){return(0,i.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,i.jsx)("path",{d:"M554.6 64h-85.4v128h85.4V64z m258.2 87.4L736 228.2l59.8 59.8 76.8-76.8-59.8-59.8z m-601.6 0l-59.8 59.8 76.8 76.8 59.8-59.8-76.8-76.8zM512 256c-140.8 0-256 115.2-256 256s115.2 256 256 256 256-115.2 256-256-115.2-256-256-256z m448 213.4h-128v85.4h128v-85.4z m-768 0H64v85.4h128v-85.4zM795.8 736L736 795.8l76.8 76.8 59.8-59.8-76.8-76.8z m-567.6 0l-76.8 76.8 59.8 59.8 76.8-76.8-59.8-59.8z m326.4 96h-85.4v128h85.4v-128z","p-id":"7802"})})},d=n(59766),p=n(87462),h=n(63366),m=n(71387),g=n(70917);function v(e){let{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>t(null==e||0===Object.keys(e).length?n:e):t;return(0,i.jsx)(g.xB,{styles:r})}var y=n(56760),b=n(71927);let x="mode",w="color-scheme",C="data-color-scheme";function E(e){if("undefined"!=typeof window&&"system"===e){let e=window.matchMedia("(prefers-color-scheme: dark)");return e.matches?"dark":"light"}}function S(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function $(e,t){let n;if("undefined"!=typeof window){try{(n=localStorage.getItem(e)||void 0)||localStorage.setItem(e,t)}catch(e){}return n||t}}let O=["colorSchemes","components","generateCssVars","cssVarPrefix"];var k=n(1812),Z=n(13951),P=n(2548);let{CssVarsProvider:j,useColorScheme:_,getInitColorSchemeScript:R}=function(e){let{themeId:t,theme:n={},attribute:r=C,modeStorageKey:o=x,colorSchemeStorageKey:l=w,defaultMode:s="light",defaultColorScheme:c,disableTransitionOnChange:u=!1,resolveTheme:f,excludeVariablesFromRoot:g}=e;n.colorSchemes&&("string"!=typeof c||n.colorSchemes[c])&&("object"!=typeof c||n.colorSchemes[null==c?void 0:c.light])&&("object"!=typeof c||n.colorSchemes[null==c?void 0:c.dark])||console.error(`MUI: \`${c}\` does not exist in \`theme.colorSchemes\`.`);let k=a.createContext(void 0),Z="string"==typeof c?c:c.light,P="string"==typeof c?c:c.dark;return{CssVarsProvider:function({children:e,theme:m=n,modeStorageKey:C=o,colorSchemeStorageKey:Z=l,attribute:P=r,defaultMode:j=s,defaultColorScheme:_=c,disableTransitionOnChange:R=u,storageWindow:A="undefined"==typeof window?void 0:window,documentNode:N="undefined"==typeof document?void 0:document,colorSchemeNode:T="undefined"==typeof document?void 0:document.documentElement,colorSchemeSelector:M=":root",disableNestedContext:I=!1,disableStyleSheetGeneration:F=!1}){let L=a.useRef(!1),B=(0,y.Z)(),D=a.useContext(k),z=!!D&&!I,H=m[t],V=H||m,{colorSchemes:U={},components:W={},generateCssVars:K=()=>({vars:{},css:{}}),cssVarPrefix:q}=V,G=(0,h.Z)(V,O),X=Object.keys(U),Y="string"==typeof _?_:_.light,J="string"==typeof _?_:_.dark,{mode:Q,setMode:ee,systemMode:et,lightColorScheme:en,darkColorScheme:er,colorScheme:eo,setColorScheme:ei}=function(e){let{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=x,colorSchemeStorageKey:l=w,storageWindow:s="undefined"==typeof window?void 0:window}=e,c=o.join(","),[u,f]=a.useState(()=>{let e=$(i,t),o=$(`${l}-light`,n),a=$(`${l}-dark`,r);return{mode:e,systemMode:E(e),lightColorScheme:o,darkColorScheme:a}}),d=S(u,e=>"light"===e?u.lightColorScheme:"dark"===e?u.darkColorScheme:void 0),h=a.useCallback(e=>{f(n=>{if(e===n.mode)return n;let r=e||t;try{localStorage.setItem(i,r)}catch(e){}return(0,p.Z)({},n,{mode:r,systemMode:E(r)})})},[i,t]),m=a.useCallback(e=>{e?"string"==typeof e?e&&!c.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):f(t=>{let n=(0,p.Z)({},t);return S(t,t=>{try{localStorage.setItem(`${l}-${t}`,e)}catch(e){}"light"===t&&(n.lightColorScheme=e),"dark"===t&&(n.darkColorScheme=e)}),n}):f(t=>{let o=(0,p.Z)({},t),i=null===e.light?n:e.light,a=null===e.dark?r:e.dark;if(i){if(c.includes(i)){o.lightColorScheme=i;try{localStorage.setItem(`${l}-light`,i)}catch(e){}}else console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)}if(a){if(c.includes(a)){o.darkColorScheme=a;try{localStorage.setItem(`${l}-dark`,a)}catch(e){}}else console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)}return o}):f(e=>{try{localStorage.setItem(`${l}-light`,n),localStorage.setItem(`${l}-dark`,r)}catch(e){}return(0,p.Z)({},e,{lightColorScheme:n,darkColorScheme:r})})},[c,l,n,r]),g=a.useCallback(e=>{"system"===u.mode&&f(t=>(0,p.Z)({},t,{systemMode:null!=e&&e.matches?"dark":"light"}))},[u.mode]),v=a.useRef(g);return v.current=g,a.useEffect(()=>{let e=(...e)=>v.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>t.removeListener(e)},[]),a.useEffect(()=>{let e=e=>{let n=e.newValue;"string"==typeof e.key&&e.key.startsWith(l)&&(!n||c.match(n))&&(e.key.endsWith("light")&&m({light:n}),e.key.endsWith("dark")&&m({dark:n})),e.key===i&&(!n||["light","dark","system"].includes(n))&&h(n||t)};if(s)return s.addEventListener("storage",e),()=>s.removeEventListener("storage",e)},[m,h,i,l,c,t,s]),(0,p.Z)({},u,{colorScheme:d,setMode:h,setColorScheme:m})}({supportedColorSchemes:X,defaultLightColorScheme:Y,defaultDarkColorScheme:J,modeStorageKey:C,colorSchemeStorageKey:Z,defaultMode:j,storageWindow:A}),ea=Q,el=eo;z&&(ea=D.mode,el=D.colorScheme);let es=ea||("system"===j?s:j),ec=el||("dark"===es?J:Y),{css:eu,vars:ef}=K(),ed=(0,p.Z)({},G,{components:W,colorSchemes:U,cssVarPrefix:q,vars:ef,getColorSchemeSelector:e=>`[${P}="${e}"] &`}),ep={},eh={};Object.entries(U).forEach(([e,t])=>{let{css:n,vars:r}=K(e);ed.vars=(0,d.Z)(ed.vars,r),e===ec&&(Object.keys(t).forEach(e=>{t[e]&&"object"==typeof t[e]?ed[e]=(0,p.Z)({},ed[e],t[e]):ed[e]=t[e]}),ed.palette&&(ed.palette.colorScheme=e));let o="string"==typeof _?_:"dark"===j?_.dark:_.light;if(e===o){if(g){let t={};g(q).forEach(e=>{t[e]=n[e],delete n[e]}),ep[`[${P}="${e}"]`]=t}ep[`${M}, [${P}="${e}"]`]=n}else eh[`${":root"===M?"":M}[${P}="${e}"]`]=n}),ed.vars=(0,d.Z)(ed.vars,ef),a.useEffect(()=>{el&&T&&T.setAttribute(P,el)},[el,P,T]),a.useEffect(()=>{let e;if(R&&L.current&&N){let t=N.createElement("style");t.appendChild(N.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),N.head.appendChild(t),window.getComputedStyle(N.body),e=setTimeout(()=>{N.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[el,R,N]),a.useEffect(()=>(L.current=!0,()=>{L.current=!1}),[]);let em=a.useMemo(()=>({mode:ea,systemMode:et,setMode:ee,lightColorScheme:en,darkColorScheme:er,colorScheme:el,setColorScheme:ei,allColorSchemes:X}),[X,el,er,en,ea,ei,ee,et]),eg=!0;(F||z&&(null==B?void 0:B.cssVarPrefix)===q)&&(eg=!1);let ev=(0,i.jsxs)(a.Fragment,{children:[eg&&(0,i.jsxs)(a.Fragment,{children:[(0,i.jsx)(v,{styles:{[M]:eu}}),(0,i.jsx)(v,{styles:ep}),(0,i.jsx)(v,{styles:eh})]}),(0,i.jsx)(b.Z,{themeId:H?t:void 0,theme:f?f(ed):ed,children:e})]});return z?ev:(0,i.jsx)(k.Provider,{value:em,children:ev})},useColorScheme:()=>{let e=a.useContext(k);if(!e)throw Error((0,m.Z)(19));return e},getInitColorSchemeScript:e=>(function(e){let{defaultMode:t="light",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=x,colorSchemeStorageKey:a=w,attribute:l=C,colorSchemeNode:s="document.documentElement"}=e||{};return(0,i.jsx)("script",{dangerouslySetInnerHTML:{__html:`(function() { try { var mode = localStorage.getItem('${o}') || '${t}'; var cssColorScheme = mode; var colorScheme = ''; diff --git a/pilot/server/static/_next/static/chunks/pages/database-2066e1a37e227df6.js b/pilot/server/static/_next/static/chunks/pages/database-2066e1a37e227df6.js new file mode 100644 index 000000000..45ac1569a --- /dev/null +++ b/pilot/server/static/_next/static/chunks/pages/database-2066e1a37e227df6.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[498],{55286:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/database",function(){return s(92572)}])},45247:function(e,a,s){"use strict";var l=s(85893),t=s(50888);a.Z=function(e){let{visible:a}=e;return a?(0,l.jsx)("div",{className:"absolute w-full h-full top-0 left-0 flex justify-center items-center z-10 bg-white dark:bg-black bg-opacity-50 dark:bg-opacity-50 backdrop-blur-sm text-3xl animate-fade animate-duration-200",children:(0,l.jsx)(t.Z,{})}):null}},92572:function(e,a,s){"use strict";s.r(a),s.d(a,{default:function(){return q},isFileDb:function(){return F}});var l=s(85893),t=s(67294),n=s(2093),r=s(12069),i=s(2453),c=s(71577),o=s(40411),d=s(85265),b=s(85813),m=s(32983),u=s(39479),p=s(51009),h=s(59566),f=s(48928),x=s(50489),y=s(67421),j=function(e){let{open:a,choiceDBType:s,dbTypeList:n,editValue:o,dbNames:d,onClose:b,onSuccess:m}=e,[j,g]=(0,t.useState)(!1),{t:w}=(0,y.$G)(),[_]=u.Z.useForm(),N=u.Z.useWatch("db_type",_),k=(0,t.useMemo)(()=>F(n,N),[n,N]);(0,t.useEffect)(()=>{s&&_.setFieldValue("db_type",s)},[s]),(0,t.useEffect)(()=>{o&&_.setFieldsValue({...o})},[o]),(0,t.useEffect)(()=>{a||_.resetFields()},[a]);let Z=async e=>{let{db_host:a,db_path:s,db_port:l,...t}=e;if(!o&&d.some(e=>e===t.db_name)){i.ZP.error("The database already exists!");return}let n={db_host:k?void 0:a,db_port:k?void 0:l,file_path:k?s:void 0,...t};g(!0);try{let[e]=await (0,x.Vx)((0,x.KS)(n));if(e)return;let[a]=await (0,x.Vx)((o?x.mR:x.b_)(n));if(a){i.ZP.error(a.message);return}i.ZP.success("success"),null==m||m()}catch(e){i.ZP.error(e.message)}finally{g(!1)}},v=(0,t.useMemo)(()=>!!o||!!s,[o,s]);return(0,l.jsx)(r.default,{open:a,width:400,title:w(o?"Edit":"create_database"),maskClosable:!1,footer:null,onCancel:b,children:(0,l.jsxs)(u.Z,{form:_,className:"pt-2",labelCol:{span:6},labelAlign:"left",onFinish:Z,children:[(0,l.jsx)(u.Z.Item,{name:"db_type",label:"DB Type",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(p.default,{"aria-readonly":v,disabled:v,options:n})}),(0,l.jsx)(u.Z.Item,{name:"db_name",label:"DB Name",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(h.default,{readOnly:!!o,disabled:!!o})}),!0===k&&(0,l.jsx)(u.Z.Item,{name:"db_path",label:"Path",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(h.default,{})}),!1===k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.Z.Item,{name:"db_user",label:"Username",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(h.default,{})}),(0,l.jsx)(u.Z.Item,{name:"db_pwd",label:"Password",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(h.default,{type:"password"})}),(0,l.jsx)(u.Z.Item,{name:"db_host",label:"Host",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(h.default,{})}),(0,l.jsx)(u.Z.Item,{name:"db_port",label:"Port",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(f.Z,{min:1,step:1,max:65535})})]}),(0,l.jsx)(u.Z.Item,{name:"comment",label:"Remark",className:"mb-3",children:(0,l.jsx)(h.default,{})}),(0,l.jsxs)(u.Z.Item,{className:"flex flex-row-reverse pt-1 mb-0",children:[(0,l.jsx)(c.ZP,{htmlType:"submit",type:"primary",size:"middle",className:"mr-1",loading:j,children:"Save"}),(0,l.jsx)(c.ZP,{size:"middle",onClick:b,children:"Cancel"})]})]})})},g=s(83062),w=s(25675),_=s.n(w),N=function(e){let{src:a,label:s}=e;return(0,l.jsx)(_(),{className:"w-11 h-11 rounded-full mr-4 border border-gray-200 object-contain bg-white",width:44,height:44,src:a,alt:s||"db-icon"})},k=function(e){let{info:a,onClick:s}=e,n=(0,t.useCallback)(()=>{a.disabled||null==s||s()},[a.disabled,s]);return(0,l.jsxs)("div",{className:"relative flex flex-col py-4 px-4 w-72 h-32 cursor-pointer rounded-lg justify-between text-black bg-white border-gray-200 border hover:shadow-md dark:border-gray-600 dark:bg-black dark:text-white dark:hover:border-white transition-all ".concat(a.disabled?"grayscale cursor-no-drop":""),onClick:n,children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(N,{src:a.icon,label:a.label}),(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)("h2",{className:"text-sm font-semibold",children:a.label})})]}),(0,l.jsx)(g.Z,{title:a.desc,children:(0,l.jsx)("p",{className:"text-sm text-gray-500 font-normal line-clamp-2",children:a.desc})})]})},Z=s(24969),v=s(36531),C=s(27704),S=s(45247);let P={mysql:{label:"MySQL",icon:"/icons/mysql.png",desc:"Fast, reliable, scalable open-source relational database management system."},mssql:{label:"MSSQL",icon:"/icons/mssql.png",desc:"Powerful, scalable, secure relational database system by Microsoft."},duckdb:{label:"DuckDB",icon:"/icons/duckdb.png",desc:"In-memory analytical database with efficient query processing."},sqlite:{label:"Sqlite",icon:"/icons/sqlite.png",desc:"Lightweight embedded relational database with simplicity and portability."},clickhouse:{label:"ClickHouse",icon:"/icons/clickhouse.png",desc:"Columnar database for high-performance analytics and real-time queries."},oracle:{label:"Oracle",icon:"/icons/oracle.png",desc:"Robust, scalable, secure relational database widely used in enterprises."},access:{label:"Access",icon:"/icons/access.png",desc:"Easy-to-use relational database for small-scale applications by Microsoft."},mongodb:{label:"MongoDB",icon:"/icons/mongodb.png",desc:"Flexible, scalable NoSQL document database for web and mobile apps."},db2:{label:"DB2",icon:"/icons/db2.png",desc:"Scalable, secure relational database system developed by IBM."},hbase:{label:"HBase",icon:"/icons/hbase.png",desc:"Distributed, scalable NoSQL database for large structured/semi-structured data."},redis:{label:"Redis",icon:"/icons/redis.png",desc:"Fast, versatile in-memory data structure store as cache, DB, or broker."},cassandra:{label:"Cassandra",icon:"/icons/cassandra.png",desc:"Scalable, fault-tolerant distributed NoSQL database for large data."},couchbase:{label:"Couchbase",icon:"/icons/couchbase.png",desc:"High-performance NoSQL document database with distributed architecture."},postgresql:{label:"PostgreSQL",icon:"/icons/postgresql.png",desc:"Powerful open-source relational database with extensibility and SQL standards."},spark:{label:"Spark",icon:"/icons/spark.png",desc:"Unified engine for large-scale data analytics."}};function F(e,a){var s;return null===(s=e.find(e=>e.value===a))||void 0===s?void 0:s.isFileDb}var q=function(){let[e,a]=(0,t.useState)([]),[s,u]=(0,t.useState)([]),[p,h]=(0,t.useState)(!1),[f,y]=(0,t.useState)({open:!1}),[g,w]=(0,t.useState)({open:!1}),_=async()=>{let[e,a]=await (0,x.Vx)((0,x.Jm)());u(null!=a?a:[])},N=async()=>{h(!0);let[e,s]=await (0,x.Vx)((0,x.Bw)());a(null!=s?s:[]),h(!1)},F=(0,t.useMemo)(()=>{let e=s.map(e=>{let{db_type:a,is_file_db:s}=e;return{...P[a],value:a,isFileDb:s}}),a=Object.keys(P).filter(a=>!e.some(e=>e.value===a)).map(e=>({...P[e],value:P[e].label,disabled:!0}));return[...e,...a]},[s]),q=e=>{y({open:!0,info:e})},D=e=>{r.default.confirm({title:"Tips",content:"Do you Want to delete the ".concat(e.db_name,"?"),onOk:()=>new Promise(async(a,s)=>{try{let[l]=await (0,x.Vx)((0,x.J5)(e.db_name));if(l){i.ZP.error(l.message),s();return}i.ZP.success("success"),N(),a()}catch(e){s()}})})},E=(0,t.useMemo)(()=>{let a=F.reduce((a,s)=>(a[s.value]=e.filter(e=>e.db_type===s.value),a),{});return a},[e,F]);(0,n.Z)(async()=>{await N(),await _()},[]);let T=a=>{let s=e.filter(e=>e.db_type===a.value);w({open:!0,dbList:s,name:a.label,type:a.value})};return(0,l.jsxs)("div",{className:"relative p-6 px-12 bg-[#FAFAFA] dark:bg-transparent min-h-full overflow-y-auto",children:[(0,l.jsx)(S.Z,{visible:p}),(0,l.jsx)("div",{className:"mb-4",children:(0,l.jsx)(c.ZP,{type:"primary",className:"flex items-center",icon:(0,l.jsx)(Z.Z,{}),onClick:()=>{y({open:!0})},children:"Create"})}),(0,l.jsx)("div",{className:"flex flex-wrap",children:F.map(e=>(0,l.jsx)(o.Z,{className:"mr-4 mb-4",count:E[e.value].length,children:(0,l.jsx)(k,{info:e,onClick:()=>{T(e)}})},e.value))}),(0,l.jsx)(j,{open:f.open,dbTypeList:F,choiceDBType:f.dbType,editValue:f.info,dbNames:e.map(e=>e.db_name),onSuccess:()=>{y({open:!1}),N()},onClose:()=>{y({open:!1})}}),(0,l.jsx)(d.Z,{title:g.name,placement:"right",onClose:()=>{w({open:!1})},open:g.open,children:g.type&&E[g.type]&&E[g.type].length?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.ZP,{type:"primary",className:"mb-4 flex items-center",icon:(0,l.jsx)(Z.Z,{}),onClick:()=>{y({open:!0,dbType:g.type})},children:"Create"}),E[g.type].map(e=>(0,l.jsxs)(b.Z,{title:e.db_name,extra:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v.Z,{className:"mr-2",style:{color:"#1b7eff"},onClick:()=>{q(e)}}),(0,l.jsx)(C.Z,{style:{color:"#ff1b2e"},onClick:()=>{D(e)}})]}),className:"mb-4",children:[e.db_path?(0,l.jsxs)("p",{children:["path: ",e.db_path]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("p",{children:["host: ",e.db_host]}),(0,l.jsxs)("p",{children:["username: ",e.db_user]}),(0,l.jsxs)("p",{children:["port: ",e.db_port]})]}),(0,l.jsxs)("p",{children:["remark: ",e.comment]})]},e.db_name))]}):(0,l.jsx)(m.Z,{image:m.Z.PRESENTED_IMAGE_DEFAULT,children:(0,l.jsx)(c.ZP,{type:"primary",className:"flex items-center mx-auto",icon:(0,l.jsx)(Z.Z,{}),onClick:()=>{y({open:!0,dbType:g.type})},children:"Create Now"})})})]})}}},function(e){e.O(0,[44,479,9,442,813,411,928,643,774,888,179],function(){return e(e.s=55286)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/pilot/server/static/_next/static/chunks/pages/database-ed7e37a49de751e1.js b/pilot/server/static/_next/static/chunks/pages/database-ed7e37a49de751e1.js deleted file mode 100644 index 16a5e1921..000000000 --- a/pilot/server/static/_next/static/chunks/pages/database-ed7e37a49de751e1.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[498],{55286:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/database",function(){return s(92572)}])},45247:function(e,a,s){"use strict";var l=s(85893),t=s(50888);a.Z=function(e){let{visible:a}=e;return a?(0,l.jsx)("div",{className:"absolute w-full h-full top-0 left-0 flex justify-center items-center z-10 bg-white dark:bg-black bg-opacity-50 dark:bg-opacity-50 backdrop-blur-sm text-3xl animate-fade animate-duration-200",children:(0,l.jsx)(t.Z,{})}):null}},92572:function(e,a,s){"use strict";s.r(a),s.d(a,{default:function(){return q},isFileDb:function(){return F}});var l=s(85893),t=s(67294),n=s(2093),r=s(12069),i=s(2453),c=s(71577),o=s(40411),d=s(85265),b=s(85813),m=s(32983),u=s(39479),p=s(51009),h=s(59566),x=s(48928),f=s(50489),y=s(67421),g=function(e){let{open:a,choiceDBType:s,dbTypeList:n,editValue:o,dbNames:d,onClose:b,onSuccess:m}=e,[g,j]=(0,t.useState)(!1),{t:w}=(0,y.$G)(),[N]=u.Z.useForm(),_=u.Z.useWatch("db_type",N),k=(0,t.useMemo)(()=>F(n,_),[n,_]);(0,t.useEffect)(()=>{s&&N.setFieldValue("db_type",s)},[s]),(0,t.useEffect)(()=>{o&&N.setFieldsValue({...o})},[o]),(0,t.useEffect)(()=>{a||N.resetFields()},[a]);let Z=async e=>{let{db_host:a,db_path:s,db_port:l,...t}=e;if(!o&&d.some(e=>e===t.db_name)){i.ZP.error("The database already exists!");return}let n={db_host:k?void 0:a,db_port:k?void 0:l,file_path:k?s:void 0,...t};j(!0);try{let[e]=await (0,f.Vx)((0,f.KS)(n));if(e)return;let[a]=await (0,f.Vx)((o?f.mR:f.b_)(n));if(a){i.ZP.error(a.message);return}i.ZP.success("success"),null==m||m()}catch(e){i.ZP.error(e.message)}finally{j(!1)}},v=(0,t.useMemo)(()=>!!o||!!s,[o,s]);return(0,l.jsx)(r.default,{open:a,width:400,title:w(o?"Edit":"create_database"),maskClosable:!1,footer:null,onCancel:b,children:(0,l.jsxs)(u.Z,{form:N,className:"pt-2",labelCol:{span:6},labelAlign:"left",onFinish:Z,children:[(0,l.jsx)(u.Z.Item,{name:"db_type",label:"DB Type",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(p.default,{"aria-readonly":v,disabled:v,options:n})}),(0,l.jsx)(u.Z.Item,{name:"db_name",label:"DB Name",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(h.default,{readOnly:!!o,disabled:!!o})}),!0===k&&(0,l.jsx)(u.Z.Item,{name:"db_path",label:"Path",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(h.default,{})}),!1===k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.Z.Item,{name:"db_user",label:"Username",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(h.default,{})}),(0,l.jsx)(u.Z.Item,{name:"db_pwd",label:"Password",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(h.default,{type:"password"})}),(0,l.jsx)(u.Z.Item,{name:"db_host",label:"Host",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(h.default,{})}),(0,l.jsx)(u.Z.Item,{name:"db_port",label:"Port",className:"mb-3",rules:[{required:!0}],children:(0,l.jsx)(x.Z,{min:1,step:1,max:65535})})]}),(0,l.jsx)(u.Z.Item,{name:"comment",label:"Remark",className:"mb-3",children:(0,l.jsx)(h.default,{})}),(0,l.jsxs)(u.Z.Item,{className:"flex flex-row-reverse pt-1 mb-0",children:[(0,l.jsx)(c.ZP,{htmlType:"submit",type:"primary",size:"middle",className:"mr-1",loading:g,children:"Save"}),(0,l.jsx)(c.ZP,{size:"middle",onClick:b,children:"Cancel"})]})]})})},j=s(83062),w=s(25675),N=s.n(w),_=function(e){let{src:a,label:s}=e;return(0,l.jsx)(N(),{className:"w-11 h-11 rounded-full mr-4 border border-gray-200 object-contain bg-white",width:44,height:44,src:a,alt:s||"db-icon"})},k=function(e){let{info:a,onClick:s}=e,n=(0,t.useCallback)(()=>{a.disabled||null==s||s()},[a.disabled,s]);return(0,l.jsxs)("div",{className:"relative flex flex-col py-4 px-4 w-72 h-32 cursor-pointer rounded-lg justify-between text-black bg-white border-gray-200 border hover:shadow-md dark:border-gray-600 dark:bg-black dark:text-white dark:hover:border-white transition-all ".concat(a.disabled?"grayscale":""),onClick:n,children:[(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(_,{src:a.icon,label:a.label}),(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold",children:a.label}),a.disabled&&(0,l.jsx)("div",{className:"mt-[2px] rounded-full font-normal bg-gray-100 text-xs h-5 flex items-center px-2 dark:bg-gray-800",children:"Comming soon"})]})]}),(0,l.jsx)(j.Z,{title:a.desc,children:(0,l.jsx)("p",{className:"text-sm text-gray-500 font-normal line-clamp-2",children:a.desc})})]})},Z=s(24969),v=s(36531),C=s(27704),S=s(45247);let P={mysql:{label:"MySQL",icon:"/icons/mysql.png",desc:"Fast, reliable, scalable open-source relational database management system."},mssql:{label:"MSSQL",icon:"/icons/mssql.png",desc:"Powerful, scalable, secure relational database system by Microsoft."},duckdb:{label:"DuckDB",icon:"/icons/duckdb.png",desc:"In-memory analytical database with efficient query processing."},sqlite:{label:"Sqlite",icon:"/icons/sqlite.png",desc:"Lightweight embedded relational database with simplicity and portability."},clickhouse:{label:"ClickHouse",icon:"/icons/clickhouse.png",desc:"Columnar database for high-performance analytics and real-time queries."},oracle:{label:"Oracle",icon:"/icons/oracle.png",desc:"Robust, scalable, secure relational database widely used in enterprises."},access:{label:"Access",icon:"/icons/access.png",desc:"Easy-to-use relational database for small-scale applications by Microsoft."},mongodb:{label:"MongoDB",icon:"/icons/mongodb.png",desc:"Flexible, scalable NoSQL document database for web and mobile apps."},db2:{label:"DB2",icon:"/icons/db2.png",desc:"Scalable, secure relational database system developed by IBM."},hbase:{label:"HBase",icon:"/icons/hbase.png",desc:"Distributed, scalable NoSQL database for large structured/semi-structured data."},redis:{label:"Redis",icon:"/icons/redis.png",desc:"Fast, versatile in-memory data structure store as cache, DB, or broker."},cassandra:{label:"Cassandra",icon:"/icons/cassandra.png",desc:"Scalable, fault-tolerant distributed NoSQL database for large data."},couchbase:{label:"Couchbase",icon:"/icons/couchbase.png",desc:"High-performance NoSQL document database with distributed architecture."},postgresql:{label:"PostgreSQL",icon:"/icons/postgresql.png",desc:"Powerful open-source relational database with extensibility and SQL standards."},spark:{label:"Spark",icon:"/icons/spark.png",desc:"Unified engine for large-scale data analytics."}};function F(e,a){var s;return null===(s=e.find(e=>e.value===a))||void 0===s?void 0:s.isFileDb}var q=function(){let[e,a]=(0,t.useState)([]),[s,u]=(0,t.useState)([]),[p,h]=(0,t.useState)(!1),[x,y]=(0,t.useState)({open:!1}),[j,w]=(0,t.useState)({open:!1}),N=async()=>{let[e,a]=await (0,f.Vx)((0,f.Jm)());u(null!=a?a:[])},_=async()=>{h(!0);let[e,s]=await (0,f.Vx)((0,f.Bw)());a(null!=s?s:[]),h(!1)},F=(0,t.useMemo)(()=>{let e=s.map(e=>{let{db_type:a,is_file_db:s}=e;return{...P[a],value:a,isFileDb:s}}),a=Object.keys(P).filter(a=>!e.some(e=>e.value===a)).map(e=>({...P[e],value:P[e].label,disabled:!0}));return[...e,...a]},[s]),q=e=>{y({open:!0,info:e})},D=e=>{r.default.confirm({title:"Tips",content:"Do you Want to delete the ".concat(e.db_name,"?"),onOk:()=>new Promise(async(a,s)=>{try{let[l]=await (0,f.Vx)((0,f.J5)(e.db_name));if(l){i.ZP.error(l.message),s();return}i.ZP.success("success"),_(),a()}catch(e){s()}})})},E=(0,t.useMemo)(()=>{let a=F.reduce((a,s)=>(a[s.value]=e.filter(e=>e.db_type===s.value),a),{});return a},[e,F]);(0,n.Z)(async()=>{await _(),await N()},[]);let T=a=>{let s=e.filter(e=>e.db_type===a.value);w({open:!0,dbList:s,name:a.label,type:a.value})};return(0,l.jsxs)("div",{className:"relative p-6 px-12 bg-[#FAFAFA] dark:bg-transparent min-h-full overflow-y-auto",children:[(0,l.jsx)(S.Z,{visible:p}),(0,l.jsx)("div",{className:"mb-4",children:(0,l.jsx)(c.ZP,{type:"primary",className:"flex items-center",icon:(0,l.jsx)(Z.Z,{}),onClick:()=>{y({open:!0})},children:"Create"})}),(0,l.jsx)("div",{className:"flex flex-wrap",children:F.map(e=>(0,l.jsx)(o.Z,{className:"mr-4 mb-4",count:E[e.value].length,children:(0,l.jsx)(k,{info:e,onClick:()=>{T(e)}})},e.value))}),(0,l.jsx)(g,{open:x.open,dbTypeList:F,choiceDBType:x.dbType,editValue:x.info,dbNames:e.map(e=>e.db_name),onSuccess:()=>{y({open:!1}),_()},onClose:()=>{y({open:!1})}}),(0,l.jsx)(d.Z,{title:j.name,placement:"right",onClose:()=>{w({open:!1})},open:j.open,children:j.type&&E[j.type]&&E[j.type].length?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.ZP,{type:"primary",className:"mb-4 flex items-center",icon:(0,l.jsx)(Z.Z,{}),onClick:()=>{y({open:!0,dbType:j.type})},children:"Create"}),E[j.type].map(e=>(0,l.jsxs)(b.Z,{title:e.db_name,extra:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v.Z,{className:"mr-2",style:{color:"#1b7eff"},onClick:()=>{q(e)}}),(0,l.jsx)(C.Z,{style:{color:"#ff1b2e"},onClick:()=>{D(e)}})]}),className:"mb-4",children:[e.db_path?(0,l.jsxs)("p",{children:["path: ",e.db_path]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("p",{children:["host: ",e.db_host]}),(0,l.jsxs)("p",{children:["username: ",e.db_user]}),(0,l.jsxs)("p",{children:["port: ",e.db_port]})]}),(0,l.jsxs)("p",{children:["remark: ",e.comment]})]},e.db_name))]}):(0,l.jsx)(m.Z,{image:m.Z.PRESENTED_IMAGE_DEFAULT,children:(0,l.jsx)(c.ZP,{type:"primary",className:"flex items-center mx-auto",icon:(0,l.jsx)(Z.Z,{}),onClick:()=>{y({open:!0,dbType:j.type})},children:"Create Now"})})})]})}}},function(e){e.O(0,[44,479,9,442,813,411,928,643,774,888,179],function(){return e(e.s=55286)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/pilot/server/static/_next/static/chunks/pages/knowledge-40fc3593b22ec10a.js b/pilot/server/static/_next/static/chunks/pages/knowledge-40fc3593b22ec10a.js new file mode 100644 index 000000000..1172920a9 --- /dev/null +++ b/pilot/server/static/_next/static/chunks/pages/knowledge-40fc3593b22ec10a.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[265],{54681:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge",function(){return l(4223)}])},47207:function(e,t,l){"use strict";l.d(t,{Z:function(){return c}});var s=l(85893),a=l(27595),n=l(27329),i=l(68346);function c(e){let{type:t}=e;return"TEXT"===t?(0,s.jsx)(a.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"}):"DOCUMENT"===t?(0,s.jsx)(n.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"}):(0,s.jsx)(i.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"})}},4223:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return es}});var s=l(85893),a=l(67294),n=l(24969),i=l(71577),c=l(12069),r=l(3363),o=l(46735),d=l(74627),m=l(40411),u=l(11163),x=l(25675),h=l.n(x),p=l(28058),_=l(31484),j=l(78346),f=l(83062),b=l(66309),g=l(85813),N=l(32983),Z=l(42075),w=l(96074),y=l(75081),k=l(31326),v=l(88008),P=l(27704),T=l(18754),S=l(50489),C=l(30381),F=l.n(C),D=l(59566),E=l(71230),I=l(15746),A=l(39479),V=l(44442),z=l(67421),O=l(31545),q=l(6321);let{TextArea:U}=D.default;function M(e){let{space:t,argumentsShow:l,setArgumentsShow:n}=e,{t:r}=(0,z.$G)(),[o,d]=(0,a.useState)(),[m,u]=(0,a.useState)(!1),x=async()=>{let[e,l]=await (0,S.Vx)((0,S.Tu)(t.name));d(l)};(0,a.useEffect)(()=>{x()},[t.name]);let h=[{key:"Embedding",label:(0,s.jsxs)("div",{children:[(0,s.jsx)(O.Z,{}),r("Embedding")]}),children:(0,s.jsxs)(E.Z,{gutter:24,children:[(0,s.jsx)(I.Z,{span:12,offset:0,children:(0,s.jsx)(A.Z.Item,{tooltip:r("the_top_k_vectors"),rules:[{required:!0}],label:r("topk"),name:["embedding","topk"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(I.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("Set_a_threshold_score"),rules:[{required:!0}],label:r("recall_score"),name:["embedding","recall_score"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:r("Please_input_the_owner")})})}),(0,s.jsx)(I.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("Recall_Type"),rules:[{required:!0}],label:r("recall_type"),name:["embedding","recall_type"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(I.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("A_model_used"),rules:[{required:!0}],label:r("model"),name:["embedding","model"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(I.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("The_size_of_the_data_chunks"),rules:[{required:!0}],label:r("chunk_size"),name:["embedding","chunk_size"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(I.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("The_amount_of_overlap"),rules:[{required:!0}],label:r("chunk_overlap"),name:["embedding","chunk_overlap"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:r("Please_input_the_description")})})})]})},{key:"Prompt",label:(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Z,{}),r("Prompt")]}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(A.Z.Item,{tooltip:r("A_contextual_parameter"),label:r("scene"),name:["prompt","scene"],children:(0,s.jsx)(U,{rows:4,className:"mb-2"})}),(0,s.jsx)(A.Z.Item,{tooltip:r("structure_or_format"),label:r("template"),name:["prompt","template"],children:(0,s.jsx)(U,{rows:7,className:"mb-2"})}),(0,s.jsx)(A.Z.Item,{tooltip:r("The_maximum_number_of_tokens"),label:r("max_token"),name:["prompt","max_token"],children:(0,s.jsx)(D.default,{className:"mb-2"})})]})}],p=async e=>{u(!0);let[l,s,a]=await (0,S.Vx)((0,S.iH)(t.name,{argument:JSON.stringify(e)}));u(!1),(null==a?void 0:a.success)&&n(!1)};return(0,s.jsx)(c.default,{width:850,open:l,onCancel:()=>{n(!1)},footer:null,children:(0,s.jsx)(y.Z,{spinning:m,children:(0,s.jsxs)(A.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{...o},autoComplete:"off",onFinish:p,children:[(0,s.jsx)(V.Z,{items:h}),(0,s.jsxs)("div",{className:"mt-3 mb-3",children:[(0,s.jsx)(i.ZP,{htmlType:"submit",type:"primary",className:"mr-6",children:r("Submit")}),(0,s.jsx)(i.ZP,{onClick:()=>{n(!1)},children:r("close")})]})]})})})}var G=l(47207);let{confirm:R}=c.default;function H(e){let{space:t}=e,{t:l}=(0,z.$G)(),c=(0,u.useRouter)(),[r,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)([]),[x,h]=(0,a.useState)(!1),_=e=>{R({title:l("Tips"),icon:(0,s.jsx)(p.Z,{}),content:"".concat(l("Del_Document_Tips"),"?"),okText:"Yes",okType:"danger",cancelText:"No",async onOk(){await D(e)}})};async function j(){o(!0);let[e,l]=await (0,S.Vx)((0,S._Q)(t.name,{page:1,page_size:20}));o(!1),m(null==l?void 0:l.data)}let C=async(e,t)=>{await (0,S.Vx)((0,S.Hx)(e,{doc_ids:[t]}))},D=async l=>{await (0,S.Vx)((0,S.n3)(t.name,{doc_name:l.doc_name})),j(),e.onDeleteDoc()},E=()=>{e.onAddDoc(t.name)},I=(e,t)=>{let l;switch(e){case"TODO":l="gold";break;case"RUNNING":l="#2db7f5";break;case"FINISHED":l="#87d068";break;default:l="f50"}return(0,s.jsx)(f.Z,{title:t,children:(0,s.jsx)(b.Z,{color:l,children:e})})};return(0,a.useEffect)(()=>{j()},[t]),(0,s.jsxs)("div",{className:"collapse-container pt-2 px-4",children:[(0,s.jsxs)(Z.Z,{children:[(0,s.jsx)(i.ZP,{size:"middle",type:"primary",className:"flex items-center",icon:(0,s.jsx)(n.Z,{}),onClick:E,children:l("Add_Datasource")}),(0,s.jsx)(i.ZP,{size:"middle",className:"flex items-center mx-2",icon:(0,s.jsx)(T.Z,{}),onClick:()=>{h(!0)},children:"Arguments"})]}),(0,s.jsx)(w.Z,{}),(0,s.jsx)(y.Z,{spinning:r,children:(null==d?void 0:d.length)>0?(0,s.jsx)("div",{className:"max-h-96 mt-3 grid grid-cols-1 gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-3 xl:gap-x-5 overflow-auto",children:d.map(e=>(0,s.jsxs)(g.Z,{className:" dark:bg-[#484848] relative shrink-0 grow-0 cursor-pointer rounded-[10px] border border-gray-200 border-solid w-full",title:(0,s.jsx)(f.Z,{title:e.doc_name,children:(0,s.jsxs)("div",{className:"truncate ",children:[(0,s.jsx)(G.Z,{type:e.doc_type}),(0,s.jsx)("span",{children:e.doc_name})]})}),extra:(0,s.jsxs)("div",{className:"mx-3",children:[(0,s.jsx)(f.Z,{title:"detail",children:(0,s.jsx)(k.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{c.push("/knowledge/chunk/?spaceName=".concat(t.name,"&id=").concat(e.id))}})}),(0,s.jsx)(f.Z,{title:"Sync",children:(0,s.jsx)(v.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{C(t.name,e.id)}})}),(0,s.jsx)(f.Z,{title:"Delete",children:(0,s.jsx)(P.Z,{className:"text-[#ff1b2e] !text-lg",onClick:()=>{_(e)}})})]}),children:[(0,s.jsxs)("p",{className:"mt-2 font-semibold ",children:[l("Size"),":"]}),(0,s.jsxs)("p",{children:[e.chunk_size," chunks"]}),(0,s.jsxs)("p",{className:"mt-2 font-semibold ",children:[l("Last_Synch"),":"]}),(0,s.jsx)("p",{children:F()(e.last_sync).format("YYYY-MM-DD HH:MM:SS")}),(0,s.jsx)("p",{className:"mt-2 mb-2",children:I(e.status,e.result)})]},e.id))}):(0,s.jsx)(N.Z,{image:N.Z.PRESENTED_IMAGE_DEFAULT,children:(0,s.jsx)(i.ZP,{type:"primary",className:"flex items-center mx-auto",icon:(0,s.jsx)(n.Z,{}),onClick:E,children:"Create Now"})})}),(0,s.jsx)(M,{space:t,argumentsShow:x,setArgumentsShow:h})]})}var L=l(19284);let{confirm:Y}=c.default;function $(e){var t;let l=(0,u.useRouter)(),{t:a}=(0,z.$G)(),{space:n,getSpaces:c}=e,r=()=>{Y({title:a("Tips"),icon:(0,s.jsx)(p.Z,{}),content:"".concat(a("Del_Knowledge_Tips"),"?"),okText:"Yes",okType:"danger",cancelText:"No",async onOk(){await (0,S.Vx)((0,S.XK)({name:null==n?void 0:n.name})),c()}})},x=async e=>{e.stopPropagation();let[t,s]=await (0,S.Vx)((0,S.sW)({chat_mode:"chat_knowledge"}));(null==s?void 0:s.conv_uid)&&l.push("/chat?scene=chat_knowledge&id=".concat(null==s?void 0:s.conv_uid,"&db_param=").concat(n.name))};return(0,s.jsx)(o.ZP,{theme:{components:{Popover:{zIndexPopup:90}}},children:(0,s.jsx)(d.Z,{className:"dark:hover:border-white transition-all hover:shadow-md bg-[#FFFFFF] dark:bg-[#484848] cursor-pointer rounded-[10px] border border-gray-200 border-solid",placement:"bottom",trigger:"click",content:(0,s.jsx)(H,{space:n,onAddDoc:e.onAddDoc,onDeleteDoc:function(){c()}}),children:(0,s.jsxs)(m.Z,{className:"mr-4 mb-4 min-w-[200px] sm:w-60 lg:w-72",count:n.docs||0,children:[(0,s.jsxs)("div",{className:"flex justify-between mx-6 mt-3",children:[(0,s.jsxs)("div",{className:"text-lg font-bold text-black truncate",children:[(t=n.vector_type,(0,s.jsx)(h(),{className:"rounded-full w-8 h-8 border border-gray-200 object-contain bg-white inline-block",width:36,height:136,src:L.l[t]||"/models/knowledge-default.jpg",alt:"llm"})),(0,s.jsx)("span",{className:"dark:text-white ml-2",children:null==n?void 0:n.name})]}),(0,s.jsx)(_.Z,{onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),r()},twoToneColor:"#CD2029",className:"!text-2xl"})]}),(0,s.jsxs)("div",{className:"text-sm mt-2 p-6 pt-2 h-40",children:[(0,s.jsxs)("p",{className:"font-semibold",children:[a("Owner"),":"]}),(0,s.jsx)("p",{className:" truncate",children:null==n?void 0:n.owner}),(0,s.jsxs)("p",{className:"font-semibold mt-2",children:[a("Description"),":"]}),(0,s.jsx)("p",{className:" line-clamp-2",children:null==n?void 0:n.desc}),(0,s.jsx)("p",{className:"font-semibold mt-2",children:"Last modify:"}),(0,s.jsx)("p",{className:" truncate",children:F()(n.gmt_modified).format("YYYY-MM-DD HH:MM:SS")})]}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(i.ZP,{size:"middle",onClick:x,className:"mr-4 dark:text-white mb-2",shape:"round",icon:(0,s.jsx)(j.Z,{}),children:a("Chat")})})]})})})}var X=l(31365),K=l(2453),W=l(72269),B=l(64082);let{Dragger:J}=X.default,{TextArea:Q}=D.default;function ee(e){let{handleStepChange:t,spaceName:l,docType:n}=e,{t:c}=(0,z.$G)(),[r]=A.Z.useForm(),[o,d]=(0,a.useState)(!1),m=async e=>{let s;let{synchChecked:a,docName:i,textSource:c,originFileObj:r,text:o,webPageUrl:m}=e;switch(d(!0),n){case"webPage":s=await (0,S.Vx)((0,S.H_)(l,{doc_name:i,content:m,doc_type:"URL"}));break;case"file":let x=new FormData;x.append("doc_name",i||r.file.name),x.append("doc_file",r.file),x.append("doc_type","DOCUMENT"),s=await (0,S.Vx)((0,S.iG)(l,x));break;default:s=await (0,S.Vx)((0,S.H_)(l,{doc_name:i,source:c,content:o,doc_type:"TEXT"}))}a&&(null==u||u(l,null==s?void 0:s[1])),d(!1),t({label:"finish"})},u=async(e,t)=>{await (0,S.Vx)((0,S.Hx)(e,{doc_ids:[t]}))},x=e=>{let{file:t,fileList:l}=e;r.getFieldsValue().docName||r.setFieldValue("docName",t.name),0===l.length&&r.setFieldValue("originFileObj",null)},h=()=>{let e=r.getFieldsValue().originFileObj;return!!e&&(K.ZP.warning(c("Limit_Upload_File_Count_Tips")),X.default.LIST_IGNORE)},p=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(A.Z.Item,{label:"".concat(c("Text_Source"),":"),name:"textSource",rules:[{required:!0,message:c("Please_input_the_text_source")}],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_text_source")})}),(0,s.jsx)(A.Z.Item,{label:"".concat(c("Text"),":"),name:"text",rules:[{required:!0,message:c("Please_input_the_description")}],children:(0,s.jsx)(Q,{rows:4})})]}),_=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(A.Z.Item,{label:"".concat(c("Web_Page_URL"),":"),name:"webPageUrl",rules:[{required:!0,message:c("Please_input_the_owner")}],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_Web_Page_URL")})})}),j=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(A.Z.Item,{name:"originFileObj",rules:[{required:!0,message:c("Please_input_the_owner")}],children:(0,s.jsxs)(J,{onChange:x,beforeUpload:h,multiple:!1,accept:".pdf,.ppt,.pptx,.xls,.xlsx,.doc,.docx,.txt,.md",children:[(0,s.jsx)("p",{className:"ant-upload-drag-icon",children:(0,s.jsx)(B.Z,{})}),(0,s.jsx)("p",{style:{color:"rgb(22, 108, 255)",fontSize:"20px"},children:c("Select_or_Drop_file")}),(0,s.jsx)("p",{className:"ant-upload-hint",style:{color:"rgb(22, 108, 255)"},children:"PDF, PowerPoint, Excel, Word, Text, Markdown,"})]})})});return(0,s.jsx)(y.Z,{spinning:o,children:(0,s.jsxs)(A.Z,{form:r,size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{remember:!0},autoComplete:"off",onFinish:m,children:[(0,s.jsx)(A.Z.Item,{label:"".concat(c("Name"),":"),name:"docName",rules:[{required:!0,message:c("Please_input_the_name")}],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_name")})}),(()=>{switch(n){case"webPage":return _();case"file":return j();default:return p()}})(),(0,s.jsx)(A.Z.Item,{label:"".concat(c("Synch"),":"),name:"synchChecked",initialValue:!0,children:(0,s.jsx)(W.Z,{className:"bg-slate-400",defaultChecked:!0})}),(0,s.jsxs)(A.Z.Item,{children:[(0,s.jsx)(i.ZP,{onClick:()=>{t({label:"back"})},className:"mr-4",children:"".concat(c("Back"))}),(0,s.jsx)(i.ZP,{type:"primary",htmlType:"submit",children:c("Finish")})]})]})})}function et(e){let{t}=(0,z.$G)(),{handleStepChange:l}=e,[n,c]=(0,a.useState)(!1),r=async e=>{let{spaceName:t,owner:s,description:a}=e;c(!0);let[n,i,r]=await (0,S.Vx)((0,S.be)({name:t,vector_type:"Chroma",owner:s,desc:a}));c(!1),(null==r?void 0:r.success)&&l({label:"forward",spaceName:t})};return(0,s.jsx)(y.Z,{spinning:n,children:(0,s.jsxs)(A.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{remember:!0},autoComplete:"off",onFinish:r,children:[(0,s.jsx)(A.Z.Item,{label:t("Knowledge_Space_Name"),name:"spaceName",rules:[{required:!0,message:t("Please_input_the_name")},()=>({validator:(e,l)=>/[^\u4e00-\u9fa50-9a-zA-Z_-]/.test(l)?Promise.reject(Error(t("the_name_can_only_contain"))):Promise.resolve()})],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_name")})}),(0,s.jsx)(A.Z.Item,{label:t("Owner"),name:"owner",rules:[{required:!0,message:t("Please_input_the_owner")}],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_owner")})}),(0,s.jsx)(A.Z.Item,{label:t("Description"),name:"description",rules:[{required:!0,message:t("Please_input_the_description")}],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_description")})}),(0,s.jsx)(A.Z.Item,{children:(0,s.jsx)(i.ZP,{type:"primary",htmlType:"submit",children:t("Next")})})]})})}function el(e){let{t}=(0,z.$G)(),{handleStepChange:l}=e,a=[{type:"text",title:t("Text"),subTitle:t("Fill your raw text"),iconType:"TEXT"},{type:"webPage",title:t("URL"),subTitle:t("Fetch_the_content_of_a_URL"),iconType:"WEBPAGE"},{type:"file",title:t("Document"),subTitle:t("Upload_a_document"),iconType:"DOCUMENT"}];return(0,s.jsx)(s.Fragment,{children:a.map((e,t)=>(0,s.jsxs)(g.Z,{className:"mt-4 mb-4 cursor-pointer",onClick:()=>{l({label:"forward",docType:e.type})},children:[(0,s.jsxs)("div",{className:"font-semibold",children:[(0,s.jsx)(G.Z,{type:e.iconType}),e.title]}),(0,s.jsx)("div",{children:e.subTitle})]},t))})}var es=()=>{let[e,t]=(0,a.useState)([]),[l,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)(0),[u,x]=(0,a.useState)(""),[h,p]=(0,a.useState)(""),{t:_}=(0,z.$G)(),j=[{title:_("Knowledge_Space_Config")},{title:_("Choose_a_Datasource_type")},{title:_("Setup_the_Datasource")}];async function f(){let[e,l]=await (0,S.Vx)((0,S.Vm)());t(l)}(0,a.useEffect)(()=>{f()},[]);let b=e=>{let{label:t,spaceName:l,docType:s}=e;"finish"===t?(o(!1),f(),x(""),p("")):"forward"===t?(0===d&&f(),m(e=>e+1)):m(e=>e-1),l&&x(l),s&&p(s)};function g(e){x(e),m(1),o(!0)}return(0,s.jsxs)("div",{className:"bg-[#FAFAFA] dark:bg-[#212121] w-full h-full",children:[(0,s.jsxs)("div",{className:"page-body p-6 px-12 h-full overflow-auto",children:[(0,s.jsx)(i.ZP,{type:"primary",className:"flex items-center",icon:(0,s.jsx)(n.Z,{}),onClick:()=>{o(!0)},children:"Create"}),(0,s.jsx)("div",{className:"flex flex-wrap mt-4",children:null==e?void 0:e.map(e=>(0,s.jsx)($,{space:e,onAddDoc:g,getSpaces:f},e.id))})]}),(0,s.jsxs)(c.default,{title:"Add Knowledge",centered:!0,open:l,destroyOnClose:!0,onCancel:()=>{o(!1)},width:1e3,afterClose:()=>{m(0)},footer:null,children:[(0,s.jsx)(r.Z,{current:d,items:j}),0===d&&(0,s.jsx)(et,{handleStepChange:b}),1===d&&(0,s.jsx)(el,{handleStepChange:b}),2===d&&(0,s.jsx)(ee,{spaceName:u,docType:h,handleStepChange:b})]})]})}}},function(e){e.O(0,[885,44,479,442,365,813,411,63,774,888,179],function(){return e(e.s=54681)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/pilot/server/static/_next/static/chunks/pages/knowledge-c73b240310994685.js b/pilot/server/static/_next/static/chunks/pages/knowledge-c73b240310994685.js deleted file mode 100644 index 9f2b2cfe0..000000000 --- a/pilot/server/static/_next/static/chunks/pages/knowledge-c73b240310994685.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[265],{54681:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge",function(){return l(4223)}])},47207:function(e,t,l){"use strict";l.d(t,{Z:function(){return c}});var s=l(85893),a=l(27595),n=l(27329),i=l(68346);function c(e){let{type:t}=e;return"TEXT"===t?(0,s.jsx)(a.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"}):"DOCUMENT"===t?(0,s.jsx)(n.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"}):(0,s.jsx)(i.Z,{className:"text-[#2AA3FF] mr-2 !text-lg"})}},4223:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return es}});var s=l(85893),a=l(67294),n=l(24969),i=l(71577),c=l(12069),r=l(3363),o=l(46735),d=l(74627),m=l(40411),u=l(11163),x=l(25675),h=l.n(x),p=l(28058),_=l(31484),j=l(78346),f=l(83062),b=l(66309),g=l(85813),N=l(32983),Z=l(42075),w=l(96074),y=l(75081),k=l(31326),v=l(88008),T=l(27704),P=l(18754),S=l(50489),C=l(30381),F=l.n(C),D=l(59566),E=l(71230),I=l(15746),A=l(39479),V=l(44442),z=l(67421),O=l(31545),q=l(6321);let{TextArea:U}=D.default;function M(e){let{space:t,argumentsShow:l,setArgumentsShow:n}=e,{t:r}=(0,z.$G)(),[o,d]=(0,a.useState)(),[m,u]=(0,a.useState)(!1),x=async()=>{let[e,l]=await (0,S.Vx)((0,S.Tu)(t.name));d(l)};(0,a.useEffect)(()=>{x()},[t.name]);let h=[{key:"Embedding",label:(0,s.jsxs)("div",{children:[(0,s.jsx)(O.Z,{}),r("Embedding")]}),children:(0,s.jsxs)(E.Z,{gutter:24,children:[(0,s.jsx)(I.Z,{span:12,offset:0,children:(0,s.jsx)(A.Z.Item,{tooltip:r("the_top_k_vectors"),rules:[{required:!0}],label:r("topk"),name:["embedding","topk"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(I.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("Set_a_threshold_score"),rules:[{required:!0}],label:r("recall_score"),name:["embedding","recall_score"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:r("Please_input_the_owner")})})}),(0,s.jsx)(I.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("Recall_Type"),rules:[{required:!0}],label:r("recall_type"),name:["embedding","recall_type"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(I.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("A_model_used"),rules:[{required:!0}],label:r("model"),name:["embedding","model"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(I.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("The_size_of_the_data_chunks"),rules:[{required:!0}],label:r("chunk_size"),name:["embedding","chunk_size"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(I.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("The_amount_of_overlap"),rules:[{required:!0}],label:r("chunk_overlap"),name:["embedding","chunk_overlap"],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:r("Please_input_the_description")})})})]})},{key:"Prompt",label:(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Z,{}),r("Embedding")]}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(A.Z.Item,{tooltip:r("A_contextual_parameter"),label:r("scene"),name:["prompt","scene"],children:(0,s.jsx)(U,{rows:4,className:"mb-2"})}),(0,s.jsx)(A.Z.Item,{tooltip:r("structure_or_format"),label:r("template"),name:["prompt","template"],children:(0,s.jsx)(U,{rows:7,className:"mb-2"})}),(0,s.jsx)(A.Z.Item,{tooltip:r("The_maximum_number_of_tokens"),label:r("max_token"),name:["prompt","max_token"],children:(0,s.jsx)(D.default,{className:"mb-2"})})]})}],p=async e=>{u(!0);let[l,s,a]=await (0,S.Vx)((0,S.iH)(t.name,{argument:JSON.stringify(e)}));u(!1),(null==a?void 0:a.success)&&n(!1)};return(0,s.jsx)(c.default,{width:850,open:l,onCancel:()=>{n(!1)},footer:null,children:(0,s.jsx)(y.Z,{spinning:m,children:(0,s.jsxs)(A.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{...o},autoComplete:"off",onFinish:p,children:[(0,s.jsx)(V.Z,{items:h}),(0,s.jsxs)("div",{className:"mt-3 mb-3",children:[(0,s.jsx)(i.ZP,{htmlType:"submit",type:"primary",className:"mr-6",children:r("Submit")}),(0,s.jsx)(i.ZP,{onClick:()=>{n(!1)},children:r("close")})]})]})})})}var G=l(47207);let{confirm:R}=c.default;function H(e){let{space:t}=e,{t:l}=(0,z.$G)(),c=(0,u.useRouter)(),[r,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)([]),[x,h]=(0,a.useState)(!1),_=e=>{R({title:l("Tips"),icon:(0,s.jsx)(p.Z,{}),content:"".concat(l("Del_Document_Tips"),"?"),okText:"Yes",okType:"danger",cancelText:"No",async onOk(){await D(e)}})};async function j(){o(!0);let[e,l]=await (0,S.Vx)((0,S._Q)(t.name,{page:1,page_size:20}));o(!1),m(null==l?void 0:l.data)}let C=async(e,t)=>{await (0,S.Vx)((0,S.Hx)(e,{doc_ids:[t]}))},D=async l=>{await (0,S.Vx)((0,S.n3)(t.name,{doc_name:l.doc_name})),j(),e.onDeleteDoc()},E=()=>{e.onAddDoc(t.name)},I=(e,t)=>{let l;switch(e){case"TODO":l="gold";break;case"RUNNING":l="#2db7f5";break;case"FINISHED":l="#87d068";break;default:l="f50"}return(0,s.jsx)(f.Z,{title:t,children:(0,s.jsx)(b.Z,{color:l,children:e})})};return(0,a.useEffect)(()=>{j()},[t]),(0,s.jsxs)("div",{className:"collapse-container pt-2 px-4",children:[(0,s.jsxs)(Z.Z,{children:[(0,s.jsx)(i.ZP,{size:"middle",type:"primary",className:"flex items-center",icon:(0,s.jsx)(n.Z,{}),onClick:E,children:l("Add_Datasource")}),(0,s.jsx)(i.ZP,{size:"middle",className:"flex items-center mx-2",icon:(0,s.jsx)(P.Z,{}),onClick:()=>{h(!0)},children:"Arguments"})]}),(0,s.jsx)(w.Z,{}),(0,s.jsx)(y.Z,{spinning:r,children:(null==d?void 0:d.length)>0?(0,s.jsx)("div",{className:"max-h-96 mt-3 grid grid-cols-1 gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-3 xl:gap-x-5 overflow-auto",children:d.map(e=>(0,s.jsxs)(g.Z,{className:" dark:bg-[#484848] relative shrink-0 grow-0 cursor-pointer rounded-[10px] border border-gray-200 border-solid w-full",title:(0,s.jsx)(f.Z,{title:e.doc_name,children:(0,s.jsxs)("div",{className:"truncate ",children:[(0,s.jsx)(G.Z,{type:e.doc_type}),(0,s.jsx)("span",{children:e.doc_name})]})}),extra:(0,s.jsxs)("div",{className:"mx-3",children:[(0,s.jsx)(f.Z,{title:"detail",children:(0,s.jsx)(k.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{c.push("/knowledge/chunk/?spaceName=".concat(t.name,"&id=").concat(e.id))}})}),(0,s.jsx)(f.Z,{title:"Sync",children:(0,s.jsx)(v.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{C(t.name,e.id)}})}),(0,s.jsx)(f.Z,{title:"Delete",children:(0,s.jsx)(T.Z,{className:"text-[#ff1b2e] !text-lg",onClick:()=>{_(e)}})})]}),children:[(0,s.jsxs)("p",{className:"mt-2 font-semibold ",children:[l("Size"),":"]}),(0,s.jsxs)("p",{children:[e.chunk_size," chunks"]}),(0,s.jsxs)("p",{className:"mt-2 font-semibold ",children:[l("Last_Synch"),":"]}),(0,s.jsx)("p",{children:F()(e.last_sync).format("YYYY-MM-DD HH:MM:SS")}),(0,s.jsx)("p",{className:"mt-2 mb-2",children:I(e.status,e.result)})]},e.id))}):(0,s.jsx)(N.Z,{image:N.Z.PRESENTED_IMAGE_DEFAULT,children:(0,s.jsx)(i.ZP,{type:"primary",className:"flex items-center mx-auto",icon:(0,s.jsx)(n.Z,{}),onClick:E,children:"Create Now"})})}),(0,s.jsx)(M,{space:t,argumentsShow:x,setArgumentsShow:h})]})}var L=l(19284);let{confirm:Y}=c.default;function $(e){var t;let l=(0,u.useRouter)(),{t:a}=(0,z.$G)(),{space:n,getSpaces:c}=e,r=()=>{Y({title:a("Tips"),icon:(0,s.jsx)(p.Z,{}),content:"".concat(a("Del_Knowledge_Tips"),"?"),okText:"Yes",okType:"danger",cancelText:"No",async onOk(){await (0,S.Vx)((0,S.XK)({name:null==n?void 0:n.name})),c()}})},x=async e=>{e.stopPropagation();let[t,s]=await (0,S.Vx)((0,S.sW)({chat_mode:"chat_knowledge"}));(null==s?void 0:s.conv_uid)&&l.push("/chat?scene=chat_knowledge&id=".concat(null==s?void 0:s.conv_uid,"&db_param=").concat(n.name))};return(0,s.jsx)(o.ZP,{theme:{components:{Popover:{zIndexPopup:90}}},children:(0,s.jsx)(d.Z,{className:"dark:hover:border-white transition-all hover:shadow-md bg-[#FFFFFF] dark:bg-[#484848] cursor-pointer rounded-[10px] border border-gray-200 border-solid",placement:"bottom",trigger:"click",content:(0,s.jsx)(H,{space:n,onAddDoc:e.onAddDoc,onDeleteDoc:function(){c()}}),children:(0,s.jsxs)(m.Z,{className:"mr-4 mb-4 min-w-[200px] sm:w-60 lg:w-72",count:n.docs||0,children:[(0,s.jsxs)("div",{className:"flex justify-between mx-6 mt-3",children:[(0,s.jsxs)("div",{className:"text-lg font-bold text-black truncate",children:[(t=n.vector_type,(0,s.jsx)(h(),{className:"rounded-full w-8 h-8 border border-gray-200 object-contain bg-white inline-block",width:36,height:136,src:L.l[t]||"/models/knowledge-default.jpg",alt:"llm"})),(0,s.jsx)("span",{className:"dark:text-white ml-2",children:null==n?void 0:n.name})]}),(0,s.jsx)(_.Z,{onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),r()},twoToneColor:"#CD2029",className:"!text-2xl"})]}),(0,s.jsxs)("div",{className:"text-sm mt-2 p-6 pt-2 h-40",children:[(0,s.jsxs)("p",{className:"font-semibold",children:[a("Owner"),":"]}),(0,s.jsx)("p",{className:" truncate",children:null==n?void 0:n.owner}),(0,s.jsxs)("p",{className:"font-semibold mt-2",children:[a("Description"),":"]}),(0,s.jsx)("p",{className:" line-clamp-2",children:null==n?void 0:n.desc}),(0,s.jsx)("p",{className:"font-semibold mt-2",children:"Last modify:"}),(0,s.jsx)("p",{className:" truncate",children:F()(n.gmt_modified).format("YYYY-MM-DD HH:MM:SS")})]}),(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(i.ZP,{size:"middle",onClick:x,className:"mr-4 dark:text-white mb-2",shape:"round",icon:(0,s.jsx)(j.Z,{}),children:a("Chat")})})]})})})}var X=l(31365),K=l(2453),W=l(72269),B=l(64082);let{Dragger:J}=X.default,{TextArea:Q}=D.default;function ee(e){let{handleStepChange:t,spaceName:l,docType:n}=e,{t:c}=(0,z.$G)(),[r]=A.Z.useForm(),[o,d]=(0,a.useState)(!1),m=async e=>{let s;let{synchChecked:a,docName:i,textSource:c,originFileObj:r,text:o,webPageUrl:m}=e;switch(d(!0),n){case"webPage":s=await (0,S.Vx)((0,S.H_)(l,{doc_name:i,content:m,doc_type:"URL"}));break;case"file":let x=new FormData;x.append("doc_name",i||r.file.name),x.append("doc_file",r.file),x.append("doc_type","DOCUMENT"),s=await (0,S.Vx)((0,S.iG)(l,x));break;default:s=await (0,S.Vx)((0,S.H_)(l,{doc_name:i,source:c,content:o,doc_type:"TEXT"}))}a&&(null==u||u(l,null==s?void 0:s[1])),d(!1),t({label:"finish"})},u=async(e,t)=>{await (0,S.Vx)((0,S.Hx)(e,{doc_ids:[t]}))},x=e=>{let{file:t,fileList:l}=e;r.getFieldsValue().docName||r.setFieldValue("docName",t.name),0===l.length&&r.setFieldValue("originFileObj",null)},h=()=>{let e=r.getFieldsValue().originFileObj;return!!e&&(K.ZP.warning(c("Limit_Upload_File_Count_Tips")),X.default.LIST_IGNORE)},p=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(A.Z.Item,{label:"".concat(c("Text_Source"),":"),name:"textSource",rules:[{required:!0,message:c("Please_input_the_text_source")}],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_text_source")})}),(0,s.jsx)(A.Z.Item,{label:"".concat(c("Text"),":"),name:"text",rules:[{required:!0,message:c("Please_input_the_description")}],children:(0,s.jsx)(Q,{rows:4})})]}),_=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(A.Z.Item,{label:"".concat(c("Web_Page_URL"),":"),name:"webPageUrl",rules:[{required:!0,message:c("Please_input_the_owner")}],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_Web_Page_URL")})})}),j=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(A.Z.Item,{name:"originFileObj",rules:[{required:!0,message:c("Please_input_the_owner")}],children:(0,s.jsxs)(J,{onChange:x,beforeUpload:h,multiple:!1,accept:".pdf,.ppt,.pptx,.xls,.xlsx,.doc,.docx,.txt,.md",children:[(0,s.jsx)("p",{className:"ant-upload-drag-icon",children:(0,s.jsx)(B.Z,{})}),(0,s.jsx)("p",{style:{color:"rgb(22, 108, 255)",fontSize:"20px"},children:c("Select_or_Drop_file")}),(0,s.jsx)("p",{className:"ant-upload-hint",style:{color:"rgb(22, 108, 255)"},children:"PDF, PowerPoint, Excel, Word, Text, Markdown,"})]})})});return(0,s.jsx)(y.Z,{spinning:o,children:(0,s.jsxs)(A.Z,{form:r,size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{remember:!0},autoComplete:"off",onFinish:m,children:[(0,s.jsx)(A.Z.Item,{label:"".concat(c("Name"),":"),name:"docName",rules:[{required:!0,message:c("Please_input_the_name")}],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_name")})}),(()=>{switch(n){case"webPage":return _();case"file":return j();default:return p()}})(),(0,s.jsx)(A.Z.Item,{label:"".concat(c("Synch"),":"),name:"synchChecked",initialValue:!0,children:(0,s.jsx)(W.Z,{className:"bg-slate-400",defaultChecked:!0})}),(0,s.jsxs)(A.Z.Item,{children:[(0,s.jsx)(i.ZP,{onClick:()=>{t({label:"back"})},className:"mr-4",children:"".concat(c("Back"))}),(0,s.jsx)(i.ZP,{type:"primary",htmlType:"submit",children:c("Finish")})]})]})})}function et(e){let{t}=(0,z.$G)(),{handleStepChange:l}=e,[n,c]=(0,a.useState)(!1),r=async e=>{let{spaceName:t,owner:s,description:a}=e;c(!0);let[n,i,r]=await (0,S.Vx)((0,S.be)({name:t,vector_type:"Chroma",owner:s,desc:a}));c(!1),(null==r?void 0:r.success)&&l({label:"forward",spaceName:t})};return(0,s.jsx)(y.Z,{spinning:n,children:(0,s.jsxs)(A.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{remember:!0},autoComplete:"off",onFinish:r,children:[(0,s.jsx)(A.Z.Item,{label:t("Knowledge_Space_Name"),name:"spaceName",rules:[{required:!0,message:t("Please_input_the_name")},()=>({validator:(e,l)=>/[^\u4e00-\u9fa50-9a-zA-Z_-]/.test(l)?Promise.reject(Error(t("the_name_can_only_contain"))):Promise.resolve()})],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_name")})}),(0,s.jsx)(A.Z.Item,{label:t("Owner"),name:"owner",rules:[{required:!0,message:t("Please_input_the_owner")}],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_owner")})}),(0,s.jsx)(A.Z.Item,{label:t("Description"),name:"description",rules:[{required:!0,message:t("Please_input_the_description")}],children:(0,s.jsx)(D.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_description")})}),(0,s.jsx)(A.Z.Item,{children:(0,s.jsx)(i.ZP,{type:"primary",htmlType:"submit",children:t("Next")})})]})})}function el(e){let{t}=(0,z.$G)(),{handleStepChange:l}=e,a=[{type:"text",title:t("Text"),subTitle:t("Fill your raw text"),iconType:"TEXT"},{type:"webPage",title:t("URL"),subTitle:t("Fetch_the_content_of_a_URL"),iconType:"WEBPAGE"},{type:"file",title:t("Document"),subTitle:t("Upload_a_document"),iconType:"DOCUMENT"}];return(0,s.jsx)(s.Fragment,{children:a.map((e,t)=>(0,s.jsxs)(g.Z,{className:"mt-4 mb-4 cursor-pointer",onClick:()=>{l({label:"forward",docType:e.type})},children:[(0,s.jsxs)("div",{className:"font-semibold",children:[(0,s.jsx)(G.Z,{type:e.iconType}),e.title]}),(0,s.jsx)("div",{children:e.subTitle})]},t))})}var es=()=>{let[e,t]=(0,a.useState)([]),[l,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)(0),[u,x]=(0,a.useState)(""),[h,p]=(0,a.useState)(""),{t:_}=(0,z.$G)(),j=[{title:_("Knowledge_Space_Config")},{title:_("Choose_a_Datasource_type")},{title:_("Setup_the_Datasource")}];async function f(){let[e,l]=await (0,S.Vx)((0,S.Vm)());t(l)}(0,a.useEffect)(()=>{f()},[]);let b=e=>{let{label:t,spaceName:l,docType:s}=e;"finish"===t?(o(!1),f(),x(""),p("")):"forward"===t?(0===d&&f(),m(e=>e+1)):m(e=>e-1),l&&x(l),s&&p(s)};function g(e){x(e),m(1),o(!0)}return(0,s.jsxs)("div",{className:"bg-[#FAFAFA] dark:bg-[#212121] w-full h-full",children:[(0,s.jsxs)("div",{className:"page-body p-6 px-12 h-full overflow-auto",children:[(0,s.jsx)(i.ZP,{type:"primary",className:"flex items-center",icon:(0,s.jsx)(n.Z,{}),onClick:()=>{o(!0)},children:"Create"}),(0,s.jsx)("div",{className:"flex flex-wrap mt-4",children:null==e?void 0:e.map(e=>(0,s.jsx)($,{space:e,onAddDoc:g,getSpaces:f},e.id))})]}),(0,s.jsxs)(c.default,{title:"Add Knowledge",centered:!0,open:l,destroyOnClose:!0,onCancel:()=>{o(!1)},width:1e3,afterClose:()=>{m(0)},footer:null,children:[(0,s.jsx)(r.Z,{current:d,items:j}),0===d&&(0,s.jsx)(et,{handleStepChange:b}),1===d&&(0,s.jsx)(el,{handleStepChange:b}),2===d&&(0,s.jsx)(ee,{spaceName:u,docType:h,handleStepChange:b})]})]})}}},function(e){e.O(0,[885,44,479,442,365,813,411,63,774,888,179],function(){return e(e.s=54681)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/pilot/server/static/_next/static/chunks/webpack-fbcb320c82fd7041.js b/pilot/server/static/_next/static/chunks/webpack-77553ab117b6c794.js similarity index 60% rename from pilot/server/static/_next/static/chunks/webpack-fbcb320c82fd7041.js rename to pilot/server/static/_next/static/chunks/webpack-77553ab117b6c794.js index 0b2de09b3..d917d76bf 100644 --- a/pilot/server/static/_next/static/chunks/webpack-fbcb320c82fd7041.js +++ b/pilot/server/static/_next/static/chunks/webpack-77553ab117b6c794.js @@ -1 +1 @@ -!function(){"use strict";var e,t,n,r,o,u,c,i,a,f,s,d,l={},b={};function p(e){var t=b[e];if(void 0!==t)return t.exports;var n=b[e]={id:e,loaded:!1,exports:{}},r=!0;try{l[e].call(n.exports,n,n.exports,p),r=!1}finally{r&&delete b[e]}return n.loaded=!0,n.exports}p.m=l,p.amdO={},e=[],p.O=function(t,n,r,o){if(n){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var c=1/0,u=0;u=o&&Object.keys(p.O).every(function(e){return p.O[e](n[a])})?n.splice(a--,1):(i=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var a=1/0,u=0;u=o&&Object.keys(p.O).every(function(e){return p.O[e](n[c])})?n.splice(c--,1):(i=!1,o:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-tl-md{border-top-left-radius:.375rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-tr-md{border-top-right-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#f0f0f0\]{--tw-border-opacity:1;border-color:rgb(240 240 240/var(--tw-border-opacity))}.border-\[var\(--joy-palette-divider\)\]{border-color:var(--joy-palette-divider)}.border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.bg-\[\#E6F4FF\]{--tw-bg-opacity:1;background-color:rgb(230 244 255/var(--tw-bg-opacity))}.bg-\[\#FAFAFA\]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.bg-\[\#FFFFFF\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-\[\#fafafa\]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#31afff\]{--tw-gradient-from:#31afff var(--tw-gradient-from-position);--tw-gradient-to:rgba(49,175,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-\[\#1677ff\]{--tw-gradient-to:#1677ff var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[6px\]{padding-left:6px;padding-right:6px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-\[2px\]{padding-top:2px;padding-bottom:2px}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-0{padding-left:0}.pl-0\.5{padding-left:.125rem}.pl-2{padding-left:.5rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.\!text-left{text-align:left!important}.\!text-2xl{font-size:1.5rem!important;line-height:2rem!important}.\!text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.\!text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-8{line-height:2rem}.\!text-\[\#878c93\]{--tw-text-opacity:1!important;color:rgb(135 140 147/var(--tw-text-opacity))!important}.\!text-green-600{--tw-text-opacity:1!important;color:rgb(22 163 74/var(--tw-text-opacity))!important}.\!text-orange-600{--tw-text-opacity:1!important;color:rgb(234 88 12/var(--tw-text-opacity))!important}.\!text-red-600{--tw-text-opacity:1!important;color:rgb(220 38 38/var(--tw-text-opacity))!important}.text-\[\#1677FE\]{--tw-text-opacity:1;color:rgb(22 119 254/var(--tw-text-opacity))}.text-\[\#1677ff\]{--tw-text-opacity:1;color:rgb(22 119 255/var(--tw-text-opacity))}.text-\[\#2AA3FF\]{--tw-text-opacity:1;color:rgb(42 163 255/var(--tw-text-opacity))}.text-\[\#ff1b2e\]{--tw-text-opacity:1;color:rgb(255 27 46/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.opacity-0{opacity:0}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.grayscale{--tw-grayscale:grayscale(100%)}.filter,.grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.animate-duration-200{animation-duration:.2s}.animate-duration-300{animation-duration:.3s}body{margin:0;color:var(--joy-palette-text-primary,var(--joy-palette-neutral-800,#25252d));font-family:var(--joy-fontFamily-body,var(--joy-Josefin Sans,sans-serif));font-size:var(--joy-fontSize-md,1rem);line-height:var(--joy-lineHeight-md,1.5);background-color:var(--joy-palette-background-body)}body .ant-btn-primary{background-color:#1677ff}.ant-pagination .ant-pagination-next *,.ant-pagination .ant-pagination-prev *{color:#279bff!important}.ant-pagination .ant-pagination-item a{color:#b0b0bf}.ant-pagination .ant-pagination-item.ant-pagination-item-active{background-color:#279bff!important}.ant-pagination .ant-pagination-item.ant-pagination-item-active a{color:#fff!important}table tr td{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}::-webkit-scrollbar{display:none}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb{background:#888}::-webkit-scrollbar-thumb:hover{background:#555}.dark :where(.css-dev-only-do-not-override-18iikkb).ant-tabs .ant-tabs-tab-btn{color:#fff}:where(.css-dev-only-do-not-override-18iikkb).ant-form-item .ant-form-item-label>label{height:36px}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-top-8:after{content:var(--tw-content);top:-2rem}.after\:h-8:after{content:var(--tw-content);height:2rem}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:bg-gradient-to-t:after{content:var(--tw-content);background-image:linear-gradient(to top,var(--tw-gradient-stops))}.after\:from-white:after{content:var(--tw-content);--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.after\:to-transparent:after{content:var(--tw-content);--tw-gradient-to:transparent var(--tw-gradient-to-position)}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.hover\:\!text-gray-200:hover{--tw-text-opacity:1!important;color:rgb(229 231 235/var(--tw-text-opacity))!important}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.group\/item:hover .group-hover\/item\:opacity-100{opacity:1}:is(.dark .dark\:border-gray-600){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-700){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\:border-white){--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}:is(.dark .dark\:bg-\[\#1A1E26\]){--tw-bg-opacity:1;background-color:rgb(26 30 38/var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#212121\]){--tw-bg-opacity:1;background-color:rgb(33 33 33/var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#353539\]){--tw-bg-opacity:1;background-color:rgb(53 53 57/var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#484848\]){--tw-bg-opacity:1;background-color:rgb(72 72 72/var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#4E4F56\]){--tw-bg-opacity:1;background-color:rgb(78 79 86/var(--tw-bg-opacity))}:is(.dark .dark\:bg-black){--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-100){--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-800){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}:is(.dark .dark\:bg-slate-800){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}:is(.dark .dark\:bg-transparent){background-color:transparent}:is(.dark .dark\:bg-opacity-50){--tw-bg-opacity:0.5}:is(.dark .dark\:bg-gradient-to-r){background-image:linear-gradient(to right,var(--tw-gradient-stops))}:is(.dark .dark\:from-\[\#6a6a6a\]){--tw-gradient-from:#6a6a6a var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,42%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}:is(.dark .dark\:to-\[\#80868f\]){--tw-gradient-to:#80868f var(--tw-gradient-to-position)}:is(.dark .dark\:text-blue-400){--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-100){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-200){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-800){--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}:is(.dark .dark\:text-slate-300){--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .dark\:after\:from-\[\#212121\]):after{content:var(--tw-content);--tw-gradient-from:#212121 var(--tw-gradient-from-position);--tw-gradient-to:rgba(33,33,33,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}:is(.dark .dark\:hover\:border-white:hover){--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}:is(.dark .dark\:hover\:bg-\[\#353539\]:hover){--tw-bg-opacity:1;background-color:rgb(53 53 57/var(--tw-bg-opacity))}@media not all and (min-width:768px){.max-md\:hidden{display:none}}@media (min-width:640px){.sm\:mr-4{margin-right:1rem}.sm\:inline-block{display:inline-block}.sm\:w-1\/2{width:50%}.sm\:w-60{width:15rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.sm\:pb-10{padding-bottom:2.5rem}.sm\:pt-6{padding-top:1.5rem}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:leading-7{line-height:1.75rem}}@media (min-width:768px){.md\:-m-3{margin:-.75rem}.md\:mt-4{margin-top:1rem}.md\:block{display:block}.md\:w-1\/2{width:50%}.md\:gap-4{gap:1rem}.md\:p-3{padding:.75rem}.md\:p-6{padding:1.5rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:pt-10{padding-top:2.5rem}.md\:pt-4{padding-top:1rem}}@media (min-width:1024px){.lg\:w-1\/3{width:33.333333%}.lg\:w-72{width:18rem}.lg\:w-full{width:100%}.lg\:max-w-\[80\%\]{max-width:80%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width:1280px){.xl\:h-full{height:100%}.xl\:w-1\/4{width:25%}.xl\:w-3\/4{width:75%}.xl\:w-full{width:100%}.xl\:gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.xl\:border-l{border-left-width:1px}.xl\:border-t-0{border-top-width:0}.xl\:pl-4{padding-left:1rem}.xl\:pr-4{padding-right:1rem}}#nprogress{pointer-events:none}#nprogress .bar{background:var(--joy-palette-primary-500,#096bde);position:fixed;z-index:10031;top:0;left:0;width:100%;height:3px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px var(--joy-palette-primary-500,#096bde),0 0 5px var(--joy-palette-primary-500,#096bde);opacity:1;transform:rotate(3deg) translateY(-4px)} \ No newline at end of file diff --git a/pilot/server/static/_next/static/css/d07b94ffd4f33c05.css b/pilot/server/static/_next/static/css/d07b94ffd4f33c05.css new file mode 100644 index 000000000..ab5ef8da0 --- /dev/null +++ b/pilot/server/static/_next/static/css/d07b94ffd4f33c05.css @@ -0,0 +1,3 @@ +/* +! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com +*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Josefin Sans,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.bottom-32{bottom:8rem}.bottom-4{bottom:1rem}.left-0{left:0}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-4{top:1rem}.z-10{z-index:10}.-m-1{margin:-.25rem}.m-6{margin:1.5rem}.\!my-6{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.\!mb-2{margin-bottom:.5rem!important}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-8{margin-bottom:2rem}.ml-10{margin-left:2.5rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-8{margin-top:2rem}.line-clamp-1{-webkit-line-clamp:1}.line-clamp-1,.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical}.line-clamp-2{-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2\/5{height:40%}.h-3\/5{height:60%}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-96{height:24rem}.h-\[300px\]{height:300px}.h-\[46px\]{height:46px}.h-\[500px\]{height:500px}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:24rem}.max-h-full{max-height:100%}.max-h-screen{max-height:100vh}.min-h-\[1rem\]{min-height:1rem}.min-h-full{min-height:100%}.w-11{width:2.75rem}.w-12{width:3rem}.w-20{width:5rem}.w-36{width:9rem}.w-48{width:12rem}.w-52{width:13rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-\[63px\]{width:63px}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-\[200px\]{min-width:200px}.min-w-\[240px\]{min-width:240px}.min-w-min{min-width:-moz-min-content;min-width:min-content}.max-w-3xl{max-width:48rem}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow-0{flex-grow:0}.rotate-90{--tw-rotate:90deg}.rotate-90,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fade{0%{opacity:0}to{opacity:1}}.animate-fade{animation:fade 1s both}.cursor-no-drop{cursor:no-drop}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-5{row-gap:1.25rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-tl-md{border-top-left-radius:.375rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-tr-md{border-top-right-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t,.border-t-\[1px\]{border-top-width:1px}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#f0f0f0\]{--tw-border-opacity:1;border-color:rgb(240 240 240/var(--tw-border-opacity))}.border-\[var\(--joy-palette-divider\)\]{border-color:var(--joy-palette-divider)}.border-blue-600{--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.bg-\[\#E6F4FF\]{--tw-bg-opacity:1;background-color:rgb(230 244 255/var(--tw-bg-opacity))}.bg-\[\#FAFAFA\]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.bg-\[\#FFFFFF\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-\[\#fafafa\]{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#31afff\]{--tw-gradient-from:#31afff var(--tw-gradient-from-position);--tw-gradient-to:rgba(49,175,255,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-\[\#1677ff\]{--tw-gradient-to:#1677ff var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[6px\]{padding-left:6px;padding-right:6px}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-\[2px\]{padding-top:2px;padding-bottom:2px}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-0{padding-left:0}.pl-0\.5{padding-left:.125rem}.pl-2{padding-left:.5rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.\!text-left{text-align:left!important}.\!text-2xl{font-size:1.5rem!important;line-height:2rem!important}.\!text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.\!text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-8{line-height:2rem}.\!text-\[\#878c93\]{--tw-text-opacity:1!important;color:rgb(135 140 147/var(--tw-text-opacity))!important}.\!text-green-600{--tw-text-opacity:1!important;color:rgb(22 163 74/var(--tw-text-opacity))!important}.\!text-orange-600{--tw-text-opacity:1!important;color:rgb(234 88 12/var(--tw-text-opacity))!important}.\!text-red-600{--tw-text-opacity:1!important;color:rgb(220 38 38/var(--tw-text-opacity))!important}.text-\[\#1677FE\]{--tw-text-opacity:1;color:rgb(22 119 254/var(--tw-text-opacity))}.text-\[\#1677ff\]{--tw-text-opacity:1;color:rgb(22 119 255/var(--tw-text-opacity))}.text-\[\#2AA3FF\]{--tw-text-opacity:1;color:rgb(42 163 255/var(--tw-text-opacity))}.text-\[\#ff1b2e\]{--tw-text-opacity:1;color:rgb(255 27 46/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.opacity-0{opacity:0}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.grayscale{--tw-grayscale:grayscale(100%)}.filter,.grayscale{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.animate-duration-200{animation-duration:.2s}.animate-duration-300{animation-duration:.3s}body{margin:0;color:var(--joy-palette-text-primary,var(--joy-palette-neutral-800,#25252d));font-family:var(--joy-fontFamily-body,var(--joy-Josefin Sans,sans-serif));font-size:var(--joy-fontSize-md,1rem);line-height:var(--joy-lineHeight-md,1.5);background-color:var(--joy-palette-background-body)}body .ant-btn-primary{background-color:#1677ff}.ant-pagination .ant-pagination-next *,.ant-pagination .ant-pagination-prev *{color:#279bff!important}.ant-pagination .ant-pagination-item a{color:#b0b0bf}.ant-pagination .ant-pagination-item.ant-pagination-item-active{background-color:#279bff!important}.ant-pagination .ant-pagination-item.ant-pagination-item-active a{color:#fff!important}table tr td{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}::-webkit-scrollbar{display:none}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb{background:#888}::-webkit-scrollbar-thumb:hover{background:#555}.dark :where(.css-dev-only-do-not-override-18iikkb).ant-tabs .ant-tabs-tab-btn{color:#fff}:where(.css-dev-only-do-not-override-18iikkb).ant-form-item .ant-form-item-label>label{height:36px}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-top-8:after{content:var(--tw-content);top:-2rem}.after\:h-8:after{content:var(--tw-content);height:2rem}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:bg-gradient-to-t:after{content:var(--tw-content);background-image:linear-gradient(to top,var(--tw-gradient-stops))}.after\:from-white:after{content:var(--tw-content);--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.after\:to-transparent:after{content:var(--tw-content);--tw-gradient-to:transparent var(--tw-gradient-to-position)}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.hover\:\!text-gray-200:hover{--tw-text-opacity:1!important;color:rgb(229 231 235/var(--tw-text-opacity))!important}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.group\/item:hover .group-hover\/item\:opacity-100{opacity:1}:is(.dark .dark\:border-gray-600){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}:is(.dark .dark\:border-gray-700){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}:is(.dark .dark\:border-white){--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}:is(.dark .dark\:bg-\[\#1A1E26\]){--tw-bg-opacity:1;background-color:rgb(26 30 38/var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#212121\]){--tw-bg-opacity:1;background-color:rgb(33 33 33/var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#353539\]){--tw-bg-opacity:1;background-color:rgb(53 53 57/var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#484848\]){--tw-bg-opacity:1;background-color:rgb(72 72 72/var(--tw-bg-opacity))}:is(.dark .dark\:bg-\[\#4E4F56\]){--tw-bg-opacity:1;background-color:rgb(78 79 86/var(--tw-bg-opacity))}:is(.dark .dark\:bg-black){--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-100){--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}:is(.dark .dark\:bg-slate-800){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}:is(.dark .dark\:bg-transparent){background-color:transparent}:is(.dark .dark\:bg-opacity-50){--tw-bg-opacity:0.5}:is(.dark .dark\:bg-gradient-to-r){background-image:linear-gradient(to right,var(--tw-gradient-stops))}:is(.dark .dark\:from-\[\#6a6a6a\]){--tw-gradient-from:#6a6a6a var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,42%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}:is(.dark .dark\:to-\[\#80868f\]){--tw-gradient-to:#80868f var(--tw-gradient-to-position)}:is(.dark .dark\:text-blue-400){--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-100){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-200){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-300){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-400){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}:is(.dark .dark\:text-gray-800){--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}:is(.dark .dark\:text-slate-300){--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:is(.dark .dark\:after\:from-\[\#212121\]):after{content:var(--tw-content);--tw-gradient-from:#212121 var(--tw-gradient-from-position);--tw-gradient-to:rgba(33,33,33,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}:is(.dark .dark\:hover\:border-white:hover){--tw-border-opacity:1;border-color:rgb(255 255 255/var(--tw-border-opacity))}:is(.dark .dark\:hover\:bg-\[\#353539\]:hover){--tw-bg-opacity:1;background-color:rgb(53 53 57/var(--tw-bg-opacity))}@media not all and (min-width:768px){.max-md\:hidden{display:none}}@media (min-width:640px){.sm\:mr-4{margin-right:1rem}.sm\:inline-block{display:inline-block}.sm\:w-1\/2{width:50%}.sm\:w-60{width:15rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:py-4{padding-top:1rem;padding-bottom:1rem}.sm\:pb-10{padding-bottom:2.5rem}.sm\:pt-6{padding-top:1.5rem}.sm\:text-base{font-size:1rem;line-height:1.5rem}.sm\:leading-7{line-height:1.75rem}}@media (min-width:768px){.md\:-m-3{margin:-.75rem}.md\:block{display:block}.md\:w-1\/2{width:50%}.md\:gap-4{gap:1rem}.md\:p-3{padding:.75rem}.md\:p-6{padding:1.5rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:pt-10{padding-top:2.5rem}}@media (min-width:1024px){.lg\:w-1\/3{width:33.333333%}.lg\:w-72{width:18rem}.lg\:w-full{width:100%}.lg\:max-w-\[80\%\]{max-width:80%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width:1280px){.xl\:h-full{height:100%}.xl\:w-1\/4{width:25%}.xl\:w-3\/4{width:75%}.xl\:w-full{width:100%}.xl\:gap-x-5{-moz-column-gap:1.25rem;column-gap:1.25rem}.xl\:border-l{border-left-width:1px}.xl\:border-t-0{border-top-width:0}.xl\:pl-4{padding-left:1rem}.xl\:pr-4{padding-right:1rem}}#nprogress{pointer-events:none}#nprogress .bar{background:var(--joy-palette-primary-500,#096bde);position:fixed;z-index:10031;top:0;left:0;width:100%;height:3px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px var(--joy-palette-primary-500,#096bde),0 0 5px var(--joy-palette-primary-500,#096bde);opacity:1;transform:rotate(3deg) translateY(-4px)} \ No newline at end of file diff --git a/pilot/server/static/agent/index.html b/pilot/server/static/agent/index.html index c2a4517ca..f404e1b83 100644 --- a/pilot/server/static/agent/index.html +++ b/pilot/server/static/agent/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/chat/[scene]/[id]/index.html b/pilot/server/static/chat/[scene]/[id]/index.html index e54d94c6f..225fbdada 100644 --- a/pilot/server/static/chat/[scene]/[id]/index.html +++ b/pilot/server/static/chat/[scene]/[id]/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/chat/index.html b/pilot/server/static/chat/index.html index b54d6a995..001194af6 100644 --- a/pilot/server/static/chat/index.html +++ b/pilot/server/static/chat/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/database/index.html b/pilot/server/static/database/index.html index b5a8b240b..e6572f6e8 100644 --- a/pilot/server/static/database/index.html +++ b/pilot/server/static/database/index.html @@ -1 +1 @@ -
MySQL

MySQL

Comming soon

Fast, reliable, scalable open-source relational database management system.

MSSQL

MSSQL

Comming soon

Powerful, scalable, secure relational database system by Microsoft.

DuckDB

DuckDB

Comming soon

In-memory analytical database with efficient query processing.

Sqlite

Sqlite

Comming soon

Lightweight embedded relational database with simplicity and portability.

ClickHouse

ClickHouse

Comming soon

Columnar database for high-performance analytics and real-time queries.

Oracle

Oracle

Comming soon

Robust, scalable, secure relational database widely used in enterprises.

Access

Access

Comming soon

Easy-to-use relational database for small-scale applications by Microsoft.

MongoDB

MongoDB

Comming soon

Flexible, scalable NoSQL document database for web and mobile apps.

DB2

DB2

Comming soon

Scalable, secure relational database system developed by IBM.

HBase

HBase

Comming soon

Distributed, scalable NoSQL database for large structured/semi-structured data.

Redis

Redis

Comming soon

Fast, versatile in-memory data structure store as cache, DB, or broker.

Cassandra

Cassandra

Comming soon

Scalable, fault-tolerant distributed NoSQL database for large data.

Couchbase

Couchbase

Comming soon

High-performance NoSQL document database with distributed architecture.

PostgreSQL

PostgreSQL

Comming soon

Powerful open-source relational database with extensibility and SQL standards.

Spark

Spark

Comming soon

Unified engine for large-scale data analytics.

\ No newline at end of file +
MySQL

MySQL

Fast, reliable, scalable open-source relational database management system.

MSSQL

MSSQL

Powerful, scalable, secure relational database system by Microsoft.

DuckDB

DuckDB

In-memory analytical database with efficient query processing.

Sqlite

Sqlite

Lightweight embedded relational database with simplicity and portability.

ClickHouse

ClickHouse

Columnar database for high-performance analytics and real-time queries.

Oracle

Oracle

Robust, scalable, secure relational database widely used in enterprises.

Access

Access

Easy-to-use relational database for small-scale applications by Microsoft.

MongoDB

MongoDB

Flexible, scalable NoSQL document database for web and mobile apps.

DB2

DB2

Scalable, secure relational database system developed by IBM.

HBase

HBase

Distributed, scalable NoSQL database for large structured/semi-structured data.

Redis

Redis

Fast, versatile in-memory data structure store as cache, DB, or broker.

Cassandra

Cassandra

Scalable, fault-tolerant distributed NoSQL database for large data.

Couchbase

Couchbase

High-performance NoSQL document database with distributed architecture.

PostgreSQL

PostgreSQL

Powerful open-source relational database with extensibility and SQL standards.

Spark

Spark

Unified engine for large-scale data analytics.

\ No newline at end of file diff --git a/pilot/server/static/index.html b/pilot/server/static/index.html index 7f9854512..b6bb6988c 100644 --- a/pilot/server/static/index.html +++ b/pilot/server/static/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/knowledge/chunk/index.html b/pilot/server/static/knowledge/chunk/index.html index d433f8455..54f5d89d1 100644 --- a/pilot/server/static/knowledge/chunk/index.html +++ b/pilot/server/static/knowledge/chunk/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/knowledge/index.html b/pilot/server/static/knowledge/index.html index 002abb7da..d6b7ff5e0 100644 --- a/pilot/server/static/knowledge/index.html +++ b/pilot/server/static/knowledge/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/models/index.html b/pilot/server/static/models/index.html index 976255961..4faeabdda 100644 --- a/pilot/server/static/models/index.html +++ b/pilot/server/static/models/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/pilot/server/static/prompt/index.html b/pilot/server/static/prompt/index.html index 399c4565c..f844c93a1 100644 --- a/pilot/server/static/prompt/index.html +++ b/pilot/server/static/prompt/index.html @@ -1 +1 @@ -
NameSceneSub SceneContentOperation
No data
\ No newline at end of file +
NameSceneSub SceneContentOperation
No data
\ No newline at end of file