diff --git a/dbgpt/app/base.py b/dbgpt/app/base.py index e5a371870..ec392875b 100644 --- a/dbgpt/app/base.py +++ b/dbgpt/app/base.py @@ -8,6 +8,7 @@ from dbgpt._private.config import Config from dbgpt.component import SystemApp +from dbgpt.storage import DBType from dbgpt.util.parameter_utils import BaseParameters ROOT_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) @@ -31,7 +32,6 @@ def async_db_summary(system_app: SystemApp): def server_init(param: "WebServerParameters", system_app: SystemApp): - # logger.info(f"args: {args}") # init config cfg = Config() @@ -105,13 +105,16 @@ def _initialize_db( from urllib.parse import quote_plus as urlquote from dbgpt.configs.model_config import PILOT_PATH + from dbgpt.datasource.rdbms.dialect.oceanbase.ob_dialect import ( # noqa: F401 + OBDialect, + ) from dbgpt.storage.metadata.db_manager import initialize_db CFG = Config() db_name = CFG.LOCAL_DB_NAME default_meta_data_path = os.path.join(PILOT_PATH, "meta_data") os.makedirs(default_meta_data_path, exist_ok=True) - if CFG.LOCAL_DB_TYPE == "mysql": + if CFG.LOCAL_DB_TYPE == DBType.MySQL.value(): db_url = ( f"mysql+pymysql://{quote(CFG.LOCAL_DB_USER)}:" f"{urlquote(CFG.LOCAL_DB_PASSWORD)}@" @@ -121,6 +124,15 @@ def _initialize_db( ) # Try to create database, if failed, will raise exception _create_mysql_database(db_name, db_url, try_to_create_db) + elif CFG.LOCAL_DB_TYPE == DBType.OceanBase.value(): + db_url = ( + f"mysql+ob://{quote(CFG.LOCAL_DB_USER)}:" + f"{urlquote(CFG.LOCAL_DB_PASSWORD)}@" + f"{CFG.LOCAL_DB_HOST}:" + f"{str(CFG.LOCAL_DB_PORT)}/" + f"{db_name}?charset=utf8mb4" + ) + _create_mysql_database(db_name, db_url, try_to_create_db) else: sqlite_db_path = os.path.join(default_meta_data_path, f"{db_name}.db") db_url = f"sqlite:///{sqlite_db_path}" diff --git a/dbgpt/app/static/404.html b/dbgpt/app/static/404.html index 007b5434c..ebef3c1c2 100644 --- a/dbgpt/app/static/404.html +++ b/dbgpt/app/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/dbgpt/app/static/404/index.html b/dbgpt/app/static/404/index.html index 007b5434c..ebef3c1c2 100644 --- a/dbgpt/app/static/404/index.html +++ b/dbgpt/app/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/dbgpt/app/static/_next/static/Q_H6GwK11oUGrF3tq9O8x/_buildManifest.js b/dbgpt/app/static/_next/static/LQoR86Gp1MW_leEBmkfhZ/_buildManifest.js similarity index 97% rename from dbgpt/app/static/_next/static/Q_H6GwK11oUGrF3tq9O8x/_buildManifest.js rename to dbgpt/app/static/_next/static/LQoR86Gp1MW_leEBmkfhZ/_buildManifest.js index 81d76bc06..e65f8f930 100644 --- a/dbgpt/app/static/_next/static/Q_H6GwK11oUGrF3tq9O8x/_buildManifest.js +++ b/dbgpt/app/static/_next/static/LQoR86Gp1MW_leEBmkfhZ/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(s,c,a,e,t,n,f,d,k,h,i,u,b,j,p,g,o,l,r,_){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[p,s,c,e,a,f,h,d,g,"static/chunks/9305-f44429d5185a9fc7.js","static/chunks/1353-705aa47cc2b94999.js","static/chunks/pages/index-0b2d61c1c6358f20.js"],"/_error":["static/chunks/pages/_error-8095ba9e1bf12f30.js"],"/agent":[s,c,a,t,h,n,"static/chunks/pages/agent-2be7990da37f5165.js"],"/app":[i,s,c,e,a,t,n,u,b,o,j,"static/chunks/pages/app-8154f6fcced2f743.js"],"/chat":["static/chunks/pages/chat-5794854c0948b84c.js"],"/database":[s,c,e,a,t,n,d,k,"static/chunks/3718-e111d727d432bdd2.js","static/chunks/pages/database-7384ab94b08f23ff.js"],"/flow":[i,s,c,a,u,b,o,j,"static/chunks/pages/flow-33fe9f396642fb4c.js"],"/flow/canvas":[p,i,s,c,e,a,f,d,u,k,b,l,g,"static/chunks/1425-6e94ae18b1ac5a70.js",j,"static/chunks/pages/flow/canvas-644b6ee718585173.js"],"/knowledge":[r,s,c,e,a,t,h,n,d,k,_,l,"static/chunks/5237-1d36a3742424b75e.js","static/chunks/pages/knowledge-223d50e9531bd961.js"],"/knowledge/chunk":[s,e,t,f,n,"static/chunks/pages/knowledge/chunk-625a32aed5f380e2.js"],"/knowledge/graph":["static/chunks/90912e1b-ed32608ee46ab40f.js","static/chunks/193-5e83ce3fd4f165ef.js","static/chunks/pages/knowledge/graph-9fb1ec6bf06d5108.js"],"/models":[r,s,c,e,a,k,"static/chunks/3444-30181eacc7980e66.js","static/chunks/pages/models-446238c56e41aa1b.js"],"/prompt":[s,c,e,a,f,_,"static/chunks/7184-3ca3f58327a6986a.js","static/chunks/7869-1a99e25b182b3eaa.js","static/chunks/pages/prompt-c44ac718b4d637c9.js"],sortedPages:["/","/_app","/_error","/agent","/app","/chat","/database","/flow","/flow/canvas","/knowledge","/knowledge/chunk","/knowledge/graph","/models","/prompt"]}}("static/chunks/2185-30f9d0578fa0d631.js","static/chunks/5503-c65f6d730754acc7.js","static/chunks/9479-21f588e1fd4e6b6d.js","static/chunks/1009-4b2af86bde623424.js","static/chunks/785-c3544abc036fc97d.js","static/chunks/5813-c6244a8eba7ef4ae.js","static/chunks/1647-8683da4db89d68c1.js","static/chunks/411-b5d3e7f64bee2335.js","static/chunks/8928-0e78def492052d13.js","static/chunks/4553-61740188e6a650a8.js","static/chunks/971df74e-7436ff4085ebb785.js","static/chunks/7434-29506257e67e8077.js","static/chunks/9924-5bce555f07385e1f.js","static/css/b4846eed11c4725f.css","static/chunks/29107295-75edf0bf34e24b1e.js","static/chunks/2487-cda9d2a2fd712a15.js","static/chunks/6165-93d23bc520382b2c.js","static/chunks/2282-96412afca1591c9a.js","static/chunks/75fc9c18-1d6133135d3d283c.js","static/chunks/5733-7ef320ab0f876a5e.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,f,d,k,h,i,u,b,j,p,g,o,l,r,_){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[p,s,c,e,a,f,h,d,g,"static/chunks/9305-f44429d5185a9fc7.js","static/chunks/1353-705aa47cc2b94999.js","static/chunks/pages/index-11135322ea50180f.js"],"/_error":["static/chunks/pages/_error-8095ba9e1bf12f30.js"],"/agent":[s,c,a,t,h,n,"static/chunks/pages/agent-2be7990da37f5165.js"],"/app":[i,s,c,e,a,t,n,u,b,o,j,"static/chunks/pages/app-8154f6fcced2f743.js"],"/chat":["static/chunks/pages/chat-5794854c0948b84c.js"],"/database":[s,c,e,a,t,n,d,k,"static/chunks/3718-e111d727d432bdd2.js","static/chunks/pages/database-7384ab94b08f23ff.js"],"/flow":[i,s,c,a,u,b,o,j,"static/chunks/pages/flow-33fe9f396642fb4c.js"],"/flow/canvas":[p,i,s,c,e,a,f,d,u,k,b,l,g,"static/chunks/1425-6e94ae18b1ac5a70.js",j,"static/chunks/pages/flow/canvas-644b6ee718585173.js"],"/knowledge":[r,s,c,e,a,t,h,n,d,k,_,l,"static/chunks/5237-1d36a3742424b75e.js","static/chunks/pages/knowledge-223d50e9531bd961.js"],"/knowledge/chunk":[s,e,t,f,n,"static/chunks/pages/knowledge/chunk-625a32aed5f380e2.js"],"/knowledge/graph":["static/chunks/90912e1b-ed32608ee46ab40f.js","static/chunks/193-5e83ce3fd4f165ef.js","static/chunks/pages/knowledge/graph-9fb1ec6bf06d5108.js"],"/models":[r,s,c,e,a,k,"static/chunks/3444-30181eacc7980e66.js","static/chunks/pages/models-446238c56e41aa1b.js"],"/prompt":[s,c,e,a,f,_,"static/chunks/7184-3ca3f58327a6986a.js","static/chunks/7869-1a99e25b182b3eaa.js","static/chunks/pages/prompt-c44ac718b4d637c9.js"],sortedPages:["/","/_app","/_error","/agent","/app","/chat","/database","/flow","/flow/canvas","/knowledge","/knowledge/chunk","/knowledge/graph","/models","/prompt"]}}("static/chunks/2185-30f9d0578fa0d631.js","static/chunks/5503-c65f6d730754acc7.js","static/chunks/9479-21f588e1fd4e6b6d.js","static/chunks/1009-4b2af86bde623424.js","static/chunks/785-c3544abc036fc97d.js","static/chunks/5813-c6244a8eba7ef4ae.js","static/chunks/1647-8683da4db89d68c1.js","static/chunks/411-b5d3e7f64bee2335.js","static/chunks/8928-0e78def492052d13.js","static/chunks/4553-61740188e6a650a8.js","static/chunks/971df74e-7436ff4085ebb785.js","static/chunks/7434-29506257e67e8077.js","static/chunks/9924-5bce555f07385e1f.js","static/css/b4846eed11c4725f.css","static/chunks/29107295-75edf0bf34e24b1e.js","static/chunks/2487-cda9d2a2fd712a15.js","static/chunks/6165-93d23bc520382b2c.js","static/chunks/2282-96412afca1591c9a.js","static/chunks/75fc9c18-1d6133135d3d283c.js","static/chunks/5733-7ef320ab0f876a5e.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/dbgpt/app/static/_next/static/Q_H6GwK11oUGrF3tq9O8x/_ssgManifest.js b/dbgpt/app/static/_next/static/LQoR86Gp1MW_leEBmkfhZ/_ssgManifest.js similarity index 100% rename from dbgpt/app/static/_next/static/Q_H6GwK11oUGrF3tq9O8x/_ssgManifest.js rename to dbgpt/app/static/_next/static/LQoR86Gp1MW_leEBmkfhZ/_ssgManifest.js diff --git a/dbgpt/app/static/_next/static/chunks/4134.d59cf294103a4db2.js b/dbgpt/app/static/_next/static/chunks/4134.9b26203bb9dbe0fb.js similarity index 90% rename from dbgpt/app/static/_next/static/chunks/4134.d59cf294103a4db2.js rename to dbgpt/app/static/_next/static/chunks/4134.9b26203bb9dbe0fb.js index c67f73a44..3dddc62d1 100644 --- a/dbgpt/app/static/_next/static/chunks/4134.d59cf294103a4db2.js +++ b/dbgpt/app/static/_next/static/chunks/4134.9b26203bb9dbe0fb.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4134],{12545:function(e,t,l){l.r(t),l.d(t,{default:function(){return eF}});var a=l(85893),s=l(67294),r=l(2093),n=l(43446),o=l(39332),c=l(74434),i=l(24019),d=l(50888),u=l(97937),m=l(63606),x=l(50228),h=l(87547),p=l(89035),g=l(92975),v=l(12767),f=l(94184),j=l.n(f),b=l(66309),y=l(81799),w=l(41468),N=l(29158),_=l(98165),Z=l(14079),k=l(38426),C=l(45396),S=l(44442),P=l(55241),D=l(39156),E=l(71577),R=l(2453),O=l(57132),I=l(36096),M=l(79166),q=l(93179),A=l(20640),J=l.n(A);function L(e){let{code:t,light:l,dark:r,language:n,customStyle:o}=e,{mode:c}=(0,s.useContext)(w.p);return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(E.ZP,{className:"absolute right-3 top-2 text-gray-300 hover:!text-gray-200 bg-gray-700",type:"text",icon:(0,a.jsx)(O.Z,{}),onClick:()=>{let e=J()(t);R.ZP[e?"success":"error"](e?"Copy success":"Copy failed")}}),(0,a.jsx)(q.Z,{customStyle:o,language:n,style:"dark"===c?null!=r?r:I.Z:null!=l?l:M.Z,children:t})]})}var F=l(14313),z=l(47221),T=function(e){let{data:t}=e;return t&&t.length?(0,a.jsx)(z.Z,{bordered:!0,className:"my-3",expandIcon:e=>{let{isActive:t}=e;return(0,a.jsx)(F.Z,{rotate:t?90:0})},items:t.map((e,t)=>({key:t,label:(0,a.jsxs)("div",{className:"whitespace-normal",children:[(0,a.jsxs)("span",{children:[e.name," - ",e.agent]}),"complete"===e.status?(0,a.jsx)(m.Z,{className:"!text-green-500 ml-2"}):(0,a.jsx)(i.Z,{className:"!text-gray-500 ml-2"})]}),children:(0,a.jsx)(g.D,{components:en,children:e.markdown})}))}):null},G=l(32198),$=function(e){let{data:t}=e;return t&&t.length?(0,a.jsx)(a.Fragment,{children:t.map((e,t)=>(0,a.jsxs)("div",{className:"rounded my-4 md:my-6",children:[(0,a.jsxs)("div",{className:"flex items-center mb-3 text-sm",children:[e.model?(0,y.A)(e.model):(0,a.jsx)("div",{className:"rounded-full w-6 h-6 bg-gray-100"}),(0,a.jsxs)("div",{className:"ml-2 opacity-70",children:[e.sender,(0,a.jsx)(G.Z,{className:"mx-2 text-base"}),e.receiver]})]}),(0,a.jsx)("div",{className:"whitespace-normal text-sm",children:(0,a.jsx)(g.D,{components:en,children:e.markdown})})]},t))}):null},V=l(62418),H=function(e){let{data:t}=e;return(0,a.jsxs)("div",{className:"rounded overflow-hidden",children:[(0,a.jsx)("div",{className:"p-3 text-white bg-red-500 whitespace-normal",children:t.display_type}),(0,a.jsxs)("div",{className:"p-3 bg-red-50",children:[(0,a.jsx)("div",{className:"mb-2 whitespace-normal",children:t.thought}),(0,a.jsx)(L,{code:(0,V._m)(t.sql),language:"sql"})]})]})},U=l(8497),B=function(e){var t;let{data:l,type:s,sql:r}=e,n=(null==l?void 0:l[0])?null===(t=Object.keys(null==l?void 0:l[0]))||void 0===t?void 0:t.map(e=>({title:e,dataIndex:e,key:e})):[],o={key:"chart",label:"Chart",children:(0,a.jsx)(U._,{data:l,chartType:(0,U.a)(s)})},c={key:"sql",label:"SQL",children:(0,a.jsx)(L,{language:"sql",code:(0,V._m)(r)})},i={key:"data",label:"Data",children:(0,a.jsx)(C.Z,{dataSource:l,columns:n,scroll:{x:"auto"}})},d="response_table"===s?[i,c]:[o,c,i];return(0,a.jsx)(S.Z,{defaultActiveKey:"response_table"===s?"data":"chart",items:d,size:"small"})},Q=function(e){let{data:t}=e;return(0,a.jsx)(B,{data:t.data,type:t.type,sql:t.sql})};let W=[[2],[1,2],[1,3],[2,1,2],[2,1,3],[3,1,3],[3,2,3]];var K=function(e){let{data:t}=e,l=(0,s.useMemo)(()=>{if(t.chart_count>1){let e=W[t.chart_count-2],l=0;return e.map(e=>{let a=t.data.slice(l,l+e);return l=e,a})}return[t.data]},[t.data,t.chart_count]);return(0,a.jsx)("div",{className:"flex flex-col gap-3",children:l.map((e,t)=>(0,a.jsx)("div",{className:"flex gap-3",children:e.map((e,t)=>(0,a.jsxs)("div",{className:"flex flex-1 flex-col justify-between p-4 rounded border border-gray-200 dark:border-gray-500 whitespace-normal",children:[(0,a.jsxs)("div",{children:[e.title&&(0,a.jsx)("div",{className:"mb-2 text-lg",children:e.title}),e.describe&&(0,a.jsx)("div",{className:"mb-4 text-sm text-gray-500",children:e.describe})]}),(0,a.jsx)(D._z,{data:e.data,chartType:(0,D.aG)(e.type)})]},"chart-".concat(t)))},"row-".concat(t)))})};let X={todo:{bgClass:"bg-gray-500",icon:(0,a.jsx)(i.Z,{className:"ml-2"})},runing:{bgClass:"bg-blue-500",icon:(0,a.jsx)(d.Z,{className:"ml-2"})},failed:{bgClass:"bg-red-500",icon:(0,a.jsx)(u.Z,{className:"ml-2"})},complete:{bgClass:"bg-green-500",icon:(0,a.jsx)(m.Z,{className:"ml-2"})}};var Y=function(e){var t,l;let{data:s}=e,{bgClass:r,icon:n}=null!==(t=X[s.status])&&void 0!==t?t:{};return(0,a.jsxs)("div",{className:"bg-theme-light dark:bg-theme-dark-container rounded overflow-hidden my-2 flex flex-col lg:max-w-[80%]",children:[(0,a.jsxs)("div",{className:j()("flex px-4 md:px-6 py-2 items-center text-white text-sm",r),children:[s.name,n]}),s.result?(0,a.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm whitespace-normal",children:(0,a.jsx)(g.D,{components:en,rehypePlugins:[v.Z],children:null!==(l=s.result)&&void 0!==l?l:""})}):(0,a.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:s.err_msg})]})},ee=l(76199),et=l(67421),el=l(24136),ea=function(e){let{data:t}=e,{t:l}=(0,et.$G)(),[r,n]=(0,s.useState)(0);return(0,a.jsxs)("div",{className:"bg-[#EAEAEB] rounded overflow-hidden border border-theme-primary dark:bg-theme-dark text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex",children:t.code.map((e,t)=>(0,a.jsxs)("div",{className:j()("px-4 py-2 text-[#121417] dark:text-white cursor-pointer",{"bg-white dark:bg-theme-dark-container":t===r}),onClick:()=>{n(t)},children:["CODE ",t+1,": ",e[0]]},t))}),t.code.length&&(0,a.jsx)(L,{language:t.code[r][0],code:t.code[r][1],customStyle:{maxHeight:300,margin:0},light:el.Z,dark:M.Z})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex",children:(0,a.jsxs)("div",{className:"bg-white dark:bg-theme-dark-container px-4 py-2 text-[#121417] dark:text-white",children:[l("Terminal")," ",t.exit_success?(0,a.jsx)(m.Z,{className:"text-green-600"}):(0,a.jsx)(u.Z,{className:"text-red-600"})]})}),(0,a.jsx)("div",{className:"p-4 max-h-72 overflow-y-auto whitespace-normal bg-white dark:dark:bg-theme-dark",children:(0,a.jsx)(g.D,{components:en,remarkPlugins:[ee.Z],children:t.log})})]})]})};let es=["custom-view","chart-view","references","summary"],er={code(e){let{inline:t,node:l,className:s,children:r,style:n,...o}=e,c=String(r),{context:i,matchValues:d}=function(e){let t=es.reduce((t,l)=>{let a=RegExp("<".concat(l,"[^>]*/?>"),"gi");return e=e.replace(a,e=>(t.push(e),"")),t},[]);return{context:e,matchValues:t}}(c),u=(null==s?void 0:s.replace("language-",""))||"javascript";if("agent-plans"===u)try{let e=JSON.parse(c);return(0,a.jsx)(T,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("agent-messages"===u)try{let e=JSON.parse(c);return(0,a.jsx)($,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("vis-convert-error"===u)try{let e=JSON.parse(c);return(0,a.jsx)(H,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("vis-dashboard"===u)try{let e=JSON.parse(c);return(0,a.jsx)(K,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("vis-chart"===u)try{let e=JSON.parse(c);return(0,a.jsx)(Q,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("vis-plugin"===u)try{let e=JSON.parse(c);return(0,a.jsx)(Y,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("vis-code"===u)try{let e=JSON.parse(c);return(0,a.jsx)(ea,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}return(0,a.jsxs)(a.Fragment,{children:[t?(0,a.jsx)("code",{...o,style:n,className:"p-1 mx-1 rounded bg-theme-light dark:bg-theme-dark text-sm",children:r}):(0,a.jsx)(L,{code:i,language:u}),(0,a.jsx)(g.D,{components:er,rehypePlugins:[v.Z],children:d.join("\n")})]})},ul(e){let{children:t}=e;return(0,a.jsx)("ul",{className:"py-1",children:t})},ol(e){let{children:t}=e;return(0,a.jsx)("ol",{className:"py-1",children:t})},li(e){let{children:t,ordered:l}=e;return(0,a.jsx)("li",{className:"text-sm leading-7 ml-5 pl-2 text-gray-600 dark:text-gray-300 ".concat(l?"list-decimal":"list-disc"),children:t})},table(e){let{children:t}=e;return(0,a.jsx)("table",{className:"my-2 rounded-tl-md rounded-tr-md max-w-full bg-white dark:bg-gray-800 text-sm rounded-lg overflow-hidden",children:t})},thead(e){let{children:t}=e;return(0,a.jsx)("thead",{className:"bg-[#fafafa] dark:bg-black font-semibold",children:t})},th(e){let{children:t}=e;return(0,a.jsx)("th",{className:"!text-left p-4",children:t})},td(e){let{children:t}=e;return(0,a.jsx)("td",{className:"p-4 border-t border-[#f0f0f0] dark:border-gray-700",children:t})},h1(e){let{children:t}=e;return(0,a.jsx)("h3",{className:"text-2xl font-bold my-4 border-b border-slate-300 pb-4",children:t})},h2(e){let{children:t}=e;return(0,a.jsx)("h3",{className:"text-xl font-bold my-3",children:t})},h3(e){let{children:t}=e;return(0,a.jsx)("h3",{className:"text-lg font-semibold my-2",children:t})},h4(e){let{children:t}=e;return(0,a.jsx)("h3",{className:"text-base font-semibold my-1",children:t})},a(e){let{children:t,href:l}=e;return(0,a.jsxs)("div",{className:"inline-block text-blue-600 dark:text-blue-400",children:[(0,a.jsx)(N.Z,{className:"mr-1"}),(0,a.jsx)("a",{href:l,target:"_blank",children:t})]})},img(e){let{src:t,alt:l}=e;return(0,a.jsx)("div",{children:(0,a.jsx)(k.Z,{className:"min-h-[1rem] max-w-full max-h-full border rounded",src:t,alt:l,placeholder:(0,a.jsx)(b.Z,{icon:(0,a.jsx)(_.Z,{spin:!0}),color:"processing",children:"Image Loading..."}),fallback:"/images/fallback.png"})})},blockquote(e){let{children:t}=e;return(0,a.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:t})},"chart-view":function(e){var t,l,s;let r,{content:n,children:o}=e;try{r=JSON.parse(n)}catch(e){console.log(e,n),r={type:"response_table",sql:"",data:[]}}let c=(null==r?void 0:null===(t=r.data)||void 0===t?void 0:t[0])?null===(l=Object.keys(null==r?void 0:null===(s=r.data)||void 0===s?void 0:s[0]))||void 0===l?void 0:l.map(e=>({title:e,dataIndex:e,key:e})):[],i={key:"chart",label:"Chart",children:(0,a.jsx)(D._z,{data:null==r?void 0:r.data,chartType:(0,D.aG)(null==r?void 0:r.type)})},d={key:"sql",label:"SQL",children:(0,a.jsx)(L,{code:(0,V._m)(null==r?void 0:r.sql,"mysql"),language:"sql"})},u={key:"data",label:"Data",children:(0,a.jsx)(C.Z,{dataSource:null==r?void 0:r.data,columns:c})},m=(null==r?void 0:r.type)==="response_table"?[u,d]:[i,d,u];return(0,a.jsxs)("div",{children:[(0,a.jsx)(S.Z,{defaultActiveKey:(null==r?void 0:r.type)==="response_table"?"data":"chart",items:m,size:"small"}),o]})},references:function(e){let t,{title:l,references:s,children:r}=e;if(r)try{l=(t=JSON.parse(r)).title,s=t.references}catch(e){return console.log("parse references failed",e),(0,a.jsx)("p",{className:"text-sm text-red-500",children:"Render Reference Error!"})}else try{s=JSON.parse(s)}catch(e){return console.log("parse references failed",e),(0,a.jsx)("p",{className:"text-sm text-red-500",children:"Render Reference Error!"})}return!s||(null==s?void 0:s.length)<1?null:(0,a.jsxs)("div",{className:"border-t-[1px] border-gray-300 mt-3 py-2",children:[(0,a.jsxs)("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:[(0,a.jsx)(N.Z,{className:"mr-2"}),(0,a.jsx)("span",{className:"font-semibold",children:l})]}),s.map((e,t)=>{var l;return(0,a.jsxs)("div",{className:"text-sm font-normal block ml-2 h-6 leading-6 overflow-hidden",children:[(0,a.jsxs)("span",{className:"inline-block w-6",children:["[",t+1,"]"]}),(0,a.jsx)("span",{className:"mr-2 lg:mr-4 text-blue-400",children:e.name}),null==e?void 0:null===(l=e.chunks)||void 0===l?void 0:l.map((t,l)=>(0,a.jsxs)("span",{children:["object"==typeof t?(0,a.jsx)(P.Z,{content:(0,a.jsxs)("div",{className:"max-w-4xl",children:[(0,a.jsx)("p",{className:"mt-2 font-bold mr-2 border-t border-gray-500 pt-2",children:"Content:"}),(0,a.jsx)("p",{children:(null==t?void 0:t.content)||"No Content"}),(0,a.jsx)("p",{className:"mt-2 font-bold mr-2 border-t border-gray-500 pt-2",children:"MetaData:"}),(0,a.jsx)("p",{children:(null==t?void 0:t.meta_info)||"No MetaData"}),(0,a.jsx)("p",{className:"mt-2 font-bold mr-2 border-t border-gray-500 pt-2",children:"Score:"}),(0,a.jsx)("p",{children:(null==t?void 0:t.recall_score)||""})]}),title:"Chunk Information",children:(0,a.jsx)("span",{className:"cursor-pointer text-blue-500 ml-2",children:null==t?void 0:t.id},"chunk_content_".concat(null==t?void 0:t.id))}):(0,a.jsx)("span",{className:"cursor-pointer text-blue-500 ml-2",children:t},"chunk_id_".concat(t)),l<(null==e?void 0:e.chunks.length)-1&&(0,a.jsx)("span",{children:","},"chunk_comma_".concat(l))]},"chunk_".concat(l)))]},"file_".concat(t))})]})},summary:function(e){let{children:t}=e;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"mb-2",children:[(0,a.jsx)(Z.Z,{className:"mr-2"}),(0,a.jsx)("span",{className:"font-semibold",children:"Document Summary"})]}),(0,a.jsx)("div",{children:t})]})}};var en=er;let eo={todo:{bgClass:"bg-gray-500",icon:(0,a.jsx)(i.Z,{className:"ml-2"})},runing:{bgClass:"bg-blue-500",icon:(0,a.jsx)(d.Z,{className:"ml-2"})},failed:{bgClass:"bg-red-500",icon:(0,a.jsx)(u.Z,{className:"ml-2"})},completed:{bgClass:"bg-green-500",icon:(0,a.jsx)(m.Z,{className:"ml-2"})}};function ec(e){return e.replaceAll("\\n","\n").replace(/]+)>/gi,"").replace(/]+)>/gi,"")}var ei=(0,s.memo)(function(e){let{children:t,content:l,isChartChat:r,onLinkClick:n}=e,{scene:o}=(0,s.useContext)(w.p),{context:c,model_name:i,role:d}=l,u="view"===d,{relations:m,value:f,cachePluginContext:N}=(0,s.useMemo)(()=>{if("string"!=typeof c)return{relations:[],value:"",cachePluginContext:[]};let[e,t]=c.split(" relations:"),l=t?t.split(","):[],a=[],s=0,r=e.replace(/]*>[^<]*<\/dbgpt-view>/gi,e=>{try{var t;let l=e.replaceAll("\n","\\n").replace(/<[^>]*>|<\/[^>]*>/gm,""),r=JSON.parse(l),n="".concat(s,"");return a.push({...r,result:ec(null!==(t=r.result)&&void 0!==t?t:"")}),s++,n}catch(t){return console.log(t.message,t),e}});return{relations:l,cachePluginContext:a,value:r}},[c]),_=(0,s.useMemo)(()=>({"custom-view"(e){var t;let{children:l}=e,s=+l.toString();if(!N[s])return l;let{name:r,status:n,err_msg:o,result:c}=N[s],{bgClass:i,icon:d}=null!==(t=eo[n])&&void 0!==t?t:{};return(0,a.jsxs)("div",{className:"bg-white dark:bg-[#212121] rounded-lg overflow-hidden my-2 flex flex-col lg:max-w-[80%]",children:[(0,a.jsxs)("div",{className:j()("flex px-4 md:px-6 py-2 items-center text-white text-sm",i),children:[r,d]}),c?(0,a.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:(0,a.jsx)(g.D,{components:en,rehypePlugins:[v.Z],children:null!=c?c:""})}):(0,a.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:o})]})}}),[c,N]);return u||c?(0,a.jsxs)("div",{className:j()("relative flex flex-wrap w-full p-2 md:p-4 rounded-xl break-words",{"bg-white dark:bg-[#232734]":u,"lg:w-full xl:w-full pl-0":["chat_with_db_execute","chat_dashboard"].includes(o)}),children:[(0,a.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,y.A)(i)||(0,a.jsx)(x.Z,{}):(0,a.jsx)(h.Z,{})}),(0,a.jsxs)("div",{className:"flex-1 overflow-hidden items-center text-md leading-8 pb-2",children:[!u&&"string"==typeof c&&c,u&&r&&"object"==typeof c&&(0,a.jsxs)("div",{children:["[".concat(c.template_name,"]: "),(0,a.jsxs)("span",{className:"text-theme-primary cursor-pointer",onClick:n,children:[(0,a.jsx)(p.Z,{className:"mr-1"}),c.template_introduce||"More Details"]})]}),u&&"string"==typeof c&&(0,a.jsx)(g.D,{components:{...en,..._},rehypePlugins:[v.Z],children:ec(f)}),!!(null==m?void 0:m.length)&&(0,a.jsx)("div",{className:"flex flex-wrap mt-2",children:null==m?void 0:m.map((e,t)=>(0,a.jsx)(b.Z,{color:"#108ee9",children:e},e+t))})]}),t]}):(0,a.jsx)("div",{className:"h-12"})}),ed=l(59301),eu=l(41132),em=l(74312),ex=l(3414),eh=l(72868),ep=l(59562),eg=l(14553),ev=l(25359),ef=l(7203),ej=l(48665),eb=l(26047),ey=l(99056),ew=l(57814),eN=l(63955),e_=l(33028),eZ=l(40911),ek=l(66478),eC=l(83062),eS=l(89182),eP=e=>{var t;let{conv_index:l,question:r,knowledge_space:n,select_param:o}=e,{t:c}=(0,et.$G)(),{chatId:i}=(0,s.useContext)(w.p),[d,u]=(0,s.useState)(""),[m,x]=(0,s.useState)(4),[h,p]=(0,s.useState)(""),g=(0,s.useRef)(null),[v,f]=R.ZP.useMessage(),j=(0,s.useCallback)((e,t)=>{t?(0,eS.Vx)((0,eS.Eb)(i,l)).then(e=>{var t,l,a,s;let r=null!==(t=e[1])&&void 0!==t?t:{};u(null!==(l=r.ques_type)&&void 0!==l?l:""),x(parseInt(null!==(a=r.score)&&void 0!==a?a:"4")),p(null!==(s=r.messages)&&void 0!==s?s:"")}).catch(e=>{console.log(e)}):(u(""),x(4),p(""))},[i,l]),b=(0,em.Z)(ex.Z)(e=>{let{theme:t}=e;return{backgroundColor:"dark"===t.palette.mode?"#FBFCFD":"#0E0E10",...t.typography["body-sm"],padding:t.spacing(1),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,width:"100%",height:"100%"}});return(0,a.jsxs)(eh.L,{onOpenChange:j,children:[f,(0,a.jsx)(eC.Z,{title:c("Rating"),children:(0,a.jsx)(ep.Z,{slots:{root:eg.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,a.jsx)(ed.Z,{})})}),(0,a.jsxs)(ev.Z,{children:[(0,a.jsx)(ef.Z,{disabled:!0,sx:{minHeight:0}}),(0,a.jsx)(ej.Z,{sx:{width:"100%",maxWidth:350,display:"grid",gap:3,padding:1},children:(0,a.jsx)("form",{onSubmit:e=>{e.preventDefault();let t={conv_uid:i,conv_index:l,question:r,knowledge_space:n,score:m,ques_type:d,messages:h};console.log(t),(0,eS.Vx)((0,eS.VC)({data:t})).then(e=>{v.open({type:"success",content:"save success"})}).catch(e=>{v.open({type:"error",content:"save error"})})},children:(0,a.jsxs)(eb.Z,{container:!0,spacing:.5,columns:13,sx:{flexGrow:1},children:[(0,a.jsx)(eb.Z,{xs:3,children:(0,a.jsx)(b,{children:c("Q_A_Category")})}),(0,a.jsx)(eb.Z,{xs:10,children:(0,a.jsx)(ey.Z,{action:g,value:d,placeholder:"Choose one…",onChange:(e,t)=>u(null!=t?t:""),...d&&{endDecorator:(0,a.jsx)(eg.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,a.jsx)(eu.Z,{})}),indicator:null},sx:{width:"100%"},children:o&&(null===(t=Object.keys(o))||void 0===t?void 0:t.map(e=>(0,a.jsx)(ew.Z,{value:e,children:o[e]},e)))})}),(0,a.jsx)(eb.Z,{xs:3,children:(0,a.jsx)(b,{children:(0,a.jsx)(eC.Z,{title:(0,a.jsx)(ej.Z,{children:(0,a.jsx)("div",{children:c("feed_back_desc")})}),variant:"solid",placement:"left",children:c("Q_A_Rating")})})}),(0,a.jsx)(eb.Z,{xs:10,sx:{pl:0,ml:0},children:(0,a.jsx)(eN.Z,{"aria-label":"Custom",step:1,min:0,max:5,valueLabelFormat:function(e){return({0:c("Lowest"),1:c("Missed"),2:c("Lost"),3:c("Incorrect"),4:c("Verbose"),5:c("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 t;return x(null===(t=e.target)||void 0===t?void 0:t.value)},value:m})}),(0,a.jsx)(eb.Z,{xs:13,children:(0,a.jsx)(e_.Z,{placeholder:c("Please_input_the_text"),value:h,onChange:e=>p(e.target.value),minRows:2,maxRows:4,endDecorator:(0,a.jsx)(eZ.ZP,{level:"body-xs",sx:{ml:"auto"},children:c("input_count")+h.length+c("input_unit")}),sx:{width:"100%",fontSize:14}})}),(0,a.jsx)(eb.Z,{xs:13,children:(0,a.jsx)(ek.Z,{type:"submit",variant:"outlined",sx:{width:"100%",height:"100%"},children:c("submit")})})]})})})]})]})},eD=l(36147),eE=l(96486),eR=l(19409),eO=l(87740),eI=l(80573),eM=(0,s.memo)(function(e){let{content:t}=e,{scene:l}=(0,s.useContext)(w.p),r="view"===t.role;return(0,a.jsx)("div",{className:j()("relative w-full p-2 md:p-4 rounded-xl break-words",{"bg-white dark:bg-[#232734]":r,"lg:w-full xl:w-full pl-0":["chat_with_db_execute","chat_dashboard"].includes(l)}),children:r?(0,a.jsx)(g.D,{components:en,rehypePlugins:[v.Z],children:t.context.replace(/]+)>/gi,"
").replace(/]+)>/gi,"")}):(0,a.jsx)("div",{className:"",children:t.context})})}),eq=l(91085),eA=e=>{var t,l;let{messages:n,onSubmit:i}=e,{dbParam:d,currentDialogue:u,scene:m,model:x,refreshDialogList:h,chatId:p,agent:g,docId:v}=(0,s.useContext)(w.p),{t:f}=(0,et.$G)(),b=(0,o.useSearchParams)(),N=null!==(t=b&&b.get("select_param"))&&void 0!==t?t:"",_=null!==(l=b&&b.get("spaceNameOriginal"))&&void 0!==l?l:"",[Z,k]=(0,s.useState)(!1),[C,S]=(0,s.useState)(!1),[P,D]=(0,s.useState)(n),[E,I]=(0,s.useState)(""),[M,q]=(0,s.useState)(),A=(0,s.useRef)(null),L=(0,s.useMemo)(()=>"chat_dashboard"===m,[m]),F=(0,eI.Z)(),z=(0,s.useMemo)(()=>{switch(m){case"chat_agent":return g;case"chat_excel":return null==u?void 0:u.select_param;case"chat_flow":return N;default:return _||d}},[m,g,u,d,_,N]),T=async e=>{if(!Z&&e.trim()){if("chat_agent"===m&&!g){R.ZP.warning(f("choice_agent_tip"));return}try{k(!0),await i(e,{select_param:null!=z?z:""})}finally{k(!1)}}},G=e=>{try{return JSON.parse(e)}catch(t){return e}},[$,H]=R.ZP.useMessage(),U=async e=>{let t=null==e?void 0:e.replace(/\trelations:.*/g,""),l=J()(t);l?t?$.open({type:"success",content:f("Copy_success")}):$.open({type:"warning",content:f("Copy_nothing")}):$.open({type:"error",content:f("Copry_error")})},B=async()=>{!Z&&v&&(k(!0),await F(v),k(!1))};return(0,r.Z)(async()=>{let e=(0,V.a_)();e&&e.id===p&&(await T(e.message),h(),localStorage.removeItem(V.rU))},[p]),(0,s.useEffect)(()=>{let e=n;L&&(e=(0,eE.cloneDeep)(n).map(e=>((null==e?void 0:e.role)==="view"&&"string"==typeof(null==e?void 0:e.context)&&(e.context=G(null==e?void 0:e.context)),e))),D(e.filter(e=>["view","human"].includes(e.role)))},[L,n]),(0,s.useEffect)(()=>{(0,eS.Vx)((0,eS.Lu)()).then(e=>{var t;q(null!==(t=e[1])&&void 0!==t?t:{})}).catch(e=>{console.log(e)})},[]),(0,s.useEffect)(()=>{setTimeout(()=>{var e;null===(e=A.current)||void 0===e||e.scrollTo(0,A.current.scrollHeight)},50)},[n]),(0,a.jsxs)(a.Fragment,{children:[H,(0,a.jsx)("div",{ref:A,className:"flex flex-1 overflow-y-auto pb-8 w-full flex-col",children:(0,a.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:P.length?P.map((e,t)=>{var l;return"chat_agent"===m?(0,a.jsx)(eM,{content:e},t):(0,a.jsx)(ei,{content:e,isChartChat:L,onLinkClick:()=>{S(!0),I(JSON.stringify(null==e?void 0:e.context,null,2))},children:"view"===e.role&&(0,a.jsxs)("div",{className:"flex w-full border-t border-gray-200 dark:border-theme-dark",children:["chat_knowledge"===m&&e.retry?(0,a.jsxs)(ek.Z,{onClick:B,slots:{root:eg.ZP},slotProps:{root:{variant:"plain",color:"primary"}},children:[(0,a.jsx)(eO.Z,{}),"\xa0",(0,a.jsx)("span",{className:"text-sm",children:f("Retry")})]}):null,(0,a.jsxs)("div",{className:"flex w-full flex-row-reverse",children:[(0,a.jsx)(eP,{select_param:M,conv_index:Math.ceil((t+1)/2),question:null===(l=null==P?void 0:P.filter(t=>(null==t?void 0:t.role)==="human"&&(null==t?void 0:t.order)===e.order)[0])||void 0===l?void 0:l.context,knowledge_space:_||d||""}),(0,a.jsx)(eC.Z,{title:f("Copy"),children:(0,a.jsx)(ek.Z,{onClick:()=>U(null==e?void 0:e.context),slots:{root:eg.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,a.jsx)(O.Z,{})})})]})]})},t)}):(0,a.jsx)(eq.Z,{description:"Start a conversation"})})}),(0,a.jsx)("div",{className:j()("relative after:absolute after:-top-8 after:h-8 after:w-full after:bg-gradient-to-t after:from-theme-light after:to-transparent dark:after:from-theme-dark",{"cursor-not-allowed":"chat_excel"===m&&!(null==u?void 0:u.select_param)}),children:(0,a.jsxs)("div",{className:"flex flex-wrap w-full py-2 sm:pt-6 sm:pb-10 items-center",children:[x&&(0,a.jsx)("div",{className:"mr-2 flex",children:(0,y.A)(x)}),(0,a.jsx)(eR.Z,{loading:Z,onSubmit:T,handleFinish:k})]})}),(0,a.jsx)(eD.default,{title:"JSON Editor",open:C,width:"60%",cancelButtonProps:{hidden:!0},onOk:()=>{S(!1)},onCancel:()=>{S(!1)},children:(0,a.jsx)(c.Z,{className:"w-full h-[500px]",language:"json",value:E})})]})},eJ=l(67772),eL=l(45247),eF=()=>{var e;let t=(0,o.useSearchParams)(),{scene:l,chatId:c,model:i,agent:d,setModel:u,history:m,setHistory:x}=(0,s.useContext)(w.p),h=(0,n.Z)({}),p=null!==(e=t&&t.get("initMessage"))&&void 0!==e?e:"",[g,v]=(0,s.useState)(!1),[f,b]=(0,s.useState)(),y=async()=>{v(!0);let[,e]=await (0,eS.Vx)((0,eS.$i)(c));x(null!=e?e:[]),v(!1)},N=e=>{var t;let l=null===(t=e[e.length-1])||void 0===t?void 0:t.context;if(l)try{let e="string"==typeof l?JSON.parse(l):l;b((null==e?void 0:e.template_name)==="report"?null==e?void 0:e.charts:void 0)}catch(e){b(void 0)}};(0,r.Z)(async()=>{let e=(0,V.a_)();e&&e.id===c||await y()},[p,c]),(0,s.useEffect)(()=>{var e,t;if(!m.length)return;let l=null===(e=null===(t=m.filter(e=>"view"===e.role))||void 0===t?void 0:t.slice(-1))||void 0===e?void 0:e[0];(null==l?void 0:l.model_name)&&u(l.model_name),N(m)},[m.length]),(0,s.useEffect)(()=>()=>{x([])},[]);let _=(0,s.useCallback)((e,t)=>new Promise(a=>{let s=[...m,{role:"human",context:e,model_name:i,order:0,time_stamp:0},{role:"view",context:"",model_name:i,order:0,time_stamp:0}],r=s.length-1;x([...s]),h({data:{...t,chat_mode:l||"chat_normal",model_name:i,user_input:e},chatId:c,onMessage:e=>{(null==t?void 0:t.incremental)?s[r].context+=e:s[r].context=e,x([...s])},onDone:()=>{N(s),a()},onClose:()=>{N(s),a()},onError:e=>{s[r].context=e,x([...s]),a()}})}),[m,h,c,i,d,l]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eL.Z,{visible:g}),(0,a.jsx)(eJ.Z,{refreshHistory:y,modelChange:e=>{u(e)}}),(0,a.jsxs)("div",{className:"px-4 flex flex-1 flex-wrap overflow-hidden relative",children:[!!(null==f?void 0:f.length)&&(0,a.jsx)("div",{className:"w-full pb-4 xl:w-3/4 h-1/2 xl:pr-4 xl:h-full overflow-y-auto",children:(0,a.jsx)(D.ZP,{chartsData:f})}),!(null==f?void 0:f.length)&&"chat_dashboard"===l&&(0,a.jsx)(eq.Z,{className:"w-full xl:w-3/4 h-1/2 xl:h-full"}),(0,a.jsx)("div",{className:j()("flex flex-1 flex-col overflow-hidden",{"px-0 xl:pl-4 h-1/2 w-full xl:w-auto xl:h-full border-t xl:border-t-0 xl:border-l dark:border-gray-800":"chat_dashboard"===l,"h-full lg:px-8":"chat_dashboard"!==l}),children:(0,a.jsx)(eA,{messages:m,onSubmit:_})})]})]})}},19409:function(e,t,l){l.d(t,{Z:function(){return R}});var a=l(85893),s=l(27496),r=l(79531),n=l(71577),o=l(67294),c=l(2487),i=l(83062),d=l(2453),u=l(46735),m=l(55241),x=l(39479),h=l(51009),p=l(58299),g=l(56155),v=l(30119),f=l(67421);let j=e=>{let{data:t,loading:l,submit:s,close:r}=e,{t:n}=(0,f.$G)(),o=e=>()=>{s(e),r()};return(0,a.jsx)("div",{style:{maxHeight:400,overflow:"auto"},children:(0,a.jsx)(c.Z,{dataSource:null==t?void 0:t.data,loading:l,rowKey:e=>e.prompt_name,renderItem:e=>(0,a.jsx)(c.Z.Item,{onClick:o(e.content),children:(0,a.jsx)(i.Z,{title:e.content,children:(0,a.jsx)(c.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:t}=e,{t:l}=(0,f.$G)(),[s,r]=(0,o.useState)(!1),[n,c]=(0,o.useState)("common"),{data:b,loading:y}=(0,g.Z)(()=>(0,v.PR)("/prompt/list",{prompt_type:n}),{refreshDeps:[n],onError:e=>{d.ZP.error(null==e?void 0:e.message)}});return(0,a.jsx)(u.ZP,{theme:{components:{Popover:{minWidth:250}}},children:(0,a.jsx)(m.Z,{title:(0,a.jsx)(x.Z.Item,{label:"Prompt "+l("Type"),children:(0,a.jsx)(h.default,{style:{width:150},value:n,onChange:e=>{c(e)},options:[{label:l("Public")+" Prompts",value:"common"},{label:l("Private")+" Prompts",value:"private"}]})}),content:(0,a.jsx)(j,{data:b,loading:y,submit:t,close:()=>{r(!1)}}),placement:"topRight",trigger:"click",open:s,onOpenChange:e=>{r(e)},children:(0,a.jsx)(i.Z,{title:l("Click_Select")+" Prompt",children:(0,a.jsx)(p.Z,{className:"bottom-[30%]"})})})})},y=l(41468),w=l(89182),N=l(80573),_=l(5392),Z=l(84553);function k(e){let{dbParam:t,setDocId:l}=(0,o.useContext)(y.p),{onUploadFinish:s,handleFinish:r}=e,c=(0,N.Z)(),[i,d]=(0,o.useState)(!1),u=async e=>{d(!0);let a=new FormData;a.append("doc_name",e.file.name),a.append("doc_file",e.file),a.append("doc_type","DOCUMENT");let n=await (0,w.Vx)((0,w.iG)(t||"default",a));if(!n[1]){d(!1);return}l(n[1]),s(),d(!1),null==r||r(!0),await c(n[1]),null==r||r(!1)};return(0,a.jsx)(Z.default,{customRequest:u,showUploadList:!1,maxCount:1,multiple:!1,className:"absolute z-10 top-2 left-2",accept:".pdf,.ppt,.pptx,.xls,.xlsx,.doc,.docx,.txt,.md",children:(0,a.jsx)(n.ZP,{loading:i,size:"small",shape:"circle",icon:(0,a.jsx)(_.Z,{})})})}var C=l(11163),S=l(82353),P=l(1051);function D(e){let{document:t}=e;switch(t.status){case"RUNNING":return(0,a.jsx)(S.Rp,{});case"FINISHED":default:return(0,a.jsx)(S.s2,{});case"FAILED":return(0,a.jsx)(P.Z,{})}}function E(e){let{documents:t,dbParam:l}=e,s=(0,C.useRouter)(),r=e=>{s.push("/knowledge/chunk/?spaceName=".concat(l,"&id=").concat(e))};return(null==t?void 0:t.length)?(0,a.jsx)("div",{className:"absolute flex overflow-scroll h-12 top-[-35px] w-full z-10",children:t.map(e=>{let t;switch(e.status){case"RUNNING":t="#2db7f5";break;case"FINISHED":default:t="#87d068";break;case"FAILED":t="#f50"}return(0,a.jsx)(i.Z,{title:e.result,children:(0,a.jsxs)(n.ZP,{style:{color:t},onClick:()=>{r(e.id)},className:"shrink flex items-center mr-3",children:[(0,a.jsx)(D,{document:e}),e.doc_name]})},e.id)})}):null}var R=function(e){let{children:t,loading:l,onSubmit:c,handleFinish:i,...d}=e,{dbParam:u,scene:m}=(0,o.useContext)(y.p),[x,h]=(0,o.useState)(""),p=(0,o.useMemo)(()=>"chat_knowledge"===m,[m]),[g,v]=(0,o.useState)([]),f=(0,o.useRef)(0);async function j(){if(!u)return null;let[e,t]=await (0,w.Vx)((0,w._Q)(u,{page:1,page_size:f.current}));v(null==t?void 0:t.data)}(0,o.useEffect)(()=>{p&&j()},[u]);let N=async()=>{f.current+=1,await j()};return(0,a.jsxs)("div",{className:"flex-1 relative",children:[(0,a.jsx)(E,{documents:g,dbParam:u}),p&&(0,a.jsx)(k,{handleFinish:i,onUploadFinish:N,className:"absolute z-10 top-2 left-2"}),(0,a.jsx)(r.default.TextArea,{className:"flex-1 ".concat(p?"pl-10":""," pr-10"),size:"large",value:x,autoSize:{minRows:1,maxRows:4},...d,onPressEnter:e=>{if(x.trim()&&13===e.keyCode){if(e.shiftKey){e.preventDefault(),h(e=>e+"\n");return}c(x),setTimeout(()=>{h("")},0)}},onChange:e=>{if("number"==typeof d.maxLength){h(e.target.value.substring(0,d.maxLength));return}h(e.target.value)}}),(0,a.jsx)(n.ZP,{className:"ml-2 flex items-center justify-center absolute right-0 bottom-0",size:"large",type:"text",loading:l,icon:(0,a.jsx)(s.Z,{}),onClick:()=>{c(x)}}),(0,a.jsx)(b,{submit:e=>{h(x+e)}}),t]})}},45247:function(e,t,l){var a=l(85893),s=l(50888);t.Z=function(e){let{visible:t}=e;return t?(0,a.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,a.jsx)(s.Z,{})}):null}},43446:function(e,t,l){var a=l(1375),s=l(2453),r=l(67294),n=l(36353),o=l(41468),c=l(83454);t.Z=e=>{let{queryAgentURL:t="/api/v1/chat/completions"}=e,l=(0,r.useMemo)(()=>new AbortController,[]),{scene:i}=(0,r.useContext)(o.p),d=(0,r.useCallback)(async e=>{let{data:r,chatId:o,onMessage:d,onClose:u,onDone:m,onError:x}=e;if(!(null==r?void 0:r.user_input)&&!(null==r?void 0:r.doc_id)){s.ZP.warning(n.Z.t("no_context_tip"));return}let h={...r,conv_uid:o};if(!h.conv_uid){s.ZP.error("conv_uid 不存在,请刷新后重试");return}try{var p;await (0,a.L)("".concat(null!==(p=c.env.API_BASE_URL)&&void 0!==p?p:"").concat(t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h),signal:l.signal,openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===a.a)return},onclose(){l.abort(),null==u||u()},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t="chat_agent"===i?JSON.parse(t).vis:JSON.parse(t)}catch(e){t.replaceAll("\\n","\n")}"string"==typeof t?"[DONE]"===t?null==m||m():(null==t?void 0:t.startsWith("[ERROR]"))?null==x||x(null==t?void 0:t.replace("[ERROR]","")):null==d||d(t):(null==d||d(t),null==m||m())}})}catch(e){l.abort(),null==x||x("Sorry, We meet some error, please try agin later.",e)}},[t]);return(0,r.useEffect)(()=>()=>{l.abort()},[]),d}},80573:function(e,t,l){var a=l(41468),s=l(67294),r=l(43446),n=l(89182);t.Z=()=>{let{history:e,setHistory:t,chatId:l,model:o,docId:c}=(0,s.useContext)(a.p),i=(0,r.Z)({queryAgentURL:"/knowledge/document/summary"}),d=(0,s.useCallback)(async e=>{let[,a]=await (0,n.Vx)((0,n.$i)(l)),s=[...a,{role:"human",context:"",model_name:o,order:0,time_stamp:0},{role:"view",context:"",model_name:o,order:0,time_stamp:0,retry:!0}],r=s.length-1;t([...s]),await i({data:{doc_id:e||c,model_name:o},chatId:l,onMessage:e=>{s[r].context=e,t([...s])}})},[e,o,c,l]);return d}}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4134],{12545:function(e,t,l){l.r(t),l.d(t,{default:function(){return eF}});var a=l(85893),s=l(67294),r=l(2093),n=l(43446),o=l(39332),c=l(74434),i=l(24019),d=l(50888),u=l(97937),m=l(63606),x=l(50228),h=l(87547),p=l(89035),g=l(92975),v=l(12767),f=l(94184),j=l.n(f),b=l(66309),y=l(81799),w=l(41468),N=l(29158),_=l(98165),Z=l(14079),k=l(38426),C=l(45396),S=l(44442),P=l(55241),D=l(39156),E=l(71577),R=l(2453),O=l(57132),I=l(36096),M=l(79166),q=l(93179),J=l(20640),A=l.n(J);function L(e){let{code:t,light:l,dark:r,language:n,customStyle:o}=e,{mode:c}=(0,s.useContext)(w.p);return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(E.ZP,{className:"absolute right-3 top-2 text-gray-300 hover:!text-gray-200 bg-gray-700",type:"text",icon:(0,a.jsx)(O.Z,{}),onClick:()=>{let e=A()(t);R.ZP[e?"success":"error"](e?"Copy success":"Copy failed")}}),(0,a.jsx)(q.Z,{customStyle:o,language:n,style:"dark"===c?null!=r?r:I.Z:null!=l?l:M.Z,children:t})]})}var F=l(14313),z=l(47221),T=function(e){let{data:t}=e;return t&&t.length?(0,a.jsx)(z.Z,{bordered:!0,className:"my-3",expandIcon:e=>{let{isActive:t}=e;return(0,a.jsx)(F.Z,{rotate:t?90:0})},items:t.map((e,t)=>({key:t,label:(0,a.jsxs)("div",{className:"whitespace-normal",children:[(0,a.jsxs)("span",{children:[e.name," - ",e.agent]}),"complete"===e.status?(0,a.jsx)(m.Z,{className:"!text-green-500 ml-2"}):(0,a.jsx)(i.Z,{className:"!text-gray-500 ml-2"})]}),children:(0,a.jsx)(g.D,{components:en,children:e.markdown})}))}):null},G=l(32198),$=function(e){let{data:t}=e;return t&&t.length?(0,a.jsx)(a.Fragment,{children:t.map((e,t)=>(0,a.jsxs)("div",{className:"rounded my-4 md:my-6",children:[(0,a.jsxs)("div",{className:"flex items-center mb-3 text-sm",children:[e.model?(0,y.A)(e.model):(0,a.jsx)("div",{className:"rounded-full w-6 h-6 bg-gray-100"}),(0,a.jsxs)("div",{className:"ml-2 opacity-70",children:[e.sender,(0,a.jsx)(G.Z,{className:"mx-2 text-base"}),e.receiver]})]}),(0,a.jsx)("div",{className:"whitespace-normal text-sm",children:(0,a.jsx)(g.D,{components:en,children:e.markdown})})]},t))}):null},V=l(62418),H=function(e){let{data:t}=e;return(0,a.jsxs)("div",{className:"rounded overflow-hidden",children:[(0,a.jsx)("div",{className:"p-3 text-white bg-red-500 whitespace-normal",children:t.display_type}),(0,a.jsxs)("div",{className:"p-3 bg-red-50",children:[(0,a.jsx)("div",{className:"mb-2 whitespace-normal",children:t.thought}),(0,a.jsx)(L,{code:(0,V._m)(t.sql),language:"sql"})]})]})},U=l(8497),Q=function(e){var t;let{data:l,type:s,sql:r}=e,n=(null==l?void 0:l[0])?null===(t=Object.keys(null==l?void 0:l[0]))||void 0===t?void 0:t.map(e=>({title:e,dataIndex:e,key:e})):[],o={key:"chart",label:"Chart",children:(0,a.jsx)(U._,{data:l,chartType:(0,U.a)(s)})},c={key:"sql",label:"SQL",children:(0,a.jsx)(L,{language:"sql",code:(0,V._m)(r)})},i={key:"data",label:"Data",children:(0,a.jsx)(C.Z,{dataSource:l,columns:n,scroll:{x:"auto"}})},d="response_table"===s?[i,c]:[o,c,i];return(0,a.jsx)(S.Z,{defaultActiveKey:"response_table"===s?"data":"chart",items:d,size:"small"})},W=function(e){let{data:t}=e;return(0,a.jsx)(Q,{data:t.data,type:t.type,sql:t.sql})};let B=[[2],[1,2],[1,3],[2,1,2],[2,1,3],[3,1,3],[3,2,3]];var K=function(e){let{data:t}=e,l=(0,s.useMemo)(()=>{if(t.chart_count>1){let e=B[t.chart_count-2],l=0;return e.map(e=>{let a=t.data.slice(l,l+e);return l=e,a})}return[t.data]},[t.data,t.chart_count]);return(0,a.jsx)("div",{className:"flex flex-col gap-3",children:l.map((e,t)=>(0,a.jsx)("div",{className:"flex gap-3",children:e.map((e,t)=>(0,a.jsxs)("div",{className:"flex flex-1 flex-col justify-between p-4 rounded border border-gray-200 dark:border-gray-500 whitespace-normal",children:[(0,a.jsxs)("div",{children:[e.title&&(0,a.jsx)("div",{className:"mb-2 text-lg",children:e.title}),e.describe&&(0,a.jsx)("div",{className:"mb-4 text-sm text-gray-500",children:e.describe})]}),(0,a.jsx)(D._z,{data:e.data,chartType:(0,D.aG)(e.type)})]},"chart-".concat(t)))},"row-".concat(t)))})};let X={todo:{bgClass:"bg-gray-500",icon:(0,a.jsx)(i.Z,{className:"ml-2"})},runing:{bgClass:"bg-blue-500",icon:(0,a.jsx)(d.Z,{className:"ml-2"})},failed:{bgClass:"bg-red-500",icon:(0,a.jsx)(u.Z,{className:"ml-2"})},complete:{bgClass:"bg-green-500",icon:(0,a.jsx)(m.Z,{className:"ml-2"})}};var Y=function(e){var t,l;let{data:s}=e,{bgClass:r,icon:n}=null!==(t=X[s.status])&&void 0!==t?t:{};return(0,a.jsxs)("div",{className:"bg-theme-light dark:bg-theme-dark-container rounded overflow-hidden my-2 flex flex-col lg:max-w-[80%]",children:[(0,a.jsxs)("div",{className:j()("flex px-4 md:px-6 py-2 items-center text-white text-sm",r),children:[s.name,n]}),s.result?(0,a.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm whitespace-normal",children:(0,a.jsx)(g.D,{components:en,rehypePlugins:[v.Z],children:null!==(l=s.result)&&void 0!==l?l:""})}):(0,a.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:s.err_msg})]})},ee=l(76199),et=l(67421),el=l(24136),ea=function(e){let{data:t}=e,{t:l}=(0,et.$G)(),[r,n]=(0,s.useState)(0);return(0,a.jsxs)("div",{className:"bg-[#EAEAEB] rounded overflow-hidden border border-theme-primary dark:bg-theme-dark text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex",children:t.code.map((e,t)=>(0,a.jsxs)("div",{className:j()("px-4 py-2 text-[#121417] dark:text-white cursor-pointer",{"bg-white dark:bg-theme-dark-container":t===r}),onClick:()=>{n(t)},children:["CODE ",t+1,": ",e[0]]},t))}),t.code.length&&(0,a.jsx)(L,{language:t.code[r][0],code:t.code[r][1],customStyle:{maxHeight:300,margin:0},light:el.Z,dark:M.Z})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex",children:(0,a.jsxs)("div",{className:"bg-white dark:bg-theme-dark-container px-4 py-2 text-[#121417] dark:text-white",children:[l("Terminal")," ",t.exit_success?(0,a.jsx)(m.Z,{className:"text-green-600"}):(0,a.jsx)(u.Z,{className:"text-red-600"})]})}),(0,a.jsx)("div",{className:"p-4 max-h-72 overflow-y-auto whitespace-normal bg-white dark:dark:bg-theme-dark",children:(0,a.jsx)(g.D,{components:en,remarkPlugins:[ee.Z],children:t.log})})]})]})};let es=["custom-view","chart-view","references","summary"],er={code(e){let{inline:t,node:l,className:s,children:r,style:n,...o}=e,c=String(r),{context:i,matchValues:d}=function(e){let t=es.reduce((t,l)=>{let a=RegExp("<".concat(l,"[^>]*/?>"),"gi");return e=e.replace(a,e=>(t.push(e),"")),t},[]);return{context:e,matchValues:t}}(c),u=(null==s?void 0:s.replace("language-",""))||"javascript";if("agent-plans"===u)try{let e=JSON.parse(c);return(0,a.jsx)(T,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("agent-messages"===u)try{let e=JSON.parse(c);return(0,a.jsx)($,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("vis-convert-error"===u)try{let e=JSON.parse(c);return(0,a.jsx)(H,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("vis-dashboard"===u)try{let e=JSON.parse(c);return(0,a.jsx)(K,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("vis-chart"===u)try{let e=JSON.parse(c);return(0,a.jsx)(W,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("vis-plugin"===u)try{let e=JSON.parse(c);return(0,a.jsx)(Y,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}if("vis-code"===u)try{let e=JSON.parse(c);return(0,a.jsx)(ea,{data:e})}catch(e){return(0,a.jsx)(L,{language:u,code:c})}return(0,a.jsxs)(a.Fragment,{children:[t?(0,a.jsx)("code",{...o,style:n,className:"p-1 mx-1 rounded bg-theme-light dark:bg-theme-dark text-sm",children:r}):(0,a.jsx)(L,{code:i,language:u}),(0,a.jsx)(g.D,{components:er,rehypePlugins:[v.Z],children:d.join("\n")})]})},ul(e){let{children:t}=e;return(0,a.jsx)("ul",{className:"py-1",children:t})},ol(e){let{children:t}=e;return(0,a.jsx)("ol",{className:"py-1",children:t})},li(e){let{children:t,ordered:l}=e;return(0,a.jsx)("li",{className:"text-sm leading-7 ml-5 pl-2 text-gray-600 dark:text-gray-300 ".concat(l?"list-decimal":"list-disc"),children:t})},table(e){let{children:t}=e;return(0,a.jsx)("table",{className:"my-2 rounded-tl-md rounded-tr-md max-w-full bg-white dark:bg-gray-800 text-sm rounded-lg overflow-hidden",children:t})},thead(e){let{children:t}=e;return(0,a.jsx)("thead",{className:"bg-[#fafafa] dark:bg-black font-semibold",children:t})},th(e){let{children:t}=e;return(0,a.jsx)("th",{className:"!text-left p-4",children:t})},td(e){let{children:t}=e;return(0,a.jsx)("td",{className:"p-4 border-t border-[#f0f0f0] dark:border-gray-700",children:t})},h1(e){let{children:t}=e;return(0,a.jsx)("h3",{className:"text-2xl font-bold my-4 border-b border-slate-300 pb-4",children:t})},h2(e){let{children:t}=e;return(0,a.jsx)("h3",{className:"text-xl font-bold my-3",children:t})},h3(e){let{children:t}=e;return(0,a.jsx)("h3",{className:"text-lg font-semibold my-2",children:t})},h4(e){let{children:t}=e;return(0,a.jsx)("h3",{className:"text-base font-semibold my-1",children:t})},a(e){let{children:t,href:l}=e;return(0,a.jsxs)("div",{className:"inline-block text-blue-600 dark:text-blue-400",children:[(0,a.jsx)(N.Z,{className:"mr-1"}),(0,a.jsx)("a",{href:l,target:"_blank",children:t})]})},img(e){let{src:t,alt:l}=e;return(0,a.jsx)("div",{children:(0,a.jsx)(k.Z,{className:"min-h-[1rem] max-w-full max-h-full border rounded",src:t,alt:l,placeholder:(0,a.jsx)(b.Z,{icon:(0,a.jsx)(_.Z,{spin:!0}),color:"processing",children:"Image Loading..."}),fallback:"/images/fallback.png"})})},blockquote(e){let{children:t}=e;return(0,a.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:t})},"chart-view":function(e){var t,l,s;let r,{content:n,children:o}=e;try{r=JSON.parse(n)}catch(e){console.log(e,n),r={type:"response_table",sql:"",data:[]}}let c=(null==r?void 0:null===(t=r.data)||void 0===t?void 0:t[0])?null===(l=Object.keys(null==r?void 0:null===(s=r.data)||void 0===s?void 0:s[0]))||void 0===l?void 0:l.map(e=>({title:e,dataIndex:e,key:e})):[],i={key:"chart",label:"Chart",children:(0,a.jsx)(D._z,{data:null==r?void 0:r.data,chartType:(0,D.aG)(null==r?void 0:r.type)})},d={key:"sql",label:"SQL",children:(0,a.jsx)(L,{code:(0,V._m)(null==r?void 0:r.sql,"mysql"),language:"sql"})},u={key:"data",label:"Data",children:(0,a.jsx)(C.Z,{dataSource:null==r?void 0:r.data,columns:c})},m=(null==r?void 0:r.type)==="response_table"?[u,d]:[i,d,u];return(0,a.jsxs)("div",{children:[(0,a.jsx)(S.Z,{defaultActiveKey:(null==r?void 0:r.type)==="response_table"?"data":"chart",items:m,size:"small"}),o]})},references:function(e){let t,{title:l,references:s,children:r}=e;if(r)try{l=(t=JSON.parse(r)).title,s=t.references}catch(e){return console.log("parse references failed",e),(0,a.jsx)("p",{className:"text-sm text-red-500",children:"Render Reference Error!"})}else try{s=JSON.parse(s)}catch(e){return console.log("parse references failed",e),(0,a.jsx)("p",{className:"text-sm text-red-500",children:"Render Reference Error!"})}return!s||(null==s?void 0:s.length)<1?null:(0,a.jsxs)("div",{className:"border-t-[1px] border-gray-300 mt-3 py-2",children:[(0,a.jsxs)("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-2",children:[(0,a.jsx)(N.Z,{className:"mr-2"}),(0,a.jsx)("span",{className:"font-semibold",children:l})]}),s.map((e,t)=>{var l;return(0,a.jsxs)("div",{className:"text-sm font-normal block ml-2 h-6 leading-6 overflow-hidden",children:[(0,a.jsxs)("span",{className:"inline-block w-6",children:["[",t+1,"]"]}),(0,a.jsx)("span",{className:"mr-2 lg:mr-4 text-blue-400",children:e.name}),null==e?void 0:null===(l=e.chunks)||void 0===l?void 0:l.map((t,l)=>(0,a.jsxs)("span",{children:["object"==typeof t?(0,a.jsx)(P.Z,{content:(0,a.jsxs)("div",{className:"max-w-4xl",children:[(0,a.jsx)("p",{className:"mt-2 font-bold mr-2 border-t border-gray-500 pt-2",children:"Content:"}),(0,a.jsx)("p",{children:(null==t?void 0:t.content)||"No Content"}),(0,a.jsx)("p",{className:"mt-2 font-bold mr-2 border-t border-gray-500 pt-2",children:"MetaData:"}),(0,a.jsx)("p",{children:(null==t?void 0:t.meta_info)||"No MetaData"}),(0,a.jsx)("p",{className:"mt-2 font-bold mr-2 border-t border-gray-500 pt-2",children:"Score:"}),(0,a.jsx)("p",{children:(null==t?void 0:t.recall_score)||""})]}),title:"Chunk Information",children:(0,a.jsx)("span",{className:"cursor-pointer text-blue-500 ml-2",children:null==t?void 0:t.id},"chunk_content_".concat(null==t?void 0:t.id))}):(0,a.jsx)("span",{className:"cursor-pointer text-blue-500 ml-2",children:t},"chunk_id_".concat(t)),l<(null==e?void 0:e.chunks.length)-1&&(0,a.jsx)("span",{children:","},"chunk_comma_".concat(l))]},"chunk_".concat(l)))]},"file_".concat(t))})]})},summary:function(e){let{children:t}=e;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"mb-2",children:[(0,a.jsx)(Z.Z,{className:"mr-2"}),(0,a.jsx)("span",{className:"font-semibold",children:"Document Summary"})]}),(0,a.jsx)("div",{children:t})]})}};var en=er;let eo={todo:{bgClass:"bg-gray-500",icon:(0,a.jsx)(i.Z,{className:"ml-2"})},runing:{bgClass:"bg-blue-500",icon:(0,a.jsx)(d.Z,{className:"ml-2"})},failed:{bgClass:"bg-red-500",icon:(0,a.jsx)(u.Z,{className:"ml-2"})},completed:{bgClass:"bg-green-500",icon:(0,a.jsx)(m.Z,{className:"ml-2"})}};function ec(e){return e.replaceAll("\\n","\n").replace(/]+)>/gi,"
").replace(/]+)>/gi,"")}var ei=(0,s.memo)(function(e){let{children:t,content:l,isChartChat:r,onLinkClick:n}=e,{scene:o}=(0,s.useContext)(w.p),{context:c,model_name:i,role:d}=l,u="view"===d,{relations:m,value:f,cachePluginContext:N}=(0,s.useMemo)(()=>{if("string"!=typeof c)return{relations:[],value:"",cachePluginContext:[]};let[e,t]=c.split(" relations:"),l=t?t.split(","):[],a=[],s=0,r=e.replace(/]*>[^<]*<\/dbgpt-view>/gi,e=>{try{var t;let l=e.replaceAll("\n","\\n").replace(/<[^>]*>|<\/[^>]*>/gm,""),r=JSON.parse(l),n="".concat(s,"");return a.push({...r,result:ec(null!==(t=r.result)&&void 0!==t?t:"")}),s++,n}catch(t){return console.log(t.message,t),e}});return{relations:l,cachePluginContext:a,value:r}},[c]),_=(0,s.useMemo)(()=>({"custom-view"(e){var t;let{children:l}=e,s=+l.toString();if(!N[s])return l;let{name:r,status:n,err_msg:o,result:c}=N[s],{bgClass:i,icon:d}=null!==(t=eo[n])&&void 0!==t?t:{};return(0,a.jsxs)("div",{className:"bg-white dark:bg-[#212121] rounded-lg overflow-hidden my-2 flex flex-col lg:max-w-[80%]",children:[(0,a.jsxs)("div",{className:j()("flex px-4 md:px-6 py-2 items-center text-white text-sm",i),children:[r,d]}),c?(0,a.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:(0,a.jsx)(g.D,{components:en,rehypePlugins:[v.Z],children:null!=c?c:""})}):(0,a.jsx)("div",{className:"px-4 md:px-6 py-4 text-sm",children:o})]})}}),[c,N]);return u||c?(0,a.jsxs)("div",{className:j()("relative flex flex-wrap w-full p-2 md:p-4 rounded-xl break-words",{"bg-white dark:bg-[#232734]":u,"lg:w-full xl:w-full pl-0":["chat_with_db_execute","chat_dashboard"].includes(o)}),children:[(0,a.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,y.A)(i)||(0,a.jsx)(x.Z,{}):(0,a.jsx)(h.Z,{})}),(0,a.jsxs)("div",{className:"flex-1 overflow-hidden items-center text-md leading-8 pb-2",children:[!u&&"string"==typeof c&&c,u&&r&&"object"==typeof c&&(0,a.jsxs)("div",{children:["[".concat(c.template_name,"]: "),(0,a.jsxs)("span",{className:"text-theme-primary cursor-pointer",onClick:n,children:[(0,a.jsx)(p.Z,{className:"mr-1"}),c.template_introduce||"More Details"]})]}),u&&"string"==typeof c&&(0,a.jsx)(g.D,{components:{...en,..._},rehypePlugins:[v.Z],children:ec(f)}),!!(null==m?void 0:m.length)&&(0,a.jsx)("div",{className:"flex flex-wrap mt-2",children:null==m?void 0:m.map((e,t)=>(0,a.jsx)(b.Z,{color:"#108ee9",children:e},e+t))})]}),t]}):(0,a.jsx)("div",{className:"h-12"})}),ed=l(59301),eu=l(41132),em=l(74312),ex=l(3414),eh=l(72868),ep=l(59562),eg=l(14553),ev=l(25359),ef=l(7203),ej=l(48665),eb=l(26047),ey=l(99056),ew=l(57814),eN=l(63955),e_=l(33028),eZ=l(40911),ek=l(66478),eC=l(83062),eS=l(89182),eP=e=>{var t;let{conv_index:l,question:r,knowledge_space:n,select_param:o}=e,{t:c}=(0,et.$G)(),{chatId:i}=(0,s.useContext)(w.p),[d,u]=(0,s.useState)(""),[m,x]=(0,s.useState)(4),[h,p]=(0,s.useState)(""),g=(0,s.useRef)(null),[v,f]=R.ZP.useMessage(),j=(0,s.useCallback)((e,t)=>{t?(0,eS.Vx)((0,eS.Eb)(i,l)).then(e=>{var t,l,a,s;let r=null!==(t=e[1])&&void 0!==t?t:{};u(null!==(l=r.ques_type)&&void 0!==l?l:""),x(parseInt(null!==(a=r.score)&&void 0!==a?a:"4")),p(null!==(s=r.messages)&&void 0!==s?s:"")}).catch(e=>{console.log(e)}):(u(""),x(4),p(""))},[i,l]),b=(0,em.Z)(ex.Z)(e=>{let{theme:t}=e;return{backgroundColor:"dark"===t.palette.mode?"#FBFCFD":"#0E0E10",...t.typography["body-sm"],padding:t.spacing(1),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:4,width:"100%",height:"100%"}});return(0,a.jsxs)(eh.L,{onOpenChange:j,children:[f,(0,a.jsx)(eC.Z,{title:c("Rating"),children:(0,a.jsx)(ep.Z,{slots:{root:eg.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,a.jsx)(ed.Z,{})})}),(0,a.jsxs)(ev.Z,{children:[(0,a.jsx)(ef.Z,{disabled:!0,sx:{minHeight:0}}),(0,a.jsx)(ej.Z,{sx:{width:"100%",maxWidth:350,display:"grid",gap:3,padding:1},children:(0,a.jsx)("form",{onSubmit:e=>{e.preventDefault();let t={conv_uid:i,conv_index:l,question:r,knowledge_space:n,score:m,ques_type:d,messages:h};console.log(t),(0,eS.Vx)((0,eS.VC)({data:t})).then(e=>{v.open({type:"success",content:"save success"})}).catch(e=>{v.open({type:"error",content:"save error"})})},children:(0,a.jsxs)(eb.Z,{container:!0,spacing:.5,columns:13,sx:{flexGrow:1},children:[(0,a.jsx)(eb.Z,{xs:3,children:(0,a.jsx)(b,{children:c("Q_A_Category")})}),(0,a.jsx)(eb.Z,{xs:10,children:(0,a.jsx)(ey.Z,{action:g,value:d,placeholder:"Choose one…",onChange:(e,t)=>u(null!=t?t:""),...d&&{endDecorator:(0,a.jsx)(eg.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,a.jsx)(eu.Z,{})}),indicator:null},sx:{width:"100%"},children:o&&(null===(t=Object.keys(o))||void 0===t?void 0:t.map(e=>(0,a.jsx)(ew.Z,{value:e,children:o[e]},e)))})}),(0,a.jsx)(eb.Z,{xs:3,children:(0,a.jsx)(b,{children:(0,a.jsx)(eC.Z,{title:(0,a.jsx)(ej.Z,{children:(0,a.jsx)("div",{children:c("feed_back_desc")})}),variant:"solid",placement:"left",children:c("Q_A_Rating")})})}),(0,a.jsx)(eb.Z,{xs:10,sx:{pl:0,ml:0},children:(0,a.jsx)(eN.Z,{"aria-label":"Custom",step:1,min:0,max:5,valueLabelFormat:function(e){return({0:c("Lowest"),1:c("Missed"),2:c("Lost"),3:c("Incorrect"),4:c("Verbose"),5:c("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 t;return x(null===(t=e.target)||void 0===t?void 0:t.value)},value:m})}),(0,a.jsx)(eb.Z,{xs:13,children:(0,a.jsx)(e_.Z,{placeholder:c("Please_input_the_text"),value:h,onChange:e=>p(e.target.value),minRows:2,maxRows:4,endDecorator:(0,a.jsx)(eZ.ZP,{level:"body-xs",sx:{ml:"auto"},children:c("input_count")+h.length+c("input_unit")}),sx:{width:"100%",fontSize:14}})}),(0,a.jsx)(eb.Z,{xs:13,children:(0,a.jsx)(ek.Z,{type:"submit",variant:"outlined",sx:{width:"100%",height:"100%"},children:c("submit")})})]})})})]})]})},eD=l(36147),eE=l(96486),eR=l(19409),eO=l(87740),eI=l(80573),eM=(0,s.memo)(function(e){let{content:t}=e,{scene:l}=(0,s.useContext)(w.p),r="view"===t.role;return(0,a.jsx)("div",{className:j()("relative w-full p-2 md:p-4 rounded-xl break-words",{"bg-white dark:bg-[#232734]":r,"lg:w-full xl:w-full pl-0":["chat_with_db_execute","chat_dashboard"].includes(l)}),children:r?(0,a.jsx)(g.D,{components:en,rehypePlugins:[v.Z],children:t.context.replace(/]+)>/gi,"
").replace(/]+)>/gi,"")}):(0,a.jsx)("div",{className:"",children:t.context})})}),eq=l(91085),eJ=e=>{var t,l;let{messages:n,onSubmit:i}=e,{dbParam:d,currentDialogue:u,scene:m,model:x,refreshDialogList:h,chatId:p,agent:g,docId:v}=(0,s.useContext)(w.p),{t:f}=(0,et.$G)(),b=(0,o.useSearchParams)(),N=null!==(t=b&&b.get("select_param"))&&void 0!==t?t:"",_=null!==(l=b&&b.get("spaceNameOriginal"))&&void 0!==l?l:"",[Z,k]=(0,s.useState)(!1),[C,S]=(0,s.useState)(!1),[P,D]=(0,s.useState)(n),[E,I]=(0,s.useState)(""),[M,q]=(0,s.useState)(),J=(0,s.useRef)(null),L=(0,s.useMemo)(()=>"chat_dashboard"===m,[m]),F=(0,eI.Z)(),z=(0,s.useMemo)(()=>{switch(m){case"chat_agent":return g;case"chat_excel":return null==u?void 0:u.select_param;case"chat_flow":return N;default:return _||d}},[m,g,u,d,_,N]),T=async e=>{if(!Z&&e.trim()){if("chat_agent"===m&&!g){R.ZP.warning(f("choice_agent_tip"));return}try{k(!0),await i(e,{select_param:null!=z?z:""})}finally{k(!1)}}},G=e=>{try{return JSON.parse(e)}catch(t){return e}},[$,H]=R.ZP.useMessage(),U=async e=>{let t=null==e?void 0:e.replace(/\trelations:.*/g,""),l=A()(t);l?t?$.open({type:"success",content:f("Copy_success")}):$.open({type:"warning",content:f("Copy_nothing")}):$.open({type:"error",content:f("Copry_error")})},Q=async()=>{!Z&&v&&(k(!0),await F(v),k(!1))};return(0,r.Z)(async()=>{let e=(0,V.a_)();e&&e.id===p&&(await T(e.message),h(),localStorage.removeItem(V.rU))},[p]),(0,s.useEffect)(()=>{let e=n;L&&(e=(0,eE.cloneDeep)(n).map(e=>((null==e?void 0:e.role)==="view"&&"string"==typeof(null==e?void 0:e.context)&&(e.context=G(null==e?void 0:e.context)),e))),D(e.filter(e=>["view","human"].includes(e.role)))},[L,n]),(0,s.useEffect)(()=>{(0,eS.Vx)((0,eS.Lu)()).then(e=>{var t;q(null!==(t=e[1])&&void 0!==t?t:{})}).catch(e=>{console.log(e)})},[]),(0,s.useEffect)(()=>{setTimeout(()=>{var e;null===(e=J.current)||void 0===e||e.scrollTo(0,J.current.scrollHeight)},50)},[n]),(0,a.jsxs)(a.Fragment,{children:[H,(0,a.jsx)("div",{ref:J,className:"flex flex-1 overflow-y-auto pb-8 w-full flex-col",children:(0,a.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:P.length?P.map((e,t)=>{var l;return"chat_agent"===m?(0,a.jsx)(eM,{content:e},t):(0,a.jsx)(ei,{content:e,isChartChat:L,onLinkClick:()=>{S(!0),I(JSON.stringify(null==e?void 0:e.context,null,2))},children:"view"===e.role&&(0,a.jsxs)("div",{className:"flex w-full border-t border-gray-200 dark:border-theme-dark",children:["chat_knowledge"===m&&e.retry?(0,a.jsxs)(ek.Z,{onClick:Q,slots:{root:eg.ZP},slotProps:{root:{variant:"plain",color:"primary"}},children:[(0,a.jsx)(eO.Z,{}),"\xa0",(0,a.jsx)("span",{className:"text-sm",children:f("Retry")})]}):null,(0,a.jsxs)("div",{className:"flex w-full flex-row-reverse",children:[(0,a.jsx)(eP,{select_param:M,conv_index:Math.ceil((t+1)/2),question:null===(l=null==P?void 0:P.filter(t=>(null==t?void 0:t.role)==="human"&&(null==t?void 0:t.order)===e.order)[0])||void 0===l?void 0:l.context,knowledge_space:_||d||""}),(0,a.jsx)(eC.Z,{title:f("Copy"),children:(0,a.jsx)(ek.Z,{onClick:()=>U(null==e?void 0:e.context),slots:{root:eg.ZP},slotProps:{root:{variant:"plain",color:"primary"}},sx:{borderRadius:40},children:(0,a.jsx)(O.Z,{})})})]})]})},t)}):(0,a.jsx)(eq.Z,{description:"Start a conversation"})})}),(0,a.jsx)("div",{className:j()("relative after:absolute after:-top-8 after:h-8 after:w-full after:bg-gradient-to-t after:from-theme-light after:to-transparent dark:after:from-theme-dark",{"cursor-not-allowed":"chat_excel"===m&&!(null==u?void 0:u.select_param)}),children:(0,a.jsxs)("div",{className:"flex flex-wrap w-full py-2 sm:pt-6 sm:pb-10 items-center",children:[x&&(0,a.jsx)("div",{className:"mr-2 flex",children:(0,y.A)(x)}),(0,a.jsx)(eR.Z,{loading:Z,onSubmit:T,handleFinish:k})]})}),(0,a.jsx)(eD.default,{title:"JSON Editor",open:C,width:"60%",cancelButtonProps:{hidden:!0},onOk:()=>{S(!1)},onCancel:()=>{S(!1)},children:(0,a.jsx)(c.Z,{className:"w-full h-[500px]",language:"json",value:E})})]})},eA=l(67772),eL=l(45247),eF=()=>{var e;let t=(0,o.useSearchParams)(),{scene:l,chatId:c,model:i,agent:d,setModel:u,history:m,setHistory:x}=(0,s.useContext)(w.p),h=(0,n.Z)({}),p=null!==(e=t&&t.get("initMessage"))&&void 0!==e?e:"",[g,v]=(0,s.useState)(!1),[f,b]=(0,s.useState)(),y=async()=>{v(!0);let[,e]=await (0,eS.Vx)((0,eS.$i)(c));x(null!=e?e:[]),v(!1)},N=e=>{var t;let l=null===(t=e[e.length-1])||void 0===t?void 0:t.context;if(l)try{let e="string"==typeof l?JSON.parse(l):l;b((null==e?void 0:e.template_name)==="report"?null==e?void 0:e.charts:void 0)}catch(e){b(void 0)}};(0,r.Z)(async()=>{let e=(0,V.a_)();e&&e.id===c||await y()},[p,c]),(0,s.useEffect)(()=>{var e,t;if(!m.length)return;let l=null===(e=null===(t=m.filter(e=>"view"===e.role))||void 0===t?void 0:t.slice(-1))||void 0===e?void 0:e[0];(null==l?void 0:l.model_name)&&u(l.model_name),N(m)},[m.length]),(0,s.useEffect)(()=>()=>{x([])},[]);let _=(0,s.useCallback)((e,t)=>new Promise(a=>{let s=[...m,{role:"human",context:e,model_name:i,order:0,time_stamp:0},{role:"view",context:"",model_name:i,order:0,time_stamp:0}],r=s.length-1;x([...s]),h({data:{...t,chat_mode:l||"chat_normal",model_name:i,user_input:e},chatId:c,onMessage:e=>{(null==t?void 0:t.incremental)?s[r].context+=e:s[r].context=e,x([...s])},onDone:()=>{N(s),a()},onClose:()=>{N(s),a()},onError:e=>{s[r].context=e,x([...s]),a()}})}),[m,h,c,i,d,l]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eL.Z,{visible:g}),(0,a.jsx)(eA.Z,{refreshHistory:y,modelChange:e=>{u(e)}}),(0,a.jsxs)("div",{className:"px-4 flex flex-1 flex-wrap overflow-hidden relative",children:[!!(null==f?void 0:f.length)&&(0,a.jsx)("div",{className:"w-full pb-4 xl:w-3/4 h-1/2 xl:pr-4 xl:h-full overflow-y-auto",children:(0,a.jsx)(D.ZP,{chartsData:f})}),!(null==f?void 0:f.length)&&"chat_dashboard"===l&&(0,a.jsx)(eq.Z,{className:"w-full xl:w-3/4 h-1/2 xl:h-full"}),(0,a.jsx)("div",{className:j()("flex flex-1 flex-col overflow-hidden",{"px-0 xl:pl-4 h-1/2 w-full xl:w-auto xl:h-full border-t xl:border-t-0 xl:border-l dark:border-gray-800":"chat_dashboard"===l,"h-full lg:px-8":"chat_dashboard"!==l}),children:(0,a.jsx)(eJ,{messages:m,onSubmit:_})})]})]})}},19409:function(e,t,l){l.d(t,{Z:function(){return R}});var a=l(85893),s=l(27496),r=l(79531),n=l(71577),o=l(67294),c=l(2487),i=l(83062),d=l(2453),u=l(46735),m=l(55241),x=l(39479),h=l(51009),p=l(58299),g=l(56155),v=l(30119),f=l(67421);let j=e=>{let{data:t,loading:l,submit:s,close:r}=e,{t:n}=(0,f.$G)(),o=e=>()=>{s(e),r()};return(0,a.jsx)("div",{style:{maxHeight:400,overflow:"auto"},children:(0,a.jsx)(c.Z,{dataSource:null==t?void 0:t.data,loading:l,rowKey:e=>e.prompt_name,renderItem:e=>(0,a.jsx)(c.Z.Item,{onClick:o(e.content),children:(0,a.jsx)(i.Z,{title:e.content,children:(0,a.jsx)(c.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:t}=e,{t:l}=(0,f.$G)(),[s,r]=(0,o.useState)(!1),[n,c]=(0,o.useState)("common"),{data:b,loading:y}=(0,g.Z)(()=>(0,v.PR)("/prompt/list",{prompt_type:n}),{refreshDeps:[n],onError:e=>{d.ZP.error(null==e?void 0:e.message)}});return(0,a.jsx)(u.ZP,{theme:{components:{Popover:{minWidth:250}}},children:(0,a.jsx)(m.Z,{title:(0,a.jsx)(x.Z.Item,{label:"Prompt "+l("Type"),children:(0,a.jsx)(h.default,{style:{width:150},value:n,onChange:e=>{c(e)},options:[{label:l("Public")+" Prompts",value:"common"},{label:l("Private")+" Prompts",value:"private"}]})}),content:(0,a.jsx)(j,{data:b,loading:y,submit:t,close:()=>{r(!1)}}),placement:"topRight",trigger:"click",open:s,onOpenChange:e=>{r(e)},children:(0,a.jsx)(i.Z,{title:l("Click_Select")+" Prompt",children:(0,a.jsx)(p.Z,{className:"bottom-[30%]"})})})})},y=l(41468),w=l(89182),N=l(80573),_=l(5392),Z=l(84553);function k(e){let{dbParam:t,setDocId:l}=(0,o.useContext)(y.p),{onUploadFinish:s,handleFinish:r}=e,c=(0,N.Z)(),[i,d]=(0,o.useState)(!1),u=async e=>{d(!0);let a=new FormData;a.append("doc_name",e.file.name),a.append("doc_file",e.file),a.append("doc_type","DOCUMENT");let n=await (0,w.Vx)((0,w.iG)(t||"default",a));if(!n[1]){d(!1);return}l(n[1]),s(),d(!1),null==r||r(!0),await c(n[1]),null==r||r(!1)};return(0,a.jsx)(Z.default,{customRequest:u,showUploadList:!1,maxCount:1,multiple:!1,className:"absolute z-10 top-2 left-2",accept:".pdf,.ppt,.pptx,.xls,.xlsx,.doc,.docx,.txt,.md",children:(0,a.jsx)(n.ZP,{loading:i,size:"small",shape:"circle",icon:(0,a.jsx)(_.Z,{})})})}var C=l(11163),S=l(82353),P=l(1051);function D(e){let{document:t}=e;switch(t.status){case"RUNNING":return(0,a.jsx)(S.Rp,{});case"FINISHED":default:return(0,a.jsx)(S.s2,{});case"FAILED":return(0,a.jsx)(P.Z,{})}}function E(e){let{documents:t,dbParam:l}=e,s=(0,C.useRouter)(),r=e=>{s.push("/knowledge/chunk/?spaceName=".concat(l,"&id=").concat(e))};return(null==t?void 0:t.length)?(0,a.jsx)("div",{className:"absolute flex overflow-scroll h-12 top-[-35px] w-full z-10",children:t.map(e=>{let t;switch(e.status){case"RUNNING":t="#2db7f5";break;case"FINISHED":default:t="#87d068";break;case"FAILED":t="#f50"}return(0,a.jsx)(i.Z,{title:e.result,children:(0,a.jsxs)(n.ZP,{style:{color:t},onClick:()=>{r(e.id)},className:"shrink flex items-center mr-3",children:[(0,a.jsx)(D,{document:e}),e.doc_name]})},e.id)})}):null}var R=function(e){let{children:t,loading:l,onSubmit:c,handleFinish:i,...d}=e,{dbParam:u,scene:m}=(0,o.useContext)(y.p),[x,h]=(0,o.useState)(""),p=(0,o.useMemo)(()=>"chat_knowledge"===m,[m]),[g,v]=(0,o.useState)([]),f=(0,o.useRef)(0);async function j(){if(!u)return null;let[e,t]=await (0,w.Vx)((0,w._Q)(u,{page:1,page_size:f.current}));v(null==t?void 0:t.data)}(0,o.useEffect)(()=>{p&&j()},[u]);let N=async()=>{f.current+=1,await j()};return(0,a.jsxs)("div",{className:"flex-1 relative",children:[(0,a.jsx)(E,{documents:g,dbParam:u}),p&&(0,a.jsx)(k,{handleFinish:i,onUploadFinish:N,className:"absolute z-10 top-2 left-2"}),(0,a.jsx)(r.default.TextArea,{className:"flex-1 ".concat(p?"pl-10":""," pr-10"),size:"large",value:x,autoSize:{minRows:1,maxRows:4},...d,onPressEnter:e=>{if(x.trim()&&13===e.keyCode){if(e.shiftKey){e.preventDefault(),h(e=>e+"\n");return}c(x),setTimeout(()=>{h("")},0)}},onChange:e=>{if("number"==typeof d.maxLength){h(e.target.value.substring(0,d.maxLength));return}h(e.target.value)}}),(0,a.jsx)(n.ZP,{className:"ml-2 flex items-center justify-center absolute right-0 bottom-0",size:"large",type:"text",loading:l,icon:(0,a.jsx)(s.Z,{}),onClick:()=>{c(x)}}),(0,a.jsx)(b,{submit:e=>{h(x+e)}}),t]})}},45247:function(e,t,l){var a=l(85893),s=l(50888);t.Z=function(e){let{visible:t}=e;return t?(0,a.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,a.jsx)(s.Z,{})}):null}},43446:function(e,t,l){var a=l(1375),s=l(2453),r=l(67294),n=l(36353),o=l(41468);t.Z=e=>{let{queryAgentURL:t="/api/v1/chat/completions"}=e,l=(0,r.useMemo)(()=>new AbortController,[]),{scene:c}=(0,r.useContext)(o.p),i=(0,r.useCallback)(async e=>{let{data:r,chatId:o,onMessage:i,onClose:d,onDone:u,onError:m}=e;if(!(null==r?void 0:r.user_input)&&!(null==r?void 0:r.doc_id)){s.ZP.warning(n.Z.t("no_context_tip"));return}let x={...r,conv_uid:o};if(!x.conv_uid){s.ZP.error("conv_uid 不存在,请刷新后重试");return}try{var h;await (0,a.L)("".concat((h="http://127.0.0.1:5670",void 0!==h)?h:"").concat(t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x),signal:l.signal,openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===a.a)return},onclose(){l.abort(),null==d||d()},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t="chat_agent"===c?JSON.parse(t).vis:JSON.parse(t)}catch(e){t.replaceAll("\\n","\n")}"string"==typeof t?"[DONE]"===t?null==u||u():(null==t?void 0:t.startsWith("[ERROR]"))?null==m||m(null==t?void 0:t.replace("[ERROR]","")):null==i||i(t):(null==i||i(t),null==u||u())}})}catch(e){l.abort(),null==m||m("Sorry, We meet some error, please try agin later.",e)}},[t]);return(0,r.useEffect)(()=>()=>{l.abort()},[]),i}},80573:function(e,t,l){var a=l(41468),s=l(67294),r=l(43446),n=l(89182);t.Z=()=>{let{history:e,setHistory:t,chatId:l,model:o,docId:c}=(0,s.useContext)(a.p),i=(0,r.Z)({queryAgentURL:"/knowledge/document/summary"}),d=(0,s.useCallback)(async e=>{let[,a]=await (0,n.Vx)((0,n.$i)(l)),s=[...a,{role:"human",context:"",model_name:o,order:0,time_stamp:0},{role:"view",context:"",model_name:o,order:0,time_stamp:0,retry:!0}],r=s.length-1;t([...s]),await i({data:{doc_id:e||c,model_name:o},chatId:l,onMessage:e=>{s[r].context=e,t([...s])}})},[e,o,c,l]);return d}}}]); \ No newline at end of file diff --git a/dbgpt/app/static/_next/static/chunks/4835.ba64d3db2eb02a7a.js b/dbgpt/app/static/_next/static/chunks/4835.12cd978e31f29d1e.js similarity index 97% rename from dbgpt/app/static/_next/static/chunks/4835.ba64d3db2eb02a7a.js rename to dbgpt/app/static/_next/static/chunks/4835.12cd978e31f29d1e.js index 01d04d745..bf237f419 100644 --- a/dbgpt/app/static/_next/static/chunks/4835.ba64d3db2eb02a7a.js +++ b/dbgpt/app/static/_next/static/chunks/4835.12cd978e31f29d1e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4835],{8497:function(e,n,t){"use strict";t.d(n,{_:function(){return y},a:function(){return v}});var r=t(85893),o=t(51009),a=t(71230),i=t(15746),l=t(83062),d=t(32983),c=t(7143),u=t(36353),s=t(5165);let f=e=>{let{charts:n,scopeOfCharts:t,ruleConfig:r}=e,o={};if(null==n||n.forEach(e=>{if(e.chartKnowledge.toSpec){let n=e.chartKnowledge.toSpec;e.chartKnowledge.toSpec=(e,t)=>({...n(e,t),dataProps:t})}else e.chartKnowledge.toSpec=(e,n)=>({dataProps:n});o[e.chartType]=e.chartKnowledge}),(null==t?void 0:t.exclude)&&t.exclude.forEach(e=>{Object.keys(o).includes(e)&&delete o[e]}),null==t?void 0:t.include){let e=t.include;Object.keys(o).forEach(n=>{e.includes(n)||delete o[n]})}let a={...t,custom:o},i={...r},l=new s.w({ckbCfg:a,ruleCfg:i});return l},g=e=>{var n;let{data:t,dataMetaMap:r,myChartAdvisor:o}=e,a=r?Object.keys(r).map(e=>({name:e,...r[e]})):null,i=null==o?void 0:o.adviseWithLog({data:t,dataProps:a});return null!==(n=null==i?void 0:i.advices)&&void 0!==n?n:[]};var m=t(67294);function h(e,n){return n.every(n=>e.includes(n))}function p(e,n){let t=n.find(n=>n.name===e);return(null==t?void 0:t.recommendation)==="date"?n=>new Date(n[e]):e}t(96486);let k=[{chartType:"multi_line_chart",chartKnowledge:{id:"multi_line_chart",name:"multi_line_chart",alias:["multi_line_chart"],family:["LineCharts"],def:"multi_line_chart uses lines with segments to show changes in data in a ordinal dimension",purpose:["Comparison","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:1,maxQty:"*",fieldConditions:["Interval"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Direction","Position"],recRate:"Recommended",toSpec:(e,n)=>{let t=n.find(e=>{var n;return n=e.levelOfMeasurements,["Time","Ordinal"].some(e=>n.includes(e))}),r=n.filter(e=>h(e.levelOfMeasurements,["Interval"])),o=n.find(e=>h(e.levelOfMeasurements,["Nominal"]));if(!t||!r)return null;let a={type:"view",autoFit:!0,data:e,children:[]};return r.forEach(e=>{let r={type:"line",encode:{x:p(t.name,n),y:e.name}};o&&(r.encode.color=o.name),a.children.push(r)}),a}},chineseName:"折线图"},{chartType:"multi_measure_column_chart",chartKnowledge:{id:"multi_measure_column_chart",name:"multi_measure_column_chart",alias:["multi_measure_column_chart"],family:["ColumnCharts"],def:"multi_measure_column_chart uses lines with segments to show changes in data in a ordinal dimension",purpose:["Comparison","Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Direction","Position"],recRate:"Recommended",toSpec:(e,n)=>{try{let t=null==n?void 0:n.filter(e=>h(e.levelOfMeasurements,["Interval"])),r=null==n?void 0:n.find(e=>h(e.levelOfMeasurements,["Nominal"]));if(!r||!t)return null;let o={type:"view",data:e,children:[]};return null==t||t.forEach(e=>{let n={type:"interval",encode:{x:r.name,y:e.name,color:()=>e.name,series:()=>e.name}};o.children.push(n)}),o}catch(e){return console.log(e),null}}},chineseName:"折线图"},{chartType:"multi_measure_line_chart",chartKnowledge:{id:"multi_measure_line_chart",name:"multi_measure_line_chart",alias:["multi_measure_line_chart"],family:["LineCharts"],def:"multi_measure_line_chart uses lines with segments to show changes in data in a ordinal dimension",purpose:["Comparison","Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Direction","Position"],recRate:"Recommended",toSpec:(e,n)=>{try{let t=null==n?void 0:n.filter(e=>h(e.levelOfMeasurements,["Interval"])),r=null==n?void 0:n.find(e=>h(e.levelOfMeasurements,["Nominal"]));if(!r||!t)return null;let o={type:"view",data:e,children:[]};return null==t||t.forEach(e=>{let t={type:"line",encode:{x:p(r.name,n),y:e.name,color:()=>e.name,series:()=>e.name}};o.children.push(t)}),o}catch(e){return console.log(e),null}}},chineseName:"折线图"}];var b=t(41468);let v=e=>"response_line_chart"===e?["multi_line_chart","multi_measure_line_chart"]:"response_bar_chart"===e?["multi_measure_column_chart"]:"response_pie_chart"===e?["pie_chart"]:"response_scatter_chart"===e?["scatter_plot"]:"response_area_chart"===e?["area_chart"]:"response_heatmap_chart"===e?["heatmap"]:[],{Option:x}=o.default,y=e=>{let{data:n,chartType:t,scopeOfCharts:s,ruleConfig:h}=e,{mode:p}=(0,m.useContext)(b.p),[v,y]=(0,m.useState)(),[j,_]=(0,m.useState)([]),[w,C]=(0,m.useState)();(0,m.useEffect)(()=>{y(f({charts:k,scopeOfCharts:void 0,ruleConfig:h}))},[h,s]),(0,m.useEffect)(()=>{if(n&&v){var e;let r=g({data:n,myChartAdvisor:v}),o=function(e){let{advices:n}=e;return n}({advices:r});o.sort((e,n)=>t.indexOf(n.type)-(null==t?void 0:t.indexOf(e.type))),_(o),C(null===(e=o[0])||void 0===e?void 0:e.type)}},[n,v,t]);let N=(0,m.useMemo)(()=>{if((null==j?void 0:j.length)>0){var e,n;let t=null!=w?w:j[0].type,o=null!==(n=null===(e=null==j?void 0:j.find(e=>e.type===t))||void 0===e?void 0:e.spec)&&void 0!==n?n:void 0;if(o)return(0,r.jsx)(c.k,{options:{...o,theme:p,autoFit:!0,height:300}},t)}},[j,w]);return w?(0,r.jsxs)("div",{children:[(0,r.jsxs)(a.Z,{justify:"start",className:"mb-2",children:[(0,r.jsx)(i.Z,{children:u.Z.t("Advices")}),(0,r.jsx)(i.Z,{style:{marginLeft:24},children:(0,r.jsx)(o.default,{className:"w-52",value:w,placeholder:"Chart Switcher",onChange:e=>C(e),size:"small",children:null==j?void 0:j.map(e=>{let n=u.Z.t(e.type);return(0,r.jsx)(x,{value:e.type,children:(0,r.jsx)(l.Z,{title:n,placement:"right",children:(0,r.jsx)("div",{children:n})})},e.type)})})})]}),(0,r.jsx)("div",{className:"auto-chart-content",children:N})]}):(0,r.jsx)(d.Z,{image:d.Z.PRESENTED_IMAGE_SIMPLE,description:"暂无合适的可视化视图"})}},39156:function(e,n,t){"use strict";t.d(n,{_z:function(){return h._},ZP:function(){return p},aG:function(){return h.a}});var r=t(85893),o=t(41118),a=t(30208),i=t(40911),l=t(41468),d=t(7143),c=t(67294);function u(e){let{chart:n}=e,{mode:t}=(0,c.useContext)(l.p);return(0,r.jsx)("div",{className:"flex-1 min-w-0 p-4 bg-white dark:bg-theme-dark-container rounded",children:(0,r.jsxs)("div",{className:"h-full",children:[(0,r.jsx)("div",{className:"mb-2",children:n.chart_name}),(0,r.jsx)("div",{className:"opacity-80 text-sm mb-2",children:n.chart_desc}),(0,r.jsx)("div",{className:"h-[300px]",children:(0,r.jsx)(d.k,{style:{height:"100%"},options:{autoFit:!0,theme:t,type:"interval",data:n.values,encode:{x:"name",y:"value",color:"type"},axis:{x:{labelAutoRotate:!1}}}})})]})})}function s(e){let{chart:n}=e,{mode:t}=(0,c.useContext)(l.p);return(0,r.jsx)("div",{className:"flex-1 min-w-0 p-4 bg-white dark:bg-theme-dark-container rounded",children:(0,r.jsxs)("div",{className:"h-full",children:[(0,r.jsx)("div",{className:"mb-2",children:n.chart_name}),(0,r.jsx)("div",{className:"opacity-80 text-sm mb-2",children:n.chart_desc}),(0,r.jsx)("div",{className:"h-[300px]",children:(0,r.jsx)(d.k,{style:{height:"100%"},options:{autoFit:!0,theme:t,type:"view",data:n.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 f=t(61685),g=t(96486);function m(e){var n,t;let{chart:o}=e,a=(0,g.groupBy)(o.values,"type");return(0,r.jsx)("div",{className:"flex-1 min-w-0 p-4 bg-white dark:bg-theme-dark-container rounded",children:(0,r.jsxs)("div",{className:"h-full",children:[(0,r.jsx)("div",{className:"mb-2",children:o.chart_name}),(0,r.jsx)("div",{className:"opacity-80 text-sm mb-2",children:o.chart_desc}),(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsxs)(f.Z,{"aria-label":"basic table",stripe:"odd",hoverRow:!0,borderAxis:"bothBetween",children:[(0,r.jsx)("thead",{children:(0,r.jsx)("tr",{children:Object.keys(a).map(e=>(0,r.jsx)("th",{children:e},e))})}),(0,r.jsx)("tbody",{children:null===(n=Object.values(a))||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.map((e,n)=>{var t;return(0,r.jsx)("tr",{children:null===(t=Object.keys(a))||void 0===t?void 0:t.map(e=>{var t;return(0,r.jsx)("td",{children:(null==a?void 0:null===(t=a[e])||void 0===t?void 0:t[n].value)||""},e)})},n)})})]})})]})})}var h=t(8497),p=function(e){let{chartsData:n}=e,t=(0,c.useMemo)(()=>{if(n){let e=[],t=null==n?void 0:n.filter(e=>"IndicatorValue"===e.chart_type);t.length>0&&e.push({charts:t,type:"IndicatorValue"});let r=null==n?void 0:n.filter(e=>"IndicatorValue"!==e.chart_type),o=r.length,a=0;return[[0],[1],[2],[1,2],[1,3],[2,1,2],[2,1,3],[3,1,3],[3,2,3]][o].forEach(n=>{if(n>0){let t=r.slice(a,a+n);a+=n,e.push({charts:t})}}),e}},[n]);return(0,r.jsx)("div",{className:"flex flex-col gap-3",children:null==t?void 0:t.map((e,n)=>(0,r.jsx)("div",{className:"".concat((null==e?void 0:e.type)!=="IndicatorValue"?"flex gap-3":""),children:e.charts.map(e=>"IndicatorValue"===e.chart_type||"IndicatorValue"===e.type?(0,r.jsx)("div",{className:"flex flex-row gap-3",children:e.values.map(e=>(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(o.Z,{sx:{background:"transparent"},children:(0,r.jsxs)(a.Z,{className:"justify-around",children:[(0,r.jsx)(i.ZP,{gutterBottom:!0,component:"div",children:e.name}),(0,r.jsx)(i.ZP,{children:e.value})]})})},e.name))},e.chart_uid):"LineChart"===e.chart_type||"LineChart"===e.type?(0,r.jsx)(s,{chart:e},e.chart_uid):"BarChart"===e.chart_type||"BarChart"===e.type?(0,r.jsx)(u,{chart:e},e.chart_uid):"Table"===e.chart_type||"Table"===e.type?(0,r.jsx)(m,{chart:e},e.chart_uid):void 0)},"chart_row_".concat(n)))})}},67772:function(e,n,t){"use strict";t.d(n,{Z:function(){return M}});var r=t(85893),o=t(67294),a=t(2453),i=t(83062),l=t(84553),d=t(71577),c=t(49591),u=t(88484),s=t(29158),f=t(89182),g=t(41468),m=function(e){var n;let{convUid:t,chatMode:m,onComplete:h,...p}=e,[k,b]=(0,o.useState)(!1),[v,x]=a.ZP.useMessage(),[y,j]=(0,o.useState)([]),[_,w]=(0,o.useState)(),{model:C}=(0,o.useContext)(g.p),N=async e=>{var n;if(!e){a.ZP.error("Please select the *.(csv|xlsx|xls) file");return}if(!/\.(csv|xlsx|xls)$/.test(null!==(n=e.file.name)&&void 0!==n?n:"")){a.ZP.error("File type must be csv, xlsx or xls");return}j([e.file])},S=async()=>{b(!0);try{let e=new FormData;e.append("doc_file",y[0]),v.open({content:"Uploading ".concat(y[0].name),type:"loading",duration:0});let[n]=await (0,f.Vx)((0,f.qn)({convUid:t,chatMode:m,data:e,model:C,config:{timeout:36e5,onUploadProgress:e=>{let n=Math.ceil(e.loaded/(e.total||0)*100);w(n)}}}));if(n)return;a.ZP.success("success"),null==h||h()}catch(e){a.ZP.error((null==e?void 0:e.message)||"Upload Error")}finally{b(!1),v.destroy()}};return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[x,(0,r.jsx)(i.Z,{placement:"bottom",title:"File cannot be changed after upload",children:(0,r.jsx)(l.default,{disabled:k,className:"mr-1",beforeUpload:()=>!1,fileList:y,name:"file",accept:".csv,.xlsx,.xls",multiple:!1,onChange:N,showUploadList:{showDownloadIcon:!1,showPreviewIcon:!1,showRemoveIcon:!1},itemRender:()=>(0,r.jsx)(r.Fragment,{}),...p,children:(0,r.jsx)(d.ZP,{className:"flex justify-center items-center",type:"primary",disabled:k,icon:(0,r.jsx)(c.Z,{}),children:"Select File"})})}),(0,r.jsx)(d.ZP,{type:"primary",loading:k,className:"flex justify-center items-center",disabled:!y.length,icon:(0,r.jsx)(u.Z,{}),onClick:S,children:k?100===_?"Analysis":"Uploading":"Upload"}),!!y.length&&(0,r.jsxs)("div",{className:"mt-2 text-gray-500 text-sm flex items-center",children:[(0,r.jsx)(s.Z,{className:"mr-2"}),(0,r.jsx)("span",{children:null===(n=y[0])||void 0===n?void 0:n.name})]})]})})},h=function(e){let{onComplete:n}=e,{currentDialogue:t,scene:a,chatId:i}=(0,o.useContext)(g.p);return"chat_excel"!==a?null:(0,r.jsx)("div",{className:"max-w-md h-full relative",children:t?(0,r.jsxs)("div",{className:"flex h-8 overflow-hidden rounded",children:[(0,r.jsx)("div",{className:"flex items-center justify-center px-2 bg-gray-600 text-lg",children:(0,r.jsx)(s.Z,{className:"text-white"})}),(0,r.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:t.select_param})]}):(0,r.jsx)(m,{convUid:i,chatMode:a,onComplete:n})})};t(23293);var p=t(78045),k=t(16165),b=t(96991),v=t(82353);function x(){let{isContract:e,setIsContract:n,scene:t}=(0,o.useContext)(g.p),a=t&&["chat_with_db_execute","chat_dashboard"].includes(t);return a?(0,r.jsxs)(p.ZP.Group,{value:e,defaultValue:!0,buttonStyle:"solid",onChange:()=>{n(!e)},children:[(0,r.jsxs)(p.ZP.Button,{value:!1,children:[(0,r.jsx)(k.Z,{component:v.ig,className:"mr-1"}),"Preview"]}),(0,r.jsxs)(p.ZP.Button,{value:!0,children:[(0,r.jsx)(b.Z,{className:"mr-1"}),"Editor"]})]}):null}var y=t(81799),j=t(62418),_=t(2093),w=t(51009),C=t(25675),N=t.n(C),S=function(e){let{src:n,label:t,width:o,height:a,className:i}=e;return(0,r.jsx)(N(),{className:"w-11 h-11 rounded-full mr-4 border border-gray-200 object-contain bg-white ".concat(i),width:o||44,height:a||44,src:n,alt:t||"db-icon"})},Z=function(){let{scene:e,dbParam:n,setDbParam:t}=(0,o.useContext)(g.p),[a,i]=(0,o.useState)([]);(0,_.Z)(async()=>{let[,n]=await (0,f.Vx)((0,f.vD)(e));i(null!=n?n:[])},[e]);let l=(0,o.useMemo)(()=>{var e;return null===(e=a.map)||void 0===e?void 0:e.call(a,e=>({name:e.param,...j.S$[e.type]}))},[a]);return((0,o.useEffect)(()=>{(null==l?void 0:l.length)&&!n&&t(l[0].name)},[l,t,n]),null==l?void 0:l.length)?(0,r.jsx)(w.default,{value:n,className:"w-36",onChange:e=>{t(e)},children:l.map(e=>(0,r.jsxs)(w.default.Option,{children:[(0,r.jsx)(S,{width:24,height:24,src:e.icon,label:e.label,className:"w-[1.5em] h-[1.5em] mr-1 inline-block mt-[-4px]"}),e.name]},e.name))}):null},P=t(56155),O=t(67421),I=function(){let{t:e}=(0,O.$G)(),{agent:n,setAgent:t}=(0,o.useContext)(g.p),{data:a=[]}=(0,P.Z)(async()=>{let[,e]=await (0,f.Vx)((0,f.H4)());return null!=e?e:[]});return(0,r.jsx)(w.default,{className:"w-60",value:n,placeholder:e("Select_Plugins"),options:a.map(e=>({label:e.app_name,value:e.app_code})),allowClear:!0,onChange:e=>{null==t||t(e)}})},M=function(e){let{refreshHistory:n,modelChange:t}=e,{scene:a,refreshDialogList:i}=(0,o.useContext)(g.p);return(0,r.jsxs)("div",{className:"w-full py-2 px-4 md:px-4 flex flex-wrap items-center justify-center gap-1 md:gap-4",children:[(0,r.jsx)(y.Z,{onChange:t}),(0,r.jsx)(Z,{}),"chat_excel"===a&&(0,r.jsx)(h,{onComplete:()=>{null==i||i(),null==n||n()}}),"chat_agent"===a&&(0,r.jsx)(I,{}),(0,r.jsx)(x,{})]})}},81799:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});var r=t(85893),o=t(41468),a=t(51009),i=t(19284),l=t(25675),d=t.n(l),c=t(67294),u=t(67421);function s(e,n){var t;let{width:o,height:a}=n||{};return e?(0,r.jsx)(d(),{className:"rounded-full border border-gray-200 object-contain bg-white inline-block",width:o||24,height:a||24,src:(null===(t=i.H[e])||void 0===t?void 0:t.icon)||"/models/huggingface.svg",alt:"llm"}):null}n.Z=function(e){let{onChange:n}=e,{t}=(0,u.$G)(),{modelList:l,model:d}=(0,c.useContext)(o.p);return!l||l.length<=0?null:(0,r.jsx)(a.default,{value:d,placeholder:t("choose_model"),className:"w-52",onChange:e=>{null==n||n(e)},children:l.map(e=>{var n;return(0,r.jsx)(a.default.Option,{children:(0,r.jsxs)("div",{className:"flex items-center",children:[s(e),(0,r.jsx)("span",{className:"ml-2",children:(null===(n=i.H[e])||void 0===n?void 0:n.label)||e})]})},e)})})}},74434:function(e,n,t){"use strict";let r;t.d(n,{Z:function(){return m}});var o=t(85893),a=t(9869),i=t(63764),l=t(94184),d=t.n(l),c=t(67294),u=t(62418),s=t(3930),f=t(41468);async function g(){window.obMonaco={getWorkerUrl:e=>{switch(e){case"mysql":return location.origin+"/_next/static/ob-workers/mysql.js";case"obmysql":return location.origin+"/_next/static/ob-workers/obmysql.js";case"oboracle":return location.origin+"/_next/static/ob-workers/oracle.js"}return""}};let e=await t.e(2057).then(t.bind(t,12057)),n=e.default;return r||(r=new n).setup(["mysql"]),r}function m(e){let{className:n,value:t,language:r="mysql",onChange:a,thoughts:l,session:m}=e,h=(0,c.useMemo)(()=>"mysql"!==r?t:l&&l.length>0?(0,u._m)("-- ".concat(l," \n").concat(t)):(0,u._m)(t),[t,l]),p=(0,s.Z)(m),k=(0,c.useContext)(f.p);async function b(e){var n,t;let r=await g();r.setModelOptions((null===(n=e.getModel())||void 0===n?void 0:n.id)||"",function(e,n){let{modelId:t,delimiter:r}=e;return{delimiter:r,async getTableList(e){var t;return(null==n?void 0:null===(t=n())||void 0===t?void 0:t.getTableList(e))||[]},async getTableColumns(e,t){var r;return(null==n?void 0:null===(r=n())||void 0===r?void 0:r.getTableColumns(e))||[]},async getSchemaList(){var e;return(null==n?void 0:null===(e=n())||void 0===e?void 0:e.getSchemaList())||[]}}}({modelId:(null===(t=e.getModel())||void 0===t?void 0:t.id)||"",delimiter:";"},()=>p.current||null))}return(0,o.jsx)(i.ZP,{className:d()(n),onMount:b,value:h,defaultLanguage:r,onChange:a,theme:(null==k?void 0:k.mode)!=="dark"?"github":"githubDark",options:{minimap:{enabled:!1},wordWrap:"on"}})}i._m.config({monaco:a}),a.editor.defineTheme("github",{base:"vs",inherit:!0,rules:[{background:"ffffff",token:""},{foreground:"6a737d",token:"comment"},{foreground:"6a737d",token:"punctuation.definition.comment"},{foreground:"6a737d",token:"string.comment"},{foreground:"005cc5",token:"constant"},{foreground:"005cc5",token:"entity.name.constant"},{foreground:"005cc5",token:"variable.other.constant"},{foreground:"005cc5",token:"variable.language"},{foreground:"6f42c1",token:"entity"},{foreground:"6f42c1",token:"entity.name"},{foreground:"24292e",token:"variable.parameter.function"},{foreground:"22863a",token:"entity.name.tag"},{foreground:"d73a49",token:"keyword"},{foreground:"d73a49",token:"storage"},{foreground:"d73a49",token:"storage.type"},{foreground:"24292e",token:"storage.modifier.package"},{foreground:"24292e",token:"storage.modifier.import"},{foreground:"24292e",token:"storage.type.java"},{foreground:"032f62",token:"string"},{foreground:"032f62",token:"punctuation.definition.string"},{foreground:"032f62",token:"string punctuation.section.embedded source"},{foreground:"005cc5",token:"support"},{foreground:"005cc5",token:"meta.property-name"},{foreground:"e36209",token:"variable"},{foreground:"24292e",token:"variable.other"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.broken"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.deprecated"},{foreground:"fafbfc",background:"b31d28",fontStyle:"italic underline",token:"invalid.illegal"},{foreground:"fafbfc",background:"d73a49",fontStyle:"italic underline",token:"carriage-return"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.unimplemented"},{foreground:"b31d28",token:"message.error"},{foreground:"24292e",token:"string source"},{foreground:"005cc5",token:"string variable"},{foreground:"032f62",token:"source.regexp"},{foreground:"032f62",token:"string.regexp"},{foreground:"032f62",token:"string.regexp.character-class"},{foreground:"032f62",token:"string.regexp constant.character.escape"},{foreground:"032f62",token:"string.regexp source.ruby.embedded"},{foreground:"032f62",token:"string.regexp string.regexp.arbitrary-repitition"},{foreground:"22863a",fontStyle:"bold",token:"string.regexp constant.character.escape"},{foreground:"005cc5",token:"support.constant"},{foreground:"005cc5",token:"support.variable"},{foreground:"005cc5",token:"meta.module-reference"},{foreground:"735c0f",token:"markup.list"},{foreground:"005cc5",fontStyle:"bold",token:"markup.heading"},{foreground:"005cc5",fontStyle:"bold",token:"markup.heading entity.name"},{foreground:"22863a",token:"markup.quote"},{foreground:"24292e",fontStyle:"italic",token:"markup.italic"},{foreground:"24292e",fontStyle:"bold",token:"markup.bold"},{foreground:"005cc5",token:"markup.raw"},{foreground:"b31d28",background:"ffeef0",token:"markup.deleted"},{foreground:"b31d28",background:"ffeef0",token:"meta.diff.header.from-file"},{foreground:"b31d28",background:"ffeef0",token:"punctuation.definition.deleted"},{foreground:"22863a",background:"f0fff4",token:"markup.inserted"},{foreground:"22863a",background:"f0fff4",token:"meta.diff.header.to-file"},{foreground:"22863a",background:"f0fff4",token:"punctuation.definition.inserted"},{foreground:"e36209",background:"ffebda",token:"markup.changed"},{foreground:"e36209",background:"ffebda",token:"punctuation.definition.changed"},{foreground:"f6f8fa",background:"005cc5",token:"markup.ignored"},{foreground:"f6f8fa",background:"005cc5",token:"markup.untracked"},{foreground:"6f42c1",fontStyle:"bold",token:"meta.diff.range"},{foreground:"005cc5",token:"meta.diff.header"},{foreground:"005cc5",fontStyle:"bold",token:"meta.separator"},{foreground:"005cc5",token:"meta.output"},{foreground:"586069",token:"brackethighlighter.tag"},{foreground:"586069",token:"brackethighlighter.curly"},{foreground:"586069",token:"brackethighlighter.round"},{foreground:"586069",token:"brackethighlighter.square"},{foreground:"586069",token:"brackethighlighter.angle"},{foreground:"586069",token:"brackethighlighter.quote"},{foreground:"b31d28",token:"brackethighlighter.unmatched"},{foreground:"b31d28",token:"sublimelinter.mark.error"},{foreground:"e36209",token:"sublimelinter.mark.warning"},{foreground:"959da5",token:"sublimelinter.gutter-mark"},{foreground:"032f62",fontStyle:"underline",token:"constant.other.reference.link"},{foreground:"032f62",fontStyle:"underline",token:"string.other.link"}],colors:{"editor.foreground":"#24292e","editor.background":"#ffffff","editor.selectionBackground":"#c8c8fa","editor.inactiveSelectionBackground":"#fafbfc","editor.lineHighlightBackground":"#fafbfc","editorCursor.foreground":"#24292e","editorWhitespace.foreground":"#959da5","editorIndentGuide.background":"#959da5","editorIndentGuide.activeBackground":"#24292e","editor.selectionHighlightBorder":"#fafbfc"}}),a.editor.defineTheme("githubDark",{base:"vs-dark",inherit:!0,rules:[{background:"24292e",token:""},{foreground:"959da5",token:"comment"},{foreground:"959da5",token:"punctuation.definition.comment"},{foreground:"959da5",token:"string.comment"},{foreground:"c8e1ff",token:"constant"},{foreground:"c8e1ff",token:"entity.name.constant"},{foreground:"c8e1ff",token:"variable.other.constant"},{foreground:"c8e1ff",token:"variable.language"},{foreground:"b392f0",token:"entity"},{foreground:"b392f0",token:"entity.name"},{foreground:"f6f8fa",token:"variable.parameter.function"},{foreground:"7bcc72",token:"entity.name.tag"},{foreground:"ea4a5a",token:"keyword"},{foreground:"ea4a5a",token:"storage"},{foreground:"ea4a5a",token:"storage.type"},{foreground:"f6f8fa",token:"storage.modifier.package"},{foreground:"f6f8fa",token:"storage.modifier.import"},{foreground:"f6f8fa",token:"storage.type.java"},{foreground:"79b8ff",token:"string"},{foreground:"79b8ff",token:"punctuation.definition.string"},{foreground:"79b8ff",token:"string punctuation.section.embedded source"},{foreground:"c8e1ff",token:"support"},{foreground:"c8e1ff",token:"meta.property-name"},{foreground:"fb8532",token:"variable"},{foreground:"f6f8fa",token:"variable.other"},{foreground:"d73a49",fontStyle:"bold italic underline",token:"invalid.broken"},{foreground:"d73a49",fontStyle:"bold italic underline",token:"invalid.deprecated"},{foreground:"fafbfc",background:"d73a49",fontStyle:"italic underline",token:"invalid.illegal"},{foreground:"fafbfc",background:"d73a49",fontStyle:"italic underline",token:"carriage-return"},{foreground:"d73a49",fontStyle:"bold italic underline",token:"invalid.unimplemented"},{foreground:"d73a49",token:"message.error"},{foreground:"f6f8fa",token:"string source"},{foreground:"c8e1ff",token:"string variable"},{foreground:"79b8ff",token:"source.regexp"},{foreground:"79b8ff",token:"string.regexp"},{foreground:"79b8ff",token:"string.regexp.character-class"},{foreground:"79b8ff",token:"string.regexp constant.character.escape"},{foreground:"79b8ff",token:"string.regexp source.ruby.embedded"},{foreground:"79b8ff",token:"string.regexp string.regexp.arbitrary-repitition"},{foreground:"7bcc72",fontStyle:"bold",token:"string.regexp constant.character.escape"},{foreground:"c8e1ff",token:"support.constant"},{foreground:"c8e1ff",token:"support.variable"},{foreground:"c8e1ff",token:"meta.module-reference"},{foreground:"fb8532",token:"markup.list"},{foreground:"0366d6",fontStyle:"bold",token:"markup.heading"},{foreground:"0366d6",fontStyle:"bold",token:"markup.heading entity.name"},{foreground:"c8e1ff",token:"markup.quote"},{foreground:"f6f8fa",fontStyle:"italic",token:"markup.italic"},{foreground:"f6f8fa",fontStyle:"bold",token:"markup.bold"},{foreground:"c8e1ff",token:"markup.raw"},{foreground:"b31d28",background:"ffeef0",token:"markup.deleted"},{foreground:"b31d28",background:"ffeef0",token:"meta.diff.header.from-file"},{foreground:"b31d28",background:"ffeef0",token:"punctuation.definition.deleted"},{foreground:"176f2c",background:"f0fff4",token:"markup.inserted"},{foreground:"176f2c",background:"f0fff4",token:"meta.diff.header.to-file"},{foreground:"176f2c",background:"f0fff4",token:"punctuation.definition.inserted"},{foreground:"b08800",background:"fffdef",token:"markup.changed"},{foreground:"b08800",background:"fffdef",token:"punctuation.definition.changed"},{foreground:"2f363d",background:"959da5",token:"markup.ignored"},{foreground:"2f363d",background:"959da5",token:"markup.untracked"},{foreground:"b392f0",fontStyle:"bold",token:"meta.diff.range"},{foreground:"c8e1ff",token:"meta.diff.header"},{foreground:"0366d6",fontStyle:"bold",token:"meta.separator"},{foreground:"0366d6",token:"meta.output"},{foreground:"ffeef0",token:"brackethighlighter.tag"},{foreground:"ffeef0",token:"brackethighlighter.curly"},{foreground:"ffeef0",token:"brackethighlighter.round"},{foreground:"ffeef0",token:"brackethighlighter.square"},{foreground:"ffeef0",token:"brackethighlighter.angle"},{foreground:"ffeef0",token:"brackethighlighter.quote"},{foreground:"d73a49",token:"brackethighlighter.unmatched"},{foreground:"d73a49",token:"sublimelinter.mark.error"},{foreground:"fb8532",token:"sublimelinter.mark.warning"},{foreground:"6a737d",token:"sublimelinter.gutter-mark"},{foreground:"79b8ff",fontStyle:"underline",token:"constant.other.reference.link"},{foreground:"79b8ff",fontStyle:"underline",token:"string.other.link"}],colors:{"editor.foreground":"#f6f8fa","editor.background":"#24292e","editor.selectionBackground":"#4c2889","editor.inactiveSelectionBackground":"#444d56","editor.lineHighlightBackground":"#444d56","editorCursor.foreground":"#ffffff","editorWhitespace.foreground":"#6a737d","editorIndentGuide.background":"#6a737d","editorIndentGuide.activeBackground":"#f6f8fa","editor.selectionHighlightBorder":"#444d56"}})},91085:function(e,n,t){"use strict";var r=t(85893),o=t(32983),a=t(71577),i=t(94184),l=t.n(i),d=t(67421);n.Z=function(e){let{className:n,error:t,description:i,refresh:c}=e,{t:u}=(0,d.$G)();return(0,r.jsx)(o.Z,{image:"/empty.png",imageStyle:{width:320,height:196,margin:"0 auto",maxWidth:"100%",maxHeight:"100%"},className:l()("flex items-center justify-center flex-col h-full w-full",n),description:t?(0,r.jsx)(a.ZP,{type:"primary",onClick:c,children:u("try_again")}):null!=i?i:u("no_data")})}},30119:function(e,n,t){"use strict";t.d(n,{Tk:function(){return d},PR:function(){return c}});var r=t(2453),o=t(6154),a=t(83454);let i=o.default.create({baseURL:a.env.API_BASE_URL});i.defaults.timeout=1e4,i.interceptors.response.use(e=>e.data,e=>Promise.reject(e)),t(96486);let l={"content-type":"application/json"},d=(e,n)=>{if(n){let t=Object.keys(n).filter(e=>void 0!==n[e]&&""!==n[e]).map(e=>"".concat(e,"=").concat(n[e])).join("&");t&&(e+="?".concat(t))}return i.get("/api"+e,{headers:l}).then(e=>e).catch(e=>{r.ZP.error(e),Promise.reject(e)})},c=(e,n)=>i.post(e,n,{headers:l}).then(e=>e).catch(e=>{r.ZP.error(e),Promise.reject(e)})},23293:function(){}}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4835],{8497:function(e,n,t){"use strict";t.d(n,{_:function(){return y},a:function(){return v}});var r=t(85893),o=t(51009),a=t(71230),i=t(15746),l=t(83062),d=t(32983),c=t(7143),u=t(36353),s=t(5165);let f=e=>{let{charts:n,scopeOfCharts:t,ruleConfig:r}=e,o={};if(null==n||n.forEach(e=>{if(e.chartKnowledge.toSpec){let n=e.chartKnowledge.toSpec;e.chartKnowledge.toSpec=(e,t)=>({...n(e,t),dataProps:t})}else e.chartKnowledge.toSpec=(e,n)=>({dataProps:n});o[e.chartType]=e.chartKnowledge}),(null==t?void 0:t.exclude)&&t.exclude.forEach(e=>{Object.keys(o).includes(e)&&delete o[e]}),null==t?void 0:t.include){let e=t.include;Object.keys(o).forEach(n=>{e.includes(n)||delete o[n]})}let a={...t,custom:o},i={...r},l=new s.w({ckbCfg:a,ruleCfg:i});return l},g=e=>{var n;let{data:t,dataMetaMap:r,myChartAdvisor:o}=e,a=r?Object.keys(r).map(e=>({name:e,...r[e]})):null,i=null==o?void 0:o.adviseWithLog({data:t,dataProps:a});return null!==(n=null==i?void 0:i.advices)&&void 0!==n?n:[]};var m=t(67294);function h(e,n){return n.every(n=>e.includes(n))}function p(e,n){let t=n.find(n=>n.name===e);return(null==t?void 0:t.recommendation)==="date"?n=>new Date(n[e]):e}t(96486);let k=[{chartType:"multi_line_chart",chartKnowledge:{id:"multi_line_chart",name:"multi_line_chart",alias:["multi_line_chart"],family:["LineCharts"],def:"multi_line_chart uses lines with segments to show changes in data in a ordinal dimension",purpose:["Comparison","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:1,maxQty:"*",fieldConditions:["Interval"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Direction","Position"],recRate:"Recommended",toSpec:(e,n)=>{let t=n.find(e=>{var n;return n=e.levelOfMeasurements,["Time","Ordinal"].some(e=>n.includes(e))}),r=n.filter(e=>h(e.levelOfMeasurements,["Interval"])),o=n.find(e=>h(e.levelOfMeasurements,["Nominal"]));if(!t||!r)return null;let a={type:"view",autoFit:!0,data:e,children:[]};return r.forEach(e=>{let r={type:"line",encode:{x:p(t.name,n),y:e.name}};o&&(r.encode.color=o.name),a.children.push(r)}),a}},chineseName:"折线图"},{chartType:"multi_measure_column_chart",chartKnowledge:{id:"multi_measure_column_chart",name:"multi_measure_column_chart",alias:["multi_measure_column_chart"],family:["ColumnCharts"],def:"multi_measure_column_chart uses lines with segments to show changes in data in a ordinal dimension",purpose:["Comparison","Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Direction","Position"],recRate:"Recommended",toSpec:(e,n)=>{try{let t=null==n?void 0:n.filter(e=>h(e.levelOfMeasurements,["Interval"])),r=null==n?void 0:n.find(e=>h(e.levelOfMeasurements,["Nominal"]));if(!r||!t)return null;let o={type:"view",data:e,children:[]};return null==t||t.forEach(e=>{let n={type:"interval",encode:{x:r.name,y:e.name,color:()=>e.name,series:()=>e.name}};o.children.push(n)}),o}catch(e){return console.log(e),null}}},chineseName:"折线图"},{chartType:"multi_measure_line_chart",chartKnowledge:{id:"multi_measure_line_chart",name:"multi_measure_line_chart",alias:["multi_measure_line_chart"],family:["LineCharts"],def:"multi_measure_line_chart uses lines with segments to show changes in data in a ordinal dimension",purpose:["Comparison","Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Direction","Position"],recRate:"Recommended",toSpec:(e,n)=>{try{let t=null==n?void 0:n.filter(e=>h(e.levelOfMeasurements,["Interval"])),r=null==n?void 0:n.find(e=>h(e.levelOfMeasurements,["Nominal"]));if(!r||!t)return null;let o={type:"view",data:e,children:[]};return null==t||t.forEach(e=>{let t={type:"line",encode:{x:p(r.name,n),y:e.name,color:()=>e.name,series:()=>e.name}};o.children.push(t)}),o}catch(e){return console.log(e),null}}},chineseName:"折线图"}];var b=t(41468);let v=e=>"response_line_chart"===e?["multi_line_chart","multi_measure_line_chart"]:"response_bar_chart"===e?["multi_measure_column_chart"]:"response_pie_chart"===e?["pie_chart"]:"response_scatter_chart"===e?["scatter_plot"]:"response_area_chart"===e?["area_chart"]:"response_heatmap_chart"===e?["heatmap"]:[],{Option:x}=o.default,y=e=>{let{data:n,chartType:t,scopeOfCharts:s,ruleConfig:h}=e,{mode:p}=(0,m.useContext)(b.p),[v,y]=(0,m.useState)(),[j,_]=(0,m.useState)([]),[w,C]=(0,m.useState)();(0,m.useEffect)(()=>{y(f({charts:k,scopeOfCharts:void 0,ruleConfig:h}))},[h,s]),(0,m.useEffect)(()=>{if(n&&v){var e;let r=g({data:n,myChartAdvisor:v}),o=function(e){let{advices:n}=e;return n}({advices:r});o.sort((e,n)=>t.indexOf(n.type)-(null==t?void 0:t.indexOf(e.type))),_(o),C(null===(e=o[0])||void 0===e?void 0:e.type)}},[n,v,t]);let N=(0,m.useMemo)(()=>{if((null==j?void 0:j.length)>0){var e,n;let t=null!=w?w:j[0].type,o=null!==(n=null===(e=null==j?void 0:j.find(e=>e.type===t))||void 0===e?void 0:e.spec)&&void 0!==n?n:void 0;if(o)return(0,r.jsx)(c.k,{options:{...o,theme:p,autoFit:!0,height:300}},t)}},[j,w]);return w?(0,r.jsxs)("div",{children:[(0,r.jsxs)(a.Z,{justify:"start",className:"mb-2",children:[(0,r.jsx)(i.Z,{children:u.Z.t("Advices")}),(0,r.jsx)(i.Z,{style:{marginLeft:24},children:(0,r.jsx)(o.default,{className:"w-52",value:w,placeholder:"Chart Switcher",onChange:e=>C(e),size:"small",children:null==j?void 0:j.map(e=>{let n=u.Z.t(e.type);return(0,r.jsx)(x,{value:e.type,children:(0,r.jsx)(l.Z,{title:n,placement:"right",children:(0,r.jsx)("div",{children:n})})},e.type)})})})]}),(0,r.jsx)("div",{className:"auto-chart-content",children:N})]}):(0,r.jsx)(d.Z,{image:d.Z.PRESENTED_IMAGE_SIMPLE,description:"暂无合适的可视化视图"})}},39156:function(e,n,t){"use strict";t.d(n,{_z:function(){return h._},ZP:function(){return p},aG:function(){return h.a}});var r=t(85893),o=t(41118),a=t(30208),i=t(40911),l=t(41468),d=t(7143),c=t(67294);function u(e){let{chart:n}=e,{mode:t}=(0,c.useContext)(l.p);return(0,r.jsx)("div",{className:"flex-1 min-w-0 p-4 bg-white dark:bg-theme-dark-container rounded",children:(0,r.jsxs)("div",{className:"h-full",children:[(0,r.jsx)("div",{className:"mb-2",children:n.chart_name}),(0,r.jsx)("div",{className:"opacity-80 text-sm mb-2",children:n.chart_desc}),(0,r.jsx)("div",{className:"h-[300px]",children:(0,r.jsx)(d.k,{style:{height:"100%"},options:{autoFit:!0,theme:t,type:"interval",data:n.values,encode:{x:"name",y:"value",color:"type"},axis:{x:{labelAutoRotate:!1}}}})})]})})}function s(e){let{chart:n}=e,{mode:t}=(0,c.useContext)(l.p);return(0,r.jsx)("div",{className:"flex-1 min-w-0 p-4 bg-white dark:bg-theme-dark-container rounded",children:(0,r.jsxs)("div",{className:"h-full",children:[(0,r.jsx)("div",{className:"mb-2",children:n.chart_name}),(0,r.jsx)("div",{className:"opacity-80 text-sm mb-2",children:n.chart_desc}),(0,r.jsx)("div",{className:"h-[300px]",children:(0,r.jsx)(d.k,{style:{height:"100%"},options:{autoFit:!0,theme:t,type:"view",data:n.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 f=t(61685),g=t(96486);function m(e){var n,t;let{chart:o}=e,a=(0,g.groupBy)(o.values,"type");return(0,r.jsx)("div",{className:"flex-1 min-w-0 p-4 bg-white dark:bg-theme-dark-container rounded",children:(0,r.jsxs)("div",{className:"h-full",children:[(0,r.jsx)("div",{className:"mb-2",children:o.chart_name}),(0,r.jsx)("div",{className:"opacity-80 text-sm mb-2",children:o.chart_desc}),(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsxs)(f.Z,{"aria-label":"basic table",stripe:"odd",hoverRow:!0,borderAxis:"bothBetween",children:[(0,r.jsx)("thead",{children:(0,r.jsx)("tr",{children:Object.keys(a).map(e=>(0,r.jsx)("th",{children:e},e))})}),(0,r.jsx)("tbody",{children:null===(n=Object.values(a))||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.map((e,n)=>{var t;return(0,r.jsx)("tr",{children:null===(t=Object.keys(a))||void 0===t?void 0:t.map(e=>{var t;return(0,r.jsx)("td",{children:(null==a?void 0:null===(t=a[e])||void 0===t?void 0:t[n].value)||""},e)})},n)})})]})})]})})}var h=t(8497),p=function(e){let{chartsData:n}=e,t=(0,c.useMemo)(()=>{if(n){let e=[],t=null==n?void 0:n.filter(e=>"IndicatorValue"===e.chart_type);t.length>0&&e.push({charts:t,type:"IndicatorValue"});let r=null==n?void 0:n.filter(e=>"IndicatorValue"!==e.chart_type),o=r.length,a=0;return[[0],[1],[2],[1,2],[1,3],[2,1,2],[2,1,3],[3,1,3],[3,2,3]][o].forEach(n=>{if(n>0){let t=r.slice(a,a+n);a+=n,e.push({charts:t})}}),e}},[n]);return(0,r.jsx)("div",{className:"flex flex-col gap-3",children:null==t?void 0:t.map((e,n)=>(0,r.jsx)("div",{className:"".concat((null==e?void 0:e.type)!=="IndicatorValue"?"flex gap-3":""),children:e.charts.map(e=>"IndicatorValue"===e.chart_type||"IndicatorValue"===e.type?(0,r.jsx)("div",{className:"flex flex-row gap-3",children:e.values.map(e=>(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(o.Z,{sx:{background:"transparent"},children:(0,r.jsxs)(a.Z,{className:"justify-around",children:[(0,r.jsx)(i.ZP,{gutterBottom:!0,component:"div",children:e.name}),(0,r.jsx)(i.ZP,{children:e.value})]})})},e.name))},e.chart_uid):"LineChart"===e.chart_type||"LineChart"===e.type?(0,r.jsx)(s,{chart:e},e.chart_uid):"BarChart"===e.chart_type||"BarChart"===e.type?(0,r.jsx)(u,{chart:e},e.chart_uid):"Table"===e.chart_type||"Table"===e.type?(0,r.jsx)(m,{chart:e},e.chart_uid):void 0)},"chart_row_".concat(n)))})}},67772:function(e,n,t){"use strict";t.d(n,{Z:function(){return M}});var r=t(85893),o=t(67294),a=t(2453),i=t(83062),l=t(84553),d=t(71577),c=t(49591),u=t(88484),s=t(29158),f=t(89182),g=t(41468),m=function(e){var n;let{convUid:t,chatMode:m,onComplete:h,...p}=e,[k,b]=(0,o.useState)(!1),[v,x]=a.ZP.useMessage(),[y,j]=(0,o.useState)([]),[_,w]=(0,o.useState)(),{model:C}=(0,o.useContext)(g.p),N=async e=>{var n;if(!e){a.ZP.error("Please select the *.(csv|xlsx|xls) file");return}if(!/\.(csv|xlsx|xls)$/.test(null!==(n=e.file.name)&&void 0!==n?n:"")){a.ZP.error("File type must be csv, xlsx or xls");return}j([e.file])},S=async()=>{b(!0);try{let e=new FormData;e.append("doc_file",y[0]),v.open({content:"Uploading ".concat(y[0].name),type:"loading",duration:0});let[n]=await (0,f.Vx)((0,f.qn)({convUid:t,chatMode:m,data:e,model:C,config:{timeout:36e5,onUploadProgress:e=>{let n=Math.ceil(e.loaded/(e.total||0)*100);w(n)}}}));if(n)return;a.ZP.success("success"),null==h||h()}catch(e){a.ZP.error((null==e?void 0:e.message)||"Upload Error")}finally{b(!1),v.destroy()}};return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[x,(0,r.jsx)(i.Z,{placement:"bottom",title:"File cannot be changed after upload",children:(0,r.jsx)(l.default,{disabled:k,className:"mr-1",beforeUpload:()=>!1,fileList:y,name:"file",accept:".csv,.xlsx,.xls",multiple:!1,onChange:N,showUploadList:{showDownloadIcon:!1,showPreviewIcon:!1,showRemoveIcon:!1},itemRender:()=>(0,r.jsx)(r.Fragment,{}),...p,children:(0,r.jsx)(d.ZP,{className:"flex justify-center items-center",type:"primary",disabled:k,icon:(0,r.jsx)(c.Z,{}),children:"Select File"})})}),(0,r.jsx)(d.ZP,{type:"primary",loading:k,className:"flex justify-center items-center",disabled:!y.length,icon:(0,r.jsx)(u.Z,{}),onClick:S,children:k?100===_?"Analysis":"Uploading":"Upload"}),!!y.length&&(0,r.jsxs)("div",{className:"mt-2 text-gray-500 text-sm flex items-center",children:[(0,r.jsx)(s.Z,{className:"mr-2"}),(0,r.jsx)("span",{children:null===(n=y[0])||void 0===n?void 0:n.name})]})]})})},h=function(e){let{onComplete:n}=e,{currentDialogue:t,scene:a,chatId:i}=(0,o.useContext)(g.p);return"chat_excel"!==a?null:(0,r.jsx)("div",{className:"max-w-md h-full relative",children:t?(0,r.jsxs)("div",{className:"flex h-8 overflow-hidden rounded",children:[(0,r.jsx)("div",{className:"flex items-center justify-center px-2 bg-gray-600 text-lg",children:(0,r.jsx)(s.Z,{className:"text-white"})}),(0,r.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:t.select_param})]}):(0,r.jsx)(m,{convUid:i,chatMode:a,onComplete:n})})};t(23293);var p=t(78045),k=t(16165),b=t(96991),v=t(82353);function x(){let{isContract:e,setIsContract:n,scene:t}=(0,o.useContext)(g.p),a=t&&["chat_with_db_execute","chat_dashboard"].includes(t);return a?(0,r.jsxs)(p.ZP.Group,{value:e,defaultValue:!0,buttonStyle:"solid",onChange:()=>{n(!e)},children:[(0,r.jsxs)(p.ZP.Button,{value:!1,children:[(0,r.jsx)(k.Z,{component:v.ig,className:"mr-1"}),"Preview"]}),(0,r.jsxs)(p.ZP.Button,{value:!0,children:[(0,r.jsx)(b.Z,{className:"mr-1"}),"Editor"]})]}):null}var y=t(81799),j=t(62418),_=t(2093),w=t(51009),C=t(25675),N=t.n(C),S=function(e){let{src:n,label:t,width:o,height:a,className:i}=e;return(0,r.jsx)(N(),{className:"w-11 h-11 rounded-full mr-4 border border-gray-200 object-contain bg-white ".concat(i),width:o||44,height:a||44,src:n,alt:t||"db-icon"})},Z=function(){let{scene:e,dbParam:n,setDbParam:t}=(0,o.useContext)(g.p),[a,i]=(0,o.useState)([]);(0,_.Z)(async()=>{let[,n]=await (0,f.Vx)((0,f.vD)(e));i(null!=n?n:[])},[e]);let l=(0,o.useMemo)(()=>{var e;return null===(e=a.map)||void 0===e?void 0:e.call(a,e=>({name:e.param,...j.S$[e.type]}))},[a]);return((0,o.useEffect)(()=>{(null==l?void 0:l.length)&&!n&&t(l[0].name)},[l,t,n]),null==l?void 0:l.length)?(0,r.jsx)(w.default,{value:n,className:"w-36",onChange:e=>{t(e)},children:l.map(e=>(0,r.jsxs)(w.default.Option,{children:[(0,r.jsx)(S,{width:24,height:24,src:e.icon,label:e.label,className:"w-[1.5em] h-[1.5em] mr-1 inline-block mt-[-4px]"}),e.name]},e.name))}):null},P=t(56155),O=t(67421),I=function(){let{t:e}=(0,O.$G)(),{agent:n,setAgent:t}=(0,o.useContext)(g.p),{data:a=[]}=(0,P.Z)(async()=>{let[,e]=await (0,f.Vx)((0,f.H4)());return null!=e?e:[]});return(0,r.jsx)(w.default,{className:"w-60",value:n,placeholder:e("Select_Plugins"),options:a.map(e=>({label:e.app_name,value:e.app_code})),allowClear:!0,onChange:e=>{null==t||t(e)}})},M=function(e){let{refreshHistory:n,modelChange:t}=e,{scene:a,refreshDialogList:i}=(0,o.useContext)(g.p);return(0,r.jsxs)("div",{className:"w-full py-2 px-4 md:px-4 flex flex-wrap items-center justify-center gap-1 md:gap-4",children:[(0,r.jsx)(y.Z,{onChange:t}),(0,r.jsx)(Z,{}),"chat_excel"===a&&(0,r.jsx)(h,{onComplete:()=>{null==i||i(),null==n||n()}}),"chat_agent"===a&&(0,r.jsx)(I,{}),(0,r.jsx)(x,{})]})}},81799:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});var r=t(85893),o=t(41468),a=t(51009),i=t(19284),l=t(25675),d=t.n(l),c=t(67294),u=t(67421);function s(e,n){var t;let{width:o,height:a}=n||{};return e?(0,r.jsx)(d(),{className:"rounded-full border border-gray-200 object-contain bg-white inline-block",width:o||24,height:a||24,src:(null===(t=i.H[e])||void 0===t?void 0:t.icon)||"/models/huggingface.svg",alt:"llm"}):null}n.Z=function(e){let{onChange:n}=e,{t}=(0,u.$G)(),{modelList:l,model:d}=(0,c.useContext)(o.p);return!l||l.length<=0?null:(0,r.jsx)(a.default,{value:d,placeholder:t("choose_model"),className:"w-52",onChange:e=>{null==n||n(e)},children:l.map(e=>{var n;return(0,r.jsx)(a.default.Option,{children:(0,r.jsxs)("div",{className:"flex items-center",children:[s(e),(0,r.jsx)("span",{className:"ml-2",children:(null===(n=i.H[e])||void 0===n?void 0:n.label)||e})]})},e)})})}},74434:function(e,n,t){"use strict";let r;t.d(n,{Z:function(){return m}});var o=t(85893),a=t(9869),i=t(63764),l=t(94184),d=t.n(l),c=t(67294),u=t(62418),s=t(3930),f=t(41468);async function g(){window.obMonaco={getWorkerUrl:e=>{switch(e){case"mysql":return location.origin+"/_next/static/ob-workers/mysql.js";case"obmysql":return location.origin+"/_next/static/ob-workers/obmysql.js";case"oboracle":return location.origin+"/_next/static/ob-workers/oracle.js"}return""}};let e=await t.e(2057).then(t.bind(t,12057)),n=e.default;return r||(r=new n).setup(["mysql"]),r}function m(e){let{className:n,value:t,language:r="mysql",onChange:a,thoughts:l,session:m}=e,h=(0,c.useMemo)(()=>"mysql"!==r?t:l&&l.length>0?(0,u._m)("-- ".concat(l," \n").concat(t)):(0,u._m)(t),[t,l]),p=(0,s.Z)(m),k=(0,c.useContext)(f.p);async function b(e){var n,t;let r=await g();r.setModelOptions((null===(n=e.getModel())||void 0===n?void 0:n.id)||"",function(e,n){let{modelId:t,delimiter:r}=e;return{delimiter:r,async getTableList(e){var t;return(null==n?void 0:null===(t=n())||void 0===t?void 0:t.getTableList(e))||[]},async getTableColumns(e,t){var r;return(null==n?void 0:null===(r=n())||void 0===r?void 0:r.getTableColumns(e))||[]},async getSchemaList(){var e;return(null==n?void 0:null===(e=n())||void 0===e?void 0:e.getSchemaList())||[]}}}({modelId:(null===(t=e.getModel())||void 0===t?void 0:t.id)||"",delimiter:";"},()=>p.current||null))}return(0,o.jsx)(i.ZP,{className:d()(n),onMount:b,value:h,defaultLanguage:r,onChange:a,theme:(null==k?void 0:k.mode)!=="dark"?"github":"githubDark",options:{minimap:{enabled:!1},wordWrap:"on"}})}i._m.config({monaco:a}),a.editor.defineTheme("github",{base:"vs",inherit:!0,rules:[{background:"ffffff",token:""},{foreground:"6a737d",token:"comment"},{foreground:"6a737d",token:"punctuation.definition.comment"},{foreground:"6a737d",token:"string.comment"},{foreground:"005cc5",token:"constant"},{foreground:"005cc5",token:"entity.name.constant"},{foreground:"005cc5",token:"variable.other.constant"},{foreground:"005cc5",token:"variable.language"},{foreground:"6f42c1",token:"entity"},{foreground:"6f42c1",token:"entity.name"},{foreground:"24292e",token:"variable.parameter.function"},{foreground:"22863a",token:"entity.name.tag"},{foreground:"d73a49",token:"keyword"},{foreground:"d73a49",token:"storage"},{foreground:"d73a49",token:"storage.type"},{foreground:"24292e",token:"storage.modifier.package"},{foreground:"24292e",token:"storage.modifier.import"},{foreground:"24292e",token:"storage.type.java"},{foreground:"032f62",token:"string"},{foreground:"032f62",token:"punctuation.definition.string"},{foreground:"032f62",token:"string punctuation.section.embedded source"},{foreground:"005cc5",token:"support"},{foreground:"005cc5",token:"meta.property-name"},{foreground:"e36209",token:"variable"},{foreground:"24292e",token:"variable.other"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.broken"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.deprecated"},{foreground:"fafbfc",background:"b31d28",fontStyle:"italic underline",token:"invalid.illegal"},{foreground:"fafbfc",background:"d73a49",fontStyle:"italic underline",token:"carriage-return"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.unimplemented"},{foreground:"b31d28",token:"message.error"},{foreground:"24292e",token:"string source"},{foreground:"005cc5",token:"string variable"},{foreground:"032f62",token:"source.regexp"},{foreground:"032f62",token:"string.regexp"},{foreground:"032f62",token:"string.regexp.character-class"},{foreground:"032f62",token:"string.regexp constant.character.escape"},{foreground:"032f62",token:"string.regexp source.ruby.embedded"},{foreground:"032f62",token:"string.regexp string.regexp.arbitrary-repitition"},{foreground:"22863a",fontStyle:"bold",token:"string.regexp constant.character.escape"},{foreground:"005cc5",token:"support.constant"},{foreground:"005cc5",token:"support.variable"},{foreground:"005cc5",token:"meta.module-reference"},{foreground:"735c0f",token:"markup.list"},{foreground:"005cc5",fontStyle:"bold",token:"markup.heading"},{foreground:"005cc5",fontStyle:"bold",token:"markup.heading entity.name"},{foreground:"22863a",token:"markup.quote"},{foreground:"24292e",fontStyle:"italic",token:"markup.italic"},{foreground:"24292e",fontStyle:"bold",token:"markup.bold"},{foreground:"005cc5",token:"markup.raw"},{foreground:"b31d28",background:"ffeef0",token:"markup.deleted"},{foreground:"b31d28",background:"ffeef0",token:"meta.diff.header.from-file"},{foreground:"b31d28",background:"ffeef0",token:"punctuation.definition.deleted"},{foreground:"22863a",background:"f0fff4",token:"markup.inserted"},{foreground:"22863a",background:"f0fff4",token:"meta.diff.header.to-file"},{foreground:"22863a",background:"f0fff4",token:"punctuation.definition.inserted"},{foreground:"e36209",background:"ffebda",token:"markup.changed"},{foreground:"e36209",background:"ffebda",token:"punctuation.definition.changed"},{foreground:"f6f8fa",background:"005cc5",token:"markup.ignored"},{foreground:"f6f8fa",background:"005cc5",token:"markup.untracked"},{foreground:"6f42c1",fontStyle:"bold",token:"meta.diff.range"},{foreground:"005cc5",token:"meta.diff.header"},{foreground:"005cc5",fontStyle:"bold",token:"meta.separator"},{foreground:"005cc5",token:"meta.output"},{foreground:"586069",token:"brackethighlighter.tag"},{foreground:"586069",token:"brackethighlighter.curly"},{foreground:"586069",token:"brackethighlighter.round"},{foreground:"586069",token:"brackethighlighter.square"},{foreground:"586069",token:"brackethighlighter.angle"},{foreground:"586069",token:"brackethighlighter.quote"},{foreground:"b31d28",token:"brackethighlighter.unmatched"},{foreground:"b31d28",token:"sublimelinter.mark.error"},{foreground:"e36209",token:"sublimelinter.mark.warning"},{foreground:"959da5",token:"sublimelinter.gutter-mark"},{foreground:"032f62",fontStyle:"underline",token:"constant.other.reference.link"},{foreground:"032f62",fontStyle:"underline",token:"string.other.link"}],colors:{"editor.foreground":"#24292e","editor.background":"#ffffff","editor.selectionBackground":"#c8c8fa","editor.inactiveSelectionBackground":"#fafbfc","editor.lineHighlightBackground":"#fafbfc","editorCursor.foreground":"#24292e","editorWhitespace.foreground":"#959da5","editorIndentGuide.background":"#959da5","editorIndentGuide.activeBackground":"#24292e","editor.selectionHighlightBorder":"#fafbfc"}}),a.editor.defineTheme("githubDark",{base:"vs-dark",inherit:!0,rules:[{background:"24292e",token:""},{foreground:"959da5",token:"comment"},{foreground:"959da5",token:"punctuation.definition.comment"},{foreground:"959da5",token:"string.comment"},{foreground:"c8e1ff",token:"constant"},{foreground:"c8e1ff",token:"entity.name.constant"},{foreground:"c8e1ff",token:"variable.other.constant"},{foreground:"c8e1ff",token:"variable.language"},{foreground:"b392f0",token:"entity"},{foreground:"b392f0",token:"entity.name"},{foreground:"f6f8fa",token:"variable.parameter.function"},{foreground:"7bcc72",token:"entity.name.tag"},{foreground:"ea4a5a",token:"keyword"},{foreground:"ea4a5a",token:"storage"},{foreground:"ea4a5a",token:"storage.type"},{foreground:"f6f8fa",token:"storage.modifier.package"},{foreground:"f6f8fa",token:"storage.modifier.import"},{foreground:"f6f8fa",token:"storage.type.java"},{foreground:"79b8ff",token:"string"},{foreground:"79b8ff",token:"punctuation.definition.string"},{foreground:"79b8ff",token:"string punctuation.section.embedded source"},{foreground:"c8e1ff",token:"support"},{foreground:"c8e1ff",token:"meta.property-name"},{foreground:"fb8532",token:"variable"},{foreground:"f6f8fa",token:"variable.other"},{foreground:"d73a49",fontStyle:"bold italic underline",token:"invalid.broken"},{foreground:"d73a49",fontStyle:"bold italic underline",token:"invalid.deprecated"},{foreground:"fafbfc",background:"d73a49",fontStyle:"italic underline",token:"invalid.illegal"},{foreground:"fafbfc",background:"d73a49",fontStyle:"italic underline",token:"carriage-return"},{foreground:"d73a49",fontStyle:"bold italic underline",token:"invalid.unimplemented"},{foreground:"d73a49",token:"message.error"},{foreground:"f6f8fa",token:"string source"},{foreground:"c8e1ff",token:"string variable"},{foreground:"79b8ff",token:"source.regexp"},{foreground:"79b8ff",token:"string.regexp"},{foreground:"79b8ff",token:"string.regexp.character-class"},{foreground:"79b8ff",token:"string.regexp constant.character.escape"},{foreground:"79b8ff",token:"string.regexp source.ruby.embedded"},{foreground:"79b8ff",token:"string.regexp string.regexp.arbitrary-repitition"},{foreground:"7bcc72",fontStyle:"bold",token:"string.regexp constant.character.escape"},{foreground:"c8e1ff",token:"support.constant"},{foreground:"c8e1ff",token:"support.variable"},{foreground:"c8e1ff",token:"meta.module-reference"},{foreground:"fb8532",token:"markup.list"},{foreground:"0366d6",fontStyle:"bold",token:"markup.heading"},{foreground:"0366d6",fontStyle:"bold",token:"markup.heading entity.name"},{foreground:"c8e1ff",token:"markup.quote"},{foreground:"f6f8fa",fontStyle:"italic",token:"markup.italic"},{foreground:"f6f8fa",fontStyle:"bold",token:"markup.bold"},{foreground:"c8e1ff",token:"markup.raw"},{foreground:"b31d28",background:"ffeef0",token:"markup.deleted"},{foreground:"b31d28",background:"ffeef0",token:"meta.diff.header.from-file"},{foreground:"b31d28",background:"ffeef0",token:"punctuation.definition.deleted"},{foreground:"176f2c",background:"f0fff4",token:"markup.inserted"},{foreground:"176f2c",background:"f0fff4",token:"meta.diff.header.to-file"},{foreground:"176f2c",background:"f0fff4",token:"punctuation.definition.inserted"},{foreground:"b08800",background:"fffdef",token:"markup.changed"},{foreground:"b08800",background:"fffdef",token:"punctuation.definition.changed"},{foreground:"2f363d",background:"959da5",token:"markup.ignored"},{foreground:"2f363d",background:"959da5",token:"markup.untracked"},{foreground:"b392f0",fontStyle:"bold",token:"meta.diff.range"},{foreground:"c8e1ff",token:"meta.diff.header"},{foreground:"0366d6",fontStyle:"bold",token:"meta.separator"},{foreground:"0366d6",token:"meta.output"},{foreground:"ffeef0",token:"brackethighlighter.tag"},{foreground:"ffeef0",token:"brackethighlighter.curly"},{foreground:"ffeef0",token:"brackethighlighter.round"},{foreground:"ffeef0",token:"brackethighlighter.square"},{foreground:"ffeef0",token:"brackethighlighter.angle"},{foreground:"ffeef0",token:"brackethighlighter.quote"},{foreground:"d73a49",token:"brackethighlighter.unmatched"},{foreground:"d73a49",token:"sublimelinter.mark.error"},{foreground:"fb8532",token:"sublimelinter.mark.warning"},{foreground:"6a737d",token:"sublimelinter.gutter-mark"},{foreground:"79b8ff",fontStyle:"underline",token:"constant.other.reference.link"},{foreground:"79b8ff",fontStyle:"underline",token:"string.other.link"}],colors:{"editor.foreground":"#f6f8fa","editor.background":"#24292e","editor.selectionBackground":"#4c2889","editor.inactiveSelectionBackground":"#444d56","editor.lineHighlightBackground":"#444d56","editorCursor.foreground":"#ffffff","editorWhitespace.foreground":"#6a737d","editorIndentGuide.background":"#6a737d","editorIndentGuide.activeBackground":"#f6f8fa","editor.selectionHighlightBorder":"#444d56"}})},91085:function(e,n,t){"use strict";var r=t(85893),o=t(32983),a=t(71577),i=t(94184),l=t.n(i),d=t(67421);n.Z=function(e){let{className:n,error:t,description:i,refresh:c}=e,{t:u}=(0,d.$G)();return(0,r.jsx)(o.Z,{image:"/empty.png",imageStyle:{width:320,height:196,margin:"0 auto",maxWidth:"100%",maxHeight:"100%"},className:l()("flex items-center justify-center flex-col h-full w-full",n),description:t?(0,r.jsx)(a.ZP,{type:"primary",onClick:c,children:u("try_again")}):null!=i?i:u("no_data")})}},30119:function(e,n,t){"use strict";t.d(n,{Tk:function(){return l},PR:function(){return d}});var r=t(2453),o=t(6154);let a=o.default.create({baseURL:"http://127.0.0.1:5670"});a.defaults.timeout=1e4,a.interceptors.response.use(e=>e.data,e=>Promise.reject(e)),t(96486);let i={"content-type":"application/json"},l=(e,n)=>{if(n){let t=Object.keys(n).filter(e=>void 0!==n[e]&&""!==n[e]).map(e=>"".concat(e,"=").concat(n[e])).join("&");t&&(e+="?".concat(t))}return a.get("/api"+e,{headers:i}).then(e=>e).catch(e=>{r.ZP.error(e),Promise.reject(e)})},d=(e,n)=>a.post(e,n,{headers:i}).then(e=>e).catch(e=>{r.ZP.error(e),Promise.reject(e)})},23293:function(){}}]); \ No newline at end of file diff --git a/dbgpt/app/static/_next/static/chunks/pages/_app-ccb54464fb48754c.js b/dbgpt/app/static/_next/static/chunks/pages/_app-c71b0733978b233a.js similarity index 71% rename from dbgpt/app/static/_next/static/chunks/pages/_app-ccb54464fb48754c.js rename to dbgpt/app/static/_next/static/chunks/pages/_app-c71b0733978b233a.js index d3d033875..d9b9fb6a2 100644 --- a/dbgpt/app/static/_next/static/chunks/pages/_app-ccb54464fb48754c.js +++ b/dbgpt/app/static/_next/static/chunks/pages/_app-c71b0733978b233a.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,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,E=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,T=n?Symbol.for("react.forward_ref"):60112,R=n?Symbol.for("react.suspense"):60113,A=n?Symbol.for("react.suspense_list"):60120,d=n?Symbol.for("react.memo"):60115,f=n?Symbol.for("react.lazy"):60116,S=n?Symbol.for("react.block"):60121,p=n?Symbol.for("react.fundamental"):60117,O=n?Symbol.for("react.responder"):60118,I=n?Symbol.for("react.scope"):60119;function N(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case u:case i:case s:case a:case R:return e;default:switch(e=e&&e.$$typeof){case E:case T:case f:case d:case l:return e;default:return t}}case o:return t}}}function C(e){return N(e)===u}t.AsyncMode=c,t.ConcurrentMode=u,t.ContextConsumer=E,t.ContextProvider=l,t.Element=r,t.ForwardRef=T,t.Fragment=i,t.Lazy=f,t.Memo=d,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=R,t.isAsyncMode=function(e){return C(e)||N(e)===c},t.isConcurrentMode=C,t.isContextConsumer=function(e){return N(e)===E},t.isContextProvider=function(e){return N(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return N(e)===T},t.isFragment=function(e){return N(e)===i},t.isLazy=function(e){return N(e)===f},t.isMemo=function(e){return N(e)===d},t.isPortal=function(e){return N(e)===o},t.isProfiler=function(e){return N(e)===s},t.isStrictMode=function(e){return N(e)===a},t.isSuspense=function(e){return N(e)===R},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===s||e===a||e===R||e===A||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===l||e.$$typeof===E||e.$$typeof===T||e.$$typeof===p||e.$$typeof===O||e.$$typeof===I||e.$$typeof===S)},t.typeOf=N},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,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),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,s=Math.min;e.exports=function(e,t,n){var l,E,c,u,T,R,A=0,d=!1,f=!1,S=!0;if("function"!=typeof e)throw TypeError("Expected a function");function p(t){var n=l,r=E;return l=E=void 0,A=t,u=e.apply(r,n)}function O(e){var n=e-R,r=e-A;return void 0===R||n>=t||n<0||f&&r>=c}function I(){var e,n,r,i=o();if(O(i))return N(i);T=setTimeout(I,(e=i-R,n=i-A,r=t-e,f?s(r,c-n):r))}function N(e){return(T=void 0,S&&l)?p(e):(l=E=void 0,u)}function C(){var e,n=o(),r=O(n);if(l=arguments,E=this,R=n,r){if(void 0===T)return A=e=R,T=setTimeout(I,t),d?p(e):u;if(f)return clearTimeout(T),T=setTimeout(I,t),p(R)}return void 0===T&&(T=setTimeout(I,t)),u}return t=i(t)||0,r(n)&&(d=!!n.leading,c=(f="maxWait"in n)?a(i(n.maxWait)||0,t):c,S="trailing"in n?!!n.trailing:S),C.cancel=function(){void 0!==T&&clearTimeout(T),A=0,l=R=E=T=void 0},C.flush=function(){return void 0===T?u:N(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,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,E=/^0o[0-7]+$/i,c=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=l.test(e);return n||E.test(e)?c(e.slice(2),n?2:8):s.test(e)?a:+e}},69654:function(e){var t;t=function(){function e(t,n,r){return this.id=++e.highestId,this.name=t,this.symbols=n,this.postprocess=r,this}function t(e,t,n,r){this.rule=e,this.dot=t,this.reference=n,this.data=[],this.wantedBy=r,this.isComplete=this.dot===e.symbols.length}function n(e,t){this.grammar=e,this.index=t,this.states=[],this.wants={},this.scannable=[],this.completed={}}function r(e,t){this.rules=e,this.start=t||this.rules[0].name;var n=this.byName={};this.rules.forEach(function(e){n.hasOwnProperty(e.name)||(n[e.name]=[]),n[e.name].push(e)})}function o(){this.reset("")}function i(e,t,i){if(e instanceof r)var a=e,i=t;else var a=r.fromCompiled(e,t);for(var s in this.grammar=a,this.options={keepHistory:!1,lexer:a.lexer||new o},i||{})this.options[s]=i[s];this.lexer=this.options.lexer,this.lexerState=void 0;var l=new n(a,0);this.table=[l],l.wants[a.start]=[],l.predict(a.start),l.process(),this.current=0}function a(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return e.toString();if(e.type)return"%"+e.type;if(e.test)return"<"+String(e.test)+">";else throw Error("Unknown symbol type: "+e)}}return e.highestId=0,e.prototype.toString=function(e){var t=void 0===e?this.symbols.map(a).join(" "):this.symbols.slice(0,e).map(a).join(" ")+" ● "+this.symbols.slice(e).map(a).join(" ");return this.name+" → "+t},t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(e){var n=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return n.left=this,n.right=e,n.isComplete&&(n.data=n.build(),n.right=void 0),n},t.prototype.build=function(){var e=[],t=this;do e.push(t.right.data),t=t.left;while(t.left);return e.reverse(),e},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,i.fail))},n.prototype.process=function(e){for(var t=this.states,n=this.wants,r=this.completed,o=0;o0&&t.push(" ^ "+r+" more lines identical to this"),r=0,t.push(" "+a)),n=a}},i.prototype.getSymbolDisplay=function(e){return function(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return"character matching "+e;if(e.type)return e.type+" token";if(e.test)return"token matching "+String(e.test);else throw Error("Unknown symbol type: "+e)}}(e)},i.prototype.buildFirstStateStack=function(e,t){if(-1!==t.indexOf(e))return null;if(0===e.wantedBy.length)return[e];var n=e.wantedBy[0],r=[e].concat(t),o=this.buildFirstStateStack(n,r);return null===o?null:[e].concat(o)},i.prototype.save=function(){var e=this.table[this.current];return e.lexerState=this.lexerState,e},i.prototype.restore=function(e){var t=e.index;this.current=t,this.table[t]=e,this.table.splice(t+1),this.lexerState=e.lexerState,this.results=this.finish()},i.prototype.rewind=function(e){if(!this.options.keepHistory)throw Error("set option `keepHistory` to enable rewinding");this.restore(this.table[e])},i.prototype.finish=function(){var e=[],t=this.grammar.start;return this.table[this.table.length-1].states.forEach(function(n){n.rule.name===t&&n.dot===n.rule.symbols.length&&0===n.reference&&n.data!==i.fail&&e.push(n)}),e.map(function(e){return e.data})},{Parser:i,Grammar:r,Rule:e}},e.exports?e.exports=t():this.nearley=t()},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(86221)}])},41468:function(e,t,n){"use strict";n.d(t,{R:function(){return c},p:function(){return E}});var r=n(85893),o=n(67294),i=n(89182),a=n(56155),s=n(39332),l=n(62418);let E=(0,o.createContext)({mode:"light",scene:"",chatId:"",modelList:[],model:"",dbParam:void 0,dialogueList:[],agent:"",setAgent:()=>{},setModel:()=>{},setIsContract:()=>{},setIsMenuExpand:()=>{},setDbParam:()=>void 0,queryDialogueList:()=>{},refreshDialogList:()=>{},setMode:()=>void 0,history:[],setHistory:()=>{},docId:void 0,setDocId:()=>{}}),c=e=>{var t,n,c;let{children:u}=e,T=(0,s.useSearchParams)(),R=null!==(t=null==T?void 0:T.get("id"))&&void 0!==t?t:"",A=null!==(n=null==T?void 0:T.get("scene"))&&void 0!==n?n:"",d=null!==(c=null==T?void 0:T.get("db_param"))&&void 0!==c?c:"",[f,S]=(0,o.useState)(!1),[p,O]=(0,o.useState)(""),[I,N]=(0,o.useState)("chat_dashboard"!==A),[C,h]=(0,o.useState)(d),[m,g]=(0,o.useState)(""),[_,L]=(0,o.useState)([]),[v,P]=(0,o.useState)(),[y,b]=(0,o.useState)("light"),{run:D,data:M=[],refresh:U}=(0,a.Z)(async()=>{let[,e]=await (0,i.Vx)((0,i.iP)());return null!=e?e:[]},{manual:!0});(0,o.useEffect)(()=>{if(M.length&&"chat_agent"===A){var e;let t=null===(e=M.find(e=>e.conv_uid===R))||void 0===e?void 0:e.select_param;t&&g(t)}},[M,A,R]);let{data:x=[]}=(0,a.Z)(async()=>{let[,e]=await (0,i.Vx)((0,i.Vw)());return null!=e?e:[]});(0,o.useEffect)(()=>{b(function(){let e=localStorage.getItem(l.he);return e||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")}())},[]),(0,o.useEffect)(()=>{O(x[0])},[x,null==x?void 0:x.length]);let G=(0,o.useMemo)(()=>M.find(e=>e.conv_uid===R),[R,M]);return(0,r.jsx)(E.Provider,{value:{isContract:f,isMenuExpand:I,scene:A,chatId:R,modelList:x,model:p,dbParam:C||d,dialogueList:M,agent:m,setAgent:g,mode:y,setMode:b,setModel:O,setIsContract:S,setIsMenuExpand:N,setDbParam:h,queryDialogueList:D,refreshDialogList:U,currentDialogue:G,history:_,setHistory:L,docId:v,setDocId:P},children:u})}},36353:function(e,t,n){"use strict";var r=n(36609),o=n(67421);r.ZP.use(o.Db).init({resources:{en:{translation:{Knowledge_Space:"Knowledge",space:"space",Vector:"Vector",Owner:"Owner",Count:"Count",File_type_Invalid:"The file type is invalid",Knowledge_Space_Config:"Space Config",Choose_a_Datasource_type:"Datasource type",Segmentation:"Segmentation",No_parameter:"No segementation parameter required.",Knowledge_Space_Name:"Knowledge Space Name",Please_input_the_name:"Please input the name",Please_input_the_owner:"Please input the owner",Please_select_file:"Please select one file",Description:"Description",Storage:"Storage",Please_input_the_description:"Please input the description",Please_select_the_storage:"Please select the storage",Next:"Next",the_name_can_only_contain:'the name can only contain numbers, letters, Chinese characters, "-" and "_"',Text:"Text","Fill your raw text":"Fill your raw text",URL:"URL",Fetch_the_content_of_a_URL:"Fetch the content of a URL",Document:"Document",Upload_a_document:"Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown",Name:"Name",Text_Source:"Text Source(Optional)",Please_input_the_text_source:"Please input the text source",Sync:"Sync",Back:"Back",Finish:"Finish",Web_Page_URL:"Web Page URL",Please_input_the_Web_Page_URL:"Please input the Web Page URL",Select_or_Drop_file:"Select or Drop file",Documents:"Documents",Chat:"Chat",Add_Datasource:"Add Datasource",View_Graph:"View Graph",Arguments:"Arguments",Type:"Type",Size:"Size",Last_Sync:"Last Sync",Status:"Status",Result:"Result",Details:"Details",Delete:"Delete",Operation:"Operation",Submit:"Submit",Chunks:"Chunks",Content:"Content",Meta_Data:"Meta Data",Please_select_a_file:"Please select a file",Please_input_the_text:"Please input the text",Embedding:"Embedding",topk:"topk",the_top_k_vectors:"the top k vectors based on similarity score",recall_score:"recall_score",Set_a_threshold_score:"Set a threshold score for the retrieval of similar vectors",recall_type:"recall_type",model:"model",A_model_used:"A model used to create vector representations of text or other data",Automatic:"Automatic",Process:"Process",Automatic_desc:"Automatically set segmentation and preprocessing rules.",chunk_size:"chunk_size",The_size_of_the_data_chunks:"The size of the data chunks used in processing",chunk_overlap:"chunk_overlap",The_amount_of_overlap:"The amount of overlap between adjacent data chunks",Prompt:"Prompt",scene:"scene",A_contextual_parameter:"A contextual parameter used to define the setting or environment in which the prompt is being used",template:"template",structure_or_format:"A pre-defined structure or format for the prompt, which can help ensure that the AI system generates responses that are consistent with the desired style or tone.",max_token:"max_token",max_iteration:"max_iteration",concurrency_limit:"concurrency_limit",The_maximum_number_of_tokens:"The maximum number of tokens or words allowed in a prompt",Theme:"Theme",Port:"Port",Username:"Username",Password:"Password",Remark:"Remark",Edit:"Edit",Database:"Database",Data_Source:"Data Center",Close_Sidebar:"Fold",Show_Sidebar:"UnFold",language:"Language",choose_model:"Please choose a model",data_center_desc:"DB-GPT also offers a user-friendly data center management interface for efficient data maintenance.",create_database:"Create Database",create_knowledge:"Create Knowledge",path:"Path",model_manage:"Models",stop_model_success:"Stop model success",create_model:"Create Model",model_select_tips:"Please select a model",language_select_tips:"Please select a language",submit:"Submit",close:"Close",start_model_success:"Start model success",download_model_tip:"Please download model first.",Plugins:"Plugins",try_again:"Try again",no_data:"No data",Open_Sidebar:"Unfold",cancel:"Cancel",Edit_Success:"Edit Success",Add:"Add",Add_Success:"Add Success",Error_Message:"Something Error",Please_Input:"Please Input",Prompt_Info_Scene:"Scene",Prompt_Info_Sub_Scene:"Sub Scene",Prompt_Info_Name:"Name",Prompt_Info_Content:"Content",Public:"Public",Private:"Private",Lowest:"Lowest",Missed:"Missed",Lost:"Lost",Incorrect:"Incorrect",Verbose:"Verbose",Best:"Best",Rating:"Rating",Q_A_Category:"Q&A Category",Q_A_Rating:"Q&A Rating",feed_back_desc:"0: No results\n1: Results exist, but they are irrelevant, the question is not understood\n2: Results exist, the question is understood, but it indicates that the question cannot be answered\n3: Results exist, the question is understood, and an answer is given, but the answer is incorrect\n4: Results exist, the question is understood, the answer is correct, but it is verbose and lacks a summary\n5: Results exist, the question is understood, the answer is correct, the reasoning is correct, and a summary is provided, concise and to the point\n",input_count:"Total input",input_unit:"characters",Copy:"Copy",Copy_success:"Content copied successfully",Copy_nothing:"Content copied is empty",Copry_error:"Copy failed",Click_Select:"Click&Select",Quick_Start:"Quick Start",Select_Plugins:"Select Plugins",Search:"Search",Update_From_Github:"Upload From Github",Reset:"Reset",Upload:"Upload",Market_Plugins:"Market Plugin",My_Plugins:"My Plugins",Del_Knowledge_Tips:"Do you want delete the Space",Del_Document_Tips:"Do you want delete the Document",Tips:"Tips",Limit_Upload_File_Count_Tips:"Only one file can be uploaded at a time",To_Plugin_Market:"Go to the Plugin Market",Summary:"Summary",stacked_column_chart:"Stacked Column",column_chart:"Column",percent_stacked_column_chart:"Percent Stacked Column",grouped_column_chart:"Grouped Column",time_column:"Time Column",pie_chart:"Pie",line_chart:"Line",area_chart:"Area",stacked_area_chart:"Stacked Area",scatter_plot:"Scatter",bubble_chart:"Bubble",stacked_bar_chart:"Stacked Bar",bar_chart:"Bar",percent_stacked_bar_chart:"Percent Stacked Bar",grouped_bar_chart:"Grouped Bar",water_fall_chart:"Waterfall",table:"Table",multi_line_chart:"Multi Line",multi_measure_column_chart:"Multi Measure Column",multi_measure_line_chart:"Multi Measure Line",Advices:"Advices",Retry:"Retry",Load_more:"load more",new_chat:"New Chat",choice_agent_tip:"Please choose an agent",no_context_tip:"Please enter your question",Terminal:"Terminal",awel_flow:"AWEL Flow",save:"Save",add_node:"Add Node",no_node:"No Node",connect_warning:"Nodes cannot be connected",flow_modal_title:"Save Flow",flow_name:"Flow Name",flow_description:"Flow Description",flow_name_required:"Please enter the flow name",flow_description_required:"Please enter the flow description",save_flow_success:"Save flow success",delete_flow_confirm:"Are you sure you want to delete this flow?",related_nodes:"Related Nodes",add_resource:"Add Resource",team_modal:"Work Modal",App:"App",resource_name:"Resource Name",resource_type:"Resource Type",resource_value:"Value",resource_dynamic:"Dynamic",Please_input_the_work_modal:"Please select the work modal",available_resources:" Available Resources",edit_new_applications:"Edit new applications",collect:"Collect",collected:"Collected",create:"Create",Agents:"Agents",edit_application:"edit application",add_application:"add application",app_name:"App Name",LLM_strategy:"LLM Strategy",LLM_strategy_value:"LLM Strategy Value",resource:"Resource",operators:"Operators",Chinese:"Chinese",English:"English",refreshSuccess:"Refresh Success"}},zh:{translation:{Knowledge_Space:"知识库",space:"知识库",Vector:"向量",Owner:"创建人",Count:"文档数",File_type_Invalid:"文件类型错误",Knowledge_Space_Config:"知识库配置",Choose_a_Datasource_type:"知识库类型",Segmentation:"分片",No_parameter:"不需要配置分片参数",Knowledge_Space_Name:"知识库名称",Please_input_the_name:"请输入名称",Please_input_the_owner:"请输入创建人",Please_select_file:"请至少选择一个文件",Description:"描述",Storage:"存储类型",Please_input_the_description:"请输入描述",Please_select_the_storage:"请选择存储类型",Next:"下一步",the_name_can_only_contain:"名称只能包含数字、字母、中文字符、-或_",Text:"文本","Fill your raw text":"填写您的原始文本",URL:"网址",Fetch_the_content_of_a_URL:"获取 URL 的内容",Document:"文档",Upload_a_document:"上传文档,文档类型可以是PDF、CSV、Text、PowerPoint、Word、Markdown",Name:"名称",Text_Source:"文本来源(可选)",Please_input_the_text_source:"请输入文本来源",Sync:"同步",Back:"上一步",Finish:"完成",Web_Page_URL:"网页网址",Please_input_the_Web_Page_URL:"请输入网页网址",Select_or_Drop_file:"选择或拖拽文件",Documents:"文档",Chat:"对话",Add_Datasource:"添加数据源",View_Graph:"查看图谱",Arguments:"参数",Type:"类型",Size:"切片",Last_Sync:"上次同步时间",Status:"状态",Result:"结果",Details:"明细",Delete:"删除",Operation:"操作",Submit:"提交",close:"关闭",Chunks:"切片",Content:"内容",Meta_Data:"元数据",Please_select_a_file:"请上传一个文件",Please_input_the_text:"请输入文本",Embedding:"嵌入",topk:"TopK",the_top_k_vectors:"基于相似度得分的前 k 个向量",recall_score:"召回分数",Set_a_threshold_score:"设置相似向量检索的阈值分数",recall_type:"召回类型",model:"模型",A_model_used:"用于创建文本或其他数据的矢量表示的模型",Automatic:"自动切片",Process:"切片处理",Automatic_desc:"自动设置分割和预处理规则。",chunk_size:"块大小",The_size_of_the_data_chunks:"处理中使用的数据块的大小",chunk_overlap:"块重叠",The_amount_of_overlap:"相邻数据块之间的重叠量",scene:"场景",A_contextual_parameter:"用于定义使用提示的设置或环境的上下文参数",template:"模板",structure_or_format:"预定义的提示结构或格式,有助于确保人工智能系统生成与所需风格或语气一致的响应。",max_token:"最大令牌",max_iteration:"最大迭代",concurrency_limit:"并发限制",The_maximum_number_of_tokens:"提示中允许的最大标记或单词数",Theme:"主题",Port:"端口",Username:"用户名",Password:"密码",Remark:"备注",Edit:"编辑",Database:"数据库",Data_Source:"数据中心",Close_Sidebar:"收起",Show_Sidebar:"展开",language:"语言",choose_model:"请选择一个模型",data_center_desc:"DB-GPT支持数据库交互和基于文档的对话,它还提供了一个用户友好的数据中心管理界面。",create_database:"创建数据库",create_knowledge:"创建知识库",path:"路径",model_manage:"模型管理",stop_model_success:"模型停止成功",create_model:"创建模型",model_select_tips:"请选择一个模型",submit:"提交",start_model_success:"启动模型成功",download_model_tip:"请先下载模型!",Plugins:"插件列表",try_again:"刷新重试",no_data:"暂无数据",Prompt:"提示语",Open_Sidebar:"展开",cancel:"取消",Edit_Success:"编辑成功",Add:"新增",Add_Success:"新增成功",Error_Message:"出错了",Please_Input:"请输入",Prompt_Info_Scene:"场景",Prompt_Info_Sub_Scene:"次级场景",Prompt_Info_Name:"名称",Prompt_Info_Content:"内容",Public:"公共",Private:"私有",Lowest:"渣渣",Missed:"没理解",Lost:"答不了",Incorrect:"答错了",Verbose:"较啰嗦",Best:"真棒",Rating:"评分",Q_A_Category:"问答类别",Q_A_Rating:"问答评分",feed_back_desc:"0: 无结果\n1: 有结果,但是在文不对题,没有理解问题\n2: 有结果,理解了问题,但是提示回答不了这个问题\n3: 有结果,理解了问题,并做出回答,但是回答的结果错误\n4: 有结果,理解了问题,回答结果正确,但是比较啰嗦,缺乏总结\n5: 有结果,理解了问题,回答结果正确,推理正确,并给出了总结,言简意赅\n",input_count:"共计输入",input_unit:"字",Copy:"复制",Copy_success:"内容复制成功",Copy_nothing:"内容复制为空",Copry_error:"复制失败",Click_Select:"点击选择",Quick_Start:"快速开始",Select_Plugins:"选择插件",Search:"搜索",Reset:"重置",Update_From_Github:"更新Github插件",Upload:"上传",Market_Plugins:"插件市场",My_Plugins:"我的插件",Del_Knowledge_Tips:"你确定删除该知识库吗",Del_Document_Tips:"你确定删除该文档吗",Tips:"提示",Limit_Upload_File_Count_Tips:"一次只能上传一个文件",To_Plugin_Market:"前往插件市场",Summary:"总结",stacked_column_chart:"堆叠柱状图",column_chart:"柱状图",percent_stacked_column_chart:"百分比堆叠柱状图",grouped_column_chart:"簇形柱状图",time_column:"簇形柱状图",pie_chart:"饼图",line_chart:"折线图",area_chart:"面积图",stacked_area_chart:"堆叠面积图",scatter_plot:"散点图",bubble_chart:"气泡图",stacked_bar_chart:"堆叠条形图",bar_chart:"条形图",percent_stacked_bar_chart:"百分比堆叠条形图",grouped_bar_chart:"簇形条形图",water_fall_chart:"瀑布图",table:"表格",multi_line_chart:"多折线图",multi_measure_column_chart:"多指标柱形图",multi_measure_line_chart:"多指标折线图",Advices:"自动推荐",Retry:"重试",Load_more:"加载更多",new_chat:"创建会话",choice_agent_tip:"请选择代理",no_context_tip:"请输入你的问题",Terminal:"终端",awel_flow:"AWEL 工作流",save:"保存",add_node:"添加节点",no_node:"没有可编排节点",connect_warning:"节点无法连接",flow_modal_title:"保存工作流",flow_name:"工作流名称",flow_description:"工作流描述",flow_name_required:"请输入工作流名称",flow_description_required:"请输入工作流描述",save_flow_success:"保存工作流成功",delete_flow_confirm:"确定删除该工作流吗?",related_nodes:"关联节点",language_select_tips:"请选择语言",add_resource:"添加资源",team_modal:"工作模式",App:"应用程序",resource:"资源",resource_name:"资源名",resource_type:"资源类型",resource_value:"参数",resource_dynamic:"动态",Please_input_the_work_modal:"请选择工作模式",available_resources:"可用资源",edit_new_applications:"编辑新的应用",collect:"收藏",collected:"已收藏",create:"创建",Agents:"智能体",edit_application:"编辑应用",add_application:"添加应用",app_name:"应用名称",LLM_strategy:"模型策略",LLM_strategy_value:"模型策略参数",operators:"算子",Chinese:"中文",English:"英文",refreshSuccess:"刷新成功"}}},lng:"en",interpolation:{escapeValue:!1}}),t.Z=r.ZP},89182:function(e,t,n){"use strict";n.d(t,{yY:function(){return eB},HT:function(){return eG},a4:function(){return eF},uO:function(){return eH},L5:function(){return eN},H_:function(){return V},zd:function(){return ed},Hy:function(){return eA},be:function(){return k},Vx:function(){return C},mo:function(){return eh},Nl:function(){return eg},MX:function(){return F},n3:function(){return z},XK:function(){return J},Jq:function(){return eO},j8:function(){return e_},yk:function(){return eC},Vd:function(){return eb},m9:function(){return eD},Tu:function(){return H},Eb:function(){return ec},Lu:function(){return eE},$i:function(){return x},gV:function(){return K},iZ:function(){return W},Bw:function(){return g},Jm:function(){return _},H4:function(){return el},iP:function(){return D},_Q:function(){return $},_d:function(){return eS},As:function(){return eI},Wf:function(){return ef},FT:function(){return Y},fZ:function(){return q},xA:function(){return eT},RX:function(){return eP},Q5:function(){return ev},Vm:function(){return w},xv:function(){return et},lz:function(){return eL},Vw:function(){return M},sW:function(){return m},DM:function(){return er},v6:function(){return ei},N6:function(){return eo},bC:function(){return en},YU:function(){return ea},Kn:function(){return es},VC:function(){return eu},qn:function(){return G},vD:function(){return U},b_:function(){return P},J5:function(){return L},mR:function(){return v},yx:function(){return b},KS:function(){return y},CU:function(){return h},iH:function(){return B},vA:function(){return ee},kU:function(){return Q},KL:function(){return j},Hx:function(){return Z},gD:function(){return em},KT:function(){return ey},ao:function(){return ep},Fu:function(){return eR},iG:function(){return X}});var r,o=n(6154);let{Axios:i,AxiosError:a,CanceledError:s,isCancel:l,CancelToken:E,VERSION:c,all:u,Cancel:T,isAxiosError:R,spread:A,toFormData:d,AxiosHeaders:f,HttpStatusCode:S,formToJSON:p,getAdapter:O,mergeConfig:I}=o.default;var N=n(54689);let C=(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;N.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=>{let t=e.message;if(e instanceof a)try{let{err_msg:n}=JSON.parse(e.request.response);n&&(t=n)}catch(e){}return N.Z.error({message:"Request error",description:t}),[e,null,null,null]}),h=()=>eF("/api/v1/chat/dialogue/scenes"),m=e=>eF("/api/v1/chat/dialogue/new",e),g=()=>eG("/api/v1/chat/db/list"),_=()=>eG("/api/v1/chat/db/support/type"),L=e=>eF("/api/v1/chat/db/delete?db_name=".concat(e)),v=e=>eF("/api/v1/chat/db/edit",e),P=e=>eF("/api/v1/chat/db/add",e),y=e=>eF("/api/v1/chat/db/test/connect",e),b=e=>eF("/api/v1/chat/db/refresh",e),D=()=>eG("/api/v1/chat/dialogue/list"),M=()=>eG("/api/v1/model/types"),U=e=>eF("/api/v1/chat/mode/params/list?chat_mode=".concat(e)),x=e=>eG("/api/v1/chat/dialogue/messages/history?con_uid=".concat(e)),G=e=>{let{convUid:t,chatMode:n,data:r,config:o,model:i}=e;return eF("/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})},F=e=>eF("/api/v1/chat/dialogue/delete?con_uid=".concat(e)),H=e=>eF("/knowledge/".concat(e,"/arguments"),{}),B=(e,t)=>eF("/knowledge/".concat(e,"/argument/save"),t),w=()=>eF("/knowledge/space/list",{}),$=(e,t)=>eF("/knowledge/".concat(e,"/document/list"),t),Y=(e,t)=>eF("/knowledge/".concat(e,"/graphvis"),t),V=(e,t)=>eF("/knowledge/".concat(e,"/document/add"),t),k=e=>eF("/knowledge/space/add",e),W=()=>eG("/knowledge/document/chunkstrategies"),Z=(e,t)=>eF("/knowledge/".concat(e,"/document/sync"),t),j=(e,t)=>eF("/knowledge/".concat(e,"/document/sync_batch"),t),X=(e,t)=>eF("/knowledge/".concat(e,"/document/upload"),t),K=(e,t)=>eF("/knowledge/".concat(e,"/chunk/list"),t),z=(e,t)=>eF("/knowledge/".concat(e,"/document/delete"),t),J=e=>eF("/knowledge/space/delete",e),q=()=>eG("/api/v1/worker/model/list"),Q=e=>eF("/api/v1/worker/model/stop",e),ee=e=>eF("/api/v1/worker/model/start",e),et=()=>eG("/api/v1/worker/model/params"),en=e=>eF("/api/v1/agent/query",e),er=e=>eF("/api/v1/agent/hub/update",null!=e?e:{channel:"",url:"",branch:"",authorization:""}),eo=e=>eF("/api/v1/agent/my",void 0,{params:{user:e}}),ei=(e,t)=>eF("/api/v1/agent/install",void 0,{params:{plugin_name:e,user:t},timeout:6e4}),ea=(e,t)=>eF("/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 eF("/api/v1/personal/agent/upload",t,{params:{user:e},headers:{"Content-Type":"multipart/form-data"},...n})},el=()=>eG("/api/v1/dbgpts/list"),eE=()=>eG("/api/v1/feedback/select",void 0),ec=(e,t)=>eG("/api/v1/feedback/find?conv_uid=".concat(e,"&conv_index=").concat(t),void 0),eu=e=>{let{data:t,config:n}=e;return eF("/api/v1/feedback/commit",t,{headers:{"Content-Type":"application/json"},...n})},eT=e=>eF("/prompt/list",e),eR=e=>eF("/prompt/update",e),eA=e=>eF("/prompt/add",e),ed=e=>eF("/api/v1/serve/awel/flows",e),ef=()=>eG("/api/v1/serve/awel/flows"),eS=e=>eG("/api/v1/serve/awel/flows/".concat(e)),ep=(e,t)=>eH("/api/v1/serve/awel/flows/".concat(e),t),eO=e=>eB("/api/v1/serve/awel/flows/".concat(e)),eI=()=>eG("/api/v1/serve/awel/nodes"),eN=e=>eF("/api/v1/app/create",e),eC=e=>eF("/api/v1/app/list",e),eh=e=>eF("/api/v1/app/collect",e),em=e=>eF("/api/v1/app/uncollect",e),eg=e=>eF("/api/v1/app/remove",e),e_=()=>eG("/api/v1/agents/list",{}),eL=()=>eG("/api/v1/team-mode/list"),ev=()=>eG("/api/v1/resource-type/list"),eP=e=>eG("/api/v1/app/resources/list?type=".concat(e.type)),ey=e=>eF("/api/v1/app/edit",e),eb=()=>eG("/api/v1/llm-strategy/list"),eD=e=>eG("/api/v1/llm-strategy/value/list?type=".concat(e));var eM=n(83454);let eU=o.default.create({baseURL:null!==(r=eM.env.API_BASE_URL)&&void 0!==r?r:""}),ex=["/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"];eU.interceptors.request.use(e=>{let t=ex.some(t=>e.url&&e.url.indexOf(t)>=0);return e.timeout||(e.timeout=t?6e4:1e4),e});let eG=(e,t,n)=>eU.get(e,{params:t,...n}),eF=(e,t,n)=>eU.post(e,t,n),eH=(e,t,n)=>eU.put(e,t,n),eB=(e,t,n)=>eU.delete(e,{params:t,...n})},1051:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(85893);function o(){return(0,r.jsx)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"6058",width:"1.5em",height:"1.5em",children:(0,r.jsx)("path",{d:"M688 312c0 4.4-3.6 8-8 8H296c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h384c4.4 0 8 3.6 8 8v48z m-392 88h184c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H296c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8z m376 116c119.3 0 216 96.7 216 216s-96.7 216-216 216-216-96.7-216-216 96.7-216 216-216z m107.5 323.5C808.2 810.8 824 772.6 824 732s-15.8-78.8-44.5-107.5S712.6 580 672 580s-78.8 15.8-107.5 44.5S520 691.4 520 732s15.8 78.8 44.5 107.5S631.4 884 672 884s78.8-15.8 107.5-44.5zM440 852c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H168c-17.7 0-32-14.3-32-32V108c0-17.7 14.3-32 32-32h640c17.7 0 32 14.3 32 32v384c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8V148H208v704h232z m232-76.06l-20.56 28.43c-1.5 2.1-3.9 3.3-6.5 3.3h-44.3c-6.5 0-10.3-7.4-6.4-12.7l45.75-63.3-45.75-63.3c-3.9-5.3-0.1-12.7 6.4-12.7h44.3c2.6 0 5 1.2 6.5 3.3L672 687.4l20.56-28.43c1.5-2.1 3.9-3.3 6.5-3.3h44.3c6.5 0 10.3 7.4 6.4 12.7l-45.75 63.3 45.75 63.3c3.9 5.3 0.1 12.7-6.4 12.7h-44.3c-2.6 0-5-1.2-6.5-3.3L672 775.94z",fill:"#d81e06","p-id":"6059"})})}n(67294)},82353:function(e,t,n){"use strict";n.d(t,{O7:function(){return c},RD:function(){return a},In:function(){return o},zM:function(){return i},je:function(){return s},DL:function(){return l},si:function(){return E},FD:function(){return u},qw:function(){return O},s2:function(){return d},FE:function(){return I.Z},Rp:function(){return f},IN:function(){return T},tu:function(){return S},ig:function(){return R},ol:function(){return A},bn:function(){return p}});var r=n(85893),o=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1116 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1581",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M80.75 80.75m67.14674945 0l805.76099677 0q67.14674945 0 67.14674947 67.14674945l0 604.32074759q0 67.14674945-67.14674947 67.14674945l-805.76099677 0q-67.14674945 0-67.14674945-67.14674945l0-604.32074759q0-67.14674945 67.14674945-67.14674945Z",fill:"#36CFC9","p-id":"1582"}),(0,r.jsx)("path",{d:"M1020.80449568 685.07074759v67.14674945a67.14674945 67.14674945 0 0 1-67.14674946 67.14674945h-308.20358111l91.3195796 100.72012459-24.84429735 22.49416172L600.46584251 819.36424649h-100.72012459L389.62504831 943.25 364.78075097 920.08437108l91.31957961-100.72012459H147.89674945a67.14674945 67.14674945 0 0 1-67.14674945-67.14674945v-67.14674946z",fill:"#08979C","p-id":"1583"}),(0,r.jsx)("path",{d:"M416.48374894 282.19024919v335.7337481H315.76362434V282.19024919z m167.86687404 134.29349975v201.44024834h-100.72012459v-201.44024834z m167.86687406 67.14674945v134.2934989h-100.7201246v-134.2934989z m-225.94881252-302.16037379v141.34390829h201.4402492V272.11823698L819.36424649 341.27938889l-91.3195796 63.45367858V356.38740719h-239.71389641V215.04349975H315.76362434V181.4701246z",fill:"#B5F5EC","p-id":"1584"}),(0,r.jsx)("path",{d:"M550.77724783 752.21749704m-33.57337513 0a33.57337515 33.57337515 0 1 0 67.14675028 0 33.57337515 33.57337515 0 1 0-67.14675028 0Z",fill:"#FFFFFF","p-id":"1585"})]})},i=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1722",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M207.83 962c-5.4 0-10.88-1.17-16.08-3.67-18.55-8.89-26.39-31.13-17.5-49.69l77.22-161.26c8.9-18.58 31.14-26.41 49.7-17.51 18.55 8.89 26.39 31.13 17.5 49.69l-77.22 161.26c-6.4 13.38-19.74 21.18-33.62 21.18zM821.57 962c-13.88 0-27.21-7.8-33.62-21.17l-77.24-161.26c-8.9-18.55-1.06-40.8 17.5-49.69 18.57-8.87 40.8-1.07 49.7 17.51l77.24 161.26c8.9 18.55 1.06 40.8-17.5 49.69a37.266 37.266 0 0 1-16.08 3.66z",fill:"#12926E","p-id":"1723"}),(0,r.jsx)("path",{d:"M156.74 105.14h710.51c50.7 0 91.8 41.1 91.8 91.8v525.82c0 50.7-41.1 91.8-91.8 91.8H156.74c-50.7 0-91.8-41.1-91.8-91.8V196.93c0.01-50.69 41.11-91.79 91.8-91.79z",fill:"#39E2A0","p-id":"1724"}),(0,r.jsx)("path",{d:"M835.65 686.01h-614.7c-5.14 0-9.31-4.17-9.31-9.31 0-5.14 4.17-9.31 9.31-9.31h614.7c5.14 0 9.31 4.17 9.31 9.31 0 5.14-4.17 9.31-9.31 9.31z",fill:"#D3F8EA","p-id":"1725"}),(0,r.jsx)("path",{d:"M699.31 631.94H624.8V454.95c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v176.99zM846.22 631.94h-74.51V346.76c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v285.18zM289.51 631.94H215V417.69c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v214.25zM436.42 631.94h-74.51V495.77c0-11.28 9.14-20.42 20.42-20.42H416c11.28 0 20.42 9.14 20.42 20.42v136.17z",fill:"#FFFFFF","p-id":"1726"}),(0,r.jsx)("path",{d:"M715.4 173.76H308.6c-11.11 0-20.12-9.01-20.12-20.12V82.12c0-11.11 9.01-20.12 20.12-20.12h406.8c11.11 0 20.12 9.01 20.12 20.12v71.52c0.01 11.11-9 20.12-20.12 20.12z",fill:"#12926E","p-id":"1727"})]})},a=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1129",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M226.3 70.4C151.1 91.6 91.6 151.1 70.4 226.3L226.3 70.4z",fill:"#FFA65A","p-id":"1130"}),(0,r.jsx)("path",{d:"M277.9 62.2c-116.5 4.7-211 99.1-215.7 215.7L277.9 62.2z",fill:"#FFA659","p-id":"1131"}),(0,r.jsx)("path",{d:"M321.5 62H287C163.3 62 62 163.3 62 287v34.5L321.5 62z",fill:"#FFA558","p-id":"1132"}),(0,r.jsx)("path",{d:"M365 62h-78C163.3 62 62 163.3 62 287v78L365 62z",fill:"#FFA557","p-id":"1133"}),(0,r.jsx)("path",{d:"M408.4 62H287C163.3 62 62 163.3 62 287v121.4L408.4 62z",fill:"#FFA556","p-id":"1134"}),(0,r.jsx)("path",{d:"M451.8 62H287c-35.9 0-69.8 8.5-100 23.6L85.6 187C70.5 217.2 62 251.1 62 287v164.8L451.8 62z",fill:"#FFA555","p-id":"1135"}),(0,r.jsx)("path",{d:"M495.3 62H287c-12.2 0-24.2 1-35.9 2.9L64.9 251.1C63 262.8 62 274.8 62 287v208.3L495.3 62z",fill:"#FFA454","p-id":"1136"}),(0,r.jsx)("path",{d:"M62 538.7L538.7 62H297.5L62 297.5z",fill:"#FFA453","p-id":"1137"}),(0,r.jsx)("path",{d:"M62 582.1L582.1 62H340.9L62 340.9z",fill:"#FFA452","p-id":"1138"}),(0,r.jsx)("path",{d:"M62 625.6L625.6 62H384.3L62 384.3z",fill:"#FFA451","p-id":"1139"}),(0,r.jsx)("path",{d:"M62 427.8V669L669 62H427.8z",fill:"#FFA450","p-id":"1140"}),(0,r.jsx)("path",{d:"M62 471.2v241.2L712.4 62H471.2z",fill:"#FFA34F","p-id":"1141"}),(0,r.jsx)("path",{d:"M737 62H514.6L62 514.6V737c0 6.1 0.3 12.1 0.7 18.1L755.1 62.7c-6-0.4-12-0.7-18.1-0.7z",fill:"#FFA34E","p-id":"1142"}),(0,r.jsx)("path",{d:"M737 62H558.1L62 558.1V737c0 19.1 2.4 37.6 6.9 55.4L792.4 68.9C774.6 64.4 756.1 62 737 62z",fill:"#FFA34D","p-id":"1143"}),(0,r.jsx)("path",{d:"M737 62H601.5L62 601.5V737c0 31.1 6.4 60.8 17.9 87.8L824.8 79.9C797.8 68.4 768.1 62 737 62z",fill:"#FFA34C","p-id":"1144"}),(0,r.jsx)("path",{d:"M853.5 94.7C819.4 74 779.5 62 737 62h-92.1L62 644.9V737c0 42.5 12 82.4 32.7 116.5L853.5 94.7z",fill:"#FFA24B","p-id":"1145"}),(0,r.jsx)("path",{d:"M878.9 112.7C840.1 81.1 790.7 62 737 62h-48.6L62 688.4V737c0 53.7 19.1 103.1 50.7 141.9l766.2-766.2z",fill:"#FFA24A","p-id":"1146"}),(0,r.jsx)("path",{d:"M737 62h-5.2L62 731.8v5.2c0 64.7 27.7 123.2 71.7 164.3l767.6-767.6C860.2 89.7 801.7 62 737 62z",fill:"#FFA249","p-id":"1147"}),(0,r.jsx)("path",{d:"M64.8 772.4c9.8 61 44.3 114.1 92.8 148.4l763.2-763.2c-34.3-48.6-87.4-83.1-148.4-92.8L64.8 772.4z",fill:"#FFA248","p-id":"1148"}),(0,r.jsx)("path",{d:"M73.3 807.3c18.7 56.4 59.2 103 111.3 129.9l752.6-752.6C910.4 132.5 863.7 92 807.3 73.3l-734 734z",fill:"#FFA247","p-id":"1149"}),(0,r.jsx)("path",{d:"M86.1 838c26.5 52.3 72.9 93.1 129.1 112.2l735-735C931.1 159 890.3 112.6 838 86.1L86.1 838z",fill:"#FFA147","p-id":"1150"}),(0,r.jsx)("path",{d:"M102.4 865.2c34 48.7 86.7 83.5 147.5 93.7l709-709c-10.2-60.8-45-113.5-93.7-147.5L102.4 865.2z",fill:"#FFA146","p-id":"1151"}),(0,r.jsx)("path",{d:"M962 287c0-65.2-28.1-124.1-72.7-165.3L121.7 889.3C162.9 933.9 221.8 962 287 962h3.2L962 290.2V287z",fill:"#FFA145","p-id":"1152"}),(0,r.jsx)("path",{d:"M962 287c0-54.2-19.4-104-51.6-143L144 910.4c39 32.2 88.8 51.6 143 51.6h46.6L962 333.6V287z",fill:"#FFA144","p-id":"1153"}),(0,r.jsx)("path",{d:"M962 287c0-43.1-12.3-83.4-33.5-117.7L169.3 928.5C203.6 949.7 243.9 962 287 962h90.1L962 377.1V287z",fill:"#FFA143","p-id":"1154"}),(0,r.jsx)("path",{d:"M287 962h133.5L962 420.5V287c0-31.6-6.6-61.8-18.5-89.2L197.8 943.4c27.4 12 57.6 18.6 89.2 18.6z",fill:"#FFA042","p-id":"1155"}),(0,r.jsx)("path",{d:"M287 962h176.9L962 463.9V287c0-19.7-2.6-38.7-7.4-56.9L230.1 954.6c18.2 4.8 37.2 7.4 56.9 7.4z",fill:"#FFA041","p-id":"1156"}),(0,r.jsx)("path",{d:"M287 962h220.4L962 507.4V287c0-6.7-0.3-13.4-0.9-20L267 961.1c6.6 0.6 13.3 0.9 20 0.9z",fill:"#FFA040","p-id":"1157"}),(0,r.jsx)("path",{d:"M550.8 962L962 550.8V309.6L309.6 962z",fill:"#FFA03F","p-id":"1158"}),(0,r.jsx)("path",{d:"M594.2 962L962 594.2V353L353 962z",fill:"#FF9F3E","p-id":"1159"}),(0,r.jsx)("path",{d:"M637.7 962L962 637.7V396.4L396.4 962z",fill:"#FF9F3D","p-id":"1160"}),(0,r.jsx)("path",{d:"M681.1 962L962 681.1V439.9L439.9 962z",fill:"#FF9F3C","p-id":"1161"}),(0,r.jsx)("path",{d:"M724.5 962L962 724.5V483.3L483.3 962z",fill:"#FF9F3B","p-id":"1162"}),(0,r.jsx)("path",{d:"M962 737V526.7L526.7 962H737c11.4 0 22.5-0.9 33.5-2.5l189-189c1.6-11 2.5-22.1 2.5-33.5z",fill:"#FF9F3A","p-id":"1163"}),(0,r.jsx)("path",{d:"M962 737V570.2L570.2 962H737c34.3 0 66.9-7.8 96.1-21.7l107.2-107.2c13.9-29.2 21.7-61.8 21.7-96.1z",fill:"#FF9E39","p-id":"1164"}),(0,r.jsx)("path",{d:"M962 613.6L613.6 962H737c123.8 0 225-101.3 225-225V613.6z",fill:"#FF9E38","p-id":"1165"}),(0,r.jsx)("path",{d:"M962 657L657 962h80c123.8 0 225-101.3 225-225v-80z",fill:"#FF9E37","p-id":"1166"}),(0,r.jsx)("path",{d:"M962 700.5L700.5 962H737c123.8 0 225-101.3 225-225v-36.5z",fill:"#FF9E36","p-id":"1167"}),(0,r.jsx)("path",{d:"M961.9 744L744 961.9c118.2-3.7 214.2-99.7 217.9-217.9z",fill:"#FF9D35","p-id":"1168"}),(0,r.jsx)("path",{d:"M954.4 795L795 954.4c77.4-20.8 138.6-82 159.4-159.4z",fill:"#FF9D34","p-id":"1169"}),(0,r.jsx)("path",{d:"M736.3 622.9L523.5 747.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 622.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFD9C0","p-id":"1170"}),(0,r.jsx)("path",{d:"M736.3 523.9L523.5 648.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 523.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFE8D9","p-id":"1171"}),(0,r.jsx)("path",{d:"M736.3 424.9L523.5 549.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 424.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFF6F0","p-id":"1172"})]})},s=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1300",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M197.99492187 62v900h-34.18066406C124.57285156 962 92.76171875 930.18886719 92.76171875 890.94746094V133.05253906C92.76171875 93.81113281 124.57285156 62 163.81425781 62h34.18066406z m662.19082032 0C899.42714844 62 931.23828125 93.81113281 931.23828125 133.05253906v757.89492188c0 39.24140625-31.81113281 71.05253906-71.05253906 71.05253906H276.92070312V62h583.26503907z",fill:"#19A05F","p-id":"1301"}),(0,r.jsx)("path",{d:"M577.0390625 62l0.33222656 220.3875 111.2475586-108.80771484L800.19951172 284.36328125V62zM425.40224609 508.18554688h377.05078125v50.94404296h-377.05078125V508.18554688z m0 101.88720703h377.05078125v50.94316406h-377.05078125v-50.94316406z",fill:"#FFFFFF","p-id":"1302"})]})},l=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2006",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M701.95942066 37.1014489H250.80579673a142.46956521 142.46956521 0 0 0-142.46956522 142.46956523v664.85797174a142.46956521 142.46956521 0 0 0 142.46956522 142.46956523h522.38840654a142.46956521 142.46956521 0 0 0 142.46956522-142.46956523V274.55072501L701.95942066 37.1014489z",fill:"#53D39C","p-id":"2007"}),(0,r.jsx)("path",{d:"M444.2794663 392.18309566l69.64387283 117.72735109h2.70692174l69.97630108-117.70360654h82.4661337l-105.40373371 172.67311305 107.77822609 172.6968587h-83.98580869l-70.83111847-117.89356521h-2.70692174L443.09222066 737.57681196h-83.65338045l108.11065544-172.6968587-106.09233586-172.6968576h82.82230651z",fill:"#25BF79","p-id":"2008"}),(0,r.jsx)("path",{d:"M444.2794663 380.31063151l69.64387283 117.7273511h2.70692174l69.97630108-117.70360543h82.4661337l-105.40373371 172.67311305L671.44718803 725.70434783h-83.98580869l-70.83111847-117.89356522h-2.70692174L443.09222066 725.70434783h-83.65338045l108.11065544-172.6968576-106.09233586-172.69685872h82.82230651z",fill:"#FFFFFF","p-id":"2009"}),(0,r.jsx)("path",{d:"M701.95942066 37.1014489l160.27826087 178.08695653L915.66376849 274.55072501h-142.46956522a71.23478261 71.23478261 0 0 1-71.23478261-71.23478261V37.1014489z",fill:"#25BF79","p-id":"2010"})]})},E=function(){return(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2147",className:"w-full h-full",children:(0,r.jsx)("path",{d:"M688.51536688 447.75428656l-2.39993719 1.25996719a200.75473031 200.75473031 0 0 1-7.19981156 38.03900156l-47.33875688 166.43563031 110.45710031-59.63843437-47.03876531-114.41699625a108.2971575 108.2971575 0 0 1-6.47982937-31.67916844z m194.87488406-200.99472375l-96.35747063-58.55846344-354.77068687 217.43429251a70.01816156 70.01816156 0 0 0-32.51914688 59.57843624v193.97490844l-158.99582625-98.09742562V362.67651969a69.4181775 69.4181775 0 0 1 33.95910844-60.41841375l358.67058469-206.99456625 13.55964469 7.97979L544.75914031 41.26495719a62.75835281 62.75835281 0 0 0-65.63827687 0L140.54975094 246.75956281a69.89816531 69.89816531 0 0 0-32.81913844 59.75843063v410.98921218c-0.11999719 24.47935781 12.2996775 47.1587625 32.81913844 59.81842969l338.5711125 205.49460563c20.21946937 12.23967844 45.35880937 12.23967844 65.63827687 0l338.69110875-205.49460563c20.33946563-12.41967375 32.87913656-35.09907844 32.8791375-59.81842968v-410.98921219a69.77816813 69.77816813 0 0 0-32.93913562-59.75843063z m-89.51764969 477.88745532l-31.01918625-75.65801438-150.53604844 81.35786438-30.47919937 108.95713968-95.81748563 51.7186425 151.61602032-485.20726312 103.79727562-56.09852719 148.73609531 322.97152219-96.29747156 51.95863594z m0-1e-8",fill:"#0F6CF9","p-id":"2148"})})},c=function(){return(0,r.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M416.9549913 314.32347826h297.42302609a119.56758261 119.56758261 0 0 1 119.56758261 119.56758261v179.19109565a196.71485217 196.71485217 0 0 1-196.71485217 196.71485218H416.9549913a119.56758261 119.56758261 0 0 1-119.5675826-119.56758261v-256.44521739A119.56758261 119.56758261 0 0 1 416.9549913 314.32347826z",fill:"#F5384A","p-id":"1186"}),(0,r.jsx)("path",{d:"M716.24793043 314.32347826H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.53739131v260.18504347c0 3.84667826 0 7.69335652 0.58768696 11.43318261a345.7202087 345.7202087 0 0 0 502.9531826-353.19986087A117.1634087 117.1634087 0 0 0 716.24793043 314.32347826z",fill:"#F54F5C","p-id":"1187"}),(0,r.jsx)("path",{d:"M318.91812174 594.54330435a345.7202087 345.7202087 0 0 0 420.73043478-249.07241739c2.35074783-9.18928696 4.22066087-18.432 5.82344348-27.67471305a117.10998261 117.10998261 0 0 0-29.22406957-3.63297391H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.5373913v156.43158261c6.9453913 2.35074783 14.10448696 4.54121739 21.42386087 6.41113044z",fill:"#F66C73","p-id":"1188"}),(0,r.jsx)("path",{d:"M630.17850435 314.32347826H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.53739131v48.08347826a346.14761739 346.14761739 0 0 0 332.68424348-165.62086957z",fill:"#F78989","p-id":"1189"}),(0,r.jsx)("path",{d:"M859.85725217 354.76702609h-25.53766956C802.26393043 200.52591304 669.92751304 84.59130435 512 84.59130435S221.73606957 200.52591304 189.68041739 354.76702609h-25.53766956a139.6557913 139.6557913 0 0 0-139.44208696 139.49551304v79.872a139.6557913 139.6557913 0 0 0 139.44208696 139.49551304h27.62128695a54.65488696 54.65488696 0 0 0 54.60146087-54.60146087V427.10594783C246.36549565 273.6128 365.50566957 148.7026087 512 148.7026087s265.63450435 124.9101913 265.63450435 278.40333913v159.3165913c0 116.09488696-74.79652174 219.47436522-181.38156522 251.42316522a30.23916522 30.23916522 0 0 0-3.09871304 1.06852174 60.15777391 60.15777391 0 1 0 18.05801739 61.06601739 23.50747826 23.50747826 0 0 0 3.36584348-0.69453913c93.12166957-27.88841739 166.63596522-98.67798261 203.01913043-187.79269565a54.92201739 54.92201739 0 0 0 14.90587826 2.13704347h27.62128696a139.6557913 139.6557913 0 0 0 139.44208696-139.49551304V494.26253913a139.6557913 139.6557913 0 0 0-139.7092174-139.49551304zM182.2541913 649.51874783h-18.11144347a75.43763478 75.43763478 0 0 1-75.33078261-75.3842087V494.26253913a75.43763478 75.43763478 0 0 1 75.33078261-75.3842087h18.11144347v230.6404174z m752.93384348-75.3842087a75.43763478 75.43763478 0 0 1-75.33078261 75.3842087h-18.11144347V418.87833043h18.11144347a75.43763478 75.43763478 0 0 1 75.33078261 75.3842087z",fill:"#444444","p-id":"1190"})]})},u=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,r.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"})})},T=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",children:(0,r.jsx)("path",{d:"M513.89 950.72c-5.5 0-11-1.4-15.99-4.2L143.84 743c-9.85-5.73-15.99-16.17-15.99-27.64V308.58c0-11.33 6.14-21.91 15.99-27.64L497.9 77.43c9.85-5.73 22.14-5.73 31.99 0l354.06 203.52c9.85 5.73 15.99 16.17 15.99 27.64V715.5c0 11.33-6.14 21.91-15.99 27.64L529.89 946.52c-4.99 2.8-10.49 4.2-16 4.2zM191.83 697.15L513.89 882.2l322.07-185.05V326.92L513.89 141.87 191.83 326.92v370.23z m322.06-153.34c-5.37 0-10.88-1.4-15.99-4.33L244.29 393.91c-15.35-8.79-20.6-28.27-11.77-43.56 8.83-15.28 28.41-20.5 43.76-11.72l253.61 145.7c15.35 8.79 20.6 28.27 11.77 43.56-6.01 10.32-16.76 15.92-27.77 15.92z m0 291.52c-17.66 0-31.99-14.26-31.99-31.84V530.44L244.55 393.91s-0.13 0-0.13-0.13l-100.45-57.69c-15.35-8.79-20.6-28.27-11.77-43.56s28.41-20.5 43.76-11.72l354.06 203.52c9.85 5.73 15.99 16.17 15.99 27.64v291.39c-0.13 17.71-14.46 31.97-32.12 31.97z m0 115.39c-17.66 0-31.99-14.26-31.99-31.84V511.97c0-17.58 14.33-31.84 31.99-31.84s31.99 14.26 31.99 31.84v406.91c0 17.7-14.33 31.84-31.99 31.84z m0-406.91c-11 0-21.75-5.73-27.77-15.92-8.83-15.28-3.58-34.64 11.77-43.56l354.06-203.52c15.35-8.79 34.8-3.57 43.76 11.72 8.83 15.28 3.58 34.64-11.77 43.56L529.89 539.61c-4.99 2.93-10.49 4.2-16 4.2z"})})},R=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",children:(0,r.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"})})},A=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,r.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"})})};function d(){return(0,r.jsxs)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4602",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zM296 400c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM672 516c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216z m107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5z","p-id":"4603",fill:"#87d068"}),(0,r.jsx)("path",{d:"M761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9c-1.5-2.1-3.9-3.3-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3 0.1-12.7-6.4-12.7z","p-id":"4604",fill:"#87d068"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z","p-id":"4605",fill:"#87d068"})]})}function f(){return(0,r.jsxs)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4838",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M296 256c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM488 456v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8z","p-id":"4839",fill:"#2db7f5"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z","p-id":"4840",fill:"#2db7f5"}),(0,r.jsx)("path",{d:"M544.1 736.4c1.8-34.5 16.2-66.8 40.8-91.4 26.2-26.2 62-41 99.1-41 37.4 0 72.6 14.6 99.1 41 3.2 3.2 6.3 6.6 9.2 10.1L769.2 673c-5.3 4.1-3.5 12.5 3 14.1l93.3 22.5c5 1.2 9.8-2.6 9.9-7.7l0.6-95.4c0-6.7-7.6-10.5-12.9-6.4l-20.3 15.8C805.4 569.6 748.1 540 684 540c-109.9 0-199.6 86.9-204 195.7-0.2 4.5 3.5 8.3 8 8.3h48.1c4.3 0 7.8-3.3 8-7.6zM880 744h-48.1c-4.3 0-7.8 3.3-8 7.6-1.8 34.5-16.2 66.8-40.8 91.4-26.2 26.2-62 41-99.1 41-37.4 0-72.6-14.6-99.1-41-3.2-3.2-6.3-6.6-9.2-10.1l23.1-17.9c5.3-4.1 3.5-12.5-3-14.1l-93.3-22.5c-5-1.2-9.8 2.6-9.9 7.7l-0.6 95.4c0 6.7 7.6 10.5 12.9 6.4l20.3-15.8C562.6 918.4 619.9 948 684 948c109.9 0 199.6-86.9 204-195.7 0.2-4.5-3.5-8.3-8-8.3z","p-id":"4841",fill:"#2db7f5"})]})}function S(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4260",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M114.5856 951.04h298.24v-71.68H186.2656v-747.52h593.92v271.36h71.68v-343.04h-737.28v890.88z",fill:"#747690","p-id":"4261"}),(0,r.jsx)("path",{d:"M662.4256 311.04h-358.4v-71.68h358.4v71.68zM508.8256 490.24h-204.8v-71.68h204.8v71.68zM668.8256 554.24a168.96 168.96 0 1 0 0 337.92 168.96 168.96 0 0 0 0-337.92z m-240.64 168.96a240.64 240.64 0 1 1 481.28 0 240.64 240.64 0 0 1-481.28 0z",fill:"#747690","p-id":"4262"}),(0,r.jsx)("path",{d:"M629.76 588.8h71.68v131.4304l82.5856 41.3184-32.0512 64.1024-122.2144-61.0816V588.8z",fill:"#747690","p-id":"4263"})]})}function p(){return(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"9211",width:"1.5em",height:"1.5em",children:(0,r.jsx)("path",{d:"M151.5 586.2c-5-24.2-7.5-49.2-7.5-74.2s2.5-50 7.5-74.2c4.8-23.6 12-46.8 21.4-69 9.2-21.8 20.6-42.8 33.9-62.5 13.2-19.5 28.3-37.8 45-54.5s35-31.8 54.5-45c19.7-13.3 40.7-24.7 62.5-33.9 22.2-9.4 45.4-16.6 69-21.4 48.5-9.9 99.9-9.9 148.4 0 23.6 4.8 46.8 12 69 21.4 21.8 9.2 42.8 20.6 62.5 33.9 19.5 13.2 37.8 28.3 54.5 45 1.4 1.4 2.8 2.8 4.1 4.2H688c-17.7 0-32 14.3-32 32s14.3 32 32 32h160c17.7 0 32-14.3 32-32V128c0-17.7-14.3-32-32-32s-32 14.3-32 32v77.1c-19.2-19-40.1-36.2-62.4-51.3-23.1-15.6-47.8-29-73.4-39.8-26.1-11-53.4-19.5-81.1-25.2-56.9-11.6-117.1-11.6-174.1 0-27.8 5.7-55.1 14.2-81.1 25.2-25.6 10.8-50.3 24.2-73.4 39.8-22.9 15.4-44.4 33.2-63.9 52.7s-37.3 41-52.7 63.9c-15.6 23.1-29 47.8-39.8 73.4-11 26.1-19.5 53.4-25.2 81.1C83 453.4 80 482.7 80 512s3 58.6 8.8 87c3.1 15.2 16.4 25.6 31.3 25.6 2.1 0 4.3-0.2 6.4-0.7 17.4-3.5 28.5-20.4 25-37.7zM935.2 425c-3.5-17.3-20.5-28.5-37.8-24.9-17.3 3.5-28.5 20.5-24.9 37.8 5 24.2 7.5 49.2 7.5 74.2s-2.5 50-7.5 74.2c-4.8 23.6-12 46.8-21.4 69-9.2 21.8-20.6 42.8-33.9 62.5-13.2 19.5-28.3 37.8-45 54.5s-35 31.8-54.5 45C698 830.6 677 842 655.2 851.2c-22.2 9.4-45.4 16.6-69 21.4-48.5 9.9-99.9 9.9-148.4 0-23.6-4.8-46.8-12-69-21.4-21.8-9.2-42.8-20.6-62.5-33.9-19.5-13.2-37.8-28.3-54.5-45-1.4-1.4-2.8-2.8-4.1-4.2H336c17.7 0 32-14.3 32-32s-14.3-32-32-32H176c-17.7 0-32 14.3-32 32v160c0 17.7 14.3 32 32 32s32-14.3 32-32V819c19.2 19 40.1 36.2 62.4 51.3 23.1 15.6 47.8 29 73.4 39.8 26.1 11 53.4 19.5 81.1 25.2 28.5 5.8 57.7 8.8 87 8.8s58.6-3 87-8.8c27.8-5.7 55-14.2 81.1-25.2 25.6-10.8 50.3-24.2 73.4-39.8 22.9-15.5 44.4-33.2 63.9-52.7s37.3-41 52.7-63.9c15.6-23.1 29-47.8 39.8-73.4 11-26.1 19.5-53.4 25.2-81.1 5.8-28.5 8.8-57.7 8.8-87 0.2-29.5-2.8-58.8-8.6-87.2z",fill:"#1875F0","p-id":"9212"})})}function O(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3205",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zM296 400c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM672 516c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216z m107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5z","p-id":"3206",fill:"#1afa29"}),(0,r.jsx)("path",{d:"M761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9c-1.5-2.1-3.9-3.3-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3 0.1-12.7-6.4-12.7z","p-id":"3207",fill:"#1afa29"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z","p-id":"3208",fill:"#1afa29"})]})}n(67294);var I=n(1051)},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 R},useSearchParams:function(){return A},usePathname:function(){return d},ServerInsertedHTMLContext:function(){return l.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return l.useServerInsertedHTML},useRouter:function(){return f},useParams:function(){return S},useSelectedLayoutSegments:function(){return p},useSelectedLayoutSegment:function(){return O},redirect:function(){return E.redirect},notFound:function(){return c.notFound}});let r=n(67294),o=n(27473),i=n(35802),a=n(32665),s=n(43512),l=n(98751),E=n(96885),c=n(86323),u=Symbol("internal for urlsearchparams readonly");function T(){return Error("ReadonlyURLSearchParams cannot be modified")}class R{[Symbol.iterator](){return this[u][Symbol.iterator]()}append(){throw T()}delete(){throw T()}set(){throw T()}sort(){throw T()}constructor(e){this[u]=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 A(){(0,a.clientHookInServerComponentError)("useSearchParams");let e=(0,r.useContext)(i.SearchParamsContext),t=(0,r.useMemo)(()=>e?new R(e):null,[e]);return t}function d(){return(0,a.clientHookInServerComponentError)("usePathname"),(0,r.useContext)(i.PathnameContext)}function f(){(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 S(){(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 p(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 l=i[0],E=(0,s.getSegmentValue)(l);return!E||E.startsWith("__PAGE__")?o:(o.push(E),e(i,n,!1,o))}(t,e)}function O(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=p(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 s},redirect:function(){return l},isRedirectError:function(){return E},getURLFromRedirectError:function(){return c},getRedirectTypeFromError:function(){return u}});let i=n(68214),a="NEXT_REDIRECT";function s(e,t){let n=Error(a);n.digest=a+";"+t+";"+e;let r=i.requestAsyncStorage.getStore();return r&&(n.mutableCookies=r.mutableCookies),n}function l(e,t){throw void 0===t&&(t="replace"),s(e,t)}function E(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 c(e){return E(e)?e.digest.split(";",3)[2]:null}function u(e){if(!E(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 s},ACTION_PREFETCH:function(){return l},ACTION_FAST_REFRESH:function(){return E},ACTION_SERVER_ACTION:function(){return c}});let o="refresh",i="navigate",a="restore",s="server-patch",l="prefetch",E="fast-refresh",c="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 p}});let r=n(38754),o=n(61757),i=o._(n(67294)),a=r._(n(68965)),s=n(38083),l=n(2478),E=n(76226);n(59941);let c=r._(n(31720)),u={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 T(e){return void 0!==e.default}function R(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 A(e,t,n,r,o,i,a){if(!e||e["data-loaded-src"]===t)return;e["data-loaded-src"]=t;let s="decode"in e?e.decode():Promise.resolve();s.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 d(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 f=(0,i.forwardRef)((e,t)=>{let{imgAttributes:n,heightInt:r,widthInt:o,qualityInt:a,className:s,imgStyle:l,blurStyle:E,isLazy:c,fetchPriority:u,fill:T,placeholder:R,loading:f,srcString:S,config:p,unoptimized:O,loader:I,onLoadRef:N,onLoadingCompleteRef:C,setBlurComplete:h,setShowAltText:m,onLoad:g,onError:_,...L}=e;return f=c?"lazy":f,i.default.createElement("img",{...L,...d(u),loading:f,width:o,height:r,decoding:"async","data-nimg":T?"fill":"1",className:s,style:{...l,...E},...n,ref:(0,i.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(_&&(e.src=e.src),e.complete&&A(e,S,R,N,C,h,O))},[S,R,N,C,h,_,O,t]),onLoad:e=>{let t=e.currentTarget;A(t,S,R,N,C,h,O)},onError:e=>{m(!0),"blur"===R&&h(!0),_&&_(e)}})}),S=(0,i.forwardRef)((e,t)=>{var n;let r,o,{src:A,sizes:S,unoptimized:p=!1,priority:O=!1,loading:I,className:N,quality:C,width:h,height:m,fill:g,style:_,onLoad:L,onLoadingComplete:v,placeholder:P="empty",blurDataURL:y,fetchPriority:b,layout:D,objectFit:M,objectPosition:U,lazyBoundary:x,lazyRoot:G,...F}=e,H=(0,i.useContext)(E.ImageConfigContext),B=(0,i.useMemo)(()=>{let e=u||H||l.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}},[H]),w=F.loader||c.default;delete F.loader;let $="__next_img_default"in w;if($){if("custom"===B.loader)throw Error('Image with src "'+A+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=w;w=t=>{let{config:n,...r}=t;return e(r)}}if(D){"fill"===D&&(g=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[D];e&&(_={..._,...e});let t={responsive:"100vw",fill:"100vw"}[D];t&&!S&&(S=t)}let Y="",V=R(h),k=R(m);if("object"==typeof(n=A)&&(T(n)||void 0!==n.src)){let e=T(A)?A.default:A;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,y=y||e.blurDataURL,Y=e.src,!g){if(V||k){if(V&&!k){let t=V/e.width;k=Math.round(e.height*t)}else if(!V&&k){let t=k/e.height;V=Math.round(e.width*t)}}else V=e.width,k=e.height}}let W=!O&&("lazy"===I||void 0===I);(!(A="string"==typeof A?A:Y)||A.startsWith("data:")||A.startsWith("blob:"))&&(p=!0,W=!1),B.unoptimized&&(p=!0),$&&A.endsWith(".svg")&&!B.dangerouslyAllowSVG&&(p=!0),O&&(b="high");let[Z,j]=(0,i.useState)(!1),[X,K]=(0,i.useState)(!1),z=R(C),J=Object.assign(g?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:M,objectPosition:U}:{},X?{}:{color:"transparent"},_),q="blur"===P&&y&&!Z?{backgroundSize:J.objectFit||"cover",backgroundPosition:J.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:'url("data:image/svg+xml;charset=utf-8,'+(0,s.getImageBlurSvg)({widthInt:V,heightInt:k,blurWidth:r,blurHeight:o,blurDataURL:y,objectFit:J.objectFit})+'")'}:{},Q=function(e){let{config:t,src:n,unoptimized:r,width:o,quality:i,sizes:a,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:l,kind:E}=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),c=l.length-1;return{sizes:a||"w"!==E?a:"100vw",srcSet:l.map((e,r)=>s({config:t,src:n,quality:i,width:e})+" "+("w"===E?e:r+1)+E).join(", "),src:s({config:t,src:n,quality:i,width:l[c]})}}({config:B,src:A,unoptimized:p,width:V,quality:z,sizes:S,loader:w}),ee=A,et=(0,i.useRef)(L);(0,i.useEffect)(()=>{et.current=L},[L]);let en=(0,i.useRef)(v);(0,i.useEffect)(()=>{en.current=v},[v]);let er={isLazy:W,imgAttributes:Q,heightInt:k,widthInt:V,qualityInt:z,className:N,imgStyle:J,blurStyle:q,loading:I,config:B,fetchPriority:b,fill:g,unoptimized:p,placeholder:P,loader:w,srcString:ee,onLoadRef:et,onLoadingCompleteRef:en,setBlurComplete:j,setShowAltText:K,...F};return i.default.createElement(i.default.Fragment,null,i.default.createElement(f,{...er,ref:t}),O?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:F.crossOrigin,referrerPolicy:F.referrerPolicy,...d(b)})):null)}),p=S;("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 I}});let r=n(38754),o=r._(n(67294)),i=n(65722),a=n(65723),s=n(28904),l=n(95514),E=n(27521),c=n(44293),u=n(27473),T=n(81307),R=n(75476),A=n(66318),d=n(29382),f=new Set;function S(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(f.has(i))return;f.add(i)}let s=i?e.prefetch(t,o):e.prefetch(t,n,r);Promise.resolve(s).catch(e=>{})}function p(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}let O=o.default.forwardRef(function(e,t){let n,r;let{href:s,as:f,children:O,prefetch:I=null,passHref:N,replace:C,shallow:h,scroll:m,locale:g,onClick:_,onMouseEnter:L,onTouchStart:v,legacyBehavior:P=!1,...y}=e;n=O,P&&("string"==typeof n||"number"==typeof n)&&(n=o.default.createElement("a",null,n));let b=!1!==I,D=null===I?d.PrefetchKind.AUTO:d.PrefetchKind.FULL,M=o.default.useContext(c.RouterContext),U=o.default.useContext(u.AppRouterContext),x=null!=M?M:U,G=!M,{href:F,as:H}=o.default.useMemo(()=>{if(!M){let e=p(s);return{href:e,as:f?p(f):e}}let[e,t]=(0,i.resolveHref)(M,s,!0);return{href:e,as:f?(0,i.resolveHref)(M,f):t||e}},[M,s,f]),B=o.default.useRef(F),w=o.default.useRef(H);P&&(r=o.default.Children.only(n));let $=P?r&&"object"==typeof r&&r.ref:t,[Y,V,k]=(0,T.useIntersection)({rootMargin:"200px"}),W=o.default.useCallback(e=>{(w.current!==H||B.current!==F)&&(k(),w.current=H,B.current=F),Y(e),$&&("function"==typeof $?$(e):"object"==typeof $&&($.current=e))},[H,$,F,k,Y]);o.default.useEffect(()=>{x&&V&&b&&S(x,F,H,{locale:g},{kind:D},G)},[H,F,V,g,b,null==M?void 0:M.locale,x,G,D]);let Z={ref:W,onClick(e){P||"function"!=typeof _||_(e),P&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),x&&!e.defaultPrevented&&function(e,t,n,r,i,s,l,E,c,u){let{nodeName:T}=e.currentTarget,R="A"===T.toUpperCase();if(R&&(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)||!c&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let A=()=>{"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:s,locale:E,scroll:l}):t[i?"replace":"push"](r||n,{forceOptimisticNavigation:!u})};c?o.default.startTransition(A):A()}(e,x,F,H,C,h,m,g,G,b)},onMouseEnter(e){P||"function"!=typeof L||L(e),P&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),x&&(b||!G)&&S(x,F,H,{locale:g,priority:!0,bypassPrefetchedCheck:!0},{kind:D},G)},onTouchStart(e){P||"function"!=typeof v||v(e),P&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),x&&(b||!G)&&S(x,F,H,{locale:g,priority:!0,bypassPrefetchedCheck:!0},{kind:D},G)}};if((0,l.isAbsoluteUrl)(H))Z.href=H;else if(!P||N||"a"===r.type&&!("href"in r.props)){let e=void 0!==g?g:null==M?void 0:M.locale,t=(null==M?void 0:M.isLocaleDomain)&&(0,R.getDomainLocale)(H,e,null==M?void 0:M.locales,null==M?void 0:M.domainLocales);Z.href=t||(0,A.addBasePath)((0,E.addLocale)(H,e,null==M?void 0:M.defaultLocale))}return P?o.default.cloneElement(r,Z):o.default.createElement("a",{...y,...Z},n)}),I=O;("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 l}});let r=n(67294),o=n(82997),i="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,E=l||!i,[c,u]=(0,r.useState)(!1),T=(0,r.useRef)(null),R=(0,r.useCallback)(e=>{T.current=e},[]);(0,r.useEffect)(()=>{if(i){if(E||c)return;let e=T.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=s.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},s.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=s.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&u(e),{root:null==t?void 0:t.current,rootMargin:n});return r}}else if(!c){let e=(0,o.requestIdleCallback)(()=>u(!0));return()=>(0,o.cancelIdleCallback)(e)}},[E,n,t,c,T.current]);let A=(0,r.useCallback)(()=>{u(!1)},[]);return[R,c,A]}("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,s=r||t,l=o||n,E=i.startsWith("data:image/jpeg")?"%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='1 1'/%3E%3C/feComponentTransfer%3E%":"";return s&&l?"%3Csvg xmlns='http%3A//www.w3.org/2000/svg' viewBox='0 0 "+s+" "+l+"'%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+(r&&o?"1":"20")+"'/%3E"+E+"%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)}},86221:function(e,t,n){"use strict";let r,o;n.r(t),n.d(t,{default:function(){return e$}});var i=n(85893),a=n(67294),s=n(41468),l=n(89182),E=n(62418),c=n(82353),u=n(87462),T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},R=n(84089),A=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:T}))}),d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M752 100c-61.8 0-112 50.2-112 112 0 47.7 29.9 88.5 72 104.6v27.6L512 601.4 312 344.2v-27.6c42.1-16.1 72-56.9 72-104.6 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 50.6 33.8 93.5 80 107.3v34.4c0 9.7 3.3 19.3 9.3 27L476 672.3v33.6c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-33.6l226.7-291.6c6-7.7 9.3-17.3 9.3-27v-34.4c46.2-13.8 80-56.7 80-107.3 0-61.8-50.2-112-112-112zM224 212a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm336 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm192-552a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"fork",theme:"outlined"},f=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:d}))}),S=n(16165),p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M301.3 496.7c-23.8 0-40.2-10.5-41.6-26.9H205c.9 43.4 36.9 70.3 93.9 70.3 59.1 0 95-28.4 95-75.5 0-35.8-20-55.9-64.5-64.5l-29.1-5.6c-23.8-4.7-33.8-11.9-33.8-24.2 0-15 13.3-24.5 33.4-24.5 20.1 0 35.3 11.1 36.6 27h53c-.9-41.7-37.5-70.3-90.3-70.3-54.4 0-89.7 28.9-89.7 73 0 35.5 21.2 58 62.5 65.8l29.7 5.9c25.8 5.2 35.6 11.9 35.6 24.4.1 14.7-14.5 25.1-36 25.1z"}},{tag:"path",attrs:{d:"M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"}},{tag:"path",attrs:{d:"M828.5 486.7h-95.8V308.5h-57.4V534h153.2zm-298.6 53.4c14.1 0 27.2-2 39.1-5.8l13.3 20.3h53.3L607.9 511c21.1-20 33-51.1 33-89.8 0-73.3-43.3-118.8-110.9-118.8s-111.2 45.3-111.2 118.8c-.1 73.7 43 118.9 111.1 118.9zm0-190c31.6 0 52.7 27.7 52.7 71.1 0 16.7-3.6 30.6-10 40.5l-5.2-6.9h-48.8L542 491c-3.9.9-8 1.4-12.2 1.4-31.7 0-52.8-27.5-52.8-71.2.1-43.6 21.2-71.1 52.9-71.1z"}}]},name:"console-sql",theme:"outlined"},O=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:p}))}),I={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M640.6 429.8h257.1c7.9 0 14.3-6.4 14.3-14.3V158.3c0-7.9-6.4-14.3-14.3-14.3H640.6c-7.9 0-14.3 6.4-14.3 14.3v92.9H490.6c-3.9 0-7.1 3.2-7.1 7.1v221.5h-85.7v-96.5c0-7.9-6.4-14.3-14.3-14.3H126.3c-7.9 0-14.3 6.4-14.3 14.3v257.2c0 7.9 6.4 14.3 14.3 14.3h257.1c7.9 0 14.3-6.4 14.3-14.3V544h85.7v221.5c0 3.9 3.2 7.1 7.1 7.1h135.7v92.9c0 7.9 6.4 14.3 14.3 14.3h257.1c7.9 0 14.3-6.4 14.3-14.3v-257c0-7.9-6.4-14.3-14.3-14.3h-257c-7.9 0-14.3 6.4-14.3 14.3v100h-78.6v-393h78.6v100c0 7.9 6.4 14.3 14.3 14.3zm53.5-217.9h150V362h-150V211.9zM329.9 587h-150V437h150v150zm364.2 75.1h150v150.1h-150V662.1z"}}]},name:"partition",theme:"outlined"},N=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:I}))}),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z"}}]},name:"build",theme:"outlined"},h=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:C}))}),m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},g=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:m}))}),_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},L=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:_}))}),v={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"},P=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:v}))}),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"},b=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:y}))}),D=n(24969),M={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"},U=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:M}))}),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},G=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:x}))}),F={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M752 664c-28.5 0-54.8 10-75.4 26.7L469.4 540.8a160.68 160.68 0 000-57.6l207.2-149.9C697.2 350 723.5 360 752 360c66.2 0 120-53.8 120-120s-53.8-120-120-120-120 53.8-120 120c0 11.6 1.6 22.7 4.7 33.3L439.9 415.8C410.7 377.1 364.3 352 312 352c-88.4 0-160 71.6-160 160s71.6 160 160 160c52.3 0 98.7-25.1 127.9-63.8l196.8 142.5c-3.1 10.6-4.7 21.8-4.7 33.3 0 66.2 53.8 120 120 120s120-53.8 120-120-53.8-120-120-120zm0-476c28.7 0 52 23.3 52 52s-23.3 52-52 52-52-23.3-52-52 23.3-52 52-52zM312 600c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88zm440 236c-28.7 0-52-23.3-52-52s23.3-52 52-52 52 23.3 52 52-23.3 52-52 52z"}}]},name:"share-alt",theme:"outlined"},H=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:F}))}),B=n(48689),w=n(36147),$=n(2453),Y=n(83062),V=n(85418),k=n(20640),W=n.n(k),Z=n(25675),j=n.n(Z),X=n(41664),K=n.n(X),z=n(11163),J=n.n(z),q=n(67421);function Q(e){return"flex items-center h-10 hover:bg-[#F1F5F9] dark:hover:bg-theme-dark text-base w-full transition-colors whitespace-nowrap px-4 ".concat(e?"bg-[#F1F5F9] dark:bg-theme-dark":"")}function ee(e){return"flex items-center justify-center mx-auto rounded w-14 h-14 text-xl hover:bg-[#F1F5F9] dark:hover:bg-theme-dark transition-colors cursor-pointer ".concat(e?"bg-[#F1F5F9] dark:bg-theme-dark":"")}var et=function(){let{chatId:e,scene:t,isMenuExpand:n,dialogueList:r,queryDialogueList:o,refreshDialogList:u,setIsMenuExpand:T,setAgent:R,mode:d,setMode:p}=(0,a.useContext)(s.p),{pathname:I,replace:C}=(0,z.useRouter)(),{t:m,i18n:_}=(0,q.$G)(),[v,y]=(0,a.useState)("/LOGO_1.png"),M=(0,a.useMemo)(()=>{let e=[{key:"app",name:m("App"),path:"/app",icon:(0,i.jsx)(A,{})},{key:"flow",name:m("awel_flow"),icon:(0,i.jsx)(f,{}),path:"/flow"},{key:"models",name:m("model_manage"),path:"/models",icon:(0,i.jsx)(S.Z,{component:c.IN})},{key:"database",name:m("Database"),icon:(0,i.jsx)(O,{}),path:"/database"},{key:"knowledge",name:m("Knowledge_Space"),icon:(0,i.jsx)(N,{}),path:"/knowledge"},{key:"agent",name:m("Plugins"),path:"/agent",icon:(0,i.jsx)(h,{})},{key:"prompt",name:m("Prompt"),icon:(0,i.jsx)(g,{}),path:"/prompt"}];return e},[_.language]),x=()=>{T(!n)},F=(0,a.useCallback)(()=>{let e="light"===d?"dark":"light";p(e),localStorage.setItem(E.he,e)},[d]),k=(0,a.useCallback)(()=>{let e="en"===_.language?"zh":"en";_.changeLanguage(e),localStorage.setItem(E.Yl,e)},[_.language,_.changeLanguage]),Z=(0,a.useMemo)(()=>{let e=[{key:"theme",name:m("Theme"),icon:"dark"===d?(0,i.jsx)(S.Z,{component:c.FD}):(0,i.jsx)(S.Z,{component:c.ol}),onClick:F},{key:"language",name:m("language"),icon:(0,i.jsx)(L,{}),onClick:k},{key:"fold",name:m(n?"Close_Sidebar":"Show_Sidebar"),icon:n?(0,i.jsx)(P,{}):(0,i.jsx)(b,{}),onClick:x,noDropdownItem:!0}];return e},[d,k,x,k]),X=(0,a.useMemo)(()=>M.map(e=>({key:e.key,label:(0,i.jsxs)(K(),{href:e.path,className:"text-base",children:[e.icon,(0,i.jsx)("span",{className:"ml-2 text-sm",children:e.name})]})})),[M]),J=(0,a.useMemo)(()=>Z.filter(e=>!e.noDropdownItem).map(e=>({key:e.key,label:(0,i.jsxs)("div",{className:"text-base",onClick:e.onClick,children:[e.icon,(0,i.jsx)("span",{className:"ml-2 text-sm",children:e.name})]})})),[Z]),et=(0,a.useCallback)(n=>{w.default.confirm({title:"Delete Chat",content:"Are you sure delete this chat?",width:"276px",centered:!0,onOk:()=>new Promise(async(r,o)=>{try{let[i]=await (0,l.Vx)((0,l.MX)(n.conv_uid));if(i){o();return}$.ZP.success("success"),u(),n.chat_mode===t&&n.conv_uid===e&&C("/"),r()}catch(e){o()}})})},[u]),en=e=>{"chat_agent"===e.chat_mode&&e.select_param&&(null==R||R(e.select_param))},er=(0,a.useCallback)(e=>{let t=W()("".concat(location.origin,"/chat?scene=").concat(e.chat_mode,"&id=").concat(e.conv_uid));$.ZP[t?"success":"error"](t?"Copy success":"Copy failed")},[]);return((0,a.useEffect)(()=>{o()},[]),(0,a.useEffect)(()=>{y("dark"===d?"/WHITE_LOGO.png":"/LOGO_1.png")},[d]),n)?(0,i.jsxs)("div",{className:"flex flex-col h-screen bg-white dark:bg-[#232734]",children:[(0,i.jsx)(K(),{href:"/",className:"p-2",children:(0,i.jsx)(j(),{src:v,alt:"DB-GPT",width:239,height:60,className:"w-full h-full"})}),(0,i.jsxs)(K(),{href:"/",className:"flex items-center justify-center mb-4 mx-4 h-11 bg-theme-primary rounded text-white",children:[(0,i.jsx)(D.Z,{className:"mr-2"}),(0,i.jsx)("span",{children:m("new_chat")})]}),(0,i.jsx)("div",{className:"flex-1 overflow-y-scroll",children:null==r?void 0:r.map(n=>{let r=n.conv_uid===e&&n.chat_mode===t;return(0,i.jsxs)(K(),{href:"/chat?scene=".concat(n.chat_mode,"&id=").concat(n.conv_uid),className:"group/item ".concat(Q(r)),onClick:()=>{en(n)},children:[(0,i.jsx)(g,{className:"text-base"}),(0,i.jsx)("div",{className:"flex-1 line-clamp-1 mx-2 text-sm",children:n.user_name||n.user_input}),(0,i.jsx)("div",{className:"group-hover/item:opacity-100 cursor-pointer opacity-0 mr-1",onClick:e=>{e.preventDefault(),er(n)},children:(0,i.jsx)(H,{})}),(0,i.jsx)("div",{className:"group-hover/item:opacity-100 cursor-pointer opacity-0",onClick:e=>{e.preventDefault(),et(n)},children:(0,i.jsx)(B.Z,{})})]},n.conv_uid)})}),(0,i.jsxs)("div",{className:"pt-4",children:[(0,i.jsx)("div",{className:"max-h-52 overflow-y-auto scrollbar-default",children:M.map(e=>(0,i.jsx)(K(),{href:e.path,className:"".concat(Q(I===e.path)," overflow-hidden"),children:(0,i.jsxs)(i.Fragment,{children:[e.icon,(0,i.jsx)("span",{className:"ml-3 text-sm",children:e.name})]})},e.key))}),(0,i.jsx)("div",{className:"flex items-center justify-around py-4 mt-2",children:Z.map(e=>(0,i.jsx)(Y.Z,{title:e.name,children:(0,i.jsx)("div",{className:"flex-1 flex items-center justify-center cursor-pointer text-xl",onClick:e.onClick,children:e.icon})},e.key))})]})]}):(0,i.jsxs)("div",{className:"flex flex-col justify-between h-screen bg-white dark:bg-[#232734] animate-fade animate-duration-300",children:[(0,i.jsx)(K(),{href:"/",className:"px-2 py-3",children:(0,i.jsx)(j(),{src:"/LOGO_SMALL.png",alt:"DB-GPT",width:63,height:46,className:"w-[63px] h-[46px]"})}),(0,i.jsx)("div",{children:(0,i.jsx)(K(),{href:"/",className:"flex items-center justify-center my-4 mx-auto w-12 h-12 bg-theme-primary rounded-full text-white",children:(0,i.jsx)(D.Z,{className:"text-lg"})})}),(0,i.jsx)("div",{className:"flex-1 overflow-y-scroll py-4 space-y-2",children:null==r?void 0:r.map(n=>{let r=n.conv_uid===e&&n.chat_mode===t;return(0,i.jsx)(Y.Z,{title:n.user_name||n.user_input,placement:"right",children:(0,i.jsx)(K(),{href:"/chat?scene=".concat(n.chat_mode,"&id=").concat(n.conv_uid),className:ee(r),onClick:()=>{en(n)},children:(0,i.jsx)(g,{})})},n.conv_uid)})}),(0,i.jsxs)("div",{className:"py-4",children:[(0,i.jsx)(V.Z,{menu:{items:X},placement:"topRight",children:(0,i.jsx)("div",{className:ee(),children:(0,i.jsx)(U,{})})}),(0,i.jsx)(V.Z,{menu:{items:J},placement:"topRight",children:(0,i.jsx)("div",{className:ee(),children:(0,i.jsx)(G,{})})}),Z.filter(e=>e.noDropdownItem).map(e=>(0,i.jsx)(Y.Z,{title:e.name,placement:"right",children:(0,i.jsx)("div",{className:ee(),onClick:e.onClick,children:e.icon})},e.key))]})]})},en=n(74865),er=n.n(en);let eo=0;function ei(){"loading"!==o&&(o="loading",r=setTimeout(function(){er().start()},250))}function ea(){eo>0||(o="stop",clearTimeout(r),er().done())}if(J().events.on("routeChangeStart",ei),J().events.on("routeChangeComplete",ea),J().events.on("routeChangeError",ea),"function"==typeof(null==window?void 0:window.fetch)){let e=window.fetch;window.fetch=async function(){for(var t=arguments.length,n=Array(t),r=0;rt(null==e||0===Object.keys(e).length?n:e):t;return(0,i.jsx)(eS.xB,{styles:r})}var eO=n(56760),eI=n(71927);let eN="mode",eC="color-scheme",eh="data-color-scheme";function em(e){if("undefined"!=typeof window&&"system"===e){let e=window.matchMedia("(prefers-color-scheme: dark)");return e.matches?"dark":"light"}}function eg(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_(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 eL=["colorSchemes","components","generateCssVars","cssVarPrefix"];var ev=n(1812),eP=n(13951),ey=n(2548);let{CssVarsProvider:eb,useColorScheme:eD,getInitColorSchemeScript:eM}=function(e){let{themeId:t,theme:n={},attribute:r=eh,modeStorageKey:o=eN,colorSchemeStorageKey:s=eC,defaultMode:l="light",defaultColorScheme:E,disableTransitionOnChange:c=!1,resolveTheme:T,excludeVariablesFromRoot:R}=e;n.colorSchemes&&("string"!=typeof E||n.colorSchemes[E])&&("object"!=typeof E||n.colorSchemes[null==E?void 0:E.light])&&("object"!=typeof E||n.colorSchemes[null==E?void 0:E.dark])||console.error(`MUI: \`${E}\` does not exist in \`theme.colorSchemes\`.`);let A=a.createContext(void 0),d="string"==typeof E?E:E.light,f="string"==typeof E?E:E.dark;return{CssVarsProvider:function({children:e,theme:d=n,modeStorageKey:f=o,colorSchemeStorageKey:S=s,attribute:p=r,defaultMode:O=l,defaultColorScheme:I=E,disableTransitionOnChange:N=c,storageWindow:C="undefined"==typeof window?void 0:window,documentNode:h="undefined"==typeof document?void 0:document,colorSchemeNode:m="undefined"==typeof document?void 0:document.documentElement,colorSchemeSelector:g=":root",disableNestedContext:_=!1,disableStyleSheetGeneration:L=!1}){let v=a.useRef(!1),P=(0,eO.Z)(),y=a.useContext(A),b=!!y&&!_,D=d[t],M=D||d,{colorSchemes:U={},components:x={},generateCssVars:G=()=>({vars:{},css:{}}),cssVarPrefix:F}=M,H=(0,ed.Z)(M,eL),B=Object.keys(U),w="string"==typeof I?I:I.light,$="string"==typeof I?I:I.dark,{mode:Y,setMode:V,systemMode:k,lightColorScheme:W,darkColorScheme:Z,colorScheme:j,setColorScheme:X}=function(e){let{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=eN,colorSchemeStorageKey:s=eC,storageWindow:l="undefined"==typeof window?void 0:window}=e,E=o.join(","),[c,T]=a.useState(()=>{let e=e_(i,t),o=e_(`${s}-light`,n),a=e_(`${s}-dark`,r);return{mode:e,systemMode:em(e),lightColorScheme:o,darkColorScheme:a}}),R=eg(c,e=>"light"===e?c.lightColorScheme:"dark"===e?c.darkColorScheme:void 0),A=a.useCallback(e=>{T(n=>{if(e===n.mode)return n;let r=e||t;try{localStorage.setItem(i,r)}catch(e){}return(0,u.Z)({},n,{mode:r,systemMode:em(r)})})},[i,t]),d=a.useCallback(e=>{e?"string"==typeof e?e&&!E.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):T(t=>{let n=(0,u.Z)({},t);return eg(t,t=>{try{localStorage.setItem(`${s}-${t}`,e)}catch(e){}"light"===t&&(n.lightColorScheme=e),"dark"===t&&(n.darkColorScheme=e)}),n}):T(t=>{let o=(0,u.Z)({},t),i=null===e.light?n:e.light,a=null===e.dark?r:e.dark;if(i){if(E.includes(i)){o.lightColorScheme=i;try{localStorage.setItem(`${s}-light`,i)}catch(e){}}else console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)}if(a){if(E.includes(a)){o.darkColorScheme=a;try{localStorage.setItem(`${s}-dark`,a)}catch(e){}}else console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)}return o}):T(e=>{try{localStorage.setItem(`${s}-light`,n),localStorage.setItem(`${s}-dark`,r)}catch(e){}return(0,u.Z)({},e,{lightColorScheme:n,darkColorScheme:r})})},[E,s,n,r]),f=a.useCallback(e=>{"system"===c.mode&&T(t=>(0,u.Z)({},t,{systemMode:null!=e&&e.matches?"dark":"light"}))},[c.mode]),S=a.useRef(f);return S.current=f,a.useEffect(()=>{let e=(...e)=>S.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(s)&&(!n||E.match(n))&&(e.key.endsWith("light")&&d({light:n}),e.key.endsWith("dark")&&d({dark:n})),e.key===i&&(!n||["light","dark","system"].includes(n))&&A(n||t)};if(l)return l.addEventListener("storage",e),()=>l.removeEventListener("storage",e)},[d,A,i,s,E,t,l]),(0,u.Z)({},c,{colorScheme:R,setMode:A,setColorScheme:d})}({supportedColorSchemes:B,defaultLightColorScheme:w,defaultDarkColorScheme:$,modeStorageKey:f,colorSchemeStorageKey:S,defaultMode:O,storageWindow:C}),K=Y,z=j;b&&(K=y.mode,z=y.colorScheme);let J=K||("system"===O?l:O),q=z||("dark"===J?$:w),{css:Q,vars:ee}=G(),et=(0,u.Z)({},H,{components:x,colorSchemes:U,cssVarPrefix:F,vars:ee,getColorSchemeSelector:e=>`[${p}="${e}"] &`}),en={},er={};Object.entries(U).forEach(([e,t])=>{let{css:n,vars:r}=G(e);et.vars=(0,eA.Z)(et.vars,r),e===q&&(Object.keys(t).forEach(e=>{t[e]&&"object"==typeof t[e]?et[e]=(0,u.Z)({},et[e],t[e]):et[e]=t[e]}),et.palette&&(et.palette.colorScheme=e));let o="string"==typeof I?I:"dark"===O?I.dark:I.light;if(e===o){if(R){let t={};R(F).forEach(e=>{t[e]=n[e],delete n[e]}),en[`[${p}="${e}"]`]=t}en[`${g}, [${p}="${e}"]`]=n}else er[`${":root"===g?"":g}[${p}="${e}"]`]=n}),et.vars=(0,eA.Z)(et.vars,ee),a.useEffect(()=>{z&&m&&m.setAttribute(p,z)},[z,p,m]),a.useEffect(()=>{let e;if(N&&v.current&&h){let t=h.createElement("style");t.appendChild(h.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),h.head.appendChild(t),window.getComputedStyle(h.body),e=setTimeout(()=>{h.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[z,N,h]),a.useEffect(()=>(v.current=!0,()=>{v.current=!1}),[]);let eo=a.useMemo(()=>({mode:K,systemMode:k,setMode:V,lightColorScheme:W,darkColorScheme:Z,colorScheme:z,setColorScheme:X,allColorSchemes:B}),[B,z,Z,W,K,X,V,k]),ei=!0;(L||b&&(null==P?void 0:P.cssVarPrefix)===F)&&(ei=!1);let ea=(0,i.jsxs)(a.Fragment,{children:[ei&&(0,i.jsxs)(a.Fragment,{children:[(0,i.jsx)(ep,{styles:{[g]:Q}}),(0,i.jsx)(ep,{styles:en}),(0,i.jsx)(ep,{styles:er})]}),(0,i.jsx)(eI.Z,{themeId:D?t:void 0,theme:T?T(et):et,children:e})]});return b?ea:(0,i.jsx)(A.Provider,{value:eo,children:ea})},useColorScheme:()=>{let e=a.useContext(A);if(!e)throw Error((0,ef.Z)(19));return e},getInitColorSchemeScript:e=>(function(e){let{defaultMode:t="light",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=eN,colorSchemeStorageKey:a=eC,attribute:s=eh,colorSchemeNode:l="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,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,E=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,T=n?Symbol.for("react.forward_ref"):60112,R=n?Symbol.for("react.suspense"):60113,A=n?Symbol.for("react.suspense_list"):60120,d=n?Symbol.for("react.memo"):60115,f=n?Symbol.for("react.lazy"):60116,S=n?Symbol.for("react.block"):60121,p=n?Symbol.for("react.fundamental"):60117,O=n?Symbol.for("react.responder"):60118,I=n?Symbol.for("react.scope"):60119;function N(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case u:case i:case s:case a:case R:return e;default:switch(e=e&&e.$$typeof){case E:case T:case f:case d:case l:return e;default:return t}}case o:return t}}}function C(e){return N(e)===u}t.AsyncMode=c,t.ConcurrentMode=u,t.ContextConsumer=E,t.ContextProvider=l,t.Element=r,t.ForwardRef=T,t.Fragment=i,t.Lazy=f,t.Memo=d,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=R,t.isAsyncMode=function(e){return C(e)||N(e)===c},t.isConcurrentMode=C,t.isContextConsumer=function(e){return N(e)===E},t.isContextProvider=function(e){return N(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return N(e)===T},t.isFragment=function(e){return N(e)===i},t.isLazy=function(e){return N(e)===f},t.isMemo=function(e){return N(e)===d},t.isPortal=function(e){return N(e)===o},t.isProfiler=function(e){return N(e)===s},t.isStrictMode=function(e){return N(e)===a},t.isSuspense=function(e){return N(e)===R},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===s||e===a||e===R||e===A||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===l||e.$$typeof===E||e.$$typeof===T||e.$$typeof===p||e.$$typeof===O||e.$$typeof===I||e.$$typeof===S)},t.typeOf=N},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,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),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,s=Math.min;e.exports=function(e,t,n){var l,E,c,u,T,R,A=0,d=!1,f=!1,S=!0;if("function"!=typeof e)throw TypeError("Expected a function");function p(t){var n=l,r=E;return l=E=void 0,A=t,u=e.apply(r,n)}function O(e){var n=e-R,r=e-A;return void 0===R||n>=t||n<0||f&&r>=c}function I(){var e,n,r,i=o();if(O(i))return N(i);T=setTimeout(I,(e=i-R,n=i-A,r=t-e,f?s(r,c-n):r))}function N(e){return(T=void 0,S&&l)?p(e):(l=E=void 0,u)}function C(){var e,n=o(),r=O(n);if(l=arguments,E=this,R=n,r){if(void 0===T)return A=e=R,T=setTimeout(I,t),d?p(e):u;if(f)return clearTimeout(T),T=setTimeout(I,t),p(R)}return void 0===T&&(T=setTimeout(I,t)),u}return t=i(t)||0,r(n)&&(d=!!n.leading,c=(f="maxWait"in n)?a(i(n.maxWait)||0,t):c,S="trailing"in n?!!n.trailing:S),C.cancel=function(){void 0!==T&&clearTimeout(T),A=0,l=R=E=T=void 0},C.flush=function(){return void 0===T?u:N(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,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,E=/^0o[0-7]+$/i,c=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=l.test(e);return n||E.test(e)?c(e.slice(2),n?2:8):s.test(e)?a:+e}},69654:function(e){var t;t=function(){function e(t,n,r){return this.id=++e.highestId,this.name=t,this.symbols=n,this.postprocess=r,this}function t(e,t,n,r){this.rule=e,this.dot=t,this.reference=n,this.data=[],this.wantedBy=r,this.isComplete=this.dot===e.symbols.length}function n(e,t){this.grammar=e,this.index=t,this.states=[],this.wants={},this.scannable=[],this.completed={}}function r(e,t){this.rules=e,this.start=t||this.rules[0].name;var n=this.byName={};this.rules.forEach(function(e){n.hasOwnProperty(e.name)||(n[e.name]=[]),n[e.name].push(e)})}function o(){this.reset("")}function i(e,t,i){if(e instanceof r)var a=e,i=t;else var a=r.fromCompiled(e,t);for(var s in this.grammar=a,this.options={keepHistory:!1,lexer:a.lexer||new o},i||{})this.options[s]=i[s];this.lexer=this.options.lexer,this.lexerState=void 0;var l=new n(a,0);this.table=[l],l.wants[a.start]=[],l.predict(a.start),l.process(),this.current=0}function a(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return e.toString();if(e.type)return"%"+e.type;if(e.test)return"<"+String(e.test)+">";else throw Error("Unknown symbol type: "+e)}}return e.highestId=0,e.prototype.toString=function(e){var t=void 0===e?this.symbols.map(a).join(" "):this.symbols.slice(0,e).map(a).join(" ")+" ● "+this.symbols.slice(e).map(a).join(" ");return this.name+" → "+t},t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(e){var n=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return n.left=this,n.right=e,n.isComplete&&(n.data=n.build(),n.right=void 0),n},t.prototype.build=function(){var e=[],t=this;do e.push(t.right.data),t=t.left;while(t.left);return e.reverse(),e},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,i.fail))},n.prototype.process=function(e){for(var t=this.states,n=this.wants,r=this.completed,o=0;o0&&t.push(" ^ "+r+" more lines identical to this"),r=0,t.push(" "+a)),n=a}},i.prototype.getSymbolDisplay=function(e){return function(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return"character matching "+e;if(e.type)return e.type+" token";if(e.test)return"token matching "+String(e.test);else throw Error("Unknown symbol type: "+e)}}(e)},i.prototype.buildFirstStateStack=function(e,t){if(-1!==t.indexOf(e))return null;if(0===e.wantedBy.length)return[e];var n=e.wantedBy[0],r=[e].concat(t),o=this.buildFirstStateStack(n,r);return null===o?null:[e].concat(o)},i.prototype.save=function(){var e=this.table[this.current];return e.lexerState=this.lexerState,e},i.prototype.restore=function(e){var t=e.index;this.current=t,this.table[t]=e,this.table.splice(t+1),this.lexerState=e.lexerState,this.results=this.finish()},i.prototype.rewind=function(e){if(!this.options.keepHistory)throw Error("set option `keepHistory` to enable rewinding");this.restore(this.table[e])},i.prototype.finish=function(){var e=[],t=this.grammar.start;return this.table[this.table.length-1].states.forEach(function(n){n.rule.name===t&&n.dot===n.rule.symbols.length&&0===n.reference&&n.data!==i.fail&&e.push(n)}),e.map(function(e){return e.data})},{Parser:i,Grammar:r,Rule:e}},e.exports?e.exports=t():this.nearley=t()},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(86221)}])},41468:function(e,t,n){"use strict";n.d(t,{R:function(){return c},p:function(){return E}});var r=n(85893),o=n(67294),i=n(89182),a=n(56155),s=n(39332),l=n(62418);let E=(0,o.createContext)({mode:"light",scene:"",chatId:"",modelList:[],model:"",dbParam:void 0,dialogueList:[],agent:"",setAgent:()=>{},setModel:()=>{},setIsContract:()=>{},setIsMenuExpand:()=>{},setDbParam:()=>void 0,queryDialogueList:()=>{},refreshDialogList:()=>{},setMode:()=>void 0,history:[],setHistory:()=>{},docId:void 0,setDocId:()=>{}}),c=e=>{var t,n,c;let{children:u}=e,T=(0,s.useSearchParams)(),R=null!==(t=null==T?void 0:T.get("id"))&&void 0!==t?t:"",A=null!==(n=null==T?void 0:T.get("scene"))&&void 0!==n?n:"",d=null!==(c=null==T?void 0:T.get("db_param"))&&void 0!==c?c:"",[f,S]=(0,o.useState)(!1),[p,O]=(0,o.useState)(""),[I,N]=(0,o.useState)("chat_dashboard"!==A),[C,h]=(0,o.useState)(d),[m,g]=(0,o.useState)(""),[_,L]=(0,o.useState)([]),[v,P]=(0,o.useState)(),[y,b]=(0,o.useState)("light"),{run:D,data:M=[],refresh:U}=(0,a.Z)(async()=>{let[,e]=await (0,i.Vx)((0,i.iP)());return null!=e?e:[]},{manual:!0});(0,o.useEffect)(()=>{if(M.length&&"chat_agent"===A){var e;let t=null===(e=M.find(e=>e.conv_uid===R))||void 0===e?void 0:e.select_param;t&&g(t)}},[M,A,R]);let{data:x=[]}=(0,a.Z)(async()=>{let[,e]=await (0,i.Vx)((0,i.Vw)());return null!=e?e:[]});(0,o.useEffect)(()=>{b(function(){let e=localStorage.getItem(l.he);return e||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")}())},[]),(0,o.useEffect)(()=>{O(x[0])},[x,null==x?void 0:x.length]);let G=(0,o.useMemo)(()=>M.find(e=>e.conv_uid===R),[R,M]);return(0,r.jsx)(E.Provider,{value:{isContract:f,isMenuExpand:I,scene:A,chatId:R,modelList:x,model:p,dbParam:C||d,dialogueList:M,agent:m,setAgent:g,mode:y,setMode:b,setModel:O,setIsContract:S,setIsMenuExpand:N,setDbParam:h,queryDialogueList:D,refreshDialogList:U,currentDialogue:G,history:_,setHistory:L,docId:v,setDocId:P},children:u})}},36353:function(e,t,n){"use strict";var r=n(36609),o=n(67421);r.ZP.use(o.Db).init({resources:{en:{translation:{Knowledge_Space:"Knowledge",space:"space",Vector:"Vector",Owner:"Owner",Count:"Count",File_type_Invalid:"The file type is invalid",Knowledge_Space_Config:"Space Config",Choose_a_Datasource_type:"Datasource type",Segmentation:"Segmentation",No_parameter:"No segementation parameter required.",Knowledge_Space_Name:"Knowledge Space Name",Please_input_the_name:"Please input the name",Please_input_the_owner:"Please input the owner",Please_select_file:"Please select one file",Description:"Description",Storage:"Storage",Please_input_the_description:"Please input the description",Please_select_the_storage:"Please select the storage",Next:"Next",the_name_can_only_contain:'the name can only contain numbers, letters, Chinese characters, "-" and "_"',Text:"Text","Fill your raw text":"Fill your raw text",URL:"URL",Fetch_the_content_of_a_URL:"Fetch the content of a URL",Document:"Document",Upload_a_document:"Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown",Name:"Name",Text_Source:"Text Source(Optional)",Please_input_the_text_source:"Please input the text source",Sync:"Sync",Back:"Back",Finish:"Finish",Web_Page_URL:"Web Page URL",Please_input_the_Web_Page_URL:"Please input the Web Page URL",Select_or_Drop_file:"Select or Drop file",Documents:"Documents",Chat:"Chat",Add_Datasource:"Add Datasource",View_Graph:"View Graph",Arguments:"Arguments",Type:"Type",Size:"Size",Last_Sync:"Last Sync",Status:"Status",Result:"Result",Details:"Details",Delete:"Delete",Operation:"Operation",Submit:"Submit",Chunks:"Chunks",Content:"Content",Meta_Data:"Meta Data",Please_select_a_file:"Please select a file",Please_input_the_text:"Please input the text",Embedding:"Embedding",topk:"topk",the_top_k_vectors:"the top k vectors based on similarity score",recall_score:"recall_score",Set_a_threshold_score:"Set a threshold score for the retrieval of similar vectors",recall_type:"recall_type",model:"model",A_model_used:"A model used to create vector representations of text or other data",Automatic:"Automatic",Process:"Process",Automatic_desc:"Automatically set segmentation and preprocessing rules.",chunk_size:"chunk_size",The_size_of_the_data_chunks:"The size of the data chunks used in processing",chunk_overlap:"chunk_overlap",The_amount_of_overlap:"The amount of overlap between adjacent data chunks",Prompt:"Prompt",scene:"scene",A_contextual_parameter:"A contextual parameter used to define the setting or environment in which the prompt is being used",template:"template",structure_or_format:"A pre-defined structure or format for the prompt, which can help ensure that the AI system generates responses that are consistent with the desired style or tone.",max_token:"max_token",max_iteration:"max_iteration",concurrency_limit:"concurrency_limit",The_maximum_number_of_tokens:"The maximum number of tokens or words allowed in a prompt",Theme:"Theme",Port:"Port",Username:"Username",Password:"Password",Remark:"Remark",Edit:"Edit",Database:"Database",Data_Source:"Data Center",Close_Sidebar:"Fold",Show_Sidebar:"UnFold",language:"Language",choose_model:"Please choose a model",data_center_desc:"DB-GPT also offers a user-friendly data center management interface for efficient data maintenance.",create_database:"Create Database",create_knowledge:"Create Knowledge",path:"Path",model_manage:"Models",stop_model_success:"Stop model success",create_model:"Create Model",model_select_tips:"Please select a model",language_select_tips:"Please select a language",submit:"Submit",close:"Close",start_model_success:"Start model success",download_model_tip:"Please download model first.",Plugins:"Plugins",try_again:"Try again",no_data:"No data",Open_Sidebar:"Unfold",cancel:"Cancel",Edit_Success:"Edit Success",Add:"Add",Add_Success:"Add Success",Error_Message:"Something Error",Please_Input:"Please Input",Prompt_Info_Scene:"Scene",Prompt_Info_Sub_Scene:"Sub Scene",Prompt_Info_Name:"Name",Prompt_Info_Content:"Content",Public:"Public",Private:"Private",Lowest:"Lowest",Missed:"Missed",Lost:"Lost",Incorrect:"Incorrect",Verbose:"Verbose",Best:"Best",Rating:"Rating",Q_A_Category:"Q&A Category",Q_A_Rating:"Q&A Rating",feed_back_desc:"0: No results\n1: Results exist, but they are irrelevant, the question is not understood\n2: Results exist, the question is understood, but it indicates that the question cannot be answered\n3: Results exist, the question is understood, and an answer is given, but the answer is incorrect\n4: Results exist, the question is understood, the answer is correct, but it is verbose and lacks a summary\n5: Results exist, the question is understood, the answer is correct, the reasoning is correct, and a summary is provided, concise and to the point\n",input_count:"Total input",input_unit:"characters",Copy:"Copy",Copy_success:"Content copied successfully",Copy_nothing:"Content copied is empty",Copry_error:"Copy failed",Click_Select:"Click&Select",Quick_Start:"Quick Start",Select_Plugins:"Select Plugins",Search:"Search",Update_From_Github:"Upload From Github",Reset:"Reset",Upload:"Upload",Market_Plugins:"Market Plugin",My_Plugins:"My Plugins",Del_Knowledge_Tips:"Do you want delete the Space",Del_Document_Tips:"Do you want delete the Document",Tips:"Tips",Limit_Upload_File_Count_Tips:"Only one file can be uploaded at a time",To_Plugin_Market:"Go to the Plugin Market",Summary:"Summary",stacked_column_chart:"Stacked Column",column_chart:"Column",percent_stacked_column_chart:"Percent Stacked Column",grouped_column_chart:"Grouped Column",time_column:"Time Column",pie_chart:"Pie",line_chart:"Line",area_chart:"Area",stacked_area_chart:"Stacked Area",scatter_plot:"Scatter",bubble_chart:"Bubble",stacked_bar_chart:"Stacked Bar",bar_chart:"Bar",percent_stacked_bar_chart:"Percent Stacked Bar",grouped_bar_chart:"Grouped Bar",water_fall_chart:"Waterfall",table:"Table",multi_line_chart:"Multi Line",multi_measure_column_chart:"Multi Measure Column",multi_measure_line_chart:"Multi Measure Line",Advices:"Advices",Retry:"Retry",Load_more:"load more",new_chat:"New Chat",choice_agent_tip:"Please choose an agent",no_context_tip:"Please enter your question",Terminal:"Terminal",awel_flow:"AWEL Flow",save:"Save",add_node:"Add Node",no_node:"No Node",connect_warning:"Nodes cannot be connected",flow_modal_title:"Save Flow",flow_name:"Flow Name",flow_description:"Flow Description",flow_name_required:"Please enter the flow name",flow_description_required:"Please enter the flow description",save_flow_success:"Save flow success",delete_flow_confirm:"Are you sure you want to delete this flow?",related_nodes:"Related Nodes",add_resource:"Add Resource",team_modal:"Work Modal",App:"App",resource_name:"Resource Name",resource_type:"Resource Type",resource_value:"Value",resource_dynamic:"Dynamic",Please_input_the_work_modal:"Please select the work modal",available_resources:" Available Resources",edit_new_applications:"Edit new applications",collect:"Collect",collected:"Collected",create:"Create",Agents:"Agents",edit_application:"edit application",add_application:"add application",app_name:"App Name",LLM_strategy:"LLM Strategy",LLM_strategy_value:"LLM Strategy Value",resource:"Resource",operators:"Operators",Chinese:"Chinese",English:"English",refreshSuccess:"Refresh Success"}},zh:{translation:{Knowledge_Space:"知识库",space:"知识库",Vector:"向量",Owner:"创建人",Count:"文档数",File_type_Invalid:"文件类型错误",Knowledge_Space_Config:"知识库配置",Choose_a_Datasource_type:"知识库类型",Segmentation:"分片",No_parameter:"不需要配置分片参数",Knowledge_Space_Name:"知识库名称",Please_input_the_name:"请输入名称",Please_input_the_owner:"请输入创建人",Please_select_file:"请至少选择一个文件",Description:"描述",Storage:"存储类型",Please_input_the_description:"请输入描述",Please_select_the_storage:"请选择存储类型",Next:"下一步",the_name_can_only_contain:"名称只能包含数字、字母、中文字符、-或_",Text:"文本","Fill your raw text":"填写您的原始文本",URL:"网址",Fetch_the_content_of_a_URL:"获取 URL 的内容",Document:"文档",Upload_a_document:"上传文档,文档类型可以是PDF、CSV、Text、PowerPoint、Word、Markdown",Name:"名称",Text_Source:"文本来源(可选)",Please_input_the_text_source:"请输入文本来源",Sync:"同步",Back:"上一步",Finish:"完成",Web_Page_URL:"网页网址",Please_input_the_Web_Page_URL:"请输入网页网址",Select_or_Drop_file:"选择或拖拽文件",Documents:"文档",Chat:"对话",Add_Datasource:"添加数据源",View_Graph:"查看图谱",Arguments:"参数",Type:"类型",Size:"切片",Last_Sync:"上次同步时间",Status:"状态",Result:"结果",Details:"明细",Delete:"删除",Operation:"操作",Submit:"提交",close:"关闭",Chunks:"切片",Content:"内容",Meta_Data:"元数据",Please_select_a_file:"请上传一个文件",Please_input_the_text:"请输入文本",Embedding:"嵌入",topk:"TopK",the_top_k_vectors:"基于相似度得分的前 k 个向量",recall_score:"召回分数",Set_a_threshold_score:"设置相似向量检索的阈值分数",recall_type:"召回类型",model:"模型",A_model_used:"用于创建文本或其他数据的矢量表示的模型",Automatic:"自动切片",Process:"切片处理",Automatic_desc:"自动设置分割和预处理规则。",chunk_size:"块大小",The_size_of_the_data_chunks:"处理中使用的数据块的大小",chunk_overlap:"块重叠",The_amount_of_overlap:"相邻数据块之间的重叠量",scene:"场景",A_contextual_parameter:"用于定义使用提示的设置或环境的上下文参数",template:"模板",structure_or_format:"预定义的提示结构或格式,有助于确保人工智能系统生成与所需风格或语气一致的响应。",max_token:"最大令牌",max_iteration:"最大迭代",concurrency_limit:"并发限制",The_maximum_number_of_tokens:"提示中允许的最大标记或单词数",Theme:"主题",Port:"端口",Username:"用户名",Password:"密码",Remark:"备注",Edit:"编辑",Database:"数据库",Data_Source:"数据中心",Close_Sidebar:"收起",Show_Sidebar:"展开",language:"语言",choose_model:"请选择一个模型",data_center_desc:"DB-GPT支持数据库交互和基于文档的对话,它还提供了一个用户友好的数据中心管理界面。",create_database:"创建数据库",create_knowledge:"创建知识库",path:"路径",model_manage:"模型管理",stop_model_success:"模型停止成功",create_model:"创建模型",model_select_tips:"请选择一个模型",submit:"提交",start_model_success:"启动模型成功",download_model_tip:"请先下载模型!",Plugins:"插件列表",try_again:"刷新重试",no_data:"暂无数据",Prompt:"提示语",Open_Sidebar:"展开",cancel:"取消",Edit_Success:"编辑成功",Add:"新增",Add_Success:"新增成功",Error_Message:"出错了",Please_Input:"请输入",Prompt_Info_Scene:"场景",Prompt_Info_Sub_Scene:"次级场景",Prompt_Info_Name:"名称",Prompt_Info_Content:"内容",Public:"公共",Private:"私有",Lowest:"渣渣",Missed:"没理解",Lost:"答不了",Incorrect:"答错了",Verbose:"较啰嗦",Best:"真棒",Rating:"评分",Q_A_Category:"问答类别",Q_A_Rating:"问答评分",feed_back_desc:"0: 无结果\n1: 有结果,但是在文不对题,没有理解问题\n2: 有结果,理解了问题,但是提示回答不了这个问题\n3: 有结果,理解了问题,并做出回答,但是回答的结果错误\n4: 有结果,理解了问题,回答结果正确,但是比较啰嗦,缺乏总结\n5: 有结果,理解了问题,回答结果正确,推理正确,并给出了总结,言简意赅\n",input_count:"共计输入",input_unit:"字",Copy:"复制",Copy_success:"内容复制成功",Copy_nothing:"内容复制为空",Copry_error:"复制失败",Click_Select:"点击选择",Quick_Start:"快速开始",Select_Plugins:"选择插件",Search:"搜索",Reset:"重置",Update_From_Github:"更新Github插件",Upload:"上传",Market_Plugins:"插件市场",My_Plugins:"我的插件",Del_Knowledge_Tips:"你确定删除该知识库吗",Del_Document_Tips:"你确定删除该文档吗",Tips:"提示",Limit_Upload_File_Count_Tips:"一次只能上传一个文件",To_Plugin_Market:"前往插件市场",Summary:"总结",stacked_column_chart:"堆叠柱状图",column_chart:"柱状图",percent_stacked_column_chart:"百分比堆叠柱状图",grouped_column_chart:"簇形柱状图",time_column:"簇形柱状图",pie_chart:"饼图",line_chart:"折线图",area_chart:"面积图",stacked_area_chart:"堆叠面积图",scatter_plot:"散点图",bubble_chart:"气泡图",stacked_bar_chart:"堆叠条形图",bar_chart:"条形图",percent_stacked_bar_chart:"百分比堆叠条形图",grouped_bar_chart:"簇形条形图",water_fall_chart:"瀑布图",table:"表格",multi_line_chart:"多折线图",multi_measure_column_chart:"多指标柱形图",multi_measure_line_chart:"多指标折线图",Advices:"自动推荐",Retry:"重试",Load_more:"加载更多",new_chat:"创建会话",choice_agent_tip:"请选择代理",no_context_tip:"请输入你的问题",Terminal:"终端",awel_flow:"AWEL 工作流",save:"保存",add_node:"添加节点",no_node:"没有可编排节点",connect_warning:"节点无法连接",flow_modal_title:"保存工作流",flow_name:"工作流名称",flow_description:"工作流描述",flow_name_required:"请输入工作流名称",flow_description_required:"请输入工作流描述",save_flow_success:"保存工作流成功",delete_flow_confirm:"确定删除该工作流吗?",related_nodes:"关联节点",language_select_tips:"请选择语言",add_resource:"添加资源",team_modal:"工作模式",App:"应用程序",resource:"资源",resource_name:"资源名",resource_type:"资源类型",resource_value:"参数",resource_dynamic:"动态",Please_input_the_work_modal:"请选择工作模式",available_resources:"可用资源",edit_new_applications:"编辑新的应用",collect:"收藏",collected:"已收藏",create:"创建",Agents:"智能体",edit_application:"编辑应用",add_application:"添加应用",app_name:"应用名称",LLM_strategy:"模型策略",LLM_strategy_value:"模型策略参数",operators:"算子",Chinese:"中文",English:"英文",refreshSuccess:"刷新成功"}}},lng:"en",interpolation:{escapeValue:!1}}),t.Z=r.ZP},89182:function(e,t,n){"use strict";n.d(t,{yY:function(){return eF},HT:function(){return eU},a4:function(){return ex},uO:function(){return eG},L5:function(){return eI},H_:function(){return Y},zd:function(){return eA},Hy:function(){return eR},be:function(){return V},Vx:function(){return N},mo:function(){return eC},Nl:function(){return em},MX:function(){return G},n3:function(){return K},XK:function(){return z},Jq:function(){return ep},j8:function(){return eg},yk:function(){return eN},Vd:function(){return ey},m9:function(){return eb},Tu:function(){return F},Eb:function(){return eE},Lu:function(){return el},$i:function(){return U},gV:function(){return X},iZ:function(){return k},Bw:function(){return m},Jm:function(){return g},H4:function(){return es},iP:function(){return b},_Q:function(){return w},_d:function(){return ef},As:function(){return eO},Wf:function(){return ed},FT:function(){return $},fZ:function(){return J},xA:function(){return eu},RX:function(){return ev},Q5:function(){return eL},Vm:function(){return B},xv:function(){return ee},lz:function(){return e_},Vw:function(){return D},sW:function(){return h},DM:function(){return en},v6:function(){return eo},N6:function(){return er},bC:function(){return et},YU:function(){return ei},Kn:function(){return ea},VC:function(){return ec},qn:function(){return x},vD:function(){return M},b_:function(){return v},J5:function(){return _},mR:function(){return L},yx:function(){return y},KS:function(){return P},CU:function(){return C},iH:function(){return H},vA:function(){return Q},kU:function(){return q},KL:function(){return Z},Hx:function(){return W},gD:function(){return eh},KT:function(){return eP},ao:function(){return eS},Fu:function(){return eT},iG:function(){return j}});var r=n(6154);let{Axios:o,AxiosError:i,CanceledError:a,isCancel:s,CancelToken:l,VERSION:E,all:c,Cancel:u,isAxiosError:T,spread:R,toFormData:A,AxiosHeaders:d,HttpStatusCode:f,formToJSON:S,getAdapter:p,mergeConfig:O}=r.default;var I=n(54689);let N=(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;I.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=>{let t=e.message;if(e instanceof i)try{let{err_msg:n}=JSON.parse(e.request.response);n&&(t=n)}catch(e){}return I.Z.error({message:"Request error",description:t}),[e,null,null,null]}),C=()=>ex("/api/v1/chat/dialogue/scenes"),h=e=>ex("/api/v1/chat/dialogue/new",e),m=()=>eU("/api/v1/chat/db/list"),g=()=>eU("/api/v1/chat/db/support/type"),_=e=>ex("/api/v1/chat/db/delete?db_name=".concat(e)),L=e=>ex("/api/v1/chat/db/edit",e),v=e=>ex("/api/v1/chat/db/add",e),P=e=>ex("/api/v1/chat/db/test/connect",e),y=e=>ex("/api/v1/chat/db/refresh",e),b=()=>eU("/api/v1/chat/dialogue/list"),D=()=>eU("/api/v1/model/types"),M=e=>ex("/api/v1/chat/mode/params/list?chat_mode=".concat(e)),U=e=>eU("/api/v1/chat/dialogue/messages/history?con_uid=".concat(e)),x=e=>{let{convUid:t,chatMode:n,data:r,config:o,model:i}=e;return ex("/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})},G=e=>ex("/api/v1/chat/dialogue/delete?con_uid=".concat(e)),F=e=>ex("/knowledge/".concat(e,"/arguments"),{}),H=(e,t)=>ex("/knowledge/".concat(e,"/argument/save"),t),B=()=>ex("/knowledge/space/list",{}),w=(e,t)=>ex("/knowledge/".concat(e,"/document/list"),t),$=(e,t)=>ex("/knowledge/".concat(e,"/graphvis"),t),Y=(e,t)=>ex("/knowledge/".concat(e,"/document/add"),t),V=e=>ex("/knowledge/space/add",e),k=()=>eU("/knowledge/document/chunkstrategies"),W=(e,t)=>ex("/knowledge/".concat(e,"/document/sync"),t),Z=(e,t)=>ex("/knowledge/".concat(e,"/document/sync_batch"),t),j=(e,t)=>ex("/knowledge/".concat(e,"/document/upload"),t),X=(e,t)=>ex("/knowledge/".concat(e,"/chunk/list"),t),K=(e,t)=>ex("/knowledge/".concat(e,"/document/delete"),t),z=e=>ex("/knowledge/space/delete",e),J=()=>eU("/api/v1/worker/model/list"),q=e=>ex("/api/v1/worker/model/stop",e),Q=e=>ex("/api/v1/worker/model/start",e),ee=()=>eU("/api/v1/worker/model/params"),et=e=>ex("/api/v1/agent/query",e),en=e=>ex("/api/v1/agent/hub/update",null!=e?e:{channel:"",url:"",branch:"",authorization:""}),er=e=>ex("/api/v1/agent/my",void 0,{params:{user:e}}),eo=(e,t)=>ex("/api/v1/agent/install",void 0,{params:{plugin_name:e,user:t},timeout:6e4}),ei=(e,t)=>ex("/api/v1/agent/uninstall",void 0,{params:{plugin_name:e,user:t},timeout:6e4}),ea=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 ex("/api/v1/personal/agent/upload",t,{params:{user:e},headers:{"Content-Type":"multipart/form-data"},...n})},es=()=>eU("/api/v1/dbgpts/list"),el=()=>eU("/api/v1/feedback/select",void 0),eE=(e,t)=>eU("/api/v1/feedback/find?conv_uid=".concat(e,"&conv_index=").concat(t),void 0),ec=e=>{let{data:t,config:n}=e;return ex("/api/v1/feedback/commit",t,{headers:{"Content-Type":"application/json"},...n})},eu=e=>ex("/prompt/list",e),eT=e=>ex("/prompt/update",e),eR=e=>ex("/prompt/add",e),eA=e=>ex("/api/v1/serve/awel/flows",e),ed=()=>eU("/api/v1/serve/awel/flows"),ef=e=>eU("/api/v1/serve/awel/flows/".concat(e)),eS=(e,t)=>eG("/api/v1/serve/awel/flows/".concat(e),t),ep=e=>eF("/api/v1/serve/awel/flows/".concat(e)),eO=()=>eU("/api/v1/serve/awel/nodes"),eI=e=>ex("/api/v1/app/create",e),eN=e=>ex("/api/v1/app/list",e),eC=e=>ex("/api/v1/app/collect",e),eh=e=>ex("/api/v1/app/uncollect",e),em=e=>ex("/api/v1/app/remove",e),eg=()=>eU("/api/v1/agents/list",{}),e_=()=>eU("/api/v1/team-mode/list"),eL=()=>eU("/api/v1/resource-type/list"),ev=e=>eU("/api/v1/app/resources/list?type=".concat(e.type)),eP=e=>ex("/api/v1/app/edit",e),ey=()=>eU("/api/v1/llm-strategy/list"),eb=e=>eU("/api/v1/llm-strategy/value/list?type=".concat(e)),eD=r.default.create({baseURL:"http://127.0.0.1:5670"}),eM=["/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"];eD.interceptors.request.use(e=>{let t=eM.some(t=>e.url&&e.url.indexOf(t)>=0);return e.timeout||(e.timeout=t?6e4:1e4),e});let eU=(e,t,n)=>eD.get(e,{params:t,...n}),ex=(e,t,n)=>eD.post(e,t,n),eG=(e,t,n)=>eD.put(e,t,n),eF=(e,t,n)=>eD.delete(e,{params:t,...n})},1051:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(85893);function o(){return(0,r.jsx)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"6058",width:"1.5em",height:"1.5em",children:(0,r.jsx)("path",{d:"M688 312c0 4.4-3.6 8-8 8H296c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h384c4.4 0 8 3.6 8 8v48z m-392 88h184c4.4 0 8 3.6 8 8v48c0 4.4-3.6 8-8 8H296c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8z m376 116c119.3 0 216 96.7 216 216s-96.7 216-216 216-216-96.7-216-216 96.7-216 216-216z m107.5 323.5C808.2 810.8 824 772.6 824 732s-15.8-78.8-44.5-107.5S712.6 580 672 580s-78.8 15.8-107.5 44.5S520 691.4 520 732s15.8 78.8 44.5 107.5S631.4 884 672 884s78.8-15.8 107.5-44.5zM440 852c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H168c-17.7 0-32-14.3-32-32V108c0-17.7 14.3-32 32-32h640c17.7 0 32 14.3 32 32v384c0 4.4-3.6 8-8 8h-56c-4.4 0-8-3.6-8-8V148H208v704h232z m232-76.06l-20.56 28.43c-1.5 2.1-3.9 3.3-6.5 3.3h-44.3c-6.5 0-10.3-7.4-6.4-12.7l45.75-63.3-45.75-63.3c-3.9-5.3-0.1-12.7 6.4-12.7h44.3c2.6 0 5 1.2 6.5 3.3L672 687.4l20.56-28.43c1.5-2.1 3.9-3.3 6.5-3.3h44.3c6.5 0 10.3 7.4 6.4 12.7l-45.75 63.3 45.75 63.3c3.9 5.3 0.1 12.7-6.4 12.7h-44.3c-2.6 0-5-1.2-6.5-3.3L672 775.94z",fill:"#d81e06","p-id":"6059"})})}n(67294)},82353:function(e,t,n){"use strict";n.d(t,{O7:function(){return c},RD:function(){return a},In:function(){return o},zM:function(){return i},je:function(){return s},DL:function(){return l},si:function(){return E},FD:function(){return u},qw:function(){return O},s2:function(){return d},FE:function(){return I.Z},Rp:function(){return f},IN:function(){return T},tu:function(){return S},ig:function(){return R},ol:function(){return A},bn:function(){return p}});var r=n(85893),o=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1116 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1581",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M80.75 80.75m67.14674945 0l805.76099677 0q67.14674945 0 67.14674947 67.14674945l0 604.32074759q0 67.14674945-67.14674947 67.14674945l-805.76099677 0q-67.14674945 0-67.14674945-67.14674945l0-604.32074759q0-67.14674945 67.14674945-67.14674945Z",fill:"#36CFC9","p-id":"1582"}),(0,r.jsx)("path",{d:"M1020.80449568 685.07074759v67.14674945a67.14674945 67.14674945 0 0 1-67.14674946 67.14674945h-308.20358111l91.3195796 100.72012459-24.84429735 22.49416172L600.46584251 819.36424649h-100.72012459L389.62504831 943.25 364.78075097 920.08437108l91.31957961-100.72012459H147.89674945a67.14674945 67.14674945 0 0 1-67.14674945-67.14674945v-67.14674946z",fill:"#08979C","p-id":"1583"}),(0,r.jsx)("path",{d:"M416.48374894 282.19024919v335.7337481H315.76362434V282.19024919z m167.86687404 134.29349975v201.44024834h-100.72012459v-201.44024834z m167.86687406 67.14674945v134.2934989h-100.7201246v-134.2934989z m-225.94881252-302.16037379v141.34390829h201.4402492V272.11823698L819.36424649 341.27938889l-91.3195796 63.45367858V356.38740719h-239.71389641V215.04349975H315.76362434V181.4701246z",fill:"#B5F5EC","p-id":"1584"}),(0,r.jsx)("path",{d:"M550.77724783 752.21749704m-33.57337513 0a33.57337515 33.57337515 0 1 0 67.14675028 0 33.57337515 33.57337515 0 1 0-67.14675028 0Z",fill:"#FFFFFF","p-id":"1585"})]})},i=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1722",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M207.83 962c-5.4 0-10.88-1.17-16.08-3.67-18.55-8.89-26.39-31.13-17.5-49.69l77.22-161.26c8.9-18.58 31.14-26.41 49.7-17.51 18.55 8.89 26.39 31.13 17.5 49.69l-77.22 161.26c-6.4 13.38-19.74 21.18-33.62 21.18zM821.57 962c-13.88 0-27.21-7.8-33.62-21.17l-77.24-161.26c-8.9-18.55-1.06-40.8 17.5-49.69 18.57-8.87 40.8-1.07 49.7 17.51l77.24 161.26c8.9 18.55 1.06 40.8-17.5 49.69a37.266 37.266 0 0 1-16.08 3.66z",fill:"#12926E","p-id":"1723"}),(0,r.jsx)("path",{d:"M156.74 105.14h710.51c50.7 0 91.8 41.1 91.8 91.8v525.82c0 50.7-41.1 91.8-91.8 91.8H156.74c-50.7 0-91.8-41.1-91.8-91.8V196.93c0.01-50.69 41.11-91.79 91.8-91.79z",fill:"#39E2A0","p-id":"1724"}),(0,r.jsx)("path",{d:"M835.65 686.01h-614.7c-5.14 0-9.31-4.17-9.31-9.31 0-5.14 4.17-9.31 9.31-9.31h614.7c5.14 0 9.31 4.17 9.31 9.31 0 5.14-4.17 9.31-9.31 9.31z",fill:"#D3F8EA","p-id":"1725"}),(0,r.jsx)("path",{d:"M699.31 631.94H624.8V454.95c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v176.99zM846.22 631.94h-74.51V346.76c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v285.18zM289.51 631.94H215V417.69c0-11.28 9.14-20.42 20.42-20.42h33.67c11.28 0 20.42 9.14 20.42 20.42v214.25zM436.42 631.94h-74.51V495.77c0-11.28 9.14-20.42 20.42-20.42H416c11.28 0 20.42 9.14 20.42 20.42v136.17z",fill:"#FFFFFF","p-id":"1726"}),(0,r.jsx)("path",{d:"M715.4 173.76H308.6c-11.11 0-20.12-9.01-20.12-20.12V82.12c0-11.11 9.01-20.12 20.12-20.12h406.8c11.11 0 20.12 9.01 20.12 20.12v71.52c0.01 11.11-9 20.12-20.12 20.12z",fill:"#12926E","p-id":"1727"})]})},a=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1129",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M226.3 70.4C151.1 91.6 91.6 151.1 70.4 226.3L226.3 70.4z",fill:"#FFA65A","p-id":"1130"}),(0,r.jsx)("path",{d:"M277.9 62.2c-116.5 4.7-211 99.1-215.7 215.7L277.9 62.2z",fill:"#FFA659","p-id":"1131"}),(0,r.jsx)("path",{d:"M321.5 62H287C163.3 62 62 163.3 62 287v34.5L321.5 62z",fill:"#FFA558","p-id":"1132"}),(0,r.jsx)("path",{d:"M365 62h-78C163.3 62 62 163.3 62 287v78L365 62z",fill:"#FFA557","p-id":"1133"}),(0,r.jsx)("path",{d:"M408.4 62H287C163.3 62 62 163.3 62 287v121.4L408.4 62z",fill:"#FFA556","p-id":"1134"}),(0,r.jsx)("path",{d:"M451.8 62H287c-35.9 0-69.8 8.5-100 23.6L85.6 187C70.5 217.2 62 251.1 62 287v164.8L451.8 62z",fill:"#FFA555","p-id":"1135"}),(0,r.jsx)("path",{d:"M495.3 62H287c-12.2 0-24.2 1-35.9 2.9L64.9 251.1C63 262.8 62 274.8 62 287v208.3L495.3 62z",fill:"#FFA454","p-id":"1136"}),(0,r.jsx)("path",{d:"M62 538.7L538.7 62H297.5L62 297.5z",fill:"#FFA453","p-id":"1137"}),(0,r.jsx)("path",{d:"M62 582.1L582.1 62H340.9L62 340.9z",fill:"#FFA452","p-id":"1138"}),(0,r.jsx)("path",{d:"M62 625.6L625.6 62H384.3L62 384.3z",fill:"#FFA451","p-id":"1139"}),(0,r.jsx)("path",{d:"M62 427.8V669L669 62H427.8z",fill:"#FFA450","p-id":"1140"}),(0,r.jsx)("path",{d:"M62 471.2v241.2L712.4 62H471.2z",fill:"#FFA34F","p-id":"1141"}),(0,r.jsx)("path",{d:"M737 62H514.6L62 514.6V737c0 6.1 0.3 12.1 0.7 18.1L755.1 62.7c-6-0.4-12-0.7-18.1-0.7z",fill:"#FFA34E","p-id":"1142"}),(0,r.jsx)("path",{d:"M737 62H558.1L62 558.1V737c0 19.1 2.4 37.6 6.9 55.4L792.4 68.9C774.6 64.4 756.1 62 737 62z",fill:"#FFA34D","p-id":"1143"}),(0,r.jsx)("path",{d:"M737 62H601.5L62 601.5V737c0 31.1 6.4 60.8 17.9 87.8L824.8 79.9C797.8 68.4 768.1 62 737 62z",fill:"#FFA34C","p-id":"1144"}),(0,r.jsx)("path",{d:"M853.5 94.7C819.4 74 779.5 62 737 62h-92.1L62 644.9V737c0 42.5 12 82.4 32.7 116.5L853.5 94.7z",fill:"#FFA24B","p-id":"1145"}),(0,r.jsx)("path",{d:"M878.9 112.7C840.1 81.1 790.7 62 737 62h-48.6L62 688.4V737c0 53.7 19.1 103.1 50.7 141.9l766.2-766.2z",fill:"#FFA24A","p-id":"1146"}),(0,r.jsx)("path",{d:"M737 62h-5.2L62 731.8v5.2c0 64.7 27.7 123.2 71.7 164.3l767.6-767.6C860.2 89.7 801.7 62 737 62z",fill:"#FFA249","p-id":"1147"}),(0,r.jsx)("path",{d:"M64.8 772.4c9.8 61 44.3 114.1 92.8 148.4l763.2-763.2c-34.3-48.6-87.4-83.1-148.4-92.8L64.8 772.4z",fill:"#FFA248","p-id":"1148"}),(0,r.jsx)("path",{d:"M73.3 807.3c18.7 56.4 59.2 103 111.3 129.9l752.6-752.6C910.4 132.5 863.7 92 807.3 73.3l-734 734z",fill:"#FFA247","p-id":"1149"}),(0,r.jsx)("path",{d:"M86.1 838c26.5 52.3 72.9 93.1 129.1 112.2l735-735C931.1 159 890.3 112.6 838 86.1L86.1 838z",fill:"#FFA147","p-id":"1150"}),(0,r.jsx)("path",{d:"M102.4 865.2c34 48.7 86.7 83.5 147.5 93.7l709-709c-10.2-60.8-45-113.5-93.7-147.5L102.4 865.2z",fill:"#FFA146","p-id":"1151"}),(0,r.jsx)("path",{d:"M962 287c0-65.2-28.1-124.1-72.7-165.3L121.7 889.3C162.9 933.9 221.8 962 287 962h3.2L962 290.2V287z",fill:"#FFA145","p-id":"1152"}),(0,r.jsx)("path",{d:"M962 287c0-54.2-19.4-104-51.6-143L144 910.4c39 32.2 88.8 51.6 143 51.6h46.6L962 333.6V287z",fill:"#FFA144","p-id":"1153"}),(0,r.jsx)("path",{d:"M962 287c0-43.1-12.3-83.4-33.5-117.7L169.3 928.5C203.6 949.7 243.9 962 287 962h90.1L962 377.1V287z",fill:"#FFA143","p-id":"1154"}),(0,r.jsx)("path",{d:"M287 962h133.5L962 420.5V287c0-31.6-6.6-61.8-18.5-89.2L197.8 943.4c27.4 12 57.6 18.6 89.2 18.6z",fill:"#FFA042","p-id":"1155"}),(0,r.jsx)("path",{d:"M287 962h176.9L962 463.9V287c0-19.7-2.6-38.7-7.4-56.9L230.1 954.6c18.2 4.8 37.2 7.4 56.9 7.4z",fill:"#FFA041","p-id":"1156"}),(0,r.jsx)("path",{d:"M287 962h220.4L962 507.4V287c0-6.7-0.3-13.4-0.9-20L267 961.1c6.6 0.6 13.3 0.9 20 0.9z",fill:"#FFA040","p-id":"1157"}),(0,r.jsx)("path",{d:"M550.8 962L962 550.8V309.6L309.6 962z",fill:"#FFA03F","p-id":"1158"}),(0,r.jsx)("path",{d:"M594.2 962L962 594.2V353L353 962z",fill:"#FF9F3E","p-id":"1159"}),(0,r.jsx)("path",{d:"M637.7 962L962 637.7V396.4L396.4 962z",fill:"#FF9F3D","p-id":"1160"}),(0,r.jsx)("path",{d:"M681.1 962L962 681.1V439.9L439.9 962z",fill:"#FF9F3C","p-id":"1161"}),(0,r.jsx)("path",{d:"M724.5 962L962 724.5V483.3L483.3 962z",fill:"#FF9F3B","p-id":"1162"}),(0,r.jsx)("path",{d:"M962 737V526.7L526.7 962H737c11.4 0 22.5-0.9 33.5-2.5l189-189c1.6-11 2.5-22.1 2.5-33.5z",fill:"#FF9F3A","p-id":"1163"}),(0,r.jsx)("path",{d:"M962 737V570.2L570.2 962H737c34.3 0 66.9-7.8 96.1-21.7l107.2-107.2c13.9-29.2 21.7-61.8 21.7-96.1z",fill:"#FF9E39","p-id":"1164"}),(0,r.jsx)("path",{d:"M962 613.6L613.6 962H737c123.8 0 225-101.3 225-225V613.6z",fill:"#FF9E38","p-id":"1165"}),(0,r.jsx)("path",{d:"M962 657L657 962h80c123.8 0 225-101.3 225-225v-80z",fill:"#FF9E37","p-id":"1166"}),(0,r.jsx)("path",{d:"M962 700.5L700.5 962H737c123.8 0 225-101.3 225-225v-36.5z",fill:"#FF9E36","p-id":"1167"}),(0,r.jsx)("path",{d:"M961.9 744L744 961.9c118.2-3.7 214.2-99.7 217.9-217.9z",fill:"#FF9D35","p-id":"1168"}),(0,r.jsx)("path",{d:"M954.4 795L795 954.4c77.4-20.8 138.6-82 159.4-159.4z",fill:"#FF9D34","p-id":"1169"}),(0,r.jsx)("path",{d:"M736.3 622.9L523.5 747.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 622.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFD9C0","p-id":"1170"}),(0,r.jsx)("path",{d:"M736.3 523.9L523.5 648.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 523.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFE8D9","p-id":"1171"}),(0,r.jsx)("path",{d:"M736.3 424.9L523.5 549.3c-5.6 3.3-12.4 3.3-18 0.1L287.8 424.6c-12.2-7-12-24.6 0.3-31.4l212.8-116.7c5.3-2.9 11.8-3 17.2-0.1l217.7 117c12.3 6.7 12.6 24.4 0.5 31.5z",fill:"#FFF6F0","p-id":"1172"})]})},s=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1300",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M197.99492187 62v900h-34.18066406C124.57285156 962 92.76171875 930.18886719 92.76171875 890.94746094V133.05253906C92.76171875 93.81113281 124.57285156 62 163.81425781 62h34.18066406z m662.19082032 0C899.42714844 62 931.23828125 93.81113281 931.23828125 133.05253906v757.89492188c0 39.24140625-31.81113281 71.05253906-71.05253906 71.05253906H276.92070312V62h583.26503907z",fill:"#19A05F","p-id":"1301"}),(0,r.jsx)("path",{d:"M577.0390625 62l0.33222656 220.3875 111.2475586-108.80771484L800.19951172 284.36328125V62zM425.40224609 508.18554688h377.05078125v50.94404296h-377.05078125V508.18554688z m0 101.88720703h377.05078125v50.94316406h-377.05078125v-50.94316406z",fill:"#FFFFFF","p-id":"1302"})]})},l=function(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2006",className:"w-full h-full",children:[(0,r.jsx)("path",{d:"M701.95942066 37.1014489H250.80579673a142.46956521 142.46956521 0 0 0-142.46956522 142.46956523v664.85797174a142.46956521 142.46956521 0 0 0 142.46956522 142.46956523h522.38840654a142.46956521 142.46956521 0 0 0 142.46956522-142.46956523V274.55072501L701.95942066 37.1014489z",fill:"#53D39C","p-id":"2007"}),(0,r.jsx)("path",{d:"M444.2794663 392.18309566l69.64387283 117.72735109h2.70692174l69.97630108-117.70360654h82.4661337l-105.40373371 172.67311305 107.77822609 172.6968587h-83.98580869l-70.83111847-117.89356521h-2.70692174L443.09222066 737.57681196h-83.65338045l108.11065544-172.6968587-106.09233586-172.6968576h82.82230651z",fill:"#25BF79","p-id":"2008"}),(0,r.jsx)("path",{d:"M444.2794663 380.31063151l69.64387283 117.7273511h2.70692174l69.97630108-117.70360543h82.4661337l-105.40373371 172.67311305L671.44718803 725.70434783h-83.98580869l-70.83111847-117.89356522h-2.70692174L443.09222066 725.70434783h-83.65338045l108.11065544-172.6968576-106.09233586-172.69685872h82.82230651z",fill:"#FFFFFF","p-id":"2009"}),(0,r.jsx)("path",{d:"M701.95942066 37.1014489l160.27826087 178.08695653L915.66376849 274.55072501h-142.46956522a71.23478261 71.23478261 0 0 1-71.23478261-71.23478261V37.1014489z",fill:"#25BF79","p-id":"2010"})]})},E=function(){return(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2147",className:"w-full h-full",children:(0,r.jsx)("path",{d:"M688.51536688 447.75428656l-2.39993719 1.25996719a200.75473031 200.75473031 0 0 1-7.19981156 38.03900156l-47.33875688 166.43563031 110.45710031-59.63843437-47.03876531-114.41699625a108.2971575 108.2971575 0 0 1-6.47982937-31.67916844z m194.87488406-200.99472375l-96.35747063-58.55846344-354.77068687 217.43429251a70.01816156 70.01816156 0 0 0-32.51914688 59.57843624v193.97490844l-158.99582625-98.09742562V362.67651969a69.4181775 69.4181775 0 0 1 33.95910844-60.41841375l358.67058469-206.99456625 13.55964469 7.97979L544.75914031 41.26495719a62.75835281 62.75835281 0 0 0-65.63827687 0L140.54975094 246.75956281a69.89816531 69.89816531 0 0 0-32.81913844 59.75843063v410.98921218c-0.11999719 24.47935781 12.2996775 47.1587625 32.81913844 59.81842969l338.5711125 205.49460563c20.21946937 12.23967844 45.35880937 12.23967844 65.63827687 0l338.69110875-205.49460563c20.33946563-12.41967375 32.87913656-35.09907844 32.8791375-59.81842968v-410.98921219a69.77816813 69.77816813 0 0 0-32.93913562-59.75843063z m-89.51764969 477.88745532l-31.01918625-75.65801438-150.53604844 81.35786438-30.47919937 108.95713968-95.81748563 51.7186425 151.61602032-485.20726312 103.79727562-56.09852719 148.73609531 322.97152219-96.29747156 51.95863594z m0-1e-8",fill:"#0F6CF9","p-id":"2148"})})},c=function(){return(0,r.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M416.9549913 314.32347826h297.42302609a119.56758261 119.56758261 0 0 1 119.56758261 119.56758261v179.19109565a196.71485217 196.71485217 0 0 1-196.71485217 196.71485218H416.9549913a119.56758261 119.56758261 0 0 1-119.5675826-119.56758261v-256.44521739A119.56758261 119.56758261 0 0 1 416.9549913 314.32347826z",fill:"#F5384A","p-id":"1186"}),(0,r.jsx)("path",{d:"M716.24793043 314.32347826H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.53739131v260.18504347c0 3.84667826 0 7.69335652 0.58768696 11.43318261a345.7202087 345.7202087 0 0 0 502.9531826-353.19986087A117.1634087 117.1634087 0 0 0 716.24793043 314.32347826z",fill:"#F54F5C","p-id":"1187"}),(0,r.jsx)("path",{d:"M318.91812174 594.54330435a345.7202087 345.7202087 0 0 0 420.73043478-249.07241739c2.35074783-9.18928696 4.22066087-18.432 5.82344348-27.67471305a117.10998261 117.10998261 0 0 0-29.22406957-3.63297391H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.5373913v156.43158261c6.9453913 2.35074783 14.10448696 4.54121739 21.42386087 6.41113044z",fill:"#F66C73","p-id":"1188"}),(0,r.jsx)("path",{d:"M630.17850435 314.32347826H415.03165217a117.5373913 117.5373913 0 0 0-117.5373913 117.53739131v48.08347826a346.14761739 346.14761739 0 0 0 332.68424348-165.62086957z",fill:"#F78989","p-id":"1189"}),(0,r.jsx)("path",{d:"M859.85725217 354.76702609h-25.53766956C802.26393043 200.52591304 669.92751304 84.59130435 512 84.59130435S221.73606957 200.52591304 189.68041739 354.76702609h-25.53766956a139.6557913 139.6557913 0 0 0-139.44208696 139.49551304v79.872a139.6557913 139.6557913 0 0 0 139.44208696 139.49551304h27.62128695a54.65488696 54.65488696 0 0 0 54.60146087-54.60146087V427.10594783C246.36549565 273.6128 365.50566957 148.7026087 512 148.7026087s265.63450435 124.9101913 265.63450435 278.40333913v159.3165913c0 116.09488696-74.79652174 219.47436522-181.38156522 251.42316522a30.23916522 30.23916522 0 0 0-3.09871304 1.06852174 60.15777391 60.15777391 0 1 0 18.05801739 61.06601739 23.50747826 23.50747826 0 0 0 3.36584348-0.69453913c93.12166957-27.88841739 166.63596522-98.67798261 203.01913043-187.79269565a54.92201739 54.92201739 0 0 0 14.90587826 2.13704347h27.62128696a139.6557913 139.6557913 0 0 0 139.44208696-139.49551304V494.26253913a139.6557913 139.6557913 0 0 0-139.7092174-139.49551304zM182.2541913 649.51874783h-18.11144347a75.43763478 75.43763478 0 0 1-75.33078261-75.3842087V494.26253913a75.43763478 75.43763478 0 0 1 75.33078261-75.3842087h18.11144347v230.6404174z m752.93384348-75.3842087a75.43763478 75.43763478 0 0 1-75.33078261 75.3842087h-18.11144347V418.87833043h18.11144347a75.43763478 75.43763478 0 0 1 75.33078261 75.3842087z",fill:"#444444","p-id":"1190"})]})},u=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,r.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"})})},T=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",children:(0,r.jsx)("path",{d:"M513.89 950.72c-5.5 0-11-1.4-15.99-4.2L143.84 743c-9.85-5.73-15.99-16.17-15.99-27.64V308.58c0-11.33 6.14-21.91 15.99-27.64L497.9 77.43c9.85-5.73 22.14-5.73 31.99 0l354.06 203.52c9.85 5.73 15.99 16.17 15.99 27.64V715.5c0 11.33-6.14 21.91-15.99 27.64L529.89 946.52c-4.99 2.8-10.49 4.2-16 4.2zM191.83 697.15L513.89 882.2l322.07-185.05V326.92L513.89 141.87 191.83 326.92v370.23z m322.06-153.34c-5.37 0-10.88-1.4-15.99-4.33L244.29 393.91c-15.35-8.79-20.6-28.27-11.77-43.56 8.83-15.28 28.41-20.5 43.76-11.72l253.61 145.7c15.35 8.79 20.6 28.27 11.77 43.56-6.01 10.32-16.76 15.92-27.77 15.92z m0 291.52c-17.66 0-31.99-14.26-31.99-31.84V530.44L244.55 393.91s-0.13 0-0.13-0.13l-100.45-57.69c-15.35-8.79-20.6-28.27-11.77-43.56s28.41-20.5 43.76-11.72l354.06 203.52c9.85 5.73 15.99 16.17 15.99 27.64v291.39c-0.13 17.71-14.46 31.97-32.12 31.97z m0 115.39c-17.66 0-31.99-14.26-31.99-31.84V511.97c0-17.58 14.33-31.84 31.99-31.84s31.99 14.26 31.99 31.84v406.91c0 17.7-14.33 31.84-31.99 31.84z m0-406.91c-11 0-21.75-5.73-27.77-15.92-8.83-15.28-3.58-34.64 11.77-43.56l354.06-203.52c15.35-8.79 34.8-3.57 43.76 11.72 8.83 15.28 3.58 34.64-11.77 43.56L529.89 539.61c-4.99 2.93-10.49 4.2-16 4.2z"})})},R=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",version:"1.1",children:(0,r.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"})})},A=function(){return(0,r.jsx)("svg",{width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 1024 1024",children:(0,r.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"})})};function d(){return(0,r.jsxs)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4602",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zM296 400c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM672 516c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216z m107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5z","p-id":"4603",fill:"#87d068"}),(0,r.jsx)("path",{d:"M761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9c-1.5-2.1-3.9-3.3-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3 0.1-12.7-6.4-12.7z","p-id":"4604",fill:"#87d068"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z","p-id":"4605",fill:"#87d068"})]})}function f(){return(0,r.jsxs)("svg",{className:"mr-1",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4838",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M296 256c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM488 456v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8z","p-id":"4839",fill:"#2db7f5"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z","p-id":"4840",fill:"#2db7f5"}),(0,r.jsx)("path",{d:"M544.1 736.4c1.8-34.5 16.2-66.8 40.8-91.4 26.2-26.2 62-41 99.1-41 37.4 0 72.6 14.6 99.1 41 3.2 3.2 6.3 6.6 9.2 10.1L769.2 673c-5.3 4.1-3.5 12.5 3 14.1l93.3 22.5c5 1.2 9.8-2.6 9.9-7.7l0.6-95.4c0-6.7-7.6-10.5-12.9-6.4l-20.3 15.8C805.4 569.6 748.1 540 684 540c-109.9 0-199.6 86.9-204 195.7-0.2 4.5 3.5 8.3 8 8.3h48.1c4.3 0 7.8-3.3 8-7.6zM880 744h-48.1c-4.3 0-7.8 3.3-8 7.6-1.8 34.5-16.2 66.8-40.8 91.4-26.2 26.2-62 41-99.1 41-37.4 0-72.6-14.6-99.1-41-3.2-3.2-6.3-6.6-9.2-10.1l23.1-17.9c5.3-4.1 3.5-12.5-3-14.1l-93.3-22.5c-5-1.2-9.8 2.6-9.9 7.7l-0.6 95.4c0 6.7 7.6 10.5 12.9 6.4l20.3-15.8C562.6 918.4 619.9 948 684 948c109.9 0 199.6-86.9 204-195.7 0.2-4.5-3.5-8.3-8-8.3z","p-id":"4841",fill:"#2db7f5"})]})}function S(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4260",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M114.5856 951.04h298.24v-71.68H186.2656v-747.52h593.92v271.36h71.68v-343.04h-737.28v890.88z",fill:"#747690","p-id":"4261"}),(0,r.jsx)("path",{d:"M662.4256 311.04h-358.4v-71.68h358.4v71.68zM508.8256 490.24h-204.8v-71.68h204.8v71.68zM668.8256 554.24a168.96 168.96 0 1 0 0 337.92 168.96 168.96 0 0 0 0-337.92z m-240.64 168.96a240.64 240.64 0 1 1 481.28 0 240.64 240.64 0 0 1-481.28 0z",fill:"#747690","p-id":"4262"}),(0,r.jsx)("path",{d:"M629.76 588.8h71.68v131.4304l82.5856 41.3184-32.0512 64.1024-122.2144-61.0816V588.8z",fill:"#747690","p-id":"4263"})]})}function p(){return(0,r.jsx)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"9211",width:"1.5em",height:"1.5em",children:(0,r.jsx)("path",{d:"M151.5 586.2c-5-24.2-7.5-49.2-7.5-74.2s2.5-50 7.5-74.2c4.8-23.6 12-46.8 21.4-69 9.2-21.8 20.6-42.8 33.9-62.5 13.2-19.5 28.3-37.8 45-54.5s35-31.8 54.5-45c19.7-13.3 40.7-24.7 62.5-33.9 22.2-9.4 45.4-16.6 69-21.4 48.5-9.9 99.9-9.9 148.4 0 23.6 4.8 46.8 12 69 21.4 21.8 9.2 42.8 20.6 62.5 33.9 19.5 13.2 37.8 28.3 54.5 45 1.4 1.4 2.8 2.8 4.1 4.2H688c-17.7 0-32 14.3-32 32s14.3 32 32 32h160c17.7 0 32-14.3 32-32V128c0-17.7-14.3-32-32-32s-32 14.3-32 32v77.1c-19.2-19-40.1-36.2-62.4-51.3-23.1-15.6-47.8-29-73.4-39.8-26.1-11-53.4-19.5-81.1-25.2-56.9-11.6-117.1-11.6-174.1 0-27.8 5.7-55.1 14.2-81.1 25.2-25.6 10.8-50.3 24.2-73.4 39.8-22.9 15.4-44.4 33.2-63.9 52.7s-37.3 41-52.7 63.9c-15.6 23.1-29 47.8-39.8 73.4-11 26.1-19.5 53.4-25.2 81.1C83 453.4 80 482.7 80 512s3 58.6 8.8 87c3.1 15.2 16.4 25.6 31.3 25.6 2.1 0 4.3-0.2 6.4-0.7 17.4-3.5 28.5-20.4 25-37.7zM935.2 425c-3.5-17.3-20.5-28.5-37.8-24.9-17.3 3.5-28.5 20.5-24.9 37.8 5 24.2 7.5 49.2 7.5 74.2s-2.5 50-7.5 74.2c-4.8 23.6-12 46.8-21.4 69-9.2 21.8-20.6 42.8-33.9 62.5-13.2 19.5-28.3 37.8-45 54.5s-35 31.8-54.5 45C698 830.6 677 842 655.2 851.2c-22.2 9.4-45.4 16.6-69 21.4-48.5 9.9-99.9 9.9-148.4 0-23.6-4.8-46.8-12-69-21.4-21.8-9.2-42.8-20.6-62.5-33.9-19.5-13.2-37.8-28.3-54.5-45-1.4-1.4-2.8-2.8-4.1-4.2H336c17.7 0 32-14.3 32-32s-14.3-32-32-32H176c-17.7 0-32 14.3-32 32v160c0 17.7 14.3 32 32 32s32-14.3 32-32V819c19.2 19 40.1 36.2 62.4 51.3 23.1 15.6 47.8 29 73.4 39.8 26.1 11 53.4 19.5 81.1 25.2 28.5 5.8 57.7 8.8 87 8.8s58.6-3 87-8.8c27.8-5.7 55-14.2 81.1-25.2 25.6-10.8 50.3-24.2 73.4-39.8 22.9-15.5 44.4-33.2 63.9-52.7s37.3-41 52.7-63.9c15.6-23.1 29-47.8 39.8-73.4 11-26.1 19.5-53.4 25.2-81.1 5.8-28.5 8.8-57.7 8.8-87 0.2-29.5-2.8-58.8-8.6-87.2z",fill:"#1875F0","p-id":"9212"})})}function O(){return(0,r.jsxs)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3205",width:"1.5em",height:"1.5em",children:[(0,r.jsx)("path",{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zM296 400c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zM672 516c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216z m107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5z","p-id":"3206",fill:"#1afa29"}),(0,r.jsx)("path",{d:"M761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9c-1.5-2.1-3.9-3.3-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3 0.1-12.7-6.4-12.7z","p-id":"3207",fill:"#1afa29"}),(0,r.jsx)("path",{d:"M440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z","p-id":"3208",fill:"#1afa29"})]})}n(67294);var I=n(1051)},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 R},useSearchParams:function(){return A},usePathname:function(){return d},ServerInsertedHTMLContext:function(){return l.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return l.useServerInsertedHTML},useRouter:function(){return f},useParams:function(){return S},useSelectedLayoutSegments:function(){return p},useSelectedLayoutSegment:function(){return O},redirect:function(){return E.redirect},notFound:function(){return c.notFound}});let r=n(67294),o=n(27473),i=n(35802),a=n(32665),s=n(43512),l=n(98751),E=n(96885),c=n(86323),u=Symbol("internal for urlsearchparams readonly");function T(){return Error("ReadonlyURLSearchParams cannot be modified")}class R{[Symbol.iterator](){return this[u][Symbol.iterator]()}append(){throw T()}delete(){throw T()}set(){throw T()}sort(){throw T()}constructor(e){this[u]=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 A(){(0,a.clientHookInServerComponentError)("useSearchParams");let e=(0,r.useContext)(i.SearchParamsContext),t=(0,r.useMemo)(()=>e?new R(e):null,[e]);return t}function d(){return(0,a.clientHookInServerComponentError)("usePathname"),(0,r.useContext)(i.PathnameContext)}function f(){(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 S(){(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 p(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 l=i[0],E=(0,s.getSegmentValue)(l);return!E||E.startsWith("__PAGE__")?o:(o.push(E),e(i,n,!1,o))}(t,e)}function O(e){void 0===e&&(e="children"),(0,a.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=p(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 s},redirect:function(){return l},isRedirectError:function(){return E},getURLFromRedirectError:function(){return c},getRedirectTypeFromError:function(){return u}});let i=n(68214),a="NEXT_REDIRECT";function s(e,t){let n=Error(a);n.digest=a+";"+t+";"+e;let r=i.requestAsyncStorage.getStore();return r&&(n.mutableCookies=r.mutableCookies),n}function l(e,t){throw void 0===t&&(t="replace"),s(e,t)}function E(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 c(e){return E(e)?e.digest.split(";",3)[2]:null}function u(e){if(!E(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 s},ACTION_PREFETCH:function(){return l},ACTION_FAST_REFRESH:function(){return E},ACTION_SERVER_ACTION:function(){return c}});let o="refresh",i="navigate",a="restore",s="server-patch",l="prefetch",E="fast-refresh",c="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 p}});let r=n(38754),o=n(61757),i=o._(n(67294)),a=r._(n(68965)),s=n(38083),l=n(2478),E=n(76226);n(59941);let c=r._(n(31720)),u={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 T(e){return void 0!==e.default}function R(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 A(e,t,n,r,o,i,a){if(!e||e["data-loaded-src"]===t)return;e["data-loaded-src"]=t;let s="decode"in e?e.decode():Promise.resolve();s.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 d(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 f=(0,i.forwardRef)((e,t)=>{let{imgAttributes:n,heightInt:r,widthInt:o,qualityInt:a,className:s,imgStyle:l,blurStyle:E,isLazy:c,fetchPriority:u,fill:T,placeholder:R,loading:f,srcString:S,config:p,unoptimized:O,loader:I,onLoadRef:N,onLoadingCompleteRef:C,setBlurComplete:h,setShowAltText:m,onLoad:g,onError:_,...L}=e;return f=c?"lazy":f,i.default.createElement("img",{...L,...d(u),loading:f,width:o,height:r,decoding:"async","data-nimg":T?"fill":"1",className:s,style:{...l,...E},...n,ref:(0,i.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(_&&(e.src=e.src),e.complete&&A(e,S,R,N,C,h,O))},[S,R,N,C,h,_,O,t]),onLoad:e=>{let t=e.currentTarget;A(t,S,R,N,C,h,O)},onError:e=>{m(!0),"blur"===R&&h(!0),_&&_(e)}})}),S=(0,i.forwardRef)((e,t)=>{var n;let r,o,{src:A,sizes:S,unoptimized:p=!1,priority:O=!1,loading:I,className:N,quality:C,width:h,height:m,fill:g,style:_,onLoad:L,onLoadingComplete:v,placeholder:P="empty",blurDataURL:y,fetchPriority:b,layout:D,objectFit:M,objectPosition:U,lazyBoundary:x,lazyRoot:G,...F}=e,H=(0,i.useContext)(E.ImageConfigContext),B=(0,i.useMemo)(()=>{let e=u||H||l.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}},[H]),w=F.loader||c.default;delete F.loader;let $="__next_img_default"in w;if($){if("custom"===B.loader)throw Error('Image with src "'+A+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=w;w=t=>{let{config:n,...r}=t;return e(r)}}if(D){"fill"===D&&(g=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[D];e&&(_={..._,...e});let t={responsive:"100vw",fill:"100vw"}[D];t&&!S&&(S=t)}let Y="",V=R(h),k=R(m);if("object"==typeof(n=A)&&(T(n)||void 0!==n.src)){let e=T(A)?A.default:A;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,y=y||e.blurDataURL,Y=e.src,!g){if(V||k){if(V&&!k){let t=V/e.width;k=Math.round(e.height*t)}else if(!V&&k){let t=k/e.height;V=Math.round(e.width*t)}}else V=e.width,k=e.height}}let W=!O&&("lazy"===I||void 0===I);(!(A="string"==typeof A?A:Y)||A.startsWith("data:")||A.startsWith("blob:"))&&(p=!0,W=!1),B.unoptimized&&(p=!0),$&&A.endsWith(".svg")&&!B.dangerouslyAllowSVG&&(p=!0),O&&(b="high");let[Z,j]=(0,i.useState)(!1),[X,K]=(0,i.useState)(!1),z=R(C),J=Object.assign(g?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:M,objectPosition:U}:{},X?{}:{color:"transparent"},_),q="blur"===P&&y&&!Z?{backgroundSize:J.objectFit||"cover",backgroundPosition:J.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:'url("data:image/svg+xml;charset=utf-8,'+(0,s.getImageBlurSvg)({widthInt:V,heightInt:k,blurWidth:r,blurHeight:o,blurDataURL:y,objectFit:J.objectFit})+'")'}:{},Q=function(e){let{config:t,src:n,unoptimized:r,width:o,quality:i,sizes:a,loader:s}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:l,kind:E}=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),c=l.length-1;return{sizes:a||"w"!==E?a:"100vw",srcSet:l.map((e,r)=>s({config:t,src:n,quality:i,width:e})+" "+("w"===E?e:r+1)+E).join(", "),src:s({config:t,src:n,quality:i,width:l[c]})}}({config:B,src:A,unoptimized:p,width:V,quality:z,sizes:S,loader:w}),ee=A,et=(0,i.useRef)(L);(0,i.useEffect)(()=>{et.current=L},[L]);let en=(0,i.useRef)(v);(0,i.useEffect)(()=>{en.current=v},[v]);let er={isLazy:W,imgAttributes:Q,heightInt:k,widthInt:V,qualityInt:z,className:N,imgStyle:J,blurStyle:q,loading:I,config:B,fetchPriority:b,fill:g,unoptimized:p,placeholder:P,loader:w,srcString:ee,onLoadRef:et,onLoadingCompleteRef:en,setBlurComplete:j,setShowAltText:K,...F};return i.default.createElement(i.default.Fragment,null,i.default.createElement(f,{...er,ref:t}),O?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:F.crossOrigin,referrerPolicy:F.referrerPolicy,...d(b)})):null)}),p=S;("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 I}});let r=n(38754),o=r._(n(67294)),i=n(65722),a=n(65723),s=n(28904),l=n(95514),E=n(27521),c=n(44293),u=n(27473),T=n(81307),R=n(75476),A=n(66318),d=n(29382),f=new Set;function S(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(f.has(i))return;f.add(i)}let s=i?e.prefetch(t,o):e.prefetch(t,n,r);Promise.resolve(s).catch(e=>{})}function p(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}let O=o.default.forwardRef(function(e,t){let n,r;let{href:s,as:f,children:O,prefetch:I=null,passHref:N,replace:C,shallow:h,scroll:m,locale:g,onClick:_,onMouseEnter:L,onTouchStart:v,legacyBehavior:P=!1,...y}=e;n=O,P&&("string"==typeof n||"number"==typeof n)&&(n=o.default.createElement("a",null,n));let b=!1!==I,D=null===I?d.PrefetchKind.AUTO:d.PrefetchKind.FULL,M=o.default.useContext(c.RouterContext),U=o.default.useContext(u.AppRouterContext),x=null!=M?M:U,G=!M,{href:F,as:H}=o.default.useMemo(()=>{if(!M){let e=p(s);return{href:e,as:f?p(f):e}}let[e,t]=(0,i.resolveHref)(M,s,!0);return{href:e,as:f?(0,i.resolveHref)(M,f):t||e}},[M,s,f]),B=o.default.useRef(F),w=o.default.useRef(H);P&&(r=o.default.Children.only(n));let $=P?r&&"object"==typeof r&&r.ref:t,[Y,V,k]=(0,T.useIntersection)({rootMargin:"200px"}),W=o.default.useCallback(e=>{(w.current!==H||B.current!==F)&&(k(),w.current=H,B.current=F),Y(e),$&&("function"==typeof $?$(e):"object"==typeof $&&($.current=e))},[H,$,F,k,Y]);o.default.useEffect(()=>{x&&V&&b&&S(x,F,H,{locale:g},{kind:D},G)},[H,F,V,g,b,null==M?void 0:M.locale,x,G,D]);let Z={ref:W,onClick(e){P||"function"!=typeof _||_(e),P&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),x&&!e.defaultPrevented&&function(e,t,n,r,i,s,l,E,c,u){let{nodeName:T}=e.currentTarget,R="A"===T.toUpperCase();if(R&&(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)||!c&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let A=()=>{"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:s,locale:E,scroll:l}):t[i?"replace":"push"](r||n,{forceOptimisticNavigation:!u})};c?o.default.startTransition(A):A()}(e,x,F,H,C,h,m,g,G,b)},onMouseEnter(e){P||"function"!=typeof L||L(e),P&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),x&&(b||!G)&&S(x,F,H,{locale:g,priority:!0,bypassPrefetchedCheck:!0},{kind:D},G)},onTouchStart(e){P||"function"!=typeof v||v(e),P&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),x&&(b||!G)&&S(x,F,H,{locale:g,priority:!0,bypassPrefetchedCheck:!0},{kind:D},G)}};if((0,l.isAbsoluteUrl)(H))Z.href=H;else if(!P||N||"a"===r.type&&!("href"in r.props)){let e=void 0!==g?g:null==M?void 0:M.locale,t=(null==M?void 0:M.isLocaleDomain)&&(0,R.getDomainLocale)(H,e,null==M?void 0:M.locales,null==M?void 0:M.domainLocales);Z.href=t||(0,A.addBasePath)((0,E.addLocale)(H,e,null==M?void 0:M.defaultLocale))}return P?o.default.cloneElement(r,Z):o.default.createElement("a",{...y,...Z},n)}),I=O;("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 l}});let r=n(67294),o=n(82997),i="function"==typeof IntersectionObserver,a=new Map,s=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,E=l||!i,[c,u]=(0,r.useState)(!1),T=(0,r.useRef)(null),R=(0,r.useCallback)(e=>{T.current=e},[]);(0,r.useEffect)(()=>{if(i){if(E||c)return;let e=T.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=s.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},s.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=s.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&s.splice(e,1)}}}(e,e=>e&&u(e),{root:null==t?void 0:t.current,rootMargin:n});return r}}else if(!c){let e=(0,o.requestIdleCallback)(()=>u(!0));return()=>(0,o.cancelIdleCallback)(e)}},[E,n,t,c,T.current]);let A=(0,r.useCallback)(()=>{u(!1)},[]);return[R,c,A]}("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,s=r||t,l=o||n,E=i.startsWith("data:image/jpeg")?"%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='1 1'/%3E%3C/feComponentTransfer%3E%":"";return s&&l?"%3Csvg xmlns='http%3A//www.w3.org/2000/svg' viewBox='0 0 "+s+" "+l+"'%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='"+(r&&o?"1":"20")+"'/%3E"+E+"%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)}},86221:function(e,t,n){"use strict";let r,o;n.r(t),n.d(t,{default:function(){return e$}});var i=n(85893),a=n(67294),s=n(41468),l=n(89182),E=n(62418),c=n(82353),u=n(87462),T={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"},R=n(84089),A=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:T}))}),d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M752 100c-61.8 0-112 50.2-112 112 0 47.7 29.9 88.5 72 104.6v27.6L512 601.4 312 344.2v-27.6c42.1-16.1 72-56.9 72-104.6 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 50.6 33.8 93.5 80 107.3v34.4c0 9.7 3.3 19.3 9.3 27L476 672.3v33.6c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-33.6l226.7-291.6c6-7.7 9.3-17.3 9.3-27v-34.4c46.2-13.8 80-56.7 80-107.3 0-61.8-50.2-112-112-112zM224 212a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm336 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm192-552a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"fork",theme:"outlined"},f=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:d}))}),S=n(16165),p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M301.3 496.7c-23.8 0-40.2-10.5-41.6-26.9H205c.9 43.4 36.9 70.3 93.9 70.3 59.1 0 95-28.4 95-75.5 0-35.8-20-55.9-64.5-64.5l-29.1-5.6c-23.8-4.7-33.8-11.9-33.8-24.2 0-15 13.3-24.5 33.4-24.5 20.1 0 35.3 11.1 36.6 27h53c-.9-41.7-37.5-70.3-90.3-70.3-54.4 0-89.7 28.9-89.7 73 0 35.5 21.2 58 62.5 65.8l29.7 5.9c25.8 5.2 35.6 11.9 35.6 24.4.1 14.7-14.5 25.1-36 25.1z"}},{tag:"path",attrs:{d:"M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"}},{tag:"path",attrs:{d:"M828.5 486.7h-95.8V308.5h-57.4V534h153.2zm-298.6 53.4c14.1 0 27.2-2 39.1-5.8l13.3 20.3h53.3L607.9 511c21.1-20 33-51.1 33-89.8 0-73.3-43.3-118.8-110.9-118.8s-111.2 45.3-111.2 118.8c-.1 73.7 43 118.9 111.1 118.9zm0-190c31.6 0 52.7 27.7 52.7 71.1 0 16.7-3.6 30.6-10 40.5l-5.2-6.9h-48.8L542 491c-3.9.9-8 1.4-12.2 1.4-31.7 0-52.8-27.5-52.8-71.2.1-43.6 21.2-71.1 52.9-71.1z"}}]},name:"console-sql",theme:"outlined"},O=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:p}))}),I={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M640.6 429.8h257.1c7.9 0 14.3-6.4 14.3-14.3V158.3c0-7.9-6.4-14.3-14.3-14.3H640.6c-7.9 0-14.3 6.4-14.3 14.3v92.9H490.6c-3.9 0-7.1 3.2-7.1 7.1v221.5h-85.7v-96.5c0-7.9-6.4-14.3-14.3-14.3H126.3c-7.9 0-14.3 6.4-14.3 14.3v257.2c0 7.9 6.4 14.3 14.3 14.3h257.1c7.9 0 14.3-6.4 14.3-14.3V544h85.7v221.5c0 3.9 3.2 7.1 7.1 7.1h135.7v92.9c0 7.9 6.4 14.3 14.3 14.3h257.1c7.9 0 14.3-6.4 14.3-14.3v-257c0-7.9-6.4-14.3-14.3-14.3h-257c-7.9 0-14.3 6.4-14.3 14.3v100h-78.6v-393h78.6v100c0 7.9 6.4 14.3 14.3 14.3zm53.5-217.9h150V362h-150V211.9zM329.9 587h-150V437h150v150zm364.2 75.1h150v150.1h-150V662.1z"}}]},name:"partition",theme:"outlined"},N=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:I}))}),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z"}}]},name:"build",theme:"outlined"},h=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:C}))}),m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},g=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:m}))}),_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"},L=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:_}))}),v={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 000 13.8z"}}]},name:"menu-fold",theme:"outlined"},P=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:v}))}),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 000-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0014.4 7z"}}]},name:"menu-unfold",theme:"outlined"},b=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:y}))}),D=n(24969),M={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"},U=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:M}))}),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},G=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:x}))}),F={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M752 664c-28.5 0-54.8 10-75.4 26.7L469.4 540.8a160.68 160.68 0 000-57.6l207.2-149.9C697.2 350 723.5 360 752 360c66.2 0 120-53.8 120-120s-53.8-120-120-120-120 53.8-120 120c0 11.6 1.6 22.7 4.7 33.3L439.9 415.8C410.7 377.1 364.3 352 312 352c-88.4 0-160 71.6-160 160s71.6 160 160 160c52.3 0 98.7-25.1 127.9-63.8l196.8 142.5c-3.1 10.6-4.7 21.8-4.7 33.3 0 66.2 53.8 120 120 120s120-53.8 120-120-53.8-120-120-120zm0-476c28.7 0 52 23.3 52 52s-23.3 52-52 52-52-23.3-52-52 23.3-52 52-52zM312 600c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88zm440 236c-28.7 0-52-23.3-52-52s23.3-52 52-52 52 23.3 52 52-23.3 52-52 52z"}}]},name:"share-alt",theme:"outlined"},H=a.forwardRef(function(e,t){return a.createElement(R.Z,(0,u.Z)({},e,{ref:t,icon:F}))}),B=n(48689),w=n(36147),$=n(2453),Y=n(83062),V=n(85418),k=n(20640),W=n.n(k),Z=n(25675),j=n.n(Z),X=n(41664),K=n.n(X),z=n(11163),J=n.n(z),q=n(67421);function Q(e){return"flex items-center h-10 hover:bg-[#F1F5F9] dark:hover:bg-theme-dark text-base w-full transition-colors whitespace-nowrap px-4 ".concat(e?"bg-[#F1F5F9] dark:bg-theme-dark":"")}function ee(e){return"flex items-center justify-center mx-auto rounded w-14 h-14 text-xl hover:bg-[#F1F5F9] dark:hover:bg-theme-dark transition-colors cursor-pointer ".concat(e?"bg-[#F1F5F9] dark:bg-theme-dark":"")}var et=function(){let{chatId:e,scene:t,isMenuExpand:n,dialogueList:r,queryDialogueList:o,refreshDialogList:u,setIsMenuExpand:T,setAgent:R,mode:d,setMode:p}=(0,a.useContext)(s.p),{pathname:I,replace:C}=(0,z.useRouter)(),{t:m,i18n:_}=(0,q.$G)(),[v,y]=(0,a.useState)("/LOGO_1.png"),M=(0,a.useMemo)(()=>{let e=[{key:"app",name:m("App"),path:"/app",icon:(0,i.jsx)(A,{})},{key:"flow",name:m("awel_flow"),icon:(0,i.jsx)(f,{}),path:"/flow"},{key:"models",name:m("model_manage"),path:"/models",icon:(0,i.jsx)(S.Z,{component:c.IN})},{key:"database",name:m("Database"),icon:(0,i.jsx)(O,{}),path:"/database"},{key:"knowledge",name:m("Knowledge_Space"),icon:(0,i.jsx)(N,{}),path:"/knowledge"},{key:"agent",name:m("Plugins"),path:"/agent",icon:(0,i.jsx)(h,{})},{key:"prompt",name:m("Prompt"),icon:(0,i.jsx)(g,{}),path:"/prompt"}];return e},[_.language]),x=()=>{T(!n)},F=(0,a.useCallback)(()=>{let e="light"===d?"dark":"light";p(e),localStorage.setItem(E.he,e)},[d]),k=(0,a.useCallback)(()=>{let e="en"===_.language?"zh":"en";_.changeLanguage(e),localStorage.setItem(E.Yl,e)},[_.language,_.changeLanguage]),Z=(0,a.useMemo)(()=>{let e=[{key:"theme",name:m("Theme"),icon:"dark"===d?(0,i.jsx)(S.Z,{component:c.FD}):(0,i.jsx)(S.Z,{component:c.ol}),onClick:F},{key:"language",name:m("language"),icon:(0,i.jsx)(L,{}),onClick:k},{key:"fold",name:m(n?"Close_Sidebar":"Show_Sidebar"),icon:n?(0,i.jsx)(P,{}):(0,i.jsx)(b,{}),onClick:x,noDropdownItem:!0}];return e},[d,k,x,k]),X=(0,a.useMemo)(()=>M.map(e=>({key:e.key,label:(0,i.jsxs)(K(),{href:e.path,className:"text-base",children:[e.icon,(0,i.jsx)("span",{className:"ml-2 text-sm",children:e.name})]})})),[M]),J=(0,a.useMemo)(()=>Z.filter(e=>!e.noDropdownItem).map(e=>({key:e.key,label:(0,i.jsxs)("div",{className:"text-base",onClick:e.onClick,children:[e.icon,(0,i.jsx)("span",{className:"ml-2 text-sm",children:e.name})]})})),[Z]),et=(0,a.useCallback)(n=>{w.default.confirm({title:"Delete Chat",content:"Are you sure delete this chat?",width:"276px",centered:!0,onOk:()=>new Promise(async(r,o)=>{try{let[i]=await (0,l.Vx)((0,l.MX)(n.conv_uid));if(i){o();return}$.ZP.success("success"),u(),n.chat_mode===t&&n.conv_uid===e&&C("/"),r()}catch(e){o()}})})},[u]),en=e=>{"chat_agent"===e.chat_mode&&e.select_param&&(null==R||R(e.select_param))},er=(0,a.useCallback)(e=>{let t=W()("".concat(location.origin,"/chat?scene=").concat(e.chat_mode,"&id=").concat(e.conv_uid));$.ZP[t?"success":"error"](t?"Copy success":"Copy failed")},[]);return((0,a.useEffect)(()=>{o()},[]),(0,a.useEffect)(()=>{y("dark"===d?"/WHITE_LOGO.png":"/LOGO_1.png")},[d]),n)?(0,i.jsxs)("div",{className:"flex flex-col h-screen bg-white dark:bg-[#232734]",children:[(0,i.jsx)(K(),{href:"/",className:"p-2",children:(0,i.jsx)(j(),{src:v,alt:"DB-GPT",width:239,height:60,className:"w-full h-full"})}),(0,i.jsxs)(K(),{href:"/",className:"flex items-center justify-center mb-4 mx-4 h-11 bg-theme-primary rounded text-white",children:[(0,i.jsx)(D.Z,{className:"mr-2"}),(0,i.jsx)("span",{children:m("new_chat")})]}),(0,i.jsx)("div",{className:"flex-1 overflow-y-scroll",children:null==r?void 0:r.map(n=>{let r=n.conv_uid===e&&n.chat_mode===t;return(0,i.jsxs)(K(),{href:"/chat?scene=".concat(n.chat_mode,"&id=").concat(n.conv_uid),className:"group/item ".concat(Q(r)),onClick:()=>{en(n)},children:[(0,i.jsx)(g,{className:"text-base"}),(0,i.jsx)("div",{className:"flex-1 line-clamp-1 mx-2 text-sm",children:n.user_name||n.user_input}),(0,i.jsx)("div",{className:"group-hover/item:opacity-100 cursor-pointer opacity-0 mr-1",onClick:e=>{e.preventDefault(),er(n)},children:(0,i.jsx)(H,{})}),(0,i.jsx)("div",{className:"group-hover/item:opacity-100 cursor-pointer opacity-0",onClick:e=>{e.preventDefault(),et(n)},children:(0,i.jsx)(B.Z,{})})]},n.conv_uid)})}),(0,i.jsxs)("div",{className:"pt-4",children:[(0,i.jsx)("div",{className:"max-h-52 overflow-y-auto scrollbar-default",children:M.map(e=>(0,i.jsx)(K(),{href:e.path,className:"".concat(Q(I===e.path)," overflow-hidden"),children:(0,i.jsxs)(i.Fragment,{children:[e.icon,(0,i.jsx)("span",{className:"ml-3 text-sm",children:e.name})]})},e.key))}),(0,i.jsx)("div",{className:"flex items-center justify-around py-4 mt-2",children:Z.map(e=>(0,i.jsx)(Y.Z,{title:e.name,children:(0,i.jsx)("div",{className:"flex-1 flex items-center justify-center cursor-pointer text-xl",onClick:e.onClick,children:e.icon})},e.key))})]})]}):(0,i.jsxs)("div",{className:"flex flex-col justify-between h-screen bg-white dark:bg-[#232734] animate-fade animate-duration-300",children:[(0,i.jsx)(K(),{href:"/",className:"px-2 py-3",children:(0,i.jsx)(j(),{src:"/LOGO_SMALL.png",alt:"DB-GPT",width:63,height:46,className:"w-[63px] h-[46px]"})}),(0,i.jsx)("div",{children:(0,i.jsx)(K(),{href:"/",className:"flex items-center justify-center my-4 mx-auto w-12 h-12 bg-theme-primary rounded-full text-white",children:(0,i.jsx)(D.Z,{className:"text-lg"})})}),(0,i.jsx)("div",{className:"flex-1 overflow-y-scroll py-4 space-y-2",children:null==r?void 0:r.map(n=>{let r=n.conv_uid===e&&n.chat_mode===t;return(0,i.jsx)(Y.Z,{title:n.user_name||n.user_input,placement:"right",children:(0,i.jsx)(K(),{href:"/chat?scene=".concat(n.chat_mode,"&id=").concat(n.conv_uid),className:ee(r),onClick:()=>{en(n)},children:(0,i.jsx)(g,{})})},n.conv_uid)})}),(0,i.jsxs)("div",{className:"py-4",children:[(0,i.jsx)(V.Z,{menu:{items:X},placement:"topRight",children:(0,i.jsx)("div",{className:ee(),children:(0,i.jsx)(U,{})})}),(0,i.jsx)(V.Z,{menu:{items:J},placement:"topRight",children:(0,i.jsx)("div",{className:ee(),children:(0,i.jsx)(G,{})})}),Z.filter(e=>e.noDropdownItem).map(e=>(0,i.jsx)(Y.Z,{title:e.name,placement:"right",children:(0,i.jsx)("div",{className:ee(),onClick:e.onClick,children:e.icon})},e.key))]})]})},en=n(74865),er=n.n(en);let eo=0;function ei(){"loading"!==o&&(o="loading",r=setTimeout(function(){er().start()},250))}function ea(){eo>0||(o="stop",clearTimeout(r),er().done())}if(J().events.on("routeChangeStart",ei),J().events.on("routeChangeComplete",ea),J().events.on("routeChangeError",ea),"function"==typeof(null==window?void 0:window.fetch)){let e=window.fetch;window.fetch=async function(){for(var t=arguments.length,n=Array(t),r=0;rt(null==e||0===Object.keys(e).length?n:e):t;return(0,i.jsx)(eS.xB,{styles:r})}var eO=n(56760),eI=n(71927);let eN="mode",eC="color-scheme",eh="data-color-scheme";function em(e){if("undefined"!=typeof window&&"system"===e){let e=window.matchMedia("(prefers-color-scheme: dark)");return e.matches?"dark":"light"}}function eg(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_(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 eL=["colorSchemes","components","generateCssVars","cssVarPrefix"];var ev=n(1812),eP=n(13951),ey=n(2548);let{CssVarsProvider:eb,useColorScheme:eD,getInitColorSchemeScript:eM}=function(e){let{themeId:t,theme:n={},attribute:r=eh,modeStorageKey:o=eN,colorSchemeStorageKey:s=eC,defaultMode:l="light",defaultColorScheme:E,disableTransitionOnChange:c=!1,resolveTheme:T,excludeVariablesFromRoot:R}=e;n.colorSchemes&&("string"!=typeof E||n.colorSchemes[E])&&("object"!=typeof E||n.colorSchemes[null==E?void 0:E.light])&&("object"!=typeof E||n.colorSchemes[null==E?void 0:E.dark])||console.error(`MUI: \`${E}\` does not exist in \`theme.colorSchemes\`.`);let A=a.createContext(void 0),d="string"==typeof E?E:E.light,f="string"==typeof E?E:E.dark;return{CssVarsProvider:function({children:e,theme:d=n,modeStorageKey:f=o,colorSchemeStorageKey:S=s,attribute:p=r,defaultMode:O=l,defaultColorScheme:I=E,disableTransitionOnChange:N=c,storageWindow:C="undefined"==typeof window?void 0:window,documentNode:h="undefined"==typeof document?void 0:document,colorSchemeNode:m="undefined"==typeof document?void 0:document.documentElement,colorSchemeSelector:g=":root",disableNestedContext:_=!1,disableStyleSheetGeneration:L=!1}){let v=a.useRef(!1),P=(0,eO.Z)(),y=a.useContext(A),b=!!y&&!_,D=d[t],M=D||d,{colorSchemes:U={},components:x={},generateCssVars:G=()=>({vars:{},css:{}}),cssVarPrefix:F}=M,H=(0,ed.Z)(M,eL),B=Object.keys(U),w="string"==typeof I?I:I.light,$="string"==typeof I?I:I.dark,{mode:Y,setMode:V,systemMode:k,lightColorScheme:W,darkColorScheme:Z,colorScheme:j,setColorScheme:X}=function(e){let{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=eN,colorSchemeStorageKey:s=eC,storageWindow:l="undefined"==typeof window?void 0:window}=e,E=o.join(","),[c,T]=a.useState(()=>{let e=e_(i,t),o=e_(`${s}-light`,n),a=e_(`${s}-dark`,r);return{mode:e,systemMode:em(e),lightColorScheme:o,darkColorScheme:a}}),R=eg(c,e=>"light"===e?c.lightColorScheme:"dark"===e?c.darkColorScheme:void 0),A=a.useCallback(e=>{T(n=>{if(e===n.mode)return n;let r=e||t;try{localStorage.setItem(i,r)}catch(e){}return(0,u.Z)({},n,{mode:r,systemMode:em(r)})})},[i,t]),d=a.useCallback(e=>{e?"string"==typeof e?e&&!E.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):T(t=>{let n=(0,u.Z)({},t);return eg(t,t=>{try{localStorage.setItem(`${s}-${t}`,e)}catch(e){}"light"===t&&(n.lightColorScheme=e),"dark"===t&&(n.darkColorScheme=e)}),n}):T(t=>{let o=(0,u.Z)({},t),i=null===e.light?n:e.light,a=null===e.dark?r:e.dark;if(i){if(E.includes(i)){o.lightColorScheme=i;try{localStorage.setItem(`${s}-light`,i)}catch(e){}}else console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)}if(a){if(E.includes(a)){o.darkColorScheme=a;try{localStorage.setItem(`${s}-dark`,a)}catch(e){}}else console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)}return o}):T(e=>{try{localStorage.setItem(`${s}-light`,n),localStorage.setItem(`${s}-dark`,r)}catch(e){}return(0,u.Z)({},e,{lightColorScheme:n,darkColorScheme:r})})},[E,s,n,r]),f=a.useCallback(e=>{"system"===c.mode&&T(t=>(0,u.Z)({},t,{systemMode:null!=e&&e.matches?"dark":"light"}))},[c.mode]),S=a.useRef(f);return S.current=f,a.useEffect(()=>{let e=(...e)=>S.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(s)&&(!n||E.match(n))&&(e.key.endsWith("light")&&d({light:n}),e.key.endsWith("dark")&&d({dark:n})),e.key===i&&(!n||["light","dark","system"].includes(n))&&A(n||t)};if(l)return l.addEventListener("storage",e),()=>l.removeEventListener("storage",e)},[d,A,i,s,E,t,l]),(0,u.Z)({},c,{colorScheme:R,setMode:A,setColorScheme:d})}({supportedColorSchemes:B,defaultLightColorScheme:w,defaultDarkColorScheme:$,modeStorageKey:f,colorSchemeStorageKey:S,defaultMode:O,storageWindow:C}),K=Y,z=j;b&&(K=y.mode,z=y.colorScheme);let J=K||("system"===O?l:O),q=z||("dark"===J?$:w),{css:Q,vars:ee}=G(),et=(0,u.Z)({},H,{components:x,colorSchemes:U,cssVarPrefix:F,vars:ee,getColorSchemeSelector:e=>`[${p}="${e}"] &`}),en={},er={};Object.entries(U).forEach(([e,t])=>{let{css:n,vars:r}=G(e);et.vars=(0,eA.Z)(et.vars,r),e===q&&(Object.keys(t).forEach(e=>{t[e]&&"object"==typeof t[e]?et[e]=(0,u.Z)({},et[e],t[e]):et[e]=t[e]}),et.palette&&(et.palette.colorScheme=e));let o="string"==typeof I?I:"dark"===O?I.dark:I.light;if(e===o){if(R){let t={};R(F).forEach(e=>{t[e]=n[e],delete n[e]}),en[`[${p}="${e}"]`]=t}en[`${g}, [${p}="${e}"]`]=n}else er[`${":root"===g?"":g}[${p}="${e}"]`]=n}),et.vars=(0,eA.Z)(et.vars,ee),a.useEffect(()=>{z&&m&&m.setAttribute(p,z)},[z,p,m]),a.useEffect(()=>{let e;if(N&&v.current&&h){let t=h.createElement("style");t.appendChild(h.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),h.head.appendChild(t),window.getComputedStyle(h.body),e=setTimeout(()=>{h.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[z,N,h]),a.useEffect(()=>(v.current=!0,()=>{v.current=!1}),[]);let eo=a.useMemo(()=>({mode:K,systemMode:k,setMode:V,lightColorScheme:W,darkColorScheme:Z,colorScheme:z,setColorScheme:X,allColorSchemes:B}),[B,z,Z,W,K,X,V,k]),ei=!0;(L||b&&(null==P?void 0:P.cssVarPrefix)===F)&&(ei=!1);let ea=(0,i.jsxs)(a.Fragment,{children:[ei&&(0,i.jsxs)(a.Fragment,{children:[(0,i.jsx)(ep,{styles:{[g]:Q}}),(0,i.jsx)(ep,{styles:en}),(0,i.jsx)(ep,{styles:er})]}),(0,i.jsx)(eI.Z,{themeId:D?t:void 0,theme:T?T(et):et,children:e})]});return b?ea:(0,i.jsx)(A.Provider,{value:eo,children:ea})},useColorScheme:()=>{let e=a.useContext(A);if(!e)throw Error((0,ef.Z)(19));return e},getInitColorSchemeScript:e=>(function(e){let{defaultMode:t="light",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=eN,colorSchemeStorageKey:a=eC,attribute:s=eh,colorSchemeNode:l="document.documentElement"}=e||{};return(0,i.jsx)("script",{dangerouslySetInnerHTML:{__html:`(function() { try { var mode = localStorage.getItem('${o}') || '${t}'; var cssColorScheme = mode; var colorScheme = ''; @@ -158,7 +158,7 @@ if (colorScheme) { ${l}.setAttribute('${s}', colorScheme); } - } catch (e) {} })();`}},"mui-color-scheme-init")})((0,u.Z)({attribute:r,colorSchemeStorageKey:s,defaultMode:l,defaultLightColorScheme:d,defaultDarkColorScheme:f,modeStorageKey:o},e))}}({themeId:ey.Z,theme:ev.Z,attribute:"data-joy-color-scheme",modeStorageKey:"joy-mode",colorSchemeStorageKey:"joy-color-scheme",defaultColorScheme:{light:"light",dark:"dark"},resolveTheme:e=>{let t=e.colorInversion;return e.colorInversion=(0,eA.Z)({soft:(0,eP.pP)(e),solid:(0,eP.Lo)(e)},"function"==typeof t?t(e):t,{clone:!1}),e}});var eU=n(38629),ex=n(59077),eG=n(9818);let eF=(0,ex.Z)({colorSchemes:{light:{palette:{mode:"dark",primary:{...eG.Z.grey,solidBg:"#e6f4ff",solidColor:"#1677ff",solidHoverBg:"#e6f4ff"},neutral:{plainColor:"#4d4d4d",plainHoverColor:"#131318",plainHoverBg:"#EBEBEF",plainActiveBg:"#D8D8DF",plainDisabledColor:"#B9B9C6"},background:{body:"#F7F7F7",surface:"#fff"},text:{primary:"#505050"}}},dark:{palette:{mode:"light",primary:{...eG.Z.grey,softBg:"#353539",softHoverBg:"#35353978",softDisabledBg:"#353539",solidBg:"#51525beb",solidHoverBg:"#51525beb"},neutral:{plainColor:"#D8D8DF",plainHoverColor:"#F7F7F8",plainHoverBg:"#353539",plainActiveBg:"#434356",plainDisabledColor:"#434356",outlinedBorder:"#353539",outlinedHoverBorder:"#454651"},text:{primary:"#FDFDFC"},background:{body:"#151622",surface:"#51525beb"}}}},fontFamily:{body:"Josefin Sans, sans-serif",display:"Josefin Sans, sans-serif"},zIndex:{modal:1001}}),eH=(e,t)=>({...ec.default.darkAlgorithm(e,t),colorBgBase:"#232734",colorBorder:"#828282",colorBgContainer:"#232734"});function eB(e){let{children:t}=e,{mode:n}=(0,a.useContext)(s.p),{i18n:r}=(0,q.$G)(),{setMode:o}=eD();return(0,a.useEffect)(()=>{o(n)},[n]),(0,a.useEffect)(()=>{if(n){var e,t,r,o,i,a;null===(e=document.body)||void 0===e||null===(t=e.classList)||void 0===t||t.add(n),"light"===n?null===(r=document.body)||void 0===r||null===(o=r.classList)||void 0===o||o.remove("dark"):null===(i=document.body)||void 0===i||null===(a=i.classList)||void 0===a||a.remove("light")}},[n]),(0,a.useEffect)(()=>{r.changeLanguage&&r.changeLanguage(window.localStorage.getItem(E.Yl)||"en")},[r]),(0,i.jsxs)("div",{children:[(0,i.jsx)(es,{}),t]})}function ew(e){let{children:t}=e,{isMenuExpand:n,mode:r}=(0,a.useContext)(s.p),{i18n:o}=(0,q.$G)();return(0,i.jsx)(eu.ZP,{locale:"en"===o.language?eR.Z:eT.Z,theme:{token:{colorPrimary:"#0069FE",borderRadius:4},algorithm:"dark"===r?eH:void 0},children:(0,i.jsxs)("div",{className:"flex w-screen h-screen overflow-hidden",children:[(0,i.jsx)("div",{className:eE()("transition-[width]",n?"w-60":"w-20","hidden","md:block"),children:(0,i.jsx)(et,{})}),(0,i.jsx)("div",{className:"flex flex-col flex-1 relative overflow-hidden",children:t})]})})}var e$=function(e){let{Component:t,pageProps:n}=e;return(0,i.jsx)(s.R,{children:(0,i.jsx)(eU.Z,{theme:eF,children:(0,i.jsx)(eb,{theme:eF,defaultMode:"light",children:(0,i.jsx)(eB,{children:(0,i.jsx)(ew,{children:(0,i.jsx)(t,{...n})})})})})})}},19284:function(e,t,n){"use strict";n.d(t,{H:function(){return r},S:function(){return o}});let r={proxyllm:{label:"Proxy LLM",icon:"/models/chatgpt.png"},"flan-t5-base":{label:"flan-t5-base",icon:"/models/google.png"},"vicuna-13b":{label:"vicuna-13b",icon:"/models/vicuna.jpeg"},"vicuna-7b":{label:"vicuna-7b",icon:"/models/vicuna.jpeg"},"vicuna-13b-v1.5":{label:"vicuna-13b-v1.5",icon:"/models/vicuna.jpeg"},"vicuna-7b-v1.5":{label:"vicuna-7b-v1.5",icon:"/models/vicuna.jpeg"},"codegen2-1b":{label:"codegen2-1B",icon:"/models/vicuna.jpeg"},"codet5p-2b":{label:"codet5p-2b",icon:"/models/vicuna.jpeg"},"chatglm-6b-int4":{label:"chatglm-6b-int4",icon:"/models/chatglm.png"},"chatglm-6b":{label:"chatglm-6b",icon:"/models/chatglm.png"},"chatglm2-6b":{label:"chatglm2-6b",icon:"/models/chatglm.png"},"chatglm2-6b-int4":{label:"chatglm2-6b-int4",icon:"/models/chatglm.png"},"guanaco-33b-merged":{label:"guanaco-33b-merged",icon:"/models/huggingface.svg"},"falcon-40b":{label:"falcon-40b",icon:"/models/falcon.jpeg"},"gorilla-7b":{label:"gorilla-7b",icon:"/models/gorilla.png"},"gptj-6b":{label:"ggml-gpt4all-j-v1.3-groovy.bin",icon:""},chatgpt_proxyllm:{label:"chatgpt_proxyllm",icon:"/models/chatgpt.png"},bard_proxyllm:{label:"bard_proxyllm",icon:"/models/bard.gif"},claude_proxyllm:{label:"claude_proxyllm",icon:"/models/claude.png"},wenxin_proxyllm:{label:"wenxin_proxyllm",icon:""},tongyi_proxyllm:{label:"tongyi_proxyllm",icon:"/models/qwen2.png"},zhipu_proxyllm:{label:"zhipu_proxyllm",icon:"/models/zhipu.png"},yi_proxyllm:{label:"yi_proxyllm",icon:"/models/yi.svg"},"yi-34b-chat":{label:"yi-34b-chat",icon:"/models/yi.svg"},"yi-34b-chat-8bits":{label:"yi-34b-chat-8bits",icon:"/models/yi.svg"},"yi-34b-chat-4bits":{label:"yi-34b-chat-4bits",icon:"/models/yi.svg"},"yi-6b-chat":{label:"yi-6b-chat",icon:"/models/yi.svg"},"llama-2-7b":{label:"Llama-2-7b-chat-hf",icon:"/models/llama.jpg"},"llama-2-13b":{label:"Llama-2-13b-chat-hf",icon:"/models/llama.jpg"},"llama-2-70b":{label:"Llama-2-70b-chat-hf",icon:"/models/llama.jpg"},"baichuan-13b":{label:"Baichuan-13B-Chat",icon:"/models/baichuan.png"},"baichuan-7b":{label:"baichuan-7b",icon:"/models/baichuan.png"},"baichuan2-7b":{label:"Baichuan2-7B-Chat",icon:"/models/baichuan.png"},"baichuan2-13b":{label:"Baichuan2-13B-Chat",icon:"/models/baichuan.png"},"wizardlm-13b":{label:"WizardLM-13B-V1.2",icon:"/models/wizardlm.png"},"llama-cpp":{label:"ggml-model-q4_0.bin",icon:"/models/huggingface.svg"},"internlm-7b":{label:"internlm-chat-7b-v1_1",icon:"/models/internlm.png"},"internlm-7b-8k":{label:"internlm-chat-7b-8k",icon:"/models/internlm.png"},"solar-10.7b-instruct-v1.0":{label:"solar-10.7b-instruct-v1.0",icon:"/models/solar_logo.png"}},o={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."},doris:{label:"ApacheDoris",icon:"/icons/doris.png",desc:"A new-generation open-source real-time data warehouse."},starrocks:{label:"StarRocks",icon:"/icons/starrocks.png",desc:"An Open-Source, High-Performance Analytical Database."},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."},vertica:{label:"Vertica",icon:"/icons/vertica.png",desc:"Vertica is a strongly consistent, ACID-compliant, SQL data warehouse, built for the scale and complexity of today’s data-driven world."},spark:{label:"Spark",icon:"/icons/spark.png",desc:"Unified engine for large-scale data analytics."},hive:{label:"Hive",icon:"/icons/hive.png",desc:"A distributed fault-tolerant data warehouse system."},space:{label:"Space",icon:"/icons/knowledge.png",desc:"knowledge analytics."},tugraph:{label:"TuGraph",icon:"/icons/tugraph.png",desc:"TuGraph is a high-performance graph database jointly developed by Ant Group and Tsinghua University."}}},62418:function(e,t,n){"use strict";let r,o,i;n.d(t,{zN:function(){return rr},Hf:function(){return n9.H},rU:function(){return rn},Yl:function(){return rt},he:function(){return re},S$:function(){return n9.S},_m:function(){return ro},a_:function(){return n7}});var a,s,l,E={};n.r(E),n.d(E,{bigquery:function(){return H},db2:function(){return X},hive:function(){return er},mariadb:function(){return eT},mysql:function(){return eN},n1ql:function(){return ey},plsql:function(){return eB},postgresql:function(){return eX},redshift:function(){return e4},singlestoredb:function(){return tj},snowflake:function(){return t2},spark:function(){return tn},sql:function(){return tI},sqlite:function(){return tu},transactsql:function(){return tH},trino:function(){return tP}}),(a=r||(r={})).QUOTED_IDENTIFIER="QUOTED_IDENTIFIER",a.IDENTIFIER="IDENTIFIER",a.STRING="STRING",a.VARIABLE="VARIABLE",a.RESERVED_KEYWORD="RESERVED_KEYWORD",a.RESERVED_FUNCTION_NAME="RESERVED_FUNCTION_NAME",a.RESERVED_PHRASE="RESERVED_PHRASE",a.RESERVED_SET_OPERATION="RESERVED_SET_OPERATION",a.RESERVED_CLAUSE="RESERVED_CLAUSE",a.RESERVED_SELECT="RESERVED_SELECT",a.RESERVED_JOIN="RESERVED_JOIN",a.ARRAY_IDENTIFIER="ARRAY_IDENTIFIER",a.ARRAY_KEYWORD="ARRAY_KEYWORD",a.CASE="CASE",a.END="END",a.WHEN="WHEN",a.ELSE="ELSE",a.THEN="THEN",a.LIMIT="LIMIT",a.BETWEEN="BETWEEN",a.AND="AND",a.OR="OR",a.XOR="XOR",a.OPERATOR="OPERATOR",a.COMMA="COMMA",a.ASTERISK="ASTERISK",a.DOT="DOT",a.OPEN_PAREN="OPEN_PAREN",a.CLOSE_PAREN="CLOSE_PAREN",a.LINE_COMMENT="LINE_COMMENT",a.BLOCK_COMMENT="BLOCK_COMMENT",a.NUMBER="NUMBER",a.NAMED_PARAMETER="NAMED_PARAMETER",a.QUOTED_PARAMETER="QUOTED_PARAMETER",a.NUMBERED_PARAMETER="NUMBERED_PARAMETER",a.POSITIONAL_PARAMETER="POSITIONAL_PARAMETER",a.CUSTOM_PARAMETER="CUSTOM_PARAMETER",a.DELIMITER="DELIMITER",a.EOF="EOF";let c=e=>({type:r.EOF,raw:"\xabEOF\xbb",text:"\xabEOF\xbb",start:e}),u=c(1/0),T=e=>t=>t.type===e.type&&t.text===e.text,R={ARRAY:T({text:"ARRAY",type:r.RESERVED_KEYWORD}),BY:T({text:"BY",type:r.RESERVED_KEYWORD}),SET:T({text:"SET",type:r.RESERVED_CLAUSE}),STRUCT:T({text:"STRUCT",type:r.RESERVED_KEYWORD}),WINDOW:T({text:"WINDOW",type:r.RESERVED_CLAUSE})},A=e=>e===r.RESERVED_KEYWORD||e===r.RESERVED_FUNCTION_NAME||e===r.RESERVED_PHRASE||e===r.RESERVED_CLAUSE||e===r.RESERVED_SELECT||e===r.RESERVED_SET_OPERATION||e===r.RESERVED_JOIN||e===r.ARRAY_KEYWORD||e===r.CASE||e===r.END||e===r.WHEN||e===r.ELSE||e===r.THEN||e===r.LIMIT||e===r.BETWEEN||e===r.AND||e===r.OR||e===r.XOR,d=e=>e===r.AND||e===r.OR||e===r.XOR,f=e=>e.flatMap(S),S=e=>C(N(e)).map(e=>e.trim()),p=/[^[\]{}]+/y,O=/\{.*?\}/y,I=/\[.*?\]/y,N=e=>{let t=0,n=[];for(;te.trim());n.push(["",...e]),t+=o[0].length}O.lastIndex=t;let i=O.exec(e);if(i){let e=i[0].slice(1,-1).split("|").map(e=>e.trim());n.push(e),t+=i[0].length}if(!r&&!o&&!i)throw Error(`Unbalanced parenthesis in: ${e}`)}return n},C=([e,...t])=>void 0===e?[""]:C(t).flatMap(t=>e.map(e=>e.trim()+" "+t.trim())),h=e=>[...new Set(e)],m=e=>e[e.length-1],g=e=>e.sort((e,t)=>t.length-e.length||e.localeCompare(t)),_=e=>e.reduce((e,t)=>Math.max(e,t.length),0),L=e=>e.replace(/\s+/gu," "),v=e=>h(Object.values(e).flat()),P=e=>/\n/.test(e),y=v({keywords:["ALL","AND","ANY","ARRAY","AS","ASC","ASSERT_ROWS_MODIFIED","AT","BETWEEN","BY","CASE","CAST","COLLATE","CONTAINS","CREATE","CROSS","CUBE","CURRENT","DEFAULT","DEFINE","DESC","DISTINCT","ELSE","END","ENUM","ESCAPE","EXCEPT","EXCLUDE","EXISTS","EXTRACT","FALSE","FETCH","FOLLOWING","FOR","FROM","FULL","GROUP","GROUPING","GROUPS","HASH","HAVING","IF","IGNORE","IN","INNER","INTERSECT","INTERVAL","INTO","IS","JOIN","LATERAL","LEFT","LIKE","LIMIT","LOOKUP","MERGE","NATURAL","NEW","NO","NOT","NULL","NULLS","OF","ON","OR","ORDER","OUTER","OVER","PARTITION","PRECEDING","PROTO","RANGE","RECURSIVE","RESPECT","RIGHT","ROLLUP","ROWS","SELECT","SET","SOME","STRUCT","TABLE","TABLESAMPLE","THEN","TO","TREAT","TRUE","UNBOUNDED","UNION","UNNEST","USING","WHEN","WHERE","WINDOW","WITH","WITHIN"],datatypes:["ARRAY","BOOL","BYTES","DATE","DATETIME","GEOGRAPHY","INTERVAL","INT64","INT","SMALLINT","INTEGER","BIGINT","TINYINT","BYTEINT","NUMERIC","DECIMAL","BIGNUMERIC","BIGDECIMAL","FLOAT64","STRING","STRUCT","TIME","TIMEZONE"],stringFormat:["HEX","BASEX","BASE64M","ASCII","UTF-8","UTF8"],misc:["SAFE"],ddl:["LIKE","COPY","CLONE","IN","OUT","INOUT","RETURNS","LANGUAGE","CASCADE","RESTRICT","DETERMINISTIC"]}),b=v({aead:["KEYS.NEW_KEYSET","KEYS.ADD_KEY_FROM_RAW_BYTES","AEAD.DECRYPT_BYTES","AEAD.DECRYPT_STRING","AEAD.ENCRYPT","KEYS.KEYSET_CHAIN","KEYS.KEYSET_FROM_JSON","KEYS.KEYSET_TO_JSON","KEYS.ROTATE_KEYSET","KEYS.KEYSET_LENGTH"],aggregateAnalytic:["ANY_VALUE","ARRAY_AGG","AVG","CORR","COUNT","COUNTIF","COVAR_POP","COVAR_SAMP","MAX","MIN","ST_CLUSTERDBSCAN","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","VAR_POP","VAR_SAMP"],aggregate:["ANY_VALUE","ARRAY_AGG","ARRAY_CONCAT_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","COUNT","COUNTIF","LOGICAL_AND","LOGICAL_OR","MAX","MIN","STRING_AGG","SUM"],approximateAggregate:["APPROX_COUNT_DISTINCT","APPROX_QUANTILES","APPROX_TOP_COUNT","APPROX_TOP_SUM"],array:["ARRAY_CONCAT","ARRAY_LENGTH","ARRAY_TO_STRING","GENERATE_ARRAY","GENERATE_DATE_ARRAY","GENERATE_TIMESTAMP_ARRAY","ARRAY_REVERSE","OFFSET","SAFE_OFFSET","ORDINAL","SAFE_ORDINAL"],bitwise:["BIT_COUNT"],conversion:["PARSE_BIGNUMERIC","PARSE_NUMERIC","SAFE_CAST"],date:["CURRENT_DATE","EXTRACT","DATE","DATE_ADD","DATE_SUB","DATE_DIFF","DATE_TRUNC","DATE_FROM_UNIX_DATE","FORMAT_DATE","LAST_DAY","PARSE_DATE","UNIX_DATE"],datetime:["CURRENT_DATETIME","DATETIME","EXTRACT","DATETIME_ADD","DATETIME_SUB","DATETIME_DIFF","DATETIME_TRUNC","FORMAT_DATETIME","LAST_DAY","PARSE_DATETIME"],debugging:["ERROR"],federatedQuery:["EXTERNAL_QUERY"],geography:["S2_CELLIDFROMPOINT","S2_COVERINGCELLIDS","ST_ANGLE","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_AZIMUTH","ST_BOUNDARY","ST_BOUNDINGBOX","ST_BUFFER","ST_BUFFERWITHTOLERANCE","ST_CENTROID","ST_CENTROID_AGG","ST_CLOSESTPOINT","ST_CLUSTERDBSCAN","ST_CONTAINS","ST_CONVEXHULL","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DUMP","ST_DWITHIN","ST_ENDPOINT","ST_EQUALS","ST_EXTENT","ST_EXTERIORRING","ST_GEOGFROM","ST_GEOGFROMGEOJSON","ST_GEOGFROMTEXT","ST_GEOGFROMWKB","ST_GEOGPOINT","ST_GEOGPOINTFROMGEOHASH","ST_GEOHASH","ST_GEOMETRYTYPE","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_INTERSECTSBOX","ST_ISCOLLECTION","ST_ISEMPTY","ST_LENGTH","ST_MAKELINE","ST_MAKEPOLYGON","ST_MAKEPOLYGONORIENTED","ST_MAXDISTANCE","ST_NPOINTS","ST_NUMGEOMETRIES","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SIMPLIFY","ST_SNAPTOGRID","ST_STARTPOINT","ST_TOUCHES","ST_UNION","ST_UNION_AGG","ST_WITHIN","ST_X","ST_Y"],hash:["FARM_FINGERPRINT","MD5","SHA1","SHA256","SHA512"],hll:["HLL_COUNT.INIT","HLL_COUNT.MERGE","HLL_COUNT.MERGE_PARTIAL","HLL_COUNT.EXTRACT"],interval:["MAKE_INTERVAL","EXTRACT","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL"],json:["JSON_EXTRACT","JSON_QUERY","JSON_EXTRACT_SCALAR","JSON_VALUE","JSON_EXTRACT_ARRAY","JSON_QUERY_ARRAY","JSON_EXTRACT_STRING_ARRAY","JSON_VALUE_ARRAY","TO_JSON_STRING"],math:["ABS","SIGN","IS_INF","IS_NAN","IEEE_DIVIDE","RAND","SQRT","POW","POWER","EXP","LN","LOG","LOG10","GREATEST","LEAST","DIV","SAFE_DIVIDE","SAFE_MULTIPLY","SAFE_NEGATE","SAFE_ADD","SAFE_SUBTRACT","MOD","ROUND","TRUNC","CEIL","CEILING","FLOOR","COS","COSH","ACOS","ACOSH","SIN","SINH","ASIN","ASINH","TAN","TANH","ATAN","ATANH","ATAN2","RANGE_BUCKET"],navigation:["FIRST_VALUE","LAST_VALUE","NTH_VALUE","LEAD","LAG","PERCENTILE_CONT","PERCENTILE_DISC"],net:["NET.IP_FROM_STRING","NET.SAFE_IP_FROM_STRING","NET.IP_TO_STRING","NET.IP_NET_MASK","NET.IP_TRUNC","NET.IPV4_FROM_INT64","NET.IPV4_TO_INT64","NET.HOST","NET.PUBLIC_SUFFIX","NET.REG_DOMAIN"],numbering:["RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","NTILE","ROW_NUMBER"],security:["SESSION_USER"],statisticalAggregate:["CORR","COVAR_POP","COVAR_SAMP","STDDEV_POP","STDDEV_SAMP","STDDEV","VAR_POP","VAR_SAMP","VARIANCE"],string:["ASCII","BYTE_LENGTH","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CODE_POINTS_TO_BYTES","CODE_POINTS_TO_STRING","CONCAT","CONTAINS_SUBSTR","ENDS_WITH","FORMAT","FROM_BASE32","FROM_BASE64","FROM_HEX","INITCAP","INSTR","LEFT","LENGTH","LPAD","LOWER","LTRIM","NORMALIZE","NORMALIZE_AND_CASEFOLD","OCTET_LENGTH","REGEXP_CONTAINS","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","REPEAT","REVERSE","RIGHT","RPAD","RTRIM","SAFE_CONVERT_BYTES_TO_STRING","SOUNDEX","SPLIT","STARTS_WITH","STRPOS","SUBSTR","SUBSTRING","TO_BASE32","TO_BASE64","TO_CODE_POINTS","TO_HEX","TRANSLATE","TRIM","UNICODE","UPPER"],time:["CURRENT_TIME","TIME","EXTRACT","TIME_ADD","TIME_SUB","TIME_DIFF","TIME_TRUNC","FORMAT_TIME","PARSE_TIME"],timestamp:["CURRENT_TIMESTAMP","EXTRACT","STRING","TIMESTAMP","TIMESTAMP_ADD","TIMESTAMP_SUB","TIMESTAMP_DIFF","TIMESTAMP_TRUNC","FORMAT_TIMESTAMP","PARSE_TIMESTAMP","TIMESTAMP_SECONDS","TIMESTAMP_MILLIS","TIMESTAMP_MICROS","UNIX_SECONDS","UNIX_MILLIS","UNIX_MICROS"],uuid:["GENERATE_UUID"],conditional:["COALESCE","IF","IFNULL","NULLIF"],legacyAggregate:["AVG","BIT_AND","BIT_OR","BIT_XOR","CORR","COUNT","COVAR_POP","COVAR_SAMP","EXACT_COUNT_DISTINCT","FIRST","GROUP_CONCAT","GROUP_CONCAT_UNQUOTED","LAST","MAX","MIN","NEST","NTH","QUANTILES","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","TOP","UNIQUE","VARIANCE","VAR_POP","VAR_SAMP"],legacyBitwise:["BIT_COUNT"],legacyCasting:["BOOLEAN","BYTES","CAST","FLOAT","HEX_STRING","INTEGER","STRING"],legacyComparison:["COALESCE","GREATEST","IFNULL","IS_INF","IS_NAN","IS_EXPLICITLY_DEFINED","LEAST","NVL"],legacyDatetime:["CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE","DATE_ADD","DATEDIFF","DAY","DAYOFWEEK","DAYOFYEAR","FORMAT_UTC_USEC","HOUR","MINUTE","MONTH","MSEC_TO_TIMESTAMP","NOW","PARSE_UTC_USEC","QUARTER","SEC_TO_TIMESTAMP","SECOND","STRFTIME_UTC_USEC","TIME","TIMESTAMP","TIMESTAMP_TO_MSEC","TIMESTAMP_TO_SEC","TIMESTAMP_TO_USEC","USEC_TO_TIMESTAMP","UTC_USEC_TO_DAY","UTC_USEC_TO_HOUR","UTC_USEC_TO_MONTH","UTC_USEC_TO_WEEK","UTC_USEC_TO_YEAR","WEEK","YEAR"],legacyIp:["FORMAT_IP","PARSE_IP","FORMAT_PACKED_IP","PARSE_PACKED_IP"],legacyJson:["JSON_EXTRACT","JSON_EXTRACT_SCALAR"],legacyMath:["ABS","ACOS","ACOSH","ASIN","ASINH","ATAN","ATANH","ATAN2","CEIL","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG2","LOG10","PI","POW","RADIANS","RAND","ROUND","SIN","SINH","SQRT","TAN","TANH"],legacyRegex:["REGEXP_MATCH","REGEXP_EXTRACT","REGEXP_REPLACE"],legacyString:["CONCAT","INSTR","LEFT","LENGTH","LOWER","LPAD","LTRIM","REPLACE","RIGHT","RPAD","RTRIM","SPLIT","SUBSTR","UPPER"],legacyTableWildcard:["TABLE_DATE_RANGE","TABLE_DATE_RANGE_STRICT","TABLE_QUERY"],legacyUrl:["HOST","DOMAIN","TLD"],legacyWindow:["AVG","COUNT","MAX","MIN","STDDEV","SUM","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER"],legacyMisc:["CURRENT_USER","EVERY","FROM_BASE64","HASH","FARM_FINGERPRINT","IF","POSITION","SHA1","SOME","TO_BASE64"],other:["BQ.JOBS.CANCEL","BQ.REFRESH_MATERIALIZED_VIEW"],ddl:["OPTIONS"],pivot:["PIVOT","UNPIVOT"],dataTypes:["BYTES","NUMERIC","DECIMAL","BIGNUMERIC","BIGDECIMAL","STRING"]}),D=f(["SELECT [ALL | DISTINCT] [AS STRUCT | AS VALUE]"]),M=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","QUALIFY","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","OMIT RECORD IF","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY SOURCE | BY TARGET] [THEN]","UPDATE SET","CREATE [OR REPLACE] [MATERIALIZED] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMP|TEMPORARY|SNAPSHOT|EXTERNAL] TABLE [IF NOT EXISTS]","CLUSTER BY","FOR SYSTEM_TIME AS OF","WITH CONNECTION","WITH PARTITION COLUMNS","REMOTE WITH CONNECTION"]),U=f(["UPDATE","DELETE [FROM]","DROP [SNAPSHOT | EXTERNAL] TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME TO","ALTER COLUMN [IF EXISTS]","SET DEFAULT COLLATE","SET OPTIONS","DROP NOT NULL","SET DATA TYPE","ALTER SCHEMA [IF EXISTS]","ALTER [MATERIALIZED] VIEW [IF EXISTS]","ALTER BI_CAPACITY","TRUNCATE TABLE","CREATE SCHEMA [IF NOT EXISTS]","DEFAULT COLLATE","CREATE [OR REPLACE] [TEMP|TEMPORARY|TABLE] FUNCTION [IF NOT EXISTS]","CREATE [OR REPLACE] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] ROW ACCESS POLICY [IF NOT EXISTS]","GRANT TO","FILTER USING","CREATE CAPACITY","AS JSON","CREATE RESERVATION","CREATE ASSIGNMENT","CREATE SEARCH INDEX [IF NOT EXISTS]","DROP SCHEMA [IF EXISTS]","DROP [MATERIALIZED] VIEW [IF EXISTS]","DROP [TABLE] FUNCTION [IF EXISTS]","DROP PROCEDURE [IF EXISTS]","DROP ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","DROP CAPACITY [IF EXISTS]","DROP RESERVATION [IF EXISTS]","DROP ASSIGNMENT [IF EXISTS]","DROP SEARCH INDEX [IF EXISTS]","DROP [IF EXISTS]","GRANT","REVOKE","DECLARE","EXECUTE IMMEDIATE","LOOP","END LOOP","REPEAT","END REPEAT","WHILE","END WHILE","BREAK","LEAVE","CONTINUE","ITERATE","FOR","END FOR","BEGIN","BEGIN TRANSACTION","COMMIT TRANSACTION","ROLLBACK TRANSACTION","RAISE","RETURN","CALL","ASSERT","EXPORT DATA"]),x=f(["UNION {ALL | DISTINCT}","EXCEPT DISTINCT","INTERSECT DISTINCT"]),G=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),F=f(["TABLESAMPLE SYSTEM","ANY TYPE","ALL COLUMNS","NOT DETERMINISTIC","{ROWS | RANGE} BETWEEN","IS [NOT] DISTINCT FROM"]),H={tokenizerOptions:{reservedSelect:D,reservedClauses:[...M,...U],reservedSetOperations:x,reservedJoins:G,reservedPhrases:F,reservedKeywords:y,reservedFunctionNames:b,extraParens:["[]"],stringTypes:[{quote:'""".."""',prefixes:["R","B","RB","BR"]},{quote:"'''..'''",prefixes:["R","B","RB","BR"]},'""-bs',"''-bs",{quote:'""-raw',prefixes:["R","B","RB","BR"],requirePrefix:!0},{quote:"''-raw",prefixes:["R","B","RB","BR"],requirePrefix:!0}],identTypes:["``"],identChars:{dashes:!0},paramTypes:{positional:!0,named:["@"],quoted:["@"]},variableTypes:[{regex:String.raw`@@\w+`}],lineCommentTypes:["--","#"],operators:["&","|","^","~",">>","<<","||","=>"],postProcess:function(e){var t;let n;return t=function(e){let t=[];for(let o=0;o"===t.text?n--:">>"===t.text&&(n-=2),0===n)return r}return e.length-1}(e,o+1),a=e.slice(o,n+1);t.push({type:r.IDENTIFIER,raw:a.map(B("raw")).join(""),text:a.map(B("text")).join(""),start:i.start}),o=n}else t.push(i)}return t}(e),n=u,t.map(e=>"OFFSET"===e.text&&"["===n.text?(n=e,{...e,type:r.RESERVED_FUNCTION_NAME}):(n=e,e))}},formatOptions:{onelineClauses:U}},B=e=>t=>t.type===r.IDENTIFIER||t.type===r.COMMA?t[e]+" ":t[e],w=v({aggregate:["ARRAY_AGG","AVG","CORR","CORRELATION","COUNT","COUNT_BIG","COVAR_POP","COVARIANCE","COVAR","COVAR_SAMP","COVARIANCE_SAMP","CUME_DIST","GROUPING","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_ICPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV_POP","STDDEV","STDDEV_SAMP","SUM","VAR_POP","VARIANCE","VAR","VAR_SAMP","VARIANCE_SAMP","XMLAGG"],scalar:["ABS","ABSVAL","ACOS","ADD_DAYS","ADD_MONTHS","ARRAY_DELETE","ARRAY_FIRST","ARRAY_LAST","ARRAY_NEXT","ARRAY_PRIOR","ARRAY_TRIM","ASCII","ASCII_CHR","ASCII_STR","ASCIISTR","ASIN","ATAN","ATANH","ATAN2","BIGINT","BINARY","BITAND","BITANDNOT","BITOR","BITXOR","BITNOT","BLOB","BTRIM","CARDINALITY","CCSID_ENCODING","CEILING","CEIL","CHAR","CHAR9","CHARACTER_LENGTH","CHAR_LENGTH","CHR","CLOB","COALESCE","COLLATION_KEY","COMPARE_DECFLOAT","CONCAT","CONTAINS","COS","COSH","DATE","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFWEEK_ISO","DAYOFYEAR","DAYS","DAYS_BETWEEN","DBCLOB","DECFLOAT","DECFLOAT_FORMAT","DECFLOAT_SORTKEY","DECIMAL","DEC","DECODE","DECRYPT_BINARY","DECRYPT_BIT","DECRYPT_CHAR","DECRYPT_DB","DECRYPT_DATAKEY_BIGINT","DECRYPT_DATAKEY_BIT","DECRYPT_DATAKEY_CLOB","DECRYPT_DATAKEY_DBCLOB","DECRYPT_DATAKEY_DECIMAL","DECRYPT_DATAKEY_INTEGER","DECRYPT_DATAKEY_VARCHAR","DECRYPT_DATAKEY_VARGRAPHIC","DEGREES","DIFFERENCE","DIGITS","DOUBLE_PRECISION","DOUBLE","DSN_XMLVALIDATE","EBCDIC_CHR","EBCDIC_STR","ENCRYPT_DATAKEY","ENCRYPT_TDES","EXP","EXTRACT","FLOAT","FLOOR","GENERATE_UNIQUE","GENERATE_UNIQUE_BINARY","GETHINT","GETVARIABLE","GRAPHIC","GREATEST","HASH","HASH_CRC32","HASH_MD5","HASH_SHA1","HASH_SHA256","HEX","HOUR","IDENTITY_VAL_LOCAL","IFNULL","INSERT","INSTR","INTEGER","INT","JULIAN_DAY","LAST_DAY","LCASE","LEAST","LEFT","LENGTH","LN","LOCATE","LOCATE_IN_STRING","LOG10","LOWER","LPAD","LTRIM","MAX","MAX_CARDINALITY","MICROSECOND","MIDNIGHT_SECONDS","MIN","MINUTE","MOD","MONTH","MONTHS_BETWEEN","MQREAD","MQREADCLOB","MQRECEIVE","MQRECEIVECLOB","MQSEND","MULTIPLY_ALT","NEXT_DAY","NEXT_MONTH","NORMALIZE_DECFLOAT","NORMALIZE_STRING","NULLIF","NVL","OVERLAY","PACK","POSITION","POSSTR","POWER","POW","QUANTIZE","QUARTER","RADIANS","RAISE_ERROR","RANDOM","RAND","REAL","REGEXP_COUNT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","RID","RIGHT","ROUND","ROUND_TIMESTAMP","ROWID","RPAD","RTRIM","SCORE","SECOND","SIGN","SIN","SINH","SMALLINT","SOUNDEX","SOAPHTTPC","SOAPHTTPV","SOAPHTTPNC","SOAPHTTPNV","SPACE","SQRT","STRIP","STRLEFT","STRPOS","STRRIGHT","SUBSTR","SUBSTRING","TAN","TANH","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIMESTAMP_FORMAT","TIMESTAMP_ISO","TIMESTAMP_TZ","TO_CHAR","TO_CLOB","TO_DATE","TO_NUMBER","TOTALORDER","TO_TIMESTAMP","TRANSLATE","TRIM","TRIM_ARRAY","TRUNCATE","TRUNC","TRUNC_TIMESTAMP","UCASE","UNICODE","UNICODE_STR","UNISTR","UPPER","VALUE","VARBINARY","VARCHAR","VARCHAR9","VARCHAR_BIT_FORMAT","VARCHAR_FORMAT","VARGRAPHIC","VERIFY_GROUP_FOR_USER","VERIFY_ROLE_FOR_USER","VERIFY_TRUSTED_CONTEXT_ROLE_FOR_USER","WEEK","WEEK_ISO","WRAP","XMLATTRIBUTES","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLMODIFY","XMLNAMESPACES","XMLPARSE","XMLPI","XMLQUERY","XMLSERIALIZE","XMLTEXT","XMLXSROBJECTID","XSLTRANSFORM","YEAR"],table:["ADMIN_TASK_LIST","ADMIN_TASK_OUTPUT","ADMIN_TASK_STATUS","BLOCKING_THREADS","MQREADALL","MQREADALLCLOB","MQRECEIVEALL","MQRECEIVEALLCLOB","XMLTABLE"],row:["UNPACK"],olap:["CUME_DIST","PERCENT_RANK","RANK","DENSE_RANK","NTILE","LAG","LEAD","ROW_NUMBER","FIRST_VALUE","LAST_VALUE","NTH_VALUE","RATIO_TO_REPORT"],cast:["CAST"]}),$=v({standard:["ALL","ALLOCATE","ALLOW","ALTERAND","ANY","AS","ARRAY","ARRAY_EXISTS","ASENSITIVE","ASSOCIATE","ASUTIME","AT","AUDIT","AUX","AUXILIARY","BEFORE","BEGIN","BETWEEN","BUFFERPOOL","BY","CAPTURE","CASCADED","CAST","CCSID","CHARACTER","CHECK","CLONE","CLUSTER","COLLECTION","COLLID","COLUMN","CONDITION","CONNECTION","CONSTRAINT","CONTENT","CONTINUE","CREATE","CUBE","CURRENT","CURRENT_DATE","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRVAL","CURSOR","DATA","DATABASE","DBINFO","DECLARE","DEFAULT","DESCRIPTOR","DETERMINISTIC","DISABLE","DISALLOW","DISTINCT","DO","DOCUMENT","DSSIZE","DYNAMIC","EDITPROC","ELSE","ELSEIF","ENCODING","ENCRYPTION","ENDING","END-EXEC","ERASE","ESCAPE","EXCEPTION","EXISTS","EXIT","EXTERNAL","FENCED","FIELDPROC","FINAL","FIRST","FOR","FREE","FULL","FUNCTION","GENERATED","GET","GLOBAL","GOTO","GROUP","HANDLER","HOLD","HOURS","IF","IMMEDIATE","IN","INCLUSIVE","INDEX","INHERIT","INNER","INOUT","INSENSITIVE","INTO","IS","ISOBID","ITERATE","JAR","KEEP","KEY","LANGUAGE","LAST","LC_CTYPE","LEAVE","LIKE","LOCAL","LOCALE","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","MAINTAINED","MATERIALIZED","MICROSECONDS","MINUTEMINUTES","MODIFIES","MONTHS","NEXT","NEXTVAL","NO","NONE","NOT","NULL","NULLS","NUMPARTS","OBID","OF","OLD","ON","OPTIMIZATION","OPTIMIZE","ORDER","ORGANIZATION","OUT","OUTER","PACKAGE","PARAMETER","PART","PADDED","PARTITION","PARTITIONED","PARTITIONING","PATH","PIECESIZE","PERIOD","PLAN","PRECISION","PREVVAL","PRIOR","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","READS","REFERENCES","RESIGNAL","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","ROLE","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROW","ROWSET","SCHEMA","SCRATCHPAD","SECONDS","SECQTY","SECURITY","SEQUENCE","SENSITIVE","SESSION_USER","SIMPLE","SOME","SOURCE","SPECIFIC","STANDARD","STATIC","STATEMENT","STAY","STOGROUP","STORES","STYLE","SUMMARY","SYNONYM","SYSDATE","SYSTEM","SYSTIMESTAMP","TABLE","TABLESPACE","THEN","TO","TRIGGER","TYPE","UNDO","UNIQUE","UNTIL","USER","USING","VALIDPROC","VARIABLE","VARIANT","VCAT","VERSIONING","VIEW","VOLATILE","VOLUMES","WHILE","WLM","XMLEXISTS","XMLCAST","YEARS","ZONE"]}),Y=f(["SELECT [ALL | DISTINCT]"]),V=f(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY [INPUT SEQUENCE]","FETCH FIRST","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT","CREATE [OR REPLACE] VIEW","CREATE [GLOBAL TEMPORARY] TABLE"]),k=f(["UPDATE","WHERE CURRENT OF","WITH {RR | RS | CS | UR}","DELETE FROM","DROP TABLE [HIERARCHY]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME [COLUMN]","ALTER [COLUMN]","SET DATA TYPE","SET NOT NULL","DROP {IDENTITY | EXPRESSION | DEFAULT | NOT NULL}","TRUNCATE [TABLE]","SET [CURRENT] SCHEMA","AFTER","GO","ALLOCATE CURSOR","ALTER DATABASE","ALTER FUNCTION","ALTER INDEX","ALTER MASK","ALTER PERMISSION","ALTER PROCEDURE","ALTER SEQUENCE","ALTER STOGROUP","ALTER TABLESPACE","ALTER TRIGGER","ALTER TRUSTED CONTEXT","ALTER VIEW","ASSOCIATE LOCATORS","BEGIN DECLARE SECTION","CALL","CLOSE","COMMENT","COMMIT","CONNECT","CREATE ALIAS","CREATE AUXILIARY TABLE","CREATE DATABASE","CREATE FUNCTION","CREATE GLOBAL TEMPORARY TABLE","CREATE INDEX","CREATE LOB TABLESPACE","CREATE MASK","CREATE PERMISSION","CREATE PROCEDURE","CREATE ROLE","CREATE SEQUENCE","CREATE STOGROUP","CREATE SYNONYM","CREATE TABLESPACE","CREATE TRIGGER","CREATE TRUSTED CONTEXT","CREATE TYPE","CREATE VARIABLE","DECLARE CURSOR","DECLARE GLOBAL TEMPORARY TABLE","DECLARE STATEMENT","DECLARE TABLE","DECLARE VARIABLE","DESCRIBE CURSOR","DESCRIBE INPUT","DESCRIBE OUTPUT","DESCRIBE PROCEDURE","DESCRIBE TABLE","DROP","END DECLARE SECTION","EXCHANGE","EXECUTE","EXECUTE IMMEDIATE","EXPLAIN","FETCH","FREE LOCATOR","GET DIAGNOSTICS","GRANT","HOLD LOCATOR","INCLUDE","LABEL","LOCK TABLE","OPEN","PREPARE","REFRESH","RELEASE","RELEASE SAVEPOINT","RENAME","REVOKE","ROLLBACK","SAVEPOINT","SELECT INTO","SET CONNECTION","SET CURRENT ACCELERATOR","SET CURRENT APPLICATION COMPATIBILITY","SET CURRENT APPLICATION ENCODING SCHEME","SET CURRENT DEBUG MODE","SET CURRENT DECFLOAT ROUNDING MODE","SET CURRENT DEGREE","SET CURRENT EXPLAIN MODE","SET CURRENT GET_ACCEL_ARCHIVE","SET CURRENT LOCALE LC_CTYPE","SET CURRENT MAINTAINED TABLE TYPES FOR OPTIMIZATION","SET CURRENT OPTIMIZATION HINT","SET CURRENT PACKAGE PATH","SET CURRENT PACKAGESET","SET CURRENT PRECISION","SET CURRENT QUERY ACCELERATION","SET CURRENT QUERY ACCELERATION WAITFORDATA","SET CURRENT REFRESH AGE","SET CURRENT ROUTINE VERSION","SET CURRENT RULES","SET CURRENT SQLID","SET CURRENT TEMPORAL BUSINESS_TIME","SET CURRENT TEMPORAL SYSTEM_TIME","SET ENCRYPTION PASSWORD","SET PATH","SET SESSION TIME ZONE","SIGNAL","VALUES INTO","WHENEVER"]),W=f(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),Z=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),j=f(["ON DELETE","ON UPDATE","SET NULL","{ROWS | RANGE} BETWEEN"]),X={tokenizerOptions:{reservedSelect:Y,reservedClauses:[...V,...k],reservedSetOperations:W,reservedJoins:Z,reservedPhrases:j,reservedKeywords:$,reservedFunctionNames:w,stringTypes:[{quote:"''-qq",prefixes:["G","N","U&"]},{quote:"''-raw",prefixes:["X","BX","GX","UX"],requirePrefix:!0}],identTypes:['""-qq'],identChars:{first:"@#$"},paramTypes:{positional:!0,named:[":"]},paramChars:{first:"@#$",rest:"@#$"},operators:["**","\xac=","\xac>","\xac<","!>","!<","||"]},formatOptions:{onelineClauses:k}},K=v({math:["ABS","ACOS","ASIN","ATAN","BIN","BROUND","CBRT","CEIL","CEILING","CONV","COS","DEGREES","EXP","FACTORIAL","FLOOR","GREATEST","HEX","LEAST","LN","LOG","LOG10","LOG2","NEGATIVE","PI","PMOD","POSITIVE","POW","POWER","RADIANS","RAND","ROUND","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIN","SQRT","TAN","UNHEX","WIDTH_BUCKET"],array:["ARRAY_CONTAINS","MAP_KEYS","MAP_VALUES","SIZE","SORT_ARRAY"],conversion:["BINARY","CAST"],date:["ADD_MONTHS","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","QUARTER","SECOND","TIMESTAMP","TO_DATE","TO_UTC_TIMESTAMP","TRUNC","UNIX_TIMESTAMP","WEEKOFYEAR","YEAR"],conditional:["ASSERT_TRUE","COALESCE","IF","ISNOTNULL","ISNULL","NULLIF","NVL"],string:["ASCII","BASE64","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONTEXT_NGRAMS","DECODE","ELT","ENCODE","FIELD","FIND_IN_SET","FORMAT_NUMBER","GET_JSON_OBJECT","IN_FILE","INITCAP","INSTR","LCASE","LENGTH","LEVENSHTEIN","LOCATE","LOWER","LPAD","LTRIM","NGRAMS","OCTET_LENGTH","PARSE_URL","PRINTF","QUOTE","REGEXP_EXTRACT","REGEXP_REPLACE","REPEAT","REVERSE","RPAD","RTRIM","SENTENCES","SOUNDEX","SPACE","SPLIT","STR_TO_MAP","SUBSTR","SUBSTRING","TRANSLATE","TRIM","UCASE","UNBASE64","UPPER"],masking:["MASK","MASK_FIRST_N","MASK_HASH","MASK_LAST_N","MASK_SHOW_FIRST_N","MASK_SHOW_LAST_N"],misc:["AES_DECRYPT","AES_ENCRYPT","CRC32","CURRENT_DATABASE","CURRENT_USER","HASH","JAVA_METHOD","LOGGED_IN_USER","MD5","REFLECT","SHA","SHA1","SHA2","SURROGATE_KEY","VERSION"],aggregate:["AVG","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COVAR_POP","COVAR_SAMP","HISTOGRAM_NUMERIC","MAX","MIN","NTILE","PERCENTILE","PERCENTILE_APPROX","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],table:["EXPLODE","INLINE","JSON_TUPLE","PARSE_URL_TUPLE","POSEXPLODE","STACK"],window:["LEAD","LAG","FIRST_VALUE","LAST_VALUE","RANK","ROW_NUMBER","DENSE_RANK","CUME_DIST","PERCENT_RANK","NTILE"],dataTypes:["DECIMAL","NUMERIC","VARCHAR","CHAR"]}),z=v({nonReserved:["ADD","ADMIN","AFTER","ANALYZE","ARCHIVE","ASC","BEFORE","BUCKET","BUCKETS","CASCADE","CHANGE","CLUSTER","CLUSTERED","CLUSTERSTATUS","COLLECTION","COLUMNS","COMMENT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONTINUE","DATA","DATABASES","DATETIME","DAY","DBPROPERTIES","DEFERRED","DEFINED","DELIMITED","DEPENDENCY","DESC","DIRECTORIES","DIRECTORY","DISABLE","DISTRIBUTE","ELEM_TYPE","ENABLE","ESCAPED","EXCLUSIVE","EXPLAIN","EXPORT","FIELDS","FILE","FILEFORMAT","FIRST","FORMAT","FORMATTED","FUNCTIONS","HOLD_DDLTIME","HOUR","IDXPROPERTIES","IGNORE","INDEX","INDEXES","INPATH","INPUTDRIVER","INPUTFORMAT","ITEMS","JAR","KEYS","KEY_TYPE","LIMIT","LINES","LOAD","LOCATION","LOCK","LOCKS","LOGICAL","LONG","MAPJOIN","MATERIALIZED","METADATA","MINUS","MINUTE","MONTH","MSCK","NOSCAN","NO_DROP","OFFLINE","OPTION","OUTPUTDRIVER","OUTPUTFORMAT","OVERWRITE","OWNER","PARTITIONED","PARTITIONS","PLUS","PRETTY","PRINCIPALS","PROTECTION","PURGE","READ","READONLY","REBUILD","RECORDREADER","RECORDWRITER","RELOAD","RENAME","REPAIR","REPLACE","REPLICATION","RESTRICT","REWRITE","ROLE","ROLES","SCHEMA","SCHEMAS","SECOND","SEMI","SERDE","SERDEPROPERTIES","SERVER","SETS","SHARED","SHOW","SHOW_DATABASE","SKEWED","SORT","SORTED","SSL","STATISTICS","STORED","STREAMTABLE","STRING","STRUCT","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","TINYINT","TOUCH","TRANSACTIONS","UNARCHIVE","UNDO","UNIONTYPE","UNLOCK","UNSET","UNSIGNED","URI","USE","UTC","UTCTIMESTAMP","VALUE_TYPE","VIEW","WHILE","YEAR","AUTOCOMMIT","ISOLATION","LEVEL","OFFSET","SNAPSHOT","TRANSACTION","WORK","WRITE","ABORT","KEY","LAST","NORELY","NOVALIDATE","NULLS","RELY","VALIDATE","DETAIL","DOW","EXPRESSION","OPERATOR","QUARTER","SUMMARY","VECTORIZATION","WEEK","YEARS","MONTHS","WEEKS","DAYS","HOURS","MINUTES","SECONDS","TIMESTAMPTZ","ZONE"],reserved:["ALL","ALTER","AND","ARRAY","AS","AUTHORIZATION","BETWEEN","BIGINT","BINARY","BOOLEAN","BOTH","BY","CASE","CAST","CHAR","COLUMN","CONF","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIMESTAMP","CURSOR","DATABASE","DATE","DECIMAL","DELETE","DESCRIBE","DISTINCT","DOUBLE","DROP","ELSE","END","EXCHANGE","EXISTS","EXTENDED","EXTERNAL","FALSE","FETCH","FLOAT","FOLLOWING","FOR","FROM","FULL","FUNCTION","GRANT","GROUP","GROUPING","HAVING","IF","IMPORT","IN","INNER","INSERT","INT","INTERSECT","INTERVAL","INTO","IS","JOIN","LATERAL","LEFT","LESS","LIKE","LOCAL","MACRO","MAP","MORE","NONE","NOT","NULL","OF","ON","OR","ORDER","OUT","OUTER","OVER","PARTIALSCAN","PARTITION","PERCENT","PRECEDING","PRESERVE","PROCEDURE","RANGE","READS","REDUCE","REVOKE","RIGHT","ROLLUP","ROW","ROWS","SELECT","SET","SMALLINT","TABLE","TABLESAMPLE","THEN","TIMESTAMP","TO","TRANSFORM","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNION","UNIQUEJOIN","UPDATE","USER","USING","UTC_TMESTAMP","VALUES","VARCHAR","WHEN","WHERE","WINDOW","WITH","COMMIT","ONLY","REGEXP","RLIKE","ROLLBACK","START","CACHE","CONSTRAINT","FOREIGN","PRIMARY","REFERENCES","DAYOFWEEK","EXTRACT","FLOOR","INTEGER","PRECISION","VIEWS","TIME","NUMERIC","SYNC"],fileTypes:["TEXTFILE","SEQUENCEFILE","ORC","CSV","TSV","PARQUET","AVRO","RCFILE","JSONFILE","INPUTFORMAT","OUTPUTFORMAT"]}),J=f(["SELECT [ALL | DISTINCT]"]),q=f(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT INTO [TABLE]","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT [VALUES]","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE","CREATE [MATERIALIZED] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY] [EXTERNAL] TABLE [IF NOT EXISTS]"]),Q=f(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","RENAME TO","TRUNCATE [TABLE]","ALTER","CREATE","USE","DESCRIBE","DROP","FETCH","SHOW","STORED AS","STORED BY","ROW FORMAT"]),ee=f(["UNION [ALL | DISTINCT]"]),et=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","LEFT SEMI JOIN"]),en=f(["{ROWS | RANGE} BETWEEN"]),er={tokenizerOptions:{reservedSelect:J,reservedClauses:[...q,...Q],reservedSetOperations:ee,reservedJoins:et,reservedPhrases:en,reservedKeywords:z,reservedFunctionNames:K,extraParens:["[]"],stringTypes:['""-bs',"''-bs"],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||"]},formatOptions:{onelineClauses:Q}},eo=v({all:["ACCESSIBLE","ACCOUNT","ACTION","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","ALL","ALGORITHM","ALTER","ALWAYS","ANALYZE","AND","ANY","AS","ASC","ASCII","ASENSITIVE","AT","ATOMIC","AUTHORS","AUTO_INCREMENT","AUTOEXTEND_SIZE","AUTO","AVG","AVG_ROW_LENGTH","BACKUP","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BINLOG","BIT","BLOB","BLOCK","BODY","BOOL","BOOLEAN","BOTH","BTREE","BY","BYTE","CACHE","CALL","CASCADE","CASCADED","CASE","CATALOG_NAME","CHAIN","CHANGE","CHANGED","CHAR","CHARACTER","CHARSET","CHECK","CHECKPOINT","CHECKSUM","CIPHER","CLASS_ORIGIN","CLIENT","CLOB","CLOSE","COALESCE","CODE","COLLATE","COLLATION","COLUMN","COLUMN_NAME","COLUMNS","COLUMN_ADD","COLUMN_CHECK","COLUMN_CREATE","COLUMN_DELETE","COLUMN_GET","COMMENT","COMMIT","COMMITTED","COMPACT","COMPLETION","COMPRESSED","CONCURRENT","CONDITION","CONNECTION","CONSISTENT","CONSTRAINT","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONTAINS","CONTEXT","CONTINUE","CONTRIBUTORS","CONVERT","CPU","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_POS","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CURSOR_NAME","CYCLE","DATA","DATABASE","DATABASES","DATAFILE","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFINER","DELAYED","DELAY_KEY_WRITE","DELETE","DELETE_DOMAIN_ID","DESC","DESCRIBE","DES_KEY_FILE","DETERMINISTIC","DIAGNOSTICS","DIRECTORY","DISABLE","DISCARD","DISK","DISTINCT","DISTINCTROW","DIV","DO","DOUBLE","DO_DOMAIN_IDS","DROP","DUAL","DUMPFILE","DUPLICATE","DYNAMIC","EACH","ELSE","ELSEIF","ELSIF","EMPTY","ENABLE","ENCLOSED","END","ENDS","ENGINE","ENGINES","ENUM","ERROR","ERRORS","ESCAPE","ESCAPED","EVENT","EVENTS","EVERY","EXAMINED","EXCEPT","EXCHANGE","EXCLUDE","EXECUTE","EXCEPTION","EXISTS","EXIT","EXPANSION","EXPIRE","EXPORT","EXPLAIN","EXTENDED","EXTENT_SIZE","FALSE","FAST","FAULTS","FEDERATED","FETCH","FIELDS","FILE","FIRST","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOLLOWS","FOR","FORCE","FOREIGN","FORMAT","FOUND","FROM","FULL","FULLTEXT","FUNCTION","GENERAL","GENERATED","GET_FORMAT","GET","GLOBAL","GOTO","GRANT","GRANTS","GROUP","HANDLER","HARD","HASH","HAVING","HELP","HIGH_PRIORITY","HISTORY","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IGNORE","IGNORED","IGNORE_DOMAIN_IDS","IGNORE_SERVER_IDS","IMMEDIATE","IMPORT","INTERSECT","IN","INCREMENT","INDEX","INDEXES","INFILE","INITIAL_SIZE","INNER","INOUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTALL","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERVAL","INVISIBLE","INTO","IO","IO_THREAD","IPC","IS","ISOLATION","ISOPEN","ISSUER","ITERATE","INVOKER","JOIN","JSON","JSON_TABLE","KEY","KEYS","KEY_BLOCK_SIZE","KILL","LANGUAGE","LAST","LAST_VALUE","LASTVAL","LEADING","LEAVE","LEAVES","LEFT","LESS","LEVEL","LIKE","LIMIT","LINEAR","LINES","LIST","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCK","LOCKED","LOCKS","LOGFILE","LOGS","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER","MASTER_CONNECT_RETRY","MASTER_DELAY","MASTER_GTID_POS","MASTER_HOST","MASTER_LOG_FILE","MASTER_LOG_POS","MASTER_PASSWORD","MASTER_PORT","MASTER_SERVER_ID","MASTER_SSL","MASTER_SSL_CA","MASTER_SSL_CAPATH","MASTER_SSL_CERT","MASTER_SSL_CIPHER","MASTER_SSL_CRL","MASTER_SSL_CRLPATH","MASTER_SSL_KEY","MASTER_SSL_VERIFY_SERVER_CERT","MASTER_USER","MASTER_USE_GTID","MASTER_HEARTBEAT_PERIOD","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_SIZE","MAX_STATEMENT_TIME","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MAXVALUE","MEDIUM","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMORY","MERGE","MESSAGE_TEXT","MICROSECOND","MIDDLEINT","MIGRATE","MINUS","MINUTE","MINUTE_MICROSECOND","MINUTE_SECOND","MINVALUE","MIN_ROWS","MOD","MODE","MODIFIES","MODIFY","MONITOR","MONTH","MUTEX","MYSQL","MYSQL_ERRNO","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NESTED","NEVER","NEW","NEXT","NEXTVAL","NO","NOMAXVALUE","NOMINVALUE","NOCACHE","NOCYCLE","NO_WAIT","NOWAIT","NODEGROUP","NONE","NOT","NOTFOUND","NO_WRITE_TO_BINLOG","NULL","NUMBER","NUMERIC","NVARCHAR","OF","OFFSET","OLD_PASSWORD","ON","ONE","ONLINE","ONLY","OPEN","OPTIMIZE","OPTIONS","OPTION","OPTIONALLY","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OUTFILE","OVER","OVERLAPS","OWNER","PACKAGE","PACK_KEYS","PAGE","PAGE_CHECKSUM","PARSER","PARSE_VCOL_EXPR","PATH","PERIOD","PARTIAL","PARTITION","PARTITIONING","PARTITIONS","PASSWORD","PERSISTENT","PHASE","PLUGIN","PLUGINS","PORT","PORTION","PRECEDES","PRECEDING","PRECISION","PREPARE","PRESERVE","PREV","PREVIOUS","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROXY","PURGE","QUARTER","QUERY","QUICK","RAISE","RANGE","RAW","READ","READ_ONLY","READ_WRITE","READS","REAL","REBUILD","RECOVER","RECURSIVE","REDO_BUFFER_SIZE","REDOFILE","REDUNDANT","REFERENCES","REGEXP","RELAY","RELAYLOG","RELAY_LOG_FILE","RELAY_LOG_POS","RELAY_THREAD","RELEASE","RELOAD","REMOVE","RENAME","REORGANIZE","REPAIR","REPEATABLE","REPLACE","REPLAY","REPLICA","REPLICAS","REPLICA_POS","REPLICATION","REPEAT","REQUIRE","RESET","RESIGNAL","RESTART","RESTORE","RESTRICT","RESUME","RETURNED_SQLSTATE","RETURN","RETURNING","RETURNS","REUSE","REVERSE","REVOKE","RIGHT","RLIKE","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROW","ROWCOUNT","ROWNUM","ROWS","ROWTYPE","ROW_COUNT","ROW_FORMAT","RTREE","SAVEPOINT","SCHEDULE","SCHEMA","SCHEMA_NAME","SCHEMAS","SECOND","SECOND_MICROSECOND","SECURITY","SELECT","SENSITIVE","SEPARATOR","SEQUENCE","SERIAL","SERIALIZABLE","SESSION","SERVER","SET","SETVAL","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMPLE","SKIP","SLAVE","SLAVES","SLAVE_POS","SLOW","SNAPSHOT","SMALLINT","SOCKET","SOFT","SOME","SONAME","SOUNDS","SOURCE","STAGE","STORED","SPATIAL","SPECIFIC","REF_SYSTEM_ID","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_NO_CACHE","SQL_SMALL_RESULT","SQL_THREAD","SQL_TSI_SECOND","SQL_TSI_MINUTE","SQL_TSI_HOUR","SQL_TSI_DAY","SQL_TSI_WEEK","SQL_TSI_MONTH","SQL_TSI_QUARTER","SQL_TSI_YEAR","SSL","START","STARTING","STARTS","STATEMENT","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","SUBCLASS_ORIGIN","SUBJECT","SUBPARTITION","SUBPARTITIONS","SUPER","SUSPEND","SWAPS","SWITCHES","SYSDATE","SYSTEM","SYSTEM_TIME","TABLE","TABLE_NAME","TABLES","TABLESPACE","TABLE_CHECKSUM","TEMPORARY","TEMPTABLE","TERMINATED","TEXT","THAN","THEN","TIES","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TINYBLOB","TINYINT","TINYTEXT","TO","TRAILING","TRANSACTION","TRANSACTIONAL","THREADS","TRIGGER","TRIGGERS","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO_BUFFER_SIZE","UNDOFILE","UNDO","UNICODE","UNION","UNIQUE","UNKNOWN","UNLOCK","UNINSTALL","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USER_RESOURCES","USE_FRM","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARCHAR2","VARIABLES","VARYING","VIA","VIEW","VIRTUAL","VISIBLE","VERSIONING","WAIT","WARNINGS","WEEK","WEIGHT_STRING","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","X509","XOR","XA","XML","YEAR","YEAR_MONTH","ZEROFILL"]}),ei=v({all:["ADDDATE","ADD_MONTHS","BIT_AND","BIT_OR","BIT_XOR","CAST","COUNT","CUME_DIST","CURDATE","CURTIME","DATE_ADD","DATE_SUB","DATE_FORMAT","DECODE","DENSE_RANK","EXTRACT","FIRST_VALUE","GROUP_CONCAT","JSON_ARRAYAGG","JSON_OBJECTAGG","LAG","LEAD","MAX","MEDIAN","MID","MIN","NOW","NTH_VALUE","NTILE","POSITION","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","ROW_NUMBER","SESSION_USER","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUBDATE","SUBSTR","SUBSTRING","SUM","SYSTEM_USER","TRIM","TRIM_ORACLE","VARIANCE","VAR_POP","VAR_SAMP","ABS","ACOS","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ASIN","ATAN","ATAN2","BENCHMARK","BIN","BINLOG_GTID_POS","BIT_COUNT","BIT_LENGTH","CEIL","CEILING","CHARACTER_LENGTH","CHAR_LENGTH","CHR","COERCIBILITY","COLUMN_CHECK","COLUMN_EXISTS","COLUMN_LIST","COLUMN_JSON","COMPRESS","CONCAT","CONCAT_OPERATOR_ORACLE","CONCAT_WS","CONNECTION_ID","CONV","CONVERT_TZ","COS","COT","CRC32","DATEDIFF","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEGREES","DECODE_HISTOGRAM","DECODE_ORACLE","DES_DECRYPT","DES_ENCRYPT","ELT","ENCODE","ENCRYPT","EXP","EXPORT_SET","EXTRACTVALUE","FIELD","FIND_IN_SET","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GET_LOCK","GREATEST","HEX","IFNULL","INSTR","ISNULL","IS_FREE_LOCK","IS_USED_LOCK","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_COMPACT","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_DETAILED","JSON_EXISTS","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_LOOSE","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_QUERY","JSON_QUOTE","JSON_OBJECT","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_SEARCH","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAST_DAY","LAST_INSERT_ID","LCASE","LEAST","LENGTH","LENGTHB","LN","LOAD_FILE","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LPAD_ORACLE","LTRIM","LTRIM_ORACLE","MAKEDATE","MAKETIME","MAKE_SET","MASTER_GTID_WAIT","MASTER_POS_WAIT","MD5","MONTHNAME","NAME_CONST","NVL","NVL2","OCT","OCTET_LENGTH","ORD","PERIOD_ADD","PERIOD_DIFF","PI","POW","POWER","QUOTE","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","RADIANS","RAND","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPLACE_ORACLE","REVERSE","ROUND","RPAD","RPAD_ORACLE","RTRIM","RTRIM_ORACLE","SEC_TO_TIME","SHA","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SPACE","SQRT","STRCMP","STR_TO_DATE","SUBSTR_ORACLE","SUBSTRING_INDEX","SUBTIME","SYS_GUID","TAN","TIMEDIFF","TIME_FORMAT","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_SECONDS","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","UUID","UUID_SHORT","VERSION","WEEKDAY","WEEKOFYEAR","WSREP_LAST_WRITTEN_GTID","WSREP_LAST_SEEN_GTID","WSREP_SYNC_WAIT_UPTO_GTID","YEARWEEK","COALESCE","NULLIF","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","BIT","BINARY","BLOB","CHAR","NATIONAL CHAR","CHAR BYTE","ENUM","VARBINARY","VARCHAR","NATIONAL VARCHAR","TIME","DATETIME","TIMESTAMP","YEAR"]}),ea=f(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),es=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","SET","CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]","RETURNING"]),el=f(["UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] [IGNORE] TABLE [IF EXISTS]","ADD [COLUMN] [IF NOT EXISTS]","{CHANGE | MODIFY} [COLUMN] [IF EXISTS]","DROP [COLUMN] [IF EXISTS]","RENAME [TO]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","SET {VISIBLE | INVISIBLE}","TRUNCATE [TABLE]","ALTER DATABASE","ALTER DATABASE COMMENT","ALTER EVENT","ALTER FUNCTION","ALTER PROCEDURE","ALTER SCHEMA","ALTER SCHEMA COMMENT","ALTER SEQUENCE","ALTER SERVER","ALTER USER","ALTER VIEW","ANALYZE","ANALYZE TABLE","BACKUP LOCK","BACKUP STAGE","BACKUP UNLOCK","BEGIN","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHECK TABLE","CHECK VIEW","CHECKSUM TABLE","COMMIT","CREATE AGGREGATE FUNCTION","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE INDEX","CREATE PROCEDURE","CREATE ROLE","CREATE SEQUENCE","CREATE SERVER","CREATE SPATIAL INDEX","CREATE TRIGGER","CREATE UNIQUE INDEX","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP INDEX","DROP PREPARE","DROP PROCEDURE","DROP ROLE","DROP SEQUENCE","DROP SERVER","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GET DIAGNOSTICS","GET DIAGNOSTICS CONDITION","GRANT","HANDLER","HELP","INSTALL PLUGIN","INSTALL SONAME","KILL","LOAD DATA INFILE","LOAD INDEX INTO CACHE","LOAD XML INFILE","LOCK TABLE","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","PURGE MASTER LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","REPAIR VIEW","RESET MASTER","RESET QUERY CACHE","RESET REPLICA","RESET SLAVE","RESIGNAL","REVOKE","ROLLBACK","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET GLOBAL TRANSACTION","SET NAMES","SET PASSWORD","SET ROLE","SET STATEMENT","SET TRANSACTION","SHOW","SHOW ALL REPLICAS STATUS","SHOW ALL SLAVES STATUS","SHOW AUTHORS","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW BINLOG STATUS","SHOW CHARACTER SET","SHOW CLIENT_STATISTICS","SHOW COLLATION","SHOW COLUMNS","SHOW CONTRIBUTORS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PACKAGE","SHOW CREATE PACKAGE BODY","SHOW CREATE PROCEDURE","SHOW CREATE SEQUENCE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINE INNODB STATUS","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW EXPLAIN","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW INDEXES","SHOW INDEX_STATISTICS","SHOW KEYS","SHOW LOCALES","SHOW MASTER LOGS","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PACKAGE BODY CODE","SHOW PACKAGE BODY STATUS","SHOW PACKAGE STATUS","SHOW PLUGINS","SHOW PLUGINS SONAME","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW QUERY_RESPONSE_TIME","SHOW RELAYLOG EVENTS","SHOW REPLICA","SHOW REPLICA HOSTS","SHOW REPLICA STATUS","SHOW SCHEMAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW SLAVE STATUS","SHOW STATUS","SHOW STORAGE ENGINES","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW USER_STATISTICS","SHOW VARIABLES","SHOW WARNINGS","SHOW WSREP_MEMBERSHIP","SHOW WSREP_STATUS","SHUTDOWN","SIGNAL","START ALL REPLICAS","START ALL SLAVES","START REPLICA","START SLAVE","START TRANSACTION","STOP ALL REPLICAS","STOP ALL SLAVES","STOP REPLICA","STOP SLAVE","UNINSTALL PLUGIN","UNINSTALL SONAME","UNLOCK TABLE","USE","XA BEGIN","XA COMMIT","XA END","XA PREPARE","XA RECOVER","XA ROLLBACK","XA START"]),eE=f(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]","MINUS [ALL | DISTINCT]"]),ec=f(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),eu=f(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),eT={tokenizerOptions:{reservedSelect:ea,reservedClauses:[...es,...el],reservedSetOperations:eE,reservedJoins:ec,reservedPhrases:eu,supportsXor:!0,reservedKeywords:eo,reservedFunctionNames:ei,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","&&","||","!"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return R.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{onelineClauses:el}},eR=v({all:["ACCESSIBLE","ACCOUNT","ACTION","ACTIVE","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ALWAYS","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASCII","ASENSITIVE","AT","ATTRIBUTE","AUTHENTICATION","AUTOEXTEND_SIZE","AUTO_INCREMENT","AVG","AVG_ROW_LENGTH","BACKUP","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BINLOG","BIT","BLOB","BLOCK","BOOL","BOOLEAN","BOTH","BTREE","BUCKETS","BY","BYTE","CACHE","CALL","CASCADE","CASCADED","CASE","CATALOG_NAME","CHAIN","CHALLENGE_RESPONSE","CHANGE","CHANGED","CHANNEL","CHAR","CHARACTER","CHARSET","CHECK","CHECKSUM","CIPHER","CLASS_ORIGIN","CLIENT","CLONE","CLOSE","COALESCE","CODE","COLLATE","COLLATION","COLUMN","COLUMNS","COLUMN_FORMAT","COLUMN_NAME","COMMENT","COMMIT","COMMITTED","COMPACT","COMPLETION","COMPONENT","COMPRESSED","COMPRESSION","CONCURRENT","CONDITION","CONNECTION","CONSISTENT","CONSTRAINT","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONTAINS","CONTEXT","CONTINUE","CONVERT","CPU","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CURSOR_NAME","DATA","DATABASE","DATABASES","DATAFILE","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULT_AUTH","DEFINER","DEFINITION","DELAYED","DELAY_KEY_WRITE","DELETE","DENSE_RANK","DESC","DESCRIBE","DESCRIPTION","DETERMINISTIC","DIAGNOSTICS","DIRECTORY","DISABLE","DISCARD","DISK","DISTINCT","DISTINCTROW","DIV","DO","DOUBLE","DROP","DUAL","DUMPFILE","DUPLICATE","DYNAMIC","EACH","ELSE","ELSEIF","EMPTY","ENABLE","ENCLOSED","ENCRYPTION","END","ENDS","ENFORCED","ENGINE","ENGINES","ENGINE_ATTRIBUTE","ENUM","ERROR","ERRORS","ESCAPE","ESCAPED","EVENT","EVENTS","EVERY","EXCEPT","EXCHANGE","EXCLUDE","EXECUTE","EXISTS","EXIT","EXPANSION","EXPIRE","EXPLAIN","EXPORT","EXTENDED","EXTENT_SIZE","FACTOR","FAILED_LOGIN_ATTEMPTS","FALSE","FAST","FAULTS","FETCH","FIELDS","FILE","FILE_BLOCK_SIZE","FILTER","FINISH","FIRST","FIRST_VALUE","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOLLOWS","FOR","FORCE","FOREIGN","FORMAT","FOUND","FROM","FULL","FULLTEXT","FUNCTION","GENERAL","GENERATED","GEOMCOLLECTION","GEOMETRY","GEOMETRYCOLLECTION","GET","GET_FORMAT","GET_MASTER_PUBLIC_KEY","GET_SOURCE_PUBLIC_KEY","GLOBAL","GRANT","GRANTS","GROUP","GROUPING","GROUPS","GROUP_REPLICATION","GTID_ONLY","HANDLER","HASH","HAVING","HELP","HIGH_PRIORITY","HISTOGRAM","HISTORY","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IGNORE","IGNORE_SERVER_IDS","IMPORT","IN","INACTIVE","INDEX","INDEXES","INFILE","INITIAL","INITIAL_SIZE","INITIATE","INNER","INOUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTALL","INSTANCE","IN","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERSECT","INTERVAL","INTO","INVISIBLE","INVOKER","IO","IO_AFTER_GTIDS","IO_BEFORE_GTIDS","IO_THREAD","IPC","IS","ISOLATION","ISSUER","ITERATE","JOIN","JSON","JSON_TABLE","JSON_VALUE","KEY","KEYRING","KEYS","KEY_BLOCK_SIZE","KILL","LAG","LANGUAGE","LAST","LAST_VALUE","LATERAL","LEAD","LEADING","LEAVE","LEAVES","LEFT","LESS","LEVEL","LIKE","LIMIT","LINEAR","LINES","LINESTRING","LIST","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCK","LOCKED","LOCKS","LOGFILE","LOGS","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER","MASTER_AUTO_POSITION","MASTER_BIND","MASTER_COMPRESSION_ALGORITHMS","MASTER_CONNECT_RETRY","MASTER_DELAY","MASTER_HEARTBEAT_PERIOD","MASTER_HOST","MASTER_LOG_FILE","MASTER_LOG_POS","MASTER_PASSWORD","MASTER_PORT","MASTER_PUBLIC_KEY_PATH","MASTER_RETRY_COUNT","MASTER_SSL","MASTER_SSL_CA","MASTER_SSL_CAPATH","MASTER_SSL_CERT","MASTER_SSL_CIPHER","MASTER_SSL_CRL","MASTER_SSL_CRLPATH","MASTER_SSL_KEY","MASTER_SSL_VERIFY_SERVER_CERT","MASTER_TLS_CIPHERSUITES","MASTER_TLS_VERSION","MASTER_USER","MASTER_ZSTD_COMPRESSION_LEVEL","MATCH","MAXVALUE","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_SIZE","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMBER","MEMORY","MERGE","MESSAGE_TEXT","MICROSECOND","MIDDLEINT","MIGRATE","MINUTE","MINUTE_MICROSECOND","MINUTE_SECOND","MIN_ROWS","MOD","MODE","MODIFIES","MODIFY","MONTH","MULTILINESTRING","MULTIPOINT","MULTIPOLYGON","MUTEX","MYSQL_ERRNO","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NDB","NDBCLUSTER","NESTED","NETWORK_NAMESPACE","NEVER","NEW","NEXT","NO","NODEGROUP","NONE","NOT","NOWAIT","NO_WAIT","NO_WRITE_TO_BINLOG","NTH_VALUE","NTILE","NULL","NULLS","NUMBER","NUMERIC","NVARCHAR","OF","OFF","OFFSET","OJ","OLD","ON","ONE","ONLY","OPEN","OPTIMIZE","OPTIMIZER_COSTS","OPTION","OPTIONAL","OPTIONALLY","OPTIONS","OR","ORDER","ORDINALITY","ORGANIZATION","OTHERS","OUT","OUTER","OUTFILE","OVER","OWNER","PACK_KEYS","PAGE","PARSER","PARTIAL","PARTITION","PARTITIONING","PARTITIONS","PASSWORD","PASSWORD_LOCK_TIME","PATH","PERCENT_RANK","PERSIST","PERSIST_ONLY","PHASE","PLUGIN","PLUGINS","PLUGIN_DIR","POINT","POLYGON","PORT","PRECEDES","PRECEDING","PRECISION","PREPARE","PRESERVE","PREV","PRIMARY","PRIVILEGES","PRIVILEGE_CHECKS_USER","PROCEDURE","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROXY","PURGE","QUARTER","QUERY","QUICK","RANDOM","RANGE","RANK","READ","READS","READ_ONLY","READ_WRITE","REAL","REBUILD","RECOVER","RECURSIVE","REDO_BUFFER_SIZE","REDUNDANT","REFERENCE","REFERENCES","REGEXP","REGISTRATION","RELAY","RELAYLOG","RELAY_LOG_FILE","RELAY_LOG_POS","RELAY_THREAD","RELEASE","RELOAD","REMOVE","RENAME","REORGANIZE","REPAIR","REPEAT","REPEATABLE","REPLACE","REPLICA","REPLICAS","REPLICATE_DO_DB","REPLICATE_DO_TABLE","REPLICATE_IGNORE_DB","REPLICATE_IGNORE_TABLE","REPLICATE_REWRITE_DB","REPLICATE_WILD_DO_TABLE","REPLICATE_WILD_IGNORE_TABLE","REPLICATION","REQUIRE","REQUIRE_ROW_FORMAT","RESET","RESIGNAL","RESOURCE","RESPECT","RESTART","RESTORE","RESTRICT","RESUME","RETAIN","RETURN","RETURNED_SQLSTATE","RETURNING","RETURNS","REUSE","REVERSE","REVOKE","RIGHT","RLIKE","ROLE","ROLLBACK","ROLLUP","ROTATE","ROUTINE","ROW","ROWS","ROW_COUNT","ROW_FORMAT","ROW_NUMBER","RTREE","SAVEPOINT","SCHEDULE","SCHEMA","SCHEMAS","SCHEMA_NAME","SECOND","SECONDARY","SECONDARY_ENGINE","SECONDARY_ENGINE_ATTRIBUTE","SECONDARY_LOAD","SECONDARY_UNLOAD","SECOND_MICROSECOND","SECURITY","SELECT","SENSITIVE","SEPARATOR","SERIAL","SERIALIZABLE","SERVER","SESSION","SET","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMPLE","SKIP","SLAVE","SLOW","SMALLINT","SNAPSHOT","SOCKET","SOME","SONAME","SOUNDS","SOURCE","SOURCE_AUTO_POSITION","SOURCE_BIND","SOURCE_COMPRESSION_ALGORITHMS","SOURCE_CONNECT_RETRY","SOURCE_DELAY","SOURCE_HEARTBEAT_PERIOD","SOURCE_HOST","SOURCE_LOG_FILE","SOURCE_LOG_POS","SOURCE_PASSWORD","SOURCE_PORT","SOURCE_PUBLIC_KEY_PATH","SOURCE_RETRY_COUNT","SOURCE_SSL","SOURCE_SSL_CA","SOURCE_SSL_CAPATH","SOURCE_SSL_CERT","SOURCE_SSL_CIPHER","SOURCE_SSL_CRL","SOURCE_SSL_CRLPATH","SOURCE_SSL_KEY","SOURCE_SSL_VERIFY_SERVER_CERT","SOURCE_TLS_CIPHERSUITES","SOURCE_TLS_VERSION","SOURCE_USER","SOURCE_ZSTD_COMPRESSION_LEVEL","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_AFTER_GTIDS","SQL_AFTER_MTS_GAPS","SQL_BEFORE_GTIDS","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CALC_FOUND_ROWS","SQL_NO_CACHE","SQL_SMALL_RESULT","SQL_THREAD","SQL_TSI_DAY","SQL_TSI_HOUR","SQL_TSI_MINUTE","SQL_TSI_MONTH","SQL_TSI_QUARTER","SQL_TSI_SECOND","SQL_TSI_WEEK","SQL_TSI_YEAR","SRID","SSL","STACKED","START","STARTING","STARTS","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STATUS","STOP","STORAGE","STORED","STRAIGHT_JOIN","STREAM","STRING","SUBCLASS_ORIGIN","SUBJECT","SUBPARTITION","SUBPARTITIONS","SUPER","SUSPEND","SWAPS","SWITCHES","SYSTEM","TABLE","TABLES","TABLESPACE","TABLE_CHECKSUM","TABLE_NAME","TEMPORARY","TEMPTABLE","TERMINATED","TEXT","THAN","THEN","THREAD_PRIORITY","TIES","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TINYBLOB","TINYINT","TINYTEXT","TLS","TO","TRAILING","TRANSACTION","TRIGGER","TRIGGERS","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO","UNDOFILE","UNDO_BUFFER_SIZE","UNICODE","UNINSTALL","UNION","UNIQUE","UNKNOWN","UNLOCK","UNREGISTER","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USER_RESOURCES","USE_FRM","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARIABLES","VARYING","VCPU","VIEW","VIRTUAL","VISIBLE","WAIT","WARNINGS","WEEK","WEIGHT_STRING","WHEN","WHERE","WHILE","WINDOW","WITH","WITHOUT","WORK","WRAPPER","WRITE","X509","XA","XID","XML","XOR","YEAR","YEAR_MONTH","ZEROFILL","ZONE"]}),eA=v({all:["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","ASCII","ASIN","ATAN","ATAN2","AVG","BENCHMARK","BIN","BIN_TO_UUID","BINARY","BIT_AND","BIT_COUNT","BIT_LENGTH","BIT_OR","BIT_XOR","CAN_ACCESS_COLUMN","CAN_ACCESS_DATABASE","CAN_ACCESS_TABLE","CAN_ACCESS_USER","CAN_ACCESS_VIEW","CAST","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COMPRESS","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CRC32","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEFAULT","DEGREES","DENSE_RANK","DIV","ELT","EXP","EXPORT_SET","EXTRACT","EXTRACTVALUE","FIELD","FIND_IN_SET","FIRST_VALUE","FLOOR","FORMAT","FORMAT_BYTES","FORMAT_PICO_TIME","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOMCOLLECTION","GEOMETRYCOLLECTION","GET_DD_COLUMN_PRIVILEGES","GET_DD_CREATE_OPTIONS","GET_DD_INDEX_SUB_PART_LENGTH","GET_FORMAT","GET_LOCK","GREATEST","GROUP_CONCAT","GROUPING","GTID_SUBSET","GTID_SUBTRACT","HEX","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INSERT","INSTR","INTERNAL_AUTO_INCREMENT","INTERNAL_AVG_ROW_LENGTH","INTERNAL_CHECK_TIME","INTERNAL_CHECKSUM","INTERNAL_DATA_FREE","INTERNAL_DATA_LENGTH","INTERNAL_DD_CHAR_LENGTH","INTERNAL_GET_COMMENT_OR_ERROR","INTERNAL_GET_ENABLED_ROLE_JSON","INTERNAL_GET_HOSTNAME","INTERNAL_GET_USERNAME","INTERNAL_GET_VIEW_WARNING_OR_ERROR","INTERNAL_INDEX_COLUMN_CARDINALITY","INTERNAL_INDEX_LENGTH","INTERNAL_IS_ENABLED_ROLE","INTERNAL_IS_MANDATORY_ROLE","INTERNAL_KEYS_DISABLED","INTERNAL_MAX_DATA_LENGTH","INTERNAL_TABLE_ROWS","INTERNAL_UPDATE_TIME","INTERVAL","IS","IS_FREE_LOCK","IS_IPV4","IS_IPV4_COMPAT","IS_IPV4_MAPPED","IS_IPV6","IS NOT","IS NOT NULL","IS NULL","IS_USED_LOCK","IS_UUID","ISNULL","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_ARRAYAGG","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_OBJECT","JSON_OBJECTAGG","JSON_OVERLAPS","JSON_PRETTY","JSON_QUOTE","JSON_REMOVE","JSON_REPLACE","JSON_SCHEMA_VALID","JSON_SCHEMA_VALIDATION_REPORT","JSON_SEARCH","JSON_SET","JSON_STORAGE_FREE","JSON_STORAGE_SIZE","JSON_TABLE","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAG","LAST_DAY","LAST_INSERT_ID","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LINESTRING","LN","LOAD_FILE","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","MAKE_SET","MAKEDATE","MAKETIME","MASTER_POS_WAIT","MATCH","MAX","MBRCONTAINS","MBRCOVEREDBY","MBRCOVERS","MBRDISJOINT","MBREQUALS","MBRINTERSECTS","MBROVERLAPS","MBRTOUCHES","MBRWITHIN","MD5","MEMBER OF","MICROSECOND","MID","MIN","MINUTE","MOD","MONTH","MONTHNAME","MULTILINESTRING","MULTIPOINT","MULTIPOLYGON","NAME_CONST","NOT","NOT IN","NOT LIKE","NOT REGEXP","NOW","NTH_VALUE","NTILE","NULLIF","OCT","OCTET_LENGTH","ORD","PERCENT_RANK","PERIOD_ADD","PERIOD_DIFF","PI","POINT","POLYGON","POSITION","POW","POWER","PS_CURRENT_THREAD_ID","PS_THREAD_ID","QUARTER","QUOTE","RADIANS","RAND","RANDOM_BYTES","RANK","REGEXP","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROLES_GRAPHML","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCHEMA","SEC_TO_TIME","SECOND","SESSION_USER","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_BUFFER","ST_BUFFER_STRATEGY","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_CONVEXHULL","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DISTANCE_SPHERE","ST_ENDPOINT","ST_ENVELOPE","ST_EQUALS","ST_EXTERIORRING","ST_FRECHETDISTANCE","ST_GEOHASH","ST_GEOMCOLLFROMTEXT","ST_GEOMCOLLFROMWKB","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMGEOJSON","ST_GEOMFROMTEXT","ST_GEOMFROMWKB","ST_HAUSDORFFDISTANCE","ST_INTERIORRINGN","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISSIMPLE","ST_ISVALID","ST_LATFROMGEOHASH","ST_LATITUDE","ST_LENGTH","ST_LINEFROMTEXT","ST_LINEFROMWKB","ST_LINEINTERPOLATEPOINT","ST_LINEINTERPOLATEPOINTS","ST_LONGFROMGEOHASH","ST_LONGITUDE","ST_MAKEENVELOPE","ST_MLINEFROMTEXT","ST_MLINEFROMWKB","ST_MPOINTFROMTEXT","ST_MPOINTFROMWKB","ST_MPOLYFROMTEXT","ST_MPOLYFROMWKB","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINTATDISTANCE","ST_POINTFROMGEOHASH","ST_POINTFROMTEXT","ST_POINTFROMWKB","ST_POINTN","ST_POLYFROMTEXT","ST_POLYFROMWKB","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SWAPXY","ST_SYMDIFFERENCE","ST_TOUCHES","ST_TRANSFORM","ST_UNION","ST_VALIDATE","ST_WITHIN","ST_X","ST_Y","STATEMENT_DIGEST","STATEMENT_DIGEST_TEXT","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","STRCMP","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUBTIME","SUM","SYSDATE","SYSTEM_USER","TAN","TIME","TIME_FORMAT","TIME_TO_SEC","TIMEDIFF","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TO_BASE64","TO_DAYS","TO_SECONDS","TRIM","TRUNCATE","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","USER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","UUID_SHORT","UUID_TO_BIN","VALIDATE_PASSWORD_STRENGTH","VALUES","VAR_POP","VAR_SAMP","VARIANCE","VERSION","WAIT_FOR_EXECUTED_GTID_SET","WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS","WEEK","WEEKDAY","WEEKOFYEAR","WEIGHT_STRING","YEAR","YEARWEEK","BIT","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","DATETIME","TIMESTAMP","TIME","YEAR","CHAR","NATIONAL CHAR","VARCHAR","NATIONAL VARCHAR","BINARY","VARBINARY","BLOB","TEXT","ENUM"]}),ed=f(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),ef=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","SET","CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY] TABLE [IF NOT EXISTS]"]),eS=f(["UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","{CHANGE | MODIFY} [COLUMN]","DROP [COLUMN]","RENAME [TO | AS]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","TRUNCATE [TABLE]","ALTER DATABASE","ALTER EVENT","ALTER FUNCTION","ALTER INSTANCE","ALTER LOGFILE GROUP","ALTER PROCEDURE","ALTER RESOURCE GROUP","ALTER SERVER","ALTER TABLESPACE","ALTER USER","ALTER VIEW","ANALYZE TABLE","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK TABLE","CHECKSUM TABLE","CLONE","COMMIT","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE FUNCTION","CREATE INDEX","CREATE LOGFILE GROUP","CREATE PROCEDURE","CREATE RESOURCE GROUP","CREATE ROLE","CREATE SERVER","CREATE SPATIAL REFERENCE SYSTEM","CREATE TABLESPACE","CREATE TRIGGER","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP FUNCTION","DROP INDEX","DROP LOGFILE GROUP","DROP PROCEDURE","DROP RESOURCE GROUP","DROP ROLE","DROP SERVER","DROP SPATIAL REFERENCE SYSTEM","DROP TABLESPACE","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GRANT","HANDLER","HELP","IMPORT TABLE","INSTALL COMPONENT","INSTALL PLUGIN","KILL","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SOURCE_POS_WAIT","START GROUP_REPLICATION","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP REPLICA","STOP SLAVE","TABLE","UNINSTALL COMPONENT","UNINSTALL PLUGIN","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),ep=f(["UNION [ALL | DISTINCT]"]),eO=f(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),eI=f(["ON {UPDATE | DELETE} [SET NULL]","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),eN={tokenizerOptions:{reservedSelect:ed,reservedClauses:[...ef,...eS],reservedSetOperations:ep,reservedJoins:eO,reservedPhrases:eI,supportsXor:!0,reservedKeywords:eR,reservedFunctionNames:eA,stringTypes:['""-qq-bs',{quote:"''-qq-bs",prefixes:["N"]},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","->","->>","&&","||","!"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return R.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{onelineClauses:eS}},eC=v({all:["ABORT","ABS","ACOS","ADVISOR","ARRAY_AGG","ARRAY_AGG","ARRAY_APPEND","ARRAY_AVG","ARRAY_BINARY_SEARCH","ARRAY_CONCAT","ARRAY_CONTAINS","ARRAY_COUNT","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_FLATTEN","ARRAY_IFNULL","ARRAY_INSERT","ARRAY_INTERSECT","ARRAY_LENGTH","ARRAY_MAX","ARRAY_MIN","ARRAY_MOVE","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_PUT","ARRAY_RANGE","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_REPLACE","ARRAY_REVERSE","ARRAY_SORT","ARRAY_STAR","ARRAY_SUM","ARRAY_SYMDIFF","ARRAY_SYMDIFF1","ARRAY_SYMDIFFN","ARRAY_UNION","ASIN","ATAN","ATAN2","AVG","BASE64","BASE64_DECODE","BASE64_ENCODE","BITAND ","BITCLEAR ","BITNOT ","BITOR ","BITSET ","BITSHIFT ","BITTEST ","BITXOR ","CEIL","CLOCK_LOCAL","CLOCK_MILLIS","CLOCK_STR","CLOCK_TZ","CLOCK_UTC","COALESCE","CONCAT","CONCAT2","CONTAINS","CONTAINS_TOKEN","CONTAINS_TOKEN_LIKE","CONTAINS_TOKEN_REGEXP","COS","COUNT","COUNT","COUNTN","CUME_DIST","CURL","DATE_ADD_MILLIS","DATE_ADD_STR","DATE_DIFF_MILLIS","DATE_DIFF_STR","DATE_FORMAT_STR","DATE_PART_MILLIS","DATE_PART_STR","DATE_RANGE_MILLIS","DATE_RANGE_STR","DATE_TRUNC_MILLIS","DATE_TRUNC_STR","DECODE","DECODE_JSON","DEGREES","DENSE_RANK","DURATION_TO_STR","ENCODED_SIZE","ENCODE_JSON","EXP","FIRST_VALUE","FLOOR","GREATEST","HAS_TOKEN","IFINF","IFMISSING","IFMISSINGORNULL","IFNAN","IFNANORINF","IFNULL","INITCAP","ISARRAY","ISATOM","ISBITSET","ISBOOLEAN","ISNUMBER","ISOBJECT","ISSTRING","LAG","LAST_VALUE","LEAD","LEAST","LENGTH","LN","LOG","LOWER","LTRIM","MAX","MEAN","MEDIAN","META","MILLIS","MILLIS_TO_LOCAL","MILLIS_TO_STR","MILLIS_TO_TZ","MILLIS_TO_UTC","MILLIS_TO_ZONE_NAME","MIN","MISSINGIF","NANIF","NEGINFIF","NOW_LOCAL","NOW_MILLIS","NOW_STR","NOW_TZ","NOW_UTC","NTH_VALUE","NTILE","NULLIF","NVL","NVL2","OBJECT_ADD","OBJECT_CONCAT","OBJECT_INNER_PAIRS","OBJECT_INNER_VALUES","OBJECT_LENGTH","OBJECT_NAMES","OBJECT_PAIRS","OBJECT_PUT","OBJECT_REMOVE","OBJECT_RENAME","OBJECT_REPLACE","OBJECT_UNWRAP","OBJECT_VALUES","PAIRS","PERCENT_RANK","PI","POLY_LENGTH","POSINFIF","POSITION","POWER","RADIANS","RANDOM","RANK","RATIO_TO_REPORT","REGEXP_CONTAINS","REGEXP_LIKE","REGEXP_MATCHES","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGEX_CONTAINS","REGEX_LIKE","REGEX_MATCHES","REGEX_POSITION","REGEX_REPLACE","REGEX_SPLIT","REPEAT","REPLACE","REVERSE","ROUND","ROW_NUMBER","RTRIM","SEARCH","SEARCH_META","SEARCH_SCORE","SIGN","SIN","SPLIT","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DURATION","STR_TO_MILLIS","STR_TO_TZ","STR_TO_UTC","STR_TO_ZONE_NAME","SUBSTR","SUFFIXES","SUM","TAN","TITLE","TOARRAY","TOATOM","TOBOOLEAN","TOKENS","TOKENS","TONUMBER","TOOBJECT","TOSTRING","TRIM","TRUNC","UPPER","UUID","VARIANCE","VARIANCE_POP","VARIANCE_SAMP","VAR_POP","VAR_SAMP","WEEKDAY_MILLIS","WEEKDAY_STR","CAST"]}),eh=v({all:["ADVISE","ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","AT","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","COMMITTED","CONNECT","CONTINUE","CORRELATED","COVER","CREATE","CURRENT","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FILTER","FIRST","FLATTEN","FLUSH","FOLLOWING","FOR","FORCE","FROM","FTS","FUNCTION","GOLANG","GRANT","GROUP","GROUPS","GSI","HASH","HAVING","IF","ISOLATION","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JAVASCRIPT","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LANGUAGE","LAST","LEFT","LET","LETTING","LEVEL","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MINUS","MISSING","NAMESPACE","NEST","NL","NO","NOT","NTH_VALUE","NULL","NULLS","NUMBER","OBJECT","OFFSET","ON","OPTION","OPTIONS","OR","ORDER","OTHERS","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PRECEDING","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROBE","PROCEDURE","PUBLIC","RANGE","RAW","REALM","REDUCE","RENAME","RESPECT","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","ROW","ROWS","SATISFIES","SAVEPOINT","SCHEMA","SCOPE","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TIES","TO","TRAN","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WORK","XOR"]}),em=f(["SELECT [ALL | DISTINCT]"]),eg=f(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED THEN","UPDATE SET","INSERT","NEST","UNNEST","RETURNING"]),e_=f(["UPDATE","DELETE FROM","SET SCHEMA","ADVISE","ALTER INDEX","BEGIN TRANSACTION","BUILD INDEX","COMMIT TRANSACTION","CREATE COLLECTION","CREATE FUNCTION","CREATE INDEX","CREATE PRIMARY INDEX","CREATE SCOPE","DROP COLLECTION","DROP FUNCTION","DROP INDEX","DROP PRIMARY INDEX","DROP SCOPE","EXECUTE","EXECUTE FUNCTION","EXPLAIN","GRANT","INFER","PREPARE","REVOKE","ROLLBACK TRANSACTION","SAVEPOINT","SET TRANSACTION","UPDATE STATISTICS","UPSERT","LET","SET CURRENT SCHEMA","SHOW","USE [PRIMARY] KEYS"]),eL=f(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),ev=f(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","INNER JOIN"]),eP=f(["{ROWS | RANGE | GROUPS} BETWEEN"]),ey={tokenizerOptions:{reservedSelect:em,reservedClauses:[...eg,...e_],reservedSetOperations:eL,reservedJoins:ev,reservedPhrases:eP,supportsXor:!0,reservedKeywords:eh,reservedFunctionNames:eC,stringTypes:['""-bs',"''-bs"],identTypes:["``"],extraParens:["[]","{}"],paramTypes:{positional:!0,numbered:["$"],named:["$"]},lineCommentTypes:["#","--"],operators:["%","==",":","||"]},formatOptions:{onelineClauses:e_}},eb=v({all:["ADD","AGENT","AGGREGATE","ALL","ALTER","AND","ANY","ARRAY","ARROW","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BEGIN","BETWEEN","BFILE_BASE","BINARY","BLOB_BASE","BLOCK","BODY","BOTH","BOUND","BULK","BY","BYTE","CALL","CALLING","CASCADE","CASE","CHAR","CHAR_BASE","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLOSE","CLUSTER","CLUSTERS","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONVERT","COUNT","CRASH","CREATE","CURRENT","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE","DATE_BASE","DAY","DECIMAL","DECLARE","DEFAULT","DEFINE","DELETE","DESC","DETERMINISTIC","DISTINCT","DOUBLE","DROP","DURATION","ELEMENT","ELSE","ELSIF","EMPTY","END","ESCAPE","EXCEPT","EXCEPTION","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FINAL","FIXED","FLOAT","FOR","FORALL","FORCE","FORM","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HAVING","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSERT","INSTANTIABLE","INT","INTERFACE","INTERSECT","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMIT","LIMITED","LOCAL","LOCK","LONG","LOOP","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUS","MINUTE","MOD","MODE","MODIFY","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NCHAR","NEW","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NUMBER_BASE","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","OR","ORACLE","ORADATA","ORDER","OVERLAPS","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARTITION","PASCAL","PIPE","PIPELINED","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","RECORD","REF","REFERENCE","REM","REMAINDER","RENAME","RESOURCE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SECOND","SEGMENT","SELECT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SET","SHARE","SHORT","SIZE","SIZE_T","SOME","SPARSE","SQL","SQLCODE","SQLDATA","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUM","SYNONYM","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSAC","TRANSACTIONAL","TRUSTED","TYPE","UB1","UB2","UB4","UNDER","UNION","UNIQUE","UNSIGNED","UNTRUSTED","UPDATE","USE","USING","VALIST","VALUE","VALUES","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHEN","WHERE","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"]}),eD=v({numeric:["ABS","ACOS","ASIN","ATAN","ATAN2","BITAND","CEIL","COS","COSH","EXP","FLOOR","LN","LOG","MOD","NANVL","POWER","REMAINDER","ROUND","SIGN","SIN","SINH","SQRT","TAN","TANH","TRUNC","WIDTH_BUCKET"],character:["CHR","CONCAT","INITCAP","LOWER","LPAD","LTRIM","NLS_INITCAP","NLS_LOWER","NLSSORT","NLS_UPPER","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","RPAD","RTRIM","SOUNDEX","SUBSTR","TRANSLATE","TREAT","TRIM","UPPER","NLS_CHARSET_DECL_LEN","NLS_CHARSET_ID","NLS_CHARSET_NAME","ASCII","INSTR","LENGTH","REGEXP_INSTR"],datetime:["ADD_MONTHS","CURRENT_DATE","CURRENT_TIMESTAMP","DBTIMEZONE","EXTRACT","FROM_TZ","LAST_DAY","LOCALTIMESTAMP","MONTHS_BETWEEN","NEW_TIME","NEXT_DAY","NUMTODSINTERVAL","NUMTOYMINTERVAL","ROUND","SESSIONTIMEZONE","SYS_EXTRACT_UTC","SYSDATE","SYSTIMESTAMP","TO_CHAR","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_DSINTERVAL","TO_YMINTERVAL","TRUNC","TZ_OFFSET"],comparison:["GREATEST","LEAST"],conversion:["ASCIISTR","BIN_TO_NUM","CAST","CHARTOROWID","COMPOSE","CONVERT","DECOMPOSE","HEXTORAW","NUMTODSINTERVAL","NUMTOYMINTERVAL","RAWTOHEX","RAWTONHEX","ROWIDTOCHAR","ROWIDTONCHAR","SCN_TO_TIMESTAMP","TIMESTAMP_TO_SCN","TO_BINARY_DOUBLE","TO_BINARY_FLOAT","TO_CHAR","TO_CLOB","TO_DATE","TO_DSINTERVAL","TO_LOB","TO_MULTI_BYTE","TO_NCHAR","TO_NCLOB","TO_NUMBER","TO_DSINTERVAL","TO_SINGLE_BYTE","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_YMINTERVAL","TO_YMINTERVAL","TRANSLATE","UNISTR"],largeObject:["BFILENAME","EMPTY_BLOB,","EMPTY_CLOB"],collection:["CARDINALITY","COLLECT","POWERMULTISET","POWERMULTISET_BY_CARDINALITY","SET"],hierarchical:["SYS_CONNECT_BY_PATH"],dataMining:["CLUSTER_ID","CLUSTER_PROBABILITY","CLUSTER_SET","FEATURE_ID","FEATURE_SET","FEATURE_VALUE","PREDICTION","PREDICTION_COST","PREDICTION_DETAILS","PREDICTION_PROBABILITY","PREDICTION_SET"],xml:["APPENDCHILDXML","DELETEXML","DEPTH","EXTRACT","EXISTSNODE","EXTRACTVALUE","INSERTCHILDXML","INSERTXMLBEFORE","PATH","SYS_DBURIGEN","SYS_XMLAGG","SYS_XMLGEN","UPDATEXML","XMLAGG","XMLCDATA","XMLCOLATTVAL","XMLCOMMENT","XMLCONCAT","XMLFOREST","XMLPARSE","XMLPI","XMLQUERY","XMLROOT","XMLSEQUENCE","XMLSERIALIZE","XMLTABLE","XMLTRANSFORM"],encoding:["DECODE","DUMP","ORA_HASH","VSIZE"],nullRelated:["COALESCE","LNNVL","NULLIF","NVL","NVL2"],env:["SYS_CONTEXT","SYS_GUID","SYS_TYPEID","UID","USER","USERENV"],aggregate:["AVG","COLLECT","CORR","CORR_S","CORR_K","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","FIRST","GROUP_ID","GROUPING","GROUPING_ID","LAST","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANK","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","STATS_BINOMIAL_TEST","STATS_CROSSTAB","STATS_F_TEST","STATS_KS_TEST","STATS_MODE","STATS_MW_TEST","STATS_ONE_WAY_ANOVA","STATS_T_TEST_ONE","STATS_T_TEST_PAIRED","STATS_T_TEST_INDEP","STATS_T_TEST_INDEPU","STATS_WSR_TEST","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],window:["FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTILE","RATIO_TO_REPORT","ROW_NUMBER"],objectReference:["DEREF","MAKE_REF","REF","REFTOHEX","VALUE"],model:["CV","ITERATION_NUMBER","PRESENTNNV","PRESENTV","PREVIOUS"],dataTypes:["VARCHAR2","NVARCHAR2","NUMBER","FLOAT","TIMESTAMP","INTERVAL YEAR","INTERVAL DAY","RAW","UROWID","NCHAR","CHARACTER","CHAR","CHARACTER VARYING","CHAR VARYING","NATIONAL CHARACTER","NATIONAL CHAR","NATIONAL CHARACTER VARYING","NATIONAL CHAR VARYING","NCHAR VARYING","NUMERIC","DECIMAL","FLOAT","VARCHAR"]}),eM=f(["SELECT [ALL | DISTINCT | UNIQUE]"]),eU=f(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER [SIBLINGS] BY","OFFSET","FETCH {FIRST | NEXT}","FOR UPDATE [OF]","INSERT [INTO | ALL INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [THEN]","UPDATE SET","CREATE [OR REPLACE] [NO FORCE | FORCE] [EDITIONING | EDITIONABLE | EDITIONABLE EDITIONING | NONEDITIONABLE] VIEW","CREATE MATERIALIZED VIEW","CREATE [GLOBAL TEMPORARY | PRIVATE TEMPORARY | SHARDED | DUPLICATED | IMMUTABLE BLOCKCHAIN | BLOCKCHAIN | IMMUTABLE] TABLE","RETURNING"]),ex=f(["UPDATE [ONLY]","DELETE FROM [ONLY]","DROP TABLE","ALTER TABLE","ADD","DROP {COLUMN | UNUSED COLUMNS | COLUMNS CONTINUE}","MODIFY","RENAME TO","RENAME COLUMN","TRUNCATE TABLE","SET SCHEMA","BEGIN","CONNECT BY","DECLARE","EXCEPT","EXCEPTION","LOOP","START WITH"]),eG=f(["UNION [ALL]","EXCEPT","INTERSECT"]),eF=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | OUTER} APPLY"]),eH=f(["ON {UPDATE | DELETE} [SET NULL]","ON COMMIT","{ROWS | RANGE} BETWEEN"]),eB={tokenizerOptions:{reservedSelect:eM,reservedClauses:[...eU,...ex],reservedSetOperations:eG,reservedJoins:eF,reservedPhrases:eH,supportsXor:!0,reservedKeywords:eb,reservedFunctionNames:eD,stringTypes:[{quote:"''-qq",prefixes:["N"]},{quote:"q''",prefixes:["N"]}],identTypes:['""-qq'],identChars:{rest:"$#"},variableTypes:[{regex:"&{1,2}[A-Za-z][A-Za-z0-9_$#]*"}],paramTypes:{numbered:[":"],named:[":"]},paramChars:{},operators:["**",":=","%","~=","^=",">>","<<","=>","@","||"],postProcess:function(e){let t=u;return e.map(e=>R.SET(e)&&R.BY(t)?{...e,type:r.RESERVED_KEYWORD}:(A(e.type)&&(t=e),e))}},formatOptions:{alwaysDenseOperators:["@"],onelineClauses:ex}},ew=v({math:["ABS","ACOS","ACOSD","ACOSH","ASIN","ASIND","ASINH","ATAN","ATAN2","ATAN2D","ATAND","ATANH","CBRT","CEIL","CEILING","COS","COSD","COSH","COT","COTD","DEGREES","DIV","EXP","FACTORIAL","FLOOR","GCD","LCM","LN","LOG","LOG10","MIN_SCALE","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SCALE","SETSEED","SIGN","SIN","SIND","SINH","SQRT","TAN","TAND","TANH","TRIM_SCALE","TRUNC","WIDTH_BUCKET"],string:["ABS","ASCII","BIT_LENGTH","BTRIM","CHARACTER_LENGTH","CHAR_LENGTH","CHR","CONCAT","CONCAT_WS","FORMAT","INITCAP","LEFT","LENGTH","LOWER","LPAD","LTRIM","MD5","NORMALIZE","OCTET_LENGTH","OVERLAY","PARSE_IDENT","PG_CLIENT_ENCODING","POSITION","QUOTE_IDENT","QUOTE_LITERAL","QUOTE_NULLABLE","REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE","REPEAT","REPLACE","REVERSE","RIGHT","RPAD","RTRIM","SPLIT_PART","SPRINTF","STARTS_WITH","STRING_AGG","STRING_TO_ARRAY","STRING_TO_TABLE","STRPOS","SUBSTR","SUBSTRING","TO_ASCII","TO_HEX","TRANSLATE","TRIM","UNISTR","UPPER"],binary:["BIT_COUNT","BIT_LENGTH","BTRIM","CONVERT","CONVERT_FROM","CONVERT_TO","DECODE","ENCODE","GET_BIT","GET_BYTE","LENGTH","LTRIM","MD5","OCTET_LENGTH","OVERLAY","POSITION","RTRIM","SET_BIT","SET_BYTE","SHA224","SHA256","SHA384","SHA512","STRING_AGG","SUBSTR","SUBSTRING","TRIM"],bitstring:["BIT_COUNT","BIT_LENGTH","GET_BIT","LENGTH","OCTET_LENGTH","OVERLAY","POSITION","SET_BIT","SUBSTRING"],pattern:["REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE"],datatype:["TO_CHAR","TO_DATE","TO_NUMBER","TO_TIMESTAMP"],datetime:["CLOCK_TIMESTAMP","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_BIN","DATE_PART","DATE_TRUNC","EXTRACT","ISFINITE","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL","LOCALTIME","LOCALTIMESTAMP","MAKE_DATE","MAKE_INTERVAL","MAKE_TIME","MAKE_TIMESTAMP","MAKE_TIMESTAMPTZ","NOW","PG_SLEEP","PG_SLEEP_FOR","PG_SLEEP_UNTIL","STATEMENT_TIMESTAMP","TIMEOFDAY","TO_TIMESTAMP","TRANSACTION_TIMESTAMP"],enum:["ENUM_FIRST","ENUM_LAST","ENUM_RANGE"],geometry:["AREA","BOUND_BOX","BOX","CENTER","CIRCLE","DIAGONAL","DIAMETER","HEIGHT","ISCLOSED","ISOPEN","LENGTH","LINE","LSEG","NPOINTS","PATH","PCLOSE","POINT","POLYGON","POPEN","RADIUS","SLOPE","WIDTH"],network:["ABBREV","BROADCAST","FAMILY","HOST","HOSTMASK","INET_MERGE","INET_SAME_FAMILY","MACADDR8_SET7BIT","MASKLEN","NETMASK","NETWORK","SET_MASKLEN","TEXT","TRUNC"],textsearch:["ARRAY_TO_TSVECTOR","GET_CURRENT_TS_CONFIG","JSONB_TO_TSVECTOR","JSON_TO_TSVECTOR","LENGTH","NUMNODE","PHRASETO_TSQUERY","PLAINTO_TSQUERY","QUERYTREE","SETWEIGHT","STRIP","TO_TSQUERY","TO_TSVECTOR","TSQUERY_PHRASE","TSVECTOR_TO_ARRAY","TS_DEBUG","TS_DELETE","TS_FILTER","TS_HEADLINE","TS_LEXIZE","TS_PARSE","TS_RANK","TS_RANK_CD","TS_REWRITE","TS_STAT","TS_TOKEN_TYPE","WEBSEARCH_TO_TSQUERY"],uuid:["UUID"],xml:["CURSOR_TO_XML","CURSOR_TO_XMLSCHEMA","DATABASE_TO_XML","DATABASE_TO_XMLSCHEMA","DATABASE_TO_XML_AND_XMLSCHEMA","NEXTVAL","QUERY_TO_XML","QUERY_TO_XMLSCHEMA","QUERY_TO_XML_AND_XMLSCHEMA","SCHEMA_TO_XML","SCHEMA_TO_XMLSCHEMA","SCHEMA_TO_XML_AND_XMLSCHEMA","STRING","TABLE_TO_XML","TABLE_TO_XMLSCHEMA","TABLE_TO_XML_AND_XMLSCHEMA","XMLAGG","XMLCOMMENT","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","XML_IS_WELL_FORMED","XML_IS_WELL_FORMED_CONTENT","XML_IS_WELL_FORMED_DOCUMENT","XPATH","XPATH_EXISTS"],json:["ARRAY_TO_JSON","JSONB_AGG","JSONB_ARRAY_ELEMENTS","JSONB_ARRAY_ELEMENTS_TEXT","JSONB_ARRAY_LENGTH","JSONB_BUILD_ARRAY","JSONB_BUILD_OBJECT","JSONB_EACH","JSONB_EACH_TEXT","JSONB_EXTRACT_PATH","JSONB_EXTRACT_PATH_TEXT","JSONB_INSERT","JSONB_OBJECT","JSONB_OBJECT_AGG","JSONB_OBJECT_KEYS","JSONB_PATH_EXISTS","JSONB_PATH_EXISTS_TZ","JSONB_PATH_MATCH","JSONB_PATH_MATCH_TZ","JSONB_PATH_QUERY","JSONB_PATH_QUERY_ARRAY","JSONB_PATH_QUERY_ARRAY_TZ","JSONB_PATH_QUERY_FIRST","JSONB_PATH_QUERY_FIRST_TZ","JSONB_PATH_QUERY_TZ","JSONB_POPULATE_RECORD","JSONB_POPULATE_RECORDSET","JSONB_PRETTY","JSONB_SET","JSONB_SET_LAX","JSONB_STRIP_NULLS","JSONB_TO_RECORD","JSONB_TO_RECORDSET","JSONB_TYPEOF","JSON_AGG","JSON_ARRAY_ELEMENTS","JSON_ARRAY_ELEMENTS_TEXT","JSON_ARRAY_LENGTH","JSON_BUILD_ARRAY","JSON_BUILD_OBJECT","JSON_EACH","JSON_EACH_TEXT","JSON_EXTRACT_PATH","JSON_EXTRACT_PATH_TEXT","JSON_OBJECT","JSON_OBJECT_AGG","JSON_OBJECT_KEYS","JSON_POPULATE_RECORD","JSON_POPULATE_RECORDSET","JSON_STRIP_NULLS","JSON_TO_RECORD","JSON_TO_RECORDSET","JSON_TYPEOF","ROW_TO_JSON","TO_JSON","TO_JSONB","TO_TIMESTAMP"],sequence:["CURRVAL","LASTVAL","NEXTVAL","SETVAL"],conditional:["COALESCE","GREATEST","LEAST","NULLIF"],array:["ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_DIMS","ARRAY_FILL","ARRAY_LENGTH","ARRAY_LOWER","ARRAY_NDIMS","ARRAY_POSITION","ARRAY_POSITIONS","ARRAY_PREPEND","ARRAY_REMOVE","ARRAY_REPLACE","ARRAY_TO_STRING","ARRAY_UPPER","CARDINALITY","STRING_TO_ARRAY","TRIM_ARRAY","UNNEST"],range:["ISEMPTY","LOWER","LOWER_INC","LOWER_INF","MULTIRANGE","RANGE_MERGE","UPPER","UPPER_INC","UPPER_INF"],aggregate:["ARRAY_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COALESCE","CORR","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","EVERY","GROUPING","JSONB_AGG","JSONB_OBJECT_AGG","JSON_AGG","JSON_OBJECT_AGG","MAX","MIN","MODE","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANGE_AGG","RANGE_INTERSECT_AGG","RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","TO_JSON","TO_JSONB","VARIANCE","VAR_POP","VAR_SAMP","XMLAGG"],window:["CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER"],set:["GENERATE_SERIES","GENERATE_SUBSCRIPTS"],sysInfo:["ACLDEFAULT","ACLEXPLODE","COL_DESCRIPTION","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_QUERY","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","FORMAT_TYPE","HAS_ANY_COLUMN_PRIVILEGE","HAS_COLUMN_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_FOREIGN_DATA_WRAPPER_PRIVILEGE","HAS_FUNCTION_PRIVILEGE","HAS_LANGUAGE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_SEQUENCE_PRIVILEGE","HAS_SERVER_PRIVILEGE","HAS_TABLESPACE_PRIVILEGE","HAS_TABLE_PRIVILEGE","HAS_TYPE_PRIVILEGE","INET_CLIENT_ADDR","INET_CLIENT_PORT","INET_SERVER_ADDR","INET_SERVER_PORT","MAKEACLITEM","OBJ_DESCRIPTION","PG_BACKEND_PID","PG_BLOCKING_PIDS","PG_COLLATION_IS_VISIBLE","PG_CONF_LOAD_TIME","PG_CONTROL_CHECKPOINT","PG_CONTROL_INIT","PG_CONTROL_SYSTEM","PG_CONVERSION_IS_VISIBLE","PG_CURRENT_LOGFILE","PG_CURRENT_SNAPSHOT","PG_CURRENT_XACT_ID","PG_CURRENT_XACT_ID_IF_ASSIGNED","PG_DESCRIBE_OBJECT","PG_FUNCTION_IS_VISIBLE","PG_GET_CATALOG_FOREIGN_KEYS","PG_GET_CONSTRAINTDEF","PG_GET_EXPR","PG_GET_FUNCTIONDEF","PG_GET_FUNCTION_ARGUMENTS","PG_GET_FUNCTION_IDENTITY_ARGUMENTS","PG_GET_FUNCTION_RESULT","PG_GET_INDEXDEF","PG_GET_KEYWORDS","PG_GET_OBJECT_ADDRESS","PG_GET_OWNED_SEQUENCE","PG_GET_RULEDEF","PG_GET_SERIAL_SEQUENCE","PG_GET_STATISTICSOBJDEF","PG_GET_TRIGGERDEF","PG_GET_USERBYID","PG_GET_VIEWDEF","PG_HAS_ROLE","PG_IDENTIFY_OBJECT","PG_IDENTIFY_OBJECT_AS_ADDRESS","PG_INDEXAM_HAS_PROPERTY","PG_INDEX_COLUMN_HAS_PROPERTY","PG_INDEX_HAS_PROPERTY","PG_IS_OTHER_TEMP_SCHEMA","PG_JIT_AVAILABLE","PG_LAST_COMMITTED_XACT","PG_LISTENING_CHANNELS","PG_MY_TEMP_SCHEMA","PG_NOTIFICATION_QUEUE_USAGE","PG_OPCLASS_IS_VISIBLE","PG_OPERATOR_IS_VISIBLE","PG_OPFAMILY_IS_VISIBLE","PG_OPTIONS_TO_TABLE","PG_POSTMASTER_START_TIME","PG_SAFE_SNAPSHOT_BLOCKING_PIDS","PG_SNAPSHOT_XIP","PG_SNAPSHOT_XMAX","PG_SNAPSHOT_XMIN","PG_STATISTICS_OBJ_IS_VISIBLE","PG_TABLESPACE_DATABASES","PG_TABLESPACE_LOCATION","PG_TABLE_IS_VISIBLE","PG_TRIGGER_DEPTH","PG_TS_CONFIG_IS_VISIBLE","PG_TS_DICT_IS_VISIBLE","PG_TS_PARSER_IS_VISIBLE","PG_TS_TEMPLATE_IS_VISIBLE","PG_TYPEOF","PG_TYPE_IS_VISIBLE","PG_VISIBLE_IN_SNAPSHOT","PG_XACT_COMMIT_TIMESTAMP","PG_XACT_COMMIT_TIMESTAMP_ORIGIN","PG_XACT_STATUS","PQSERVERVERSION","ROW_SECURITY_ACTIVE","SESSION_USER","SHOBJ_DESCRIPTION","TO_REGCLASS","TO_REGCOLLATION","TO_REGNAMESPACE","TO_REGOPER","TO_REGOPERATOR","TO_REGPROC","TO_REGPROCEDURE","TO_REGROLE","TO_REGTYPE","TXID_CURRENT","TXID_CURRENT_IF_ASSIGNED","TXID_CURRENT_SNAPSHOT","TXID_SNAPSHOT_XIP","TXID_SNAPSHOT_XMAX","TXID_SNAPSHOT_XMIN","TXID_STATUS","TXID_VISIBLE_IN_SNAPSHOT","USER","VERSION"],sysAdmin:["BRIN_DESUMMARIZE_RANGE","BRIN_SUMMARIZE_NEW_VALUES","BRIN_SUMMARIZE_RANGE","CONVERT_FROM","CURRENT_SETTING","GIN_CLEAN_PENDING_LIST","PG_ADVISORY_LOCK","PG_ADVISORY_LOCK_SHARED","PG_ADVISORY_UNLOCK","PG_ADVISORY_UNLOCK_ALL","PG_ADVISORY_UNLOCK_SHARED","PG_ADVISORY_XACT_LOCK","PG_ADVISORY_XACT_LOCK_SHARED","PG_BACKUP_START_TIME","PG_CANCEL_BACKEND","PG_COLLATION_ACTUAL_VERSION","PG_COLUMN_COMPRESSION","PG_COLUMN_SIZE","PG_COPY_LOGICAL_REPLICATION_SLOT","PG_COPY_PHYSICAL_REPLICATION_SLOT","PG_CREATE_LOGICAL_REPLICATION_SLOT","PG_CREATE_PHYSICAL_REPLICATION_SLOT","PG_CREATE_RESTORE_POINT","PG_CURRENT_WAL_FLUSH_LSN","PG_CURRENT_WAL_INSERT_LSN","PG_CURRENT_WAL_LSN","PG_DATABASE_SIZE","PG_DROP_REPLICATION_SLOT","PG_EXPORT_SNAPSHOT","PG_FILENODE_RELATION","PG_GET_WAL_REPLAY_PAUSE_STATE","PG_IMPORT_SYSTEM_COLLATIONS","PG_INDEXES_SIZE","PG_IS_IN_BACKUP","PG_IS_IN_RECOVERY","PG_IS_WAL_REPLAY_PAUSED","PG_LAST_WAL_RECEIVE_LSN","PG_LAST_WAL_REPLAY_LSN","PG_LAST_XACT_REPLAY_TIMESTAMP","PG_LOGICAL_EMIT_MESSAGE","PG_LOGICAL_SLOT_GET_BINARY_CHANGES","PG_LOGICAL_SLOT_GET_CHANGES","PG_LOGICAL_SLOT_PEEK_BINARY_CHANGES","PG_LOGICAL_SLOT_PEEK_CHANGES","PG_LOG_BACKEND_MEMORY_CONTEXTS","PG_LS_ARCHIVE_STATUSDIR","PG_LS_DIR","PG_LS_LOGDIR","PG_LS_TMPDIR","PG_LS_WALDIR","PG_PARTITION_ANCESTORS","PG_PARTITION_ROOT","PG_PARTITION_TREE","PG_PROMOTE","PG_READ_BINARY_FILE","PG_READ_FILE","PG_RELATION_FILENODE","PG_RELATION_FILEPATH","PG_RELATION_SIZE","PG_RELOAD_CONF","PG_REPLICATION_ORIGIN_ADVANCE","PG_REPLICATION_ORIGIN_CREATE","PG_REPLICATION_ORIGIN_DROP","PG_REPLICATION_ORIGIN_OID","PG_REPLICATION_ORIGIN_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_IS_SETUP","PG_REPLICATION_ORIGIN_SESSION_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_RESET","PG_REPLICATION_ORIGIN_SESSION_SETUP","PG_REPLICATION_ORIGIN_XACT_RESET","PG_REPLICATION_ORIGIN_XACT_SETUP","PG_REPLICATION_SLOT_ADVANCE","PG_ROTATE_LOGFILE","PG_SIZE_BYTES","PG_SIZE_PRETTY","PG_START_BACKUP","PG_STAT_FILE","PG_STOP_BACKUP","PG_SWITCH_WAL","PG_TABLESPACE_SIZE","PG_TABLE_SIZE","PG_TERMINATE_BACKEND","PG_TOTAL_RELATION_SIZE","PG_TRY_ADVISORY_LOCK","PG_TRY_ADVISORY_LOCK_SHARED","PG_TRY_ADVISORY_XACT_LOCK","PG_TRY_ADVISORY_XACT_LOCK_SHARED","PG_WALFILE_NAME","PG_WALFILE_NAME_OFFSET","PG_WAL_LSN_DIFF","PG_WAL_REPLAY_PAUSE","PG_WAL_REPLAY_RESUME","SET_CONFIG"],trigger:["SUPPRESS_REDUNDANT_UPDATES_TRIGGER","TSVECTOR_UPDATE_TRIGGER","TSVECTOR_UPDATE_TRIGGER_COLUMN"],eventTrigger:["PG_EVENT_TRIGGER_DDL_COMMANDS","PG_EVENT_TRIGGER_DROPPED_OBJECTS","PG_EVENT_TRIGGER_TABLE_REWRITE_OID","PG_EVENT_TRIGGER_TABLE_REWRITE_REASON","PG_GET_OBJECT_ADDRESS"],stats:["PG_MCV_LIST_ITEMS"],cast:["CAST"],dataTypes:["BIT","BIT VARYING","CHARACTER","CHARACTER VARYING","VARCHAR","CHAR","DECIMAL","NUMERIC","TIME","TIMESTAMP","ENUM"]}),e$=v({all:["ABORT","ABSOLUTE","ACCESS","ACTION","ADD","ADMIN","AFTER","AGGREGATE","ALL","ALSO","ALTER","ALWAYS","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASENSITIVE","ASSERTION","ASSIGNMENT","ASYMMETRIC","AT","ATOMIC","ATTACH","ATTRIBUTE","AUTHORIZATION","BACKWARD","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BIT","BOOLEAN","BOTH","BREADTH","BY","CACHE","CALL","CALLED","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAIN","CHAR","CHARACTER","CHARACTERISTICS","CHECK","CHECKPOINT","CLASS","CLOSE","CLUSTER","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMENTS","COMMIT","COMMITTED","COMPRESSION","CONCURRENTLY","CONFIGURATION","CONFLICT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTENT","CONTINUE","CONVERSION","COPY","COST","CREATE","CROSS","CSV","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINER","DELETE","DELIMITER","DELIMITERS","DEPENDS","DEPTH","DESC","DETACH","DICTIONARY","DISABLE","DISCARD","DISTINCT","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","EACH","ELSE","ENABLE","ENCODING","ENCRYPTED","END","ENUM","ESCAPE","EVENT","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXPLAIN","EXPRESSION","EXTENSION","EXTERNAL","EXTRACT","FALSE","FAMILY","FETCH","FILTER","FINALIZE","FIRST","FLOAT","FOLLOWING","FOR","FORCE","FOREIGN","FORWARD","FREEZE","FROM","FULL","FUNCTION","FUNCTIONS","GENERATED","GLOBAL","GRANT","GRANTED","GREATEST","GROUP","GROUPING","GROUPS","HANDLER","HAVING","HEADER","HOLD","HOUR","IDENTITY","IF","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDE","INCLUDING","INCREMENT","INDEX","INDEXES","INHERIT","INHERITS","INITIALLY","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","INVOKER","IS","ISNULL","ISOLATION","JOIN","KEY","LABEL","LANGUAGE","LARGE","LAST","LATERAL","LEADING","LEAKPROOF","LEAST","LEFT","LEVEL","LIKE","LIMIT","LISTEN","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LOCKED","LOGGED","MAPPING","MATCH","MATERIALIZED","MAXVALUE","METHOD","MINUTE","MINVALUE","MODE","MONTH","MOVE","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NEW","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NORMALIZE","NORMALIZED","NOT","NOTHING","NOTIFY","NOTNULL","NOWAIT","NULL","NULLIF","NULLS","NUMERIC","OBJECT","OF","OFF","OFFSET","OIDS","OLD","ON","ONLY","OPERATOR","OPTION","OPTIONS","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","OWNED","OWNER","PARALLEL","PARSER","PARTIAL","PARTITION","PASSING","PASSWORD","PLACING","PLANS","POLICY","POSITION","PRECEDING","PRECISION","PREPARE","PREPARED","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROGRAM","PUBLICATION","QUOTE","RANGE","READ","REAL","REASSIGN","RECHECK","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REINDEX","RELATIVE","RELEASE","RENAME","REPEATABLE","REPLACE","REPLICA","RESET","RESTART","RESTRICT","RETURN","RETURNING","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROUTINES","ROW","ROWS","RULE","SAVEPOINT","SCHEMA","SCHEMAS","SCROLL","SEARCH","SECOND","SECURITY","SELECT","SEQUENCE","SEQUENCES","SERIALIZABLE","SERVER","SESSION","SESSION_USER","SET","SETOF","SETS","SHARE","SHOW","SIMILAR","SIMPLE","SKIP","SMALLINT","SNAPSHOT","SOME","SQL","STABLE","STANDALONE","START","STATEMENT","STATISTICS","STDIN","STDOUT","STORAGE","STORED","STRICT","STRIP","SUBSCRIPTION","SUBSTRING","SUPPORT","SYMMETRIC","SYSID","SYSTEM","TABLE","TABLES","TABLESAMPLE","TABLESPACE","TEMP","TEMPLATE","TEMPORARY","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRANSFORM","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TRUSTED","TYPE","TYPES","UESCAPE","UNBOUNDED","UNCOMMITTED","UNENCRYPTED","UNION","UNIQUE","UNKNOWN","UNLISTEN","UNLOGGED","UNTIL","UPDATE","USER","USING","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARCHAR","VARIADIC","VARYING","VERBOSE","VERSION","VIEW","VIEWS","VOLATILE","WHEN","WHERE","WHITESPACE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","XML","XMLATTRIBUTES","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","YEAR","YES","ZONE"]}),eY=f(["SELECT [ALL | DISTINCT]"]),eV=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","FOR {UPDATE | NO KEY UPDATE | SHARE | KEY SHARE} [OF]","INSERT INTO","VALUES","SET","CREATE [OR REPLACE] [TEMP | TEMPORARY] [RECURSIVE] VIEW","CREATE MATERIALIZED VIEW [IF NOT EXISTS]","CREATE [GLOBAL | LOCAL] [TEMPORARY | TEMP | UNLOGGED] TABLE [IF NOT EXISTS]","RETURNING"]),ek=f(["UPDATE [ONLY]","WHERE CURRENT OF","ON CONFLICT","DELETE FROM [ONLY]","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS] [ONLY]","ALTER TABLE ALL IN TABLESPACE","RENAME [COLUMN]","RENAME TO","ADD [COLUMN] [IF NOT EXISTS]","DROP [COLUMN] [IF EXISTS]","ALTER [COLUMN]","[SET DATA] TYPE","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","TRUNCATE [TABLE] [ONLY]","SET SCHEMA","AFTER","ABORT","ALTER AGGREGATE","ALTER COLLATION","ALTER CONVERSION","ALTER DATABASE","ALTER DEFAULT PRIVILEGES","ALTER DOMAIN","ALTER EVENT TRIGGER","ALTER EXTENSION","ALTER FOREIGN DATA WRAPPER","ALTER FOREIGN TABLE","ALTER FUNCTION","ALTER GROUP","ALTER INDEX","ALTER LANGUAGE","ALTER LARGE OBJECT","ALTER MATERIALIZED VIEW","ALTER OPERATOR","ALTER OPERATOR CLASS","ALTER OPERATOR FAMILY","ALTER POLICY","ALTER PROCEDURE","ALTER PUBLICATION","ALTER ROLE","ALTER ROUTINE","ALTER RULE","ALTER SCHEMA","ALTER SEQUENCE","ALTER SERVER","ALTER STATISTICS","ALTER SUBSCRIPTION","ALTER SYSTEM","ALTER TABLESPACE","ALTER TEXT SEARCH CONFIGURATION","ALTER TEXT SEARCH DICTIONARY","ALTER TEXT SEARCH PARSER","ALTER TEXT SEARCH TEMPLATE","ALTER TRIGGER","ALTER TYPE","ALTER USER","ALTER USER MAPPING","ALTER VIEW","ANALYZE","BEGIN","CALL","CHECKPOINT","CLOSE","CLUSTER","COMMENT","COMMIT","COMMIT PREPARED","COPY","CREATE ACCESS METHOD","CREATE AGGREGATE","CREATE CAST","CREATE COLLATION","CREATE CONVERSION","CREATE DATABASE","CREATE DOMAIN","CREATE EVENT TRIGGER","CREATE EXTENSION","CREATE FOREIGN DATA WRAPPER","CREATE FOREIGN TABLE","CREATE FUNCTION","CREATE GROUP","CREATE INDEX","CREATE LANGUAGE","CREATE OPERATOR","CREATE OPERATOR CLASS","CREATE OPERATOR FAMILY","CREATE POLICY","CREATE PROCEDURE","CREATE PUBLICATION","CREATE ROLE","CREATE RULE","CREATE SCHEMA","CREATE SEQUENCE","CREATE SERVER","CREATE STATISTICS","CREATE SUBSCRIPTION","CREATE TABLESPACE","CREATE TEXT SEARCH CONFIGURATION","CREATE TEXT SEARCH DICTIONARY","CREATE TEXT SEARCH PARSER","CREATE TEXT SEARCH TEMPLATE","CREATE TRANSFORM","CREATE TRIGGER","CREATE TYPE","CREATE USER","CREATE USER MAPPING","DEALLOCATE","DECLARE","DISCARD","DROP ACCESS METHOD","DROP AGGREGATE","DROP CAST","DROP COLLATION","DROP CONVERSION","DROP DATABASE","DROP DOMAIN","DROP EVENT TRIGGER","DROP EXTENSION","DROP FOREIGN DATA WRAPPER","DROP FOREIGN TABLE","DROP FUNCTION","DROP GROUP","DROP INDEX","DROP LANGUAGE","DROP MATERIALIZED VIEW","DROP OPERATOR","DROP OPERATOR CLASS","DROP OPERATOR FAMILY","DROP OWNED","DROP POLICY","DROP PROCEDURE","DROP PUBLICATION","DROP ROLE","DROP ROUTINE","DROP RULE","DROP SCHEMA","DROP SEQUENCE","DROP SERVER","DROP STATISTICS","DROP SUBSCRIPTION","DROP TABLESPACE","DROP TEXT SEARCH CONFIGURATION","DROP TEXT SEARCH DICTIONARY","DROP TEXT SEARCH PARSER","DROP TEXT SEARCH TEMPLATE","DROP TRANSFORM","DROP TRIGGER","DROP TYPE","DROP USER","DROP USER MAPPING","DROP VIEW","EXECUTE","EXPLAIN","FETCH","GRANT","IMPORT FOREIGN SCHEMA","LISTEN","LOAD","LOCK","MOVE","NOTIFY","PREPARE","PREPARE TRANSACTION","REASSIGN OWNED","REFRESH MATERIALIZED VIEW","REINDEX","RELEASE SAVEPOINT","RESET","REVOKE","ROLLBACK","ROLLBACK PREPARED","ROLLBACK TO SAVEPOINT","SAVEPOINT","SECURITY LABEL","SELECT INTO","SET CONSTRAINTS","SET ROLE","SET SESSION AUTHORIZATION","SET TRANSACTION","SHOW","START TRANSACTION","UNLISTEN","VACUUM"]),eW=f(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),eZ=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),ej=f(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN","{TIMESTAMP | TIME} {WITH | WITHOUT} TIME ZONE","IS [NOT] DISTINCT FROM"]),eX={tokenizerOptions:{reservedSelect:eY,reservedClauses:[...eV,...ek],reservedSetOperations:eW,reservedJoins:eZ,reservedPhrases:ej,reservedKeywords:e$,reservedFunctionNames:ew,nestedBlockComments:!0,extraParens:["[]"],stringTypes:["$$",{quote:"''-qq",prefixes:["U&"]},{quote:"''-bs",prefixes:["E"],requirePrefix:!0},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:[{quote:'""-qq',prefixes:["U&"]}],identChars:{rest:"$"},paramTypes:{numbered:["$"]},operators:["%","^","|/","||/","@",":=","&","|","#","~","<<",">>","~>~","~<~","~>=~","~<=~","@-@","@@","##","<->","&&","&<","&>","<<|","&<|","|>>","|&>","<^","^>","?#","?-","?|","?-|","?||","@>","<@","~=","?","@?","?&","->","->>","#>","#>>","#-","=>",">>=","<<=","~~","~~*","!~~","!~~*","~","~*","!~","!~*","-|-","||","@@@","!!","<%","%>","<<%","%>>","<<->","<->>","<<<->","<->>>","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:ek}},eK=v({aggregate:["ANY_VALUE","APPROXIMATE PERCENTILE_DISC","AVG","COUNT","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP"],array:["array","array_concat","array_flatten","get_array_length","split_to_array","subarray"],bitwise:["BIT_AND","BIT_OR","BOOL_AND","BOOL_OR"],conditional:["COALESCE","DECODE","GREATEST","LEAST","NVL","NVL2","NULLIF"],dateTime:["ADD_MONTHS","AT TIME ZONE","CONVERT_TIMEZONE","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_CMP","DATE_CMP_TIMESTAMP","DATE_CMP_TIMESTAMPTZ","DATE_PART_YEAR","DATEADD","DATEDIFF","DATE_PART","DATE_TRUNC","EXTRACT","GETDATE","INTERVAL_CMP","LAST_DAY","MONTHS_BETWEEN","NEXT_DAY","SYSDATE","TIMEOFDAY","TIMESTAMP_CMP","TIMESTAMP_CMP_DATE","TIMESTAMP_CMP_TIMESTAMPTZ","TIMESTAMPTZ_CMP","TIMESTAMPTZ_CMP_DATE","TIMESTAMPTZ_CMP_TIMESTAMP","TIMEZONE","TO_TIMESTAMP","TRUNC"],spatial:["AddBBox","DropBBox","GeometryType","ST_AddPoint","ST_Angle","ST_Area","ST_AsBinary","ST_AsEWKB","ST_AsEWKT","ST_AsGeoJSON","ST_AsText","ST_Azimuth","ST_Boundary","ST_Collect","ST_Contains","ST_ContainsProperly","ST_ConvexHull","ST_CoveredBy","ST_Covers","ST_Crosses","ST_Dimension","ST_Disjoint","ST_Distance","ST_DistanceSphere","ST_DWithin","ST_EndPoint","ST_Envelope","ST_Equals","ST_ExteriorRing","ST_Force2D","ST_Force3D","ST_Force3DM","ST_Force3DZ","ST_Force4D","ST_GeometryN","ST_GeometryType","ST_GeomFromEWKB","ST_GeomFromEWKT","ST_GeomFromText","ST_GeomFromWKB","ST_InteriorRingN","ST_Intersects","ST_IsPolygonCCW","ST_IsPolygonCW","ST_IsClosed","ST_IsCollection","ST_IsEmpty","ST_IsSimple","ST_IsValid","ST_Length","ST_LengthSphere","ST_Length2D","ST_LineFromMultiPoint","ST_LineInterpolatePoint","ST_M","ST_MakeEnvelope","ST_MakeLine","ST_MakePoint","ST_MakePolygon","ST_MemSize","ST_MMax","ST_MMin","ST_Multi","ST_NDims","ST_NPoints","ST_NRings","ST_NumGeometries","ST_NumInteriorRings","ST_NumPoints","ST_Perimeter","ST_Perimeter2D","ST_Point","ST_PointN","ST_Points","ST_Polygon","ST_RemovePoint","ST_Reverse","ST_SetPoint","ST_SetSRID","ST_Simplify","ST_SRID","ST_StartPoint","ST_Touches","ST_Within","ST_X","ST_XMax","ST_XMin","ST_Y","ST_YMax","ST_YMin","ST_Z","ST_ZMax","ST_ZMin","SupportsBBox"],hash:["CHECKSUM","FUNC_SHA1","FNV_HASH","MD5","SHA","SHA1","SHA2"],hyperLogLog:["HLL","HLL_CREATE_SKETCH","HLL_CARDINALITY","HLL_COMBINE"],json:["IS_VALID_JSON","IS_VALID_JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_EXTRACT_ARRAY_ELEMENT_TEXT","JSON_EXTRACT_PATH_TEXT","JSON_PARSE","JSON_SERIALIZE"],math:["ABS","ACOS","ASIN","ATAN","ATAN2","CBRT","CEILING","CEIL","COS","COT","DEGREES","DEXP","DLOG1","DLOG10","EXP","FLOOR","LN","LOG","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SIN","SIGN","SQRT","TAN","TO_HEX","TRUNC"],machineLearning:["EXPLAIN_MODEL"],string:["ASCII","BPCHARCMP","BTRIM","BTTEXT_PATTERN_CMP","CHAR_LENGTH","CHARACTER_LENGTH","CHARINDEX","CHR","COLLATE","CONCAT","CRC32","DIFFERENCE","INITCAP","LEFT","RIGHT","LEN","LENGTH","LOWER","LPAD","RPAD","LTRIM","OCTETINDEX","OCTET_LENGTH","POSITION","QUOTE_IDENT","QUOTE_LITERAL","REGEXP_COUNT","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","REPLICATE","REVERSE","RTRIM","SOUNDEX","SPLIT_PART","STRPOS","STRTOL","SUBSTRING","TEXTLEN","TRANSLATE","TRIM","UPPER"],superType:["decimal_precision","decimal_scale","is_array","is_bigint","is_boolean","is_char","is_decimal","is_float","is_integer","is_object","is_scalar","is_smallint","is_varchar","json_typeof"],window:["AVG","COUNT","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAST_VALUE","LAG","LEAD","LISTAGG","MAX","MEDIAN","MIN","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP"],dataType:["CAST","CONVERT","TO_CHAR","TO_DATE","TO_NUMBER","TEXT_TO_INT_ALT","TEXT_TO_NUMERIC_ALT"],sysAdmin:["CHANGE_QUERY_PRIORITY","CHANGE_SESSION_PRIORITY","CHANGE_USER_PRIORITY","CURRENT_SETTING","PG_CANCEL_BACKEND","PG_TERMINATE_BACKEND","REBOOT_CLUSTER","SET_CONFIG"],sysInfo:["CURRENT_AWS_ACCOUNT","CURRENT_DATABASE","CURRENT_NAMESPACE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","CURRENT_USER_ID","HAS_ASSUMEROLE_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_TABLE_PRIVILEGE","PG_BACKEND_PID","PG_GET_COLS","PG_GET_GRANTEE_BY_IAM_ROLE","PG_GET_IAM_ROLE_BY_USER","PG_GET_LATE_BINDING_VIEW_COLS","PG_LAST_COPY_COUNT","PG_LAST_COPY_ID","PG_LAST_UNLOAD_ID","PG_LAST_QUERY_ID","PG_LAST_UNLOAD_COUNT","SESSION_USER","SLICE_NUM","USER","VERSION"],dataTypes:["DECIMAL","NUMERIC","CHAR","CHARACTER","VARCHAR","CHARACTER VARYING","NCHAR","NVARCHAR","VARBYTE"]}),ez=v({standard:["AES128","AES256","ALL","ALLOWOVERWRITE","ANY","ARRAY","AS","ASC","AUTHORIZATION","BACKUP","BETWEEN","BINARY","BOTH","CHECK","COLUMN","CONSTRAINT","CREATE","CROSS","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DESC","DISABLE","DISTINCT","DO","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GROUP","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTO","IS","ISNULL","LANGUAGE","LEADING","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","MINUS","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RECOVER","REFERENCES","REJECTLOG","RESORT","RESPECT","RESTORE","SIMILAR","SNAPSHOT","SOME","SYSTEM","TABLE","TAG","TDES","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","UNIQUE","USING","VERBOSE","WALLET","WITHOUT"],dataConversionParams:["ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS"],dataLoadParams:["COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE"],dataFormatParams:["FORMAT","CSV","DELIMITER","FIXEDWIDTH","SHAPEFILE","AVRO","JSON","PARQUET","ORC"],copyAuthParams:["ACCESS_KEY_ID","CREDENTIALS","ENCRYPTED","IAM_ROLE","MASTER_SYMMETRIC_KEY","SECRET_ACCESS_KEY","SESSION_TOKEN"],copyCompressionParams:["BZIP2","GZIP","LZOP","ZSTD"],copyMiscParams:["MANIFEST","READRATIO","REGION","SSH"],compressionEncodings:["RAW","AZ64","BYTEDICT","DELTA","DELTA32K","LZO","MOSTLY8","MOSTLY16","MOSTLY32","RUNLENGTH","TEXT255","TEXT32K"],misc:["CATALOG_ROLE","SECRET_ARN","EXTERNAL","AUTO","EVEN","KEY","PREDICATE","COMPRESSION"],dataTypes:["BPCHAR","TEXT"]}),eJ=f(["SELECT [ALL | DISTINCT]"]),eq=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET","CREATE [OR REPLACE | MATERIALIZED] VIEW","CREATE [TEMPORARY | TEMP | LOCAL TEMPORARY | LOCAL TEMP] TABLE [IF NOT EXISTS]"]),eQ=f(["UPDATE","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ALTER TABLE APPEND","ADD [COLUMN]","DROP [COLUMN]","RENAME TO","RENAME COLUMN","ALTER COLUMN","TYPE","ENCODE","TRUNCATE [TABLE]","ABORT","ALTER DATABASE","ALTER DATASHARE","ALTER DEFAULT PRIVILEGES","ALTER GROUP","ALTER MATERIALIZED VIEW","ALTER PROCEDURE","ALTER SCHEMA","ALTER USER","ANALYSE","ANALYZE","ANALYSE COMPRESSION","ANALYZE COMPRESSION","BEGIN","CALL","CANCEL","CLOSE","COMMENT","COMMIT","COPY","CREATE DATABASE","CREATE DATASHARE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL SCHEMA","CREATE EXTERNAL TABLE","CREATE FUNCTION","CREATE GROUP","CREATE LIBRARY","CREATE MODEL","CREATE PROCEDURE","CREATE SCHEMA","CREATE USER","DEALLOCATE","DECLARE","DESC DATASHARE","DROP DATABASE","DROP DATASHARE","DROP FUNCTION","DROP GROUP","DROP LIBRARY","DROP MODEL","DROP MATERIALIZED VIEW","DROP PROCEDURE","DROP SCHEMA","DROP USER","DROP VIEW","DROP","EXECUTE","EXPLAIN","FETCH","GRANT","LOCK","PREPARE","REFRESH MATERIALIZED VIEW","RESET","REVOKE","ROLLBACK","SELECT INTO","SET SESSION AUTHORIZATION","SET SESSION CHARACTERISTICS","SHOW","SHOW EXTERNAL TABLE","SHOW MODEL","SHOW DATASHARES","SHOW PROCEDURE","SHOW TABLE","SHOW VIEW","START TRANSACTION","UNLOAD","VACUUM"]),e0=f(["UNION [ALL]","EXCEPT","INTERSECT","MINUS"]),e1=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),e2=f(["NULL AS","DATA CATALOG","HIVE METASTORE","{ROWS | RANGE} BETWEEN"]),e4={tokenizerOptions:{reservedSelect:eJ,reservedClauses:[...eq,...eQ],reservedSetOperations:e0,reservedJoins:e1,reservedPhrases:e2,reservedKeywords:ez,reservedFunctionNames:eK,stringTypes:["''-qq"],identTypes:['""-qq'],identChars:{first:"#"},paramTypes:{numbered:["$"]},operators:["^","%","@","|/","||/","&","|","~","<<",">>","||","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:eQ}},e6=v({all:["ADD","AFTER","ALL","ALTER","ANALYZE","AND","ANTI","ANY","ARCHIVE","ARRAY","AS","ASC","AT","AUTHORIZATION","BETWEEN","BOTH","BUCKET","BUCKETS","BY","CACHE","CASCADE","CAST","CHANGE","CHECK","CLEAR","CLUSTER","CLUSTERED","CODEGEN","COLLATE","COLLECTION","COLUMN","COLUMNS","COMMENT","COMMIT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONSTRAINT","COST","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATA","DATABASE","DATABASES","DAY","DBPROPERTIES","DEFINED","DELETE","DELIMITED","DESC","DESCRIBE","DFS","DIRECTORIES","DIRECTORY","DISTINCT","DISTRIBUTE","DIV","DROP","ESCAPE","ESCAPED","EXCEPT","EXCHANGE","EXISTS","EXPORT","EXTENDED","EXTERNAL","EXTRACT","FALSE","FETCH","FIELDS","FILTER","FILEFORMAT","FIRST","FIRST_VALUE","FOLLOWING","FOR","FOREIGN","FORMAT","FORMATTED","FULL","FUNCTION","FUNCTIONS","GLOBAL","GRANT","GROUP","GROUPING","HOUR","IF","IGNORE","IMPORT","IN","INDEX","INDEXES","INNER","INPATH","INPUTFORMAT","INTERSECT","INTERVAL","INTO","IS","ITEMS","KEYS","LAST","LAST_VALUE","LATERAL","LAZY","LEADING","LEFT","LIKE","LINES","LIST","LOCAL","LOCATION","LOCK","LOCKS","LOGICAL","MACRO","MAP","MATCHED","MERGE","MINUTE","MONTH","MSCK","NAMESPACE","NAMESPACES","NATURAL","NO","NOT","NULL","NULLS","OF","ONLY","OPTION","OPTIONS","OR","ORDER","OUT","OUTER","OUTPUTFORMAT","OVER","OVERLAPS","OVERLAY","OVERWRITE","OWNER","PARTITION","PARTITIONED","PARTITIONS","PERCENT","PLACING","POSITION","PRECEDING","PRIMARY","PRINCIPALS","PROPERTIES","PURGE","QUERY","RANGE","RECORDREADER","RECORDWRITER","RECOVER","REDUCE","REFERENCES","RENAME","REPAIR","REPLACE","RESPECT","RESTRICT","REVOKE","RIGHT","RLIKE","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","SCHEMA","SECOND","SELECT","SEMI","SEPARATED","SERDE","SERDEPROPERTIES","SESSION_USER","SETS","SHOW","SKEWED","SOME","SORT","SORTED","START","STATISTICS","STORED","STRATIFY","STRUCT","SUBSTR","SUBSTRING","TABLE","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","THEN","TO","TOUCH","TRAILING","TRANSACTION","TRANSACTIONS","TRIM","TRUE","TRUNCATE","UNARCHIVE","UNBOUNDED","UNCACHE","UNIQUE","UNKNOWN","UNLOCK","UNSET","USE","USER","USING","VIEW","WINDOW","YEAR","ANALYSE","ARRAY_ZIP","COALESCE","CONTAINS","CONVERT","DAYS","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DECODE","DEFAULT","DISTINCTROW","ENCODE","EXPLODE","EXPLODE_OUTER","FIXED","GREATEST","GROUP_CONCAT","HOURS","HOUR_MINUTE","HOUR_SECOND","IFNULL","LEAST","LEVEL","MINUTE_SECOND","NULLIF","OFFSET","ON","OPTIMIZE","REGEXP","SEPARATOR","SIZE","STRING","TYPE","TYPES","UNSIGNED","VARIABLES","YEAR_MONTH"]}),e3=v({aggregate:["APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COUNT","COUNT","COUNT_IF","COUNT_MIN_SKETCH","COVAR_POP","COVAR_SAMP","EVERY","FIRST","FIRST_VALUE","GROUPING","GROUPING_ID","KURTOSIS","LAST","LAST_VALUE","MAX","MAX_BY","MEAN","MIN","MIN_BY","PERCENTILE","PERCENTILE","PERCENTILE_APPROX","SKEWNESS","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],window:["CUME_DIST","DENSE_RANK","LAG","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER"],array:["ARRAY","ARRAY_CONTAINS","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_UNION","ARRAYS_OVERLAP","ARRAYS_ZIP","FLATTEN","SEQUENCE","SHUFFLE","SLICE","SORT_ARRAY"],map:["ELEMENT_AT","ELEMENT_AT","MAP","MAP_CONCAT","MAP_ENTRIES","MAP_FROM_ARRAYS","MAP_FROM_ENTRIES","MAP_KEYS","MAP_VALUES","STR_TO_MAP"],datetime:["ADD_MONTHS","CURRENT_DATE","CURRENT_DATE","CURRENT_TIMESTAMP","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","DATE_ADD","DATE_FORMAT","DATE_FROM_UNIX_DATE","DATE_PART","DATE_SUB","DATE_TRUNC","DATEDIFF","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MAKE_DATE","MAKE_DT_INTERVAL","MAKE_INTERVAL","MAKE_TIMESTAMP","MAKE_YM_INTERVAL","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","NOW","QUARTER","SECOND","SESSION_WINDOW","TIMESTAMP_MICROS","TIMESTAMP_MILLIS","TIMESTAMP_SECONDS","TO_DATE","TO_TIMESTAMP","TO_UNIX_TIMESTAMP","TO_UTC_TIMESTAMP","TRUNC","UNIX_DATE","UNIX_MICROS","UNIX_MILLIS","UNIX_SECONDS","UNIX_TIMESTAMP","WEEKDAY","WEEKOFYEAR","WINDOW","YEAR"],json:["FROM_JSON","GET_JSON_OBJECT","JSON_ARRAY_LENGTH","JSON_OBJECT_KEYS","JSON_TUPLE","SCHEMA_OF_JSON","TO_JSON"],misc:["ABS","ACOS","ACOSH","AGGREGATE","ARRAY_SORT","ASCII","ASIN","ASINH","ASSERT_TRUE","ATAN","ATAN2","ATANH","BASE64","BIGINT","BIN","BINARY","BIT_COUNT","BIT_GET","BIT_LENGTH","BOOLEAN","BROUND","BTRIM","CARDINALITY","CBRT","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONV","COS","COSH","COT","CRC32","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_USER","DATE","DECIMAL","DEGREES","DOUBLE","ELT","EXP","EXPM1","FACTORIAL","FIND_IN_SET","FLOAT","FLOOR","FORALL","FORMAT_NUMBER","FORMAT_STRING","FROM_CSV","GETBIT","HASH","HEX","HYPOT","INITCAP","INLINE","INLINE_OUTER","INPUT_FILE_BLOCK_LENGTH","INPUT_FILE_BLOCK_START","INPUT_FILE_NAME","INSTR","INT","ISNAN","ISNOTNULL","ISNULL","JAVA_METHOD","LCASE","LEFT","LENGTH","LEVENSHTEIN","LN","LOCATE","LOG","LOG10","LOG1P","LOG2","LOWER","LPAD","LTRIM","MAP_FILTER","MAP_ZIP_WITH","MD5","MOD","MONOTONICALLY_INCREASING_ID","NAMED_STRUCT","NANVL","NEGATIVE","NVL","NVL2","OCTET_LENGTH","OVERLAY","PARSE_URL","PI","PMOD","POSEXPLODE","POSEXPLODE_OUTER","POSITION","POSITIVE","POW","POWER","PRINTF","RADIANS","RAISE_ERROR","RAND","RANDN","RANDOM","REFLECT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_REPLACE","REPEAT","REPLACE","REVERSE","RIGHT","RINT","ROUND","RPAD","RTRIM","SCHEMA_OF_CSV","SENTENCES","SHA","SHA1","SHA2","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIGNUM","SIN","SINH","SMALLINT","SOUNDEX","SPACE","SPARK_PARTITION_ID","SPLIT","SQRT","STACK","SUBSTR","SUBSTRING","SUBSTRING_INDEX","TAN","TANH","TIMESTAMP","TINYINT","TO_CSV","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRY_ADD","TRY_DIVIDE","TYPEOF","UCASE","UNBASE64","UNHEX","UPPER","UUID","VERSION","WIDTH_BUCKET","XPATH","XPATH_BOOLEAN","XPATH_DOUBLE","XPATH_FLOAT","XPATH_INT","XPATH_LONG","XPATH_NUMBER","XPATH_SHORT","XPATH_STRING","XXHASH64","ZIP_WITH"],cast:["CAST"],caseAbbrev:["COALESCE","NULLIF"],dataTypes:["DECIMAL","DEC","NUMERIC","VARCHAR"]}),e8=f(["SELECT [ALL | DISTINCT]"]),e5=f(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT [INTO | OVERWRITE] [TABLE]","VALUES","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE","CREATE [OR REPLACE] [GLOBAL TEMPORARY | TEMPORARY] VIEW [IF NOT EXISTS]","CREATE [EXTERNAL] TABLE [IF NOT EXISTS]"]),e7=f(["DROP TABLE [IF EXISTS]","ALTER TABLE","ADD COLUMNS","DROP {COLUMN | COLUMNS}","RENAME TO","RENAME COLUMN","ALTER COLUMN","TRUNCATE TABLE","LATERAL VIEW","ALTER DATABASE","ALTER VIEW","CREATE DATABASE","CREATE FUNCTION","DROP DATABASE","DROP FUNCTION","DROP VIEW","REPAIR TABLE","USE DATABASE","TABLESAMPLE","PIVOT","TRANSFORM","EXPLAIN","ADD FILE","ADD JAR","ANALYZE TABLE","CACHE TABLE","CLEAR CACHE","DESCRIBE DATABASE","DESCRIBE FUNCTION","DESCRIBE QUERY","DESCRIBE TABLE","LIST FILE","LIST JAR","REFRESH","REFRESH TABLE","REFRESH FUNCTION","RESET","SHOW COLUMNS","SHOW CREATE TABLE","SHOW DATABASES","SHOW FUNCTIONS","SHOW PARTITIONS","SHOW TABLE EXTENDED","SHOW TABLES","SHOW TBLPROPERTIES","SHOW VIEWS","UNCACHE TABLE"]),e9=f(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),te=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","[LEFT] {ANTI | SEMI} JOIN","NATURAL [LEFT] {ANTI | SEMI} JOIN"]),tt=f(["ON DELETE","ON UPDATE","CURRENT ROW","{ROWS | RANGE} BETWEEN"]),tn={tokenizerOptions:{reservedSelect:e8,reservedClauses:[...e5,...e7],reservedSetOperations:e9,reservedJoins:te,reservedPhrases:tt,supportsXor:!0,reservedKeywords:e6,reservedFunctionNames:e3,extraParens:["[]"],stringTypes:["''-bs",'""-bs',{quote:"''-raw",prefixes:["R","X"],requirePrefix:!0},{quote:'""-raw',prefixes:["R","X"],requirePrefix:!0}],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||","->"],postProcess:function(e){return e.map((t,n)=>{let o=e[n-1]||u,i=e[n+1]||u;return R.WINDOW(t)&&i.type===r.OPEN_PAREN?{...t,type:r.RESERVED_FUNCTION_NAME}:"ITEMS"!==t.text||t.type!==r.RESERVED_KEYWORD||"COLLECTION"===o.text&&"TERMINATED"===i.text?t:{...t,type:r.IDENTIFIER,text:t.raw}})}},formatOptions:{onelineClauses:e7}},tr=v({scalar:["ABS","CHANGES","CHAR","COALESCE","FORMAT","GLOB","HEX","IFNULL","IIF","INSTR","LAST_INSERT_ROWID","LENGTH","LIKE","LIKELIHOOD","LIKELY","LOAD_EXTENSION","LOWER","LTRIM","NULLIF","PRINTF","QUOTE","RANDOM","RANDOMBLOB","REPLACE","ROUND","RTRIM","SIGN","SOUNDEX","SQLITE_COMPILEOPTION_GET","SQLITE_COMPILEOPTION_USED","SQLITE_OFFSET","SQLITE_SOURCE_ID","SQLITE_VERSION","SUBSTR","SUBSTRING","TOTAL_CHANGES","TRIM","TYPEOF","UNICODE","UNLIKELY","UPPER","ZEROBLOB"],aggregate:["AVG","COUNT","GROUP_CONCAT","MAX","MIN","SUM","TOTAL"],datetime:["DATE","TIME","DATETIME","JULIANDAY","UNIXEPOCH","STRFTIME"],window:["row_number","rank","dense_rank","percent_rank","cume_dist","ntile","lag","lead","first_value","last_value","nth_value"],math:["ACOS","ACOSH","ASIN","ASINH","ATAN","ATAN2","ATANH","CEIL","CEILING","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG","LOG10","LOG2","MOD","PI","POW","POWER","RADIANS","SIN","SINH","SQRT","TAN","TANH","TRUNC"],json:["JSON","JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_ARRAY_LENGTH","JSON_EXTRACT","JSON_INSERT","JSON_OBJECT","JSON_PATCH","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_TYPE","JSON_TYPE","JSON_VALID","JSON_QUOTE","JSON_GROUP_ARRAY","JSON_GROUP_OBJECT","JSON_EACH","JSON_TREE"],cast:["CAST"],dataTypes:["CHARACTER","VARCHAR","VARYING CHARACTER","NCHAR","NATIVE CHARACTER","NVARCHAR","NUMERIC","DECIMAL"]}),to=v({all:["ABORT","ACTION","ADD","AFTER","ALL","ALTER","AND","ANY","ARE","ARRAY","ALWAYS","ANALYZE","AS","ASC","ATTACH","AUTOINCREMENT","BEFORE","BEGIN","BETWEEN","BY","CASCADE","CASE","CAST","CHECK","COLLATE","COLUMN","COMMIT","CONFLICT","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATABASE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DETACH","DISTINCT","DO","DROP","EACH","ELSE","END","ESCAPE","EXCEPT","EXCLUDE","EXCLUSIVE","EXISTS","EXPLAIN","FAIL","FILTER","FIRST","FOLLOWING","FOR","FOREIGN","FROM","FULL","GENERATED","GLOB","GROUP","GROUPS","HAVING","IF","IGNORE","IMMEDIATE","IN","INDEX","INDEXED","INITIALLY","INNER","INSERT","INSTEAD","INTERSECT","INTO","IS","ISNULL","JOIN","KEY","LAST","LEFT","LIKE","LIMIT","MATCH","MATERIALIZED","NATURAL","NO","NOT","NOTHING","NOTNULL","NULL","NULLS","OF","OFFSET","ON","ONLY","OPEN","OR","ORDER","OTHERS","OUTER","OVER","PARTITION","PLAN","PRAGMA","PRECEDING","PRIMARY","QUERY","RAISE","RANGE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELEASE","RENAME","REPLACE","RESTRICT","RETURNING","RIGHT","ROLLBACK","ROW","ROWS","SAVEPOINT","SELECT","SET","TABLE","TEMP","TEMPORARY","THEN","TIES","TO","TRANSACTION","TRIGGER","UNBOUNDED","UNION","UNIQUE","UPDATE","USING","VACUUM","VALUES","VIEW","VIRTUAL","WHEN","WHERE","WINDOW","WITH","WITHOUT"]}),ti=f(["SELECT [ALL | DISTINCT]"]),ta=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK] INTO","REPLACE INTO","VALUES","SET","CREATE [TEMPORARY | TEMP] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY | TEMP] TABLE [IF NOT EXISTS]"]),ts=f(["UPDATE [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK]","ON CONFLICT","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME [COLUMN]","RENAME TO","SET SCHEMA"]),tl=f(["UNION [ALL]","EXCEPT","INTERSECT"]),tE=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tc=f(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN"]),tu={tokenizerOptions:{reservedSelect:ti,reservedClauses:[...ta,...ts],reservedSetOperations:tl,reservedJoins:tE,reservedPhrases:tc,reservedKeywords:to,reservedFunctionNames:tr,stringTypes:["''-qq",{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``","[]"],paramTypes:{positional:!0,numbered:["?"],named:[":","@","$"]},operators:["%","~","&","|","<<",">>","==","->","->>","||"]},formatOptions:{onelineClauses:ts}},tT=v({set:["GROUPING"],window:["RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","ROW_NUMBER"],numeric:["POSITION","OCCURRENCES_REGEX","POSITION_REGEX","EXTRACT","CHAR_LENGTH","CHARACTER_LENGTH","OCTET_LENGTH","CARDINALITY","ABS","MOD","LN","EXP","POWER","SQRT","FLOOR","CEIL","CEILING","WIDTH_BUCKET"],string:["SUBSTRING","SUBSTRING_REGEX","UPPER","LOWER","CONVERT","TRANSLATE","TRANSLATE_REGEX","TRIM","OVERLAY","NORMALIZE","SPECIFICTYPE"],datetime:["CURRENT_DATE","CURRENT_TIME","LOCALTIME","CURRENT_TIMESTAMP","LOCALTIMESTAMP"],aggregate:["COUNT","AVG","MAX","MIN","SUM","STDDEV_POP","STDDEV_SAMP","VAR_SAMP","VAR_POP","COLLECT","FUSION","INTERSECTION","COVAR_POP","COVAR_SAMP","CORR","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","PERCENTILE_CONT","PERCENTILE_DISC"],cast:["CAST"],caseAbbrev:["COALESCE","NULLIF"],nonStandard:["ROUND","SIN","COS","TAN","ASIN","ACOS","ATAN"],dataTypes:["CHARACTER","CHAR","CHARACTER VARYING","CHAR VARYING","VARCHAR","CHARACTER LARGE OBJECT","CHAR LARGE OBJECT","CLOB","NATIONAL CHARACTER","NATIONAL CHAR","NCHAR","NATIONAL CHARACTER VARYING","NATIONAL CHAR VARYING","NCHAR VARYING","NATIONAL CHARACTER LARGE OBJECT","NCHAR LARGE OBJECT","NCLOB","BINARY","BINARY VARYING","VARBINARY","BINARY LARGE OBJECT","BLOB","NUMERIC","DECIMAL","DEC","TIME","TIMESTAMP"]}),tR=v({all:["ALL","ALLOCATE","ALTER","ANY","ARE","ARRAY","AS","ASENSITIVE","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BY","CALL","CALLED","CASCADED","CAST","CHAR","CHARACTER","CHECK","CLOB","CLOSE","COALESCE","COLLATE","COLUMN","COMMIT","CONDITION","CONNECT","CONSTRAINT","CORRESPONDING","CREATE","CROSS","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DELETE","DEREF","DESCRIBE","DETERMINISTIC","DISCONNECT","DISTINCT","DOUBLE","DROP","DYNAMIC","EACH","ELEMENT","END-EXEC","ESCAPE","EVERY","EXCEPT","EXEC","EXECUTE","EXISTS","EXTERNAL","FALSE","FETCH","FILTER","FLOAT","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GET","GLOBAL","GRANT","GROUP","HAVING","HOLD","HOUR","IDENTITY","IN","INDICATOR","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","LANGUAGE","LARGE","LATERAL","LEADING","LEFT","LIKE","LIKE_REGEX","LOCAL","MATCH","MEMBER","MERGE","METHOD","MINUTE","MODIFIES","MODULE","MONTH","MULTISET","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NO","NONE","NOT","NULL","NULLIF","NUMERIC","OF","OLD","ON","ONLY","OPEN","ORDER","OUT","OUTER","OVER","OVERLAPS","PARAMETER","PARTITION","PRECISION","PREPARE","PRIMARY","PROCEDURE","RANGE","READS","REAL","RECURSIVE","REF","REFERENCES","REFERENCING","RELEASE","RESULT","RETURN","RETURNS","REVOKE","RIGHT","ROLLBACK","ROLLUP","ROW","ROWS","SAVEPOINT","SCOPE","SCROLL","SEARCH","SECOND","SELECT","SENSITIVE","SESSION_USER","SET","SIMILAR","SMALLINT","SOME","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","START","STATIC","SUBMULTISET","SYMMETRIC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSLATION","TREAT","TRIGGER","TRUE","UESCAPE","UNION","UNIQUE","UNKNOWN","UNNEST","UPDATE","USER","USING","VALUE","VALUES","VARBINARY","VARCHAR","VARYING","WHENEVER","WINDOW","WITHIN","WITHOUT","YEAR"]}),tA=f(["SELECT [ALL | DISTINCT]"]),td=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET","CREATE [RECURSIVE] VIEW","CREATE [GLOBAL TEMPORARY | LOCAL TEMPORARY] TABLE"]),tf=f(["UPDATE","WHERE CURRENT OF","DELETE FROM","DROP TABLE","ALTER TABLE","ADD COLUMN","DROP [COLUMN]","RENAME COLUMN","RENAME TO","ALTER [COLUMN]","{SET | DROP} DEFAULT","ADD SCOPE","DROP SCOPE {CASCADE | RESTRICT}","RESTART WITH","TRUNCATE TABLE","SET SCHEMA"]),tS=f(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),tp=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tO=f(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),tI={tokenizerOptions:{reservedSelect:tA,reservedClauses:[...td,...tf],reservedSetOperations:tS,reservedJoins:tp,reservedPhrases:tO,reservedKeywords:tR,reservedFunctionNames:tT,stringTypes:[{quote:"''-qq-bs",prefixes:["N","U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``"],paramTypes:{positional:!0},operators:["||"]},formatOptions:{onelineClauses:tf}},tN=v({all:["ABS","ACOS","ALL_MATCH","ANY_MATCH","APPROX_DISTINCT","APPROX_MOST_FREQUENT","APPROX_PERCENTILE","APPROX_SET","ARBITRARY","ARRAYS_OVERLAP","ARRAY_AGG","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_SORT","ARRAY_UNION","ASIN","ATAN","ATAN2","AT_TIMEZONE","AVG","BAR","BETA_CDF","BING_TILE","BING_TILES_AROUND","BING_TILE_AT","BING_TILE_COORDINATES","BING_TILE_POLYGON","BING_TILE_QUADKEY","BING_TILE_ZOOM_LEVEL","BITWISE_AND","BITWISE_AND_AGG","BITWISE_LEFT_SHIFT","BITWISE_NOT","BITWISE_OR","BITWISE_OR_AGG","BITWISE_RIGHT_SHIFT","BITWISE_RIGHT_SHIFT_ARITHMETIC","BITWISE_XOR","BIT_COUNT","BOOL_AND","BOOL_OR","CARDINALITY","CAST","CBRT","CEIL","CEILING","CHAR2HEXINT","CHECKSUM","CHR","CLASSIFY","COALESCE","CODEPOINT","COLOR","COMBINATIONS","CONCAT","CONCAT_WS","CONTAINS","CONTAINS_SEQUENCE","CONVEX_HULL_AGG","CORR","COS","COSH","COSINE_SIMILARITY","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CRC32","CUME_DIST","CURRENT_CATALOG","CURRENT_DATE","CURRENT_GROUPS","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","DATE","DATE_ADD","DATE_DIFF","DATE_FORMAT","DATE_PARSE","DATE_TRUNC","DAY","DAY_OF_MONTH","DAY_OF_WEEK","DAY_OF_YEAR","DEGREES","DENSE_RANK","DOW","DOY","E","ELEMENT_AT","EMPTY_APPROX_SET","EVALUATE_CLASSIFIER_PREDICTIONS","EVERY","EXP","EXTRACT","FEATURES","FILTER","FIRST_VALUE","FLATTEN","FLOOR","FORMAT","FORMAT_DATETIME","FORMAT_NUMBER","FROM_BASE","FROM_BASE32","FROM_BASE64","FROM_BASE64URL","FROM_BIG_ENDIAN_32","FROM_BIG_ENDIAN_64","FROM_ENCODED_POLYLINE","FROM_GEOJSON_GEOMETRY","FROM_HEX","FROM_IEEE754_32","FROM_IEEE754_64","FROM_ISO8601_DATE","FROM_ISO8601_TIMESTAMP","FROM_ISO8601_TIMESTAMP_NANOS","FROM_UNIXTIME","FROM_UNIXTIME_NANOS","FROM_UTF8","GEOMETRIC_MEAN","GEOMETRY_FROM_HADOOP_SHAPE","GEOMETRY_INVALID_REASON","GEOMETRY_NEAREST_POINTS","GEOMETRY_TO_BING_TILES","GEOMETRY_UNION","GEOMETRY_UNION_AGG","GREATEST","GREAT_CIRCLE_DISTANCE","HAMMING_DISTANCE","HASH_COUNTS","HISTOGRAM","HMAC_MD5","HMAC_SHA1","HMAC_SHA256","HMAC_SHA512","HOUR","HUMAN_READABLE_SECONDS","IF","INDEX","INFINITY","INTERSECTION_CARDINALITY","INVERSE_BETA_CDF","INVERSE_NORMAL_CDF","IS_FINITE","IS_INFINITE","IS_JSON_SCALAR","IS_NAN","JACCARD_INDEX","JSON_ARRAY_CONTAINS","JSON_ARRAY_GET","JSON_ARRAY_LENGTH","JSON_EXISTS","JSON_EXTRACT","JSON_EXTRACT_SCALAR","JSON_FORMAT","JSON_PARSE","JSON_QUERY","JSON_SIZE","JSON_VALUE","KURTOSIS","LAG","LAST_DAY_OF_MONTH","LAST_VALUE","LEAD","LEARN_CLASSIFIER","LEARN_LIBSVM_CLASSIFIER","LEARN_LIBSVM_REGRESSOR","LEARN_REGRESSOR","LEAST","LENGTH","LEVENSHTEIN_DISTANCE","LINE_INTERPOLATE_POINT","LINE_INTERPOLATE_POINTS","LINE_LOCATE_POINT","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","LUHN_CHECK","MAKE_SET_DIGEST","MAP","MAP_AGG","MAP_CONCAT","MAP_ENTRIES","MAP_FILTER","MAP_FROM_ENTRIES","MAP_KEYS","MAP_UNION","MAP_VALUES","MAP_ZIP_WITH","MAX","MAX_BY","MD5","MERGE","MERGE_SET_DIGEST","MILLISECOND","MIN","MINUTE","MIN_BY","MOD","MONTH","MULTIMAP_AGG","MULTIMAP_FROM_ENTRIES","MURMUR3","NAN","NGRAMS","NONE_MATCH","NORMALIZE","NORMAL_CDF","NOW","NTH_VALUE","NTILE","NULLIF","NUMERIC_HISTOGRAM","OBJECTID","OBJECTID_TIMESTAMP","PARSE_DATA_SIZE","PARSE_DATETIME","PARSE_DURATION","PERCENT_RANK","PI","POSITION","POW","POWER","QDIGEST_AGG","QUARTER","RADIANS","RAND","RANDOM","RANK","REDUCE","REDUCE_AGG","REGEXP_COUNT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGRESS","REGR_INTERCEPT","REGR_SLOPE","RENDER","REPEAT","REPLACE","REVERSE","RGB","ROUND","ROW_NUMBER","RPAD","RTRIM","SECOND","SEQUENCE","SHA1","SHA256","SHA512","SHUFFLE","SIGN","SIMPLIFY_GEOMETRY","SIN","SKEWNESS","SLICE","SOUNDEX","SPATIAL_PARTITIONING","SPATIAL_PARTITIONS","SPLIT","SPLIT_PART","SPLIT_TO_MAP","SPLIT_TO_MULTIMAP","SPOOKY_HASH_V2_32","SPOOKY_HASH_V2_64","SQRT","STARTS_WITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRPOS","ST_AREA","ST_ASBINARY","ST_ASTEXT","ST_BOUNDARY","ST_BUFFER","ST_CENTROID","ST_CONTAINS","ST_CONVEXHULL","ST_COORDDIM","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_ENDPOINT","ST_ENVELOPE","ST_ENVELOPEASPTS","ST_EQUALS","ST_EXTERIORRING","ST_GEOMETRIES","ST_GEOMETRYFROMTEXT","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMBINARY","ST_INTERIORRINGN","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISRING","ST_ISSIMPLE","ST_ISVALID","ST_LENGTH","ST_LINEFROMTEXT","ST_LINESTRING","ST_MULTIPOINT","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINT","ST_POINTN","ST_POINTS","ST_POLYGON","ST_RELATE","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_TOUCHES","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","SUBSTR","SUBSTRING","SUM","TAN","TANH","TDIGEST_AGG","TIMESTAMP_OBJECTID","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO_BASE","TO_BASE32","TO_BASE64","TO_BASE64URL","TO_BIG_ENDIAN_32","TO_BIG_ENDIAN_64","TO_CHAR","TO_DATE","TO_ENCODED_POLYLINE","TO_GEOJSON_GEOMETRY","TO_GEOMETRY","TO_HEX","TO_IEEE754_32","TO_IEEE754_64","TO_ISO8601","TO_MILLISECONDS","TO_SPHERICAL_GEOGRAPHY","TO_TIMESTAMP","TO_UNIXTIME","TO_UTF8","TRANSFORM","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRIM_ARRAY","TRUNCATE","TRY","TRY_CAST","TYPEOF","UPPER","URL_DECODE","URL_ENCODE","URL_EXTRACT_FRAGMENT","URL_EXTRACT_HOST","URL_EXTRACT_PARAMETER","URL_EXTRACT_PATH","URL_EXTRACT_PORT","URL_EXTRACT_PROTOCOL","URL_EXTRACT_QUERY","UUID","VALUES_AT_QUANTILES","VALUE_AT_QUANTILE","VARIANCE","VAR_POP","VAR_SAMP","VERSION","WEEK","WEEK_OF_YEAR","WIDTH_BUCKET","WILSON_INTERVAL_LOWER","WILSON_INTERVAL_UPPER","WITH_TIMEZONE","WORD_STEM","XXHASH64","YEAR","YEAR_OF_WEEK","YOW","ZIP","ZIP_WITH"],rowPattern:["CLASSIFIER","FIRST","LAST","MATCH_NUMBER","NEXT","PERMUTE","PREV"]}),tC=v({all:["ABSENT","ADD","ADMIN","AFTER","ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","AT","AUTHORIZATION","BERNOULLI","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CATALOGS","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","CONDITIONAL","CONSTRAINT","COPARTITION","CREATE","CROSS","CUBE","CURRENT","CURRENT_PATH","CURRENT_ROLE","DATA","DEALLOCATE","DEFAULT","DEFINE","DEFINER","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DISTINCT","DISTRIBUTED","DOUBLE","DROP","ELSE","EMPTY","ENCODING","END","ERROR","ESCAPE","EXCEPT","EXCLUDING","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FINAL","FIRST","FOLLOWING","FOR","FROM","FULL","FUNCTIONS","GRANT","GRANTED","GRANTS","GRAPHVIZ","GROUP","GROUPING","GROUPS","HAVING","IGNORE","IN","INCLUDING","INITIAL","INNER","INPUT","INSERT","INTERSECT","INTERVAL","INTO","INVOKER","IO","IS","ISOLATION","JOIN","JSON","JSON_ARRAY","JSON_OBJECT","KEEP","KEY","KEYS","LAST","LATERAL","LEADING","LEFT","LEVEL","LIKE","LIMIT","LOCAL","LOGICAL","MATCH","MATCHED","MATCHES","MATCH_RECOGNIZE","MATERIALIZED","MEASURES","NATURAL","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NOT","NULL","NULLS","OBJECT","OF","OFFSET","OMIT","ON","ONE","ONLY","OPTION","OR","ORDER","ORDINALITY","OUTER","OUTPUT","OVER","OVERFLOW","PARTITION","PARTITIONS","PASSING","PAST","PATH","PATTERN","PER","PERMUTE","PRECEDING","PRECISION","PREPARE","PRIVILEGES","PROPERTIES","PRUNE","QUOTES","RANGE","READ","RECURSIVE","REFRESH","RENAME","REPEATABLE","RESET","RESPECT","RESTRICT","RETURNING","REVOKE","RIGHT","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","RUNNING","SCALAR","SCHEMA","SCHEMAS","SECURITY","SEEK","SELECT","SERIALIZABLE","SESSION","SET","SETS","SHOW","SKIP","SOME","START","STATS","STRING","SUBSET","SYSTEM","TABLE","TABLES","TABLESAMPLE","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRUE","TYPE","UESCAPE","UNBOUNDED","UNCOMMITTED","UNCONDITIONAL","UNION","UNIQUE","UNKNOWN","UNMATCHED","UNNEST","UPDATE","USE","USER","USING","UTF16","UTF32","UTF8","VALIDATE","VALUE","VALUES","VERBOSE","VIEW","WHEN","WHERE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","ZONE"],types:["BIGINT","INT","INTEGER","SMALLINT","TINYINT","BOOLEAN","DATE","DECIMAL","REAL","DOUBLE","HYPERLOGLOG","QDIGEST","TDIGEST","P4HYPERLOGLOG","INTERVAL","TIMESTAMP","TIME","VARBINARY","VARCHAR","CHAR","ROW","ARRAY","MAP","JSON","JSON2016","IPADDRESS","GEOMETRY","UUID","SETDIGEST","JONIREGEXP","RE2JREGEXP","LIKEPATTERN","COLOR","CODEPOINTS","FUNCTION","JSONPATH"]}),th=f(["SELECT [ALL | DISTINCT]"]),tm=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET","CREATE [OR REPLACE] [MATERIALIZED] VIEW","CREATE TABLE [IF NOT EXISTS]","MATCH_RECOGNIZE","MEASURES","ONE ROW PER MATCH","ALL ROWS PER MATCH","AFTER MATCH","PATTERN","SUBSET","DEFINE"]),tg=f(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME COLUMN [IF EXISTS]","RENAME TO","SET AUTHORIZATION [USER | ROLE]","SET PROPERTIES","EXECUTE","TRUNCATE TABLE","ALTER SCHEMA","ALTER MATERIALIZED VIEW","ALTER VIEW","CREATE SCHEMA","CREATE ROLE","DROP SCHEMA","DROP MATERIALIZED VIEW","DROP VIEW","DROP ROLE","EXPLAIN","ANALYZE","EXPLAIN ANALYZE","EXPLAIN ANALYZE VERBOSE","USE","COMMENT ON TABLE","COMMENT ON COLUMN","DESCRIBE INPUT","DESCRIBE OUTPUT","REFRESH MATERIALIZED VIEW","RESET SESSION","SET SESSION","SET PATH","SET TIME ZONE","SHOW GRANTS","SHOW CREATE TABLE","SHOW CREATE SCHEMA","SHOW CREATE VIEW","SHOW CREATE MATERIALIZED VIEW","SHOW TABLES","SHOW SCHEMAS","SHOW CATALOGS","SHOW COLUMNS","SHOW STATS FOR","SHOW ROLES","SHOW CURRENT ROLES","SHOW ROLE GRANTS","SHOW FUNCTIONS","SHOW SESSION"]),t_=f(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),tL=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tv=f(["{ROWS | RANGE | GROUPS} BETWEEN","IS [NOT] DISTINCT FROM"]),tP={tokenizerOptions:{reservedSelect:th,reservedClauses:[...tm,...tg],reservedSetOperations:t_,reservedJoins:tL,reservedPhrases:tv,reservedKeywords:tC,reservedFunctionNames:tN,extraParens:["[]","{}"],stringTypes:[{quote:"''-qq",prefixes:["U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq'],paramTypes:{positional:!0},operators:["%","->","=>",":","||","|","^","$"]},formatOptions:{onelineClauses:tg}},ty=v({aggregate:["APPROX_COUNT_DISTINCT","AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","STDEV","STDEVP","SUM","VAR","VARP"],analytic:["CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","Collation - COLLATIONPROPERTY","Collation - TERTIARY_WEIGHTS"],configuration:["@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION"],conversion:["CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE"],cryptographic:["ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY"],cursor:["@@CURSOR_ROWS","@@FETCH_STATUS","CURSOR_STATUS"],dataType:["DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY"],datetime:["@@DATEFIRST","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TIMEZONE_ID","DATEADD","DATEDIFF","DATEDIFF_BIG","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","JSON","ISJSON","JSON_VALUE","JSON_QUERY","JSON_MODIFY"],mathematical:["ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","CHOOSE","GREATEST","IIF","LEAST"],metadata:["@@PROCID","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FILEPROPERTYEX","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","NEXT VALUE FOR","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY"],ranking:["DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME"],security:["CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","DATABASE_PRINCIPAL_ID","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME"],string:["ASCII","CHAR","CHARINDEX","CONCAT","CONCAT_WS","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STRING_AGG","STRING_ESCAPE","STUFF","SUBSTRING","TRANSLATE","TRIM","UNICODE","UPPER"],system:["$PARTITION","@@ERROR","@@IDENTITY","@@PACK_RECEIVED","@@ROWCOUNT","@@TRANCOUNT","BINARY_CHECKSUM","CHECKSUM","COMPRESS","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","CURRENT_TRANSACTION_ID","DECOMPRESS","ERROR_LINE","ERROR_MESSAGE","ERROR_NUMBER","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GET_FILESTREAM_TRANSACTION_CONTEXT","GETANSINULL","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","SESSION_CONTEXT","XACT_STATE"],statistical:["@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACK_SENT","@@PACKET_ERRORS","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE","TEXTPTR","TEXTVALID"],trigger:["COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE"],caseAbbrev:["COALESCE","NULLIF"],dataTypes:["DECIMAL","NUMERIC","FLOAT","REAL","DATETIME2","DATETIMEOFFSET","TIME","CHAR","VARCHAR","NCHAR","NVARCHAR","BINARY","VARBINARY"]}),tb=v({standard:["ADD","ALL","ALTER","AND","ANY","AS","ASC","AUTHORIZATION","BACKUP","BEGIN","BETWEEN","BREAK","BROWSE","BULK","BY","CASCADE","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLUMN","COMMIT","COMPUTE","CONSTRAINT","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DBCC","DEALLOCATE","DECLARE","DEFAULT","DELETE","DENY","DESC","DISK","DISTINCT","DISTRIBUTED","DOUBLE","DROP","DUMP","ERRLVL","ESCAPE","EXEC","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FILE","FILLFACTOR","FOR","FOREIGN","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GOTO","GRANT","GROUP","HAVING","HOLDLOCK","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IN","INDEX","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KILL","LEFT","LIKE","LINENO","LOAD","MERGE","NATIONAL","NOCHECK","NONCLUSTERED","NOT","NULL","NULLIF","OF","OFF","OFFSETS","ON","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OUTER","OVER","PERCENT","PIVOT","PLAN","PRECISION","PRIMARY","PRINT","PROC","PROCEDURE","PUBLIC","RAISERROR","READ","READTEXT","RECONFIGURE","REFERENCES","REPLICATION","RESTORE","RESTRICT","RETURN","REVERT","REVOKE","RIGHT","ROLLBACK","ROWCOUNT","ROWGUIDCOL","RULE","SAVE","SCHEMA","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION_USER","SET","SETUSER","SHUTDOWN","SOME","STATISTICS","SYSTEM_USER","TABLE","TABLESAMPLE","TEXTSIZE","THEN","TO","TOP","TRAN","TRANSACTION","TRIGGER","TRUNCATE","TRY_CONVERT","TSEQUAL","UNION","UNIQUE","UNPIVOT","UPDATE","UPDATETEXT","USE","USER","VALUES","VARYING","VIEW","WAITFOR","WHERE","WHILE","WITH","WITHIN GROUP","WRITETEXT"],odbc:["ABSOLUTE","ACTION","ADA","ADD","ALL","ALLOCATE","ALTER","AND","ANY","ARE","AS","ASC","ASSERTION","AT","AUTHORIZATION","AVG","BEGIN","BETWEEN","BIT","BIT_LENGTH","BOTH","BY","CASCADE","CASCADED","CAST","CATALOG","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOSE","COALESCE","COLLATE","COLLATION","COLUMN","COMMIT","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DESCRIBE","DESCRIPTOR","DIAGNOSTICS","DISCONNECT","DISTINCT","DOMAIN","DOUBLE","DROP","END-EXEC","ESCAPE","EXCEPTION","EXEC","EXECUTE","EXISTS","EXTERNAL","EXTRACT","FALSE","FETCH","FIRST","FLOAT","FOR","FOREIGN","FORTRAN","FOUND","FROM","FULL","GET","GLOBAL","GO","GOTO","GRANT","GROUP","HAVING","HOUR","IDENTITY","IMMEDIATE","IN","INCLUDE","INDEX","INDICATOR","INITIALLY","INNER","INPUT","INSENSITIVE","INSERT","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","ISOLATION","JOIN","KEY","LANGUAGE","LAST","LEADING","LEFT","LEVEL","LIKE","LOCAL","LOWER","MATCH","MAX","MIN","MINUTE","MODULE","MONTH","NAMES","NATIONAL","NATURAL","NCHAR","NEXT","NO","NONE","NOT","NULL","NULLIF","NUMERIC","OCTET_LENGTH","OF","ONLY","OPEN","OPTION","OR","ORDER","OUTER","OUTPUT","OVERLAPS","PAD","PARTIAL","PASCAL","POSITION","PRECISION","PREPARE","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURE","PUBLIC","READ","REAL","REFERENCES","RELATIVE","RESTRICT","REVOKE","RIGHT","ROLLBACK","ROWS","SCHEMA","SCROLL","SECOND","SECTION","SELECT","SESSION","SESSION_USER","SET","SIZE","SMALLINT","SOME","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","SUBSTRING","SUM","SYSTEM_USER","TABLE","TEMPORARY","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TRIM","TRUE","UNION","UNIQUE","UNKNOWN","UPDATE","UPPER","USAGE","USER","VALUE","VALUES","VARCHAR","VARYING","VIEW","WHENEVER","WHERE","WITH","WORK","WRITE","YEAR","ZONE"]}),tD=f(["SELECT [ALL | DISTINCT]"]),tM=f(["WITH","INTO","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","OFFSET","FETCH {FIRST | NEXT}","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY TARGET | BY SOURCE] [THEN]","UPDATE SET","CREATE [OR ALTER] [MATERIALIZED] VIEW","CREATE TABLE","CREATE [OR ALTER] {PROC | PROCEDURE}"]),tU=f(["UPDATE","WHERE CURRENT OF","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD","DROP COLUMN [IF EXISTS]","ALTER COLUMN","TRUNCATE TABLE","ADD SENSITIVITY CLASSIFICATION","ADD SIGNATURE","AGGREGATE","ANSI_DEFAULTS","ANSI_NULLS","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_PADDING","ANSI_WARNINGS","APPLICATION ROLE","ARITHABORT","ARITHIGNORE","ASSEMBLY","ASYMMETRIC KEY","AUTHORIZATION","AVAILABILITY GROUP","BACKUP","BACKUP CERTIFICATE","BACKUP MASTER KEY","BACKUP SERVICE MASTER KEY","BEGIN CONVERSATION TIMER","BEGIN DIALOG CONVERSATION","BROKER PRIORITY","BULK INSERT","CERTIFICATE","CLOSE MASTER KEY","CLOSE SYMMETRIC KEY","COLLATE","COLUMN ENCRYPTION KEY","COLUMN MASTER KEY","COLUMNSTORE INDEX","CONCAT_NULL_YIELDS_NULL","CONTEXT_INFO","CONTRACT","CREDENTIAL","CRYPTOGRAPHIC PROVIDER","CURSOR_CLOSE_ON_COMMIT","DATABASE","DATABASE AUDIT SPECIFICATION","DATABASE ENCRYPTION KEY","DATABASE HADR","DATABASE SCOPED CONFIGURATION","DATABASE SCOPED CREDENTIAL","DATABASE SET","DATEFIRST","DATEFORMAT","DEADLOCK_PRIORITY","DENY","DENY XML","DISABLE TRIGGER","ENABLE TRIGGER","END CONVERSATION","ENDPOINT","EVENT NOTIFICATION","EVENT SESSION","EXECUTE AS","EXTERNAL DATA SOURCE","EXTERNAL FILE FORMAT","EXTERNAL LANGUAGE","EXTERNAL LIBRARY","EXTERNAL RESOURCE POOL","EXTERNAL TABLE","FIPS_FLAGGER","FMTONLY","FORCEPLAN","FULLTEXT CATALOG","FULLTEXT INDEX","FULLTEXT STOPLIST","FUNCTION","GET CONVERSATION GROUP","GET_TRANSMISSION_STATUS","GRANT","GRANT XML","IDENTITY_INSERT","IMPLICIT_TRANSACTIONS","INDEX","LANGUAGE","LOCK_TIMEOUT","LOGIN","MASTER KEY","MESSAGE TYPE","MOVE CONVERSATION","NOCOUNT","NOEXEC","NUMERIC_ROUNDABORT","OFFSETS","OPEN MASTER KEY","OPEN SYMMETRIC KEY","PARSEONLY","PARTITION FUNCTION","PARTITION SCHEME","PROCEDURE","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUOTED_IDENTIFIER","RECEIVE","REMOTE SERVICE BINDING","REMOTE_PROC_TRANSACTIONS","RESOURCE GOVERNOR","RESOURCE POOL","RESTORE","RESTORE FILELISTONLY","RESTORE HEADERONLY","RESTORE LABELONLY","RESTORE MASTER KEY","RESTORE REWINDONLY","RESTORE SERVICE MASTER KEY","RESTORE VERIFYONLY","REVERT","REVOKE","REVOKE XML","ROLE","ROUTE","ROWCOUNT","RULE","SCHEMA","SEARCH PROPERTY LIST","SECURITY POLICY","SELECTIVE XML INDEX","SEND","SENSITIVITY CLASSIFICATION","SEQUENCE","SERVER AUDIT","SERVER AUDIT SPECIFICATION","SERVER CONFIGURATION","SERVER ROLE","SERVICE","SERVICE MASTER KEY","SETUSER","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SIGNATURE","SPATIAL INDEX","STATISTICS","STATISTICS IO","STATISTICS PROFILE","STATISTICS TIME","STATISTICS XML","SYMMETRIC KEY","SYNONYM","TABLE","TABLE IDENTITY","TEXTSIZE","TRANSACTION ISOLATION LEVEL","TRIGGER","TYPE","UPDATE STATISTICS","USER","WORKLOAD GROUP","XACT_ABORT","XML INDEX","XML SCHEMA COLLECTION"]),tx=f(["UNION [ALL]","EXCEPT","INTERSECT"]),tG=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","{CROSS | OUTER} APPLY"]),tF=f(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),tH={tokenizerOptions:{reservedSelect:tD,reservedClauses:[...tM,...tU],reservedSetOperations:tx,reservedJoins:tG,reservedPhrases:tF,reservedKeywords:tb,reservedFunctionNames:ty,nestedBlockComments:!0,stringTypes:[{quote:"''-qq",prefixes:["N"]}],identTypes:['""-qq',"[]"],identChars:{first:"#@",rest:"#@$"},paramTypes:{named:["@"],quoted:["@"]},operators:["%","&","|","^","~","!<","!>","+=","-=","*=","/=","%=","|=","&=","^=","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:tU}},tB=v({all:["ABORT","ABSOLUTE","ACCESS","ACCESSIBLE","ACCOUNT","ACTION","ACTIVE","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","AGGREGATES","AGGREGATOR","AGGREGATOR_ID","AGGREGATOR_PLAN_HASH","AGGREGATORS","ALGORITHM","ALL","ALSO","ALTER","ALWAYS","ANALYZE","AND","ANY","ARGHISTORY","ARRANGE","ARRANGEMENT","ARRAY","AS","ASC","ASCII","ASENSITIVE","ASM","ASSERTION","ASSIGNMENT","AST","ASYMMETRIC","ASYNC","AT","ATTACH","ATTRIBUTE","AUTHORIZATION","AUTO","AUTO_INCREMENT","AUTO_REPROVISION","AUTOSTATS","AUTOSTATS_CARDINALITY_MODE","AUTOSTATS_ENABLED","AUTOSTATS_HISTOGRAM_MODE","AUTOSTATS_SAMPLING","AVAILABILITY","AVG","AVG_ROW_LENGTH","AVRO","AZURE","BACKGROUND","_BACKGROUND_THREADS_FOR_CLEANUP","BACKUP","BACKUP_HISTORY","BACKUP_ID","BACKWARD","BATCH","BATCHES","BATCH_INTERVAL","_BATCH_SIZE_LIMIT","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","_BINARY","BIT","BLOB","BOOL","BOOLEAN","BOOTSTRAP","BOTH","_BT","BTREE","BUCKET_COUNT","BUCKETS","BY","BYTE","BYTE_LENGTH","CACHE","CALL","CALL_FOR_PIPELINE","CALLED","CAPTURE","CASCADE","CASCADED","CASE","CATALOG","CHAIN","CHANGE","CHAR","CHARACTER","CHARACTERISTICS","CHARSET","CHECK","CHECKPOINT","_CHECK_CAN_CONNECT","_CHECK_CONSISTENCY","CHECKSUM","_CHECKSUM","CLASS","CLEAR","CLIENT","CLIENT_FOUND_ROWS","CLOSE","CLUSTER","CLUSTERED","CNF","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNAR","COLUMNS","COLUMNSTORE","COLUMNSTORE_SEGMENT_ROWS","COMMENT","COMMENTS","COMMIT","COMMITTED","_COMMIT_LOG_TAIL","COMPACT","COMPILE","COMPRESSED","COMPRESSION","CONCURRENT","CONCURRENTLY","CONDITION","CONFIGURATION","CONNECTION","CONNECTIONS","CONFIG","CONSTRAINT","CONTAINS","CONTENT","CONTINUE","_CONTINUE_REPLAY","CONVERSION","CONVERT","COPY","_CORE","COST","CREATE","CREDENTIALS","CROSS","CUBE","CSV","CUME_DIST","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_SCHEMA","CURRENT_SECURITY_GROUPS","CURRENT_SECURITY_ROLES","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATABASES","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINED","DEFINER","DELAYED","DELAY_KEY_WRITE","DELETE","DELIMITER","DELIMITERS","DENSE_RANK","DESC","DESCRIBE","DETACH","DETERMINISTIC","DICTIONARY","DIFFERENTIAL","DIRECTORY","DISABLE","DISCARD","_DISCONNECT","DISK","DISTINCT","DISTINCTROW","DISTRIBUTED_JOINS","DIV","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","_DROP_PROFILE","DUAL","DUMP","DUPLICATE","DURABILITY","DYNAMIC","EARLIEST","EACH","ECHO","ELECTION","ELSE","ELSEIF","ENABLE","ENCLOSED","ENCODING","ENCRYPTED","END","ENGINE","ENGINES","ENUM","ERRORS","ESCAPE","ESCAPED","ESTIMATE","EVENT","EVENTS","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTENDED","EXTENSION","EXTERNAL","EXTERNAL_HOST","EXTERNAL_PORT","EXTRACTOR","EXTRACTORS","EXTRA_JOIN","_FAILOVER","FAILED_LOGIN_ATTEMPTS","FAILURE","FALSE","FAMILY","FAULT","FETCH","FIELDS","FILE","FILES","FILL","FIX_ALTER","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOR","FORCE","FORCE_COMPILED_MODE","FORCE_INTERPRETER_MODE","FOREGROUND","FOREIGN","FORMAT","FORWARD","FREEZE","FROM","FS","_FSYNC","FULL","FULLTEXT","FUNCTION","FUNCTIONS","GC","GCS","GET_FORMAT","_GC","_GCX","GENERATE","GEOGRAPHY","GEOGRAPHYPOINT","GEOMETRY","GEOMETRYPOINT","GLOBAL","_GLOBAL_VERSION_TIMESTAMP","GRANT","GRANTED","GRANTS","GROUP","GROUPING","GROUPS","GZIP","HANDLE","HANDLER","HARD_CPU_LIMIT_PERCENTAGE","HASH","HAS_TEMP_TABLES","HAVING","HDFS","HEADER","HEARTBEAT_NO_LOGGING","HIGH_PRIORITY","HISTOGRAM","HOLD","HOLDING","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IDENTITY","IF","IGNORE","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDING","INCREMENT","INCREMENTAL","INDEX","INDEXES","INFILE","INHERIT","INHERITS","_INIT_PROFILE","INIT","INITIALIZE","INITIALLY","INJECT","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTANCE","INSTEAD","IN","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","_INTERNAL_DYNAMIC_TYPECAST","INTERPRETER_MODE","INTERSECT","INTERVAL","INTO","INVOKER","ISOLATION","ITERATE","JOIN","JSON","KAFKA","KEY","KEY_BLOCK_SIZE","KEYS","KILL","KILLALL","LABEL","LAG","LANGUAGE","LARGE","LAST","LAST_VALUE","LATERAL","LATEST","LC_COLLATE","LC_CTYPE","LEAD","LEADING","LEAF","LEAKPROOF","LEAVE","LEAVES","LEFT","LEVEL","LICENSE","LIKE","LIMIT","LINES","LISTEN","LLVM","LOADDATA_WHERE","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","_LS","LZ4","MANAGEMENT","_MANAGEMENT_THREAD","MAPPING","MASTER","MATCH","MATERIALIZED","MAXVALUE","MAX_CONCURRENCY","MAX_ERRORS","MAX_PARTITIONS_PER_BATCH","MAX_QUEUE_DEPTH","MAX_RETRIES_PER_BATCH_PARTITION","MAX_ROWS","MBC","MPL","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMBER","MEMORY","MEMORY_PERCENTAGE","_MEMSQL_TABLE_ID_LOOKUP","MEMSQL","MEMSQL_DESERIALIZE","MEMSQL_IMITATING_KAFKA","MEMSQL_SERIALIZE","MERGE","METADATA","MICROSECOND","MIDDLEINT","MIN_ROWS","MINUS","MINUTE_MICROSECOND","MINUTE_SECOND","MINVALUE","MOD","MODE","MODEL","MODIFIES","MODIFY","MONTH","MOVE","MPL","NAMES","NAMED","NAMESPACE","NATIONAL","NATURAL","NCHAR","NEXT","NO","NODE","NONE","NO_QUERY_REWRITE","NOPARAM","NOT","NOTHING","NOTIFY","NOWAIT","NO_WRITE_TO_BINLOG","NO_QUERY_REWRITE","NORELY","NTH_VALUE","NTILE","NULL","NULLCOLS","NULLS","NUMERIC","NVARCHAR","OBJECT","OF","OFF","OFFLINE","OFFSET","OFFSETS","OIDS","ON","ONLINE","ONLY","OPEN","OPERATOR","OPTIMIZATION","OPTIMIZE","OPTIMIZER","OPTIMIZER_STATE","OPTION","OPTIONS","OPTIONALLY","OR","ORDER","ORDERED_SERIALIZE","ORPHAN","OUT","OUT_OF_ORDER","OUTER","OUTFILE","OVER","OVERLAPS","OVERLAY","OWNED","OWNER","PACK_KEYS","PAIRED","PARSER","PARQUET","PARTIAL","PARTITION","PARTITION_ID","PARTITIONING","PARTITIONS","PASSING","PASSWORD","PASSWORD_LOCK_TIME","PAUSE","_PAUSE_REPLAY","PERIODIC","PERSISTED","PIPELINE","PIPELINES","PLACING","PLAN","PLANS","PLANCACHE","PLUGINS","POOL","POOLS","PORT","PRECEDING","PRECISION","PREPARE","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROGRAM","PROMOTE","PROXY","PURGE","QUARTER","QUERIES","QUERY","QUERY_TIMEOUT","QUEUE","RANGE","RANK","READ","_READ","READS","REAL","REASSIGN","REBALANCE","RECHECK","RECORD","RECURSIVE","REDUNDANCY","REDUNDANT","REF","REFERENCE","REFERENCES","REFRESH","REGEXP","REINDEX","RELATIVE","RELEASE","RELOAD","RELY","REMOTE","REMOVE","RENAME","REPAIR","_REPAIR_TABLE","REPEAT","REPEATABLE","_REPL","_REPROVISIONING","REPLACE","REPLICA","REPLICATE","REPLICATING","REPLICATION","REQUIRE","RESOURCE","RESOURCE_POOL","RESET","RESTART","RESTORE","RESTRICT","RESULT","_RESURRECT","RETRY","RETURN","RETURNING","RETURNS","REVERSE","RG_POOL","REVOKE","RIGHT","RIGHT_ANTI_JOIN","RIGHT_SEMI_JOIN","RIGHT_STRAIGHT_JOIN","RLIKE","ROLES","ROLLBACK","ROLLUP","ROUTINE","ROW","ROW_COUNT","ROW_FORMAT","ROW_NUMBER","ROWS","ROWSTORE","RULE","_RPC","RUNNING","S3","SAFE","SAVE","SAVEPOINT","SCALAR","SCHEMA","SCHEMAS","SCHEMA_BINDING","SCROLL","SEARCH","SECOND","SECOND_MICROSECOND","SECURITY","SELECT","SEMI_JOIN","_SEND_THREADS","SENSITIVE","SEPARATOR","SEQUENCE","SEQUENCES","SERIAL","SERIALIZABLE","SERIES","SERVICE_USER","SERVER","SESSION","SESSION_USER","SET","SETOF","SECURITY_LISTS_INTERSECT","SHA","SHARD","SHARDED","SHARDED_ID","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMILAR","SIMPLE","SITE","SKIP","SKIPPED_BATCHES","__SLEEP","SMALLINT","SNAPSHOT","_SNAPSHOT","_SNAPSHOTS","SOFT_CPU_LIMIT_PERCENTAGE","SOME","SONAME","SPARSE","SPATIAL","SPATIAL_CHECK_INDEX","SPECIFIC","SQL","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQLEXCEPTION","SQL_MODE","SQL_NO_CACHE","SQL_NO_LOGGING","SQL_SMALL_RESULT","SQLSTATE","SQLWARNING","STDIN","STDOUT","STOP","STORAGE","STRAIGHT_JOIN","STRICT","STRING","STRIP","SUCCESS","SUPER","SYMMETRIC","SYNC_SNAPSHOT","SYNC","_SYNC","_SYNC2","_SYNC_PARTITIONS","_SYNC_SNAPSHOT","SYNCHRONIZE","SYSID","SYSTEM","TABLE","TABLE_CHECKSUM","TABLES","TABLESPACE","TAGS","TARGET_SIZE","TASK","TEMP","TEMPLATE","TEMPORARY","TEMPTABLE","_TERM_BUMP","TERMINATE","TERMINATED","TEXT","THEN","TIME","TIMEOUT","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIMEZONE","TINYBLOB","TINYINT","TINYTEXT","TO","TRACELOGS","TRADITIONAL","TRAILING","TRANSFORM","TRANSACTION","_TRANSACTIONS_EXPERIMENTAL","TREAT","TRIGGER","TRIGGERS","TRUE","TRUNC","TRUNCATE","TRUSTED","TWO_PHASE","_TWOPCID","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO","UNENCRYPTED","UNENFORCED","UNHOLD","UNICODE","UNION","UNIQUE","_UNITTEST","UNKNOWN","UNLISTEN","_UNLOAD","UNLOCK","UNLOGGED","UNPIVOT","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USERS","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","_UTF8","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARIABLES","VARIADIC","VARYING","VERBOSE","VIEW","VOID","VOLATILE","VOTING","WAIT","_WAKE","WARNINGS","WEEK","WHEN","WHERE","WHILE","WHITESPACE","WINDOW","WITH","WITHOUT","WITHIN","_WM_HEARTBEAT","WORK","WORKLOAD","WRAPPER","WRITE","XACT_ID","XOR","YEAR","YEAR_MONTH","YES","ZEROFILL","ZONE"]}),tw=v({all:["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_COUNT_DISTINCT_ACCUMULATE","APPROX_COUNT_DISTINCT_COMBINE","APPROX_COUNT_DISTINCT_ESTIMATE","APPROX_GEOGRAPHY_INTERSECTS","APPROX_PERCENTILE","ASCII","ASIN","ATAN","ATAN2","AVG","BIN","BINARY","BIT_AND","BIT_COUNT","BIT_OR","BIT_XOR","CAST","CEIL","CEILING","CHAR","CHARACTER_LENGTH","CHAR_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COLLECT","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATEDIFF","DATE_FORMAT","DATE_SUB","DATE_TRUNC","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DECODE","DEFAULT","DEGREES","DENSE_RANK","DIV","DOT_PRODUCT","ELT","EUCLIDEAN_DISTANCE","EXP","EXTRACT","FIELD","FIRST","FIRST_VALUE","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOGRAPHY_AREA","GEOGRAPHY_CONTAINS","GEOGRAPHY_DISTANCE","GEOGRAPHY_INTERSECTS","GEOGRAPHY_LATITUDE","GEOGRAPHY_LENGTH","GEOGRAPHY_LONGITUDE","GEOGRAPHY_POINT","GEOGRAPHY_WITHIN_DISTANCE","GEOMETRY_AREA","GEOMETRY_CONTAINS","GEOMETRY_DISTANCE","GEOMETRY_FILTER","GEOMETRY_INTERSECTS","GEOMETRY_LENGTH","GEOMETRY_POINT","GEOMETRY_WITHIN_DISTANCE","GEOMETRY_X","GEOMETRY_Y","GREATEST","GROUPING","GROUP_CONCAT","HEX","HIGHLIGHT","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INITCAP","INSERT","INSTR","INTERVAL","IS","IS NULL","JSON_AGG","JSON_ARRAY_CONTAINS_DOUBLE","JSON_ARRAY_CONTAINS_JSON","JSON_ARRAY_CONTAINS_STRING","JSON_ARRAY_PUSH_DOUBLE","JSON_ARRAY_PUSH_JSON","JSON_ARRAY_PUSH_STRING","JSON_DELETE_KEY","JSON_EXTRACT_DOUBLE","JSON_EXTRACT_JSON","JSON_EXTRACT_STRING","JSON_EXTRACT_BIGINT","JSON_GET_TYPE","JSON_LENGTH","JSON_SET_DOUBLE","JSON_SET_JSON","JSON_SET_STRING","JSON_SPLICE_DOUBLE","JSON_SPLICE_JSON","JSON_SPLICE_STRING","LAG","LAST_DAY","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LN","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LPAD","LTRIM","MATCH","MAX","MD5","MEDIAN","MICROSECOND","MIN","MINUTE","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","NOT","NOW","NTH_VALUE","NTILE","NULLIF","OCTET_LENGTH","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIVOT","POSITION","POW","POWER","QUARTER","QUOTE","RADIANS","RAND","RANK","REGEXP","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCALAR","SCHEMA","SEC_TO_TIME","SHA1","SHA2","SIGMOID","SIGN","SIN","SLEEP","SPLIT","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUM","SYS_GUID","TAN","TIME","TIMEDIFF","TIME_BUCKET","TIME_FORMAT","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_JSON","TO_NUMBER","TO_SECONDS","TO_TIMESTAMP","TRIM","TRUNC","TRUNCATE","UCASE","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","USER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","VALUES","VARIANCE","VAR_POP","VAR_SAMP","VECTOR_SUB","VERSION","WEEK","WEEKDAY","WEEKOFYEAR","YEAR","BIT","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","DATETIME","TIMESTAMP","TIME","YEAR","CHAR","NATIONAL CHAR","VARCHAR","NATIONAL VARCHAR","BINARY","VARBINARY","BLOB","TEXT","ENUM"]}),t$=f(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),tY=f(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [IGNORE] [INTO]","VALUES","REPLACE [INTO]","SET","CREATE VIEW","CREATE [ROWSTORE] [REFERENCE | TEMPORARY | GLOBAL TEMPORARY] TABLE [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMPORARY] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] [EXTERNAL] FUNCTION"]),tV=f(["UPDATE","DELETE [FROM]","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] TABLE","ADD [COLUMN]","ADD [UNIQUE] {INDEX | KEY}","DROP [COLUMN]","MODIFY [COLUMN]","CHANGE","RENAME [TO | AS]","TRUNCATE [TABLE]","ADD AGGREGATOR","ADD LEAF","AGGREGATOR SET AS MASTER","ALTER DATABASE","ALTER PIPELINE","ALTER RESOURCE POOL","ALTER USER","ALTER VIEW","ANALYZE TABLE","ATTACH DATABASE","ATTACH LEAF","ATTACH LEAF ALL","BACKUP DATABASE","BINLOG","BOOTSTRAP AGGREGATOR","CACHE INDEX","CALL","CHANGE","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK BLOB CHECKSUM","CHECK TABLE","CHECKSUM TABLE","CLEAR ORPHAN DATABASES","CLONE","COMMIT","CREATE DATABASE","CREATE GROUP","CREATE INDEX","CREATE LINK","CREATE MILESTONE","CREATE PIPELINE","CREATE RESOURCE POOL","CREATE ROLE","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DETACH DATABASE","DETACH PIPELINE","DROP DATABASE","DROP FUNCTION","DROP INDEX","DROP LINK","DROP PIPELINE","DROP PROCEDURE","DROP RESOURCE POOL","DROP ROLE","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","FORCE","GRANT","HANDLER","HELP","KILL CONNECTION","KILLALL QUERIES","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","REBALANCE PARTITIONS","RELEASE SAVEPOINT","REMOVE AGGREGATOR","REMOVE LEAF","REPAIR TABLE","REPLACE","REPLICATE DATABASE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","RESTORE DATABASE","RESTORE REDUNDANCY","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE FUNCTION","SHOW CREATE PIPELINE","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SNAPSHOT DATABASE","SOURCE_POS_WAIT","START GROUP_REPLICATION","START PIPELINE","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP PIPELINE","STOP REPLICA","STOP REPLICATING","STOP SLAVE","TEST PIPELINE","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),tk=f(["UNION [ALL | DISTINCT]","EXCEPT","INTERSECT","MINUS"]),tW=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),tZ=f(["ON DELETE","ON UPDATE","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),tj={tokenizerOptions:{reservedSelect:t$,reservedClauses:[...tY,...tV],reservedSetOperations:tk,reservedJoins:tW,reservedPhrases:tZ,reservedKeywords:tB,reservedFunctionNames:tw,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_$]+"},{quote:"``",prefixes:["@"],requirePrefix:!0}],lineCommentTypes:["--","#"],operators:[":=","&","|","^","~","<<",">>","<=>","&&","||","::","::$","::%",":>","!:>"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return R.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{alwaysDenseOperators:["::","::$","::%"],onelineClauses:tV}},tX=v({all:["ABS","ACOS","ACOSH","ADD_MONTHS","ALL_USER_NAMES","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","APPROX_PERCENTILE_ACCUMULATE","APPROX_PERCENTILE_COMBINE","APPROX_PERCENTILE_ESTIMATE","APPROX_TOP_K","APPROX_TOP_K_ACCUMULATE","APPROX_TOP_K_COMBINE","APPROX_TOP_K_ESTIMATE","APPROXIMATE_JACCARD_INDEX","APPROXIMATE_SIMILARITY","ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_COMPACT","ARRAY_CONSTRUCT","ARRAY_CONSTRUCT_COMPACT","ARRAY_CONTAINS","ARRAY_INSERT","ARRAY_INTERSECTION","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_SIZE","ARRAY_SLICE","ARRAY_TO_STRING","ARRAY_UNION_AGG","ARRAY_UNIQUE_AGG","ARRAYS_OVERLAP","AS_ARRAY","AS_BINARY","AS_BOOLEAN","AS_CHAR","AS_VARCHAR","AS_DATE","AS_DECIMAL","AS_NUMBER","AS_DOUBLE","AS_REAL","AS_INTEGER","AS_OBJECT","AS_TIME","AS_TIMESTAMP_LTZ","AS_TIMESTAMP_NTZ","AS_TIMESTAMP_TZ","ASCII","ASIN","ASINH","ATAN","ATAN2","ATANH","AUTO_REFRESH_REGISTRATION_HISTORY","AUTOMATIC_CLUSTERING_HISTORY","AVG","BASE64_DECODE_BINARY","BASE64_DECODE_STRING","BASE64_ENCODE","BIT_LENGTH","BITAND","BITAND_AGG","BITMAP_BIT_POSITION","BITMAP_BUCKET_NUMBER","BITMAP_CONSTRUCT_AGG","BITMAP_COUNT","BITMAP_OR_AGG","BITNOT","BITOR","BITOR_AGG","BITSHIFTLEFT","BITSHIFTRIGHT","BITXOR","BITXOR_AGG","BOOLAND","BOOLAND_AGG","BOOLNOT","BOOLOR","BOOLOR_AGG","BOOLXOR","BOOLXOR_AGG","BUILD_SCOPED_FILE_URL","BUILD_STAGE_FILE_URL","CASE","CAST","CBRT","CEIL","CHARINDEX","CHECK_JSON","CHECK_XML","CHR","CHAR","COALESCE","COLLATE","COLLATION","COMPLETE_TASK_GRAPHS","COMPRESS","CONCAT","CONCAT_WS","CONDITIONAL_CHANGE_EVENT","CONDITIONAL_TRUE_EVENT","CONTAINS","CONVERT_TIMEZONE","COPY_HISTORY","CORR","COS","COSH","COT","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CUME_DIST","CURRENT_ACCOUNT","CURRENT_AVAILABLE_ROLES","CURRENT_CLIENT","CURRENT_DATABASE","CURRENT_DATE","CURRENT_IP_ADDRESS","CURRENT_REGION","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_SECONDARY_ROLES","CURRENT_SESSION","CURRENT_STATEMENT","CURRENT_TASK_GRAPHS","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TRANSACTION","CURRENT_USER","CURRENT_VERSION","CURRENT_WAREHOUSE","DATA_TRANSFER_HISTORY","DATABASE_REFRESH_HISTORY","DATABASE_REFRESH_PROGRESS","DATABASE_REFRESH_PROGRESS_BY_JOB","DATABASE_STORAGE_USAGE_HISTORY","DATE_FROM_PARTS","DATE_PART","DATE_TRUNC","DATEADD","DATEDIFF","DAYNAME","DECODE","DECOMPRESS_BINARY","DECOMPRESS_STRING","DECRYPT","DECRYPT_RAW","DEGREES","DENSE_RANK","DIV0","EDITDISTANCE","ENCRYPT","ENCRYPT_RAW","ENDSWITH","EQUAL_NULL","EXP","EXPLAIN_JSON","EXTERNAL_FUNCTIONS_HISTORY","EXTERNAL_TABLE_FILES","EXTERNAL_TABLE_FILE_REGISTRATION_HISTORY","EXTRACT","EXTRACT_SEMANTIC_CATEGORIES","FACTORIAL","FIRST_VALUE","FLATTEN","FLOOR","GENERATE_COLUMN_DESCRIPTION","GENERATOR","GET","GET_ABSOLUTE_PATH","GET_DDL","GET_IGNORE_CASE","GET_OBJECT_REFERENCES","GET_PATH","GET_PRESIGNED_URL","GET_RELATIVE_PATH","GET_STAGE_LOCATION","GETBIT","GREATEST","GROUPING","GROUPING_ID","HASH","HASH_AGG","HAVERSINE","HEX_DECODE_BINARY","HEX_DECODE_STRING","HEX_ENCODE","HLL","HLL_ACCUMULATE","HLL_COMBINE","HLL_ESTIMATE","HLL_EXPORT","HLL_IMPORT","HOUR","MINUTE","SECOND","IFF","IFNULL","ILIKE","ILIKE ANY","INFER_SCHEMA","INITCAP","INSERT","INVOKER_ROLE","INVOKER_SHARE","IS_ARRAY","IS_BINARY","IS_BOOLEAN","IS_CHAR","IS_VARCHAR","IS_DATE","IS_DATE_VALUE","IS_DECIMAL","IS_DOUBLE","IS_REAL","IS_GRANTED_TO_INVOKER_ROLE","IS_INTEGER","IS_NULL_VALUE","IS_OBJECT","IS_ROLE_IN_SESSION","IS_TIME","IS_TIMESTAMP_LTZ","IS_TIMESTAMP_NTZ","IS_TIMESTAMP_TZ","JAROWINKLER_SIMILARITY","JSON_EXTRACT_PATH_TEXT","KURTOSIS","LAG","LAST_DAY","LAST_QUERY_ID","LAST_TRANSACTION","LAST_VALUE","LEAD","LEAST","LEFT","LENGTH","LEN","LIKE","LIKE ALL","LIKE ANY","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOGIN_HISTORY","LOGIN_HISTORY_BY_USER","LOWER","LPAD","LTRIM","MATERIALIZED_VIEW_REFRESH_HISTORY","MD5","MD5_HEX","MD5_BINARY","MD5_NUMBER — Obsoleted","MD5_NUMBER_LOWER64","MD5_NUMBER_UPPER64","MEDIAN","MIN","MAX","MINHASH","MINHASH_COMBINE","MOD","MODE","MONTHNAME","MONTHS_BETWEEN","NEXT_DAY","NORMAL","NTH_VALUE","NTILE","NULLIF","NULLIFZERO","NVL","NVL2","OBJECT_AGG","OBJECT_CONSTRUCT","OBJECT_CONSTRUCT_KEEP_NULL","OBJECT_DELETE","OBJECT_INSERT","OBJECT_KEYS","OBJECT_PICK","OCTET_LENGTH","PARSE_IP","PARSE_JSON","PARSE_URL","PARSE_XML","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIPE_USAGE_HISTORY","POLICY_CONTEXT","POLICY_REFERENCES","POSITION","POW","POWER","PREVIOUS_DAY","QUERY_ACCELERATION_HISTORY","QUERY_HISTORY","QUERY_HISTORY_BY_SESSION","QUERY_HISTORY_BY_USER","QUERY_HISTORY_BY_WAREHOUSE","RADIANS","RANDOM","RANDSTR","RANK","RATIO_TO_REPORT","REGEXP","REGEXP_COUNT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","REGEXP_SUBSTR_ALL","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","REGR_VALX","REGR_VALY","REPEAT","REPLACE","REPLICATION_GROUP_REFRESH_HISTORY","REPLICATION_GROUP_REFRESH_PROGRESS","REPLICATION_GROUP_REFRESH_PROGRESS_BY_JOB","REPLICATION_GROUP_USAGE_HISTORY","REPLICATION_USAGE_HISTORY","REST_EVENT_HISTORY","RESULT_SCAN","REVERSE","RIGHT","RLIKE","ROUND","ROW_NUMBER","RPAD","RTRIM","RTRIMMED_LENGTH","SEARCH_OPTIMIZATION_HISTORY","SEQ1","SEQ2","SEQ4","SEQ8","SERVERLESS_TASK_HISTORY","SHA1","SHA1_HEX","SHA1_BINARY","SHA2","SHA2_HEX","SHA2_BINARY","SIGN","SIN","SINH","SKEW","SOUNDEX","SPACE","SPLIT","SPLIT_PART","SPLIT_TO_TABLE","SQRT","SQUARE","ST_AREA","ST_ASEWKB","ST_ASEWKT","ST_ASGEOJSON","ST_ASWKB","ST_ASBINARY","ST_ASWKT","ST_ASTEXT","ST_AZIMUTH","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DWITHIN","ST_ENDPOINT","ST_ENVELOPE","ST_GEOGFROMGEOHASH","ST_GEOGPOINTFROMGEOHASH","ST_GEOGRAPHYFROMWKB","ST_GEOGRAPHYFROMWKT","ST_GEOHASH","ST_GEOMETRYFROMWKB","ST_GEOMETRYFROMWKT","ST_HAUSDORFFDISTANCE","ST_INTERSECTION","ST_INTERSECTS","ST_LENGTH","ST_MAKEGEOMPOINT","ST_GEOM_POINT","ST_MAKELINE","ST_MAKEPOINT","ST_POINT","ST_MAKEPOLYGON","ST_POLYGON","ST_NPOINTS","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SETSRID","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","STAGE_DIRECTORY_FILE_REGISTRATION_HISTORY","STAGE_STORAGE_USAGE_HISTORY","STARTSWITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRIP_NULL_VALUE","STRTOK","STRTOK_SPLIT_TO_TABLE","STRTOK_TO_ARRAY","SUBSTR","SUBSTRING","SUM","SYSDATE","SYSTEM$ABORT_SESSION","SYSTEM$ABORT_TRANSACTION","SYSTEM$AUTHORIZE_PRIVATELINK","SYSTEM$AUTHORIZE_STAGE_PRIVATELINK_ACCESS","SYSTEM$BEHAVIOR_CHANGE_BUNDLE_STATUS","SYSTEM$CANCEL_ALL_QUERIES","SYSTEM$CANCEL_QUERY","SYSTEM$CLUSTERING_DEPTH","SYSTEM$CLUSTERING_INFORMATION","SYSTEM$CLUSTERING_RATIO ","SYSTEM$CURRENT_USER_TASK_NAME","SYSTEM$DATABASE_REFRESH_HISTORY ","SYSTEM$DATABASE_REFRESH_PROGRESS","SYSTEM$DATABASE_REFRESH_PROGRESS_BY_JOB ","SYSTEM$DISABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$DISABLE_DATABASE_REPLICATION","SYSTEM$ENABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$ESTIMATE_QUERY_ACCELERATION","SYSTEM$ESTIMATE_SEARCH_OPTIMIZATION_COSTS","SYSTEM$EXPLAIN_JSON_TO_TEXT","SYSTEM$EXPLAIN_PLAN_JSON","SYSTEM$EXTERNAL_TABLE_PIPE_STATUS","SYSTEM$GENERATE_SAML_CSR","SYSTEM$GENERATE_SCIM_ACCESS_TOKEN","SYSTEM$GET_AWS_SNS_IAM_POLICY","SYSTEM$GET_PREDECESSOR_RETURN_VALUE","SYSTEM$GET_PRIVATELINK","SYSTEM$GET_PRIVATELINK_AUTHORIZED_ENDPOINTS","SYSTEM$GET_PRIVATELINK_CONFIG","SYSTEM$GET_SNOWFLAKE_PLATFORM_INFO","SYSTEM$GET_TAG","SYSTEM$GET_TAG_ALLOWED_VALUES","SYSTEM$GET_TAG_ON_CURRENT_COLUMN","SYSTEM$GET_TAG_ON_CURRENT_TABLE","SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETER","SYSTEM$LAST_CHANGE_COMMIT_TIME","SYSTEM$LINK_ACCOUNT_OBJECTS_BY_NAME","SYSTEM$MIGRATE_SAML_IDP_REGISTRATION","SYSTEM$PIPE_FORCE_RESUME","SYSTEM$PIPE_STATUS","SYSTEM$REVOKE_PRIVATELINK","SYSTEM$REVOKE_STAGE_PRIVATELINK_ACCESS","SYSTEM$SET_RETURN_VALUE","SYSTEM$SHOW_OAUTH_CLIENT_SECRETS","SYSTEM$STREAM_GET_TABLE_TIMESTAMP","SYSTEM$STREAM_HAS_DATA","SYSTEM$TASK_DEPENDENTS_ENABLE","SYSTEM$TYPEOF","SYSTEM$USER_TASK_CANCEL_ONGOING_EXECUTIONS","SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN","SYSTEM$WAIT","SYSTEM$WHITELIST","SYSTEM$WHITELIST_PRIVATELINK","TAG_REFERENCES","TAG_REFERENCES_ALL_COLUMNS","TAG_REFERENCES_WITH_LINEAGE","TAN","TANH","TASK_DEPENDENTS","TASK_HISTORY","TIME_FROM_PARTS","TIME_SLICE","TIMEADD","TIMEDIFF","TIMESTAMP_FROM_PARTS","TIMESTAMPADD","TIMESTAMPDIFF","TO_ARRAY","TO_BINARY","TO_BOOLEAN","TO_CHAR","TO_VARCHAR","TO_DATE","DATE","TO_DECIMAL","TO_NUMBER","TO_NUMERIC","TO_DOUBLE","TO_GEOGRAPHY","TO_GEOMETRY","TO_JSON","TO_OBJECT","TO_TIME","TIME","TO_TIMESTAMP","TO_TIMESTAMP_LTZ","TO_TIMESTAMP_NTZ","TO_TIMESTAMP_TZ","TO_VARIANT","TO_XML","TRANSLATE","TRIM","TRUNCATE","TRUNC","TRUNC","TRY_BASE64_DECODE_BINARY","TRY_BASE64_DECODE_STRING","TRY_CAST","TRY_HEX_DECODE_BINARY","TRY_HEX_DECODE_STRING","TRY_PARSE_JSON","TRY_TO_BINARY","TRY_TO_BOOLEAN","TRY_TO_DATE","TRY_TO_DECIMAL","TRY_TO_NUMBER","TRY_TO_NUMERIC","TRY_TO_DOUBLE","TRY_TO_GEOGRAPHY","TRY_TO_GEOMETRY","TRY_TO_TIME","TRY_TO_TIMESTAMP","TRY_TO_TIMESTAMP_LTZ","TRY_TO_TIMESTAMP_NTZ","TRY_TO_TIMESTAMP_TZ","TYPEOF","UNICODE","UNIFORM","UPPER","UUID_STRING","VALIDATE","VALIDATE_PIPE_LOAD","VAR_POP","VAR_SAMP","VARIANCE","VARIANCE_SAMP","VARIANCE_POP","WAREHOUSE_LOAD_HISTORY","WAREHOUSE_METERING_HISTORY","WIDTH_BUCKET","XMLGET","YEAR","YEAROFWEEK","YEAROFWEEKISO","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFWEEKISO","DAYOFYEAR","WEEK","WEEK","WEEKOFYEAR","WEEKISO","MONTH","QUARTER","ZEROIFNULL","ZIPF"]}),tK=v({all:["ACCOUNT","ALL","ALTER","AND","ANY","AS","BETWEEN","BY","CASE","CAST","CHECK","COLUMN","CONNECT","CONNECTION","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATABASE","DELETE","DISTINCT","DROP","ELSE","EXISTS","FALSE","FOLLOWING","FOR","FROM","FULL","GRANT","GROUP","GSCLUSTER","HAVING","ILIKE","IN","INCREMENT","INNER","INSERT","INTERSECT","INTO","IS","ISSUE","JOIN","LATERAL","LEFT","LIKE","LOCALTIME","LOCALTIMESTAMP","MINUS","NATURAL","NOT","NULL","OF","ON","OR","ORDER","ORGANIZATION","QUALIFY","REGEXP","REVOKE","RIGHT","RLIKE","ROW","ROWS","SAMPLE","SCHEMA","SELECT","SET","SOME","START","TABLE","TABLESAMPLE","THEN","TO","TRIGGER","TRUE","TRY_CAST","UNION","UNIQUE","UPDATE","USING","VALUES","VIEW","WHEN","WHENEVER","WHERE","WITH"]}),tz=f(["SELECT [ALL | DISTINCT]"]),tJ=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","QUALIFY","LIMIT","OFFSET","FETCH [FIRST | NEXT]","INSERT [OVERWRITE] [ALL INTO | INTO | ALL | FIRST]","{THEN | ELSE} INTO","VALUES","SET","CREATE [OR REPLACE] [SECURE] [RECURSIVE] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [VOLATILE] TABLE [IF NOT EXISTS]","CREATE [OR REPLACE] [LOCAL | GLOBAL] {TEMP|TEMPORARY} TABLE [IF NOT EXISTS]","CLUSTER BY","[WITH] {MASKING POLICY | TAG | ROW ACCESS POLICY}","COPY GRANTS","USING TEMPLATE","MERGE INTO","WHEN MATCHED [AND]","THEN {UPDATE SET | DELETE}","WHEN NOT MATCHED THEN INSERT"]),tq=f(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","RENAME TO","SWAP WITH","[SUSPEND | RESUME] RECLUSTER","DROP CLUSTERING KEY","ADD [COLUMN]","RENAME COLUMN","{ALTER | MODIFY} [COLUMN]","DROP [COLUMN]","{ADD | ALTER | MODIFY | DROP} [CONSTRAINT]","RENAME CONSTRAINT","{ADD | DROP} SEARCH OPTIMIZATION","{SET | UNSET} TAG","{ADD | DROP} ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","[SET DATA] TYPE","[UNSET] COMMENT","{SET | UNSET} MASKING POLICY","TRUNCATE [TABLE] [IF EXISTS]","ALTER ACCOUNT","ALTER API INTEGRATION","ALTER CONNECTION","ALTER DATABASE","ALTER EXTERNAL TABLE","ALTER FAILOVER GROUP","ALTER FILE FORMAT","ALTER FUNCTION","ALTER INTEGRATION","ALTER MASKING POLICY","ALTER MATERIALIZED VIEW","ALTER NETWORK POLICY","ALTER NOTIFICATION INTEGRATION","ALTER PIPE","ALTER PROCEDURE","ALTER REPLICATION GROUP","ALTER RESOURCE MONITOR","ALTER ROLE","ALTER ROW ACCESS POLICY","ALTER SCHEMA","ALTER SECURITY INTEGRATION","ALTER SEQUENCE","ALTER SESSION","ALTER SESSION POLICY","ALTER SHARE","ALTER STAGE","ALTER STORAGE INTEGRATION","ALTER STREAM","ALTER TAG","ALTER TASK","ALTER USER","ALTER VIEW","ALTER WAREHOUSE","BEGIN","CALL","COMMIT","COPY INTO","CREATE ACCOUNT","CREATE API INTEGRATION","CREATE CONNECTION","CREATE DATABASE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL TABLE","CREATE FAILOVER GROUP","CREATE FILE FORMAT","CREATE FUNCTION","CREATE INTEGRATION","CREATE MANAGED ACCOUNT","CREATE MASKING POLICY","CREATE MATERIALIZED VIEW","CREATE NETWORK POLICY","CREATE NOTIFICATION INTEGRATION","CREATE PIPE","CREATE PROCEDURE","CREATE REPLICATION GROUP","CREATE RESOURCE MONITOR","CREATE ROLE","CREATE ROW ACCESS POLICY","CREATE SCHEMA","CREATE SECURITY INTEGRATION","CREATE SEQUENCE","CREATE SESSION POLICY","CREATE SHARE","CREATE STAGE","CREATE STORAGE INTEGRATION","CREATE STREAM","CREATE TAG","CREATE TASK","CREATE USER","CREATE WAREHOUSE","DELETE","DESCRIBE DATABASE","DESCRIBE EXTERNAL TABLE","DESCRIBE FILE FORMAT","DESCRIBE FUNCTION","DESCRIBE INTEGRATION","DESCRIBE MASKING POLICY","DESCRIBE MATERIALIZED VIEW","DESCRIBE NETWORK POLICY","DESCRIBE PIPE","DESCRIBE PROCEDURE","DESCRIBE RESULT","DESCRIBE ROW ACCESS POLICY","DESCRIBE SCHEMA","DESCRIBE SEQUENCE","DESCRIBE SESSION POLICY","DESCRIBE SHARE","DESCRIBE STAGE","DESCRIBE STREAM","DESCRIBE TABLE","DESCRIBE TASK","DESCRIBE TRANSACTION","DESCRIBE USER","DESCRIBE VIEW","DESCRIBE WAREHOUSE","DROP CONNECTION","DROP DATABASE","DROP EXTERNAL TABLE","DROP FAILOVER GROUP","DROP FILE FORMAT","DROP FUNCTION","DROP INTEGRATION","DROP MANAGED ACCOUNT","DROP MASKING POLICY","DROP MATERIALIZED VIEW","DROP NETWORK POLICY","DROP PIPE","DROP PROCEDURE","DROP REPLICATION GROUP","DROP RESOURCE MONITOR","DROP ROLE","DROP ROW ACCESS POLICY","DROP SCHEMA","DROP SEQUENCE","DROP SESSION POLICY","DROP SHARE","DROP STAGE","DROP STREAM","DROP TAG","DROP TASK","DROP USER","DROP VIEW","DROP WAREHOUSE","EXECUTE IMMEDIATE","EXECUTE TASK","EXPLAIN","GET","GRANT OWNERSHIP","GRANT ROLE","INSERT","LIST","MERGE","PUT","REMOVE","REVOKE ROLE","ROLLBACK","SHOW COLUMNS","SHOW CONNECTIONS","SHOW DATABASES","SHOW DATABASES IN FAILOVER GROUP","SHOW DATABASES IN REPLICATION GROUP","SHOW DELEGATED AUTHORIZATIONS","SHOW EXTERNAL FUNCTIONS","SHOW EXTERNAL TABLES","SHOW FAILOVER GROUPS","SHOW FILE FORMATS","SHOW FUNCTIONS","SHOW GLOBAL ACCOUNTS","SHOW GRANTS","SHOW INTEGRATIONS","SHOW LOCKS","SHOW MANAGED ACCOUNTS","SHOW MASKING POLICIES","SHOW MATERIALIZED VIEWS","SHOW NETWORK POLICIES","SHOW OBJECTS","SHOW ORGANIZATION ACCOUNTS","SHOW PARAMETERS","SHOW PIPES","SHOW PRIMARY KEYS","SHOW PROCEDURES","SHOW REGIONS","SHOW REPLICATION ACCOUNTS","SHOW REPLICATION DATABASES","SHOW REPLICATION GROUPS","SHOW RESOURCE MONITORS","SHOW ROLES","SHOW ROW ACCESS POLICIES","SHOW SCHEMAS","SHOW SEQUENCES","SHOW SESSION POLICIES","SHOW SHARES","SHOW SHARES IN FAILOVER GROUP","SHOW SHARES IN REPLICATION GROUP","SHOW STAGES","SHOW STREAMS","SHOW TABLES","SHOW TAGS","SHOW TASKS","SHOW TRANSACTIONS","SHOW USER FUNCTIONS","SHOW USERS","SHOW VARIABLES","SHOW VIEWS","SHOW WAREHOUSES","TRUNCATE MATERIALIZED VIEW","UNDROP DATABASE","UNDROP SCHEMA","UNDROP TABLE","UNDROP TAG","UNSET","USE DATABASE","USE ROLE","USE SCHEMA","USE SECONDARY ROLES","USE WAREHOUSE"]),tQ=f(["UNION [ALL]","MINUS","EXCEPT","INTERSECT"]),t0=f(["[INNER] JOIN","[NATURAL] {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | NATURAL} JOIN"]),t1=f(["{ROWS | RANGE} BETWEEN","ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]"]),t2={tokenizerOptions:{reservedSelect:tz,reservedClauses:[...tJ,...tq],reservedSetOperations:tQ,reservedJoins:t0,reservedPhrases:t1,reservedKeywords:tK,reservedFunctionNames:tX,stringTypes:["$$","''-qq-bs"],identTypes:['""-qq'],variableTypes:[{regex:"[$][1-9]\\d*"},{regex:"[$][_a-zA-Z][_a-zA-Z0-9$]*"}],extraParens:["[]"],identChars:{rest:"$"},lineCommentTypes:["--","//"],operators:["%","::","||",":","=>"]},formatOptions:{alwaysDenseOperators:[":","::"],onelineClauses:tq}},t4=e=>e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),t6=/\s+/uy,t3=e=>RegExp(`(?:${e})`,"uy"),t8=e=>e.split("").map(e=>/ /gu.test(e)?"\\s+":`[${e.toUpperCase()}${e.toLowerCase()}]`).join(""),t5=e=>e+"(?:-"+e+")*",t7=({prefixes:e,requirePrefix:t})=>`(?:${e.map(t8).join("|")}${t?"":"|"})`,t9=e=>RegExp(`(?:${e.map(t4).join("|")}).*?(?=\r + } catch (e) {} })();`}},"mui-color-scheme-init")})((0,u.Z)({attribute:r,colorSchemeStorageKey:s,defaultMode:l,defaultLightColorScheme:d,defaultDarkColorScheme:f,modeStorageKey:o},e))}}({themeId:ey.Z,theme:ev.Z,attribute:"data-joy-color-scheme",modeStorageKey:"joy-mode",colorSchemeStorageKey:"joy-color-scheme",defaultColorScheme:{light:"light",dark:"dark"},resolveTheme:e=>{let t=e.colorInversion;return e.colorInversion=(0,eA.Z)({soft:(0,eP.pP)(e),solid:(0,eP.Lo)(e)},"function"==typeof t?t(e):t,{clone:!1}),e}});var eU=n(38629),ex=n(59077),eG=n(9818);let eF=(0,ex.Z)({colorSchemes:{light:{palette:{mode:"dark",primary:{...eG.Z.grey,solidBg:"#e6f4ff",solidColor:"#1677ff",solidHoverBg:"#e6f4ff"},neutral:{plainColor:"#4d4d4d",plainHoverColor:"#131318",plainHoverBg:"#EBEBEF",plainActiveBg:"#D8D8DF",plainDisabledColor:"#B9B9C6"},background:{body:"#F7F7F7",surface:"#fff"},text:{primary:"#505050"}}},dark:{palette:{mode:"light",primary:{...eG.Z.grey,softBg:"#353539",softHoverBg:"#35353978",softDisabledBg:"#353539",solidBg:"#51525beb",solidHoverBg:"#51525beb"},neutral:{plainColor:"#D8D8DF",plainHoverColor:"#F7F7F8",plainHoverBg:"#353539",plainActiveBg:"#434356",plainDisabledColor:"#434356",outlinedBorder:"#353539",outlinedHoverBorder:"#454651"},text:{primary:"#FDFDFC"},background:{body:"#151622",surface:"#51525beb"}}}},fontFamily:{body:"Josefin Sans, sans-serif",display:"Josefin Sans, sans-serif"},zIndex:{modal:1001}}),eH=(e,t)=>({...ec.default.darkAlgorithm(e,t),colorBgBase:"#232734",colorBorder:"#828282",colorBgContainer:"#232734"});function eB(e){let{children:t}=e,{mode:n}=(0,a.useContext)(s.p),{i18n:r}=(0,q.$G)(),{setMode:o}=eD();return(0,a.useEffect)(()=>{o(n)},[n]),(0,a.useEffect)(()=>{if(n){var e,t,r,o,i,a;null===(e=document.body)||void 0===e||null===(t=e.classList)||void 0===t||t.add(n),"light"===n?null===(r=document.body)||void 0===r||null===(o=r.classList)||void 0===o||o.remove("dark"):null===(i=document.body)||void 0===i||null===(a=i.classList)||void 0===a||a.remove("light")}},[n]),(0,a.useEffect)(()=>{r.changeLanguage&&r.changeLanguage(window.localStorage.getItem(E.Yl)||"en")},[r]),(0,i.jsxs)("div",{children:[(0,i.jsx)(es,{}),t]})}function ew(e){let{children:t}=e,{isMenuExpand:n,mode:r}=(0,a.useContext)(s.p),{i18n:o}=(0,q.$G)();return(0,i.jsx)(eu.ZP,{locale:"en"===o.language?eR.Z:eT.Z,theme:{token:{colorPrimary:"#0069FE",borderRadius:4},algorithm:"dark"===r?eH:void 0},children:(0,i.jsxs)("div",{className:"flex w-screen h-screen overflow-hidden",children:[(0,i.jsx)("div",{className:eE()("transition-[width]",n?"w-60":"w-20","hidden","md:block"),children:(0,i.jsx)(et,{})}),(0,i.jsx)("div",{className:"flex flex-col flex-1 relative overflow-hidden",children:t})]})})}var e$=function(e){let{Component:t,pageProps:n}=e;return(0,i.jsx)(s.R,{children:(0,i.jsx)(eU.Z,{theme:eF,children:(0,i.jsx)(eb,{theme:eF,defaultMode:"light",children:(0,i.jsx)(eB,{children:(0,i.jsx)(ew,{children:(0,i.jsx)(t,{...n})})})})})})}},19284:function(e,t,n){"use strict";n.d(t,{H:function(){return r},S:function(){return o}});let r={proxyllm:{label:"Proxy LLM",icon:"/models/chatgpt.png"},"flan-t5-base":{label:"flan-t5-base",icon:"/models/google.png"},"vicuna-13b":{label:"vicuna-13b",icon:"/models/vicuna.jpeg"},"vicuna-7b":{label:"vicuna-7b",icon:"/models/vicuna.jpeg"},"vicuna-13b-v1.5":{label:"vicuna-13b-v1.5",icon:"/models/vicuna.jpeg"},"vicuna-7b-v1.5":{label:"vicuna-7b-v1.5",icon:"/models/vicuna.jpeg"},"codegen2-1b":{label:"codegen2-1B",icon:"/models/vicuna.jpeg"},"codet5p-2b":{label:"codet5p-2b",icon:"/models/vicuna.jpeg"},"chatglm-6b-int4":{label:"chatglm-6b-int4",icon:"/models/chatglm.png"},"chatglm-6b":{label:"chatglm-6b",icon:"/models/chatglm.png"},"chatglm2-6b":{label:"chatglm2-6b",icon:"/models/chatglm.png"},"chatglm2-6b-int4":{label:"chatglm2-6b-int4",icon:"/models/chatglm.png"},"guanaco-33b-merged":{label:"guanaco-33b-merged",icon:"/models/huggingface.svg"},"falcon-40b":{label:"falcon-40b",icon:"/models/falcon.jpeg"},"gorilla-7b":{label:"gorilla-7b",icon:"/models/gorilla.png"},"gptj-6b":{label:"ggml-gpt4all-j-v1.3-groovy.bin",icon:""},chatgpt_proxyllm:{label:"chatgpt_proxyllm",icon:"/models/chatgpt.png"},bard_proxyllm:{label:"bard_proxyllm",icon:"/models/bard.gif"},claude_proxyllm:{label:"claude_proxyllm",icon:"/models/claude.png"},wenxin_proxyllm:{label:"wenxin_proxyllm",icon:""},tongyi_proxyllm:{label:"tongyi_proxyllm",icon:"/models/qwen2.png"},zhipu_proxyllm:{label:"zhipu_proxyllm",icon:"/models/zhipu.png"},yi_proxyllm:{label:"yi_proxyllm",icon:"/models/yi.svg"},"yi-34b-chat":{label:"yi-34b-chat",icon:"/models/yi.svg"},"yi-34b-chat-8bits":{label:"yi-34b-chat-8bits",icon:"/models/yi.svg"},"yi-34b-chat-4bits":{label:"yi-34b-chat-4bits",icon:"/models/yi.svg"},"yi-6b-chat":{label:"yi-6b-chat",icon:"/models/yi.svg"},"llama-2-7b":{label:"Llama-2-7b-chat-hf",icon:"/models/llama.jpg"},"llama-2-13b":{label:"Llama-2-13b-chat-hf",icon:"/models/llama.jpg"},"llama-2-70b":{label:"Llama-2-70b-chat-hf",icon:"/models/llama.jpg"},"baichuan-13b":{label:"Baichuan-13B-Chat",icon:"/models/baichuan.png"},"baichuan-7b":{label:"baichuan-7b",icon:"/models/baichuan.png"},"baichuan2-7b":{label:"Baichuan2-7B-Chat",icon:"/models/baichuan.png"},"baichuan2-13b":{label:"Baichuan2-13B-Chat",icon:"/models/baichuan.png"},"wizardlm-13b":{label:"WizardLM-13B-V1.2",icon:"/models/wizardlm.png"},"llama-cpp":{label:"ggml-model-q4_0.bin",icon:"/models/huggingface.svg"},"internlm-7b":{label:"internlm-chat-7b-v1_1",icon:"/models/internlm.png"},"internlm-7b-8k":{label:"internlm-chat-7b-8k",icon:"/models/internlm.png"},"solar-10.7b-instruct-v1.0":{label:"solar-10.7b-instruct-v1.0",icon:"/models/solar_logo.png"}},o={mysql:{label:"MySQL",icon:"/icons/mysql.png",desc:"Fast, reliable, scalable open-source relational database management system."},oceanbase:{label:"OceanBase",icon:"/icons/oceanbase.png",desc:"An Ultra-Fast & Cost-Effective Distributed SQL Database."},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."},doris:{label:"ApacheDoris",icon:"/icons/doris.png",desc:"A new-generation open-source real-time data warehouse."},starrocks:{label:"StarRocks",icon:"/icons/starrocks.png",desc:"An Open-Source, High-Performance Analytical Database."},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."},vertica:{label:"Vertica",icon:"/icons/vertica.png",desc:"Vertica is a strongly consistent, ACID-compliant, SQL data warehouse, built for the scale and complexity of today’s data-driven world."},spark:{label:"Spark",icon:"/icons/spark.png",desc:"Unified engine for large-scale data analytics."},hive:{label:"Hive",icon:"/icons/hive.png",desc:"A distributed fault-tolerant data warehouse system."},space:{label:"Space",icon:"/icons/knowledge.png",desc:"knowledge analytics."},tugraph:{label:"TuGraph",icon:"/icons/tugraph.png",desc:"TuGraph is a high-performance graph database jointly developed by Ant Group and Tsinghua University."}}},62418:function(e,t,n){"use strict";let r,o,i;n.d(t,{zN:function(){return rr},Hf:function(){return n9.H},rU:function(){return rn},Yl:function(){return rt},he:function(){return re},S$:function(){return n9.S},_m:function(){return ro},a_:function(){return n7}});var a,s,l,E={};n.r(E),n.d(E,{bigquery:function(){return H},db2:function(){return X},hive:function(){return er},mariadb:function(){return eT},mysql:function(){return eN},n1ql:function(){return ey},plsql:function(){return eB},postgresql:function(){return eX},redshift:function(){return e4},singlestoredb:function(){return tj},snowflake:function(){return t2},spark:function(){return tn},sql:function(){return tI},sqlite:function(){return tu},transactsql:function(){return tH},trino:function(){return tP}}),(a=r||(r={})).QUOTED_IDENTIFIER="QUOTED_IDENTIFIER",a.IDENTIFIER="IDENTIFIER",a.STRING="STRING",a.VARIABLE="VARIABLE",a.RESERVED_KEYWORD="RESERVED_KEYWORD",a.RESERVED_FUNCTION_NAME="RESERVED_FUNCTION_NAME",a.RESERVED_PHRASE="RESERVED_PHRASE",a.RESERVED_SET_OPERATION="RESERVED_SET_OPERATION",a.RESERVED_CLAUSE="RESERVED_CLAUSE",a.RESERVED_SELECT="RESERVED_SELECT",a.RESERVED_JOIN="RESERVED_JOIN",a.ARRAY_IDENTIFIER="ARRAY_IDENTIFIER",a.ARRAY_KEYWORD="ARRAY_KEYWORD",a.CASE="CASE",a.END="END",a.WHEN="WHEN",a.ELSE="ELSE",a.THEN="THEN",a.LIMIT="LIMIT",a.BETWEEN="BETWEEN",a.AND="AND",a.OR="OR",a.XOR="XOR",a.OPERATOR="OPERATOR",a.COMMA="COMMA",a.ASTERISK="ASTERISK",a.DOT="DOT",a.OPEN_PAREN="OPEN_PAREN",a.CLOSE_PAREN="CLOSE_PAREN",a.LINE_COMMENT="LINE_COMMENT",a.BLOCK_COMMENT="BLOCK_COMMENT",a.NUMBER="NUMBER",a.NAMED_PARAMETER="NAMED_PARAMETER",a.QUOTED_PARAMETER="QUOTED_PARAMETER",a.NUMBERED_PARAMETER="NUMBERED_PARAMETER",a.POSITIONAL_PARAMETER="POSITIONAL_PARAMETER",a.CUSTOM_PARAMETER="CUSTOM_PARAMETER",a.DELIMITER="DELIMITER",a.EOF="EOF";let c=e=>({type:r.EOF,raw:"\xabEOF\xbb",text:"\xabEOF\xbb",start:e}),u=c(1/0),T=e=>t=>t.type===e.type&&t.text===e.text,R={ARRAY:T({text:"ARRAY",type:r.RESERVED_KEYWORD}),BY:T({text:"BY",type:r.RESERVED_KEYWORD}),SET:T({text:"SET",type:r.RESERVED_CLAUSE}),STRUCT:T({text:"STRUCT",type:r.RESERVED_KEYWORD}),WINDOW:T({text:"WINDOW",type:r.RESERVED_CLAUSE})},A=e=>e===r.RESERVED_KEYWORD||e===r.RESERVED_FUNCTION_NAME||e===r.RESERVED_PHRASE||e===r.RESERVED_CLAUSE||e===r.RESERVED_SELECT||e===r.RESERVED_SET_OPERATION||e===r.RESERVED_JOIN||e===r.ARRAY_KEYWORD||e===r.CASE||e===r.END||e===r.WHEN||e===r.ELSE||e===r.THEN||e===r.LIMIT||e===r.BETWEEN||e===r.AND||e===r.OR||e===r.XOR,d=e=>e===r.AND||e===r.OR||e===r.XOR,f=e=>e.flatMap(S),S=e=>C(N(e)).map(e=>e.trim()),p=/[^[\]{}]+/y,O=/\{.*?\}/y,I=/\[.*?\]/y,N=e=>{let t=0,n=[];for(;te.trim());n.push(["",...e]),t+=o[0].length}O.lastIndex=t;let i=O.exec(e);if(i){let e=i[0].slice(1,-1).split("|").map(e=>e.trim());n.push(e),t+=i[0].length}if(!r&&!o&&!i)throw Error(`Unbalanced parenthesis in: ${e}`)}return n},C=([e,...t])=>void 0===e?[""]:C(t).flatMap(t=>e.map(e=>e.trim()+" "+t.trim())),h=e=>[...new Set(e)],m=e=>e[e.length-1],g=e=>e.sort((e,t)=>t.length-e.length||e.localeCompare(t)),_=e=>e.reduce((e,t)=>Math.max(e,t.length),0),L=e=>e.replace(/\s+/gu," "),v=e=>h(Object.values(e).flat()),P=e=>/\n/.test(e),y=v({keywords:["ALL","AND","ANY","ARRAY","AS","ASC","ASSERT_ROWS_MODIFIED","AT","BETWEEN","BY","CASE","CAST","COLLATE","CONTAINS","CREATE","CROSS","CUBE","CURRENT","DEFAULT","DEFINE","DESC","DISTINCT","ELSE","END","ENUM","ESCAPE","EXCEPT","EXCLUDE","EXISTS","EXTRACT","FALSE","FETCH","FOLLOWING","FOR","FROM","FULL","GROUP","GROUPING","GROUPS","HASH","HAVING","IF","IGNORE","IN","INNER","INTERSECT","INTERVAL","INTO","IS","JOIN","LATERAL","LEFT","LIKE","LIMIT","LOOKUP","MERGE","NATURAL","NEW","NO","NOT","NULL","NULLS","OF","ON","OR","ORDER","OUTER","OVER","PARTITION","PRECEDING","PROTO","RANGE","RECURSIVE","RESPECT","RIGHT","ROLLUP","ROWS","SELECT","SET","SOME","STRUCT","TABLE","TABLESAMPLE","THEN","TO","TREAT","TRUE","UNBOUNDED","UNION","UNNEST","USING","WHEN","WHERE","WINDOW","WITH","WITHIN"],datatypes:["ARRAY","BOOL","BYTES","DATE","DATETIME","GEOGRAPHY","INTERVAL","INT64","INT","SMALLINT","INTEGER","BIGINT","TINYINT","BYTEINT","NUMERIC","DECIMAL","BIGNUMERIC","BIGDECIMAL","FLOAT64","STRING","STRUCT","TIME","TIMEZONE"],stringFormat:["HEX","BASEX","BASE64M","ASCII","UTF-8","UTF8"],misc:["SAFE"],ddl:["LIKE","COPY","CLONE","IN","OUT","INOUT","RETURNS","LANGUAGE","CASCADE","RESTRICT","DETERMINISTIC"]}),b=v({aead:["KEYS.NEW_KEYSET","KEYS.ADD_KEY_FROM_RAW_BYTES","AEAD.DECRYPT_BYTES","AEAD.DECRYPT_STRING","AEAD.ENCRYPT","KEYS.KEYSET_CHAIN","KEYS.KEYSET_FROM_JSON","KEYS.KEYSET_TO_JSON","KEYS.ROTATE_KEYSET","KEYS.KEYSET_LENGTH"],aggregateAnalytic:["ANY_VALUE","ARRAY_AGG","AVG","CORR","COUNT","COUNTIF","COVAR_POP","COVAR_SAMP","MAX","MIN","ST_CLUSTERDBSCAN","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","VAR_POP","VAR_SAMP"],aggregate:["ANY_VALUE","ARRAY_AGG","ARRAY_CONCAT_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","COUNT","COUNTIF","LOGICAL_AND","LOGICAL_OR","MAX","MIN","STRING_AGG","SUM"],approximateAggregate:["APPROX_COUNT_DISTINCT","APPROX_QUANTILES","APPROX_TOP_COUNT","APPROX_TOP_SUM"],array:["ARRAY_CONCAT","ARRAY_LENGTH","ARRAY_TO_STRING","GENERATE_ARRAY","GENERATE_DATE_ARRAY","GENERATE_TIMESTAMP_ARRAY","ARRAY_REVERSE","OFFSET","SAFE_OFFSET","ORDINAL","SAFE_ORDINAL"],bitwise:["BIT_COUNT"],conversion:["PARSE_BIGNUMERIC","PARSE_NUMERIC","SAFE_CAST"],date:["CURRENT_DATE","EXTRACT","DATE","DATE_ADD","DATE_SUB","DATE_DIFF","DATE_TRUNC","DATE_FROM_UNIX_DATE","FORMAT_DATE","LAST_DAY","PARSE_DATE","UNIX_DATE"],datetime:["CURRENT_DATETIME","DATETIME","EXTRACT","DATETIME_ADD","DATETIME_SUB","DATETIME_DIFF","DATETIME_TRUNC","FORMAT_DATETIME","LAST_DAY","PARSE_DATETIME"],debugging:["ERROR"],federatedQuery:["EXTERNAL_QUERY"],geography:["S2_CELLIDFROMPOINT","S2_COVERINGCELLIDS","ST_ANGLE","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_AZIMUTH","ST_BOUNDARY","ST_BOUNDINGBOX","ST_BUFFER","ST_BUFFERWITHTOLERANCE","ST_CENTROID","ST_CENTROID_AGG","ST_CLOSESTPOINT","ST_CLUSTERDBSCAN","ST_CONTAINS","ST_CONVEXHULL","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DUMP","ST_DWITHIN","ST_ENDPOINT","ST_EQUALS","ST_EXTENT","ST_EXTERIORRING","ST_GEOGFROM","ST_GEOGFROMGEOJSON","ST_GEOGFROMTEXT","ST_GEOGFROMWKB","ST_GEOGPOINT","ST_GEOGPOINTFROMGEOHASH","ST_GEOHASH","ST_GEOMETRYTYPE","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_INTERSECTSBOX","ST_ISCOLLECTION","ST_ISEMPTY","ST_LENGTH","ST_MAKELINE","ST_MAKEPOLYGON","ST_MAKEPOLYGONORIENTED","ST_MAXDISTANCE","ST_NPOINTS","ST_NUMGEOMETRIES","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SIMPLIFY","ST_SNAPTOGRID","ST_STARTPOINT","ST_TOUCHES","ST_UNION","ST_UNION_AGG","ST_WITHIN","ST_X","ST_Y"],hash:["FARM_FINGERPRINT","MD5","SHA1","SHA256","SHA512"],hll:["HLL_COUNT.INIT","HLL_COUNT.MERGE","HLL_COUNT.MERGE_PARTIAL","HLL_COUNT.EXTRACT"],interval:["MAKE_INTERVAL","EXTRACT","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL"],json:["JSON_EXTRACT","JSON_QUERY","JSON_EXTRACT_SCALAR","JSON_VALUE","JSON_EXTRACT_ARRAY","JSON_QUERY_ARRAY","JSON_EXTRACT_STRING_ARRAY","JSON_VALUE_ARRAY","TO_JSON_STRING"],math:["ABS","SIGN","IS_INF","IS_NAN","IEEE_DIVIDE","RAND","SQRT","POW","POWER","EXP","LN","LOG","LOG10","GREATEST","LEAST","DIV","SAFE_DIVIDE","SAFE_MULTIPLY","SAFE_NEGATE","SAFE_ADD","SAFE_SUBTRACT","MOD","ROUND","TRUNC","CEIL","CEILING","FLOOR","COS","COSH","ACOS","ACOSH","SIN","SINH","ASIN","ASINH","TAN","TANH","ATAN","ATANH","ATAN2","RANGE_BUCKET"],navigation:["FIRST_VALUE","LAST_VALUE","NTH_VALUE","LEAD","LAG","PERCENTILE_CONT","PERCENTILE_DISC"],net:["NET.IP_FROM_STRING","NET.SAFE_IP_FROM_STRING","NET.IP_TO_STRING","NET.IP_NET_MASK","NET.IP_TRUNC","NET.IPV4_FROM_INT64","NET.IPV4_TO_INT64","NET.HOST","NET.PUBLIC_SUFFIX","NET.REG_DOMAIN"],numbering:["RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","NTILE","ROW_NUMBER"],security:["SESSION_USER"],statisticalAggregate:["CORR","COVAR_POP","COVAR_SAMP","STDDEV_POP","STDDEV_SAMP","STDDEV","VAR_POP","VAR_SAMP","VARIANCE"],string:["ASCII","BYTE_LENGTH","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CODE_POINTS_TO_BYTES","CODE_POINTS_TO_STRING","CONCAT","CONTAINS_SUBSTR","ENDS_WITH","FORMAT","FROM_BASE32","FROM_BASE64","FROM_HEX","INITCAP","INSTR","LEFT","LENGTH","LPAD","LOWER","LTRIM","NORMALIZE","NORMALIZE_AND_CASEFOLD","OCTET_LENGTH","REGEXP_CONTAINS","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","REPEAT","REVERSE","RIGHT","RPAD","RTRIM","SAFE_CONVERT_BYTES_TO_STRING","SOUNDEX","SPLIT","STARTS_WITH","STRPOS","SUBSTR","SUBSTRING","TO_BASE32","TO_BASE64","TO_CODE_POINTS","TO_HEX","TRANSLATE","TRIM","UNICODE","UPPER"],time:["CURRENT_TIME","TIME","EXTRACT","TIME_ADD","TIME_SUB","TIME_DIFF","TIME_TRUNC","FORMAT_TIME","PARSE_TIME"],timestamp:["CURRENT_TIMESTAMP","EXTRACT","STRING","TIMESTAMP","TIMESTAMP_ADD","TIMESTAMP_SUB","TIMESTAMP_DIFF","TIMESTAMP_TRUNC","FORMAT_TIMESTAMP","PARSE_TIMESTAMP","TIMESTAMP_SECONDS","TIMESTAMP_MILLIS","TIMESTAMP_MICROS","UNIX_SECONDS","UNIX_MILLIS","UNIX_MICROS"],uuid:["GENERATE_UUID"],conditional:["COALESCE","IF","IFNULL","NULLIF"],legacyAggregate:["AVG","BIT_AND","BIT_OR","BIT_XOR","CORR","COUNT","COVAR_POP","COVAR_SAMP","EXACT_COUNT_DISTINCT","FIRST","GROUP_CONCAT","GROUP_CONCAT_UNQUOTED","LAST","MAX","MIN","NEST","NTH","QUANTILES","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","TOP","UNIQUE","VARIANCE","VAR_POP","VAR_SAMP"],legacyBitwise:["BIT_COUNT"],legacyCasting:["BOOLEAN","BYTES","CAST","FLOAT","HEX_STRING","INTEGER","STRING"],legacyComparison:["COALESCE","GREATEST","IFNULL","IS_INF","IS_NAN","IS_EXPLICITLY_DEFINED","LEAST","NVL"],legacyDatetime:["CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE","DATE_ADD","DATEDIFF","DAY","DAYOFWEEK","DAYOFYEAR","FORMAT_UTC_USEC","HOUR","MINUTE","MONTH","MSEC_TO_TIMESTAMP","NOW","PARSE_UTC_USEC","QUARTER","SEC_TO_TIMESTAMP","SECOND","STRFTIME_UTC_USEC","TIME","TIMESTAMP","TIMESTAMP_TO_MSEC","TIMESTAMP_TO_SEC","TIMESTAMP_TO_USEC","USEC_TO_TIMESTAMP","UTC_USEC_TO_DAY","UTC_USEC_TO_HOUR","UTC_USEC_TO_MONTH","UTC_USEC_TO_WEEK","UTC_USEC_TO_YEAR","WEEK","YEAR"],legacyIp:["FORMAT_IP","PARSE_IP","FORMAT_PACKED_IP","PARSE_PACKED_IP"],legacyJson:["JSON_EXTRACT","JSON_EXTRACT_SCALAR"],legacyMath:["ABS","ACOS","ACOSH","ASIN","ASINH","ATAN","ATANH","ATAN2","CEIL","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG2","LOG10","PI","POW","RADIANS","RAND","ROUND","SIN","SINH","SQRT","TAN","TANH"],legacyRegex:["REGEXP_MATCH","REGEXP_EXTRACT","REGEXP_REPLACE"],legacyString:["CONCAT","INSTR","LEFT","LENGTH","LOWER","LPAD","LTRIM","REPLACE","RIGHT","RPAD","RTRIM","SPLIT","SUBSTR","UPPER"],legacyTableWildcard:["TABLE_DATE_RANGE","TABLE_DATE_RANGE_STRICT","TABLE_QUERY"],legacyUrl:["HOST","DOMAIN","TLD"],legacyWindow:["AVG","COUNT","MAX","MIN","STDDEV","SUM","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER"],legacyMisc:["CURRENT_USER","EVERY","FROM_BASE64","HASH","FARM_FINGERPRINT","IF","POSITION","SHA1","SOME","TO_BASE64"],other:["BQ.JOBS.CANCEL","BQ.REFRESH_MATERIALIZED_VIEW"],ddl:["OPTIONS"],pivot:["PIVOT","UNPIVOT"],dataTypes:["BYTES","NUMERIC","DECIMAL","BIGNUMERIC","BIGDECIMAL","STRING"]}),D=f(["SELECT [ALL | DISTINCT] [AS STRUCT | AS VALUE]"]),M=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","QUALIFY","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","OMIT RECORD IF","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY SOURCE | BY TARGET] [THEN]","UPDATE SET","CREATE [OR REPLACE] [MATERIALIZED] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMP|TEMPORARY|SNAPSHOT|EXTERNAL] TABLE [IF NOT EXISTS]","CLUSTER BY","FOR SYSTEM_TIME AS OF","WITH CONNECTION","WITH PARTITION COLUMNS","REMOTE WITH CONNECTION"]),U=f(["UPDATE","DELETE [FROM]","DROP [SNAPSHOT | EXTERNAL] TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME TO","ALTER COLUMN [IF EXISTS]","SET DEFAULT COLLATE","SET OPTIONS","DROP NOT NULL","SET DATA TYPE","ALTER SCHEMA [IF EXISTS]","ALTER [MATERIALIZED] VIEW [IF EXISTS]","ALTER BI_CAPACITY","TRUNCATE TABLE","CREATE SCHEMA [IF NOT EXISTS]","DEFAULT COLLATE","CREATE [OR REPLACE] [TEMP|TEMPORARY|TABLE] FUNCTION [IF NOT EXISTS]","CREATE [OR REPLACE] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] ROW ACCESS POLICY [IF NOT EXISTS]","GRANT TO","FILTER USING","CREATE CAPACITY","AS JSON","CREATE RESERVATION","CREATE ASSIGNMENT","CREATE SEARCH INDEX [IF NOT EXISTS]","DROP SCHEMA [IF EXISTS]","DROP [MATERIALIZED] VIEW [IF EXISTS]","DROP [TABLE] FUNCTION [IF EXISTS]","DROP PROCEDURE [IF EXISTS]","DROP ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","DROP CAPACITY [IF EXISTS]","DROP RESERVATION [IF EXISTS]","DROP ASSIGNMENT [IF EXISTS]","DROP SEARCH INDEX [IF EXISTS]","DROP [IF EXISTS]","GRANT","REVOKE","DECLARE","EXECUTE IMMEDIATE","LOOP","END LOOP","REPEAT","END REPEAT","WHILE","END WHILE","BREAK","LEAVE","CONTINUE","ITERATE","FOR","END FOR","BEGIN","BEGIN TRANSACTION","COMMIT TRANSACTION","ROLLBACK TRANSACTION","RAISE","RETURN","CALL","ASSERT","EXPORT DATA"]),x=f(["UNION {ALL | DISTINCT}","EXCEPT DISTINCT","INTERSECT DISTINCT"]),G=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),F=f(["TABLESAMPLE SYSTEM","ANY TYPE","ALL COLUMNS","NOT DETERMINISTIC","{ROWS | RANGE} BETWEEN","IS [NOT] DISTINCT FROM"]),H={tokenizerOptions:{reservedSelect:D,reservedClauses:[...M,...U],reservedSetOperations:x,reservedJoins:G,reservedPhrases:F,reservedKeywords:y,reservedFunctionNames:b,extraParens:["[]"],stringTypes:[{quote:'""".."""',prefixes:["R","B","RB","BR"]},{quote:"'''..'''",prefixes:["R","B","RB","BR"]},'""-bs',"''-bs",{quote:'""-raw',prefixes:["R","B","RB","BR"],requirePrefix:!0},{quote:"''-raw",prefixes:["R","B","RB","BR"],requirePrefix:!0}],identTypes:["``"],identChars:{dashes:!0},paramTypes:{positional:!0,named:["@"],quoted:["@"]},variableTypes:[{regex:String.raw`@@\w+`}],lineCommentTypes:["--","#"],operators:["&","|","^","~",">>","<<","||","=>"],postProcess:function(e){var t;let n;return t=function(e){let t=[];for(let o=0;o"===t.text?n--:">>"===t.text&&(n-=2),0===n)return r}return e.length-1}(e,o+1),a=e.slice(o,n+1);t.push({type:r.IDENTIFIER,raw:a.map(B("raw")).join(""),text:a.map(B("text")).join(""),start:i.start}),o=n}else t.push(i)}return t}(e),n=u,t.map(e=>"OFFSET"===e.text&&"["===n.text?(n=e,{...e,type:r.RESERVED_FUNCTION_NAME}):(n=e,e))}},formatOptions:{onelineClauses:U}},B=e=>t=>t.type===r.IDENTIFIER||t.type===r.COMMA?t[e]+" ":t[e],w=v({aggregate:["ARRAY_AGG","AVG","CORR","CORRELATION","COUNT","COUNT_BIG","COVAR_POP","COVARIANCE","COVAR","COVAR_SAMP","COVARIANCE_SAMP","CUME_DIST","GROUPING","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_ICPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV_POP","STDDEV","STDDEV_SAMP","SUM","VAR_POP","VARIANCE","VAR","VAR_SAMP","VARIANCE_SAMP","XMLAGG"],scalar:["ABS","ABSVAL","ACOS","ADD_DAYS","ADD_MONTHS","ARRAY_DELETE","ARRAY_FIRST","ARRAY_LAST","ARRAY_NEXT","ARRAY_PRIOR","ARRAY_TRIM","ASCII","ASCII_CHR","ASCII_STR","ASCIISTR","ASIN","ATAN","ATANH","ATAN2","BIGINT","BINARY","BITAND","BITANDNOT","BITOR","BITXOR","BITNOT","BLOB","BTRIM","CARDINALITY","CCSID_ENCODING","CEILING","CEIL","CHAR","CHAR9","CHARACTER_LENGTH","CHAR_LENGTH","CHR","CLOB","COALESCE","COLLATION_KEY","COMPARE_DECFLOAT","CONCAT","CONTAINS","COS","COSH","DATE","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFWEEK_ISO","DAYOFYEAR","DAYS","DAYS_BETWEEN","DBCLOB","DECFLOAT","DECFLOAT_FORMAT","DECFLOAT_SORTKEY","DECIMAL","DEC","DECODE","DECRYPT_BINARY","DECRYPT_BIT","DECRYPT_CHAR","DECRYPT_DB","DECRYPT_DATAKEY_BIGINT","DECRYPT_DATAKEY_BIT","DECRYPT_DATAKEY_CLOB","DECRYPT_DATAKEY_DBCLOB","DECRYPT_DATAKEY_DECIMAL","DECRYPT_DATAKEY_INTEGER","DECRYPT_DATAKEY_VARCHAR","DECRYPT_DATAKEY_VARGRAPHIC","DEGREES","DIFFERENCE","DIGITS","DOUBLE_PRECISION","DOUBLE","DSN_XMLVALIDATE","EBCDIC_CHR","EBCDIC_STR","ENCRYPT_DATAKEY","ENCRYPT_TDES","EXP","EXTRACT","FLOAT","FLOOR","GENERATE_UNIQUE","GENERATE_UNIQUE_BINARY","GETHINT","GETVARIABLE","GRAPHIC","GREATEST","HASH","HASH_CRC32","HASH_MD5","HASH_SHA1","HASH_SHA256","HEX","HOUR","IDENTITY_VAL_LOCAL","IFNULL","INSERT","INSTR","INTEGER","INT","JULIAN_DAY","LAST_DAY","LCASE","LEAST","LEFT","LENGTH","LN","LOCATE","LOCATE_IN_STRING","LOG10","LOWER","LPAD","LTRIM","MAX","MAX_CARDINALITY","MICROSECOND","MIDNIGHT_SECONDS","MIN","MINUTE","MOD","MONTH","MONTHS_BETWEEN","MQREAD","MQREADCLOB","MQRECEIVE","MQRECEIVECLOB","MQSEND","MULTIPLY_ALT","NEXT_DAY","NEXT_MONTH","NORMALIZE_DECFLOAT","NORMALIZE_STRING","NULLIF","NVL","OVERLAY","PACK","POSITION","POSSTR","POWER","POW","QUANTIZE","QUARTER","RADIANS","RAISE_ERROR","RANDOM","RAND","REAL","REGEXP_COUNT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","RID","RIGHT","ROUND","ROUND_TIMESTAMP","ROWID","RPAD","RTRIM","SCORE","SECOND","SIGN","SIN","SINH","SMALLINT","SOUNDEX","SOAPHTTPC","SOAPHTTPV","SOAPHTTPNC","SOAPHTTPNV","SPACE","SQRT","STRIP","STRLEFT","STRPOS","STRRIGHT","SUBSTR","SUBSTRING","TAN","TANH","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIMESTAMP_FORMAT","TIMESTAMP_ISO","TIMESTAMP_TZ","TO_CHAR","TO_CLOB","TO_DATE","TO_NUMBER","TOTALORDER","TO_TIMESTAMP","TRANSLATE","TRIM","TRIM_ARRAY","TRUNCATE","TRUNC","TRUNC_TIMESTAMP","UCASE","UNICODE","UNICODE_STR","UNISTR","UPPER","VALUE","VARBINARY","VARCHAR","VARCHAR9","VARCHAR_BIT_FORMAT","VARCHAR_FORMAT","VARGRAPHIC","VERIFY_GROUP_FOR_USER","VERIFY_ROLE_FOR_USER","VERIFY_TRUSTED_CONTEXT_ROLE_FOR_USER","WEEK","WEEK_ISO","WRAP","XMLATTRIBUTES","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLMODIFY","XMLNAMESPACES","XMLPARSE","XMLPI","XMLQUERY","XMLSERIALIZE","XMLTEXT","XMLXSROBJECTID","XSLTRANSFORM","YEAR"],table:["ADMIN_TASK_LIST","ADMIN_TASK_OUTPUT","ADMIN_TASK_STATUS","BLOCKING_THREADS","MQREADALL","MQREADALLCLOB","MQRECEIVEALL","MQRECEIVEALLCLOB","XMLTABLE"],row:["UNPACK"],olap:["CUME_DIST","PERCENT_RANK","RANK","DENSE_RANK","NTILE","LAG","LEAD","ROW_NUMBER","FIRST_VALUE","LAST_VALUE","NTH_VALUE","RATIO_TO_REPORT"],cast:["CAST"]}),$=v({standard:["ALL","ALLOCATE","ALLOW","ALTERAND","ANY","AS","ARRAY","ARRAY_EXISTS","ASENSITIVE","ASSOCIATE","ASUTIME","AT","AUDIT","AUX","AUXILIARY","BEFORE","BEGIN","BETWEEN","BUFFERPOOL","BY","CAPTURE","CASCADED","CAST","CCSID","CHARACTER","CHECK","CLONE","CLUSTER","COLLECTION","COLLID","COLUMN","CONDITION","CONNECTION","CONSTRAINT","CONTENT","CONTINUE","CREATE","CUBE","CURRENT","CURRENT_DATE","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRVAL","CURSOR","DATA","DATABASE","DBINFO","DECLARE","DEFAULT","DESCRIPTOR","DETERMINISTIC","DISABLE","DISALLOW","DISTINCT","DO","DOCUMENT","DSSIZE","DYNAMIC","EDITPROC","ELSE","ELSEIF","ENCODING","ENCRYPTION","ENDING","END-EXEC","ERASE","ESCAPE","EXCEPTION","EXISTS","EXIT","EXTERNAL","FENCED","FIELDPROC","FINAL","FIRST","FOR","FREE","FULL","FUNCTION","GENERATED","GET","GLOBAL","GOTO","GROUP","HANDLER","HOLD","HOURS","IF","IMMEDIATE","IN","INCLUSIVE","INDEX","INHERIT","INNER","INOUT","INSENSITIVE","INTO","IS","ISOBID","ITERATE","JAR","KEEP","KEY","LANGUAGE","LAST","LC_CTYPE","LEAVE","LIKE","LOCAL","LOCALE","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","MAINTAINED","MATERIALIZED","MICROSECONDS","MINUTEMINUTES","MODIFIES","MONTHS","NEXT","NEXTVAL","NO","NONE","NOT","NULL","NULLS","NUMPARTS","OBID","OF","OLD","ON","OPTIMIZATION","OPTIMIZE","ORDER","ORGANIZATION","OUT","OUTER","PACKAGE","PARAMETER","PART","PADDED","PARTITION","PARTITIONED","PARTITIONING","PATH","PIECESIZE","PERIOD","PLAN","PRECISION","PREVVAL","PRIOR","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","READS","REFERENCES","RESIGNAL","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","ROLE","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROW","ROWSET","SCHEMA","SCRATCHPAD","SECONDS","SECQTY","SECURITY","SEQUENCE","SENSITIVE","SESSION_USER","SIMPLE","SOME","SOURCE","SPECIFIC","STANDARD","STATIC","STATEMENT","STAY","STOGROUP","STORES","STYLE","SUMMARY","SYNONYM","SYSDATE","SYSTEM","SYSTIMESTAMP","TABLE","TABLESPACE","THEN","TO","TRIGGER","TYPE","UNDO","UNIQUE","UNTIL","USER","USING","VALIDPROC","VARIABLE","VARIANT","VCAT","VERSIONING","VIEW","VOLATILE","VOLUMES","WHILE","WLM","XMLEXISTS","XMLCAST","YEARS","ZONE"]}),Y=f(["SELECT [ALL | DISTINCT]"]),V=f(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY [INPUT SEQUENCE]","FETCH FIRST","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT","CREATE [OR REPLACE] VIEW","CREATE [GLOBAL TEMPORARY] TABLE"]),k=f(["UPDATE","WHERE CURRENT OF","WITH {RR | RS | CS | UR}","DELETE FROM","DROP TABLE [HIERARCHY]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME [COLUMN]","ALTER [COLUMN]","SET DATA TYPE","SET NOT NULL","DROP {IDENTITY | EXPRESSION | DEFAULT | NOT NULL}","TRUNCATE [TABLE]","SET [CURRENT] SCHEMA","AFTER","GO","ALLOCATE CURSOR","ALTER DATABASE","ALTER FUNCTION","ALTER INDEX","ALTER MASK","ALTER PERMISSION","ALTER PROCEDURE","ALTER SEQUENCE","ALTER STOGROUP","ALTER TABLESPACE","ALTER TRIGGER","ALTER TRUSTED CONTEXT","ALTER VIEW","ASSOCIATE LOCATORS","BEGIN DECLARE SECTION","CALL","CLOSE","COMMENT","COMMIT","CONNECT","CREATE ALIAS","CREATE AUXILIARY TABLE","CREATE DATABASE","CREATE FUNCTION","CREATE GLOBAL TEMPORARY TABLE","CREATE INDEX","CREATE LOB TABLESPACE","CREATE MASK","CREATE PERMISSION","CREATE PROCEDURE","CREATE ROLE","CREATE SEQUENCE","CREATE STOGROUP","CREATE SYNONYM","CREATE TABLESPACE","CREATE TRIGGER","CREATE TRUSTED CONTEXT","CREATE TYPE","CREATE VARIABLE","DECLARE CURSOR","DECLARE GLOBAL TEMPORARY TABLE","DECLARE STATEMENT","DECLARE TABLE","DECLARE VARIABLE","DESCRIBE CURSOR","DESCRIBE INPUT","DESCRIBE OUTPUT","DESCRIBE PROCEDURE","DESCRIBE TABLE","DROP","END DECLARE SECTION","EXCHANGE","EXECUTE","EXECUTE IMMEDIATE","EXPLAIN","FETCH","FREE LOCATOR","GET DIAGNOSTICS","GRANT","HOLD LOCATOR","INCLUDE","LABEL","LOCK TABLE","OPEN","PREPARE","REFRESH","RELEASE","RELEASE SAVEPOINT","RENAME","REVOKE","ROLLBACK","SAVEPOINT","SELECT INTO","SET CONNECTION","SET CURRENT ACCELERATOR","SET CURRENT APPLICATION COMPATIBILITY","SET CURRENT APPLICATION ENCODING SCHEME","SET CURRENT DEBUG MODE","SET CURRENT DECFLOAT ROUNDING MODE","SET CURRENT DEGREE","SET CURRENT EXPLAIN MODE","SET CURRENT GET_ACCEL_ARCHIVE","SET CURRENT LOCALE LC_CTYPE","SET CURRENT MAINTAINED TABLE TYPES FOR OPTIMIZATION","SET CURRENT OPTIMIZATION HINT","SET CURRENT PACKAGE PATH","SET CURRENT PACKAGESET","SET CURRENT PRECISION","SET CURRENT QUERY ACCELERATION","SET CURRENT QUERY ACCELERATION WAITFORDATA","SET CURRENT REFRESH AGE","SET CURRENT ROUTINE VERSION","SET CURRENT RULES","SET CURRENT SQLID","SET CURRENT TEMPORAL BUSINESS_TIME","SET CURRENT TEMPORAL SYSTEM_TIME","SET ENCRYPTION PASSWORD","SET PATH","SET SESSION TIME ZONE","SIGNAL","VALUES INTO","WHENEVER"]),W=f(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),Z=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),j=f(["ON DELETE","ON UPDATE","SET NULL","{ROWS | RANGE} BETWEEN"]),X={tokenizerOptions:{reservedSelect:Y,reservedClauses:[...V,...k],reservedSetOperations:W,reservedJoins:Z,reservedPhrases:j,reservedKeywords:$,reservedFunctionNames:w,stringTypes:[{quote:"''-qq",prefixes:["G","N","U&"]},{quote:"''-raw",prefixes:["X","BX","GX","UX"],requirePrefix:!0}],identTypes:['""-qq'],identChars:{first:"@#$"},paramTypes:{positional:!0,named:[":"]},paramChars:{first:"@#$",rest:"@#$"},operators:["**","\xac=","\xac>","\xac<","!>","!<","||"]},formatOptions:{onelineClauses:k}},K=v({math:["ABS","ACOS","ASIN","ATAN","BIN","BROUND","CBRT","CEIL","CEILING","CONV","COS","DEGREES","EXP","FACTORIAL","FLOOR","GREATEST","HEX","LEAST","LN","LOG","LOG10","LOG2","NEGATIVE","PI","PMOD","POSITIVE","POW","POWER","RADIANS","RAND","ROUND","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIN","SQRT","TAN","UNHEX","WIDTH_BUCKET"],array:["ARRAY_CONTAINS","MAP_KEYS","MAP_VALUES","SIZE","SORT_ARRAY"],conversion:["BINARY","CAST"],date:["ADD_MONTHS","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","QUARTER","SECOND","TIMESTAMP","TO_DATE","TO_UTC_TIMESTAMP","TRUNC","UNIX_TIMESTAMP","WEEKOFYEAR","YEAR"],conditional:["ASSERT_TRUE","COALESCE","IF","ISNOTNULL","ISNULL","NULLIF","NVL"],string:["ASCII","BASE64","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONTEXT_NGRAMS","DECODE","ELT","ENCODE","FIELD","FIND_IN_SET","FORMAT_NUMBER","GET_JSON_OBJECT","IN_FILE","INITCAP","INSTR","LCASE","LENGTH","LEVENSHTEIN","LOCATE","LOWER","LPAD","LTRIM","NGRAMS","OCTET_LENGTH","PARSE_URL","PRINTF","QUOTE","REGEXP_EXTRACT","REGEXP_REPLACE","REPEAT","REVERSE","RPAD","RTRIM","SENTENCES","SOUNDEX","SPACE","SPLIT","STR_TO_MAP","SUBSTR","SUBSTRING","TRANSLATE","TRIM","UCASE","UNBASE64","UPPER"],masking:["MASK","MASK_FIRST_N","MASK_HASH","MASK_LAST_N","MASK_SHOW_FIRST_N","MASK_SHOW_LAST_N"],misc:["AES_DECRYPT","AES_ENCRYPT","CRC32","CURRENT_DATABASE","CURRENT_USER","HASH","JAVA_METHOD","LOGGED_IN_USER","MD5","REFLECT","SHA","SHA1","SHA2","SURROGATE_KEY","VERSION"],aggregate:["AVG","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COVAR_POP","COVAR_SAMP","HISTOGRAM_NUMERIC","MAX","MIN","NTILE","PERCENTILE","PERCENTILE_APPROX","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],table:["EXPLODE","INLINE","JSON_TUPLE","PARSE_URL_TUPLE","POSEXPLODE","STACK"],window:["LEAD","LAG","FIRST_VALUE","LAST_VALUE","RANK","ROW_NUMBER","DENSE_RANK","CUME_DIST","PERCENT_RANK","NTILE"],dataTypes:["DECIMAL","NUMERIC","VARCHAR","CHAR"]}),z=v({nonReserved:["ADD","ADMIN","AFTER","ANALYZE","ARCHIVE","ASC","BEFORE","BUCKET","BUCKETS","CASCADE","CHANGE","CLUSTER","CLUSTERED","CLUSTERSTATUS","COLLECTION","COLUMNS","COMMENT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONTINUE","DATA","DATABASES","DATETIME","DAY","DBPROPERTIES","DEFERRED","DEFINED","DELIMITED","DEPENDENCY","DESC","DIRECTORIES","DIRECTORY","DISABLE","DISTRIBUTE","ELEM_TYPE","ENABLE","ESCAPED","EXCLUSIVE","EXPLAIN","EXPORT","FIELDS","FILE","FILEFORMAT","FIRST","FORMAT","FORMATTED","FUNCTIONS","HOLD_DDLTIME","HOUR","IDXPROPERTIES","IGNORE","INDEX","INDEXES","INPATH","INPUTDRIVER","INPUTFORMAT","ITEMS","JAR","KEYS","KEY_TYPE","LIMIT","LINES","LOAD","LOCATION","LOCK","LOCKS","LOGICAL","LONG","MAPJOIN","MATERIALIZED","METADATA","MINUS","MINUTE","MONTH","MSCK","NOSCAN","NO_DROP","OFFLINE","OPTION","OUTPUTDRIVER","OUTPUTFORMAT","OVERWRITE","OWNER","PARTITIONED","PARTITIONS","PLUS","PRETTY","PRINCIPALS","PROTECTION","PURGE","READ","READONLY","REBUILD","RECORDREADER","RECORDWRITER","RELOAD","RENAME","REPAIR","REPLACE","REPLICATION","RESTRICT","REWRITE","ROLE","ROLES","SCHEMA","SCHEMAS","SECOND","SEMI","SERDE","SERDEPROPERTIES","SERVER","SETS","SHARED","SHOW","SHOW_DATABASE","SKEWED","SORT","SORTED","SSL","STATISTICS","STORED","STREAMTABLE","STRING","STRUCT","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","TINYINT","TOUCH","TRANSACTIONS","UNARCHIVE","UNDO","UNIONTYPE","UNLOCK","UNSET","UNSIGNED","URI","USE","UTC","UTCTIMESTAMP","VALUE_TYPE","VIEW","WHILE","YEAR","AUTOCOMMIT","ISOLATION","LEVEL","OFFSET","SNAPSHOT","TRANSACTION","WORK","WRITE","ABORT","KEY","LAST","NORELY","NOVALIDATE","NULLS","RELY","VALIDATE","DETAIL","DOW","EXPRESSION","OPERATOR","QUARTER","SUMMARY","VECTORIZATION","WEEK","YEARS","MONTHS","WEEKS","DAYS","HOURS","MINUTES","SECONDS","TIMESTAMPTZ","ZONE"],reserved:["ALL","ALTER","AND","ARRAY","AS","AUTHORIZATION","BETWEEN","BIGINT","BINARY","BOOLEAN","BOTH","BY","CASE","CAST","CHAR","COLUMN","CONF","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIMESTAMP","CURSOR","DATABASE","DATE","DECIMAL","DELETE","DESCRIBE","DISTINCT","DOUBLE","DROP","ELSE","END","EXCHANGE","EXISTS","EXTENDED","EXTERNAL","FALSE","FETCH","FLOAT","FOLLOWING","FOR","FROM","FULL","FUNCTION","GRANT","GROUP","GROUPING","HAVING","IF","IMPORT","IN","INNER","INSERT","INT","INTERSECT","INTERVAL","INTO","IS","JOIN","LATERAL","LEFT","LESS","LIKE","LOCAL","MACRO","MAP","MORE","NONE","NOT","NULL","OF","ON","OR","ORDER","OUT","OUTER","OVER","PARTIALSCAN","PARTITION","PERCENT","PRECEDING","PRESERVE","PROCEDURE","RANGE","READS","REDUCE","REVOKE","RIGHT","ROLLUP","ROW","ROWS","SELECT","SET","SMALLINT","TABLE","TABLESAMPLE","THEN","TIMESTAMP","TO","TRANSFORM","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNION","UNIQUEJOIN","UPDATE","USER","USING","UTC_TMESTAMP","VALUES","VARCHAR","WHEN","WHERE","WINDOW","WITH","COMMIT","ONLY","REGEXP","RLIKE","ROLLBACK","START","CACHE","CONSTRAINT","FOREIGN","PRIMARY","REFERENCES","DAYOFWEEK","EXTRACT","FLOOR","INTEGER","PRECISION","VIEWS","TIME","NUMERIC","SYNC"],fileTypes:["TEXTFILE","SEQUENCEFILE","ORC","CSV","TSV","PARQUET","AVRO","RCFILE","JSONFILE","INPUTFORMAT","OUTPUTFORMAT"]}),J=f(["SELECT [ALL | DISTINCT]"]),q=f(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT INTO [TABLE]","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT [VALUES]","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE","CREATE [MATERIALIZED] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY] [EXTERNAL] TABLE [IF NOT EXISTS]"]),Q=f(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","RENAME TO","TRUNCATE [TABLE]","ALTER","CREATE","USE","DESCRIBE","DROP","FETCH","SHOW","STORED AS","STORED BY","ROW FORMAT"]),ee=f(["UNION [ALL | DISTINCT]"]),et=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","LEFT SEMI JOIN"]),en=f(["{ROWS | RANGE} BETWEEN"]),er={tokenizerOptions:{reservedSelect:J,reservedClauses:[...q,...Q],reservedSetOperations:ee,reservedJoins:et,reservedPhrases:en,reservedKeywords:z,reservedFunctionNames:K,extraParens:["[]"],stringTypes:['""-bs',"''-bs"],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||"]},formatOptions:{onelineClauses:Q}},eo=v({all:["ACCESSIBLE","ACCOUNT","ACTION","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","ALL","ALGORITHM","ALTER","ALWAYS","ANALYZE","AND","ANY","AS","ASC","ASCII","ASENSITIVE","AT","ATOMIC","AUTHORS","AUTO_INCREMENT","AUTOEXTEND_SIZE","AUTO","AVG","AVG_ROW_LENGTH","BACKUP","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BINLOG","BIT","BLOB","BLOCK","BODY","BOOL","BOOLEAN","BOTH","BTREE","BY","BYTE","CACHE","CALL","CASCADE","CASCADED","CASE","CATALOG_NAME","CHAIN","CHANGE","CHANGED","CHAR","CHARACTER","CHARSET","CHECK","CHECKPOINT","CHECKSUM","CIPHER","CLASS_ORIGIN","CLIENT","CLOB","CLOSE","COALESCE","CODE","COLLATE","COLLATION","COLUMN","COLUMN_NAME","COLUMNS","COLUMN_ADD","COLUMN_CHECK","COLUMN_CREATE","COLUMN_DELETE","COLUMN_GET","COMMENT","COMMIT","COMMITTED","COMPACT","COMPLETION","COMPRESSED","CONCURRENT","CONDITION","CONNECTION","CONSISTENT","CONSTRAINT","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONTAINS","CONTEXT","CONTINUE","CONTRIBUTORS","CONVERT","CPU","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_POS","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CURSOR_NAME","CYCLE","DATA","DATABASE","DATABASES","DATAFILE","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFINER","DELAYED","DELAY_KEY_WRITE","DELETE","DELETE_DOMAIN_ID","DESC","DESCRIBE","DES_KEY_FILE","DETERMINISTIC","DIAGNOSTICS","DIRECTORY","DISABLE","DISCARD","DISK","DISTINCT","DISTINCTROW","DIV","DO","DOUBLE","DO_DOMAIN_IDS","DROP","DUAL","DUMPFILE","DUPLICATE","DYNAMIC","EACH","ELSE","ELSEIF","ELSIF","EMPTY","ENABLE","ENCLOSED","END","ENDS","ENGINE","ENGINES","ENUM","ERROR","ERRORS","ESCAPE","ESCAPED","EVENT","EVENTS","EVERY","EXAMINED","EXCEPT","EXCHANGE","EXCLUDE","EXECUTE","EXCEPTION","EXISTS","EXIT","EXPANSION","EXPIRE","EXPORT","EXPLAIN","EXTENDED","EXTENT_SIZE","FALSE","FAST","FAULTS","FEDERATED","FETCH","FIELDS","FILE","FIRST","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOLLOWS","FOR","FORCE","FOREIGN","FORMAT","FOUND","FROM","FULL","FULLTEXT","FUNCTION","GENERAL","GENERATED","GET_FORMAT","GET","GLOBAL","GOTO","GRANT","GRANTS","GROUP","HANDLER","HARD","HASH","HAVING","HELP","HIGH_PRIORITY","HISTORY","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IGNORE","IGNORED","IGNORE_DOMAIN_IDS","IGNORE_SERVER_IDS","IMMEDIATE","IMPORT","INTERSECT","IN","INCREMENT","INDEX","INDEXES","INFILE","INITIAL_SIZE","INNER","INOUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTALL","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERVAL","INVISIBLE","INTO","IO","IO_THREAD","IPC","IS","ISOLATION","ISOPEN","ISSUER","ITERATE","INVOKER","JOIN","JSON","JSON_TABLE","KEY","KEYS","KEY_BLOCK_SIZE","KILL","LANGUAGE","LAST","LAST_VALUE","LASTVAL","LEADING","LEAVE","LEAVES","LEFT","LESS","LEVEL","LIKE","LIMIT","LINEAR","LINES","LIST","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCK","LOCKED","LOCKS","LOGFILE","LOGS","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER","MASTER_CONNECT_RETRY","MASTER_DELAY","MASTER_GTID_POS","MASTER_HOST","MASTER_LOG_FILE","MASTER_LOG_POS","MASTER_PASSWORD","MASTER_PORT","MASTER_SERVER_ID","MASTER_SSL","MASTER_SSL_CA","MASTER_SSL_CAPATH","MASTER_SSL_CERT","MASTER_SSL_CIPHER","MASTER_SSL_CRL","MASTER_SSL_CRLPATH","MASTER_SSL_KEY","MASTER_SSL_VERIFY_SERVER_CERT","MASTER_USER","MASTER_USE_GTID","MASTER_HEARTBEAT_PERIOD","MATCH","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_SIZE","MAX_STATEMENT_TIME","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MAXVALUE","MEDIUM","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMORY","MERGE","MESSAGE_TEXT","MICROSECOND","MIDDLEINT","MIGRATE","MINUS","MINUTE","MINUTE_MICROSECOND","MINUTE_SECOND","MINVALUE","MIN_ROWS","MOD","MODE","MODIFIES","MODIFY","MONITOR","MONTH","MUTEX","MYSQL","MYSQL_ERRNO","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NESTED","NEVER","NEW","NEXT","NEXTVAL","NO","NOMAXVALUE","NOMINVALUE","NOCACHE","NOCYCLE","NO_WAIT","NOWAIT","NODEGROUP","NONE","NOT","NOTFOUND","NO_WRITE_TO_BINLOG","NULL","NUMBER","NUMERIC","NVARCHAR","OF","OFFSET","OLD_PASSWORD","ON","ONE","ONLINE","ONLY","OPEN","OPTIMIZE","OPTIONS","OPTION","OPTIONALLY","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OUTFILE","OVER","OVERLAPS","OWNER","PACKAGE","PACK_KEYS","PAGE","PAGE_CHECKSUM","PARSER","PARSE_VCOL_EXPR","PATH","PERIOD","PARTIAL","PARTITION","PARTITIONING","PARTITIONS","PASSWORD","PERSISTENT","PHASE","PLUGIN","PLUGINS","PORT","PORTION","PRECEDES","PRECEDING","PRECISION","PREPARE","PRESERVE","PREV","PREVIOUS","PRIMARY","PRIVILEGES","PROCEDURE","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROXY","PURGE","QUARTER","QUERY","QUICK","RAISE","RANGE","RAW","READ","READ_ONLY","READ_WRITE","READS","REAL","REBUILD","RECOVER","RECURSIVE","REDO_BUFFER_SIZE","REDOFILE","REDUNDANT","REFERENCES","REGEXP","RELAY","RELAYLOG","RELAY_LOG_FILE","RELAY_LOG_POS","RELAY_THREAD","RELEASE","RELOAD","REMOVE","RENAME","REORGANIZE","REPAIR","REPEATABLE","REPLACE","REPLAY","REPLICA","REPLICAS","REPLICA_POS","REPLICATION","REPEAT","REQUIRE","RESET","RESIGNAL","RESTART","RESTORE","RESTRICT","RESUME","RETURNED_SQLSTATE","RETURN","RETURNING","RETURNS","REUSE","REVERSE","REVOKE","RIGHT","RLIKE","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROW","ROWCOUNT","ROWNUM","ROWS","ROWTYPE","ROW_COUNT","ROW_FORMAT","RTREE","SAVEPOINT","SCHEDULE","SCHEMA","SCHEMA_NAME","SCHEMAS","SECOND","SECOND_MICROSECOND","SECURITY","SELECT","SENSITIVE","SEPARATOR","SEQUENCE","SERIAL","SERIALIZABLE","SESSION","SERVER","SET","SETVAL","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMPLE","SKIP","SLAVE","SLAVES","SLAVE_POS","SLOW","SNAPSHOT","SMALLINT","SOCKET","SOFT","SOME","SONAME","SOUNDS","SOURCE","STAGE","STORED","SPATIAL","SPECIFIC","REF_SYSTEM_ID","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_NO_CACHE","SQL_SMALL_RESULT","SQL_THREAD","SQL_TSI_SECOND","SQL_TSI_MINUTE","SQL_TSI_HOUR","SQL_TSI_DAY","SQL_TSI_WEEK","SQL_TSI_MONTH","SQL_TSI_QUARTER","SQL_TSI_YEAR","SSL","START","STARTING","STARTS","STATEMENT","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STATUS","STOP","STORAGE","STRAIGHT_JOIN","STRING","SUBCLASS_ORIGIN","SUBJECT","SUBPARTITION","SUBPARTITIONS","SUPER","SUSPEND","SWAPS","SWITCHES","SYSDATE","SYSTEM","SYSTEM_TIME","TABLE","TABLE_NAME","TABLES","TABLESPACE","TABLE_CHECKSUM","TEMPORARY","TEMPTABLE","TERMINATED","TEXT","THAN","THEN","TIES","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TINYBLOB","TINYINT","TINYTEXT","TO","TRAILING","TRANSACTION","TRANSACTIONAL","THREADS","TRIGGER","TRIGGERS","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO_BUFFER_SIZE","UNDOFILE","UNDO","UNICODE","UNION","UNIQUE","UNKNOWN","UNLOCK","UNINSTALL","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USER_RESOURCES","USE_FRM","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARCHAR2","VARIABLES","VARYING","VIA","VIEW","VIRTUAL","VISIBLE","VERSIONING","WAIT","WARNINGS","WEEK","WEIGHT_STRING","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","X509","XOR","XA","XML","YEAR","YEAR_MONTH","ZEROFILL"]}),ei=v({all:["ADDDATE","ADD_MONTHS","BIT_AND","BIT_OR","BIT_XOR","CAST","COUNT","CUME_DIST","CURDATE","CURTIME","DATE_ADD","DATE_SUB","DATE_FORMAT","DECODE","DENSE_RANK","EXTRACT","FIRST_VALUE","GROUP_CONCAT","JSON_ARRAYAGG","JSON_OBJECTAGG","LAG","LEAD","MAX","MEDIAN","MID","MIN","NOW","NTH_VALUE","NTILE","POSITION","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","ROW_NUMBER","SESSION_USER","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUBDATE","SUBSTR","SUBSTRING","SUM","SYSTEM_USER","TRIM","TRIM_ORACLE","VARIANCE","VAR_POP","VAR_SAMP","ABS","ACOS","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ASIN","ATAN","ATAN2","BENCHMARK","BIN","BINLOG_GTID_POS","BIT_COUNT","BIT_LENGTH","CEIL","CEILING","CHARACTER_LENGTH","CHAR_LENGTH","CHR","COERCIBILITY","COLUMN_CHECK","COLUMN_EXISTS","COLUMN_LIST","COLUMN_JSON","COMPRESS","CONCAT","CONCAT_OPERATOR_ORACLE","CONCAT_WS","CONNECTION_ID","CONV","CONVERT_TZ","COS","COT","CRC32","DATEDIFF","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEGREES","DECODE_HISTOGRAM","DECODE_ORACLE","DES_DECRYPT","DES_ENCRYPT","ELT","ENCODE","ENCRYPT","EXP","EXPORT_SET","EXTRACTVALUE","FIELD","FIND_IN_SET","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GET_LOCK","GREATEST","HEX","IFNULL","INSTR","ISNULL","IS_FREE_LOCK","IS_USED_LOCK","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_COMPACT","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_DETAILED","JSON_EXISTS","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_LOOSE","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_QUERY","JSON_QUOTE","JSON_OBJECT","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_SEARCH","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAST_DAY","LAST_INSERT_ID","LCASE","LEAST","LENGTH","LENGTHB","LN","LOAD_FILE","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LPAD_ORACLE","LTRIM","LTRIM_ORACLE","MAKEDATE","MAKETIME","MAKE_SET","MASTER_GTID_WAIT","MASTER_POS_WAIT","MD5","MONTHNAME","NAME_CONST","NVL","NVL2","OCT","OCTET_LENGTH","ORD","PERIOD_ADD","PERIOD_DIFF","PI","POW","POWER","QUOTE","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","RADIANS","RAND","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPLACE_ORACLE","REVERSE","ROUND","RPAD","RPAD_ORACLE","RTRIM","RTRIM_ORACLE","SEC_TO_TIME","SHA","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SPACE","SQRT","STRCMP","STR_TO_DATE","SUBSTR_ORACLE","SUBSTRING_INDEX","SUBTIME","SYS_GUID","TAN","TIMEDIFF","TIME_FORMAT","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_SECONDS","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","UUID","UUID_SHORT","VERSION","WEEKDAY","WEEKOFYEAR","WSREP_LAST_WRITTEN_GTID","WSREP_LAST_SEEN_GTID","WSREP_SYNC_WAIT_UPTO_GTID","YEARWEEK","COALESCE","NULLIF","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","BIT","BINARY","BLOB","CHAR","NATIONAL CHAR","CHAR BYTE","ENUM","VARBINARY","VARCHAR","NATIONAL VARCHAR","TIME","DATETIME","TIMESTAMP","YEAR"]}),ea=f(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),es=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","SET","CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]","RETURNING"]),el=f(["UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] [IGNORE] TABLE [IF EXISTS]","ADD [COLUMN] [IF NOT EXISTS]","{CHANGE | MODIFY} [COLUMN] [IF EXISTS]","DROP [COLUMN] [IF EXISTS]","RENAME [TO]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","SET {VISIBLE | INVISIBLE}","TRUNCATE [TABLE]","ALTER DATABASE","ALTER DATABASE COMMENT","ALTER EVENT","ALTER FUNCTION","ALTER PROCEDURE","ALTER SCHEMA","ALTER SCHEMA COMMENT","ALTER SEQUENCE","ALTER SERVER","ALTER USER","ALTER VIEW","ANALYZE","ANALYZE TABLE","BACKUP LOCK","BACKUP STAGE","BACKUP UNLOCK","BEGIN","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHECK TABLE","CHECK VIEW","CHECKSUM TABLE","COMMIT","CREATE AGGREGATE FUNCTION","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE INDEX","CREATE PROCEDURE","CREATE ROLE","CREATE SEQUENCE","CREATE SERVER","CREATE SPATIAL INDEX","CREATE TRIGGER","CREATE UNIQUE INDEX","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP INDEX","DROP PREPARE","DROP PROCEDURE","DROP ROLE","DROP SEQUENCE","DROP SERVER","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GET DIAGNOSTICS","GET DIAGNOSTICS CONDITION","GRANT","HANDLER","HELP","INSTALL PLUGIN","INSTALL SONAME","KILL","LOAD DATA INFILE","LOAD INDEX INTO CACHE","LOAD XML INFILE","LOCK TABLE","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","PURGE MASTER LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","REPAIR VIEW","RESET MASTER","RESET QUERY CACHE","RESET REPLICA","RESET SLAVE","RESIGNAL","REVOKE","ROLLBACK","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET GLOBAL TRANSACTION","SET NAMES","SET PASSWORD","SET ROLE","SET STATEMENT","SET TRANSACTION","SHOW","SHOW ALL REPLICAS STATUS","SHOW ALL SLAVES STATUS","SHOW AUTHORS","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW BINLOG STATUS","SHOW CHARACTER SET","SHOW CLIENT_STATISTICS","SHOW COLLATION","SHOW COLUMNS","SHOW CONTRIBUTORS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PACKAGE","SHOW CREATE PACKAGE BODY","SHOW CREATE PROCEDURE","SHOW CREATE SEQUENCE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINE INNODB STATUS","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW EXPLAIN","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW INDEXES","SHOW INDEX_STATISTICS","SHOW KEYS","SHOW LOCALES","SHOW MASTER LOGS","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PACKAGE BODY CODE","SHOW PACKAGE BODY STATUS","SHOW PACKAGE STATUS","SHOW PLUGINS","SHOW PLUGINS SONAME","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW QUERY_RESPONSE_TIME","SHOW RELAYLOG EVENTS","SHOW REPLICA","SHOW REPLICA HOSTS","SHOW REPLICA STATUS","SHOW SCHEMAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW SLAVE STATUS","SHOW STATUS","SHOW STORAGE ENGINES","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW USER_STATISTICS","SHOW VARIABLES","SHOW WARNINGS","SHOW WSREP_MEMBERSHIP","SHOW WSREP_STATUS","SHUTDOWN","SIGNAL","START ALL REPLICAS","START ALL SLAVES","START REPLICA","START SLAVE","START TRANSACTION","STOP ALL REPLICAS","STOP ALL SLAVES","STOP REPLICA","STOP SLAVE","UNINSTALL PLUGIN","UNINSTALL SONAME","UNLOCK TABLE","USE","XA BEGIN","XA COMMIT","XA END","XA PREPARE","XA RECOVER","XA ROLLBACK","XA START"]),eE=f(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]","MINUS [ALL | DISTINCT]"]),ec=f(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),eu=f(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),eT={tokenizerOptions:{reservedSelect:ea,reservedClauses:[...es,...el],reservedSetOperations:eE,reservedJoins:ec,reservedPhrases:eu,supportsXor:!0,reservedKeywords:eo,reservedFunctionNames:ei,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","&&","||","!"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return R.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{onelineClauses:el}},eR=v({all:["ACCESSIBLE","ACCOUNT","ACTION","ACTIVE","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ALWAYS","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASCII","ASENSITIVE","AT","ATTRIBUTE","AUTHENTICATION","AUTOEXTEND_SIZE","AUTO_INCREMENT","AVG","AVG_ROW_LENGTH","BACKUP","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BINLOG","BIT","BLOB","BLOCK","BOOL","BOOLEAN","BOTH","BTREE","BUCKETS","BY","BYTE","CACHE","CALL","CASCADE","CASCADED","CASE","CATALOG_NAME","CHAIN","CHALLENGE_RESPONSE","CHANGE","CHANGED","CHANNEL","CHAR","CHARACTER","CHARSET","CHECK","CHECKSUM","CIPHER","CLASS_ORIGIN","CLIENT","CLONE","CLOSE","COALESCE","CODE","COLLATE","COLLATION","COLUMN","COLUMNS","COLUMN_FORMAT","COLUMN_NAME","COMMENT","COMMIT","COMMITTED","COMPACT","COMPLETION","COMPONENT","COMPRESSED","COMPRESSION","CONCURRENT","CONDITION","CONNECTION","CONSISTENT","CONSTRAINT","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONTAINS","CONTEXT","CONTINUE","CONVERT","CPU","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CURSOR_NAME","DATA","DATABASE","DATABASES","DATAFILE","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULT_AUTH","DEFINER","DEFINITION","DELAYED","DELAY_KEY_WRITE","DELETE","DENSE_RANK","DESC","DESCRIBE","DESCRIPTION","DETERMINISTIC","DIAGNOSTICS","DIRECTORY","DISABLE","DISCARD","DISK","DISTINCT","DISTINCTROW","DIV","DO","DOUBLE","DROP","DUAL","DUMPFILE","DUPLICATE","DYNAMIC","EACH","ELSE","ELSEIF","EMPTY","ENABLE","ENCLOSED","ENCRYPTION","END","ENDS","ENFORCED","ENGINE","ENGINES","ENGINE_ATTRIBUTE","ENUM","ERROR","ERRORS","ESCAPE","ESCAPED","EVENT","EVENTS","EVERY","EXCEPT","EXCHANGE","EXCLUDE","EXECUTE","EXISTS","EXIT","EXPANSION","EXPIRE","EXPLAIN","EXPORT","EXTENDED","EXTENT_SIZE","FACTOR","FAILED_LOGIN_ATTEMPTS","FALSE","FAST","FAULTS","FETCH","FIELDS","FILE","FILE_BLOCK_SIZE","FILTER","FINISH","FIRST","FIRST_VALUE","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOLLOWS","FOR","FORCE","FOREIGN","FORMAT","FOUND","FROM","FULL","FULLTEXT","FUNCTION","GENERAL","GENERATED","GEOMCOLLECTION","GEOMETRY","GEOMETRYCOLLECTION","GET","GET_FORMAT","GET_MASTER_PUBLIC_KEY","GET_SOURCE_PUBLIC_KEY","GLOBAL","GRANT","GRANTS","GROUP","GROUPING","GROUPS","GROUP_REPLICATION","GTID_ONLY","HANDLER","HASH","HAVING","HELP","HIGH_PRIORITY","HISTOGRAM","HISTORY","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IGNORE","IGNORE_SERVER_IDS","IMPORT","IN","INACTIVE","INDEX","INDEXES","INFILE","INITIAL","INITIAL_SIZE","INITIATE","INNER","INOUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTALL","INSTANCE","IN","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERSECT","INTERVAL","INTO","INVISIBLE","INVOKER","IO","IO_AFTER_GTIDS","IO_BEFORE_GTIDS","IO_THREAD","IPC","IS","ISOLATION","ISSUER","ITERATE","JOIN","JSON","JSON_TABLE","JSON_VALUE","KEY","KEYRING","KEYS","KEY_BLOCK_SIZE","KILL","LAG","LANGUAGE","LAST","LAST_VALUE","LATERAL","LEAD","LEADING","LEAVE","LEAVES","LEFT","LESS","LEVEL","LIKE","LIMIT","LINEAR","LINES","LINESTRING","LIST","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCK","LOCKED","LOCKS","LOGFILE","LOGS","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER","MASTER_AUTO_POSITION","MASTER_BIND","MASTER_COMPRESSION_ALGORITHMS","MASTER_CONNECT_RETRY","MASTER_DELAY","MASTER_HEARTBEAT_PERIOD","MASTER_HOST","MASTER_LOG_FILE","MASTER_LOG_POS","MASTER_PASSWORD","MASTER_PORT","MASTER_PUBLIC_KEY_PATH","MASTER_RETRY_COUNT","MASTER_SSL","MASTER_SSL_CA","MASTER_SSL_CAPATH","MASTER_SSL_CERT","MASTER_SSL_CIPHER","MASTER_SSL_CRL","MASTER_SSL_CRLPATH","MASTER_SSL_KEY","MASTER_SSL_VERIFY_SERVER_CERT","MASTER_TLS_CIPHERSUITES","MASTER_TLS_VERSION","MASTER_USER","MASTER_ZSTD_COMPRESSION_LEVEL","MATCH","MAXVALUE","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_SIZE","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMBER","MEMORY","MERGE","MESSAGE_TEXT","MICROSECOND","MIDDLEINT","MIGRATE","MINUTE","MINUTE_MICROSECOND","MINUTE_SECOND","MIN_ROWS","MOD","MODE","MODIFIES","MODIFY","MONTH","MULTILINESTRING","MULTIPOINT","MULTIPOLYGON","MUTEX","MYSQL_ERRNO","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NDB","NDBCLUSTER","NESTED","NETWORK_NAMESPACE","NEVER","NEW","NEXT","NO","NODEGROUP","NONE","NOT","NOWAIT","NO_WAIT","NO_WRITE_TO_BINLOG","NTH_VALUE","NTILE","NULL","NULLS","NUMBER","NUMERIC","NVARCHAR","OF","OFF","OFFSET","OJ","OLD","ON","ONE","ONLY","OPEN","OPTIMIZE","OPTIMIZER_COSTS","OPTION","OPTIONAL","OPTIONALLY","OPTIONS","OR","ORDER","ORDINALITY","ORGANIZATION","OTHERS","OUT","OUTER","OUTFILE","OVER","OWNER","PACK_KEYS","PAGE","PARSER","PARTIAL","PARTITION","PARTITIONING","PARTITIONS","PASSWORD","PASSWORD_LOCK_TIME","PATH","PERCENT_RANK","PERSIST","PERSIST_ONLY","PHASE","PLUGIN","PLUGINS","PLUGIN_DIR","POINT","POLYGON","PORT","PRECEDES","PRECEDING","PRECISION","PREPARE","PRESERVE","PREV","PRIMARY","PRIVILEGES","PRIVILEGE_CHECKS_USER","PROCEDURE","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROXY","PURGE","QUARTER","QUERY","QUICK","RANDOM","RANGE","RANK","READ","READS","READ_ONLY","READ_WRITE","REAL","REBUILD","RECOVER","RECURSIVE","REDO_BUFFER_SIZE","REDUNDANT","REFERENCE","REFERENCES","REGEXP","REGISTRATION","RELAY","RELAYLOG","RELAY_LOG_FILE","RELAY_LOG_POS","RELAY_THREAD","RELEASE","RELOAD","REMOVE","RENAME","REORGANIZE","REPAIR","REPEAT","REPEATABLE","REPLACE","REPLICA","REPLICAS","REPLICATE_DO_DB","REPLICATE_DO_TABLE","REPLICATE_IGNORE_DB","REPLICATE_IGNORE_TABLE","REPLICATE_REWRITE_DB","REPLICATE_WILD_DO_TABLE","REPLICATE_WILD_IGNORE_TABLE","REPLICATION","REQUIRE","REQUIRE_ROW_FORMAT","RESET","RESIGNAL","RESOURCE","RESPECT","RESTART","RESTORE","RESTRICT","RESUME","RETAIN","RETURN","RETURNED_SQLSTATE","RETURNING","RETURNS","REUSE","REVERSE","REVOKE","RIGHT","RLIKE","ROLE","ROLLBACK","ROLLUP","ROTATE","ROUTINE","ROW","ROWS","ROW_COUNT","ROW_FORMAT","ROW_NUMBER","RTREE","SAVEPOINT","SCHEDULE","SCHEMA","SCHEMAS","SCHEMA_NAME","SECOND","SECONDARY","SECONDARY_ENGINE","SECONDARY_ENGINE_ATTRIBUTE","SECONDARY_LOAD","SECONDARY_UNLOAD","SECOND_MICROSECOND","SECURITY","SELECT","SENSITIVE","SEPARATOR","SERIAL","SERIALIZABLE","SERVER","SESSION","SET","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMPLE","SKIP","SLAVE","SLOW","SMALLINT","SNAPSHOT","SOCKET","SOME","SONAME","SOUNDS","SOURCE","SOURCE_AUTO_POSITION","SOURCE_BIND","SOURCE_COMPRESSION_ALGORITHMS","SOURCE_CONNECT_RETRY","SOURCE_DELAY","SOURCE_HEARTBEAT_PERIOD","SOURCE_HOST","SOURCE_LOG_FILE","SOURCE_LOG_POS","SOURCE_PASSWORD","SOURCE_PORT","SOURCE_PUBLIC_KEY_PATH","SOURCE_RETRY_COUNT","SOURCE_SSL","SOURCE_SSL_CA","SOURCE_SSL_CAPATH","SOURCE_SSL_CERT","SOURCE_SSL_CIPHER","SOURCE_SSL_CRL","SOURCE_SSL_CRLPATH","SOURCE_SSL_KEY","SOURCE_SSL_VERIFY_SERVER_CERT","SOURCE_TLS_CIPHERSUITES","SOURCE_TLS_VERSION","SOURCE_USER","SOURCE_ZSTD_COMPRESSION_LEVEL","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_AFTER_GTIDS","SQL_AFTER_MTS_GAPS","SQL_BEFORE_GTIDS","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CALC_FOUND_ROWS","SQL_NO_CACHE","SQL_SMALL_RESULT","SQL_THREAD","SQL_TSI_DAY","SQL_TSI_HOUR","SQL_TSI_MINUTE","SQL_TSI_MONTH","SQL_TSI_QUARTER","SQL_TSI_SECOND","SQL_TSI_WEEK","SQL_TSI_YEAR","SRID","SSL","STACKED","START","STARTING","STARTS","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STATUS","STOP","STORAGE","STORED","STRAIGHT_JOIN","STREAM","STRING","SUBCLASS_ORIGIN","SUBJECT","SUBPARTITION","SUBPARTITIONS","SUPER","SUSPEND","SWAPS","SWITCHES","SYSTEM","TABLE","TABLES","TABLESPACE","TABLE_CHECKSUM","TABLE_NAME","TEMPORARY","TEMPTABLE","TERMINATED","TEXT","THAN","THEN","THREAD_PRIORITY","TIES","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TINYBLOB","TINYINT","TINYTEXT","TLS","TO","TRAILING","TRANSACTION","TRIGGER","TRIGGERS","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO","UNDOFILE","UNDO_BUFFER_SIZE","UNICODE","UNINSTALL","UNION","UNIQUE","UNKNOWN","UNLOCK","UNREGISTER","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USER_RESOURCES","USE_FRM","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARIABLES","VARYING","VCPU","VIEW","VIRTUAL","VISIBLE","WAIT","WARNINGS","WEEK","WEIGHT_STRING","WHEN","WHERE","WHILE","WINDOW","WITH","WITHOUT","WORK","WRAPPER","WRITE","X509","XA","XID","XML","XOR","YEAR","YEAR_MONTH","ZEROFILL","ZONE"]}),eA=v({all:["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","ASCII","ASIN","ATAN","ATAN2","AVG","BENCHMARK","BIN","BIN_TO_UUID","BINARY","BIT_AND","BIT_COUNT","BIT_LENGTH","BIT_OR","BIT_XOR","CAN_ACCESS_COLUMN","CAN_ACCESS_DATABASE","CAN_ACCESS_TABLE","CAN_ACCESS_USER","CAN_ACCESS_VIEW","CAST","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COMPRESS","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CRC32","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DEFAULT","DEGREES","DENSE_RANK","DIV","ELT","EXP","EXPORT_SET","EXTRACT","EXTRACTVALUE","FIELD","FIND_IN_SET","FIRST_VALUE","FLOOR","FORMAT","FORMAT_BYTES","FORMAT_PICO_TIME","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOMCOLLECTION","GEOMETRYCOLLECTION","GET_DD_COLUMN_PRIVILEGES","GET_DD_CREATE_OPTIONS","GET_DD_INDEX_SUB_PART_LENGTH","GET_FORMAT","GET_LOCK","GREATEST","GROUP_CONCAT","GROUPING","GTID_SUBSET","GTID_SUBTRACT","HEX","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INSERT","INSTR","INTERNAL_AUTO_INCREMENT","INTERNAL_AVG_ROW_LENGTH","INTERNAL_CHECK_TIME","INTERNAL_CHECKSUM","INTERNAL_DATA_FREE","INTERNAL_DATA_LENGTH","INTERNAL_DD_CHAR_LENGTH","INTERNAL_GET_COMMENT_OR_ERROR","INTERNAL_GET_ENABLED_ROLE_JSON","INTERNAL_GET_HOSTNAME","INTERNAL_GET_USERNAME","INTERNAL_GET_VIEW_WARNING_OR_ERROR","INTERNAL_INDEX_COLUMN_CARDINALITY","INTERNAL_INDEX_LENGTH","INTERNAL_IS_ENABLED_ROLE","INTERNAL_IS_MANDATORY_ROLE","INTERNAL_KEYS_DISABLED","INTERNAL_MAX_DATA_LENGTH","INTERNAL_TABLE_ROWS","INTERNAL_UPDATE_TIME","INTERVAL","IS","IS_FREE_LOCK","IS_IPV4","IS_IPV4_COMPAT","IS_IPV4_MAPPED","IS_IPV6","IS NOT","IS NOT NULL","IS NULL","IS_USED_LOCK","IS_UUID","ISNULL","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_ARRAYAGG","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_OBJECT","JSON_OBJECTAGG","JSON_OVERLAPS","JSON_PRETTY","JSON_QUOTE","JSON_REMOVE","JSON_REPLACE","JSON_SCHEMA_VALID","JSON_SCHEMA_VALIDATION_REPORT","JSON_SEARCH","JSON_SET","JSON_STORAGE_FREE","JSON_STORAGE_SIZE","JSON_TABLE","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","JSON_VALUE","LAG","LAST_DAY","LAST_INSERT_ID","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LINESTRING","LN","LOAD_FILE","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","MAKE_SET","MAKEDATE","MAKETIME","MASTER_POS_WAIT","MATCH","MAX","MBRCONTAINS","MBRCOVEREDBY","MBRCOVERS","MBRDISJOINT","MBREQUALS","MBRINTERSECTS","MBROVERLAPS","MBRTOUCHES","MBRWITHIN","MD5","MEMBER OF","MICROSECOND","MID","MIN","MINUTE","MOD","MONTH","MONTHNAME","MULTILINESTRING","MULTIPOINT","MULTIPOLYGON","NAME_CONST","NOT","NOT IN","NOT LIKE","NOT REGEXP","NOW","NTH_VALUE","NTILE","NULLIF","OCT","OCTET_LENGTH","ORD","PERCENT_RANK","PERIOD_ADD","PERIOD_DIFF","PI","POINT","POLYGON","POSITION","POW","POWER","PS_CURRENT_THREAD_ID","PS_THREAD_ID","QUARTER","QUOTE","RADIANS","RAND","RANDOM_BYTES","RANK","REGEXP","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROLES_GRAPHML","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCHEMA","SEC_TO_TIME","SECOND","SESSION_USER","SHA1","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","ST_AREA","ST_ASBINARY","ST_ASGEOJSON","ST_ASTEXT","ST_BUFFER","ST_BUFFER_STRATEGY","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_CONVEXHULL","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DISTANCE_SPHERE","ST_ENDPOINT","ST_ENVELOPE","ST_EQUALS","ST_EXTERIORRING","ST_FRECHETDISTANCE","ST_GEOHASH","ST_GEOMCOLLFROMTEXT","ST_GEOMCOLLFROMWKB","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMGEOJSON","ST_GEOMFROMTEXT","ST_GEOMFROMWKB","ST_HAUSDORFFDISTANCE","ST_INTERIORRINGN","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISSIMPLE","ST_ISVALID","ST_LATFROMGEOHASH","ST_LATITUDE","ST_LENGTH","ST_LINEFROMTEXT","ST_LINEFROMWKB","ST_LINEINTERPOLATEPOINT","ST_LINEINTERPOLATEPOINTS","ST_LONGFROMGEOHASH","ST_LONGITUDE","ST_MAKEENVELOPE","ST_MLINEFROMTEXT","ST_MLINEFROMWKB","ST_MPOINTFROMTEXT","ST_MPOINTFROMWKB","ST_MPOLYFROMTEXT","ST_MPOLYFROMWKB","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINTATDISTANCE","ST_POINTFROMGEOHASH","ST_POINTFROMTEXT","ST_POINTFROMWKB","ST_POINTN","ST_POLYFROMTEXT","ST_POLYFROMWKB","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SWAPXY","ST_SYMDIFFERENCE","ST_TOUCHES","ST_TRANSFORM","ST_UNION","ST_VALIDATE","ST_WITHIN","ST_X","ST_Y","STATEMENT_DIGEST","STATEMENT_DIGEST_TEXT","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","STRCMP","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUBTIME","SUM","SYSDATE","SYSTEM_USER","TAN","TIME","TIME_FORMAT","TIME_TO_SEC","TIMEDIFF","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TO_BASE64","TO_DAYS","TO_SECONDS","TRIM","TRUNCATE","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","USER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","UUID_SHORT","UUID_TO_BIN","VALIDATE_PASSWORD_STRENGTH","VALUES","VAR_POP","VAR_SAMP","VARIANCE","VERSION","WAIT_FOR_EXECUTED_GTID_SET","WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS","WEEK","WEEKDAY","WEEKOFYEAR","WEIGHT_STRING","YEAR","YEARWEEK","BIT","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","DATETIME","TIMESTAMP","TIME","YEAR","CHAR","NATIONAL CHAR","VARCHAR","NATIONAL VARCHAR","BINARY","VARBINARY","BLOB","TEXT","ENUM"]}),ed=f(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),ef=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO]","REPLACE [LOW_PRIORITY | DELAYED] [INTO]","VALUES","SET","CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY] TABLE [IF NOT EXISTS]"]),eS=f(["UPDATE [LOW_PRIORITY] [IGNORE]","DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","{CHANGE | MODIFY} [COLUMN]","DROP [COLUMN]","RENAME [TO | AS]","RENAME COLUMN","ALTER [COLUMN]","{SET | DROP} DEFAULT","TRUNCATE [TABLE]","ALTER DATABASE","ALTER EVENT","ALTER FUNCTION","ALTER INSTANCE","ALTER LOGFILE GROUP","ALTER PROCEDURE","ALTER RESOURCE GROUP","ALTER SERVER","ALTER TABLESPACE","ALTER USER","ALTER VIEW","ANALYZE TABLE","BINLOG","CACHE INDEX","CALL","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK TABLE","CHECKSUM TABLE","CLONE","COMMIT","CREATE DATABASE","CREATE EVENT","CREATE FUNCTION","CREATE FUNCTION","CREATE INDEX","CREATE LOGFILE GROUP","CREATE PROCEDURE","CREATE RESOURCE GROUP","CREATE ROLE","CREATE SERVER","CREATE SPATIAL REFERENCE SYSTEM","CREATE TABLESPACE","CREATE TRIGGER","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP EVENT","DROP FUNCTION","DROP FUNCTION","DROP INDEX","DROP LOGFILE GROUP","DROP PROCEDURE","DROP RESOURCE GROUP","DROP ROLE","DROP SERVER","DROP SPATIAL REFERENCE SYSTEM","DROP TABLESPACE","DROP TRIGGER","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","GRANT","HANDLER","HELP","IMPORT TABLE","INSTALL COMPONENT","INSTALL PLUGIN","KILL","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW BINARY LOGS","SHOW BINLOG EVENTS","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE EVENT","SHOW CREATE FUNCTION","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE TRIGGER","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SOURCE_POS_WAIT","START GROUP_REPLICATION","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP REPLICA","STOP SLAVE","TABLE","UNINSTALL COMPONENT","UNINSTALL PLUGIN","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),ep=f(["UNION [ALL | DISTINCT]"]),eO=f(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),eI=f(["ON {UPDATE | DELETE} [SET NULL]","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),eN={tokenizerOptions:{reservedSelect:ed,reservedClauses:[...ef,...eS],reservedSetOperations:ep,reservedJoins:eO,reservedPhrases:eI,supportsXor:!0,reservedKeywords:eR,reservedFunctionNames:eA,stringTypes:['""-qq-bs',{quote:"''-qq-bs",prefixes:["N"]},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_.$]+"},{quote:'""-qq-bs',prefixes:["@"],requirePrefix:!0},{quote:"''-qq-bs",prefixes:["@"],requirePrefix:!0},{quote:"``",prefixes:["@"],requirePrefix:!0}],paramTypes:{positional:!0},lineCommentTypes:["--","#"],operators:["%",":=","&","|","^","~","<<",">>","<=>","->","->>","&&","||","!"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return R.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{onelineClauses:eS}},eC=v({all:["ABORT","ABS","ACOS","ADVISOR","ARRAY_AGG","ARRAY_AGG","ARRAY_APPEND","ARRAY_AVG","ARRAY_BINARY_SEARCH","ARRAY_CONCAT","ARRAY_CONTAINS","ARRAY_COUNT","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_FLATTEN","ARRAY_IFNULL","ARRAY_INSERT","ARRAY_INTERSECT","ARRAY_LENGTH","ARRAY_MAX","ARRAY_MIN","ARRAY_MOVE","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_PUT","ARRAY_RANGE","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_REPLACE","ARRAY_REVERSE","ARRAY_SORT","ARRAY_STAR","ARRAY_SUM","ARRAY_SYMDIFF","ARRAY_SYMDIFF1","ARRAY_SYMDIFFN","ARRAY_UNION","ASIN","ATAN","ATAN2","AVG","BASE64","BASE64_DECODE","BASE64_ENCODE","BITAND ","BITCLEAR ","BITNOT ","BITOR ","BITSET ","BITSHIFT ","BITTEST ","BITXOR ","CEIL","CLOCK_LOCAL","CLOCK_MILLIS","CLOCK_STR","CLOCK_TZ","CLOCK_UTC","COALESCE","CONCAT","CONCAT2","CONTAINS","CONTAINS_TOKEN","CONTAINS_TOKEN_LIKE","CONTAINS_TOKEN_REGEXP","COS","COUNT","COUNT","COUNTN","CUME_DIST","CURL","DATE_ADD_MILLIS","DATE_ADD_STR","DATE_DIFF_MILLIS","DATE_DIFF_STR","DATE_FORMAT_STR","DATE_PART_MILLIS","DATE_PART_STR","DATE_RANGE_MILLIS","DATE_RANGE_STR","DATE_TRUNC_MILLIS","DATE_TRUNC_STR","DECODE","DECODE_JSON","DEGREES","DENSE_RANK","DURATION_TO_STR","ENCODED_SIZE","ENCODE_JSON","EXP","FIRST_VALUE","FLOOR","GREATEST","HAS_TOKEN","IFINF","IFMISSING","IFMISSINGORNULL","IFNAN","IFNANORINF","IFNULL","INITCAP","ISARRAY","ISATOM","ISBITSET","ISBOOLEAN","ISNUMBER","ISOBJECT","ISSTRING","LAG","LAST_VALUE","LEAD","LEAST","LENGTH","LN","LOG","LOWER","LTRIM","MAX","MEAN","MEDIAN","META","MILLIS","MILLIS_TO_LOCAL","MILLIS_TO_STR","MILLIS_TO_TZ","MILLIS_TO_UTC","MILLIS_TO_ZONE_NAME","MIN","MISSINGIF","NANIF","NEGINFIF","NOW_LOCAL","NOW_MILLIS","NOW_STR","NOW_TZ","NOW_UTC","NTH_VALUE","NTILE","NULLIF","NVL","NVL2","OBJECT_ADD","OBJECT_CONCAT","OBJECT_INNER_PAIRS","OBJECT_INNER_VALUES","OBJECT_LENGTH","OBJECT_NAMES","OBJECT_PAIRS","OBJECT_PUT","OBJECT_REMOVE","OBJECT_RENAME","OBJECT_REPLACE","OBJECT_UNWRAP","OBJECT_VALUES","PAIRS","PERCENT_RANK","PI","POLY_LENGTH","POSINFIF","POSITION","POWER","RADIANS","RANDOM","RANK","RATIO_TO_REPORT","REGEXP_CONTAINS","REGEXP_LIKE","REGEXP_MATCHES","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGEX_CONTAINS","REGEX_LIKE","REGEX_MATCHES","REGEX_POSITION","REGEX_REPLACE","REGEX_SPLIT","REPEAT","REPLACE","REVERSE","ROUND","ROW_NUMBER","RTRIM","SEARCH","SEARCH_META","SEARCH_SCORE","SIGN","SIN","SPLIT","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DURATION","STR_TO_MILLIS","STR_TO_TZ","STR_TO_UTC","STR_TO_ZONE_NAME","SUBSTR","SUFFIXES","SUM","TAN","TITLE","TOARRAY","TOATOM","TOBOOLEAN","TOKENS","TOKENS","TONUMBER","TOOBJECT","TOSTRING","TRIM","TRUNC","UPPER","UUID","VARIANCE","VARIANCE_POP","VARIANCE_SAMP","VAR_POP","VAR_SAMP","WEEKDAY_MILLIS","WEEKDAY_STR","CAST"]}),eh=v({all:["ADVISE","ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","AT","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","COMMITTED","CONNECT","CONTINUE","CORRELATED","COVER","CREATE","CURRENT","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FILTER","FIRST","FLATTEN","FLUSH","FOLLOWING","FOR","FORCE","FROM","FTS","FUNCTION","GOLANG","GRANT","GROUP","GROUPS","GSI","HASH","HAVING","IF","ISOLATION","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JAVASCRIPT","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LANGUAGE","LAST","LEFT","LET","LETTING","LEVEL","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MINUS","MISSING","NAMESPACE","NEST","NL","NO","NOT","NTH_VALUE","NULL","NULLS","NUMBER","OBJECT","OFFSET","ON","OPTION","OPTIONS","OR","ORDER","OTHERS","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PRECEDING","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROBE","PROCEDURE","PUBLIC","RANGE","RAW","REALM","REDUCE","RENAME","RESPECT","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","ROW","ROWS","SATISFIES","SAVEPOINT","SCHEMA","SCOPE","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TIES","TO","TRAN","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WORK","XOR"]}),em=f(["SELECT [ALL | DISTINCT]"]),eg=f(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED THEN","UPDATE SET","INSERT","NEST","UNNEST","RETURNING"]),e_=f(["UPDATE","DELETE FROM","SET SCHEMA","ADVISE","ALTER INDEX","BEGIN TRANSACTION","BUILD INDEX","COMMIT TRANSACTION","CREATE COLLECTION","CREATE FUNCTION","CREATE INDEX","CREATE PRIMARY INDEX","CREATE SCOPE","DROP COLLECTION","DROP FUNCTION","DROP INDEX","DROP PRIMARY INDEX","DROP SCOPE","EXECUTE","EXECUTE FUNCTION","EXPLAIN","GRANT","INFER","PREPARE","REVOKE","ROLLBACK TRANSACTION","SAVEPOINT","SET TRANSACTION","UPDATE STATISTICS","UPSERT","LET","SET CURRENT SCHEMA","SHOW","USE [PRIMARY] KEYS"]),eL=f(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),ev=f(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","INNER JOIN"]),eP=f(["{ROWS | RANGE | GROUPS} BETWEEN"]),ey={tokenizerOptions:{reservedSelect:em,reservedClauses:[...eg,...e_],reservedSetOperations:eL,reservedJoins:ev,reservedPhrases:eP,supportsXor:!0,reservedKeywords:eh,reservedFunctionNames:eC,stringTypes:['""-bs',"''-bs"],identTypes:["``"],extraParens:["[]","{}"],paramTypes:{positional:!0,numbered:["$"],named:["$"]},lineCommentTypes:["#","--"],operators:["%","==",":","||"]},formatOptions:{onelineClauses:e_}},eb=v({all:["ADD","AGENT","AGGREGATE","ALL","ALTER","AND","ANY","ARRAY","ARROW","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BEGIN","BETWEEN","BFILE_BASE","BINARY","BLOB_BASE","BLOCK","BODY","BOTH","BOUND","BULK","BY","BYTE","CALL","CALLING","CASCADE","CASE","CHAR","CHAR_BASE","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLOSE","CLUSTER","CLUSTERS","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONVERT","COUNT","CRASH","CREATE","CURRENT","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE","DATE_BASE","DAY","DECIMAL","DECLARE","DEFAULT","DEFINE","DELETE","DESC","DETERMINISTIC","DISTINCT","DOUBLE","DROP","DURATION","ELEMENT","ELSE","ELSIF","EMPTY","END","ESCAPE","EXCEPT","EXCEPTION","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FINAL","FIXED","FLOAT","FOR","FORALL","FORCE","FORM","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HAVING","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSERT","INSTANTIABLE","INT","INTERFACE","INTERSECT","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMIT","LIMITED","LOCAL","LOCK","LONG","LOOP","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUS","MINUTE","MOD","MODE","MODIFY","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NCHAR","NEW","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NUMBER_BASE","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","OR","ORACLE","ORADATA","ORDER","OVERLAPS","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARTITION","PASCAL","PIPE","PIPELINED","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","RECORD","REF","REFERENCE","REM","REMAINDER","RENAME","RESOURCE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SECOND","SEGMENT","SELECT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SET","SHARE","SHORT","SIZE","SIZE_T","SOME","SPARSE","SQL","SQLCODE","SQLDATA","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUM","SYNONYM","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSAC","TRANSACTIONAL","TRUSTED","TYPE","UB1","UB2","UB4","UNDER","UNION","UNIQUE","UNSIGNED","UNTRUSTED","UPDATE","USE","USING","VALIST","VALUE","VALUES","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHEN","WHERE","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"]}),eD=v({numeric:["ABS","ACOS","ASIN","ATAN","ATAN2","BITAND","CEIL","COS","COSH","EXP","FLOOR","LN","LOG","MOD","NANVL","POWER","REMAINDER","ROUND","SIGN","SIN","SINH","SQRT","TAN","TANH","TRUNC","WIDTH_BUCKET"],character:["CHR","CONCAT","INITCAP","LOWER","LPAD","LTRIM","NLS_INITCAP","NLS_LOWER","NLSSORT","NLS_UPPER","REGEXP_REPLACE","REGEXP_SUBSTR","REPLACE","RPAD","RTRIM","SOUNDEX","SUBSTR","TRANSLATE","TREAT","TRIM","UPPER","NLS_CHARSET_DECL_LEN","NLS_CHARSET_ID","NLS_CHARSET_NAME","ASCII","INSTR","LENGTH","REGEXP_INSTR"],datetime:["ADD_MONTHS","CURRENT_DATE","CURRENT_TIMESTAMP","DBTIMEZONE","EXTRACT","FROM_TZ","LAST_DAY","LOCALTIMESTAMP","MONTHS_BETWEEN","NEW_TIME","NEXT_DAY","NUMTODSINTERVAL","NUMTOYMINTERVAL","ROUND","SESSIONTIMEZONE","SYS_EXTRACT_UTC","SYSDATE","SYSTIMESTAMP","TO_CHAR","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_DSINTERVAL","TO_YMINTERVAL","TRUNC","TZ_OFFSET"],comparison:["GREATEST","LEAST"],conversion:["ASCIISTR","BIN_TO_NUM","CAST","CHARTOROWID","COMPOSE","CONVERT","DECOMPOSE","HEXTORAW","NUMTODSINTERVAL","NUMTOYMINTERVAL","RAWTOHEX","RAWTONHEX","ROWIDTOCHAR","ROWIDTONCHAR","SCN_TO_TIMESTAMP","TIMESTAMP_TO_SCN","TO_BINARY_DOUBLE","TO_BINARY_FLOAT","TO_CHAR","TO_CLOB","TO_DATE","TO_DSINTERVAL","TO_LOB","TO_MULTI_BYTE","TO_NCHAR","TO_NCLOB","TO_NUMBER","TO_DSINTERVAL","TO_SINGLE_BYTE","TO_TIMESTAMP","TO_TIMESTAMP_TZ","TO_YMINTERVAL","TO_YMINTERVAL","TRANSLATE","UNISTR"],largeObject:["BFILENAME","EMPTY_BLOB,","EMPTY_CLOB"],collection:["CARDINALITY","COLLECT","POWERMULTISET","POWERMULTISET_BY_CARDINALITY","SET"],hierarchical:["SYS_CONNECT_BY_PATH"],dataMining:["CLUSTER_ID","CLUSTER_PROBABILITY","CLUSTER_SET","FEATURE_ID","FEATURE_SET","FEATURE_VALUE","PREDICTION","PREDICTION_COST","PREDICTION_DETAILS","PREDICTION_PROBABILITY","PREDICTION_SET"],xml:["APPENDCHILDXML","DELETEXML","DEPTH","EXTRACT","EXISTSNODE","EXTRACTVALUE","INSERTCHILDXML","INSERTXMLBEFORE","PATH","SYS_DBURIGEN","SYS_XMLAGG","SYS_XMLGEN","UPDATEXML","XMLAGG","XMLCDATA","XMLCOLATTVAL","XMLCOMMENT","XMLCONCAT","XMLFOREST","XMLPARSE","XMLPI","XMLQUERY","XMLROOT","XMLSEQUENCE","XMLSERIALIZE","XMLTABLE","XMLTRANSFORM"],encoding:["DECODE","DUMP","ORA_HASH","VSIZE"],nullRelated:["COALESCE","LNNVL","NULLIF","NVL","NVL2"],env:["SYS_CONTEXT","SYS_GUID","SYS_TYPEID","UID","USER","USERENV"],aggregate:["AVG","COLLECT","CORR","CORR_S","CORR_K","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","FIRST","GROUP_ID","GROUPING","GROUPING_ID","LAST","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANK","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","STATS_BINOMIAL_TEST","STATS_CROSSTAB","STATS_F_TEST","STATS_KS_TEST","STATS_MODE","STATS_MW_TEST","STATS_ONE_WAY_ANOVA","STATS_T_TEST_ONE","STATS_T_TEST_PAIRED","STATS_T_TEST_INDEP","STATS_T_TEST_INDEPU","STATS_WSR_TEST","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],window:["FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTILE","RATIO_TO_REPORT","ROW_NUMBER"],objectReference:["DEREF","MAKE_REF","REF","REFTOHEX","VALUE"],model:["CV","ITERATION_NUMBER","PRESENTNNV","PRESENTV","PREVIOUS"],dataTypes:["VARCHAR2","NVARCHAR2","NUMBER","FLOAT","TIMESTAMP","INTERVAL YEAR","INTERVAL DAY","RAW","UROWID","NCHAR","CHARACTER","CHAR","CHARACTER VARYING","CHAR VARYING","NATIONAL CHARACTER","NATIONAL CHAR","NATIONAL CHARACTER VARYING","NATIONAL CHAR VARYING","NCHAR VARYING","NUMERIC","DECIMAL","FLOAT","VARCHAR"]}),eM=f(["SELECT [ALL | DISTINCT | UNIQUE]"]),eU=f(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER [SIBLINGS] BY","OFFSET","FETCH {FIRST | NEXT}","FOR UPDATE [OF]","INSERT [INTO | ALL INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [THEN]","UPDATE SET","CREATE [OR REPLACE] [NO FORCE | FORCE] [EDITIONING | EDITIONABLE | EDITIONABLE EDITIONING | NONEDITIONABLE] VIEW","CREATE MATERIALIZED VIEW","CREATE [GLOBAL TEMPORARY | PRIVATE TEMPORARY | SHARDED | DUPLICATED | IMMUTABLE BLOCKCHAIN | BLOCKCHAIN | IMMUTABLE] TABLE","RETURNING"]),ex=f(["UPDATE [ONLY]","DELETE FROM [ONLY]","DROP TABLE","ALTER TABLE","ADD","DROP {COLUMN | UNUSED COLUMNS | COLUMNS CONTINUE}","MODIFY","RENAME TO","RENAME COLUMN","TRUNCATE TABLE","SET SCHEMA","BEGIN","CONNECT BY","DECLARE","EXCEPT","EXCEPTION","LOOP","START WITH"]),eG=f(["UNION [ALL]","EXCEPT","INTERSECT"]),eF=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | OUTER} APPLY"]),eH=f(["ON {UPDATE | DELETE} [SET NULL]","ON COMMIT","{ROWS | RANGE} BETWEEN"]),eB={tokenizerOptions:{reservedSelect:eM,reservedClauses:[...eU,...ex],reservedSetOperations:eG,reservedJoins:eF,reservedPhrases:eH,supportsXor:!0,reservedKeywords:eb,reservedFunctionNames:eD,stringTypes:[{quote:"''-qq",prefixes:["N"]},{quote:"q''",prefixes:["N"]}],identTypes:['""-qq'],identChars:{rest:"$#"},variableTypes:[{regex:"&{1,2}[A-Za-z][A-Za-z0-9_$#]*"}],paramTypes:{numbered:[":"],named:[":"]},paramChars:{},operators:["**",":=","%","~=","^=",">>","<<","=>","@","||"],postProcess:function(e){let t=u;return e.map(e=>R.SET(e)&&R.BY(t)?{...e,type:r.RESERVED_KEYWORD}:(A(e.type)&&(t=e),e))}},formatOptions:{alwaysDenseOperators:["@"],onelineClauses:ex}},ew=v({math:["ABS","ACOS","ACOSD","ACOSH","ASIN","ASIND","ASINH","ATAN","ATAN2","ATAN2D","ATAND","ATANH","CBRT","CEIL","CEILING","COS","COSD","COSH","COT","COTD","DEGREES","DIV","EXP","FACTORIAL","FLOOR","GCD","LCM","LN","LOG","LOG10","MIN_SCALE","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SCALE","SETSEED","SIGN","SIN","SIND","SINH","SQRT","TAN","TAND","TANH","TRIM_SCALE","TRUNC","WIDTH_BUCKET"],string:["ABS","ASCII","BIT_LENGTH","BTRIM","CHARACTER_LENGTH","CHAR_LENGTH","CHR","CONCAT","CONCAT_WS","FORMAT","INITCAP","LEFT","LENGTH","LOWER","LPAD","LTRIM","MD5","NORMALIZE","OCTET_LENGTH","OVERLAY","PARSE_IDENT","PG_CLIENT_ENCODING","POSITION","QUOTE_IDENT","QUOTE_LITERAL","QUOTE_NULLABLE","REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE","REPEAT","REPLACE","REVERSE","RIGHT","RPAD","RTRIM","SPLIT_PART","SPRINTF","STARTS_WITH","STRING_AGG","STRING_TO_ARRAY","STRING_TO_TABLE","STRPOS","SUBSTR","SUBSTRING","TO_ASCII","TO_HEX","TRANSLATE","TRIM","UNISTR","UPPER"],binary:["BIT_COUNT","BIT_LENGTH","BTRIM","CONVERT","CONVERT_FROM","CONVERT_TO","DECODE","ENCODE","GET_BIT","GET_BYTE","LENGTH","LTRIM","MD5","OCTET_LENGTH","OVERLAY","POSITION","RTRIM","SET_BIT","SET_BYTE","SHA224","SHA256","SHA384","SHA512","STRING_AGG","SUBSTR","SUBSTRING","TRIM"],bitstring:["BIT_COUNT","BIT_LENGTH","GET_BIT","LENGTH","OCTET_LENGTH","OVERLAY","POSITION","SET_BIT","SUBSTRING"],pattern:["REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE"],datatype:["TO_CHAR","TO_DATE","TO_NUMBER","TO_TIMESTAMP"],datetime:["CLOCK_TIMESTAMP","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_BIN","DATE_PART","DATE_TRUNC","EXTRACT","ISFINITE","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL","LOCALTIME","LOCALTIMESTAMP","MAKE_DATE","MAKE_INTERVAL","MAKE_TIME","MAKE_TIMESTAMP","MAKE_TIMESTAMPTZ","NOW","PG_SLEEP","PG_SLEEP_FOR","PG_SLEEP_UNTIL","STATEMENT_TIMESTAMP","TIMEOFDAY","TO_TIMESTAMP","TRANSACTION_TIMESTAMP"],enum:["ENUM_FIRST","ENUM_LAST","ENUM_RANGE"],geometry:["AREA","BOUND_BOX","BOX","CENTER","CIRCLE","DIAGONAL","DIAMETER","HEIGHT","ISCLOSED","ISOPEN","LENGTH","LINE","LSEG","NPOINTS","PATH","PCLOSE","POINT","POLYGON","POPEN","RADIUS","SLOPE","WIDTH"],network:["ABBREV","BROADCAST","FAMILY","HOST","HOSTMASK","INET_MERGE","INET_SAME_FAMILY","MACADDR8_SET7BIT","MASKLEN","NETMASK","NETWORK","SET_MASKLEN","TEXT","TRUNC"],textsearch:["ARRAY_TO_TSVECTOR","GET_CURRENT_TS_CONFIG","JSONB_TO_TSVECTOR","JSON_TO_TSVECTOR","LENGTH","NUMNODE","PHRASETO_TSQUERY","PLAINTO_TSQUERY","QUERYTREE","SETWEIGHT","STRIP","TO_TSQUERY","TO_TSVECTOR","TSQUERY_PHRASE","TSVECTOR_TO_ARRAY","TS_DEBUG","TS_DELETE","TS_FILTER","TS_HEADLINE","TS_LEXIZE","TS_PARSE","TS_RANK","TS_RANK_CD","TS_REWRITE","TS_STAT","TS_TOKEN_TYPE","WEBSEARCH_TO_TSQUERY"],uuid:["UUID"],xml:["CURSOR_TO_XML","CURSOR_TO_XMLSCHEMA","DATABASE_TO_XML","DATABASE_TO_XMLSCHEMA","DATABASE_TO_XML_AND_XMLSCHEMA","NEXTVAL","QUERY_TO_XML","QUERY_TO_XMLSCHEMA","QUERY_TO_XML_AND_XMLSCHEMA","SCHEMA_TO_XML","SCHEMA_TO_XMLSCHEMA","SCHEMA_TO_XML_AND_XMLSCHEMA","STRING","TABLE_TO_XML","TABLE_TO_XMLSCHEMA","TABLE_TO_XML_AND_XMLSCHEMA","XMLAGG","XMLCOMMENT","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","XML_IS_WELL_FORMED","XML_IS_WELL_FORMED_CONTENT","XML_IS_WELL_FORMED_DOCUMENT","XPATH","XPATH_EXISTS"],json:["ARRAY_TO_JSON","JSONB_AGG","JSONB_ARRAY_ELEMENTS","JSONB_ARRAY_ELEMENTS_TEXT","JSONB_ARRAY_LENGTH","JSONB_BUILD_ARRAY","JSONB_BUILD_OBJECT","JSONB_EACH","JSONB_EACH_TEXT","JSONB_EXTRACT_PATH","JSONB_EXTRACT_PATH_TEXT","JSONB_INSERT","JSONB_OBJECT","JSONB_OBJECT_AGG","JSONB_OBJECT_KEYS","JSONB_PATH_EXISTS","JSONB_PATH_EXISTS_TZ","JSONB_PATH_MATCH","JSONB_PATH_MATCH_TZ","JSONB_PATH_QUERY","JSONB_PATH_QUERY_ARRAY","JSONB_PATH_QUERY_ARRAY_TZ","JSONB_PATH_QUERY_FIRST","JSONB_PATH_QUERY_FIRST_TZ","JSONB_PATH_QUERY_TZ","JSONB_POPULATE_RECORD","JSONB_POPULATE_RECORDSET","JSONB_PRETTY","JSONB_SET","JSONB_SET_LAX","JSONB_STRIP_NULLS","JSONB_TO_RECORD","JSONB_TO_RECORDSET","JSONB_TYPEOF","JSON_AGG","JSON_ARRAY_ELEMENTS","JSON_ARRAY_ELEMENTS_TEXT","JSON_ARRAY_LENGTH","JSON_BUILD_ARRAY","JSON_BUILD_OBJECT","JSON_EACH","JSON_EACH_TEXT","JSON_EXTRACT_PATH","JSON_EXTRACT_PATH_TEXT","JSON_OBJECT","JSON_OBJECT_AGG","JSON_OBJECT_KEYS","JSON_POPULATE_RECORD","JSON_POPULATE_RECORDSET","JSON_STRIP_NULLS","JSON_TO_RECORD","JSON_TO_RECORDSET","JSON_TYPEOF","ROW_TO_JSON","TO_JSON","TO_JSONB","TO_TIMESTAMP"],sequence:["CURRVAL","LASTVAL","NEXTVAL","SETVAL"],conditional:["COALESCE","GREATEST","LEAST","NULLIF"],array:["ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_DIMS","ARRAY_FILL","ARRAY_LENGTH","ARRAY_LOWER","ARRAY_NDIMS","ARRAY_POSITION","ARRAY_POSITIONS","ARRAY_PREPEND","ARRAY_REMOVE","ARRAY_REPLACE","ARRAY_TO_STRING","ARRAY_UPPER","CARDINALITY","STRING_TO_ARRAY","TRIM_ARRAY","UNNEST"],range:["ISEMPTY","LOWER","LOWER_INC","LOWER_INF","MULTIRANGE","RANGE_MERGE","UPPER","UPPER_INC","UPPER_INF"],aggregate:["ARRAY_AGG","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COALESCE","CORR","COUNT","COVAR_POP","COVAR_SAMP","CUME_DIST","DENSE_RANK","EVERY","GROUPING","JSONB_AGG","JSONB_OBJECT_AGG","JSON_AGG","JSON_OBJECT_AGG","MAX","MIN","MODE","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","RANGE_AGG","RANGE_INTERSECT_AGG","RANK","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","STDDEV","STDDEV_POP","STDDEV_SAMP","STRING_AGG","SUM","TO_JSON","TO_JSONB","VARIANCE","VAR_POP","VAR_SAMP","XMLAGG"],window:["CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER"],set:["GENERATE_SERIES","GENERATE_SUBSCRIPTS"],sysInfo:["ACLDEFAULT","ACLEXPLODE","COL_DESCRIPTION","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_QUERY","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","FORMAT_TYPE","HAS_ANY_COLUMN_PRIVILEGE","HAS_COLUMN_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_FOREIGN_DATA_WRAPPER_PRIVILEGE","HAS_FUNCTION_PRIVILEGE","HAS_LANGUAGE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_SEQUENCE_PRIVILEGE","HAS_SERVER_PRIVILEGE","HAS_TABLESPACE_PRIVILEGE","HAS_TABLE_PRIVILEGE","HAS_TYPE_PRIVILEGE","INET_CLIENT_ADDR","INET_CLIENT_PORT","INET_SERVER_ADDR","INET_SERVER_PORT","MAKEACLITEM","OBJ_DESCRIPTION","PG_BACKEND_PID","PG_BLOCKING_PIDS","PG_COLLATION_IS_VISIBLE","PG_CONF_LOAD_TIME","PG_CONTROL_CHECKPOINT","PG_CONTROL_INIT","PG_CONTROL_SYSTEM","PG_CONVERSION_IS_VISIBLE","PG_CURRENT_LOGFILE","PG_CURRENT_SNAPSHOT","PG_CURRENT_XACT_ID","PG_CURRENT_XACT_ID_IF_ASSIGNED","PG_DESCRIBE_OBJECT","PG_FUNCTION_IS_VISIBLE","PG_GET_CATALOG_FOREIGN_KEYS","PG_GET_CONSTRAINTDEF","PG_GET_EXPR","PG_GET_FUNCTIONDEF","PG_GET_FUNCTION_ARGUMENTS","PG_GET_FUNCTION_IDENTITY_ARGUMENTS","PG_GET_FUNCTION_RESULT","PG_GET_INDEXDEF","PG_GET_KEYWORDS","PG_GET_OBJECT_ADDRESS","PG_GET_OWNED_SEQUENCE","PG_GET_RULEDEF","PG_GET_SERIAL_SEQUENCE","PG_GET_STATISTICSOBJDEF","PG_GET_TRIGGERDEF","PG_GET_USERBYID","PG_GET_VIEWDEF","PG_HAS_ROLE","PG_IDENTIFY_OBJECT","PG_IDENTIFY_OBJECT_AS_ADDRESS","PG_INDEXAM_HAS_PROPERTY","PG_INDEX_COLUMN_HAS_PROPERTY","PG_INDEX_HAS_PROPERTY","PG_IS_OTHER_TEMP_SCHEMA","PG_JIT_AVAILABLE","PG_LAST_COMMITTED_XACT","PG_LISTENING_CHANNELS","PG_MY_TEMP_SCHEMA","PG_NOTIFICATION_QUEUE_USAGE","PG_OPCLASS_IS_VISIBLE","PG_OPERATOR_IS_VISIBLE","PG_OPFAMILY_IS_VISIBLE","PG_OPTIONS_TO_TABLE","PG_POSTMASTER_START_TIME","PG_SAFE_SNAPSHOT_BLOCKING_PIDS","PG_SNAPSHOT_XIP","PG_SNAPSHOT_XMAX","PG_SNAPSHOT_XMIN","PG_STATISTICS_OBJ_IS_VISIBLE","PG_TABLESPACE_DATABASES","PG_TABLESPACE_LOCATION","PG_TABLE_IS_VISIBLE","PG_TRIGGER_DEPTH","PG_TS_CONFIG_IS_VISIBLE","PG_TS_DICT_IS_VISIBLE","PG_TS_PARSER_IS_VISIBLE","PG_TS_TEMPLATE_IS_VISIBLE","PG_TYPEOF","PG_TYPE_IS_VISIBLE","PG_VISIBLE_IN_SNAPSHOT","PG_XACT_COMMIT_TIMESTAMP","PG_XACT_COMMIT_TIMESTAMP_ORIGIN","PG_XACT_STATUS","PQSERVERVERSION","ROW_SECURITY_ACTIVE","SESSION_USER","SHOBJ_DESCRIPTION","TO_REGCLASS","TO_REGCOLLATION","TO_REGNAMESPACE","TO_REGOPER","TO_REGOPERATOR","TO_REGPROC","TO_REGPROCEDURE","TO_REGROLE","TO_REGTYPE","TXID_CURRENT","TXID_CURRENT_IF_ASSIGNED","TXID_CURRENT_SNAPSHOT","TXID_SNAPSHOT_XIP","TXID_SNAPSHOT_XMAX","TXID_SNAPSHOT_XMIN","TXID_STATUS","TXID_VISIBLE_IN_SNAPSHOT","USER","VERSION"],sysAdmin:["BRIN_DESUMMARIZE_RANGE","BRIN_SUMMARIZE_NEW_VALUES","BRIN_SUMMARIZE_RANGE","CONVERT_FROM","CURRENT_SETTING","GIN_CLEAN_PENDING_LIST","PG_ADVISORY_LOCK","PG_ADVISORY_LOCK_SHARED","PG_ADVISORY_UNLOCK","PG_ADVISORY_UNLOCK_ALL","PG_ADVISORY_UNLOCK_SHARED","PG_ADVISORY_XACT_LOCK","PG_ADVISORY_XACT_LOCK_SHARED","PG_BACKUP_START_TIME","PG_CANCEL_BACKEND","PG_COLLATION_ACTUAL_VERSION","PG_COLUMN_COMPRESSION","PG_COLUMN_SIZE","PG_COPY_LOGICAL_REPLICATION_SLOT","PG_COPY_PHYSICAL_REPLICATION_SLOT","PG_CREATE_LOGICAL_REPLICATION_SLOT","PG_CREATE_PHYSICAL_REPLICATION_SLOT","PG_CREATE_RESTORE_POINT","PG_CURRENT_WAL_FLUSH_LSN","PG_CURRENT_WAL_INSERT_LSN","PG_CURRENT_WAL_LSN","PG_DATABASE_SIZE","PG_DROP_REPLICATION_SLOT","PG_EXPORT_SNAPSHOT","PG_FILENODE_RELATION","PG_GET_WAL_REPLAY_PAUSE_STATE","PG_IMPORT_SYSTEM_COLLATIONS","PG_INDEXES_SIZE","PG_IS_IN_BACKUP","PG_IS_IN_RECOVERY","PG_IS_WAL_REPLAY_PAUSED","PG_LAST_WAL_RECEIVE_LSN","PG_LAST_WAL_REPLAY_LSN","PG_LAST_XACT_REPLAY_TIMESTAMP","PG_LOGICAL_EMIT_MESSAGE","PG_LOGICAL_SLOT_GET_BINARY_CHANGES","PG_LOGICAL_SLOT_GET_CHANGES","PG_LOGICAL_SLOT_PEEK_BINARY_CHANGES","PG_LOGICAL_SLOT_PEEK_CHANGES","PG_LOG_BACKEND_MEMORY_CONTEXTS","PG_LS_ARCHIVE_STATUSDIR","PG_LS_DIR","PG_LS_LOGDIR","PG_LS_TMPDIR","PG_LS_WALDIR","PG_PARTITION_ANCESTORS","PG_PARTITION_ROOT","PG_PARTITION_TREE","PG_PROMOTE","PG_READ_BINARY_FILE","PG_READ_FILE","PG_RELATION_FILENODE","PG_RELATION_FILEPATH","PG_RELATION_SIZE","PG_RELOAD_CONF","PG_REPLICATION_ORIGIN_ADVANCE","PG_REPLICATION_ORIGIN_CREATE","PG_REPLICATION_ORIGIN_DROP","PG_REPLICATION_ORIGIN_OID","PG_REPLICATION_ORIGIN_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_IS_SETUP","PG_REPLICATION_ORIGIN_SESSION_PROGRESS","PG_REPLICATION_ORIGIN_SESSION_RESET","PG_REPLICATION_ORIGIN_SESSION_SETUP","PG_REPLICATION_ORIGIN_XACT_RESET","PG_REPLICATION_ORIGIN_XACT_SETUP","PG_REPLICATION_SLOT_ADVANCE","PG_ROTATE_LOGFILE","PG_SIZE_BYTES","PG_SIZE_PRETTY","PG_START_BACKUP","PG_STAT_FILE","PG_STOP_BACKUP","PG_SWITCH_WAL","PG_TABLESPACE_SIZE","PG_TABLE_SIZE","PG_TERMINATE_BACKEND","PG_TOTAL_RELATION_SIZE","PG_TRY_ADVISORY_LOCK","PG_TRY_ADVISORY_LOCK_SHARED","PG_TRY_ADVISORY_XACT_LOCK","PG_TRY_ADVISORY_XACT_LOCK_SHARED","PG_WALFILE_NAME","PG_WALFILE_NAME_OFFSET","PG_WAL_LSN_DIFF","PG_WAL_REPLAY_PAUSE","PG_WAL_REPLAY_RESUME","SET_CONFIG"],trigger:["SUPPRESS_REDUNDANT_UPDATES_TRIGGER","TSVECTOR_UPDATE_TRIGGER","TSVECTOR_UPDATE_TRIGGER_COLUMN"],eventTrigger:["PG_EVENT_TRIGGER_DDL_COMMANDS","PG_EVENT_TRIGGER_DROPPED_OBJECTS","PG_EVENT_TRIGGER_TABLE_REWRITE_OID","PG_EVENT_TRIGGER_TABLE_REWRITE_REASON","PG_GET_OBJECT_ADDRESS"],stats:["PG_MCV_LIST_ITEMS"],cast:["CAST"],dataTypes:["BIT","BIT VARYING","CHARACTER","CHARACTER VARYING","VARCHAR","CHAR","DECIMAL","NUMERIC","TIME","TIMESTAMP","ENUM"]}),e$=v({all:["ABORT","ABSOLUTE","ACCESS","ACTION","ADD","ADMIN","AFTER","AGGREGATE","ALL","ALSO","ALTER","ALWAYS","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASENSITIVE","ASSERTION","ASSIGNMENT","ASYMMETRIC","AT","ATOMIC","ATTACH","ATTRIBUTE","AUTHORIZATION","BACKWARD","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BIT","BOOLEAN","BOTH","BREADTH","BY","CACHE","CALL","CALLED","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAIN","CHAR","CHARACTER","CHARACTERISTICS","CHECK","CHECKPOINT","CLASS","CLOSE","CLUSTER","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMENTS","COMMIT","COMMITTED","COMPRESSION","CONCURRENTLY","CONFIGURATION","CONFLICT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTENT","CONTINUE","CONVERSION","COPY","COST","CREATE","CROSS","CSV","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINER","DELETE","DELIMITER","DELIMITERS","DEPENDS","DEPTH","DESC","DETACH","DICTIONARY","DISABLE","DISCARD","DISTINCT","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","EACH","ELSE","ENABLE","ENCODING","ENCRYPTED","END","ENUM","ESCAPE","EVENT","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXPLAIN","EXPRESSION","EXTENSION","EXTERNAL","EXTRACT","FALSE","FAMILY","FETCH","FILTER","FINALIZE","FIRST","FLOAT","FOLLOWING","FOR","FORCE","FOREIGN","FORWARD","FREEZE","FROM","FULL","FUNCTION","FUNCTIONS","GENERATED","GLOBAL","GRANT","GRANTED","GREATEST","GROUP","GROUPING","GROUPS","HANDLER","HAVING","HEADER","HOLD","HOUR","IDENTITY","IF","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDE","INCLUDING","INCREMENT","INDEX","INDEXES","INHERIT","INHERITS","INITIALLY","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","INVOKER","IS","ISNULL","ISOLATION","JOIN","KEY","LABEL","LANGUAGE","LARGE","LAST","LATERAL","LEADING","LEAKPROOF","LEAST","LEFT","LEVEL","LIKE","LIMIT","LISTEN","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LOCKED","LOGGED","MAPPING","MATCH","MATERIALIZED","MAXVALUE","METHOD","MINUTE","MINVALUE","MODE","MONTH","MOVE","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NEW","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NORMALIZE","NORMALIZED","NOT","NOTHING","NOTIFY","NOTNULL","NOWAIT","NULL","NULLIF","NULLS","NUMERIC","OBJECT","OF","OFF","OFFSET","OIDS","OLD","ON","ONLY","OPERATOR","OPTION","OPTIONS","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","OWNED","OWNER","PARALLEL","PARSER","PARTIAL","PARTITION","PASSING","PASSWORD","PLACING","PLANS","POLICY","POSITION","PRECEDING","PRECISION","PREPARE","PREPARED","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROGRAM","PUBLICATION","QUOTE","RANGE","READ","REAL","REASSIGN","RECHECK","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REINDEX","RELATIVE","RELEASE","RENAME","REPEATABLE","REPLACE","REPLICA","RESET","RESTART","RESTRICT","RETURN","RETURNING","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROUTINES","ROW","ROWS","RULE","SAVEPOINT","SCHEMA","SCHEMAS","SCROLL","SEARCH","SECOND","SECURITY","SELECT","SEQUENCE","SEQUENCES","SERIALIZABLE","SERVER","SESSION","SESSION_USER","SET","SETOF","SETS","SHARE","SHOW","SIMILAR","SIMPLE","SKIP","SMALLINT","SNAPSHOT","SOME","SQL","STABLE","STANDALONE","START","STATEMENT","STATISTICS","STDIN","STDOUT","STORAGE","STORED","STRICT","STRIP","SUBSCRIPTION","SUBSTRING","SUPPORT","SYMMETRIC","SYSID","SYSTEM","TABLE","TABLES","TABLESAMPLE","TABLESPACE","TEMP","TEMPLATE","TEMPORARY","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRANSFORM","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TRUSTED","TYPE","TYPES","UESCAPE","UNBOUNDED","UNCOMMITTED","UNENCRYPTED","UNION","UNIQUE","UNKNOWN","UNLISTEN","UNLOGGED","UNTIL","UPDATE","USER","USING","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARCHAR","VARIADIC","VARYING","VERBOSE","VERSION","VIEW","VIEWS","VOLATILE","WHEN","WHERE","WHITESPACE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","XML","XMLATTRIBUTES","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","YEAR","YES","ZONE"]}),eY=f(["SELECT [ALL | DISTINCT]"]),eV=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","FOR {UPDATE | NO KEY UPDATE | SHARE | KEY SHARE} [OF]","INSERT INTO","VALUES","SET","CREATE [OR REPLACE] [TEMP | TEMPORARY] [RECURSIVE] VIEW","CREATE MATERIALIZED VIEW [IF NOT EXISTS]","CREATE [GLOBAL | LOCAL] [TEMPORARY | TEMP | UNLOGGED] TABLE [IF NOT EXISTS]","RETURNING"]),ek=f(["UPDATE [ONLY]","WHERE CURRENT OF","ON CONFLICT","DELETE FROM [ONLY]","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS] [ONLY]","ALTER TABLE ALL IN TABLESPACE","RENAME [COLUMN]","RENAME TO","ADD [COLUMN] [IF NOT EXISTS]","DROP [COLUMN] [IF EXISTS]","ALTER [COLUMN]","[SET DATA] TYPE","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","TRUNCATE [TABLE] [ONLY]","SET SCHEMA","AFTER","ABORT","ALTER AGGREGATE","ALTER COLLATION","ALTER CONVERSION","ALTER DATABASE","ALTER DEFAULT PRIVILEGES","ALTER DOMAIN","ALTER EVENT TRIGGER","ALTER EXTENSION","ALTER FOREIGN DATA WRAPPER","ALTER FOREIGN TABLE","ALTER FUNCTION","ALTER GROUP","ALTER INDEX","ALTER LANGUAGE","ALTER LARGE OBJECT","ALTER MATERIALIZED VIEW","ALTER OPERATOR","ALTER OPERATOR CLASS","ALTER OPERATOR FAMILY","ALTER POLICY","ALTER PROCEDURE","ALTER PUBLICATION","ALTER ROLE","ALTER ROUTINE","ALTER RULE","ALTER SCHEMA","ALTER SEQUENCE","ALTER SERVER","ALTER STATISTICS","ALTER SUBSCRIPTION","ALTER SYSTEM","ALTER TABLESPACE","ALTER TEXT SEARCH CONFIGURATION","ALTER TEXT SEARCH DICTIONARY","ALTER TEXT SEARCH PARSER","ALTER TEXT SEARCH TEMPLATE","ALTER TRIGGER","ALTER TYPE","ALTER USER","ALTER USER MAPPING","ALTER VIEW","ANALYZE","BEGIN","CALL","CHECKPOINT","CLOSE","CLUSTER","COMMENT","COMMIT","COMMIT PREPARED","COPY","CREATE ACCESS METHOD","CREATE AGGREGATE","CREATE CAST","CREATE COLLATION","CREATE CONVERSION","CREATE DATABASE","CREATE DOMAIN","CREATE EVENT TRIGGER","CREATE EXTENSION","CREATE FOREIGN DATA WRAPPER","CREATE FOREIGN TABLE","CREATE FUNCTION","CREATE GROUP","CREATE INDEX","CREATE LANGUAGE","CREATE OPERATOR","CREATE OPERATOR CLASS","CREATE OPERATOR FAMILY","CREATE POLICY","CREATE PROCEDURE","CREATE PUBLICATION","CREATE ROLE","CREATE RULE","CREATE SCHEMA","CREATE SEQUENCE","CREATE SERVER","CREATE STATISTICS","CREATE SUBSCRIPTION","CREATE TABLESPACE","CREATE TEXT SEARCH CONFIGURATION","CREATE TEXT SEARCH DICTIONARY","CREATE TEXT SEARCH PARSER","CREATE TEXT SEARCH TEMPLATE","CREATE TRANSFORM","CREATE TRIGGER","CREATE TYPE","CREATE USER","CREATE USER MAPPING","DEALLOCATE","DECLARE","DISCARD","DROP ACCESS METHOD","DROP AGGREGATE","DROP CAST","DROP COLLATION","DROP CONVERSION","DROP DATABASE","DROP DOMAIN","DROP EVENT TRIGGER","DROP EXTENSION","DROP FOREIGN DATA WRAPPER","DROP FOREIGN TABLE","DROP FUNCTION","DROP GROUP","DROP INDEX","DROP LANGUAGE","DROP MATERIALIZED VIEW","DROP OPERATOR","DROP OPERATOR CLASS","DROP OPERATOR FAMILY","DROP OWNED","DROP POLICY","DROP PROCEDURE","DROP PUBLICATION","DROP ROLE","DROP ROUTINE","DROP RULE","DROP SCHEMA","DROP SEQUENCE","DROP SERVER","DROP STATISTICS","DROP SUBSCRIPTION","DROP TABLESPACE","DROP TEXT SEARCH CONFIGURATION","DROP TEXT SEARCH DICTIONARY","DROP TEXT SEARCH PARSER","DROP TEXT SEARCH TEMPLATE","DROP TRANSFORM","DROP TRIGGER","DROP TYPE","DROP USER","DROP USER MAPPING","DROP VIEW","EXECUTE","EXPLAIN","FETCH","GRANT","IMPORT FOREIGN SCHEMA","LISTEN","LOAD","LOCK","MOVE","NOTIFY","PREPARE","PREPARE TRANSACTION","REASSIGN OWNED","REFRESH MATERIALIZED VIEW","REINDEX","RELEASE SAVEPOINT","RESET","REVOKE","ROLLBACK","ROLLBACK PREPARED","ROLLBACK TO SAVEPOINT","SAVEPOINT","SECURITY LABEL","SELECT INTO","SET CONSTRAINTS","SET ROLE","SET SESSION AUTHORIZATION","SET TRANSACTION","SHOW","START TRANSACTION","UNLISTEN","VACUUM"]),eW=f(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),eZ=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),ej=f(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN","{TIMESTAMP | TIME} {WITH | WITHOUT} TIME ZONE","IS [NOT] DISTINCT FROM"]),eX={tokenizerOptions:{reservedSelect:eY,reservedClauses:[...eV,...ek],reservedSetOperations:eW,reservedJoins:eZ,reservedPhrases:ej,reservedKeywords:e$,reservedFunctionNames:ew,nestedBlockComments:!0,extraParens:["[]"],stringTypes:["$$",{quote:"''-qq",prefixes:["U&"]},{quote:"''-bs",prefixes:["E"],requirePrefix:!0},{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:[{quote:'""-qq',prefixes:["U&"]}],identChars:{rest:"$"},paramTypes:{numbered:["$"]},operators:["%","^","|/","||/","@",":=","&","|","#","~","<<",">>","~>~","~<~","~>=~","~<=~","@-@","@@","##","<->","&&","&<","&>","<<|","&<|","|>>","|&>","<^","^>","?#","?-","?|","?-|","?||","@>","<@","~=","?","@?","?&","->","->>","#>","#>>","#-","=>",">>=","<<=","~~","~~*","!~~","!~~*","~","~*","!~","!~*","-|-","||","@@@","!!","<%","%>","<<%","%>>","<<->","<->>","<<<->","<->>>","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:ek}},eK=v({aggregate:["ANY_VALUE","APPROXIMATE PERCENTILE_DISC","AVG","COUNT","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP"],array:["array","array_concat","array_flatten","get_array_length","split_to_array","subarray"],bitwise:["BIT_AND","BIT_OR","BOOL_AND","BOOL_OR"],conditional:["COALESCE","DECODE","GREATEST","LEAST","NVL","NVL2","NULLIF"],dateTime:["ADD_MONTHS","AT TIME ZONE","CONVERT_TIMEZONE","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATE_CMP","DATE_CMP_TIMESTAMP","DATE_CMP_TIMESTAMPTZ","DATE_PART_YEAR","DATEADD","DATEDIFF","DATE_PART","DATE_TRUNC","EXTRACT","GETDATE","INTERVAL_CMP","LAST_DAY","MONTHS_BETWEEN","NEXT_DAY","SYSDATE","TIMEOFDAY","TIMESTAMP_CMP","TIMESTAMP_CMP_DATE","TIMESTAMP_CMP_TIMESTAMPTZ","TIMESTAMPTZ_CMP","TIMESTAMPTZ_CMP_DATE","TIMESTAMPTZ_CMP_TIMESTAMP","TIMEZONE","TO_TIMESTAMP","TRUNC"],spatial:["AddBBox","DropBBox","GeometryType","ST_AddPoint","ST_Angle","ST_Area","ST_AsBinary","ST_AsEWKB","ST_AsEWKT","ST_AsGeoJSON","ST_AsText","ST_Azimuth","ST_Boundary","ST_Collect","ST_Contains","ST_ContainsProperly","ST_ConvexHull","ST_CoveredBy","ST_Covers","ST_Crosses","ST_Dimension","ST_Disjoint","ST_Distance","ST_DistanceSphere","ST_DWithin","ST_EndPoint","ST_Envelope","ST_Equals","ST_ExteriorRing","ST_Force2D","ST_Force3D","ST_Force3DM","ST_Force3DZ","ST_Force4D","ST_GeometryN","ST_GeometryType","ST_GeomFromEWKB","ST_GeomFromEWKT","ST_GeomFromText","ST_GeomFromWKB","ST_InteriorRingN","ST_Intersects","ST_IsPolygonCCW","ST_IsPolygonCW","ST_IsClosed","ST_IsCollection","ST_IsEmpty","ST_IsSimple","ST_IsValid","ST_Length","ST_LengthSphere","ST_Length2D","ST_LineFromMultiPoint","ST_LineInterpolatePoint","ST_M","ST_MakeEnvelope","ST_MakeLine","ST_MakePoint","ST_MakePolygon","ST_MemSize","ST_MMax","ST_MMin","ST_Multi","ST_NDims","ST_NPoints","ST_NRings","ST_NumGeometries","ST_NumInteriorRings","ST_NumPoints","ST_Perimeter","ST_Perimeter2D","ST_Point","ST_PointN","ST_Points","ST_Polygon","ST_RemovePoint","ST_Reverse","ST_SetPoint","ST_SetSRID","ST_Simplify","ST_SRID","ST_StartPoint","ST_Touches","ST_Within","ST_X","ST_XMax","ST_XMin","ST_Y","ST_YMax","ST_YMin","ST_Z","ST_ZMax","ST_ZMin","SupportsBBox"],hash:["CHECKSUM","FUNC_SHA1","FNV_HASH","MD5","SHA","SHA1","SHA2"],hyperLogLog:["HLL","HLL_CREATE_SKETCH","HLL_CARDINALITY","HLL_COMBINE"],json:["IS_VALID_JSON","IS_VALID_JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_EXTRACT_ARRAY_ELEMENT_TEXT","JSON_EXTRACT_PATH_TEXT","JSON_PARSE","JSON_SERIALIZE"],math:["ABS","ACOS","ASIN","ATAN","ATAN2","CBRT","CEILING","CEIL","COS","COT","DEGREES","DEXP","DLOG1","DLOG10","EXP","FLOOR","LN","LOG","MOD","PI","POWER","RADIANS","RANDOM","ROUND","SIN","SIGN","SQRT","TAN","TO_HEX","TRUNC"],machineLearning:["EXPLAIN_MODEL"],string:["ASCII","BPCHARCMP","BTRIM","BTTEXT_PATTERN_CMP","CHAR_LENGTH","CHARACTER_LENGTH","CHARINDEX","CHR","COLLATE","CONCAT","CRC32","DIFFERENCE","INITCAP","LEFT","RIGHT","LEN","LENGTH","LOWER","LPAD","RPAD","LTRIM","OCTETINDEX","OCTET_LENGTH","POSITION","QUOTE_IDENT","QUOTE_LITERAL","REGEXP_COUNT","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","REPLICATE","REVERSE","RTRIM","SOUNDEX","SPLIT_PART","STRPOS","STRTOL","SUBSTRING","TEXTLEN","TRANSLATE","TRIM","UPPER"],superType:["decimal_precision","decimal_scale","is_array","is_bigint","is_boolean","is_char","is_decimal","is_float","is_integer","is_object","is_scalar","is_smallint","is_varchar","json_typeof"],window:["AVG","COUNT","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAST_VALUE","LAG","LEAD","LISTAGG","MAX","MEDIAN","MIN","NTH_VALUE","NTILE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","RANK","RATIO_TO_REPORT","ROW_NUMBER","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP"],dataType:["CAST","CONVERT","TO_CHAR","TO_DATE","TO_NUMBER","TEXT_TO_INT_ALT","TEXT_TO_NUMERIC_ALT"],sysAdmin:["CHANGE_QUERY_PRIORITY","CHANGE_SESSION_PRIORITY","CHANGE_USER_PRIORITY","CURRENT_SETTING","PG_CANCEL_BACKEND","PG_TERMINATE_BACKEND","REBOOT_CLUSTER","SET_CONFIG"],sysInfo:["CURRENT_AWS_ACCOUNT","CURRENT_DATABASE","CURRENT_NAMESPACE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_USER","CURRENT_USER_ID","HAS_ASSUMEROLE_PRIVILEGE","HAS_DATABASE_PRIVILEGE","HAS_SCHEMA_PRIVILEGE","HAS_TABLE_PRIVILEGE","PG_BACKEND_PID","PG_GET_COLS","PG_GET_GRANTEE_BY_IAM_ROLE","PG_GET_IAM_ROLE_BY_USER","PG_GET_LATE_BINDING_VIEW_COLS","PG_LAST_COPY_COUNT","PG_LAST_COPY_ID","PG_LAST_UNLOAD_ID","PG_LAST_QUERY_ID","PG_LAST_UNLOAD_COUNT","SESSION_USER","SLICE_NUM","USER","VERSION"],dataTypes:["DECIMAL","NUMERIC","CHAR","CHARACTER","VARCHAR","CHARACTER VARYING","NCHAR","NVARCHAR","VARBYTE"]}),ez=v({standard:["AES128","AES256","ALL","ALLOWOVERWRITE","ANY","ARRAY","AS","ASC","AUTHORIZATION","BACKUP","BETWEEN","BINARY","BOTH","CHECK","COLUMN","CONSTRAINT","CREATE","CROSS","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DESC","DISABLE","DISTINCT","DO","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GROUP","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTO","IS","ISNULL","LANGUAGE","LEADING","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","MINUS","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RECOVER","REFERENCES","REJECTLOG","RESORT","RESPECT","RESTORE","SIMILAR","SNAPSHOT","SOME","SYSTEM","TABLE","TAG","TDES","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","UNIQUE","USING","VERBOSE","WALLET","WITHOUT"],dataConversionParams:["ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS"],dataLoadParams:["COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE"],dataFormatParams:["FORMAT","CSV","DELIMITER","FIXEDWIDTH","SHAPEFILE","AVRO","JSON","PARQUET","ORC"],copyAuthParams:["ACCESS_KEY_ID","CREDENTIALS","ENCRYPTED","IAM_ROLE","MASTER_SYMMETRIC_KEY","SECRET_ACCESS_KEY","SESSION_TOKEN"],copyCompressionParams:["BZIP2","GZIP","LZOP","ZSTD"],copyMiscParams:["MANIFEST","READRATIO","REGION","SSH"],compressionEncodings:["RAW","AZ64","BYTEDICT","DELTA","DELTA32K","LZO","MOSTLY8","MOSTLY16","MOSTLY32","RUNLENGTH","TEXT255","TEXT32K"],misc:["CATALOG_ROLE","SECRET_ARN","EXTERNAL","AUTO","EVEN","KEY","PREDICATE","COMPRESSION"],dataTypes:["BPCHAR","TEXT"]}),eJ=f(["SELECT [ALL | DISTINCT]"]),eq=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET","CREATE [OR REPLACE | MATERIALIZED] VIEW","CREATE [TEMPORARY | TEMP | LOCAL TEMPORARY | LOCAL TEMP] TABLE [IF NOT EXISTS]"]),eQ=f(["UPDATE","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ALTER TABLE APPEND","ADD [COLUMN]","DROP [COLUMN]","RENAME TO","RENAME COLUMN","ALTER COLUMN","TYPE","ENCODE","TRUNCATE [TABLE]","ABORT","ALTER DATABASE","ALTER DATASHARE","ALTER DEFAULT PRIVILEGES","ALTER GROUP","ALTER MATERIALIZED VIEW","ALTER PROCEDURE","ALTER SCHEMA","ALTER USER","ANALYSE","ANALYZE","ANALYSE COMPRESSION","ANALYZE COMPRESSION","BEGIN","CALL","CANCEL","CLOSE","COMMENT","COMMIT","COPY","CREATE DATABASE","CREATE DATASHARE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL SCHEMA","CREATE EXTERNAL TABLE","CREATE FUNCTION","CREATE GROUP","CREATE LIBRARY","CREATE MODEL","CREATE PROCEDURE","CREATE SCHEMA","CREATE USER","DEALLOCATE","DECLARE","DESC DATASHARE","DROP DATABASE","DROP DATASHARE","DROP FUNCTION","DROP GROUP","DROP LIBRARY","DROP MODEL","DROP MATERIALIZED VIEW","DROP PROCEDURE","DROP SCHEMA","DROP USER","DROP VIEW","DROP","EXECUTE","EXPLAIN","FETCH","GRANT","LOCK","PREPARE","REFRESH MATERIALIZED VIEW","RESET","REVOKE","ROLLBACK","SELECT INTO","SET SESSION AUTHORIZATION","SET SESSION CHARACTERISTICS","SHOW","SHOW EXTERNAL TABLE","SHOW MODEL","SHOW DATASHARES","SHOW PROCEDURE","SHOW TABLE","SHOW VIEW","START TRANSACTION","UNLOAD","VACUUM"]),e0=f(["UNION [ALL]","EXCEPT","INTERSECT","MINUS"]),e1=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),e2=f(["NULL AS","DATA CATALOG","HIVE METASTORE","{ROWS | RANGE} BETWEEN"]),e4={tokenizerOptions:{reservedSelect:eJ,reservedClauses:[...eq,...eQ],reservedSetOperations:e0,reservedJoins:e1,reservedPhrases:e2,reservedKeywords:ez,reservedFunctionNames:eK,stringTypes:["''-qq"],identTypes:['""-qq'],identChars:{first:"#"},paramTypes:{numbered:["$"]},operators:["^","%","@","|/","||/","&","|","~","<<",">>","||","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:eQ}},e6=v({all:["ADD","AFTER","ALL","ALTER","ANALYZE","AND","ANTI","ANY","ARCHIVE","ARRAY","AS","ASC","AT","AUTHORIZATION","BETWEEN","BOTH","BUCKET","BUCKETS","BY","CACHE","CASCADE","CAST","CHANGE","CHECK","CLEAR","CLUSTER","CLUSTERED","CODEGEN","COLLATE","COLLECTION","COLUMN","COLUMNS","COMMENT","COMMIT","COMPACT","COMPACTIONS","COMPUTE","CONCATENATE","CONSTRAINT","COST","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATA","DATABASE","DATABASES","DAY","DBPROPERTIES","DEFINED","DELETE","DELIMITED","DESC","DESCRIBE","DFS","DIRECTORIES","DIRECTORY","DISTINCT","DISTRIBUTE","DIV","DROP","ESCAPE","ESCAPED","EXCEPT","EXCHANGE","EXISTS","EXPORT","EXTENDED","EXTERNAL","EXTRACT","FALSE","FETCH","FIELDS","FILTER","FILEFORMAT","FIRST","FIRST_VALUE","FOLLOWING","FOR","FOREIGN","FORMAT","FORMATTED","FULL","FUNCTION","FUNCTIONS","GLOBAL","GRANT","GROUP","GROUPING","HOUR","IF","IGNORE","IMPORT","IN","INDEX","INDEXES","INNER","INPATH","INPUTFORMAT","INTERSECT","INTERVAL","INTO","IS","ITEMS","KEYS","LAST","LAST_VALUE","LATERAL","LAZY","LEADING","LEFT","LIKE","LINES","LIST","LOCAL","LOCATION","LOCK","LOCKS","LOGICAL","MACRO","MAP","MATCHED","MERGE","MINUTE","MONTH","MSCK","NAMESPACE","NAMESPACES","NATURAL","NO","NOT","NULL","NULLS","OF","ONLY","OPTION","OPTIONS","OR","ORDER","OUT","OUTER","OUTPUTFORMAT","OVER","OVERLAPS","OVERLAY","OVERWRITE","OWNER","PARTITION","PARTITIONED","PARTITIONS","PERCENT","PLACING","POSITION","PRECEDING","PRIMARY","PRINCIPALS","PROPERTIES","PURGE","QUERY","RANGE","RECORDREADER","RECORDWRITER","RECOVER","REDUCE","REFERENCES","RENAME","REPAIR","REPLACE","RESPECT","RESTRICT","REVOKE","RIGHT","RLIKE","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","SCHEMA","SECOND","SELECT","SEMI","SEPARATED","SERDE","SERDEPROPERTIES","SESSION_USER","SETS","SHOW","SKEWED","SOME","SORT","SORTED","START","STATISTICS","STORED","STRATIFY","STRUCT","SUBSTR","SUBSTRING","TABLE","TABLES","TBLPROPERTIES","TEMPORARY","TERMINATED","THEN","TO","TOUCH","TRAILING","TRANSACTION","TRANSACTIONS","TRIM","TRUE","TRUNCATE","UNARCHIVE","UNBOUNDED","UNCACHE","UNIQUE","UNKNOWN","UNLOCK","UNSET","USE","USER","USING","VIEW","WINDOW","YEAR","ANALYSE","ARRAY_ZIP","COALESCE","CONTAINS","CONVERT","DAYS","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DECODE","DEFAULT","DISTINCTROW","ENCODE","EXPLODE","EXPLODE_OUTER","FIXED","GREATEST","GROUP_CONCAT","HOURS","HOUR_MINUTE","HOUR_SECOND","IFNULL","LEAST","LEVEL","MINUTE_SECOND","NULLIF","OFFSET","ON","OPTIMIZE","REGEXP","SEPARATOR","SIZE","STRING","TYPE","TYPES","UNSIGNED","VARIABLES","YEAR_MONTH"]}),e3=v({aggregate:["APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","AVG","BIT_AND","BIT_OR","BIT_XOR","BOOL_AND","BOOL_OR","COLLECT_LIST","COLLECT_SET","CORR","COUNT","COUNT","COUNT","COUNT_IF","COUNT_MIN_SKETCH","COVAR_POP","COVAR_SAMP","EVERY","FIRST","FIRST_VALUE","GROUPING","GROUPING_ID","KURTOSIS","LAST","LAST_VALUE","MAX","MAX_BY","MEAN","MIN","MIN_BY","PERCENTILE","PERCENTILE","PERCENTILE_APPROX","SKEWNESS","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","SUM","VAR_POP","VAR_SAMP","VARIANCE"],window:["CUME_DIST","DENSE_RANK","LAG","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER"],array:["ARRAY","ARRAY_CONTAINS","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_REPEAT","ARRAY_UNION","ARRAYS_OVERLAP","ARRAYS_ZIP","FLATTEN","SEQUENCE","SHUFFLE","SLICE","SORT_ARRAY"],map:["ELEMENT_AT","ELEMENT_AT","MAP","MAP_CONCAT","MAP_ENTRIES","MAP_FROM_ARRAYS","MAP_FROM_ENTRIES","MAP_KEYS","MAP_VALUES","STR_TO_MAP"],datetime:["ADD_MONTHS","CURRENT_DATE","CURRENT_DATE","CURRENT_TIMESTAMP","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","DATE_ADD","DATE_FORMAT","DATE_FROM_UNIX_DATE","DATE_PART","DATE_SUB","DATE_TRUNC","DATEDIFF","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","EXTRACT","FROM_UNIXTIME","FROM_UTC_TIMESTAMP","HOUR","LAST_DAY","MAKE_DATE","MAKE_DT_INTERVAL","MAKE_INTERVAL","MAKE_TIMESTAMP","MAKE_YM_INTERVAL","MINUTE","MONTH","MONTHS_BETWEEN","NEXT_DAY","NOW","QUARTER","SECOND","SESSION_WINDOW","TIMESTAMP_MICROS","TIMESTAMP_MILLIS","TIMESTAMP_SECONDS","TO_DATE","TO_TIMESTAMP","TO_UNIX_TIMESTAMP","TO_UTC_TIMESTAMP","TRUNC","UNIX_DATE","UNIX_MICROS","UNIX_MILLIS","UNIX_SECONDS","UNIX_TIMESTAMP","WEEKDAY","WEEKOFYEAR","WINDOW","YEAR"],json:["FROM_JSON","GET_JSON_OBJECT","JSON_ARRAY_LENGTH","JSON_OBJECT_KEYS","JSON_TUPLE","SCHEMA_OF_JSON","TO_JSON"],misc:["ABS","ACOS","ACOSH","AGGREGATE","ARRAY_SORT","ASCII","ASIN","ASINH","ASSERT_TRUE","ATAN","ATAN2","ATANH","BASE64","BIGINT","BIN","BINARY","BIT_COUNT","BIT_GET","BIT_LENGTH","BOOLEAN","BROUND","BTRIM","CARDINALITY","CBRT","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONV","COS","COSH","COT","CRC32","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_USER","DATE","DECIMAL","DEGREES","DOUBLE","ELT","EXP","EXPM1","FACTORIAL","FIND_IN_SET","FLOAT","FLOOR","FORALL","FORMAT_NUMBER","FORMAT_STRING","FROM_CSV","GETBIT","HASH","HEX","HYPOT","INITCAP","INLINE","INLINE_OUTER","INPUT_FILE_BLOCK_LENGTH","INPUT_FILE_BLOCK_START","INPUT_FILE_NAME","INSTR","INT","ISNAN","ISNOTNULL","ISNULL","JAVA_METHOD","LCASE","LEFT","LENGTH","LEVENSHTEIN","LN","LOCATE","LOG","LOG10","LOG1P","LOG2","LOWER","LPAD","LTRIM","MAP_FILTER","MAP_ZIP_WITH","MD5","MOD","MONOTONICALLY_INCREASING_ID","NAMED_STRUCT","NANVL","NEGATIVE","NVL","NVL2","OCTET_LENGTH","OVERLAY","PARSE_URL","PI","PMOD","POSEXPLODE","POSEXPLODE_OUTER","POSITION","POSITIVE","POW","POWER","PRINTF","RADIANS","RAISE_ERROR","RAND","RANDN","RANDOM","REFLECT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_REPLACE","REPEAT","REPLACE","REVERSE","RIGHT","RINT","ROUND","RPAD","RTRIM","SCHEMA_OF_CSV","SENTENCES","SHA","SHA1","SHA2","SHIFTLEFT","SHIFTRIGHT","SHIFTRIGHTUNSIGNED","SIGN","SIGNUM","SIN","SINH","SMALLINT","SOUNDEX","SPACE","SPARK_PARTITION_ID","SPLIT","SQRT","STACK","SUBSTR","SUBSTRING","SUBSTRING_INDEX","TAN","TANH","TIMESTAMP","TINYINT","TO_CSV","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRY_ADD","TRY_DIVIDE","TYPEOF","UCASE","UNBASE64","UNHEX","UPPER","UUID","VERSION","WIDTH_BUCKET","XPATH","XPATH_BOOLEAN","XPATH_DOUBLE","XPATH_FLOAT","XPATH_INT","XPATH_LONG","XPATH_NUMBER","XPATH_SHORT","XPATH_STRING","XXHASH64","ZIP_WITH"],cast:["CAST"],caseAbbrev:["COALESCE","NULLIF"],dataTypes:["DECIMAL","DEC","NUMERIC","VARCHAR"]}),e8=f(["SELECT [ALL | DISTINCT]"]),e5=f(["WITH","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","SORT BY","CLUSTER BY","DISTRIBUTE BY","LIMIT","INSERT [INTO | OVERWRITE] [TABLE]","VALUES","INSERT OVERWRITE [LOCAL] DIRECTORY","LOAD DATA [LOCAL] INPATH","[OVERWRITE] INTO TABLE","CREATE [OR REPLACE] [GLOBAL TEMPORARY | TEMPORARY] VIEW [IF NOT EXISTS]","CREATE [EXTERNAL] TABLE [IF NOT EXISTS]"]),e7=f(["DROP TABLE [IF EXISTS]","ALTER TABLE","ADD COLUMNS","DROP {COLUMN | COLUMNS}","RENAME TO","RENAME COLUMN","ALTER COLUMN","TRUNCATE TABLE","LATERAL VIEW","ALTER DATABASE","ALTER VIEW","CREATE DATABASE","CREATE FUNCTION","DROP DATABASE","DROP FUNCTION","DROP VIEW","REPAIR TABLE","USE DATABASE","TABLESAMPLE","PIVOT","TRANSFORM","EXPLAIN","ADD FILE","ADD JAR","ANALYZE TABLE","CACHE TABLE","CLEAR CACHE","DESCRIBE DATABASE","DESCRIBE FUNCTION","DESCRIBE QUERY","DESCRIBE TABLE","LIST FILE","LIST JAR","REFRESH","REFRESH TABLE","REFRESH FUNCTION","RESET","SHOW COLUMNS","SHOW CREATE TABLE","SHOW DATABASES","SHOW FUNCTIONS","SHOW PARTITIONS","SHOW TABLE EXTENDED","SHOW TABLES","SHOW TBLPROPERTIES","SHOW VIEWS","UNCACHE TABLE"]),e9=f(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),te=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","[LEFT] {ANTI | SEMI} JOIN","NATURAL [LEFT] {ANTI | SEMI} JOIN"]),tt=f(["ON DELETE","ON UPDATE","CURRENT ROW","{ROWS | RANGE} BETWEEN"]),tn={tokenizerOptions:{reservedSelect:e8,reservedClauses:[...e5,...e7],reservedSetOperations:e9,reservedJoins:te,reservedPhrases:tt,supportsXor:!0,reservedKeywords:e6,reservedFunctionNames:e3,extraParens:["[]"],stringTypes:["''-bs",'""-bs',{quote:"''-raw",prefixes:["R","X"],requirePrefix:!0},{quote:'""-raw',prefixes:["R","X"],requirePrefix:!0}],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||","->"],postProcess:function(e){return e.map((t,n)=>{let o=e[n-1]||u,i=e[n+1]||u;return R.WINDOW(t)&&i.type===r.OPEN_PAREN?{...t,type:r.RESERVED_FUNCTION_NAME}:"ITEMS"!==t.text||t.type!==r.RESERVED_KEYWORD||"COLLECTION"===o.text&&"TERMINATED"===i.text?t:{...t,type:r.IDENTIFIER,text:t.raw}})}},formatOptions:{onelineClauses:e7}},tr=v({scalar:["ABS","CHANGES","CHAR","COALESCE","FORMAT","GLOB","HEX","IFNULL","IIF","INSTR","LAST_INSERT_ROWID","LENGTH","LIKE","LIKELIHOOD","LIKELY","LOAD_EXTENSION","LOWER","LTRIM","NULLIF","PRINTF","QUOTE","RANDOM","RANDOMBLOB","REPLACE","ROUND","RTRIM","SIGN","SOUNDEX","SQLITE_COMPILEOPTION_GET","SQLITE_COMPILEOPTION_USED","SQLITE_OFFSET","SQLITE_SOURCE_ID","SQLITE_VERSION","SUBSTR","SUBSTRING","TOTAL_CHANGES","TRIM","TYPEOF","UNICODE","UNLIKELY","UPPER","ZEROBLOB"],aggregate:["AVG","COUNT","GROUP_CONCAT","MAX","MIN","SUM","TOTAL"],datetime:["DATE","TIME","DATETIME","JULIANDAY","UNIXEPOCH","STRFTIME"],window:["row_number","rank","dense_rank","percent_rank","cume_dist","ntile","lag","lead","first_value","last_value","nth_value"],math:["ACOS","ACOSH","ASIN","ASINH","ATAN","ATAN2","ATANH","CEIL","CEILING","COS","COSH","DEGREES","EXP","FLOOR","LN","LOG","LOG","LOG10","LOG2","MOD","PI","POW","POWER","RADIANS","SIN","SINH","SQRT","TAN","TANH","TRUNC"],json:["JSON","JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_ARRAY_LENGTH","JSON_EXTRACT","JSON_INSERT","JSON_OBJECT","JSON_PATCH","JSON_REMOVE","JSON_REPLACE","JSON_SET","JSON_TYPE","JSON_TYPE","JSON_VALID","JSON_QUOTE","JSON_GROUP_ARRAY","JSON_GROUP_OBJECT","JSON_EACH","JSON_TREE"],cast:["CAST"],dataTypes:["CHARACTER","VARCHAR","VARYING CHARACTER","NCHAR","NATIVE CHARACTER","NVARCHAR","NUMERIC","DECIMAL"]}),to=v({all:["ABORT","ACTION","ADD","AFTER","ALL","ALTER","AND","ANY","ARE","ARRAY","ALWAYS","ANALYZE","AS","ASC","ATTACH","AUTOINCREMENT","BEFORE","BEGIN","BETWEEN","BY","CASCADE","CASE","CAST","CHECK","COLLATE","COLUMN","COMMIT","CONFLICT","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","DATABASE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DETACH","DISTINCT","DO","DROP","EACH","ELSE","END","ESCAPE","EXCEPT","EXCLUDE","EXCLUSIVE","EXISTS","EXPLAIN","FAIL","FILTER","FIRST","FOLLOWING","FOR","FOREIGN","FROM","FULL","GENERATED","GLOB","GROUP","GROUPS","HAVING","IF","IGNORE","IMMEDIATE","IN","INDEX","INDEXED","INITIALLY","INNER","INSERT","INSTEAD","INTERSECT","INTO","IS","ISNULL","JOIN","KEY","LAST","LEFT","LIKE","LIMIT","MATCH","MATERIALIZED","NATURAL","NO","NOT","NOTHING","NOTNULL","NULL","NULLS","OF","OFFSET","ON","ONLY","OPEN","OR","ORDER","OTHERS","OUTER","OVER","PARTITION","PLAN","PRAGMA","PRECEDING","PRIMARY","QUERY","RAISE","RANGE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELEASE","RENAME","REPLACE","RESTRICT","RETURNING","RIGHT","ROLLBACK","ROW","ROWS","SAVEPOINT","SELECT","SET","TABLE","TEMP","TEMPORARY","THEN","TIES","TO","TRANSACTION","TRIGGER","UNBOUNDED","UNION","UNIQUE","UPDATE","USING","VACUUM","VALUES","VIEW","VIRTUAL","WHEN","WHERE","WINDOW","WITH","WITHOUT"]}),ti=f(["SELECT [ALL | DISTINCT]"]),ta=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK] INTO","REPLACE INTO","VALUES","SET","CREATE [TEMPORARY | TEMP] VIEW [IF NOT EXISTS]","CREATE [TEMPORARY | TEMP] TABLE [IF NOT EXISTS]"]),ts=f(["UPDATE [OR ABORT | OR FAIL | OR IGNORE | OR REPLACE | OR ROLLBACK]","ON CONFLICT","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME [COLUMN]","RENAME TO","SET SCHEMA"]),tl=f(["UNION [ALL]","EXCEPT","INTERSECT"]),tE=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tc=f(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN"]),tu={tokenizerOptions:{reservedSelect:ti,reservedClauses:[...ta,...ts],reservedSetOperations:tl,reservedJoins:tE,reservedPhrases:tc,reservedKeywords:to,reservedFunctionNames:tr,stringTypes:["''-qq",{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``","[]"],paramTypes:{positional:!0,numbered:["?"],named:[":","@","$"]},operators:["%","~","&","|","<<",">>","==","->","->>","||"]},formatOptions:{onelineClauses:ts}},tT=v({set:["GROUPING"],window:["RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","ROW_NUMBER"],numeric:["POSITION","OCCURRENCES_REGEX","POSITION_REGEX","EXTRACT","CHAR_LENGTH","CHARACTER_LENGTH","OCTET_LENGTH","CARDINALITY","ABS","MOD","LN","EXP","POWER","SQRT","FLOOR","CEIL","CEILING","WIDTH_BUCKET"],string:["SUBSTRING","SUBSTRING_REGEX","UPPER","LOWER","CONVERT","TRANSLATE","TRANSLATE_REGEX","TRIM","OVERLAY","NORMALIZE","SPECIFICTYPE"],datetime:["CURRENT_DATE","CURRENT_TIME","LOCALTIME","CURRENT_TIMESTAMP","LOCALTIMESTAMP"],aggregate:["COUNT","AVG","MAX","MIN","SUM","STDDEV_POP","STDDEV_SAMP","VAR_SAMP","VAR_POP","COLLECT","FUSION","INTERSECTION","COVAR_POP","COVAR_SAMP","CORR","REGR_SLOPE","REGR_INTERCEPT","REGR_COUNT","REGR_R2","REGR_AVGX","REGR_AVGY","REGR_SXX","REGR_SYY","REGR_SXY","PERCENTILE_CONT","PERCENTILE_DISC"],cast:["CAST"],caseAbbrev:["COALESCE","NULLIF"],nonStandard:["ROUND","SIN","COS","TAN","ASIN","ACOS","ATAN"],dataTypes:["CHARACTER","CHAR","CHARACTER VARYING","CHAR VARYING","VARCHAR","CHARACTER LARGE OBJECT","CHAR LARGE OBJECT","CLOB","NATIONAL CHARACTER","NATIONAL CHAR","NCHAR","NATIONAL CHARACTER VARYING","NATIONAL CHAR VARYING","NCHAR VARYING","NATIONAL CHARACTER LARGE OBJECT","NCHAR LARGE OBJECT","NCLOB","BINARY","BINARY VARYING","VARBINARY","BINARY LARGE OBJECT","BLOB","NUMERIC","DECIMAL","DEC","TIME","TIMESTAMP"]}),tR=v({all:["ALL","ALLOCATE","ALTER","ANY","ARE","ARRAY","AS","ASENSITIVE","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BY","CALL","CALLED","CASCADED","CAST","CHAR","CHARACTER","CHECK","CLOB","CLOSE","COALESCE","COLLATE","COLUMN","COMMIT","CONDITION","CONNECT","CONSTRAINT","CORRESPONDING","CREATE","CROSS","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DELETE","DEREF","DESCRIBE","DETERMINISTIC","DISCONNECT","DISTINCT","DOUBLE","DROP","DYNAMIC","EACH","ELEMENT","END-EXEC","ESCAPE","EVERY","EXCEPT","EXEC","EXECUTE","EXISTS","EXTERNAL","FALSE","FETCH","FILTER","FLOAT","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GET","GLOBAL","GRANT","GROUP","HAVING","HOLD","HOUR","IDENTITY","IN","INDICATOR","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","LANGUAGE","LARGE","LATERAL","LEADING","LEFT","LIKE","LIKE_REGEX","LOCAL","MATCH","MEMBER","MERGE","METHOD","MINUTE","MODIFIES","MODULE","MONTH","MULTISET","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NO","NONE","NOT","NULL","NULLIF","NUMERIC","OF","OLD","ON","ONLY","OPEN","ORDER","OUT","OUTER","OVER","OVERLAPS","PARAMETER","PARTITION","PRECISION","PREPARE","PRIMARY","PROCEDURE","RANGE","READS","REAL","RECURSIVE","REF","REFERENCES","REFERENCING","RELEASE","RESULT","RETURN","RETURNS","REVOKE","RIGHT","ROLLBACK","ROLLUP","ROW","ROWS","SAVEPOINT","SCOPE","SCROLL","SEARCH","SECOND","SELECT","SENSITIVE","SESSION_USER","SET","SIMILAR","SMALLINT","SOME","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","START","STATIC","SUBMULTISET","SYMMETRIC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSLATION","TREAT","TRIGGER","TRUE","UESCAPE","UNION","UNIQUE","UNKNOWN","UNNEST","UPDATE","USER","USING","VALUE","VALUES","VARBINARY","VARCHAR","VARYING","WHENEVER","WINDOW","WITHIN","WITHOUT","YEAR"]}),tA=f(["SELECT [ALL | DISTINCT]"]),td=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET","CREATE [RECURSIVE] VIEW","CREATE [GLOBAL TEMPORARY | LOCAL TEMPORARY] TABLE"]),tf=f(["UPDATE","WHERE CURRENT OF","DELETE FROM","DROP TABLE","ALTER TABLE","ADD COLUMN","DROP [COLUMN]","RENAME COLUMN","RENAME TO","ALTER [COLUMN]","{SET | DROP} DEFAULT","ADD SCOPE","DROP SCOPE {CASCADE | RESTRICT}","RESTART WITH","TRUNCATE TABLE","SET SCHEMA"]),tS=f(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),tp=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tO=f(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),tI={tokenizerOptions:{reservedSelect:tA,reservedClauses:[...td,...tf],reservedSetOperations:tS,reservedJoins:tp,reservedPhrases:tO,reservedKeywords:tR,reservedFunctionNames:tT,stringTypes:[{quote:"''-qq-bs",prefixes:["N","U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``"],paramTypes:{positional:!0},operators:["||"]},formatOptions:{onelineClauses:tf}},tN=v({all:["ABS","ACOS","ALL_MATCH","ANY_MATCH","APPROX_DISTINCT","APPROX_MOST_FREQUENT","APPROX_PERCENTILE","APPROX_SET","ARBITRARY","ARRAYS_OVERLAP","ARRAY_AGG","ARRAY_DISTINCT","ARRAY_EXCEPT","ARRAY_INTERSECT","ARRAY_JOIN","ARRAY_MAX","ARRAY_MIN","ARRAY_POSITION","ARRAY_REMOVE","ARRAY_SORT","ARRAY_UNION","ASIN","ATAN","ATAN2","AT_TIMEZONE","AVG","BAR","BETA_CDF","BING_TILE","BING_TILES_AROUND","BING_TILE_AT","BING_TILE_COORDINATES","BING_TILE_POLYGON","BING_TILE_QUADKEY","BING_TILE_ZOOM_LEVEL","BITWISE_AND","BITWISE_AND_AGG","BITWISE_LEFT_SHIFT","BITWISE_NOT","BITWISE_OR","BITWISE_OR_AGG","BITWISE_RIGHT_SHIFT","BITWISE_RIGHT_SHIFT_ARITHMETIC","BITWISE_XOR","BIT_COUNT","BOOL_AND","BOOL_OR","CARDINALITY","CAST","CBRT","CEIL","CEILING","CHAR2HEXINT","CHECKSUM","CHR","CLASSIFY","COALESCE","CODEPOINT","COLOR","COMBINATIONS","CONCAT","CONCAT_WS","CONTAINS","CONTAINS_SEQUENCE","CONVEX_HULL_AGG","CORR","COS","COSH","COSINE_SIMILARITY","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CRC32","CUME_DIST","CURRENT_CATALOG","CURRENT_DATE","CURRENT_GROUPS","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","DATE","DATE_ADD","DATE_DIFF","DATE_FORMAT","DATE_PARSE","DATE_TRUNC","DAY","DAY_OF_MONTH","DAY_OF_WEEK","DAY_OF_YEAR","DEGREES","DENSE_RANK","DOW","DOY","E","ELEMENT_AT","EMPTY_APPROX_SET","EVALUATE_CLASSIFIER_PREDICTIONS","EVERY","EXP","EXTRACT","FEATURES","FILTER","FIRST_VALUE","FLATTEN","FLOOR","FORMAT","FORMAT_DATETIME","FORMAT_NUMBER","FROM_BASE","FROM_BASE32","FROM_BASE64","FROM_BASE64URL","FROM_BIG_ENDIAN_32","FROM_BIG_ENDIAN_64","FROM_ENCODED_POLYLINE","FROM_GEOJSON_GEOMETRY","FROM_HEX","FROM_IEEE754_32","FROM_IEEE754_64","FROM_ISO8601_DATE","FROM_ISO8601_TIMESTAMP","FROM_ISO8601_TIMESTAMP_NANOS","FROM_UNIXTIME","FROM_UNIXTIME_NANOS","FROM_UTF8","GEOMETRIC_MEAN","GEOMETRY_FROM_HADOOP_SHAPE","GEOMETRY_INVALID_REASON","GEOMETRY_NEAREST_POINTS","GEOMETRY_TO_BING_TILES","GEOMETRY_UNION","GEOMETRY_UNION_AGG","GREATEST","GREAT_CIRCLE_DISTANCE","HAMMING_DISTANCE","HASH_COUNTS","HISTOGRAM","HMAC_MD5","HMAC_SHA1","HMAC_SHA256","HMAC_SHA512","HOUR","HUMAN_READABLE_SECONDS","IF","INDEX","INFINITY","INTERSECTION_CARDINALITY","INVERSE_BETA_CDF","INVERSE_NORMAL_CDF","IS_FINITE","IS_INFINITE","IS_JSON_SCALAR","IS_NAN","JACCARD_INDEX","JSON_ARRAY_CONTAINS","JSON_ARRAY_GET","JSON_ARRAY_LENGTH","JSON_EXISTS","JSON_EXTRACT","JSON_EXTRACT_SCALAR","JSON_FORMAT","JSON_PARSE","JSON_QUERY","JSON_SIZE","JSON_VALUE","KURTOSIS","LAG","LAST_DAY_OF_MONTH","LAST_VALUE","LEAD","LEARN_CLASSIFIER","LEARN_LIBSVM_CLASSIFIER","LEARN_LIBSVM_REGRESSOR","LEARN_REGRESSOR","LEAST","LENGTH","LEVENSHTEIN_DISTANCE","LINE_INTERPOLATE_POINT","LINE_INTERPOLATE_POINTS","LINE_LOCATE_POINT","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","LUHN_CHECK","MAKE_SET_DIGEST","MAP","MAP_AGG","MAP_CONCAT","MAP_ENTRIES","MAP_FILTER","MAP_FROM_ENTRIES","MAP_KEYS","MAP_UNION","MAP_VALUES","MAP_ZIP_WITH","MAX","MAX_BY","MD5","MERGE","MERGE_SET_DIGEST","MILLISECOND","MIN","MINUTE","MIN_BY","MOD","MONTH","MULTIMAP_AGG","MULTIMAP_FROM_ENTRIES","MURMUR3","NAN","NGRAMS","NONE_MATCH","NORMALIZE","NORMAL_CDF","NOW","NTH_VALUE","NTILE","NULLIF","NUMERIC_HISTOGRAM","OBJECTID","OBJECTID_TIMESTAMP","PARSE_DATA_SIZE","PARSE_DATETIME","PARSE_DURATION","PERCENT_RANK","PI","POSITION","POW","POWER","QDIGEST_AGG","QUARTER","RADIANS","RAND","RANDOM","RANK","REDUCE","REDUCE_AGG","REGEXP_COUNT","REGEXP_EXTRACT","REGEXP_EXTRACT_ALL","REGEXP_LIKE","REGEXP_POSITION","REGEXP_REPLACE","REGEXP_SPLIT","REGRESS","REGR_INTERCEPT","REGR_SLOPE","RENDER","REPEAT","REPLACE","REVERSE","RGB","ROUND","ROW_NUMBER","RPAD","RTRIM","SECOND","SEQUENCE","SHA1","SHA256","SHA512","SHUFFLE","SIGN","SIMPLIFY_GEOMETRY","SIN","SKEWNESS","SLICE","SOUNDEX","SPATIAL_PARTITIONING","SPATIAL_PARTITIONS","SPLIT","SPLIT_PART","SPLIT_TO_MAP","SPLIT_TO_MULTIMAP","SPOOKY_HASH_V2_32","SPOOKY_HASH_V2_64","SQRT","STARTS_WITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRPOS","ST_AREA","ST_ASBINARY","ST_ASTEXT","ST_BOUNDARY","ST_BUFFER","ST_CENTROID","ST_CONTAINS","ST_CONVEXHULL","ST_COORDDIM","ST_CROSSES","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_ENDPOINT","ST_ENVELOPE","ST_ENVELOPEASPTS","ST_EQUALS","ST_EXTERIORRING","ST_GEOMETRIES","ST_GEOMETRYFROMTEXT","ST_GEOMETRYN","ST_GEOMETRYTYPE","ST_GEOMFROMBINARY","ST_INTERIORRINGN","ST_INTERIORRINGS","ST_INTERSECTION","ST_INTERSECTS","ST_ISCLOSED","ST_ISEMPTY","ST_ISRING","ST_ISSIMPLE","ST_ISVALID","ST_LENGTH","ST_LINEFROMTEXT","ST_LINESTRING","ST_MULTIPOINT","ST_NUMGEOMETRIES","ST_NUMINTERIORRING","ST_NUMPOINTS","ST_OVERLAPS","ST_POINT","ST_POINTN","ST_POINTS","ST_POLYGON","ST_RELATE","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_TOUCHES","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","SUBSTR","SUBSTRING","SUM","TAN","TANH","TDIGEST_AGG","TIMESTAMP_OBJECTID","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO_BASE","TO_BASE32","TO_BASE64","TO_BASE64URL","TO_BIG_ENDIAN_32","TO_BIG_ENDIAN_64","TO_CHAR","TO_DATE","TO_ENCODED_POLYLINE","TO_GEOJSON_GEOMETRY","TO_GEOMETRY","TO_HEX","TO_IEEE754_32","TO_IEEE754_64","TO_ISO8601","TO_MILLISECONDS","TO_SPHERICAL_GEOGRAPHY","TO_TIMESTAMP","TO_UNIXTIME","TO_UTF8","TRANSFORM","TRANSFORM_KEYS","TRANSFORM_VALUES","TRANSLATE","TRIM","TRIM_ARRAY","TRUNCATE","TRY","TRY_CAST","TYPEOF","UPPER","URL_DECODE","URL_ENCODE","URL_EXTRACT_FRAGMENT","URL_EXTRACT_HOST","URL_EXTRACT_PARAMETER","URL_EXTRACT_PATH","URL_EXTRACT_PORT","URL_EXTRACT_PROTOCOL","URL_EXTRACT_QUERY","UUID","VALUES_AT_QUANTILES","VALUE_AT_QUANTILE","VARIANCE","VAR_POP","VAR_SAMP","VERSION","WEEK","WEEK_OF_YEAR","WIDTH_BUCKET","WILSON_INTERVAL_LOWER","WILSON_INTERVAL_UPPER","WITH_TIMEZONE","WORD_STEM","XXHASH64","YEAR","YEAR_OF_WEEK","YOW","ZIP","ZIP_WITH"],rowPattern:["CLASSIFIER","FIRST","LAST","MATCH_NUMBER","NEXT","PERMUTE","PREV"]}),tC=v({all:["ABSENT","ADD","ADMIN","AFTER","ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","AT","AUTHORIZATION","BERNOULLI","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CATALOGS","COLUMN","COLUMNS","COMMENT","COMMIT","COMMITTED","CONDITIONAL","CONSTRAINT","COPARTITION","CREATE","CROSS","CUBE","CURRENT","CURRENT_PATH","CURRENT_ROLE","DATA","DEALLOCATE","DEFAULT","DEFINE","DEFINER","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DISTINCT","DISTRIBUTED","DOUBLE","DROP","ELSE","EMPTY","ENCODING","END","ERROR","ESCAPE","EXCEPT","EXCLUDING","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FINAL","FIRST","FOLLOWING","FOR","FROM","FULL","FUNCTIONS","GRANT","GRANTED","GRANTS","GRAPHVIZ","GROUP","GROUPING","GROUPS","HAVING","IGNORE","IN","INCLUDING","INITIAL","INNER","INPUT","INSERT","INTERSECT","INTERVAL","INTO","INVOKER","IO","IS","ISOLATION","JOIN","JSON","JSON_ARRAY","JSON_OBJECT","KEEP","KEY","KEYS","LAST","LATERAL","LEADING","LEFT","LEVEL","LIKE","LIMIT","LOCAL","LOGICAL","MATCH","MATCHED","MATCHES","MATCH_RECOGNIZE","MATERIALIZED","MEASURES","NATURAL","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NOT","NULL","NULLS","OBJECT","OF","OFFSET","OMIT","ON","ONE","ONLY","OPTION","OR","ORDER","ORDINALITY","OUTER","OUTPUT","OVER","OVERFLOW","PARTITION","PARTITIONS","PASSING","PAST","PATH","PATTERN","PER","PERMUTE","PRECEDING","PRECISION","PREPARE","PRIVILEGES","PROPERTIES","PRUNE","QUOTES","RANGE","READ","RECURSIVE","REFRESH","RENAME","REPEATABLE","RESET","RESPECT","RESTRICT","RETURNING","REVOKE","RIGHT","ROLE","ROLES","ROLLBACK","ROLLUP","ROW","ROWS","RUNNING","SCALAR","SCHEMA","SCHEMAS","SECURITY","SEEK","SELECT","SERIALIZABLE","SESSION","SET","SETS","SHOW","SKIP","SOME","START","STATS","STRING","SUBSET","SYSTEM","TABLE","TABLES","TABLESAMPLE","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRUE","TYPE","UESCAPE","UNBOUNDED","UNCOMMITTED","UNCONDITIONAL","UNION","UNIQUE","UNKNOWN","UNMATCHED","UNNEST","UPDATE","USE","USER","USING","UTF16","UTF32","UTF8","VALIDATE","VALUE","VALUES","VERBOSE","VIEW","WHEN","WHERE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","ZONE"],types:["BIGINT","INT","INTEGER","SMALLINT","TINYINT","BOOLEAN","DATE","DECIMAL","REAL","DOUBLE","HYPERLOGLOG","QDIGEST","TDIGEST","P4HYPERLOGLOG","INTERVAL","TIMESTAMP","TIME","VARBINARY","VARCHAR","CHAR","ROW","ARRAY","MAP","JSON","JSON2016","IPADDRESS","GEOMETRY","UUID","SETDIGEST","JONIREGEXP","RE2JREGEXP","LIKEPATTERN","COLOR","CODEPOINTS","FUNCTION","JSONPATH"]}),th=f(["SELECT [ALL | DISTINCT]"]),tm=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET","CREATE [OR REPLACE] [MATERIALIZED] VIEW","CREATE TABLE [IF NOT EXISTS]","MATCH_RECOGNIZE","MEASURES","ONE ROW PER MATCH","ALL ROWS PER MATCH","AFTER MATCH","PATTERN","SUBSET","DEFINE"]),tg=f(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","ADD COLUMN [IF NOT EXISTS]","DROP COLUMN [IF EXISTS]","RENAME COLUMN [IF EXISTS]","RENAME TO","SET AUTHORIZATION [USER | ROLE]","SET PROPERTIES","EXECUTE","TRUNCATE TABLE","ALTER SCHEMA","ALTER MATERIALIZED VIEW","ALTER VIEW","CREATE SCHEMA","CREATE ROLE","DROP SCHEMA","DROP MATERIALIZED VIEW","DROP VIEW","DROP ROLE","EXPLAIN","ANALYZE","EXPLAIN ANALYZE","EXPLAIN ANALYZE VERBOSE","USE","COMMENT ON TABLE","COMMENT ON COLUMN","DESCRIBE INPUT","DESCRIBE OUTPUT","REFRESH MATERIALIZED VIEW","RESET SESSION","SET SESSION","SET PATH","SET TIME ZONE","SHOW GRANTS","SHOW CREATE TABLE","SHOW CREATE SCHEMA","SHOW CREATE VIEW","SHOW CREATE MATERIALIZED VIEW","SHOW TABLES","SHOW SCHEMAS","SHOW CATALOGS","SHOW COLUMNS","SHOW STATS FOR","SHOW ROLES","SHOW CURRENT ROLES","SHOW ROLE GRANTS","SHOW FUNCTIONS","SHOW SESSION"]),t_=f(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),tL=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),tv=f(["{ROWS | RANGE | GROUPS} BETWEEN","IS [NOT] DISTINCT FROM"]),tP={tokenizerOptions:{reservedSelect:th,reservedClauses:[...tm,...tg],reservedSetOperations:t_,reservedJoins:tL,reservedPhrases:tv,reservedKeywords:tC,reservedFunctionNames:tN,extraParens:["[]","{}"],stringTypes:[{quote:"''-qq",prefixes:["U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq'],paramTypes:{positional:!0},operators:["%","->","=>",":","||","|","^","$"]},formatOptions:{onelineClauses:tg}},ty=v({aggregate:["APPROX_COUNT_DISTINCT","AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","STDEV","STDEVP","SUM","VAR","VARP"],analytic:["CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","Collation - COLLATIONPROPERTY","Collation - TERTIARY_WEIGHTS"],configuration:["@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION"],conversion:["CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE"],cryptographic:["ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY"],cursor:["@@CURSOR_ROWS","@@FETCH_STATUS","CURSOR_STATUS"],dataType:["DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY"],datetime:["@@DATEFIRST","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TIMEZONE_ID","DATEADD","DATEDIFF","DATEDIFF_BIG","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","JSON","ISJSON","JSON_VALUE","JSON_QUERY","JSON_MODIFY"],mathematical:["ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","CHOOSE","GREATEST","IIF","LEAST"],metadata:["@@PROCID","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FILEPROPERTYEX","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","NEXT VALUE FOR","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY"],ranking:["DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME"],security:["CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","DATABASE_PRINCIPAL_ID","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME"],string:["ASCII","CHAR","CHARINDEX","CONCAT","CONCAT_WS","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STRING_AGG","STRING_ESCAPE","STUFF","SUBSTRING","TRANSLATE","TRIM","UNICODE","UPPER"],system:["$PARTITION","@@ERROR","@@IDENTITY","@@PACK_RECEIVED","@@ROWCOUNT","@@TRANCOUNT","BINARY_CHECKSUM","CHECKSUM","COMPRESS","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","CURRENT_TRANSACTION_ID","DECOMPRESS","ERROR_LINE","ERROR_MESSAGE","ERROR_NUMBER","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GET_FILESTREAM_TRANSACTION_CONTEXT","GETANSINULL","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","SESSION_CONTEXT","XACT_STATE"],statistical:["@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACK_SENT","@@PACKET_ERRORS","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE","TEXTPTR","TEXTVALID"],trigger:["COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE"],caseAbbrev:["COALESCE","NULLIF"],dataTypes:["DECIMAL","NUMERIC","FLOAT","REAL","DATETIME2","DATETIMEOFFSET","TIME","CHAR","VARCHAR","NCHAR","NVARCHAR","BINARY","VARBINARY"]}),tb=v({standard:["ADD","ALL","ALTER","AND","ANY","AS","ASC","AUTHORIZATION","BACKUP","BEGIN","BETWEEN","BREAK","BROWSE","BULK","BY","CASCADE","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLUMN","COMMIT","COMPUTE","CONSTRAINT","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DBCC","DEALLOCATE","DECLARE","DEFAULT","DELETE","DENY","DESC","DISK","DISTINCT","DISTRIBUTED","DOUBLE","DROP","DUMP","ERRLVL","ESCAPE","EXEC","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FILE","FILLFACTOR","FOR","FOREIGN","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GOTO","GRANT","GROUP","HAVING","HOLDLOCK","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IN","INDEX","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KILL","LEFT","LIKE","LINENO","LOAD","MERGE","NATIONAL","NOCHECK","NONCLUSTERED","NOT","NULL","NULLIF","OF","OFF","OFFSETS","ON","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OUTER","OVER","PERCENT","PIVOT","PLAN","PRECISION","PRIMARY","PRINT","PROC","PROCEDURE","PUBLIC","RAISERROR","READ","READTEXT","RECONFIGURE","REFERENCES","REPLICATION","RESTORE","RESTRICT","RETURN","REVERT","REVOKE","RIGHT","ROLLBACK","ROWCOUNT","ROWGUIDCOL","RULE","SAVE","SCHEMA","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION_USER","SET","SETUSER","SHUTDOWN","SOME","STATISTICS","SYSTEM_USER","TABLE","TABLESAMPLE","TEXTSIZE","THEN","TO","TOP","TRAN","TRANSACTION","TRIGGER","TRUNCATE","TRY_CONVERT","TSEQUAL","UNION","UNIQUE","UNPIVOT","UPDATE","UPDATETEXT","USE","USER","VALUES","VARYING","VIEW","WAITFOR","WHERE","WHILE","WITH","WITHIN GROUP","WRITETEXT"],odbc:["ABSOLUTE","ACTION","ADA","ADD","ALL","ALLOCATE","ALTER","AND","ANY","ARE","AS","ASC","ASSERTION","AT","AUTHORIZATION","AVG","BEGIN","BETWEEN","BIT","BIT_LENGTH","BOTH","BY","CASCADE","CASCADED","CAST","CATALOG","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOSE","COALESCE","COLLATE","COLLATION","COLUMN","COMMIT","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DESC","DESCRIBE","DESCRIPTOR","DIAGNOSTICS","DISCONNECT","DISTINCT","DOMAIN","DOUBLE","DROP","END-EXEC","ESCAPE","EXCEPTION","EXEC","EXECUTE","EXISTS","EXTERNAL","EXTRACT","FALSE","FETCH","FIRST","FLOAT","FOR","FOREIGN","FORTRAN","FOUND","FROM","FULL","GET","GLOBAL","GO","GOTO","GRANT","GROUP","HAVING","HOUR","IDENTITY","IMMEDIATE","IN","INCLUDE","INDEX","INDICATOR","INITIALLY","INNER","INPUT","INSENSITIVE","INSERT","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","ISOLATION","JOIN","KEY","LANGUAGE","LAST","LEADING","LEFT","LEVEL","LIKE","LOCAL","LOWER","MATCH","MAX","MIN","MINUTE","MODULE","MONTH","NAMES","NATIONAL","NATURAL","NCHAR","NEXT","NO","NONE","NOT","NULL","NULLIF","NUMERIC","OCTET_LENGTH","OF","ONLY","OPEN","OPTION","OR","ORDER","OUTER","OUTPUT","OVERLAPS","PAD","PARTIAL","PASCAL","POSITION","PRECISION","PREPARE","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURE","PUBLIC","READ","REAL","REFERENCES","RELATIVE","RESTRICT","REVOKE","RIGHT","ROLLBACK","ROWS","SCHEMA","SCROLL","SECOND","SECTION","SELECT","SESSION","SESSION_USER","SET","SIZE","SMALLINT","SOME","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","SUBSTRING","SUM","SYSTEM_USER","TABLE","TEMPORARY","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TRIM","TRUE","UNION","UNIQUE","UNKNOWN","UPDATE","UPPER","USAGE","USER","VALUE","VALUES","VARCHAR","VARYING","VIEW","WHENEVER","WHERE","WITH","WORK","WRITE","YEAR","ZONE"]}),tD=f(["SELECT [ALL | DISTINCT]"]),tM=f(["WITH","INTO","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","OFFSET","FETCH {FIRST | NEXT}","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY TARGET | BY SOURCE] [THEN]","UPDATE SET","CREATE [OR ALTER] [MATERIALIZED] VIEW","CREATE TABLE","CREATE [OR ALTER] {PROC | PROCEDURE}"]),tU=f(["UPDATE","WHERE CURRENT OF","DELETE [FROM]","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD","DROP COLUMN [IF EXISTS]","ALTER COLUMN","TRUNCATE TABLE","ADD SENSITIVITY CLASSIFICATION","ADD SIGNATURE","AGGREGATE","ANSI_DEFAULTS","ANSI_NULLS","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_PADDING","ANSI_WARNINGS","APPLICATION ROLE","ARITHABORT","ARITHIGNORE","ASSEMBLY","ASYMMETRIC KEY","AUTHORIZATION","AVAILABILITY GROUP","BACKUP","BACKUP CERTIFICATE","BACKUP MASTER KEY","BACKUP SERVICE MASTER KEY","BEGIN CONVERSATION TIMER","BEGIN DIALOG CONVERSATION","BROKER PRIORITY","BULK INSERT","CERTIFICATE","CLOSE MASTER KEY","CLOSE SYMMETRIC KEY","COLLATE","COLUMN ENCRYPTION KEY","COLUMN MASTER KEY","COLUMNSTORE INDEX","CONCAT_NULL_YIELDS_NULL","CONTEXT_INFO","CONTRACT","CREDENTIAL","CRYPTOGRAPHIC PROVIDER","CURSOR_CLOSE_ON_COMMIT","DATABASE","DATABASE AUDIT SPECIFICATION","DATABASE ENCRYPTION KEY","DATABASE HADR","DATABASE SCOPED CONFIGURATION","DATABASE SCOPED CREDENTIAL","DATABASE SET","DATEFIRST","DATEFORMAT","DEADLOCK_PRIORITY","DENY","DENY XML","DISABLE TRIGGER","ENABLE TRIGGER","END CONVERSATION","ENDPOINT","EVENT NOTIFICATION","EVENT SESSION","EXECUTE AS","EXTERNAL DATA SOURCE","EXTERNAL FILE FORMAT","EXTERNAL LANGUAGE","EXTERNAL LIBRARY","EXTERNAL RESOURCE POOL","EXTERNAL TABLE","FIPS_FLAGGER","FMTONLY","FORCEPLAN","FULLTEXT CATALOG","FULLTEXT INDEX","FULLTEXT STOPLIST","FUNCTION","GET CONVERSATION GROUP","GET_TRANSMISSION_STATUS","GRANT","GRANT XML","IDENTITY_INSERT","IMPLICIT_TRANSACTIONS","INDEX","LANGUAGE","LOCK_TIMEOUT","LOGIN","MASTER KEY","MESSAGE TYPE","MOVE CONVERSATION","NOCOUNT","NOEXEC","NUMERIC_ROUNDABORT","OFFSETS","OPEN MASTER KEY","OPEN SYMMETRIC KEY","PARSEONLY","PARTITION FUNCTION","PARTITION SCHEME","PROCEDURE","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUOTED_IDENTIFIER","RECEIVE","REMOTE SERVICE BINDING","REMOTE_PROC_TRANSACTIONS","RESOURCE GOVERNOR","RESOURCE POOL","RESTORE","RESTORE FILELISTONLY","RESTORE HEADERONLY","RESTORE LABELONLY","RESTORE MASTER KEY","RESTORE REWINDONLY","RESTORE SERVICE MASTER KEY","RESTORE VERIFYONLY","REVERT","REVOKE","REVOKE XML","ROLE","ROUTE","ROWCOUNT","RULE","SCHEMA","SEARCH PROPERTY LIST","SECURITY POLICY","SELECTIVE XML INDEX","SEND","SENSITIVITY CLASSIFICATION","SEQUENCE","SERVER AUDIT","SERVER AUDIT SPECIFICATION","SERVER CONFIGURATION","SERVER ROLE","SERVICE","SERVICE MASTER KEY","SETUSER","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SIGNATURE","SPATIAL INDEX","STATISTICS","STATISTICS IO","STATISTICS PROFILE","STATISTICS TIME","STATISTICS XML","SYMMETRIC KEY","SYNONYM","TABLE","TABLE IDENTITY","TEXTSIZE","TRANSACTION ISOLATION LEVEL","TRIGGER","TYPE","UPDATE STATISTICS","USER","WORKLOAD GROUP","XACT_ABORT","XML INDEX","XML SCHEMA COLLECTION"]),tx=f(["UNION [ALL]","EXCEPT","INTERSECT"]),tG=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","{CROSS | OUTER} APPLY"]),tF=f(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),tH={tokenizerOptions:{reservedSelect:tD,reservedClauses:[...tM,...tU],reservedSetOperations:tx,reservedJoins:tG,reservedPhrases:tF,reservedKeywords:tb,reservedFunctionNames:ty,nestedBlockComments:!0,stringTypes:[{quote:"''-qq",prefixes:["N"]}],identTypes:['""-qq',"[]"],identChars:{first:"#@",rest:"#@$"},paramTypes:{named:["@"],quoted:["@"]},operators:["%","&","|","^","~","!<","!>","+=","-=","*=","/=","%=","|=","&=","^=","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:tU}},tB=v({all:["ABORT","ABSOLUTE","ACCESS","ACCESSIBLE","ACCOUNT","ACTION","ACTIVE","ADD","ADMIN","AFTER","AGAINST","AGGREGATE","AGGREGATES","AGGREGATOR","AGGREGATOR_ID","AGGREGATOR_PLAN_HASH","AGGREGATORS","ALGORITHM","ALL","ALSO","ALTER","ALWAYS","ANALYZE","AND","ANY","ARGHISTORY","ARRANGE","ARRANGEMENT","ARRAY","AS","ASC","ASCII","ASENSITIVE","ASM","ASSERTION","ASSIGNMENT","AST","ASYMMETRIC","ASYNC","AT","ATTACH","ATTRIBUTE","AUTHORIZATION","AUTO","AUTO_INCREMENT","AUTO_REPROVISION","AUTOSTATS","AUTOSTATS_CARDINALITY_MODE","AUTOSTATS_ENABLED","AUTOSTATS_HISTOGRAM_MODE","AUTOSTATS_SAMPLING","AVAILABILITY","AVG","AVG_ROW_LENGTH","AVRO","AZURE","BACKGROUND","_BACKGROUND_THREADS_FOR_CLEANUP","BACKUP","BACKUP_HISTORY","BACKUP_ID","BACKWARD","BATCH","BATCHES","BATCH_INTERVAL","_BATCH_SIZE_LIMIT","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","_BINARY","BIT","BLOB","BOOL","BOOLEAN","BOOTSTRAP","BOTH","_BT","BTREE","BUCKET_COUNT","BUCKETS","BY","BYTE","BYTE_LENGTH","CACHE","CALL","CALL_FOR_PIPELINE","CALLED","CAPTURE","CASCADE","CASCADED","CASE","CATALOG","CHAIN","CHANGE","CHAR","CHARACTER","CHARACTERISTICS","CHARSET","CHECK","CHECKPOINT","_CHECK_CAN_CONNECT","_CHECK_CONSISTENCY","CHECKSUM","_CHECKSUM","CLASS","CLEAR","CLIENT","CLIENT_FOUND_ROWS","CLOSE","CLUSTER","CLUSTERED","CNF","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNAR","COLUMNS","COLUMNSTORE","COLUMNSTORE_SEGMENT_ROWS","COMMENT","COMMENTS","COMMIT","COMMITTED","_COMMIT_LOG_TAIL","COMPACT","COMPILE","COMPRESSED","COMPRESSION","CONCURRENT","CONCURRENTLY","CONDITION","CONFIGURATION","CONNECTION","CONNECTIONS","CONFIG","CONSTRAINT","CONTAINS","CONTENT","CONTINUE","_CONTINUE_REPLAY","CONVERSION","CONVERT","COPY","_CORE","COST","CREATE","CREDENTIALS","CROSS","CUBE","CSV","CUME_DIST","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_SCHEMA","CURRENT_SECURITY_GROUPS","CURRENT_SECURITY_ROLES","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATABASES","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINED","DEFINER","DELAYED","DELAY_KEY_WRITE","DELETE","DELIMITER","DELIMITERS","DENSE_RANK","DESC","DESCRIBE","DETACH","DETERMINISTIC","DICTIONARY","DIFFERENTIAL","DIRECTORY","DISABLE","DISCARD","_DISCONNECT","DISK","DISTINCT","DISTINCTROW","DISTRIBUTED_JOINS","DIV","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","_DROP_PROFILE","DUAL","DUMP","DUPLICATE","DURABILITY","DYNAMIC","EARLIEST","EACH","ECHO","ELECTION","ELSE","ELSEIF","ENABLE","ENCLOSED","ENCODING","ENCRYPTED","END","ENGINE","ENGINES","ENUM","ERRORS","ESCAPE","ESCAPED","ESTIMATE","EVENT","EVENTS","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTENDED","EXTENSION","EXTERNAL","EXTERNAL_HOST","EXTERNAL_PORT","EXTRACTOR","EXTRACTORS","EXTRA_JOIN","_FAILOVER","FAILED_LOGIN_ATTEMPTS","FAILURE","FALSE","FAMILY","FAULT","FETCH","FIELDS","FILE","FILES","FILL","FIX_ALTER","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWING","FOR","FORCE","FORCE_COMPILED_MODE","FORCE_INTERPRETER_MODE","FOREGROUND","FOREIGN","FORMAT","FORWARD","FREEZE","FROM","FS","_FSYNC","FULL","FULLTEXT","FUNCTION","FUNCTIONS","GC","GCS","GET_FORMAT","_GC","_GCX","GENERATE","GEOGRAPHY","GEOGRAPHYPOINT","GEOMETRY","GEOMETRYPOINT","GLOBAL","_GLOBAL_VERSION_TIMESTAMP","GRANT","GRANTED","GRANTS","GROUP","GROUPING","GROUPS","GZIP","HANDLE","HANDLER","HARD_CPU_LIMIT_PERCENTAGE","HASH","HAS_TEMP_TABLES","HAVING","HDFS","HEADER","HEARTBEAT_NO_LOGGING","HIGH_PRIORITY","HISTOGRAM","HOLD","HOLDING","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IDENTITY","IF","IGNORE","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDING","INCREMENT","INCREMENTAL","INDEX","INDEXES","INFILE","INHERIT","INHERITS","_INIT_PROFILE","INIT","INITIALIZE","INITIALLY","INJECT","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTANCE","INSTEAD","IN","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","_INTERNAL_DYNAMIC_TYPECAST","INTERPRETER_MODE","INTERSECT","INTERVAL","INTO","INVOKER","ISOLATION","ITERATE","JOIN","JSON","KAFKA","KEY","KEY_BLOCK_SIZE","KEYS","KILL","KILLALL","LABEL","LAG","LANGUAGE","LARGE","LAST","LAST_VALUE","LATERAL","LATEST","LC_COLLATE","LC_CTYPE","LEAD","LEADING","LEAF","LEAKPROOF","LEAVE","LEAVES","LEFT","LEVEL","LICENSE","LIKE","LIMIT","LINES","LISTEN","LLVM","LOADDATA_WHERE","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","_LS","LZ4","MANAGEMENT","_MANAGEMENT_THREAD","MAPPING","MASTER","MATCH","MATERIALIZED","MAXVALUE","MAX_CONCURRENCY","MAX_ERRORS","MAX_PARTITIONS_PER_BATCH","MAX_QUEUE_DEPTH","MAX_RETRIES_PER_BATCH_PARTITION","MAX_ROWS","MBC","MPL","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMBER","MEMORY","MEMORY_PERCENTAGE","_MEMSQL_TABLE_ID_LOOKUP","MEMSQL","MEMSQL_DESERIALIZE","MEMSQL_IMITATING_KAFKA","MEMSQL_SERIALIZE","MERGE","METADATA","MICROSECOND","MIDDLEINT","MIN_ROWS","MINUS","MINUTE_MICROSECOND","MINUTE_SECOND","MINVALUE","MOD","MODE","MODEL","MODIFIES","MODIFY","MONTH","MOVE","MPL","NAMES","NAMED","NAMESPACE","NATIONAL","NATURAL","NCHAR","NEXT","NO","NODE","NONE","NO_QUERY_REWRITE","NOPARAM","NOT","NOTHING","NOTIFY","NOWAIT","NO_WRITE_TO_BINLOG","NO_QUERY_REWRITE","NORELY","NTH_VALUE","NTILE","NULL","NULLCOLS","NULLS","NUMERIC","NVARCHAR","OBJECT","OF","OFF","OFFLINE","OFFSET","OFFSETS","OIDS","ON","ONLINE","ONLY","OPEN","OPERATOR","OPTIMIZATION","OPTIMIZE","OPTIMIZER","OPTIMIZER_STATE","OPTION","OPTIONS","OPTIONALLY","OR","ORDER","ORDERED_SERIALIZE","ORPHAN","OUT","OUT_OF_ORDER","OUTER","OUTFILE","OVER","OVERLAPS","OVERLAY","OWNED","OWNER","PACK_KEYS","PAIRED","PARSER","PARQUET","PARTIAL","PARTITION","PARTITION_ID","PARTITIONING","PARTITIONS","PASSING","PASSWORD","PASSWORD_LOCK_TIME","PAUSE","_PAUSE_REPLAY","PERIODIC","PERSISTED","PIPELINE","PIPELINES","PLACING","PLAN","PLANS","PLANCACHE","PLUGINS","POOL","POOLS","PORT","PRECEDING","PRECISION","PREPARE","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROCESS","PROCESSLIST","PROFILE","PROFILES","PROGRAM","PROMOTE","PROXY","PURGE","QUARTER","QUERIES","QUERY","QUERY_TIMEOUT","QUEUE","RANGE","RANK","READ","_READ","READS","REAL","REASSIGN","REBALANCE","RECHECK","RECORD","RECURSIVE","REDUNDANCY","REDUNDANT","REF","REFERENCE","REFERENCES","REFRESH","REGEXP","REINDEX","RELATIVE","RELEASE","RELOAD","RELY","REMOTE","REMOVE","RENAME","REPAIR","_REPAIR_TABLE","REPEAT","REPEATABLE","_REPL","_REPROVISIONING","REPLACE","REPLICA","REPLICATE","REPLICATING","REPLICATION","REQUIRE","RESOURCE","RESOURCE_POOL","RESET","RESTART","RESTORE","RESTRICT","RESULT","_RESURRECT","RETRY","RETURN","RETURNING","RETURNS","REVERSE","RG_POOL","REVOKE","RIGHT","RIGHT_ANTI_JOIN","RIGHT_SEMI_JOIN","RIGHT_STRAIGHT_JOIN","RLIKE","ROLES","ROLLBACK","ROLLUP","ROUTINE","ROW","ROW_COUNT","ROW_FORMAT","ROW_NUMBER","ROWS","ROWSTORE","RULE","_RPC","RUNNING","S3","SAFE","SAVE","SAVEPOINT","SCALAR","SCHEMA","SCHEMAS","SCHEMA_BINDING","SCROLL","SEARCH","SECOND","SECOND_MICROSECOND","SECURITY","SELECT","SEMI_JOIN","_SEND_THREADS","SENSITIVE","SEPARATOR","SEQUENCE","SEQUENCES","SERIAL","SERIALIZABLE","SERIES","SERVICE_USER","SERVER","SESSION","SESSION_USER","SET","SETOF","SECURITY_LISTS_INTERSECT","SHA","SHARD","SHARDED","SHARDED_ID","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMILAR","SIMPLE","SITE","SKIP","SKIPPED_BATCHES","__SLEEP","SMALLINT","SNAPSHOT","_SNAPSHOT","_SNAPSHOTS","SOFT_CPU_LIMIT_PERCENTAGE","SOME","SONAME","SPARSE","SPATIAL","SPATIAL_CHECK_INDEX","SPECIFIC","SQL","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQLEXCEPTION","SQL_MODE","SQL_NO_CACHE","SQL_NO_LOGGING","SQL_SMALL_RESULT","SQLSTATE","SQLWARNING","STDIN","STDOUT","STOP","STORAGE","STRAIGHT_JOIN","STRICT","STRING","STRIP","SUCCESS","SUPER","SYMMETRIC","SYNC_SNAPSHOT","SYNC","_SYNC","_SYNC2","_SYNC_PARTITIONS","_SYNC_SNAPSHOT","SYNCHRONIZE","SYSID","SYSTEM","TABLE","TABLE_CHECKSUM","TABLES","TABLESPACE","TAGS","TARGET_SIZE","TASK","TEMP","TEMPLATE","TEMPORARY","TEMPTABLE","_TERM_BUMP","TERMINATE","TERMINATED","TEXT","THEN","TIME","TIMEOUT","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIMEZONE","TINYBLOB","TINYINT","TINYTEXT","TO","TRACELOGS","TRADITIONAL","TRAILING","TRANSFORM","TRANSACTION","_TRANSACTIONS_EXPERIMENTAL","TREAT","TRIGGER","TRIGGERS","TRUE","TRUNC","TRUNCATE","TRUSTED","TWO_PHASE","_TWOPCID","TYPE","TYPES","UNBOUNDED","UNCOMMITTED","UNDEFINED","UNDO","UNENCRYPTED","UNENFORCED","UNHOLD","UNICODE","UNION","UNIQUE","_UNITTEST","UNKNOWN","UNLISTEN","_UNLOAD","UNLOCK","UNLOGGED","UNPIVOT","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USERS","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","_UTF8","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARIABLES","VARIADIC","VARYING","VERBOSE","VIEW","VOID","VOLATILE","VOTING","WAIT","_WAKE","WARNINGS","WEEK","WHEN","WHERE","WHILE","WHITESPACE","WINDOW","WITH","WITHOUT","WITHIN","_WM_HEARTBEAT","WORK","WORKLOAD","WRAPPER","WRITE","XACT_ID","XOR","YEAR","YEAR_MONTH","YES","ZEROFILL","ZONE"]}),tw=v({all:["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_COUNT_DISTINCT_ACCUMULATE","APPROX_COUNT_DISTINCT_COMBINE","APPROX_COUNT_DISTINCT_ESTIMATE","APPROX_GEOGRAPHY_INTERSECTS","APPROX_PERCENTILE","ASCII","ASIN","ATAN","ATAN2","AVG","BIN","BINARY","BIT_AND","BIT_COUNT","BIT_OR","BIT_XOR","CAST","CEIL","CEILING","CHAR","CHARACTER_LENGTH","CHAR_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COLLECT","CONCAT","CONCAT_WS","CONNECTION_ID","CONV","CONVERT","CONVERT_TZ","COS","COT","COUNT","CUME_DIST","CURDATE","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATEDIFF","DATE_FORMAT","DATE_SUB","DATE_TRUNC","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DECODE","DEFAULT","DEGREES","DENSE_RANK","DIV","DOT_PRODUCT","ELT","EUCLIDEAN_DISTANCE","EXP","EXTRACT","FIELD","FIRST","FIRST_VALUE","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GEOGRAPHY_AREA","GEOGRAPHY_CONTAINS","GEOGRAPHY_DISTANCE","GEOGRAPHY_INTERSECTS","GEOGRAPHY_LATITUDE","GEOGRAPHY_LENGTH","GEOGRAPHY_LONGITUDE","GEOGRAPHY_POINT","GEOGRAPHY_WITHIN_DISTANCE","GEOMETRY_AREA","GEOMETRY_CONTAINS","GEOMETRY_DISTANCE","GEOMETRY_FILTER","GEOMETRY_INTERSECTS","GEOMETRY_LENGTH","GEOMETRY_POINT","GEOMETRY_WITHIN_DISTANCE","GEOMETRY_X","GEOMETRY_Y","GREATEST","GROUPING","GROUP_CONCAT","HEX","HIGHLIGHT","HOUR","ICU_VERSION","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INITCAP","INSERT","INSTR","INTERVAL","IS","IS NULL","JSON_AGG","JSON_ARRAY_CONTAINS_DOUBLE","JSON_ARRAY_CONTAINS_JSON","JSON_ARRAY_CONTAINS_STRING","JSON_ARRAY_PUSH_DOUBLE","JSON_ARRAY_PUSH_JSON","JSON_ARRAY_PUSH_STRING","JSON_DELETE_KEY","JSON_EXTRACT_DOUBLE","JSON_EXTRACT_JSON","JSON_EXTRACT_STRING","JSON_EXTRACT_BIGINT","JSON_GET_TYPE","JSON_LENGTH","JSON_SET_DOUBLE","JSON_SET_JSON","JSON_SET_STRING","JSON_SPLICE_DOUBLE","JSON_SPLICE_JSON","JSON_SPLICE_STRING","LAG","LAST_DAY","LAST_VALUE","LCASE","LEAD","LEAST","LEFT","LENGTH","LIKE","LN","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LPAD","LTRIM","MATCH","MAX","MD5","MEDIAN","MICROSECOND","MIN","MINUTE","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","NOT","NOW","NTH_VALUE","NTILE","NULLIF","OCTET_LENGTH","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIVOT","POSITION","POW","POWER","QUARTER","QUOTE","RADIANS","RAND","RANK","REGEXP","REPEAT","REPLACE","REVERSE","RIGHT","RLIKE","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCALAR","SCHEMA","SEC_TO_TIME","SHA1","SHA2","SIGMOID","SIGN","SIN","SLEEP","SPLIT","SOUNDEX","SOUNDS LIKE","SOURCE_POS_WAIT","SPACE","SQRT","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUM","SYS_GUID","TAN","TIME","TIMEDIFF","TIME_BUCKET","TIME_FORMAT","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TIME_TO_SEC","TO_BASE64","TO_CHAR","TO_DAYS","TO_JSON","TO_NUMBER","TO_SECONDS","TO_TIMESTAMP","TRIM","TRUNC","TRUNCATE","UCASE","UNHEX","UNIX_TIMESTAMP","UPDATEXML","UPPER","USER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","VALUES","VARIANCE","VAR_POP","VAR_SAMP","VECTOR_SUB","VERSION","WEEK","WEEKDAY","WEEKOFYEAR","YEAR","BIT","TINYINT","SMALLINT","MEDIUMINT","INT","INTEGER","BIGINT","DECIMAL","DEC","NUMERIC","FIXED","FLOAT","DOUBLE","DOUBLE PRECISION","REAL","DATETIME","TIMESTAMP","TIME","YEAR","CHAR","NATIONAL CHAR","VARCHAR","NATIONAL VARCHAR","BINARY","VARBINARY","BLOB","TEXT","ENUM"]}),t$=f(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),tY=f(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [IGNORE] [INTO]","VALUES","REPLACE [INTO]","SET","CREATE VIEW","CREATE [ROWSTORE] [REFERENCE | TEMPORARY | GLOBAL TEMPORARY] TABLE [IF NOT EXISTS]","CREATE [OR REPLACE] [TEMPORARY] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] [EXTERNAL] FUNCTION"]),tV=f(["UPDATE","DELETE [FROM]","DROP [TEMPORARY] TABLE [IF EXISTS]","ALTER [ONLINE] TABLE","ADD [COLUMN]","ADD [UNIQUE] {INDEX | KEY}","DROP [COLUMN]","MODIFY [COLUMN]","CHANGE","RENAME [TO | AS]","TRUNCATE [TABLE]","ADD AGGREGATOR","ADD LEAF","AGGREGATOR SET AS MASTER","ALTER DATABASE","ALTER PIPELINE","ALTER RESOURCE POOL","ALTER USER","ALTER VIEW","ANALYZE TABLE","ATTACH DATABASE","ATTACH LEAF","ATTACH LEAF ALL","BACKUP DATABASE","BINLOG","BOOTSTRAP AGGREGATOR","CACHE INDEX","CALL","CHANGE","CHANGE MASTER TO","CHANGE REPLICATION FILTER","CHANGE REPLICATION SOURCE TO","CHECK BLOB CHECKSUM","CHECK TABLE","CHECKSUM TABLE","CLEAR ORPHAN DATABASES","CLONE","COMMIT","CREATE DATABASE","CREATE GROUP","CREATE INDEX","CREATE LINK","CREATE MILESTONE","CREATE PIPELINE","CREATE RESOURCE POOL","CREATE ROLE","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DETACH DATABASE","DETACH PIPELINE","DROP DATABASE","DROP FUNCTION","DROP INDEX","DROP LINK","DROP PIPELINE","DROP PROCEDURE","DROP RESOURCE POOL","DROP ROLE","DROP USER","DROP VIEW","EXECUTE","EXPLAIN","FLUSH","FORCE","GRANT","HANDLER","HELP","KILL CONNECTION","KILLALL QUERIES","LOAD DATA","LOAD INDEX INTO CACHE","LOAD XML","LOCK INSTANCE FOR BACKUP","LOCK TABLES","MASTER_POS_WAIT","OPTIMIZE TABLE","PREPARE","PURGE BINARY LOGS","REBALANCE PARTITIONS","RELEASE SAVEPOINT","REMOVE AGGREGATOR","REMOVE LEAF","REPAIR TABLE","REPLACE","REPLICATE DATABASE","RESET","RESET MASTER","RESET PERSIST","RESET REPLICA","RESET SLAVE","RESTART","RESTORE DATABASE","RESTORE REDUNDANCY","REVOKE","ROLLBACK","ROLLBACK TO SAVEPOINT","SAVEPOINT","SET CHARACTER SET","SET DEFAULT ROLE","SET NAMES","SET PASSWORD","SET RESOURCE GROUP","SET ROLE","SET TRANSACTION","SHOW","SHOW CHARACTER SET","SHOW COLLATION","SHOW COLUMNS","SHOW CREATE DATABASE","SHOW CREATE FUNCTION","SHOW CREATE PIPELINE","SHOW CREATE PROCEDURE","SHOW CREATE TABLE","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW FUNCTION CODE","SHOW FUNCTION STATUS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCEDURE CODE","SHOW PROCEDURE STATUS","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW RELAYLOG EVENTS","SHOW REPLICA STATUS","SHOW REPLICAS","SHOW SLAVE","SHOW SLAVE HOSTS","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW VARIABLES","SHOW WARNINGS","SHUTDOWN","SNAPSHOT DATABASE","SOURCE_POS_WAIT","START GROUP_REPLICATION","START PIPELINE","START REPLICA","START SLAVE","START TRANSACTION","STOP GROUP_REPLICATION","STOP PIPELINE","STOP REPLICA","STOP REPLICATING","STOP SLAVE","TEST PIPELINE","UNLOCK INSTANCE","UNLOCK TABLES","USE","XA","ITERATE","LEAVE","LOOP","REPEAT","RETURN","WHILE"]),tk=f(["UNION [ALL | DISTINCT]","EXCEPT","INTERSECT","MINUS"]),tW=f(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),tZ=f(["ON DELETE","ON UPDATE","CHARACTER SET","{ROWS | RANGE} BETWEEN"]),tj={tokenizerOptions:{reservedSelect:t$,reservedClauses:[...tY,...tV],reservedSetOperations:tk,reservedJoins:tW,reservedPhrases:tZ,reservedKeywords:tB,reservedFunctionNames:tw,stringTypes:['""-qq-bs',"''-qq-bs",{quote:"''-raw",prefixes:["B","X"],requirePrefix:!0}],identTypes:["``"],identChars:{first:"$",rest:"$",allowFirstCharNumber:!0},variableTypes:[{regex:"@@?[A-Za-z0-9_$]+"},{quote:"``",prefixes:["@"],requirePrefix:!0}],lineCommentTypes:["--","#"],operators:[":=","&","|","^","~","<<",">>","<=>","&&","||","::","::$","::%",":>","!:>"],postProcess:function(e){return e.map((t,n)=>{let o=e[n+1]||u;return R.SET(t)&&"("===o.text?{...t,type:r.RESERVED_FUNCTION_NAME}:t})}},formatOptions:{alwaysDenseOperators:["::","::$","::%"],onelineClauses:tV}},tX=v({all:["ABS","ACOS","ACOSH","ADD_MONTHS","ALL_USER_NAMES","ANY_VALUE","APPROX_COUNT_DISTINCT","APPROX_PERCENTILE","APPROX_PERCENTILE_ACCUMULATE","APPROX_PERCENTILE_COMBINE","APPROX_PERCENTILE_ESTIMATE","APPROX_TOP_K","APPROX_TOP_K_ACCUMULATE","APPROX_TOP_K_COMBINE","APPROX_TOP_K_ESTIMATE","APPROXIMATE_JACCARD_INDEX","APPROXIMATE_SIMILARITY","ARRAY_AGG","ARRAY_APPEND","ARRAY_CAT","ARRAY_COMPACT","ARRAY_CONSTRUCT","ARRAY_CONSTRUCT_COMPACT","ARRAY_CONTAINS","ARRAY_INSERT","ARRAY_INTERSECTION","ARRAY_POSITION","ARRAY_PREPEND","ARRAY_SIZE","ARRAY_SLICE","ARRAY_TO_STRING","ARRAY_UNION_AGG","ARRAY_UNIQUE_AGG","ARRAYS_OVERLAP","AS_ARRAY","AS_BINARY","AS_BOOLEAN","AS_CHAR","AS_VARCHAR","AS_DATE","AS_DECIMAL","AS_NUMBER","AS_DOUBLE","AS_REAL","AS_INTEGER","AS_OBJECT","AS_TIME","AS_TIMESTAMP_LTZ","AS_TIMESTAMP_NTZ","AS_TIMESTAMP_TZ","ASCII","ASIN","ASINH","ATAN","ATAN2","ATANH","AUTO_REFRESH_REGISTRATION_HISTORY","AUTOMATIC_CLUSTERING_HISTORY","AVG","BASE64_DECODE_BINARY","BASE64_DECODE_STRING","BASE64_ENCODE","BIT_LENGTH","BITAND","BITAND_AGG","BITMAP_BIT_POSITION","BITMAP_BUCKET_NUMBER","BITMAP_CONSTRUCT_AGG","BITMAP_COUNT","BITMAP_OR_AGG","BITNOT","BITOR","BITOR_AGG","BITSHIFTLEFT","BITSHIFTRIGHT","BITXOR","BITXOR_AGG","BOOLAND","BOOLAND_AGG","BOOLNOT","BOOLOR","BOOLOR_AGG","BOOLXOR","BOOLXOR_AGG","BUILD_SCOPED_FILE_URL","BUILD_STAGE_FILE_URL","CASE","CAST","CBRT","CEIL","CHARINDEX","CHECK_JSON","CHECK_XML","CHR","CHAR","COALESCE","COLLATE","COLLATION","COMPLETE_TASK_GRAPHS","COMPRESS","CONCAT","CONCAT_WS","CONDITIONAL_CHANGE_EVENT","CONDITIONAL_TRUE_EVENT","CONTAINS","CONVERT_TIMEZONE","COPY_HISTORY","CORR","COS","COSH","COT","COUNT","COUNT_IF","COVAR_POP","COVAR_SAMP","CUME_DIST","CURRENT_ACCOUNT","CURRENT_AVAILABLE_ROLES","CURRENT_CLIENT","CURRENT_DATABASE","CURRENT_DATE","CURRENT_IP_ADDRESS","CURRENT_REGION","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SCHEMAS","CURRENT_SECONDARY_ROLES","CURRENT_SESSION","CURRENT_STATEMENT","CURRENT_TASK_GRAPHS","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TRANSACTION","CURRENT_USER","CURRENT_VERSION","CURRENT_WAREHOUSE","DATA_TRANSFER_HISTORY","DATABASE_REFRESH_HISTORY","DATABASE_REFRESH_PROGRESS","DATABASE_REFRESH_PROGRESS_BY_JOB","DATABASE_STORAGE_USAGE_HISTORY","DATE_FROM_PARTS","DATE_PART","DATE_TRUNC","DATEADD","DATEDIFF","DAYNAME","DECODE","DECOMPRESS_BINARY","DECOMPRESS_STRING","DECRYPT","DECRYPT_RAW","DEGREES","DENSE_RANK","DIV0","EDITDISTANCE","ENCRYPT","ENCRYPT_RAW","ENDSWITH","EQUAL_NULL","EXP","EXPLAIN_JSON","EXTERNAL_FUNCTIONS_HISTORY","EXTERNAL_TABLE_FILES","EXTERNAL_TABLE_FILE_REGISTRATION_HISTORY","EXTRACT","EXTRACT_SEMANTIC_CATEGORIES","FACTORIAL","FIRST_VALUE","FLATTEN","FLOOR","GENERATE_COLUMN_DESCRIPTION","GENERATOR","GET","GET_ABSOLUTE_PATH","GET_DDL","GET_IGNORE_CASE","GET_OBJECT_REFERENCES","GET_PATH","GET_PRESIGNED_URL","GET_RELATIVE_PATH","GET_STAGE_LOCATION","GETBIT","GREATEST","GROUPING","GROUPING_ID","HASH","HASH_AGG","HAVERSINE","HEX_DECODE_BINARY","HEX_DECODE_STRING","HEX_ENCODE","HLL","HLL_ACCUMULATE","HLL_COMBINE","HLL_ESTIMATE","HLL_EXPORT","HLL_IMPORT","HOUR","MINUTE","SECOND","IFF","IFNULL","ILIKE","ILIKE ANY","INFER_SCHEMA","INITCAP","INSERT","INVOKER_ROLE","INVOKER_SHARE","IS_ARRAY","IS_BINARY","IS_BOOLEAN","IS_CHAR","IS_VARCHAR","IS_DATE","IS_DATE_VALUE","IS_DECIMAL","IS_DOUBLE","IS_REAL","IS_GRANTED_TO_INVOKER_ROLE","IS_INTEGER","IS_NULL_VALUE","IS_OBJECT","IS_ROLE_IN_SESSION","IS_TIME","IS_TIMESTAMP_LTZ","IS_TIMESTAMP_NTZ","IS_TIMESTAMP_TZ","JAROWINKLER_SIMILARITY","JSON_EXTRACT_PATH_TEXT","KURTOSIS","LAG","LAST_DAY","LAST_QUERY_ID","LAST_TRANSACTION","LAST_VALUE","LEAD","LEAST","LEFT","LENGTH","LEN","LIKE","LIKE ALL","LIKE ANY","LISTAGG","LN","LOCALTIME","LOCALTIMESTAMP","LOG","LOGIN_HISTORY","LOGIN_HISTORY_BY_USER","LOWER","LPAD","LTRIM","MATERIALIZED_VIEW_REFRESH_HISTORY","MD5","MD5_HEX","MD5_BINARY","MD5_NUMBER — Obsoleted","MD5_NUMBER_LOWER64","MD5_NUMBER_UPPER64","MEDIAN","MIN","MAX","MINHASH","MINHASH_COMBINE","MOD","MODE","MONTHNAME","MONTHS_BETWEEN","NEXT_DAY","NORMAL","NTH_VALUE","NTILE","NULLIF","NULLIFZERO","NVL","NVL2","OBJECT_AGG","OBJECT_CONSTRUCT","OBJECT_CONSTRUCT_KEEP_NULL","OBJECT_DELETE","OBJECT_INSERT","OBJECT_KEYS","OBJECT_PICK","OCTET_LENGTH","PARSE_IP","PARSE_JSON","PARSE_URL","PARSE_XML","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PI","PIPE_USAGE_HISTORY","POLICY_CONTEXT","POLICY_REFERENCES","POSITION","POW","POWER","PREVIOUS_DAY","QUERY_ACCELERATION_HISTORY","QUERY_HISTORY","QUERY_HISTORY_BY_SESSION","QUERY_HISTORY_BY_USER","QUERY_HISTORY_BY_WAREHOUSE","RADIANS","RANDOM","RANDSTR","RANK","RATIO_TO_REPORT","REGEXP","REGEXP_COUNT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_REPLACE","REGEXP_SUBSTR","REGEXP_SUBSTR_ALL","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","REGR_VALX","REGR_VALY","REPEAT","REPLACE","REPLICATION_GROUP_REFRESH_HISTORY","REPLICATION_GROUP_REFRESH_PROGRESS","REPLICATION_GROUP_REFRESH_PROGRESS_BY_JOB","REPLICATION_GROUP_USAGE_HISTORY","REPLICATION_USAGE_HISTORY","REST_EVENT_HISTORY","RESULT_SCAN","REVERSE","RIGHT","RLIKE","ROUND","ROW_NUMBER","RPAD","RTRIM","RTRIMMED_LENGTH","SEARCH_OPTIMIZATION_HISTORY","SEQ1","SEQ2","SEQ4","SEQ8","SERVERLESS_TASK_HISTORY","SHA1","SHA1_HEX","SHA1_BINARY","SHA2","SHA2_HEX","SHA2_BINARY","SIGN","SIN","SINH","SKEW","SOUNDEX","SPACE","SPLIT","SPLIT_PART","SPLIT_TO_TABLE","SQRT","SQUARE","ST_AREA","ST_ASEWKB","ST_ASEWKT","ST_ASGEOJSON","ST_ASWKB","ST_ASBINARY","ST_ASWKT","ST_ASTEXT","ST_AZIMUTH","ST_CENTROID","ST_COLLECT","ST_CONTAINS","ST_COVEREDBY","ST_COVERS","ST_DIFFERENCE","ST_DIMENSION","ST_DISJOINT","ST_DISTANCE","ST_DWITHIN","ST_ENDPOINT","ST_ENVELOPE","ST_GEOGFROMGEOHASH","ST_GEOGPOINTFROMGEOHASH","ST_GEOGRAPHYFROMWKB","ST_GEOGRAPHYFROMWKT","ST_GEOHASH","ST_GEOMETRYFROMWKB","ST_GEOMETRYFROMWKT","ST_HAUSDORFFDISTANCE","ST_INTERSECTION","ST_INTERSECTS","ST_LENGTH","ST_MAKEGEOMPOINT","ST_GEOM_POINT","ST_MAKELINE","ST_MAKEPOINT","ST_POINT","ST_MAKEPOLYGON","ST_POLYGON","ST_NPOINTS","ST_NUMPOINTS","ST_PERIMETER","ST_POINTN","ST_SETSRID","ST_SIMPLIFY","ST_SRID","ST_STARTPOINT","ST_SYMDIFFERENCE","ST_UNION","ST_WITHIN","ST_X","ST_XMAX","ST_XMIN","ST_Y","ST_YMAX","ST_YMIN","STAGE_DIRECTORY_FILE_REGISTRATION_HISTORY","STAGE_STORAGE_USAGE_HISTORY","STARTSWITH","STDDEV","STDDEV_POP","STDDEV_SAMP","STRIP_NULL_VALUE","STRTOK","STRTOK_SPLIT_TO_TABLE","STRTOK_TO_ARRAY","SUBSTR","SUBSTRING","SUM","SYSDATE","SYSTEM$ABORT_SESSION","SYSTEM$ABORT_TRANSACTION","SYSTEM$AUTHORIZE_PRIVATELINK","SYSTEM$AUTHORIZE_STAGE_PRIVATELINK_ACCESS","SYSTEM$BEHAVIOR_CHANGE_BUNDLE_STATUS","SYSTEM$CANCEL_ALL_QUERIES","SYSTEM$CANCEL_QUERY","SYSTEM$CLUSTERING_DEPTH","SYSTEM$CLUSTERING_INFORMATION","SYSTEM$CLUSTERING_RATIO ","SYSTEM$CURRENT_USER_TASK_NAME","SYSTEM$DATABASE_REFRESH_HISTORY ","SYSTEM$DATABASE_REFRESH_PROGRESS","SYSTEM$DATABASE_REFRESH_PROGRESS_BY_JOB ","SYSTEM$DISABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$DISABLE_DATABASE_REPLICATION","SYSTEM$ENABLE_BEHAVIOR_CHANGE_BUNDLE","SYSTEM$ESTIMATE_QUERY_ACCELERATION","SYSTEM$ESTIMATE_SEARCH_OPTIMIZATION_COSTS","SYSTEM$EXPLAIN_JSON_TO_TEXT","SYSTEM$EXPLAIN_PLAN_JSON","SYSTEM$EXTERNAL_TABLE_PIPE_STATUS","SYSTEM$GENERATE_SAML_CSR","SYSTEM$GENERATE_SCIM_ACCESS_TOKEN","SYSTEM$GET_AWS_SNS_IAM_POLICY","SYSTEM$GET_PREDECESSOR_RETURN_VALUE","SYSTEM$GET_PRIVATELINK","SYSTEM$GET_PRIVATELINK_AUTHORIZED_ENDPOINTS","SYSTEM$GET_PRIVATELINK_CONFIG","SYSTEM$GET_SNOWFLAKE_PLATFORM_INFO","SYSTEM$GET_TAG","SYSTEM$GET_TAG_ALLOWED_VALUES","SYSTEM$GET_TAG_ON_CURRENT_COLUMN","SYSTEM$GET_TAG_ON_CURRENT_TABLE","SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETER","SYSTEM$LAST_CHANGE_COMMIT_TIME","SYSTEM$LINK_ACCOUNT_OBJECTS_BY_NAME","SYSTEM$MIGRATE_SAML_IDP_REGISTRATION","SYSTEM$PIPE_FORCE_RESUME","SYSTEM$PIPE_STATUS","SYSTEM$REVOKE_PRIVATELINK","SYSTEM$REVOKE_STAGE_PRIVATELINK_ACCESS","SYSTEM$SET_RETURN_VALUE","SYSTEM$SHOW_OAUTH_CLIENT_SECRETS","SYSTEM$STREAM_GET_TABLE_TIMESTAMP","SYSTEM$STREAM_HAS_DATA","SYSTEM$TASK_DEPENDENTS_ENABLE","SYSTEM$TYPEOF","SYSTEM$USER_TASK_CANCEL_ONGOING_EXECUTIONS","SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKEN","SYSTEM$WAIT","SYSTEM$WHITELIST","SYSTEM$WHITELIST_PRIVATELINK","TAG_REFERENCES","TAG_REFERENCES_ALL_COLUMNS","TAG_REFERENCES_WITH_LINEAGE","TAN","TANH","TASK_DEPENDENTS","TASK_HISTORY","TIME_FROM_PARTS","TIME_SLICE","TIMEADD","TIMEDIFF","TIMESTAMP_FROM_PARTS","TIMESTAMPADD","TIMESTAMPDIFF","TO_ARRAY","TO_BINARY","TO_BOOLEAN","TO_CHAR","TO_VARCHAR","TO_DATE","DATE","TO_DECIMAL","TO_NUMBER","TO_NUMERIC","TO_DOUBLE","TO_GEOGRAPHY","TO_GEOMETRY","TO_JSON","TO_OBJECT","TO_TIME","TIME","TO_TIMESTAMP","TO_TIMESTAMP_LTZ","TO_TIMESTAMP_NTZ","TO_TIMESTAMP_TZ","TO_VARIANT","TO_XML","TRANSLATE","TRIM","TRUNCATE","TRUNC","TRUNC","TRY_BASE64_DECODE_BINARY","TRY_BASE64_DECODE_STRING","TRY_CAST","TRY_HEX_DECODE_BINARY","TRY_HEX_DECODE_STRING","TRY_PARSE_JSON","TRY_TO_BINARY","TRY_TO_BOOLEAN","TRY_TO_DATE","TRY_TO_DECIMAL","TRY_TO_NUMBER","TRY_TO_NUMERIC","TRY_TO_DOUBLE","TRY_TO_GEOGRAPHY","TRY_TO_GEOMETRY","TRY_TO_TIME","TRY_TO_TIMESTAMP","TRY_TO_TIMESTAMP_LTZ","TRY_TO_TIMESTAMP_NTZ","TRY_TO_TIMESTAMP_TZ","TYPEOF","UNICODE","UNIFORM","UPPER","UUID_STRING","VALIDATE","VALIDATE_PIPE_LOAD","VAR_POP","VAR_SAMP","VARIANCE","VARIANCE_SAMP","VARIANCE_POP","WAREHOUSE_LOAD_HISTORY","WAREHOUSE_METERING_HISTORY","WIDTH_BUCKET","XMLGET","YEAR","YEAROFWEEK","YEAROFWEEKISO","DAY","DAYOFMONTH","DAYOFWEEK","DAYOFWEEKISO","DAYOFYEAR","WEEK","WEEK","WEEKOFYEAR","WEEKISO","MONTH","QUARTER","ZEROIFNULL","ZIPF"]}),tK=v({all:["ACCOUNT","ALL","ALTER","AND","ANY","AS","BETWEEN","BY","CASE","CAST","CHECK","COLUMN","CONNECT","CONNECTION","CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DATABASE","DELETE","DISTINCT","DROP","ELSE","EXISTS","FALSE","FOLLOWING","FOR","FROM","FULL","GRANT","GROUP","GSCLUSTER","HAVING","ILIKE","IN","INCREMENT","INNER","INSERT","INTERSECT","INTO","IS","ISSUE","JOIN","LATERAL","LEFT","LIKE","LOCALTIME","LOCALTIMESTAMP","MINUS","NATURAL","NOT","NULL","OF","ON","OR","ORDER","ORGANIZATION","QUALIFY","REGEXP","REVOKE","RIGHT","RLIKE","ROW","ROWS","SAMPLE","SCHEMA","SELECT","SET","SOME","START","TABLE","TABLESAMPLE","THEN","TO","TRIGGER","TRUE","TRY_CAST","UNION","UNIQUE","UPDATE","USING","VALUES","VIEW","WHEN","WHENEVER","WHERE","WITH"]}),tz=f(["SELECT [ALL | DISTINCT]"]),tJ=f(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","QUALIFY","LIMIT","OFFSET","FETCH [FIRST | NEXT]","INSERT [OVERWRITE] [ALL INTO | INTO | ALL | FIRST]","{THEN | ELSE} INTO","VALUES","SET","CREATE [OR REPLACE] [SECURE] [RECURSIVE] VIEW [IF NOT EXISTS]","CREATE [OR REPLACE] [VOLATILE] TABLE [IF NOT EXISTS]","CREATE [OR REPLACE] [LOCAL | GLOBAL] {TEMP|TEMPORARY} TABLE [IF NOT EXISTS]","CLUSTER BY","[WITH] {MASKING POLICY | TAG | ROW ACCESS POLICY}","COPY GRANTS","USING TEMPLATE","MERGE INTO","WHEN MATCHED [AND]","THEN {UPDATE SET | DELETE}","WHEN NOT MATCHED THEN INSERT"]),tq=f(["UPDATE","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE [IF EXISTS]","RENAME TO","SWAP WITH","[SUSPEND | RESUME] RECLUSTER","DROP CLUSTERING KEY","ADD [COLUMN]","RENAME COLUMN","{ALTER | MODIFY} [COLUMN]","DROP [COLUMN]","{ADD | ALTER | MODIFY | DROP} [CONSTRAINT]","RENAME CONSTRAINT","{ADD | DROP} SEARCH OPTIMIZATION","{SET | UNSET} TAG","{ADD | DROP} ROW ACCESS POLICY","DROP ALL ROW ACCESS POLICIES","{SET | DROP} DEFAULT","{SET | DROP} NOT NULL","[SET DATA] TYPE","[UNSET] COMMENT","{SET | UNSET} MASKING POLICY","TRUNCATE [TABLE] [IF EXISTS]","ALTER ACCOUNT","ALTER API INTEGRATION","ALTER CONNECTION","ALTER DATABASE","ALTER EXTERNAL TABLE","ALTER FAILOVER GROUP","ALTER FILE FORMAT","ALTER FUNCTION","ALTER INTEGRATION","ALTER MASKING POLICY","ALTER MATERIALIZED VIEW","ALTER NETWORK POLICY","ALTER NOTIFICATION INTEGRATION","ALTER PIPE","ALTER PROCEDURE","ALTER REPLICATION GROUP","ALTER RESOURCE MONITOR","ALTER ROLE","ALTER ROW ACCESS POLICY","ALTER SCHEMA","ALTER SECURITY INTEGRATION","ALTER SEQUENCE","ALTER SESSION","ALTER SESSION POLICY","ALTER SHARE","ALTER STAGE","ALTER STORAGE INTEGRATION","ALTER STREAM","ALTER TAG","ALTER TASK","ALTER USER","ALTER VIEW","ALTER WAREHOUSE","BEGIN","CALL","COMMIT","COPY INTO","CREATE ACCOUNT","CREATE API INTEGRATION","CREATE CONNECTION","CREATE DATABASE","CREATE EXTERNAL FUNCTION","CREATE EXTERNAL TABLE","CREATE FAILOVER GROUP","CREATE FILE FORMAT","CREATE FUNCTION","CREATE INTEGRATION","CREATE MANAGED ACCOUNT","CREATE MASKING POLICY","CREATE MATERIALIZED VIEW","CREATE NETWORK POLICY","CREATE NOTIFICATION INTEGRATION","CREATE PIPE","CREATE PROCEDURE","CREATE REPLICATION GROUP","CREATE RESOURCE MONITOR","CREATE ROLE","CREATE ROW ACCESS POLICY","CREATE SCHEMA","CREATE SECURITY INTEGRATION","CREATE SEQUENCE","CREATE SESSION POLICY","CREATE SHARE","CREATE STAGE","CREATE STORAGE INTEGRATION","CREATE STREAM","CREATE TAG","CREATE TASK","CREATE USER","CREATE WAREHOUSE","DELETE","DESCRIBE DATABASE","DESCRIBE EXTERNAL TABLE","DESCRIBE FILE FORMAT","DESCRIBE FUNCTION","DESCRIBE INTEGRATION","DESCRIBE MASKING POLICY","DESCRIBE MATERIALIZED VIEW","DESCRIBE NETWORK POLICY","DESCRIBE PIPE","DESCRIBE PROCEDURE","DESCRIBE RESULT","DESCRIBE ROW ACCESS POLICY","DESCRIBE SCHEMA","DESCRIBE SEQUENCE","DESCRIBE SESSION POLICY","DESCRIBE SHARE","DESCRIBE STAGE","DESCRIBE STREAM","DESCRIBE TABLE","DESCRIBE TASK","DESCRIBE TRANSACTION","DESCRIBE USER","DESCRIBE VIEW","DESCRIBE WAREHOUSE","DROP CONNECTION","DROP DATABASE","DROP EXTERNAL TABLE","DROP FAILOVER GROUP","DROP FILE FORMAT","DROP FUNCTION","DROP INTEGRATION","DROP MANAGED ACCOUNT","DROP MASKING POLICY","DROP MATERIALIZED VIEW","DROP NETWORK POLICY","DROP PIPE","DROP PROCEDURE","DROP REPLICATION GROUP","DROP RESOURCE MONITOR","DROP ROLE","DROP ROW ACCESS POLICY","DROP SCHEMA","DROP SEQUENCE","DROP SESSION POLICY","DROP SHARE","DROP STAGE","DROP STREAM","DROP TAG","DROP TASK","DROP USER","DROP VIEW","DROP WAREHOUSE","EXECUTE IMMEDIATE","EXECUTE TASK","EXPLAIN","GET","GRANT OWNERSHIP","GRANT ROLE","INSERT","LIST","MERGE","PUT","REMOVE","REVOKE ROLE","ROLLBACK","SHOW COLUMNS","SHOW CONNECTIONS","SHOW DATABASES","SHOW DATABASES IN FAILOVER GROUP","SHOW DATABASES IN REPLICATION GROUP","SHOW DELEGATED AUTHORIZATIONS","SHOW EXTERNAL FUNCTIONS","SHOW EXTERNAL TABLES","SHOW FAILOVER GROUPS","SHOW FILE FORMATS","SHOW FUNCTIONS","SHOW GLOBAL ACCOUNTS","SHOW GRANTS","SHOW INTEGRATIONS","SHOW LOCKS","SHOW MANAGED ACCOUNTS","SHOW MASKING POLICIES","SHOW MATERIALIZED VIEWS","SHOW NETWORK POLICIES","SHOW OBJECTS","SHOW ORGANIZATION ACCOUNTS","SHOW PARAMETERS","SHOW PIPES","SHOW PRIMARY KEYS","SHOW PROCEDURES","SHOW REGIONS","SHOW REPLICATION ACCOUNTS","SHOW REPLICATION DATABASES","SHOW REPLICATION GROUPS","SHOW RESOURCE MONITORS","SHOW ROLES","SHOW ROW ACCESS POLICIES","SHOW SCHEMAS","SHOW SEQUENCES","SHOW SESSION POLICIES","SHOW SHARES","SHOW SHARES IN FAILOVER GROUP","SHOW SHARES IN REPLICATION GROUP","SHOW STAGES","SHOW STREAMS","SHOW TABLES","SHOW TAGS","SHOW TASKS","SHOW TRANSACTIONS","SHOW USER FUNCTIONS","SHOW USERS","SHOW VARIABLES","SHOW VIEWS","SHOW WAREHOUSES","TRUNCATE MATERIALIZED VIEW","UNDROP DATABASE","UNDROP SCHEMA","UNDROP TABLE","UNDROP TAG","UNSET","USE DATABASE","USE ROLE","USE SCHEMA","USE SECONDARY ROLES","USE WAREHOUSE"]),tQ=f(["UNION [ALL]","MINUS","EXCEPT","INTERSECT"]),t0=f(["[INNER] JOIN","[NATURAL] {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | NATURAL} JOIN"]),t1=f(["{ROWS | RANGE} BETWEEN","ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]"]),t2={tokenizerOptions:{reservedSelect:tz,reservedClauses:[...tJ,...tq],reservedSetOperations:tQ,reservedJoins:t0,reservedPhrases:t1,reservedKeywords:tK,reservedFunctionNames:tX,stringTypes:["$$","''-qq-bs"],identTypes:['""-qq'],variableTypes:[{regex:"[$][1-9]\\d*"},{regex:"[$][_a-zA-Z][_a-zA-Z0-9$]*"}],extraParens:["[]"],identChars:{rest:"$"},lineCommentTypes:["--","//"],operators:["%","::","||",":","=>"]},formatOptions:{alwaysDenseOperators:[":","::"],onelineClauses:tq}},t4=e=>e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),t6=/\s+/uy,t3=e=>RegExp(`(?:${e})`,"uy"),t8=e=>e.split("").map(e=>/ /gu.test(e)?"\\s+":`[${e.toUpperCase()}${e.toLowerCase()}]`).join(""),t5=e=>e+"(?:-"+e+")*",t7=({prefixes:e,requirePrefix:t})=>`(?:${e.map(t8).join("|")}${t?"":"|"})`,t9=e=>RegExp(`(?:${e.map(t4).join("|")}).*?(?=\r |\r| |$)`,"uy"),ne=(e,t=[])=>{let n="open"===e?0:1,r=["()",...t].map(e=>e[n]);return t3(r.map(t4).join("|"))},nt=e=>t3(`${g(e).map(t4).join("|")}`),nn=({rest:e,dashes:t})=>e||t?`(?![${e||""}${t?"-":""}])`:"",nr=(e,t={})=>{if(0===e.length)return/^\b$/u;let n=nn(t),r=g(e).map(t4).join("|").replace(/ /gu,"\\s+");return RegExp(`(?:${r})${n}\\b`,"iuy")},no=(e,t)=>{if(!e.length)return;let n=e.map(t4).join("|");return t3(`(?:${n})(?:${t})`)},ni={"``":"(?:`[^`]*`)+","[]":String.raw`(?:\[[^\]]*\])(?:\][^\]]*\])*`,'""-qq':String.raw`(?:"[^"]*")+`,'""-bs':String.raw`(?:"[^"\\]*(?:\\.[^"\\]*)*")`,'""-qq-bs':String.raw`(?:"[^"\\]*(?:\\.[^"\\]*)*")+`,'""-raw':String.raw`(?:"[^"]*")`,"''-qq":String.raw`(?:'[^']*')+`,"''-bs":String.raw`(?:'[^'\\]*(?:\\.[^'\\]*)*')`,"''-qq-bs":String.raw`(?:'[^'\\]*(?:\\.[^'\\]*)*')+`,"''-raw":String.raw`(?:'[^']*')`,$$:String.raw`(?\$\w*\$)[\s\S]*?\k`,"'''..'''":String.raw`'''[^\\]*?(?:\\.[^\\]*?)*?'''`,'""".."""':String.raw`"""[^\\]*?(?:\\.[^\\]*?)*?"""`,"{}":String.raw`(?:\{[^\}]*\})`,"q''":(()=>{let e={"<":">","[":"]","(":")","{":"}"},t=Object.entries(e).map(([e,t])=>"{left}(?:(?!{right}').)*?{right}".replace(/{left}/g,t4(e)).replace(/{right}/g,t4(t))),n=t4(Object.keys(e).join("")),r=String.raw`(?[^\s${n}])(?:(?!\k').)*?\k`,o=`[Qq]'(?:${r}|${t.join("|")})'`;return o})()},na=e=>"string"==typeof e?ni[e]:"regex"in e?e.regex:t7(e)+ni[e.quote],ns=e=>t3(e.map(e=>"regex"in e?e.regex:na(e)).join("|")),nl=e=>e.map(na).join("|"),nE=e=>t3(nl(e)),nc=(e={})=>t3(nu(e)),nu=({first:e,rest:t,dashes:n,allowFirstCharNumber:r}={})=>{let o="\\p{Alphabetic}\\p{Mark}_",i="\\p{Decimal_Number}",a=t4(e??""),s=t4(t??""),l=r?`[${o}${i}${a}][${o}${i}${s}]*`:`[${o}${a}][${o}${i}${s}]*`;return n?t5(l):l};function nT(e,t){let n=e.slice(0,t).split(/\n/);return{line:n.length,col:n[n.length-1].length+1}}class nR{input="";index=0;constructor(e){this.rules=e}tokenize(e){let t;this.input=e,this.index=0;let n=[];for(;this.index0;)if(t=this.matchSection(nA,e))n+=t,r++;else if(t=this.matchSection(nf,e))n+=t,r--;else{if(!(t=this.matchSection(nd,e)))return null;n+=t}return[n]}matchSection(e,t){e.lastIndex=this.lastIndex;let n=e.exec(t);return n&&(this.lastIndex+=n[0].length),n?n[0]:null}}class np{constructor(e){this.cfg=e,this.rulesBeforeParams=this.buildRulesBeforeParams(e),this.rulesAfterParams=this.buildRulesAfterParams(e)}tokenize(e,t){let n=[...this.rulesBeforeParams,...this.buildParamRules(this.cfg,t),...this.rulesAfterParams],r=new nR(n).tokenize(e);return this.cfg.postProcess?this.cfg.postProcess(r):r}buildRulesBeforeParams(e){return this.validRules([{type:r.BLOCK_COMMENT,regex:e.nestedBlockComments?new nS:/(\/\*[^]*?\*\/)/uy},{type:r.LINE_COMMENT,regex:t9(e.lineCommentTypes??["--"])},{type:r.QUOTED_IDENTIFIER,regex:nE(e.identTypes)},{type:r.NUMBER,regex:/(?:0x[0-9a-fA-F]+|0b[01]+|(?:-\s*)?[0-9]+(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+(?:\.[0-9]+)?)?)(?!\w)/uy},{type:r.RESERVED_PHRASE,regex:nr(e.reservedPhrases??[],e.identChars),text:nO},{type:r.CASE,regex:/CASE\b/iuy,text:nO},{type:r.END,regex:/END\b/iuy,text:nO},{type:r.BETWEEN,regex:/BETWEEN\b/iuy,text:nO},{type:r.LIMIT,regex:e.reservedClauses.includes("LIMIT")?/LIMIT\b/iuy:void 0,text:nO},{type:r.RESERVED_CLAUSE,regex:nr(e.reservedClauses,e.identChars),text:nO},{type:r.RESERVED_SELECT,regex:nr(e.reservedSelect,e.identChars),text:nO},{type:r.RESERVED_SET_OPERATION,regex:nr(e.reservedSetOperations,e.identChars),text:nO},{type:r.WHEN,regex:/WHEN\b/iuy,text:nO},{type:r.ELSE,regex:/ELSE\b/iuy,text:nO},{type:r.THEN,regex:/THEN\b/iuy,text:nO},{type:r.RESERVED_JOIN,regex:nr(e.reservedJoins,e.identChars),text:nO},{type:r.AND,regex:/AND\b/iuy,text:nO},{type:r.OR,regex:/OR\b/iuy,text:nO},{type:r.XOR,regex:e.supportsXor?/XOR\b/iuy:void 0,text:nO},{type:r.RESERVED_FUNCTION_NAME,regex:nr(e.reservedFunctionNames,e.identChars),text:nO},{type:r.RESERVED_KEYWORD,regex:nr(e.reservedKeywords,e.identChars),text:nO}])}buildRulesAfterParams(e){return this.validRules([{type:r.VARIABLE,regex:e.variableTypes?ns(e.variableTypes):void 0},{type:r.STRING,regex:nE(e.stringTypes)},{type:r.IDENTIFIER,regex:nc(e.identChars)},{type:r.DELIMITER,regex:/[;]/uy},{type:r.COMMA,regex:/[,]/y},{type:r.OPEN_PAREN,regex:ne("open",e.extraParens)},{type:r.CLOSE_PAREN,regex:ne("close",e.extraParens)},{type:r.OPERATOR,regex:nt(["+","-","/",">","<","=","<>","<=",">=","!=",...e.operators??[]])},{type:r.ASTERISK,regex:/[*]/uy},{type:r.DOT,regex:/[.]/uy}])}buildParamRules(e,t){var n,o,i,a,s;let l={named:(null==t?void 0:t.named)||(null===(n=e.paramTypes)||void 0===n?void 0:n.named)||[],quoted:(null==t?void 0:t.quoted)||(null===(o=e.paramTypes)||void 0===o?void 0:o.quoted)||[],numbered:(null==t?void 0:t.numbered)||(null===(i=e.paramTypes)||void 0===i?void 0:i.numbered)||[],positional:"boolean"==typeof(null==t?void 0:t.positional)?t.positional:null===(a=e.paramTypes)||void 0===a?void 0:a.positional,custom:(null==t?void 0:t.custom)||(null===(s=e.paramTypes)||void 0===s?void 0:s.custom)||[]};return this.validRules([{type:r.NAMED_PARAMETER,regex:no(l.named,nu(e.paramChars||e.identChars)),key:e=>e.slice(1)},{type:r.QUOTED_PARAMETER,regex:no(l.quoted,nl(e.identTypes)),key:e=>(({tokenKey:e,quoteChar:t})=>e.replace(RegExp(t4("\\"+t),"gu"),t))({tokenKey:e.slice(2,-1),quoteChar:e.slice(-1)})},{type:r.NUMBERED_PARAMETER,regex:no(l.numbered,"[0-9]+"),key:e=>e.slice(1)},{type:r.POSITIONAL_PARAMETER,regex:l.positional?/[?]/y:void 0},...l.custom.map(e=>({type:r.CUSTOM_PARAMETER,regex:t3(e.regex),key:e.key??(e=>e)}))])}validRules(e){return e.filter(e=>!!e.regex)}}let nO=e=>L(e.toUpperCase()),nI=new Map,nN=e=>{let t=nI.get(e);return t||(t=nC(e),nI.set(e,t)),t},nC=e=>({tokenizer:new np(e.tokenizerOptions),formatOptions:nh(e.formatOptions)}),nh=e=>({alwaysDenseOperators:e.alwaysDenseOperators||[],onelineClauses:Object.fromEntries(e.onelineClauses.map(e=>[e,!0]))});function nm(e){return"tabularLeft"===e.indentStyle||"tabularRight"===e.indentStyle?" ".repeat(10):e.useTabs?" ":" ".repeat(e.tabWidth)}function ng(e){return"tabularLeft"===e.indentStyle||"tabularRight"===e.indentStyle}class n_{constructor(e){this.params=e,this.index=0}get({key:e,text:t}){return this.params?e?this.params[e]:this.params[this.index++]:t}getPositionalParameterIndex(){return this.index}setPositionalParameterIndex(e){this.index=e}}var nL=n(69654);let nv=(e,t,n)=>{if(A(e.type)){let o=nD(n,t);if(o&&"."===o.text)return{...e,type:r.IDENTIFIER,text:e.raw}}return e},nP=(e,t,n)=>{if(e.type===r.RESERVED_FUNCTION_NAME){let o=nM(n,t);if(!o||!nU(o))return{...e,type:r.RESERVED_KEYWORD}}return e},ny=(e,t,n)=>{if(e.type===r.IDENTIFIER){let o=nM(n,t);if(o&&nx(o))return{...e,type:r.ARRAY_IDENTIFIER}}return e},nb=(e,t,n)=>{if(e.type===r.RESERVED_KEYWORD){let o=nM(n,t);if(o&&nx(o))return{...e,type:r.ARRAY_KEYWORD}}return e},nD=(e,t)=>nM(e,t,-1),nM=(e,t,n=1)=>{let r=1;for(;e[t+r*n]&&nG(e[t+r*n]);)r++;return e[t+r*n]},nU=e=>e.type===r.OPEN_PAREN&&"("===e.text,nx=e=>e.type===r.OPEN_PAREN&&"["===e.text,nG=e=>e.type===r.BLOCK_COMMENT||e.type===r.LINE_COMMENT;class nF{index=0;tokens=[];input="";constructor(e){this.tokenize=e}reset(e,t){this.input=e,this.index=0,this.tokens=this.tokenize(e)}next(){return this.tokens[this.index++]}save(){}formatError(e){let{line:t,col:n}=nT(this.input,e.start);return`Parse error at token: ${e.text} at line ${t} column ${n}`}has(e){return e in r}}function nH(e){return e[0]}(s=o||(o={})).statement="statement",s.clause="clause",s.set_operation="set_operation",s.function_call="function_call",s.array_subscript="array_subscript",s.property_access="property_access",s.parenthesis="parenthesis",s.between_predicate="between_predicate",s.case_expression="case_expression",s.case_when="case_when",s.case_else="case_else",s.limit_clause="limit_clause",s.all_columns_asterisk="all_columns_asterisk",s.literal="literal",s.identifier="identifier",s.keyword="keyword",s.parameter="parameter",s.operator="operator",s.comma="comma",s.line_comment="line_comment",s.block_comment="block_comment";let nB=new nF(e=>[]),nw=e=>({type:o.keyword,tokenType:e.type,text:e.text,raw:e.raw}),n$=(e,{leading:t,trailing:n})=>(null!=t&&t.length&&(e={...e,leadingComments:t}),null!=n&&n.length&&(e={...e,trailingComments:n}),e),nY=(e,{leading:t,trailing:n})=>{if(null!=t&&t.length){let[n,...r]=e;e=[n$(n,{leading:t}),...r]}if(null!=n&&n.length){let t=e.slice(0,-1),r=e[e.length-1];e=[...t,n$(r,{trailing:n})]}return e},nV={Lexer:nB,ParserRules:[{name:"main$ebnf$1",symbols:[]},{name:"main$ebnf$1",symbols:["main$ebnf$1","statement"],postprocess:e=>e[0].concat([e[1]])},{name:"main",symbols:["main$ebnf$1"],postprocess:([e])=>{let t=e[e.length-1];return t&&!t.hasSemicolon?t.children.length>0?e:e.slice(0,-1):e}},{name:"statement$subexpression$1",symbols:[nB.has("DELIMITER")?{type:"DELIMITER"}:DELIMITER]},{name:"statement$subexpression$1",symbols:[nB.has("EOF")?{type:"EOF"}:EOF]},{name:"statement",symbols:["expressions_or_clauses","statement$subexpression$1"],postprocess:([e,[t]])=>({type:o.statement,children:e,hasSemicolon:t.type===r.DELIMITER})},{name:"expressions_or_clauses$ebnf$1",symbols:[]},{name:"expressions_or_clauses$ebnf$1",symbols:["expressions_or_clauses$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"expressions_or_clauses$ebnf$2",symbols:[]},{name:"expressions_or_clauses$ebnf$2",symbols:["expressions_or_clauses$ebnf$2","clause"],postprocess:e=>e[0].concat([e[1]])},{name:"expressions_or_clauses",symbols:["expressions_or_clauses$ebnf$1","expressions_or_clauses$ebnf$2"],postprocess:([e,t])=>[...e,...t]},{name:"clause$subexpression$1",symbols:["limit_clause"]},{name:"clause$subexpression$1",symbols:["select_clause"]},{name:"clause$subexpression$1",symbols:["other_clause"]},{name:"clause$subexpression$1",symbols:["set_operation"]},{name:"clause",symbols:["clause$subexpression$1"],postprocess:([[e]])=>e},{name:"limit_clause$ebnf$1$subexpression$1$ebnf$1",symbols:["free_form_sql"]},{name:"limit_clause$ebnf$1$subexpression$1$ebnf$1",symbols:["limit_clause$ebnf$1$subexpression$1$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"limit_clause$ebnf$1$subexpression$1",symbols:[nB.has("COMMA")?{type:"COMMA"}:COMMA,"limit_clause$ebnf$1$subexpression$1$ebnf$1"]},{name:"limit_clause$ebnf$1",symbols:["limit_clause$ebnf$1$subexpression$1"],postprocess:nH},{name:"limit_clause$ebnf$1",symbols:[],postprocess:()=>null},{name:"limit_clause",symbols:[nB.has("LIMIT")?{type:"LIMIT"}:LIMIT,"_","expression_chain_","limit_clause$ebnf$1"],postprocess:([e,t,n,r])=>{if(!r)return{type:o.limit_clause,limitKw:n$(nw(e),{trailing:t}),count:n};{let[i,a]=r;return{type:o.limit_clause,limitKw:n$(nw(e),{trailing:t}),offset:n,count:a}}}},{name:"select_clause$subexpression$1$ebnf$1",symbols:[]},{name:"select_clause$subexpression$1$ebnf$1",symbols:["select_clause$subexpression$1$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"select_clause$subexpression$1",symbols:["all_columns_asterisk","select_clause$subexpression$1$ebnf$1"]},{name:"select_clause$subexpression$1$ebnf$2",symbols:[]},{name:"select_clause$subexpression$1$ebnf$2",symbols:["select_clause$subexpression$1$ebnf$2","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"select_clause$subexpression$1",symbols:["asteriskless_free_form_sql","select_clause$subexpression$1$ebnf$2"]},{name:"select_clause",symbols:[nB.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT,"select_clause$subexpression$1"],postprocess:([e,[t,n]])=>({type:o.clause,nameKw:nw(e),children:[t,...n]})},{name:"select_clause",symbols:[nB.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT],postprocess:([e])=>({type:o.clause,nameKw:nw(e),children:[]})},{name:"all_columns_asterisk",symbols:[nB.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK],postprocess:()=>({type:o.all_columns_asterisk})},{name:"other_clause$ebnf$1",symbols:[]},{name:"other_clause$ebnf$1",symbols:["other_clause$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"other_clause",symbols:[nB.has("RESERVED_CLAUSE")?{type:"RESERVED_CLAUSE"}:RESERVED_CLAUSE,"other_clause$ebnf$1"],postprocess:([e,t])=>({type:o.clause,nameKw:nw(e),children:t})},{name:"set_operation$ebnf$1",symbols:[]},{name:"set_operation$ebnf$1",symbols:["set_operation$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"set_operation",symbols:[nB.has("RESERVED_SET_OPERATION")?{type:"RESERVED_SET_OPERATION"}:RESERVED_SET_OPERATION,"set_operation$ebnf$1"],postprocess:([e,t])=>({type:o.set_operation,nameKw:nw(e),children:t})},{name:"expression_chain_$ebnf$1",symbols:["expression_with_comments_"]},{name:"expression_chain_$ebnf$1",symbols:["expression_chain_$ebnf$1","expression_with_comments_"],postprocess:e=>e[0].concat([e[1]])},{name:"expression_chain_",symbols:["expression_chain_$ebnf$1"],postprocess:nH},{name:"expression_chain$ebnf$1",symbols:[]},{name:"expression_chain$ebnf$1",symbols:["expression_chain$ebnf$1","_expression_with_comments"],postprocess:e=>e[0].concat([e[1]])},{name:"expression_chain",symbols:["expression","expression_chain$ebnf$1"],postprocess:([e,t])=>[e,...t]},{name:"andless_expression_chain$ebnf$1",symbols:[]},{name:"andless_expression_chain$ebnf$1",symbols:["andless_expression_chain$ebnf$1","_andless_expression_with_comments"],postprocess:e=>e[0].concat([e[1]])},{name:"andless_expression_chain",symbols:["andless_expression","andless_expression_chain$ebnf$1"],postprocess:([e,t])=>[e,...t]},{name:"expression_with_comments_",symbols:["expression","_"],postprocess:([e,t])=>n$(e,{trailing:t})},{name:"_expression_with_comments",symbols:["_","expression"],postprocess:([e,t])=>n$(t,{leading:e})},{name:"_andless_expression_with_comments",symbols:["_","andless_expression"],postprocess:([e,t])=>n$(t,{leading:e})},{name:"free_form_sql$subexpression$1",symbols:["asteriskless_free_form_sql"]},{name:"free_form_sql$subexpression$1",symbols:["asterisk"]},{name:"free_form_sql",symbols:["free_form_sql$subexpression$1"],postprocess:([[e]])=>e},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["asteriskless_andless_expression"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["logic_operator"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["between_predicate"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["comma"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["comment"]},{name:"asteriskless_free_form_sql$subexpression$1",symbols:["other_keyword"]},{name:"asteriskless_free_form_sql",symbols:["asteriskless_free_form_sql$subexpression$1"],postprocess:([[e]])=>e},{name:"expression$subexpression$1",symbols:["andless_expression"]},{name:"expression$subexpression$1",symbols:["logic_operator"]},{name:"expression",symbols:["expression$subexpression$1"],postprocess:([[e]])=>e},{name:"andless_expression$subexpression$1",symbols:["asteriskless_andless_expression"]},{name:"andless_expression$subexpression$1",symbols:["asterisk"]},{name:"andless_expression",symbols:["andless_expression$subexpression$1"],postprocess:([[e]])=>e},{name:"asteriskless_andless_expression$subexpression$1",symbols:["array_subscript"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["case_expression"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["function_call"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["property_access"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["parenthesis"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["curly_braces"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["square_brackets"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["operator"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["identifier"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["parameter"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["literal"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["keyword"]},{name:"asteriskless_andless_expression",symbols:["asteriskless_andless_expression$subexpression$1"],postprocess:([[e]])=>e},{name:"array_subscript",symbols:[nB.has("ARRAY_IDENTIFIER")?{type:"ARRAY_IDENTIFIER"}:ARRAY_IDENTIFIER,"_","square_brackets"],postprocess:([e,t,n])=>({type:o.array_subscript,array:n$({type:o.identifier,text:e.text},{trailing:t}),parenthesis:n})},{name:"array_subscript",symbols:[nB.has("ARRAY_KEYWORD")?{type:"ARRAY_KEYWORD"}:ARRAY_KEYWORD,"_","square_brackets"],postprocess:([e,t,n])=>({type:o.array_subscript,array:n$(nw(e),{trailing:t}),parenthesis:n})},{name:"function_call",symbols:[nB.has("RESERVED_FUNCTION_NAME")?{type:"RESERVED_FUNCTION_NAME"}:RESERVED_FUNCTION_NAME,"_","parenthesis"],postprocess:([e,t,n])=>({type:o.function_call,nameKw:n$(nw(e),{trailing:t}),parenthesis:n})},{name:"parenthesis",symbols:[{literal:"("},"expressions_or_clauses",{literal:")"}],postprocess:([e,t,n])=>({type:o.parenthesis,children:t,openParen:"(",closeParen:")"})},{name:"curly_braces$ebnf$1",symbols:[]},{name:"curly_braces$ebnf$1",symbols:["curly_braces$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"curly_braces",symbols:[{literal:"{"},"curly_braces$ebnf$1",{literal:"}"}],postprocess:([e,t,n])=>({type:o.parenthesis,children:t,openParen:"{",closeParen:"}"})},{name:"square_brackets$ebnf$1",symbols:[]},{name:"square_brackets$ebnf$1",symbols:["square_brackets$ebnf$1","free_form_sql"],postprocess:e=>e[0].concat([e[1]])},{name:"square_brackets",symbols:[{literal:"["},"square_brackets$ebnf$1",{literal:"]"}],postprocess:([e,t,n])=>({type:o.parenthesis,children:t,openParen:"[",closeParen:"]"})},{name:"property_access$subexpression$1",symbols:["identifier"]},{name:"property_access$subexpression$1",symbols:["array_subscript"]},{name:"property_access$subexpression$1",symbols:["all_columns_asterisk"]},{name:"property_access",symbols:["expression","_",nB.has("DOT")?{type:"DOT"}:DOT,"_","property_access$subexpression$1"],postprocess:([e,t,n,r,[i]])=>({type:o.property_access,object:n$(e,{trailing:t}),property:n$(i,{leading:r})})},{name:"between_predicate",symbols:[nB.has("BETWEEN")?{type:"BETWEEN"}:BETWEEN,"_","andless_expression_chain","_",nB.has("AND")?{type:"AND"}:AND,"_","andless_expression"],postprocess:([e,t,n,r,i,a,s])=>({type:o.between_predicate,betweenKw:nw(e),expr1:nY(n,{leading:t,trailing:r}),andKw:nw(i),expr2:[n$(s,{leading:a})]})},{name:"case_expression$ebnf$1",symbols:["expression_chain_"],postprocess:nH},{name:"case_expression$ebnf$1",symbols:[],postprocess:()=>null},{name:"case_expression$ebnf$2",symbols:[]},{name:"case_expression$ebnf$2",symbols:["case_expression$ebnf$2","case_clause"],postprocess:e=>e[0].concat([e[1]])},{name:"case_expression",symbols:[nB.has("CASE")?{type:"CASE"}:CASE,"_","case_expression$ebnf$1","case_expression$ebnf$2",nB.has("END")?{type:"END"}:END],postprocess:([e,t,n,r,i])=>({type:o.case_expression,caseKw:n$(nw(e),{trailing:t}),endKw:nw(i),expr:n||[],clauses:r})},{name:"case_clause",symbols:[nB.has("WHEN")?{type:"WHEN"}:WHEN,"_","expression_chain_",nB.has("THEN")?{type:"THEN"}:THEN,"_","expression_chain_"],postprocess:([e,t,n,r,i,a])=>({type:o.case_when,whenKw:n$(nw(e),{trailing:t}),thenKw:n$(nw(r),{trailing:i}),condition:n,result:a})},{name:"case_clause",symbols:[nB.has("ELSE")?{type:"ELSE"}:ELSE,"_","expression_chain_"],postprocess:([e,t,n])=>({type:o.case_else,elseKw:n$(nw(e),{trailing:t}),result:n})},{name:"comma$subexpression$1",symbols:[nB.has("COMMA")?{type:"COMMA"}:COMMA]},{name:"comma",symbols:["comma$subexpression$1"],postprocess:([[e]])=>({type:o.comma})},{name:"asterisk$subexpression$1",symbols:[nB.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK]},{name:"asterisk",symbols:["asterisk$subexpression$1"],postprocess:([[e]])=>({type:o.operator,text:e.text})},{name:"operator$subexpression$1",symbols:[nB.has("OPERATOR")?{type:"OPERATOR"}:OPERATOR]},{name:"operator",symbols:["operator$subexpression$1"],postprocess:([[e]])=>({type:o.operator,text:e.text})},{name:"identifier$subexpression$1",symbols:[nB.has("IDENTIFIER")?{type:"IDENTIFIER"}:IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[nB.has("QUOTED_IDENTIFIER")?{type:"QUOTED_IDENTIFIER"}:QUOTED_IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[nB.has("VARIABLE")?{type:"VARIABLE"}:VARIABLE]},{name:"identifier",symbols:["identifier$subexpression$1"],postprocess:([[e]])=>({type:o.identifier,text:e.text})},{name:"parameter$subexpression$1",symbols:[nB.has("NAMED_PARAMETER")?{type:"NAMED_PARAMETER"}:NAMED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[nB.has("QUOTED_PARAMETER")?{type:"QUOTED_PARAMETER"}:QUOTED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[nB.has("NUMBERED_PARAMETER")?{type:"NUMBERED_PARAMETER"}:NUMBERED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[nB.has("POSITIONAL_PARAMETER")?{type:"POSITIONAL_PARAMETER"}:POSITIONAL_PARAMETER]},{name:"parameter$subexpression$1",symbols:[nB.has("CUSTOM_PARAMETER")?{type:"CUSTOM_PARAMETER"}:CUSTOM_PARAMETER]},{name:"parameter",symbols:["parameter$subexpression$1"],postprocess:([[e]])=>({type:o.parameter,key:e.key,text:e.text})},{name:"literal$subexpression$1",symbols:[nB.has("NUMBER")?{type:"NUMBER"}:NUMBER]},{name:"literal$subexpression$1",symbols:[nB.has("STRING")?{type:"STRING"}:STRING]},{name:"literal",symbols:["literal$subexpression$1"],postprocess:([[e]])=>({type:o.literal,text:e.text})},{name:"keyword$subexpression$1",symbols:[nB.has("RESERVED_KEYWORD")?{type:"RESERVED_KEYWORD"}:RESERVED_KEYWORD]},{name:"keyword$subexpression$1",symbols:[nB.has("RESERVED_PHRASE")?{type:"RESERVED_PHRASE"}:RESERVED_PHRASE]},{name:"keyword$subexpression$1",symbols:[nB.has("RESERVED_JOIN")?{type:"RESERVED_JOIN"}:RESERVED_JOIN]},{name:"keyword",symbols:["keyword$subexpression$1"],postprocess:([[e]])=>nw(e)},{name:"logic_operator$subexpression$1",symbols:[nB.has("AND")?{type:"AND"}:AND]},{name:"logic_operator$subexpression$1",symbols:[nB.has("OR")?{type:"OR"}:OR]},{name:"logic_operator$subexpression$1",symbols:[nB.has("XOR")?{type:"XOR"}:XOR]},{name:"logic_operator",symbols:["logic_operator$subexpression$1"],postprocess:([[e]])=>nw(e)},{name:"other_keyword$subexpression$1",symbols:[nB.has("WHEN")?{type:"WHEN"}:WHEN]},{name:"other_keyword$subexpression$1",symbols:[nB.has("THEN")?{type:"THEN"}:THEN]},{name:"other_keyword$subexpression$1",symbols:[nB.has("ELSE")?{type:"ELSE"}:ELSE]},{name:"other_keyword$subexpression$1",symbols:[nB.has("END")?{type:"END"}:END]},{name:"other_keyword",symbols:["other_keyword$subexpression$1"],postprocess:([[e]])=>nw(e)},{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1","comment"],postprocess:e=>e[0].concat([e[1]])},{name:"_",symbols:["_$ebnf$1"],postprocess:([e])=>e},{name:"comment",symbols:[nB.has("LINE_COMMENT")?{type:"LINE_COMMENT"}:LINE_COMMENT],postprocess:([e])=>({type:o.line_comment,text:e.text,precedingWhitespace:e.precedingWhitespace})},{name:"comment",symbols:[nB.has("BLOCK_COMMENT")?{type:"BLOCK_COMMENT"}:BLOCK_COMMENT],postprocess:([e])=>({type:o.block_comment,text:e.text,precedingWhitespace:e.precedingWhitespace})}],ParserStart:"main"},{Parser:nk,Grammar:nW}=nL,nZ=/^\s+/u;(l=i||(i={}))[l.SPACE=0]="SPACE",l[l.NO_SPACE=1]="NO_SPACE",l[l.NO_NEWLINE=2]="NO_NEWLINE",l[l.NEWLINE=3]="NEWLINE",l[l.MANDATORY_NEWLINE=4]="MANDATORY_NEWLINE",l[l.INDENT=5]="INDENT",l[l.SINGLE_INDENT=6]="SINGLE_INDENT";class nj{items=[];constructor(e){this.indentation=e}add(...e){for(let t of e)switch(t){case i.SPACE:this.items.push(i.SPACE);break;case i.NO_SPACE:this.trimHorizontalWhitespace();break;case i.NO_NEWLINE:this.trimWhitespace();break;case i.NEWLINE:this.trimHorizontalWhitespace(),this.addNewline(i.NEWLINE);break;case i.MANDATORY_NEWLINE:this.trimHorizontalWhitespace(),this.addNewline(i.MANDATORY_NEWLINE);break;case i.INDENT:this.addIndentation();break;case i.SINGLE_INDENT:this.items.push(i.SINGLE_INDENT);break;default:this.items.push(t)}}trimHorizontalWhitespace(){for(;nX(m(this.items));)this.items.pop()}trimWhitespace(){for(;nK(m(this.items));)this.items.pop()}addNewline(e){if(this.items.length>0)switch(m(this.items)){case i.NEWLINE:this.items.pop(),this.items.push(e);break;case i.MANDATORY_NEWLINE:break;default:this.items.push(e)}}addIndentation(){for(let e=0;ethis.itemToString(e)).join("")}getLayoutItems(){return this.items}itemToString(e){switch(e){case i.SPACE:return" ";case i.NEWLINE:case i.MANDATORY_NEWLINE:return"\n";case i.SINGLE_INDENT:return this.indentation.getSingleIndent();default:return e}}}let nX=e=>e===i.SPACE||e===i.SINGLE_INDENT,nK=e=>e===i.SPACE||e===i.SINGLE_INDENT||e===i.NEWLINE,nz="top-level";class nJ{indentTypes=[];constructor(e){this.indent=e}getSingleIndent(){return this.indent}getLevel(){return this.indentTypes.length}increaseTopLevel(){this.indentTypes.push(nz)}increaseBlockLevel(){this.indentTypes.push("block-level")}decreaseTopLevel(){this.indentTypes.length>0&&m(this.indentTypes)===nz&&this.indentTypes.pop()}decreaseBlockLevel(){for(;this.indentTypes.length>0;){let e=this.indentTypes.pop();if(e!==nz)break}}}class nq extends nj{length=0;trailingSpace=!1;constructor(e){super(new nJ("")),this.expressionWidth=e}add(...e){if(e.forEach(e=>this.addToLength(e)),this.length>this.expressionWidth)throw new nQ;super.add(...e)}addToLength(e){if("string"==typeof e)this.length+=e.length,this.trailingSpace=!1;else if(e===i.MANDATORY_NEWLINE||e===i.NEWLINE)throw new nQ;else e===i.INDENT||e===i.SINGLE_INDENT||e===i.SPACE?this.trailingSpace||(this.length++,this.trailingSpace=!0):(e===i.NO_NEWLINE||e===i.NO_SPACE)&&this.trailingSpace&&(this.trailingSpace=!1,this.length--)}}class nQ extends Error{}class n0{inline=!1;nodes=[];index=-1;constructor({cfg:e,dialectCfg:t,params:n,layout:r,inline:o=!1}){this.cfg=e,this.dialectCfg=t,this.inline=o,this.params=n,this.layout=r}format(e){for(this.nodes=e,this.index=0;this.index{this.layout.add(this.showKw(e.nameKw))}),this.formatNode(e.parenthesis)}formatArraySubscript(e){this.withComments(e.array,()=>{this.layout.add(e.array.type===o.keyword?this.showKw(e.array):e.array.text)}),this.formatNode(e.parenthesis)}formatPropertyAccess(e){this.formatNode(e.object),this.layout.add(i.NO_SPACE,"."),this.formatNode(e.property)}formatParenthesis(e){let t=this.formatInlineExpression(e.children);t?(this.layout.add(e.openParen),this.layout.add(...t.getLayoutItems()),this.layout.add(i.NO_SPACE,e.closeParen,i.SPACE)):(this.layout.add(e.openParen,i.NEWLINE),ng(this.cfg)?(this.layout.add(i.INDENT),this.layout=this.formatSubExpression(e.children)):(this.layout.indentation.increaseBlockLevel(),this.layout.add(i.INDENT),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseBlockLevel()),this.layout.add(i.NEWLINE,i.INDENT,e.closeParen,i.SPACE))}formatBetweenPredicate(e){this.layout.add(this.showKw(e.betweenKw),i.SPACE),this.layout=this.formatSubExpression(e.expr1),this.layout.add(i.NO_SPACE,i.SPACE,this.showNonTabularKw(e.andKw),i.SPACE),this.layout=this.formatSubExpression(e.expr2),this.layout.add(i.SPACE)}formatCaseExpression(e){this.formatNode(e.caseKw),this.layout.indentation.increaseBlockLevel(),this.layout=this.formatSubExpression(e.expr),this.layout=this.formatSubExpression(e.clauses),this.layout.indentation.decreaseBlockLevel(),this.layout.add(i.NEWLINE,i.INDENT),this.formatNode(e.endKw)}formatCaseWhen(e){this.layout.add(i.NEWLINE,i.INDENT),this.formatNode(e.whenKw),this.layout=this.formatSubExpression(e.condition),this.formatNode(e.thenKw),this.layout=this.formatSubExpression(e.result)}formatCaseElse(e){this.layout.add(i.NEWLINE,i.INDENT),this.formatNode(e.elseKw),this.layout=this.formatSubExpression(e.result)}formatClause(e){this.isOnelineClause(e)?this.formatClauseInOnelineStyle(e):ng(this.cfg)?this.formatClauseInTabularStyle(e):this.formatClauseInIndentedStyle(e)}isOnelineClause(e){return this.dialectCfg.onelineClauses[e.nameKw.text]}formatClauseInIndentedStyle(e){this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e.nameKw),i.NEWLINE),this.layout.indentation.increaseTopLevel(),this.layout.add(i.INDENT),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseTopLevel()}formatClauseInOnelineStyle(e){this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e.nameKw),i.SPACE),this.layout=this.formatSubExpression(e.children)}formatClauseInTabularStyle(e){this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e.nameKw),i.SPACE),this.layout.indentation.increaseTopLevel(),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseTopLevel()}formatSetOperation(e){this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e.nameKw),i.NEWLINE),this.layout.add(i.INDENT),this.layout=this.formatSubExpression(e.children)}formatLimitClause(e){this.withComments(e.limitKw,()=>{this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e.limitKw))}),this.layout.indentation.increaseTopLevel(),ng(this.cfg)?this.layout.add(i.SPACE):this.layout.add(i.NEWLINE,i.INDENT),e.offset&&(this.layout=this.formatSubExpression(e.offset),this.layout.add(i.NO_SPACE,",",i.SPACE)),this.layout=this.formatSubExpression(e.count),this.layout.indentation.decreaseTopLevel()}formatAllColumnsAsterisk(e){this.layout.add("*",i.SPACE)}formatLiteral(e){this.layout.add(e.text,i.SPACE)}formatIdentifier(e){this.layout.add(e.text,i.SPACE)}formatParameter(e){this.layout.add(this.params.get(e),i.SPACE)}formatOperator({text:e}){this.cfg.denseOperators||this.dialectCfg.alwaysDenseOperators.includes(e)?this.layout.add(i.NO_SPACE,e):":"===e?this.layout.add(i.NO_SPACE,e,i.SPACE):this.layout.add(e,i.SPACE)}formatComma(e){this.inline?this.layout.add(i.NO_SPACE,",",i.SPACE):this.layout.add(i.NO_SPACE,",",i.NEWLINE,i.INDENT)}withComments(e,t){this.formatComments(e.leadingComments),t(),this.formatComments(e.trailingComments)}formatComments(e){e&&e.forEach(e=>{e.type===o.line_comment?this.formatLineComment(e):this.formatBlockComment(e)})}formatLineComment(e){P(e.precedingWhitespace||"")?this.layout.add(i.NEWLINE,i.INDENT,e.text,i.MANDATORY_NEWLINE,i.INDENT):this.layout.getLayoutItems().length>0?this.layout.add(i.NO_NEWLINE,i.SPACE,e.text,i.MANDATORY_NEWLINE,i.INDENT):this.layout.add(e.text,i.MANDATORY_NEWLINE,i.INDENT)}formatBlockComment(e){this.isMultilineBlockComment(e)?(this.splitBlockComment(e.text).forEach(e=>{this.layout.add(i.NEWLINE,i.INDENT,e)}),this.layout.add(i.NEWLINE,i.INDENT)):this.layout.add(e.text,i.SPACE)}isMultilineBlockComment(e){return P(e.text)||P(e.precedingWhitespace||"")}isDocComment(e){let t=e.split(/\n/);return/^\/\*\*?$/.test(t[0])&&t.slice(1,t.length-1).every(e=>/^\s*\*/.test(e))&&/^\s*\*\/$/.test(m(t))}splitBlockComment(e){return this.isDocComment(e)?e.split(/\n/).map(e=>/^\s*\*/.test(e)?" "+e.replace(/^\s*/,""):e):e.split(/\n/).map(e=>e.replace(/^\s*/,""))}formatSubExpression(e){return new n0({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:this.layout,inline:this.inline}).format(e)}formatInlineExpression(e){let t=this.params.getPositionalParameterIndex();try{return new n0({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:new nq(this.cfg.expressionWidth),inline:!0}).format(e)}catch(e){if(e instanceof nQ){this.params.setPositionalParameterIndex(t);return}throw e}}formatKeywordNode(e){switch(e.tokenType){case r.RESERVED_JOIN:return this.formatJoin(e);case r.AND:case r.OR:case r.XOR:return this.formatLogicalOperator(e);default:return this.formatKeyword(e)}}formatJoin(e){ng(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e),i.SPACE),this.layout.indentation.increaseTopLevel()):this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e),i.SPACE)}formatKeyword(e){this.layout.add(this.showKw(e),i.SPACE)}formatLogicalOperator(e){"before"===this.cfg.logicalOperatorNewline?ng(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e),i.SPACE),this.layout.indentation.increaseTopLevel()):this.layout.add(i.NEWLINE,i.INDENT,this.showKw(e),i.SPACE):this.layout.add(this.showKw(e),i.NEWLINE,i.INDENT)}showKw(e){var t;return d(t=e.tokenType)||t===r.RESERVED_CLAUSE||t===r.RESERVED_SELECT||t===r.RESERVED_SET_OPERATION||t===r.RESERVED_JOIN||t===r.LIMIT?function(e,t){if("standard"===t)return e;let n=[];return e.length>=10&&e.includes(" ")&&([e,...n]=e.split(" ")),(e="tabularLeft"===t?e.padEnd(9," "):e.padStart(9," "))+["",...n].join(" ")}(this.showNonTabularKw(e),this.cfg.indentStyle):this.showNonTabularKw(e)}showNonTabularKw(e){switch(this.cfg.keywordCase){case"preserve":return L(e.raw);case"upper":return e.text;case"lower":return e.text.toLowerCase()}}}class n1{constructor(e,t){this.dialect=e,this.cfg=t,this.params=new n_(this.cfg.params)}format(e){let t=this.parse(e),n=this.formatAst(t),r=this.postFormat(n);return r.trimEnd()}parse(e){return(function(e){let t={},n=new nF(n=>[...e.tokenize(n,t).map(nv).map(nP).map(ny).map(nb),c(n.length)]),r=new nk(nW.fromCompiled(nV),{lexer:n});return{parse:(e,n)=>{t=n;let{results:o}=r.feed(e);if(1===o.length)return o[0];if(0===o.length)throw Error("Parse error: Invalid SQL");throw Error(`Parse error: Ambiguous grammar ${JSON.stringify(o,void 0,2)}`)}}})(this.dialect.tokenizer).parse(e,this.cfg.paramTypes||{})}formatAst(e){return e.map(e=>this.formatStatement(e)).join("\n".repeat(this.cfg.linesBetweenQueries+1))}formatStatement(e){let t=new n0({cfg:this.cfg,dialectCfg:this.dialect.formatOptions,params:this.params,layout:new nj(new nJ(nm(this.cfg)))}).format(e.children);return e.hasSemicolon&&(this.cfg.newlineBeforeSemicolon?t.add(i.NEWLINE,";"):t.add(i.NO_NEWLINE,";")),t.toString()}postFormat(e){if(this.cfg.tabulateAlias&&(e=function(e){let t=e.split("\n"),n=[];for(let e=0;e({line:e,matches:e.match(/(^.*?\S) (AS )?(\S+,?$)/i)})).map(({line:e,matches:t})=>t?{precedingText:t[1],as:t[2],alias:t[3]}:{precedingText:e}),i=_(o.map(({precedingText:e})=>e.replace(/\s*,\s*$/,"")));n=[...n,...r=o.map(({precedingText:e,as:t,alias:n})=>e+(n?" ".repeat(i-e.length+1)+(t??"")+n:""))]}n.push(t[e])}return n.join("\n")}(e)),"before"===this.cfg.commaPosition||"tabular"===this.cfg.commaPosition){var t,n,r;t=e,n=this.cfg.commaPosition,r=nm(this.cfg),e=(function(e){let t=[];for(let n=0;n{if(1===e.length)return e;if("tabular"===n)return function(e){let t=_(e.map(e=>e.replace(/\s*--.*/,"")))-1;return e.map((n,r)=>r===e.length-1?n:function(e,t){let[,n,r]=e.match(/^(.*?),(\s*--.*)?$/)||[],o=" ".repeat(t-n.length);return`${n}${o},${r??""}`}(n,t))}(e);if("before"===n)return e.map(e=>e.replace(/,(\s*(--.*)?$)/,"$1")).map((e,t)=>{if(0===t)return e;let[n]=e.match(nZ)||[""];return n.replace(RegExp(r+"$"),"")+r.replace(/ {2}$/,", ")+e.trimStart()});throw Error(`Unexpected commaPosition: ${n}`)}).join("\n")}return e}}class n2 extends Error{}let n4={bigquery:"bigquery",db2:"db2",hive:"hive",mariadb:"mariadb",mysql:"mysql",n1ql:"n1ql",plsql:"plsql",postgresql:"postgresql",redshift:"redshift",spark:"spark",sqlite:"sqlite",sql:"sql",trino:"trino",transactsql:"transactsql",tsql:"transactsql",singlestoredb:"singlestoredb",snowflake:"snowflake"},n6=Object.keys(n4),n3={tabWidth:2,useTabs:!1,keywordCase:"preserve",indentStyle:"standard",logicalOperatorNewline:"before",tabulateAlias:!1,commaPosition:"after",expressionWidth:50,linesBetweenQueries:1,denseOperators:!1,newlineBeforeSemicolon:!1},n8=(e,t={})=>{if("string"==typeof t.language&&!n6.includes(t.language))throw new n2(`Unsupported SQL dialect: ${t.language}`);let n=n4[t.language||"sql"];return n5(e,{...t,dialect:E[n]})},n5=(e,{dialect:t,...n})=>{if("string"!=typeof e)throw Error("Invalid query argument. Expected string, instead got "+typeof e);let r=function(e){if("multilineLists"in e)throw new n2("multilineLists config is no more supported.");if("newlineBeforeOpenParen"in e)throw new n2("newlineBeforeOpenParen config is no more supported.");if("newlineBeforeCloseParen"in e)throw new n2("newlineBeforeCloseParen config is no more supported.");if("aliasAs"in e)throw new n2("aliasAs config is no more supported.");if(e.expressionWidth<=0)throw new n2(`expressionWidth config must be positive number. Received ${e.expressionWidth} instead.`);if("before"===e.commaPosition&&e.useTabs)throw new n2("commaPosition: before does not work when tabs are used for indentation.");return e.params&&!function(e){let t=e instanceof Array?e:Object.values(e);return t.every(e=>"string"==typeof e)}(e.params)&&console.warn('WARNING: All "params" option values should be strings.'),e}({...n3,...n});return new n1(nN(t),r).format(e)};function n7(){var e;let t=null!==(e=localStorage.getItem(rn))&&void 0!==e?e:"";try{let e=JSON.parse(t);return e}catch(e){return null}}var n9=n(19284);let re="__db_gpt_theme_key",rt="__db_gpt_lng_key",rn="__db_gpt_im_key",rr="__db_gpt_static_flow_nodes_key";function ro(e,t){if(!e)return"";try{return n8(e,{language:t})}catch(t){return e}}},21876:function(e){!function(){var t={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,i=l(e),a=i[0],s=i[1],E=new o((a+s)*3/4-s),c=0,u=s>0?a-4:a;for(n=0;n>16&255,E[c++]=t>>8&255,E[c++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,E[c++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,E[c++]=t>>8&255,E[c++]=255&t),E},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=0,s=r-o;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return i.join("")}(e,a,a+16383>s?s:a+16383));return 1===o?i.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===o&&i.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},72:function(e,t,n){"use strict";/*! diff --git a/dbgpt/app/static/_next/static/chunks/pages/index-0b2d61c1c6358f20.js b/dbgpt/app/static/_next/static/chunks/pages/index-0b2d61c1c6358f20.js deleted file mode 100644 index c72cc5925..000000000 --- a/dbgpt/app/static/_next/static/chunks/pages/index-0b2d61c1c6358f20.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{48312:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(57464)}])},81799:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var a=n(85893),s=n(41468),l=n(51009),r=n(19284),c=n(25675),o=n.n(c),i=n(67294),u=n(67421);function d(e,t){var n;let{width:s,height:l}=t||{};return e?(0,a.jsx)(o(),{className:"rounded-full border border-gray-200 object-contain bg-white inline-block",width:s||24,height:l||24,src:(null===(n=r.H[e])||void 0===n?void 0:n.icon)||"/models/huggingface.svg",alt:"llm"}):null}t.Z=function(e){let{onChange:t}=e,{t:n}=(0,u.$G)(),{modelList:c,model:o}=(0,i.useContext)(s.p);return!c||c.length<=0?null:(0,a.jsx)(l.default,{value:o,placeholder:n("choose_model"),className:"w-52",onChange:e=>{null==t||t(e)},children:c.map(e=>{var t;return(0,a.jsx)(l.default.Option,{children:(0,a.jsxs)("div",{className:"flex items-center",children:[d(e),(0,a.jsx)("span",{className:"ml-2",children:(null===(t=r.H[e])||void 0===t?void 0:t.label)||e})]})},e)})})}},19409:function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var a=n(85893),s=n(27496),l=n(79531),r=n(71577),c=n(67294),o=n(2487),i=n(83062),u=n(2453),d=n(46735),m=n(55241),h=n(39479),p=n(51009),x=n(58299),f=n(56155),_=n(30119),v=n(67421);let j=e=>{let{data:t,loading:n,submit:s,close:l}=e,{t:r}=(0,v.$G)(),c=e=>()=>{s(e),l()};return(0,a.jsx)("div",{style:{maxHeight:400,overflow:"auto"},children:(0,a.jsx)(o.Z,{dataSource:null==t?void 0:t.data,loading:n,rowKey:e=>e.prompt_name,renderItem:e=>(0,a.jsx)(o.Z.Item,{onClick:c(e.content),children:(0,a.jsx)(i.Z,{title:e.content,children:(0,a.jsx)(o.Z.Item.Meta,{style:{cursor:"copy"},title:e.prompt_name,description:r("Prompt_Info_Scene")+":".concat(e.chat_scene,",")+r("Prompt_Info_Sub_Scene")+":".concat(e.sub_chat_scene)})})},e.prompt_name)})})};var w=e=>{let{submit:t}=e,{t:n}=(0,v.$G)(),[s,l]=(0,c.useState)(!1),[r,o]=(0,c.useState)("common"),{data:w,loading:g}=(0,f.Z)(()=>(0,_.PR)("/prompt/list",{prompt_type:r}),{refreshDeps:[r],onError:e=>{u.ZP.error(null==e?void 0:e.message)}});return(0,a.jsx)(d.ZP,{theme:{components:{Popover:{minWidth:250}}},children:(0,a.jsx)(m.Z,{title:(0,a.jsx)(h.Z.Item,{label:"Prompt "+n("Type"),children:(0,a.jsx)(p.default,{style:{width:150},value:r,onChange:e=>{o(e)},options:[{label:n("Public")+" Prompts",value:"common"},{label:n("Private")+" Prompts",value:"private"}]})}),content:(0,a.jsx)(j,{data:w,loading:g,submit:t,close:()=>{l(!1)}}),placement:"topRight",trigger:"click",open:s,onOpenChange:e=>{l(e)},children:(0,a.jsx)(i.Z,{title:n("Click_Select")+" Prompt",children:(0,a.jsx)(x.Z,{className:"bottom-[30%]"})})})})},g=n(41468),b=n(89182),N=n(80573),y=n(5392),Z=n(84553);function P(e){let{dbParam:t,setDocId:n}=(0,c.useContext)(g.p),{onUploadFinish:s,handleFinish:l}=e,o=(0,N.Z)(),[i,u]=(0,c.useState)(!1),d=async e=>{u(!0);let a=new FormData;a.append("doc_name",e.file.name),a.append("doc_file",e.file),a.append("doc_type","DOCUMENT");let r=await (0,b.Vx)((0,b.iG)(t||"default",a));if(!r[1]){u(!1);return}n(r[1]),s(),u(!1),null==l||l(!0),await o(r[1]),null==l||l(!1)};return(0,a.jsx)(Z.default,{customRequest:d,showUploadList:!1,maxCount:1,multiple:!1,className:"absolute z-10 top-2 left-2",accept:".pdf,.ppt,.pptx,.xls,.xlsx,.doc,.docx,.txt,.md",children:(0,a.jsx)(r.ZP,{loading:i,size:"small",shape:"circle",icon:(0,a.jsx)(y.Z,{})})})}var k=n(11163),C=n(82353),S=n(1051);function R(e){let{document:t}=e;switch(t.status){case"RUNNING":return(0,a.jsx)(C.Rp,{});case"FINISHED":default:return(0,a.jsx)(C.s2,{});case"FAILED":return(0,a.jsx)(S.Z,{})}}function E(e){let{documents:t,dbParam:n}=e,s=(0,k.useRouter)(),l=e=>{s.push("/knowledge/chunk/?spaceName=".concat(n,"&id=").concat(e))};return(null==t?void 0:t.length)?(0,a.jsx)("div",{className:"absolute flex overflow-scroll h-12 top-[-35px] w-full z-10",children:t.map(e=>{let t;switch(e.status){case"RUNNING":t="#2db7f5";break;case"FINISHED":default:t="#87d068";break;case"FAILED":t="#f50"}return(0,a.jsx)(i.Z,{title:e.result,children:(0,a.jsxs)(r.ZP,{style:{color:t},onClick:()=>{l(e.id)},className:"shrink flex items-center mr-3",children:[(0,a.jsx)(R,{document:e}),e.doc_name]})},e.id)})}):null}var I=function(e){let{children:t,loading:n,onSubmit:o,handleFinish:i,...u}=e,{dbParam:d,scene:m}=(0,c.useContext)(g.p),[h,p]=(0,c.useState)(""),x=(0,c.useMemo)(()=>"chat_knowledge"===m,[m]),[f,_]=(0,c.useState)([]),v=(0,c.useRef)(0);async function j(){if(!d)return null;let[e,t]=await (0,b.Vx)((0,b._Q)(d,{page:1,page_size:v.current}));_(null==t?void 0:t.data)}(0,c.useEffect)(()=>{x&&j()},[d]);let N=async()=>{v.current+=1,await j()};return(0,a.jsxs)("div",{className:"flex-1 relative",children:[(0,a.jsx)(E,{documents:f,dbParam:d}),x&&(0,a.jsx)(P,{handleFinish:i,onUploadFinish:N,className:"absolute z-10 top-2 left-2"}),(0,a.jsx)(l.default.TextArea,{className:"flex-1 ".concat(x?"pl-10":""," pr-10"),size:"large",value:h,autoSize:{minRows:1,maxRows:4},...u,onPressEnter:e=>{if(h.trim()&&13===e.keyCode){if(e.shiftKey){e.preventDefault(),p(e=>e+"\n");return}o(h),setTimeout(()=>{p("")},0)}},onChange:e=>{if("number"==typeof u.maxLength){p(e.target.value.substring(0,u.maxLength));return}p(e.target.value)}}),(0,a.jsx)(r.ZP,{className:"ml-2 flex items-center justify-center absolute right-0 bottom-0",size:"large",type:"text",loading:n,icon:(0,a.jsx)(s.Z,{}),onClick:()=>{o(h)}}),(0,a.jsx)(w,{submit:e=>{p(h+e)}}),t]})}},43446:function(e,t,n){"use strict";var a=n(1375),s=n(2453),l=n(67294),r=n(36353),c=n(41468),o=n(83454);t.Z=e=>{let{queryAgentURL:t="/api/v1/chat/completions"}=e,n=(0,l.useMemo)(()=>new AbortController,[]),{scene:i}=(0,l.useContext)(c.p),u=(0,l.useCallback)(async e=>{let{data:l,chatId:c,onMessage:u,onClose:d,onDone:m,onError:h}=e;if(!(null==l?void 0:l.user_input)&&!(null==l?void 0:l.doc_id)){s.ZP.warning(r.Z.t("no_context_tip"));return}let p={...l,conv_uid:c};if(!p.conv_uid){s.ZP.error("conv_uid 不存在,请刷新后重试");return}try{var x;await (0,a.L)("".concat(null!==(x=o.env.API_BASE_URL)&&void 0!==x?x:"").concat(t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p),signal:n.signal,openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===a.a)return},onclose(){n.abort(),null==d||d()},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t="chat_agent"===i?JSON.parse(t).vis:JSON.parse(t)}catch(e){t.replaceAll("\\n","\n")}"string"==typeof t?"[DONE]"===t?null==m||m():(null==t?void 0:t.startsWith("[ERROR]"))?null==h||h(null==t?void 0:t.replace("[ERROR]","")):null==u||u(t):(null==u||u(t),null==m||m())}})}catch(e){n.abort(),null==h||h("Sorry, We meet some error, please try agin later.",e)}},[t]);return(0,l.useEffect)(()=>()=>{n.abort()},[]),u}},80573:function(e,t,n){"use strict";var a=n(41468),s=n(67294),l=n(43446),r=n(89182);t.Z=()=>{let{history:e,setHistory:t,chatId:n,model:c,docId:o}=(0,s.useContext)(a.p),i=(0,l.Z)({queryAgentURL:"/knowledge/document/summary"}),u=(0,s.useCallback)(async e=>{let[,a]=await (0,r.Vx)((0,r.$i)(n)),s=[...a,{role:"human",context:"",model_name:c,order:0,time_stamp:0},{role:"view",context:"",model_name:c,order:0,time_stamp:0,retry:!0}],l=s.length-1;t([...s]),await i({data:{doc_id:e||o,model_name:c},chatId:n,onMessage:e=>{s[l].context=e,t([...s])}})},[e,c,o,n]);return u}},57464:function(e,t,n){"use strict";n.r(t);var a=n(85893),s=n(56155),l=n(67294),r=n(96074),c=n(75081),o=n(66309),i=n(39332),u=n(25675),d=n.n(u),m=n(89182),h=n(81799),p=n(41468),x=n(19409),f=n(67421),_=n(62418),v=n(53014),j=n(82353),w=n(94184),g=n.n(w);t.default=()=>{let e=(0,i.useRouter)(),{model:t,setModel:n}=(0,l.useContext)(p.p),{t:u}=(0,f.$G)(),[w,b]=(0,l.useState)(!1),[N,y]=(0,l.useState)(!1),{data:Z=[]}=(0,s.Z)(async()=>{y(!0);let[,e]=await (0,m.Vx)((0,m.CU)());return y(!1),null!=e?e:[]}),P=async n=>{b(!0);let[,a]=await (0,m.Vx)((0,m.sW)({chat_mode:"chat_normal"}));a&&(localStorage.setItem(_.rU,JSON.stringify({id:a.conv_uid,message:n})),e.push("/chat/?scene=chat_normal&id=".concat(a.conv_uid).concat(t?"&model=".concat(t):""))),b(!1)},k=async n=>{if(n.show_disable)return;let[,a]=await (0,m.Vx)((0,m.sW)({chat_mode:"chat_normal"}));a&&e.push("/chat?scene=".concat(n.chat_scene,"&id=").concat(a.conv_uid).concat(t?"&model=".concat(t):""))};return(0,a.jsx)("div",{className:"px-4 h-screen flex flex-col justify-center items-center overflow-hidden",children:(0,a.jsxs)("div",{className:"max-w-3xl max-h-screen overflow-y-auto",children:[(0,a.jsx)(d(),{src:"/LOGO.png",alt:"Revolutionizing Database Interactions with Private LLM Technology",width:856,height:160,className:"w-full mt-4",unoptimized:!0}),(0,a.jsx)(r.Z,{className:"!text-[#878c93] !my-6",plain:!0,children:u("Quick_Start")}),(0,a.jsx)(c.Z,{spinning:N,children:(0,a.jsx)("div",{className:"flex flex-wrap -m-1 md:-m-2",children:Z.map(e=>(0,a.jsx)("div",{className:"w-full sm:w-1/2 p-1 md:p-2",onClick:()=>{k(e)},children:(0,a.jsxs)("div",{className:g()("flex flex-row justify-center h-[102px] min-h-min bg-white dark:bg-[#232734] dark:text-white rounded p-4 cursor-pointer hover:-translate-y-1 transition-[transform_shadow] duration-300 hover:shadow-[0_14px_20px_-10px_rgba(100,100,100,.1)]",{"grayscale !cursor-no-drop":e.show_disable}),children:[function(e){switch(e){case"chat_knowledge":return(0,a.jsx)(v.Z,{className:"w-10 h-10 mr-4 p-1",component:j.je});case"chat_with_db_execute":return(0,a.jsx)(v.Z,{className:"w-10 h-10 mr-4 p-1",component:j.zM});case"chat_excel":return(0,a.jsx)(v.Z,{className:"w-10 h-10 mr-4 p-1",component:j.DL});case"chat_with_db_qa":return(0,a.jsx)(v.Z,{className:"w-10 h-10 mr-4 p-1",component:j.RD});case"chat_dashboard":return(0,a.jsx)(v.Z,{className:"w-10 h-10 mr-4 p-1",component:j.In});case"chat_agent":return(0,a.jsx)(v.Z,{className:"w-10 h-10 mr-4 p-1",component:j.si});case"dbgpt_chat":return(0,a.jsx)(v.Z,{className:"w-10 h-10 mr-4 p-1",component:j.O7});default:return null}}(e.chat_scene),(0,a.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,a.jsxs)("h2",{className:"flex items-center text-lg font-sans font-semibold",children:[e.scene_name,e.show_disable&&(0,a.jsx)(o.Z,{className:"ml-2",children:"Comming soon"})]}),(0,a.jsx)("p",{className:"opacity-80 line-clamp-2",children:e.scene_describe})]})]})},e.chat_scene))})}),(0,a.jsx)("div",{className:"mt-8 mb-2",children:(0,a.jsx)(h.Z,{onChange:e=>{n(e)}})}),(0,a.jsx)("div",{className:"flex flex-1 w-full mb-4",children:(0,a.jsx)(x.Z,{loading:w,onSubmit:P})})]})})}},30119:function(e,t,n){"use strict";n.d(t,{Tk:function(){return o},PR:function(){return i}});var a=n(2453),s=n(6154),l=n(83454);let r=s.default.create({baseURL:l.env.API_BASE_URL});r.defaults.timeout=1e4,r.interceptors.response.use(e=>e.data,e=>Promise.reject(e)),n(96486);let c={"content-type":"application/json"},o=(e,t)=>{if(t){let n=Object.keys(t).filter(e=>void 0!==t[e]&&""!==t[e]).map(e=>"".concat(e,"=").concat(t[e])).join("&");n&&(e+="?".concat(n))}return r.get("/api"+e,{headers:c}).then(e=>e).catch(e=>{a.ZP.error(e),Promise.reject(e)})},i=(e,t)=>r.post(e,t,{headers:c}).then(e=>e).catch(e=>{a.ZP.error(e),Promise.reject(e)})}},function(e){e.O(0,[3662,2185,5503,1009,9479,1647,4553,411,2487,9305,1353,9774,2888,179],function(){return e(e.s=48312)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dbgpt/app/static/_next/static/chunks/pages/index-11135322ea50180f.js b/dbgpt/app/static/_next/static/chunks/pages/index-11135322ea50180f.js new file mode 100644 index 000000000..99ab19f96 --- /dev/null +++ b/dbgpt/app/static/_next/static/chunks/pages/index-11135322ea50180f.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{48312:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(57464)}])},81799:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var a=n(85893),s=n(41468),l=n(51009),r=n(19284),c=n(25675),o=n.n(c),i=n(67294),u=n(67421);function d(e,t){var n;let{width:s,height:l}=t||{};return e?(0,a.jsx)(o(),{className:"rounded-full border border-gray-200 object-contain bg-white inline-block",width:s||24,height:l||24,src:(null===(n=r.H[e])||void 0===n?void 0:n.icon)||"/models/huggingface.svg",alt:"llm"}):null}t.Z=function(e){let{onChange:t}=e,{t:n}=(0,u.$G)(),{modelList:c,model:o}=(0,i.useContext)(s.p);return!c||c.length<=0?null:(0,a.jsx)(l.default,{value:o,placeholder:n("choose_model"),className:"w-52",onChange:e=>{null==t||t(e)},children:c.map(e=>{var t;return(0,a.jsx)(l.default.Option,{children:(0,a.jsxs)("div",{className:"flex items-center",children:[d(e),(0,a.jsx)("span",{className:"ml-2",children:(null===(t=r.H[e])||void 0===t?void 0:t.label)||e})]})},e)})})}},19409:function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var a=n(85893),s=n(27496),l=n(79531),r=n(71577),c=n(67294),o=n(2487),i=n(83062),u=n(2453),d=n(46735),m=n(55241),h=n(39479),p=n(51009),x=n(58299),f=n(56155),_=n(30119),j=n(67421);let v=e=>{let{data:t,loading:n,submit:s,close:l}=e,{t:r}=(0,j.$G)(),c=e=>()=>{s(e),l()};return(0,a.jsx)("div",{style:{maxHeight:400,overflow:"auto"},children:(0,a.jsx)(o.Z,{dataSource:null==t?void 0:t.data,loading:n,rowKey:e=>e.prompt_name,renderItem:e=>(0,a.jsx)(o.Z.Item,{onClick:c(e.content),children:(0,a.jsx)(i.Z,{title:e.content,children:(0,a.jsx)(o.Z.Item.Meta,{style:{cursor:"copy"},title:e.prompt_name,description:r("Prompt_Info_Scene")+":".concat(e.chat_scene,",")+r("Prompt_Info_Sub_Scene")+":".concat(e.sub_chat_scene)})})},e.prompt_name)})})};var w=e=>{let{submit:t}=e,{t:n}=(0,j.$G)(),[s,l]=(0,c.useState)(!1),[r,o]=(0,c.useState)("common"),{data:w,loading:g}=(0,f.Z)(()=>(0,_.PR)("/prompt/list",{prompt_type:r}),{refreshDeps:[r],onError:e=>{u.ZP.error(null==e?void 0:e.message)}});return(0,a.jsx)(d.ZP,{theme:{components:{Popover:{minWidth:250}}},children:(0,a.jsx)(m.Z,{title:(0,a.jsx)(h.Z.Item,{label:"Prompt "+n("Type"),children:(0,a.jsx)(p.default,{style:{width:150},value:r,onChange:e=>{o(e)},options:[{label:n("Public")+" Prompts",value:"common"},{label:n("Private")+" Prompts",value:"private"}]})}),content:(0,a.jsx)(v,{data:w,loading:g,submit:t,close:()=>{l(!1)}}),placement:"topRight",trigger:"click",open:s,onOpenChange:e=>{l(e)},children:(0,a.jsx)(i.Z,{title:n("Click_Select")+" Prompt",children:(0,a.jsx)(x.Z,{className:"bottom-[30%]"})})})})},g=n(41468),b=n(89182),N=n(80573),y=n(5392),Z=n(84553);function P(e){let{dbParam:t,setDocId:n}=(0,c.useContext)(g.p),{onUploadFinish:s,handleFinish:l}=e,o=(0,N.Z)(),[i,u]=(0,c.useState)(!1),d=async e=>{u(!0);let a=new FormData;a.append("doc_name",e.file.name),a.append("doc_file",e.file),a.append("doc_type","DOCUMENT");let r=await (0,b.Vx)((0,b.iG)(t||"default",a));if(!r[1]){u(!1);return}n(r[1]),s(),u(!1),null==l||l(!0),await o(r[1]),null==l||l(!1)};return(0,a.jsx)(Z.default,{customRequest:d,showUploadList:!1,maxCount:1,multiple:!1,className:"absolute z-10 top-2 left-2",accept:".pdf,.ppt,.pptx,.xls,.xlsx,.doc,.docx,.txt,.md",children:(0,a.jsx)(r.ZP,{loading:i,size:"small",shape:"circle",icon:(0,a.jsx)(y.Z,{})})})}var k=n(11163),C=n(82353),S=n(1051);function R(e){let{document:t}=e;switch(t.status){case"RUNNING":return(0,a.jsx)(C.Rp,{});case"FINISHED":default:return(0,a.jsx)(C.s2,{});case"FAILED":return(0,a.jsx)(S.Z,{})}}function E(e){let{documents:t,dbParam:n}=e,s=(0,k.useRouter)(),l=e=>{s.push("/knowledge/chunk/?spaceName=".concat(n,"&id=").concat(e))};return(null==t?void 0:t.length)?(0,a.jsx)("div",{className:"absolute flex overflow-scroll h-12 top-[-35px] w-full z-10",children:t.map(e=>{let t;switch(e.status){case"RUNNING":t="#2db7f5";break;case"FINISHED":default:t="#87d068";break;case"FAILED":t="#f50"}return(0,a.jsx)(i.Z,{title:e.result,children:(0,a.jsxs)(r.ZP,{style:{color:t},onClick:()=>{l(e.id)},className:"shrink flex items-center mr-3",children:[(0,a.jsx)(R,{document:e}),e.doc_name]})},e.id)})}):null}var I=function(e){let{children:t,loading:n,onSubmit:o,handleFinish:i,...u}=e,{dbParam:d,scene:m}=(0,c.useContext)(g.p),[h,p]=(0,c.useState)(""),x=(0,c.useMemo)(()=>"chat_knowledge"===m,[m]),[f,_]=(0,c.useState)([]),j=(0,c.useRef)(0);async function v(){if(!d)return null;let[e,t]=await (0,b.Vx)((0,b._Q)(d,{page:1,page_size:j.current}));_(null==t?void 0:t.data)}(0,c.useEffect)(()=>{x&&v()},[d]);let N=async()=>{j.current+=1,await v()};return(0,a.jsxs)("div",{className:"flex-1 relative",children:[(0,a.jsx)(E,{documents:f,dbParam:d}),x&&(0,a.jsx)(P,{handleFinish:i,onUploadFinish:N,className:"absolute z-10 top-2 left-2"}),(0,a.jsx)(l.default.TextArea,{className:"flex-1 ".concat(x?"pl-10":""," pr-10"),size:"large",value:h,autoSize:{minRows:1,maxRows:4},...u,onPressEnter:e=>{if(h.trim()&&13===e.keyCode){if(e.shiftKey){e.preventDefault(),p(e=>e+"\n");return}o(h),setTimeout(()=>{p("")},0)}},onChange:e=>{if("number"==typeof u.maxLength){p(e.target.value.substring(0,u.maxLength));return}p(e.target.value)}}),(0,a.jsx)(r.ZP,{className:"ml-2 flex items-center justify-center absolute right-0 bottom-0",size:"large",type:"text",loading:n,icon:(0,a.jsx)(s.Z,{}),onClick:()=>{o(h)}}),(0,a.jsx)(w,{submit:e=>{p(h+e)}}),t]})}},43446:function(e,t,n){"use strict";var a=n(1375),s=n(2453),l=n(67294),r=n(36353),c=n(41468);t.Z=e=>{let{queryAgentURL:t="/api/v1/chat/completions"}=e,n=(0,l.useMemo)(()=>new AbortController,[]),{scene:o}=(0,l.useContext)(c.p),i=(0,l.useCallback)(async e=>{let{data:l,chatId:c,onMessage:i,onClose:u,onDone:d,onError:m}=e;if(!(null==l?void 0:l.user_input)&&!(null==l?void 0:l.doc_id)){s.ZP.warning(r.Z.t("no_context_tip"));return}let h={...l,conv_uid:c};if(!h.conv_uid){s.ZP.error("conv_uid 不存在,请刷新后重试");return}try{var p;await (0,a.L)("".concat((p="http://127.0.0.1:5670",void 0!==p)?p:"").concat(t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h),signal:n.signal,openWhenHidden:!0,async onopen(e){if(e.ok&&e.headers.get("content-type")===a.a)return},onclose(){n.abort(),null==u||u()},onerror(e){throw Error(e)},onmessage:e=>{let t=e.data;try{t="chat_agent"===o?JSON.parse(t).vis:JSON.parse(t)}catch(e){t.replaceAll("\\n","\n")}"string"==typeof t?"[DONE]"===t?null==d||d():(null==t?void 0:t.startsWith("[ERROR]"))?null==m||m(null==t?void 0:t.replace("[ERROR]","")):null==i||i(t):(null==i||i(t),null==d||d())}})}catch(e){n.abort(),null==m||m("Sorry, We meet some error, please try agin later.",e)}},[t]);return(0,l.useEffect)(()=>()=>{n.abort()},[]),i}},80573:function(e,t,n){"use strict";var a=n(41468),s=n(67294),l=n(43446),r=n(89182);t.Z=()=>{let{history:e,setHistory:t,chatId:n,model:c,docId:o}=(0,s.useContext)(a.p),i=(0,l.Z)({queryAgentURL:"/knowledge/document/summary"}),u=(0,s.useCallback)(async e=>{let[,a]=await (0,r.Vx)((0,r.$i)(n)),s=[...a,{role:"human",context:"",model_name:c,order:0,time_stamp:0},{role:"view",context:"",model_name:c,order:0,time_stamp:0,retry:!0}],l=s.length-1;t([...s]),await i({data:{doc_id:e||o,model_name:c},chatId:n,onMessage:e=>{s[l].context=e,t([...s])}})},[e,c,o,n]);return u}},57464:function(e,t,n){"use strict";n.r(t);var a=n(85893),s=n(56155),l=n(67294),r=n(96074),c=n(75081),o=n(66309),i=n(39332),u=n(25675),d=n.n(u),m=n(89182),h=n(81799),p=n(41468),x=n(19409),f=n(67421),_=n(62418),j=n(53014),v=n(82353),w=n(94184),g=n.n(w);t.default=()=>{let e=(0,i.useRouter)(),{model:t,setModel:n}=(0,l.useContext)(p.p),{t:u}=(0,f.$G)(),[w,b]=(0,l.useState)(!1),[N,y]=(0,l.useState)(!1),{data:Z=[]}=(0,s.Z)(async()=>{y(!0);let[,e]=await (0,m.Vx)((0,m.CU)());return y(!1),null!=e?e:[]}),P=async n=>{b(!0);let[,a]=await (0,m.Vx)((0,m.sW)({chat_mode:"chat_normal"}));a&&(localStorage.setItem(_.rU,JSON.stringify({id:a.conv_uid,message:n})),e.push("/chat/?scene=chat_normal&id=".concat(a.conv_uid).concat(t?"&model=".concat(t):""))),b(!1)},k=async n=>{if(n.show_disable)return;let[,a]=await (0,m.Vx)((0,m.sW)({chat_mode:"chat_normal"}));a&&e.push("/chat?scene=".concat(n.chat_scene,"&id=").concat(a.conv_uid).concat(t?"&model=".concat(t):""))};return(0,a.jsx)("div",{className:"px-4 h-screen flex flex-col justify-center items-center overflow-hidden",children:(0,a.jsxs)("div",{className:"max-w-3xl max-h-screen overflow-y-auto",children:[(0,a.jsx)(d(),{src:"/LOGO.png",alt:"Revolutionizing Database Interactions with Private LLM Technology",width:856,height:160,className:"w-full mt-4",unoptimized:!0}),(0,a.jsx)(r.Z,{className:"!text-[#878c93] !my-6",plain:!0,children:u("Quick_Start")}),(0,a.jsx)(c.Z,{spinning:N,children:(0,a.jsx)("div",{className:"flex flex-wrap -m-1 md:-m-2",children:Z.map(e=>(0,a.jsx)("div",{className:"w-full sm:w-1/2 p-1 md:p-2",onClick:()=>{k(e)},children:(0,a.jsxs)("div",{className:g()("flex flex-row justify-center h-[102px] min-h-min bg-white dark:bg-[#232734] dark:text-white rounded p-4 cursor-pointer hover:-translate-y-1 transition-[transform_shadow] duration-300 hover:shadow-[0_14px_20px_-10px_rgba(100,100,100,.1)]",{"grayscale !cursor-no-drop":e.show_disable}),children:[function(e){switch(e){case"chat_knowledge":return(0,a.jsx)(j.Z,{className:"w-10 h-10 mr-4 p-1",component:v.je});case"chat_with_db_execute":return(0,a.jsx)(j.Z,{className:"w-10 h-10 mr-4 p-1",component:v.zM});case"chat_excel":return(0,a.jsx)(j.Z,{className:"w-10 h-10 mr-4 p-1",component:v.DL});case"chat_with_db_qa":return(0,a.jsx)(j.Z,{className:"w-10 h-10 mr-4 p-1",component:v.RD});case"chat_dashboard":return(0,a.jsx)(j.Z,{className:"w-10 h-10 mr-4 p-1",component:v.In});case"chat_agent":return(0,a.jsx)(j.Z,{className:"w-10 h-10 mr-4 p-1",component:v.si});case"dbgpt_chat":return(0,a.jsx)(j.Z,{className:"w-10 h-10 mr-4 p-1",component:v.O7});default:return null}}(e.chat_scene),(0,a.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,a.jsxs)("h2",{className:"flex items-center text-lg font-sans font-semibold",children:[e.scene_name,e.show_disable&&(0,a.jsx)(o.Z,{className:"ml-2",children:"Comming soon"})]}),(0,a.jsx)("p",{className:"opacity-80 line-clamp-2",children:e.scene_describe})]})]})},e.chat_scene))})}),(0,a.jsx)("div",{className:"mt-8 mb-2",children:(0,a.jsx)(h.Z,{onChange:e=>{n(e)}})}),(0,a.jsx)("div",{className:"flex flex-1 w-full mb-4",children:(0,a.jsx)(x.Z,{loading:w,onSubmit:P})})]})})}},30119:function(e,t,n){"use strict";n.d(t,{Tk:function(){return c},PR:function(){return o}});var a=n(2453),s=n(6154);let l=s.default.create({baseURL:"http://127.0.0.1:5670"});l.defaults.timeout=1e4,l.interceptors.response.use(e=>e.data,e=>Promise.reject(e)),n(96486);let r={"content-type":"application/json"},c=(e,t)=>{if(t){let n=Object.keys(t).filter(e=>void 0!==t[e]&&""!==t[e]).map(e=>"".concat(e,"=").concat(t[e])).join("&");n&&(e+="?".concat(n))}return l.get("/api"+e,{headers:r}).then(e=>e).catch(e=>{a.ZP.error(e),Promise.reject(e)})},o=(e,t)=>l.post(e,t,{headers:r}).then(e=>e).catch(e=>{a.ZP.error(e),Promise.reject(e)})}},function(e){e.O(0,[3662,2185,5503,1009,9479,1647,4553,411,2487,9305,1353,9774,2888,179],function(){return e(e.s=48312)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dbgpt/app/static/_next/static/chunks/webpack-392ef02c5aff6027.js b/dbgpt/app/static/_next/static/chunks/webpack-db6919b6d77917ad.js similarity index 97% rename from dbgpt/app/static/_next/static/chunks/webpack-392ef02c5aff6027.js rename to dbgpt/app/static/_next/static/chunks/webpack-db6919b6d77917ad.js index 28fa6e965..5cc24c129 100644 --- a/dbgpt/app/static/_next/static/chunks/webpack-392ef02c5aff6027.js +++ b/dbgpt/app/static/_next/static/chunks/webpack-db6919b6d77917ad.js @@ -1 +1 @@ -!function(){"use strict";var e,t,c,a,n,f,r,d,o,b,u,i,s={},l={};function h(e){var t=l[e];if(void 0!==t)return t.exports;var c=l[e]={id:e,loaded:!1,exports:{}},a=!0;try{s[e].call(c.exports,c,c.exports,h),a=!1}finally{a&&delete l[e]}return c.loaded=!0,c.exports}h.m=s,h.amdO={},e=[],h.O=function(t,c,a,n){if(c){n=n||0;for(var f=e.length;f>0&&e[f-1][2]>n;f--)e[f]=e[f-1];e[f]=[c,a,n];return}for(var r=1/0,f=0;f=n&&Object.keys(h.O).every(function(e){return h.O[e](c[o])})?c.splice(o--,1):(d=!1,n0&&e[f-1][2]>n;f--)e[f]=e[f-1];e[f]=[c,a,n];return}for(var r=1/0,f=0;f=n&&Object.keys(h.O).every(function(e){return h.O[e](c[o])})?c.splice(o--,1):(d=!1,n
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/app/index.html b/dbgpt/app/static/app/index.html index 19880b258..3467d2d41 100644 --- a/dbgpt/app/static/app/index.html +++ b/dbgpt/app/static/app/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/chat/index.html b/dbgpt/app/static/chat/index.html index 4d84a700f..a089f1f6f 100644 --- a/dbgpt/app/static/chat/index.html +++ b/dbgpt/app/static/chat/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/database/index.html b/dbgpt/app/static/database/index.html index df61974ce..58149a7e7 100644 --- a/dbgpt/app/static/database/index.html +++ b/dbgpt/app/static/database/index.html @@ -1 +1 @@ -
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.

ApacheDoris

ApacheDoris

A new-generation open-source real-time data warehouse.

StarRocks

StarRocks

An Open-Source, High-Performance Analytical Database.

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.

Vertica

Vertica

Vertica is a strongly consistent, ACID-compliant, SQL data warehouse, built for the scale and complexity of today’s data-driven world.

Spark

Spark

Unified engine for large-scale data analytics.

Hive

Hive

A distributed fault-tolerant data warehouse system.

Space

Space

knowledge analytics.

TuGraph

TuGraph

TuGraph is a high-performance graph database jointly developed by Ant Group and Tsinghua University.

\ No newline at end of file +
MySQL

MySQL

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

OceanBase

OceanBase

An Ultra-Fast & Cost-Effective Distributed SQL Database.

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.

ApacheDoris

ApacheDoris

A new-generation open-source real-time data warehouse.

StarRocks

StarRocks

An Open-Source, High-Performance Analytical Database.

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.

Vertica

Vertica

Vertica is a strongly consistent, ACID-compliant, SQL data warehouse, built for the scale and complexity of today’s data-driven world.

Spark

Spark

Unified engine for large-scale data analytics.

Hive

Hive

A distributed fault-tolerant data warehouse system.

Space

Space

knowledge analytics.

TuGraph

TuGraph

TuGraph is a high-performance graph database jointly developed by Ant Group and Tsinghua University.

\ No newline at end of file diff --git a/dbgpt/app/static/flow/canvas/index.html b/dbgpt/app/static/flow/canvas/index.html index 11cb608be..4f88f4e66 100644 --- a/dbgpt/app/static/flow/canvas/index.html +++ b/dbgpt/app/static/flow/canvas/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/flow/index.html b/dbgpt/app/static/flow/index.html index 0e57bcd3c..867d3ab9f 100644 --- a/dbgpt/app/static/flow/index.html +++ b/dbgpt/app/static/flow/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/icons/oceanbase.png b/dbgpt/app/static/icons/oceanbase.png new file mode 100644 index 000000000..9d43ce829 Binary files /dev/null and b/dbgpt/app/static/icons/oceanbase.png differ diff --git a/dbgpt/app/static/index.html b/dbgpt/app/static/index.html index 8d4dd1924..e2832cd46 100644 --- a/dbgpt/app/static/index.html +++ b/dbgpt/app/static/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/knowledge/chunk/index.html b/dbgpt/app/static/knowledge/chunk/index.html index 21631b8f3..7d8e5a431 100644 --- a/dbgpt/app/static/knowledge/chunk/index.html +++ b/dbgpt/app/static/knowledge/chunk/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/knowledge/graph/index.html b/dbgpt/app/static/knowledge/graph/index.html index f2a630bcb..6485a74ce 100644 --- a/dbgpt/app/static/knowledge/graph/index.html +++ b/dbgpt/app/static/knowledge/graph/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/knowledge/index.html b/dbgpt/app/static/knowledge/index.html index 5c5dad6b9..0f3060aaa 100644 --- a/dbgpt/app/static/knowledge/index.html +++ b/dbgpt/app/static/knowledge/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/models/index.html b/dbgpt/app/static/models/index.html index ed536cd3c..517a3a572 100644 --- a/dbgpt/app/static/models/index.html +++ b/dbgpt/app/static/models/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/prompt/index.html b/dbgpt/app/static/prompt/index.html index ef46b3cbe..6f81af638 100644 --- a/dbgpt/app/static/prompt/index.html +++ b/dbgpt/app/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 diff --git a/dbgpt/datasource/manages/connector_manager.py b/dbgpt/datasource/manages/connector_manager.py index fb9a2a4d9..debbc3481 100644 --- a/dbgpt/datasource/manages/connector_manager.py +++ b/dbgpt/datasource/manages/connector_manager.py @@ -49,6 +49,7 @@ def on_init(self): from dbgpt.datasource.rdbms.conn_hive import HiveConnector # noqa: F401 from dbgpt.datasource.rdbms.conn_mssql import MSSQLConnector # noqa: F401 from dbgpt.datasource.rdbms.conn_mysql import MySQLConnector # noqa: F401 + from dbgpt.datasource.rdbms.conn_oceanbase import OceanBaseConnect # noqa: F401 from dbgpt.datasource.rdbms.conn_postgresql import ( # noqa: F401 PostgreSQLConnector, ) @@ -57,6 +58,9 @@ def on_init(self): StarRocksConnector, ) from dbgpt.datasource.rdbms.conn_vertica import VerticaConnector # noqa: F401 + from dbgpt.datasource.rdbms.dialect.oceanbase.ob_dialect import ( # noqa: F401 + OBDialect, + ) from .connect_config_db import ConnectConfigEntity # noqa: F401 diff --git a/dbgpt/datasource/rdbms/conn_oceanbase.py b/dbgpt/datasource/rdbms/conn_oceanbase.py new file mode 100644 index 000000000..0eb81de8c --- /dev/null +++ b/dbgpt/datasource/rdbms/conn_oceanbase.py @@ -0,0 +1,37 @@ +"""Ocean base connect.""" + +import logging + +from dbgpt.datasource.rdbms.base import RDBMSConnector + +logger = logging.getLogger(__name__) + + +class OceanBaseConnect(RDBMSConnector): + """Connect Oceanbase Database fetch MetaData. + + Args: + Usage: + """ + + db_type: str = "oceanbase" + db_dialect: str = "mysql" + driver: str = "mysql+ob" + + default_db = ["information_schema", "performance_schema", "sys", "mysql"] + + def get_users(self): + """Get_users.""" + return [] + + def get_grants(self): + """Get_grants.""" + return [] + + def get_collation(self): + """Get collation.""" + return "UTF-8" + + def get_charset(self): + """Get_charset.""" + return "UTF-8" diff --git a/dbgpt/datasource/rdbms/dialect/oceanbase/__init__.py b/dbgpt/datasource/rdbms/dialect/oceanbase/__init__.py new file mode 100644 index 000000000..1f14e6ff5 --- /dev/null +++ b/dbgpt/datasource/rdbms/dialect/oceanbase/__init__.py @@ -0,0 +1 @@ +"""Oceanbase connect Module.""" diff --git a/dbgpt/datasource/rdbms/dialect/oceanbase/ob_dialect.py b/dbgpt/datasource/rdbms/dialect/oceanbase/ob_dialect.py new file mode 100644 index 000000000..a4d920351 --- /dev/null +++ b/dbgpt/datasource/rdbms/dialect/oceanbase/ob_dialect.py @@ -0,0 +1,26 @@ +"""OB Dialect support.""" + +from sqlalchemy.dialects import registry +from sqlalchemy.dialects.mysql import pymysql + + +class OBDialect(pymysql.MySQLDialect_pymysql): + """OBDialect expend.""" + + def initialize(self, connection): + """Ob dialect initialize.""" + super(OBDialect, self).initialize(connection) + self._server_version_info = (5, 7, 19) + self.server_version_info = (5, 7, 19) + + def _server_version_info(self, connection): + """Ob set fixed version ending compatibility issue.""" + return (5, 7, 19) + + def get_isolation_level(self, dbapi_connection): + """Ob set fixed version ending compatibility issue.""" + self.server_version_info = (5, 7, 19) + return super(OBDialect, self).get_isolation_level(dbapi_connection) + + +registry.register("mysql.ob", __name__, "OBDialect") diff --git a/dbgpt/model/adapter/hf_adapter.py b/dbgpt/model/adapter/hf_adapter.py index d71453e54..3576bb706 100644 --- a/dbgpt/model/adapter/hf_adapter.py +++ b/dbgpt/model/adapter/hf_adapter.py @@ -315,7 +315,6 @@ def do_match(self, lower_model_name_or_path: Optional[str] = None): class Qwen2Adapter(QwenAdapter): - support_4bit: bool = True support_8bit: bool = True diff --git a/dbgpt/model/proxy/llms/zhipu.py b/dbgpt/model/proxy/llms/zhipu.py index dc1c9b666..bf33f32ef 100644 --- a/dbgpt/model/proxy/llms/zhipu.py +++ b/dbgpt/model/proxy/llms/zhipu.py @@ -99,7 +99,6 @@ def sync_generate_stream( request: ModelRequest, message_converter: Optional[MessageConverter] = None, ) -> Iterator[ModelOutput]: - request = self.local_covert_message(request, message_converter) messages = request.to_common_messages(support_system_role=False) diff --git a/dbgpt/rag/embedding/embeddings.py b/dbgpt/rag/embedding/embeddings.py index 2457cd8f7..a73cd7890 100644 --- a/dbgpt/rag/embedding/embeddings.py +++ b/dbgpt/rag/embedding/embeddings.py @@ -90,9 +90,9 @@ def __init__(self, **kwargs: Any): ) from exc kwargs["client"] = sentence_transformers.SentenceTransformer( - kwargs.get("model_name"), + kwargs.get("model_name") or DEFAULT_MODEL_NAME, cache_folder=kwargs.get("cache_folder"), - **kwargs.get("model_kwargs"), + **(kwargs.get("model_kwargs") or {}), ) super().__init__(**kwargs) diff --git a/dbgpt/rag/embedding/rerank.py b/dbgpt/rag/embedding/rerank.py index 5d901f7b9..a226f89c8 100644 --- a/dbgpt/rag/embedding/rerank.py +++ b/dbgpt/rag/embedding/rerank.py @@ -3,6 +3,7 @@ from typing import Any, Dict, List, Optional, cast import aiohttp +import numpy as np import requests from dbgpt._private.pydantic import EXTRA_FORBID, BaseModel, ConfigDict, Field @@ -16,7 +17,7 @@ class CrossEncoderRerankEmbeddings(BaseModel, RerankEmbeddings): client: Any #: :meta private: model_name: str = "BAAI/bge-reranker-base" - max_length: Optional[int] = None + max_length: int """Max length for input sequences. Longer sequences will be truncated. If None, max length of the model will be used""" """Model name to use.""" @@ -33,9 +34,9 @@ def __init__(self, **kwargs: Any): ) kwargs["client"] = CrossEncoder( - kwargs.get("model_name"), + kwargs.get("model_name", "BAAI/bge-reranker-base"), max_length=kwargs.get("max_length"), - **kwargs.get("model_kwargs"), + **(kwargs.get("model_kwargs") or {}), ) super().__init__(**kwargs) @@ -54,7 +55,9 @@ def predict(self, query: str, candidates: List[str]) -> List[float]: query_content_pairs = [[query, candidate] for candidate in candidates] _model = cast(CrossEncoder, self.client) rank_scores = _model.predict(sentences=query_content_pairs) - return rank_scores.tolist() + if isinstance(rank_scores, np.ndarray): + rank_scores = rank_scores.tolist() + return rank_scores class OpenAPIRerankEmbeddings(BaseModel, RerankEmbeddings): diff --git a/dbgpt/rag/retriever/rerank.py b/dbgpt/rag/retriever/rerank.py index 39485d835..a328cae33 100644 --- a/dbgpt/rag/retriever/rerank.py +++ b/dbgpt/rag/retriever/rerank.py @@ -244,8 +244,8 @@ def rank( contents = [candidate.content for candidate in candidates_with_scores] query_content_pairs = [ [ - query, - content, + query if query is not None else "", + content if content is not None else "", ] for content in contents ] diff --git a/dbgpt/storage/schema.py b/dbgpt/storage/schema.py index be604dea5..6052de228 100644 --- a/dbgpt/storage/schema.py +++ b/dbgpt/storage/schema.py @@ -16,8 +16,8 @@ def __init__(self, name, is_file_db: bool = False): class DBType(Enum): """Database type enumeration.""" - Mysql = DbInfo("mysql") - OCeanBase = DbInfo("oceanbase") + MySQL = DbInfo("mysql") + OceanBase = DbInfo("oceanbase") DuckDb = DbInfo("duckdb", True) SQLite = DbInfo("sqlite", True) Oracle = DbInfo("oracle") diff --git a/examples/agents/sql_agent_dialogue_example.py b/examples/agents/sql_agent_dialogue_example.py index fea102f18..b6dbfc79a 100644 --- a/examples/agents/sql_agent_dialogue_example.py +++ b/examples/agents/sql_agent_dialogue_example.py @@ -30,7 +30,6 @@ async def main(): - from dbgpt.model.proxy import OpenAILLMClient llm_client = OpenAILLMClient(model_alias="gpt-3.5-turbo") diff --git a/web/public/icons/oceanbase.png b/web/public/icons/oceanbase.png new file mode 100644 index 000000000..9d43ce829 Binary files /dev/null and b/web/public/icons/oceanbase.png differ diff --git a/web/utils/constants.ts b/web/utils/constants.ts index 8c5876da4..11c594b58 100644 --- a/web/utils/constants.ts +++ b/web/utils/constants.ts @@ -45,6 +45,7 @@ export const MODEL_ICON_MAP: Record export const dbMapper: Record = { mysql: { label: 'MySQL', icon: '/icons/mysql.png', desc: 'Fast, reliable, scalable open-source relational database management system.' }, + oceanbase: { label: 'OceanBase', icon: '/icons/oceanbase.png', desc: 'An Ultra-Fast & Cost-Effective Distributed SQL Database.' }, 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.' },