From 6c3c7c39914679f56b3032076acabf3be7ee6a45 Mon Sep 17 00:00:00 2001 From: Zain Hoda <7146154+zainhoda@users.noreply.github.com> Date: Tue, 4 Jun 2024 10:18:07 -0400 Subject: [PATCH] functions --- src/vanna/advanced/__init__.py | 16 ++ src/vanna/flask/__init__.py | 131 +++++++++++++- src/vanna/flask/assets.py | 52 ++++-- src/vanna/vannadb/vannadb_vector.py | 260 +++++++++++++++++++++++++++- 4 files changed, 435 insertions(+), 24 deletions(-) create mode 100644 src/vanna/advanced/__init__.py diff --git a/src/vanna/advanced/__init__.py b/src/vanna/advanced/__init__.py new file mode 100644 index 00000000..8cf0612c --- /dev/null +++ b/src/vanna/advanced/__init__.py @@ -0,0 +1,16 @@ +from abc import ABC, abstractmethod + + +class VannaAdvanced(ABC): + def __init__(self, vanna_kb: str, vanna_api_key: str, config=None): + self.vanna_kb = vanna_kb + self.vanna_api_key = vanna_api_key + self.config = config + + @abstractmethod + def get_function(self, question: str, additional_data: dict = {}) -> dict: + pass + + @abstractmethod + def create_function(self, question: str, sql: str, plotly_code: str, **kwargs) -> dict: + pass diff --git a/src/vanna/flask/__init__.py b/src/vanna/flask/__init__.py index 2b54cf2a..5177561a 100644 --- a/src/vanna/flask/__init__.py +++ b/src/vanna/flask/__init__.py @@ -1,5 +1,6 @@ import json import logging +import os import sys import uuid from abc import ABC, abstractmethod @@ -7,7 +8,7 @@ import flask import requests -from flask import Flask, Response, jsonify, request +from flask import Flask, Response, jsonify, request, send_from_directory from flask_sock import Sock from .assets import css_content, html_content, js_content @@ -151,7 +152,10 @@ def __init__(self, vn, cache: Cache = MemoryCache(), auto_fix_sql=True, ask_results_correct=True, followup_questions=True, - summarization=True + summarization=True, + function_generation=True, + index_html_path=None, + assets_folder=None, ): """ Expose a Flask app that can be used to interact with a Vanna instance. @@ -176,6 +180,8 @@ def __init__(self, vn, cache: Cache = MemoryCache(), ask_results_correct: Whether to ask the user if the results are correct. Defaults to True. followup_questions: Whether to show followup questions. Defaults to True. summarization: Whether to show summarization. Defaults to True. + index_html_path: Path to the index.html. Defaults to None, which will use the default index.html + assets_folder: The location where you'd like to serve the static assets from. Defaults to None, which will use hardcoded Python variables. Returns: None @@ -202,6 +208,9 @@ def __init__(self, vn, cache: Cache = MemoryCache(), self.ask_results_correct = ask_results_correct self.followup_questions = followup_questions self.summarization = summarization + self.function_generation = function_generation and hasattr(vn, "get_function") + self.index_html_path = index_html_path + self.assets_folder = assets_folder log = logging.getLogger("werkzeug") log.setLevel(logging.ERROR) @@ -247,6 +256,7 @@ def get_config(user: any): "ask_results_correct": self.ask_results_correct, "followup_questions": self.followup_questions, "summarization": self.summarization, + "function_generation": self.function_generation, } config = self.auth.override_config_for_user(user, config) @@ -345,6 +355,56 @@ def generate_sql(user: any): } ) + @self.flask_app.route("/api/v0/get_function", methods=["GET"]) + @self.requires_auth + def get_function(user: any): + question = flask.request.args.get("question") + + if question is None: + return jsonify({"type": "error", "error": "No question provided"}) + + if not hasattr(vn, "get_function"): + return jsonify({"type": "error", "error": "This setup does not support function generation."}) + + id = self.cache.generate_id(question=question) + function = vn.get_function(question=question) + + if function is None: + return jsonify({"type": "error", "error": "No function found"}) + + if 'instantiated_sql' not in function: + self.vn.log(f"No instantiated SQL found for {question} in {function}") + return jsonify({"type": "error", "error": "No instantiated SQL found"}) + + self.cache.set(id=id, field="question", value=question) + self.cache.set(id=id, field="sql", value=function['instantiated_sql']) + + if 'instantiated_post_processing_code' in function and function['instantiated_post_processing_code'] is not None and len(function['instantiated_post_processing_code']) > 0: + self.cache.set(id=id, field="plotly_code", value=function['instantiated_post_processing_code']) + + return jsonify( + { + "type": "function", + "id": id, + "function": function, + } + ) + + @self.flask_app.route("/api/v0/get_all_functions", methods=["GET"]) + @self.requires_auth + def get_all_functions(user: any): + if not hasattr(vn, "get_all_functions"): + return jsonify({"type": "error", "error": "This setup does not support function generation."}) + + functions = vn.get_all_functions() + + return jsonify( + { + "type": "functions", + "functions": functions, + } + ) + @self.flask_app.route("/api/v0/run_sql", methods=["GET"]) @self.requires_auth @self.requires_cache(["sql"]) @@ -438,11 +498,18 @@ def generate_plotly_figure(user: any, id: str, df, question, sql): question = f"{question}. When generating the chart, use these special instructions: {chart_instructions}" try: - code = vn.generate_plotly_code( - question=question, - sql=sql, - df_metadata=f"Running df.dtypes gives:\n {df.dtypes}", - ) + # If chart_instructions is not set then attempt to retrieve the code from the cache + if chart_instructions is None or len(chart_instructions) == 0: + code = self.cache.get(id=id, field="plotly_code") + + if code is None: + code = vn.generate_plotly_code( + question=question, + sql=sql, + df_metadata=f"Running df.dtypes gives:\n {df.dtypes}", + ) + self.cache.set(id=id, field="plotly_code", value=code) + fig = vn.get_plotly_figure(plotly_code=code, df=df, dark_mode=False) fig_json = fig.to_json() @@ -518,6 +585,49 @@ def add_training_data(user: any): print("TRAINING ERROR", e) return jsonify({"type": "error", "error": str(e)}) + @self.flask_app.route("/api/v0/create_function", methods=["POST"]) + @self.requires_auth + def create_function(user: any): + question = flask.request.json.get("question") + sql = flask.request.json.get("sql") + id = flask.request.json.get("id") + + plotly_code = self.cache.get(id=id, field="plotly_code") + + if plotly_code is None: + plotly_code = "" + + function_data = self.vn.create_function(question=question, sql=sql, plotly_code=plotly_code) + + return jsonify( + { + "type": "function_template", + "id": id, + "function_template": function_data, + } + ) + + @self.flask_app.route("/api/v0/update_function", methods=["POST"]) + @self.requires_auth + def update_function(user: any): + old_function_name = flask.request.json.get("old_function_name") + updated_function = flask.request.json.get("updated_function") + + print("old_function_name", old_function_name) + print("updated_function", updated_function) + + updated = vn.update_function(old_function_name=old_function_name, updated_function=updated_function) + + return jsonify({"success": updated}) + + @self.flask_app.route("/api/v0/delete_function", methods=["POST"]) + @self.requires_auth + def delete_function(user: any): + function_name = flask.request.json.get("function_name") + + return jsonify({"success": vn.delete_function(function_name=function_name)}) + + @self.flask_app.route("/api/v0/generate_followup_questions", methods=["GET"]) @self.requires_auth @self.requires_cache(["df", "question", "sql"]) @@ -616,6 +726,9 @@ def catch_all(catch_all): @self.flask_app.route("/assets/") def proxy_assets(filename): + if self.assets_folder: + return send_from_directory(self.assets_folder, filename) + if ".css" in filename: return Response(css_content, mimetype="text/css") @@ -663,6 +776,10 @@ def sock_log(ws): @self.flask_app.route("/", defaults={"path": ""}) @self.flask_app.route("/") def hello(path: str): + if self.index_html_path: + directory = os.path.dirname(self.index_html_path) + filename = os.path.basename(self.index_html_path) + return send_from_directory(directory=directory, path=filename) return html_content def run(self, *args, **kwargs): diff --git a/src/vanna/flask/assets.py b/src/vanna/flask/assets.py index 91cc7391..16dc7e11 100644 --- a/src/vanna/flask/assets.py +++ b/src/vanna/flask/assets.py @@ -7,8 +7,8 @@ Vanna.AI - - + +
@@ -17,22 +17,42 @@ ''' -css_content = '''.nav-title{font-family:Roboto Slab,serif}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-px{left:1px;right:1px}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-px{bottom:1px}.end-0{inset-inline-end:0px}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-50{z-index:50}.z-\[60\]{z-index:60}.z-\[80\]{z-index:80}.-m-1{margin:-.25rem}.-m-1\.5{margin:-.375rem}.m-1{margin:.25rem}.m-3{margin:.75rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-2\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-auto{margin-bottom:auto}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-3{margin-right:.75rem}.ms-0{margin-inline-start:0px}.ms-3{margin-inline-start:.75rem}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\[2\.375rem\]{height:2.375rem}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.min-h-\[15rem\]{min-height:15rem}.min-h-\[calc\(100\%-3\.5rem\)\]{min-height:calc(100% - 3.5rem)}.w-0{width:0px}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-\[2\.375rem\]{width:2.375rem}.w-\[3\.25rem\]{width:3.25rem}.w-full{width:100%}.w-px{width:1px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-\[50rem\]{max-width:50rem}.max-w-\[85rem\]{max-width:85rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-y-4{row-gap:1rem}.-space-y-px>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(-1px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(-1px * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-md{border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.border-current{border-color:currentColor}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity))}.border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-80{--tw-bg-opacity: .8}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-12{padding-bottom:3rem}.pe-3{padding-inline-end:.75rem}.pl-7{padding-left:1.75rem}.pr-4{padding-right:1rem}.pr-9{padding-right:2.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-start{text-align:start}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-7xl{font-size:4.5rem;line-height:1}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.tracking-wide{letter-spacing:.025em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-slate-700{--tw-shadow-color: #334155;--tw-shadow: var(--tw-shadow-colored)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-transparent{--tw-ring-color: transparent}.ring-offset-white{--tw-ring-offset-color: #fff}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[--body-scroll\:true\]{--body-scroll: true}.before\:inline-block:before{content:var(--tw-content);display:inline-block}.before\:h-6:before{content:var(--tw-content);height:1.5rem}.before\:w-6:before{content:var(--tw-content);width:1.5rem}.before\:translate-x-0:before{content:var(--tw-content);--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\:transform:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\:rounded-full:before{content:var(--tw-content);border-radius:9999px}.before\:bg-white:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.before\:shadow:before{content:var(--tw-content);--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.before\:ring-0:before{content:var(--tw-content);--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.before\:transition:before{content:var(--tw-content);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.before\:duration-200:before{content:var(--tw-content);transition-duration:.2s}.before\:ease-in-out:before{content:var(--tw-content);transition-timing-function:cubic-bezier(.4,0,.2,1)}.first\:mt-0:first-child{margin-top:0}.first\:rounded-t-lg:first-child{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.last\:rounded-b-lg:last-child{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.checked\:bg-blue-600:checked{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.checked\:bg-none:checked{background-image:none}.checked\:before\:translate-x-full:checked:before{content:var(--tw-content);--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.checked\:before\:bg-blue-200:checked:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.hover\:border-green-500:hover{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity))}.hover\:border-red-500:hover{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\:bg-green-500:hover{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity))}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.hover\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity))}.hover\:text-gray-400:hover{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\:z-10:focus{z-index:10}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-blue-600:focus{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-blue-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(37 99 235 / var(--tw-ring-opacity))}.focus\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(187 247 208 / var(--tw-ring-opacity))}.focus\:ring-red-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(254 202 202 / var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\:ring-offset-white:focus{--tw-ring-offset-color: #fff}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.open.hs-overlay-open\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.open.hs-overlay-open\:opacity-100{opacity:1}.open.hs-overlay-open\:duration-500{transition-duration:.5s}.open .hs-overlay-open\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.open .hs-overlay-open\:opacity-100{opacity:1}.open .hs-overlay-open\:duration-500{transition-duration:.5s}@media (prefers-color-scheme: dark){.dark\:divide-gray-700>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.dark\:border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\:border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.dark\:bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.dark\:bg-opacity-80{--tw-bg-opacity: .8}.dark\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\:text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\:text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\:text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\:text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\:shadow-slate-700\/\[\.7\]{--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}.dark\:before\:bg-gray-400:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.dark\:checked\:border-blue-500:checked{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\:checked\:bg-blue-500:checked{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.dark\:checked\:bg-blue-600:checked{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.dark\:checked\:before\:bg-blue-200:checked:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.dark\:hover\:border-blue-400:hover{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity))}.dark\:hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:hover\:bg-neutral-700:hover{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}.dark\:hover\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.dark\:hover\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.dark\:hover\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\:hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.dark\:hover\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.dark\:hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\:focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.dark\:focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.dark\:focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.dark\:focus\:ring-gray-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}.dark\:focus\:ring-red-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity))}.dark\:focus\:ring-offset-gray-800:focus{--tw-ring-offset-color: #1f2937}}@media (min-width: 640px){.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:mb-3{margin-bottom:.75rem}.sm\:mt-10{margin-top:2.5rem}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:flex-row{flex-direction:row}.sm\:gap-3{gap:.75rem}.sm\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.sm\:p-4{padding:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-4{padding-top:1rem;padding-bottom:1rem}.sm\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-9xl{font-size:8rem;line-height:1}}@media (min-width: 768px){.md\:flex{display:flex}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:p-10{padding:2.5rem}.md\:p-5{padding:1.25rem}}@media (min-width: 1024px){.lg\:bottom-0{bottom:0}.lg\:right-auto{right:auto}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-14{padding-top:3.5rem;padding-bottom:3.5rem}.lg\:pl-64{padding-left:16rem}} +css_content = '''.nav-title{font-family:Roboto Slab,serif}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-px{left:1px;right:1px}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-px{bottom:1px}.end-0{inset-inline-end:0px}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-50{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[80\\]{z-index:80}.-m-1{margin:-.25rem}.-m-1\\.5{margin:-.375rem}.m-1{margin:.25rem}.m-3{margin:.75rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-2\\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-auto{margin-bottom:auto}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.mr-1{margin-right:.25rem}.mr-1\\.5{margin-right:.375rem}.mr-3{margin-right:.75rem}.ms-0{margin-inline-start:0px}.ms-3{margin-inline-start:.75rem}.mt-0{margin-top:0}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-2\\.5{margin-top:.625rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1{height:.25rem}.h-1\\.5{height:.375rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-52{height:13rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\\[2\\.375rem\\]{height:2.375rem}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.min-h-\\[15rem\\]{min-height:15rem}.min-h-\\[calc\\(100\\%-3\\.5rem\\)\\]{min-height:calc(100% - 3.5rem)}.w-0{width:0px}.w-1{width:.25rem}.w-1\\.5{width:.375rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-\\[2\\.375rem\\]{width:2.375rem}.w-\\[3\\.25rem\\]{width:3.25rem}.w-full{width:100%}.w-px{width:1px}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-4xl{max-width:56rem}.max-w-7xl{max-width:80rem}.max-w-\\[50rem\\]{max-width:50rem}.max-w-\\[85rem\\]{max-width:85rem}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-y-4{row-gap:1rem}.-space-y-px>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(-1px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(-1px * var(--tw-space-y-reverse))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-b-md{border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-t-xl{border-top-left-radius:.75rem;border-top-right-radius:.75rem}.rounded-ee-xl{border-end-end-radius:.75rem}.rounded-es-xl{border-end-start-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-\\[3px\\]{border-width:3px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.border-current{border-color:currentColor}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity))}.border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-red-600{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity))}.border-teal-100{--tw-border-opacity: 1;border-color:rgb(204 251 241 / var(--tw-border-opacity))}.border-teal-500{--tw-border-opacity: 1;border-color:rgb(20 184 166 / var(--tw-border-opacity))}.border-teal-900{--tw-border-opacity: 1;border-color:rgb(19 78 74 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity))}.border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-t-blue-600{--tw-border-opacity: 1;border-top-color:rgb(37 99 235 / var(--tw-border-opacity))}.border-t-green-500{--tw-border-opacity: 1;border-top-color:rgb(34 197 94 / var(--tw-border-opacity))}.border-t-green-600{--tw-border-opacity: 1;border-top-color:rgb(22 163 74 / var(--tw-border-opacity))}.border-t-red-500{--tw-border-opacity: 1;border-top-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-t-red-600{--tw-border-opacity: 1;border-top-color:rgb(220 38 38 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.bg-teal-200{--tw-bg-opacity: 1;background-color:rgb(153 246 228 / var(--tw-bg-opacity))}.bg-teal-50{--tw-bg-opacity: 1;background-color:rgb(240 253 250 / var(--tw-bg-opacity))}.bg-teal-800{--tw-bg-opacity: 1;background-color:rgb(17 94 89 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-80{--tw-bg-opacity: .8}.p-1{padding:.25rem}.p-1\\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-12{padding-bottom:3rem}.pe-11{padding-inline-end:2.75rem}.pe-3{padding-inline-end:.75rem}.pl-3{padding-left:.75rem}.pl-7{padding-left:1.75rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.pr-9{padding-right:2.25rem}.ps-5{padding-inline-start:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-start{text-align:start}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-7xl{font-size:4.5rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.tracking-wide{letter-spacing:.025em}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.text-teal-400{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity))}.text-teal-800{--tw-text-opacity: 1;color:rgb(17 94 89 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity))}.decoration-2{text-decoration-thickness:2px}.opacity-0{opacity:0}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-neutral-700{--tw-shadow-color: #404040;--tw-shadow: var(--tw-shadow-colored)}.shadow-slate-700{--tw-shadow-color: #334155;--tw-shadow: var(--tw-shadow-colored)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-transparent{--tw-ring-color: transparent}.ring-offset-white{--tw-ring-offset-color: #fff}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\\[--body-scroll\\:true\\]{--body-scroll: true}.marker\\:text-blue-600 *::marker{color:#2563eb}.marker\\:text-blue-600::marker{color:#2563eb}.before\\:inline-block:before{content:var(--tw-content);display:inline-block}.before\\:h-6:before{content:var(--tw-content);height:1.5rem}.before\\:w-6:before{content:var(--tw-content);width:1.5rem}.before\\:translate-x-0:before{content:var(--tw-content);--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\\:transform:before{content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\\:rounded-full:before{content:var(--tw-content);border-radius:9999px}.before\\:bg-white:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.before\\:shadow:before{content:var(--tw-content);--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.before\\:ring-0:before{content:var(--tw-content);--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.before\\:transition:before{content:var(--tw-content);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.before\\:duration-200:before{content:var(--tw-content);transition-duration:.2s}.before\\:ease-in-out:before{content:var(--tw-content);transition-timing-function:cubic-bezier(.4,0,.2,1)}.first\\:mt-0:first-child{margin-top:0}.first\\:rounded-t-lg:first-child{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.last\\:rounded-b-lg:last-child{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.checked\\:bg-blue-600:checked{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.checked\\:bg-none:checked{background-image:none}.checked\\:before\\:translate-x-full:checked:before{content:var(--tw-content);--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.checked\\:before\\:bg-blue-200:checked:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.hover\\:border-blue-500:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.hover\\:border-green-500:hover{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity))}.hover\\:border-red-400:hover{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.hover\\:border-red-500:hover{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.hover\\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.hover\\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.hover\\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-green-500:hover{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity))}.hover\\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.hover\\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity))}.hover\\:text-gray-400:hover{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\\:text-green-800:hover{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity))}.hover\\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\\:z-10:focus{z-index:10}.focus\\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\\:border-blue-600:focus{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-blue-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(37 99 235 / var(--tw-ring-opacity))}.focus\\:ring-gray-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus\\:ring-green-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(187 247 208 / var(--tw-ring-opacity))}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-red-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(254 202 202 / var(--tw-ring-opacity))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\\:ring-offset-white:focus{--tw-ring-offset-color: #fff}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:opacity-50:disabled{opacity:.5}[data-hs-tab].active.hs-tab-active\\:border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}[data-hs-tab].active.hs-tab-active\\:font-semibold{font-weight:600}[data-hs-tab].active.hs-tab-active\\:text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}[data-hs-tab].active .hs-tab-active\\:border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}[data-hs-tab].active .hs-tab-active\\:font-semibold{font-weight:600}[data-hs-tab].active .hs-tab-active\\:text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.open.hs-overlay-open\\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.open.hs-overlay-open\\:opacity-100{opacity:1}.open.hs-overlay-open\\:duration-500{transition-duration:.5s}.open .hs-overlay-open\\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.open .hs-overlay-open\\:opacity-100{opacity:1}.open .hs-overlay-open\\:duration-500{transition-duration:.5s}@media (prefers-color-scheme: dark){.dark\\:divide-gray-700>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity))}.dark\\:border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity))}.dark\\:border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\\:border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\\:border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.dark\\:border-teal-900{--tw-border-opacity: 1;border-color:rgb(19 78 74 / var(--tw-border-opacity))}.dark\\:border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\\:border-t-green-500{--tw-border-opacity: 1;border-top-color:rgb(34 197 94 / var(--tw-border-opacity))}.dark\\:border-t-red-500{--tw-border-opacity: 1;border-top-color:rgb(239 68 68 / var(--tw-border-opacity))}.dark\\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.dark\\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\\:bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\\:bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.dark\\:bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.dark\\:bg-teal-800{--tw-bg-opacity: 1;background-color:rgb(17 94 89 / var(--tw-bg-opacity))}.dark\\:bg-teal-800\\/30{background-color:#115e594d}.dark\\:bg-opacity-80{--tw-bg-opacity: .8}.dark\\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\\:text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.dark\\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity))}.dark\\:text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\\:text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.dark\\:text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.dark\\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.dark\\:text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.dark\\:text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.dark\\:text-teal-400{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity))}.dark\\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\\:placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\\:placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity))}.dark\\:placeholder-neutral-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:placeholder-neutral-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:shadow-neutral-700\\/70{--tw-shadow-color: rgb(64 64 64 / .7);--tw-shadow: var(--tw-shadow-colored)}.dark\\:shadow-slate-700\\/\\[\\.7\\]{--tw-shadow-color: rgb(51 65 85 / .7);--tw-shadow: var(--tw-shadow-colored)}.dark\\:before\\:bg-gray-400:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.dark\\:checked\\:border-blue-500:checked{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\\:checked\\:bg-blue-500:checked{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.dark\\:checked\\:bg-blue-600:checked{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.dark\\:checked\\:before\\:bg-blue-200:checked:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.dark\\:hover\\:border-blue-400:hover{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity))}.dark\\:hover\\:border-red-400:hover{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity))}.dark\\:hover\\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\\:hover\\:bg-neutral-700:hover{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}.dark\\:hover\\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.dark\\:hover\\:text-blue-400:hover{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.dark\\:hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\\:hover\\:text-green-400:hover{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.dark\\:hover\\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.dark\\:hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.dark\\:hover\\:text-slate-300:hover{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.dark\\:hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\\:focus\\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.dark\\:focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.dark\\:focus\\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.dark\\:focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.dark\\:focus\\:ring-gray-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.dark\\:focus\\:ring-gray-700:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity))}.dark\\:focus\\:ring-neutral-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(82 82 82 / var(--tw-ring-opacity))}.dark\\:focus\\:ring-red-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(220 38 38 / var(--tw-ring-opacity))}.dark\\:focus\\:ring-offset-gray-800:focus{--tw-ring-offset-color: #1f2937}}@media (min-width: 640px){.sm\\:mx-auto{margin-left:auto;margin-right:auto}.sm\\:mb-3{margin-bottom:.75rem}.sm\\:mt-10{margin-top:2.5rem}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:flex-row{flex-direction:row}.sm\\:gap-3{gap:.75rem}.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.sm\\:space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.sm\\:p-4{padding:1rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:py-4{padding-top:1rem;padding-bottom:1rem}.sm\\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.sm\\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\\:text-9xl{font-size:8rem;line-height:1}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:flex{display:flex}.md\\:items-center{align-items:center}.md\\:justify-between{justify-content:space-between}.md\\:p-10{padding:2.5rem}.md\\:p-5{padding:1.25rem}}@media (min-width: 1024px){.lg\\:bottom-0{bottom:0}.lg\\:right-auto{right:auto}.lg\\:block{display:block}.lg\\:hidden{display:none}.lg\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:px-8{padding-left:2rem;padding-right:2rem}.lg\\:py-14{padding-top:3.5rem;padding-bottom:3.5rem}.lg\\:pl-64{padding-left:16rem}} ''' -js_content = '''var Kr=Object.defineProperty;var Xr=(o,e,n)=>e in o?Kr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n;var _n=(o,e,n)=>(Xr(o,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))t(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&t(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function t(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();function Y(){}function eo(o,e){for(const n in e)o[n]=e[n];return o}function Mr(o){return o()}function Gn(){return Object.create(null)}function mt(o){o.forEach(Mr)}function Dt(o){return typeof o=="function"}function he(o,e){return o!=o?e==e:o!==e||o&&typeof o=="object"||typeof o=="function"}let en;function Zn(o,e){return o===e?!0:(en||(en=document.createElement("a")),en.href=e,o===en.href)}function to(o){return Object.keys(o).length===0}function Dr(o,...e){if(o==null){for(const t of e)t(void 0);return Y}const n=o.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function pt(o){let e;return Dr(o,n=>e=n)(),e}function et(o,e,n){o.$$.on_destroy.push(Dr(e,n))}function on(o,e,n,t){if(o){const r=Rr(o,e,n,t);return o[0](r)}}function Rr(o,e,n,t){return o[1]&&t?eo(n.ctx.slice(),o[1](t(e))):n.ctx}function sn(o,e,n,t){if(o[2]&&t){const r=o[2](t(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const i=[],s=Math.max(e.dirty.length,r.length);for(let l=0;l32){const e=[],n=o.ctx.length/32;for(let t=0;to.removeEventListener(e,n,t)}function d(o,e,n){n==null?o.removeAttribute(e):o.getAttribute(e)!==n&&o.setAttribute(e,n)}function no(o){let e;return{p(...n){e=n,e.forEach(t=>o.push(t))},r(){e.forEach(n=>o.splice(o.indexOf(n),1))}}}function ro(o){return Array.from(o.childNodes)}function De(o,e){e=""+e,o.data!==e&&(o.data=e)}function gt(o,e){o.value=e??""}function tn(o,e,n,t){n==null?o.style.removeProperty(e):o.style.setProperty(e,n,t?"important":"")}let Wt;function Zt(o){Wt=o}function oo(){if(!Wt)throw new Error("Function called outside component initialization");return Wt}function Hr(o){oo().$$.on_mount.push(o)}const Mt=[],$n=[];let Rt=[];const kn=[],io=Promise.resolve();let xn=!1;function so(){xn||(xn=!0,io.then(Br))}function Sn(o){Rt.push(o)}function lo(o){kn.push(o)}const wn=new Set;let qt=0;function Br(){if(qt!==0)return;const o=Wt;do{try{for(;qto.indexOf(t)===-1?e.push(t):n.push(t)),n.forEach(t=>t()),Rt=e}const nn=new Set;let St;function Se(){St={r:0,c:[],p:St}}function Oe(){St.r||mt(St.c),St=St.p}function L(o,e){o&&o.i&&(nn.delete(o),o.i(e))}function A(o,e,n,t){if(o&&o.o){if(nn.has(o))return;nn.add(o),St.c.push(()=>{nn.delete(o),t&&(n&&o.d(1),t())}),o.o(e)}else t&&t()}function Le(o){return(o==null?void 0:o.length)!==void 0?o:Array.from(o)}function uo(o,e,n){const t=o.$$.props[e];t!==void 0&&(o.$$.bound[t]=n,n(o.$$.ctx[t]))}function U(o){o&&o.c()}function G(o,e,n){const{fragment:t,after_update:r}=o.$$;t&&t.m(e,n),Sn(()=>{const i=o.$$.on_mount.map(Mr).filter(Dt);o.$$.on_destroy?o.$$.on_destroy.push(...i):mt(i),o.$$.on_mount=[]}),r.forEach(Sn)}function Z(o,e){const n=o.$$;n.fragment!==null&&(co(n.after_update),mt(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function fo(o,e){o.$$.dirty[0]===-1&&(Mt.push(o),so(),o.$$.dirty.fill(0)),o.$$.dirty[e/31|0]|=1<{const q=k.length?k[0]:x;return a.ctx&&r(a.ctx[h],a.ctx[h]=q)&&(!a.skip_bound&&a.bound[h]&&a.bound[h](q),g&&fo(o,h)),x}):[],a.update(),g=!0,mt(a.before_update),a.fragment=t?t(a.ctx):!1,e.target){if(e.hydrate){const h=ro(e.target);a.fragment&&a.fragment.l(h),h.forEach(B)}else a.fragment&&a.fragment.c();e.intro&&L(o.$$.fragment),G(o,e.target,e.anchor),Br()}Zt(c)}class ve{constructor(){_n(this,"$$");_n(this,"$$set")}$destroy(){Z(this,1),this.$destroy=Y}$on(e,n){if(!Dt(n))return Y;const t=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return t.push(n),()=>{const r=t.indexOf(n);r!==-1&&t.splice(r,1)}}$set(e){this.$$set&&!to(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const po="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(po);const At=[];function rt(o,e=Y){let n;const t=new Set;function r(l){if(he(o,l)&&(o=l,n)){const c=!At.length;for(const a of t)a[1](),At.push(a,o);if(c){for(let a=0;a{t.delete(a),t.size===0&&n&&(n(),n=null)}}return{set:r,update:i,subscribe:s}}let Ht=rt(""),Bt=rt([]),On=rt(null),cn=rt(null),un=rt(!1),Ut=rt(!1),wt=rt("chat"),Cn=rt([]),Qt=rt(""),Nr=rt(!1),Ot=rt({debug:!0,logo:"",title:"Welcome to Vanna.AI",subtitle:"Loading...",show_training_data:!0,suggested_questions:!0,sql:!0,table:!0,csv_download:!0,chart:!0,redraw_chart:!0,auto_fix_sql:!0,ask_results_correct:!0,followup_questions:!0,summarization:!0}),fn=rt(null);function dn(){Bt.set([]),un.set(!1),Ut.set(!1)}async function Ln(o){dn();let e=pt(Ot);ue({type:"user_question",question:o}),un.set(!0);const n=await xe("generate_sql","GET",{question:o});if(ue(n),n.type!=="sql")return;window.location.hash=n.id,Ht.set(n.id),Qt.set(n.text);const t=await xe("run_sql","GET",{id:n.id});if(ue(t),t.type==="df"){if(t.should_generate_chart){const r=await xe("generate_plotly_figure","GET",{id:t.id});if(ue(r),r.type!=="plotly_figure")return;Cn.update(i=>[...i,{question:o,id:r.id}])}if(e.summarization){const r=await xe("generate_summary","GET",{id:n.id});ue(r)}ue({type:"feedback_question"}),ue({type:"feedback_buttons"})}}async function go(o){let e=pt(Ot);if(ue(o),o.type!=="sql")return;window.location.hash=o.id,Ht.set(o.id),Qt.set(o.text);const n=await xe("run_sql","GET",{id:o.id});if(ue(n),n.type!=="df")return;const t=await xe("generate_plotly_figure","GET",{id:n.id});if(ue(t),t.type==="plotly_figure"){if(e.summarization){const r=await xe("generate_summary","GET",{id:t.id});ue(r)}ue({type:"feedback_question"}),ue({type:"feedback_buttons"})}}function mo(o){ue({type:"user_question",question:"Re-run the SQL"}),xe("run_sql","GET",{id:o}).then(ue).then(e=>{e.type==="df"&&xe("generate_plotly_figure","GET",{id:e.id}).then(ue).then(n=>{n.type==="plotly_figure"&&xe("generate_followup_questions","GET",{id:n.id}).then(ue)})})}function ho(){xe("get_question_history","GET",[]).then($o)}function yo(){xe("get_config","GET",[]).then(wo)}function Ir(){window.location.hash="training-data",wt.set("training-data"),xe("get_training_data","GET",[]).then(rn)}function zr(){window.location.hash="",wt.set("chat"),dn(),pt(On)===null&&xe("generate_questions","GET",[]).then(_o)}function bo(o){window.location.hash=o,wt.set("chat"),dn(),un.set(!0),xe("load_question","GET",{id:o}).then(ue)}function vo(o){cn.set(null),xe("remove_training_data","POST",{id:o}).then(e=>{xe("get_training_data","GET",[]).then(rn)})}function ue(o){return o.type==="not_logged_in"?(fn.set(o.html),wt.set("login"),o):(Bt.update(e=>[...e,o]),xo(),o)}function rn(o){return cn.set(o),o.type==="df"?JSON.parse(o.df).length===0&&wt.set("no-training-data"):o.type==="not_logged_in"&&(fn.set(o.html),wt.set("login")),o}function _o(o){return On.set(o),o}function wo(o){return o.type==="config"?(Ot.set(o.config),o.config.debug&&jo()):o.type==="not_logged_in"&&(fn.set(o.html),wt.set("login")),o}function $o(o){return o.type==="question_history"&&Cn.set(o.questions),o}function ko(o,e){cn.set(null);let n={};n[e]=o,xe("train","POST",n).then(rn).then(t=>{t.type!=="error"&&xe("get_training_data","GET",[]).then(rn)})}async function xe(o,e,n){try{Ut.set(!0);let t="",r;if(e==="GET")t=Object.entries(n).filter(([s,l])=>s!=="endpoint"&&s!=="addMessage").map(([s,l])=>`${encodeURIComponent(s)}=${encodeURIComponent(l)}`).join("&"),r=await fetch(`/api/v0/${o}?${t}`);else{let s=JSON.stringify(n);r=await fetch(`/api/v0/${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:s})}if(!r.ok)throw new Error("The server returned an error. See the server logs for more details.");const i=await r.json();return Ut.set(!1),i}catch(t){return Ut.set(!1),{type:"error",error:String(t)}}}function xo(){setTimeout(()=>{window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},100)}function So(){let o=pt(Bt),e=o.find(n=>n.type==="user_question");if(e&&e.type==="user_question"){let n=o.findLast(t=>t.type==="sql");if(n&&n.type==="sql")return{question:e.question,sql:n.text}}return null}function pn(o){Bt.update(e=>e.filter(n=>n.type!==o))}function Oo(o){xe("fix_sql","POST",{id:pt(Ht),error:o}).then(go)}function Co(o){let n=pt(Bt).find(t=>t.type==="user_question");n&&n.type==="user_question"&&(xe("update_sql","POST",{id:pt(Ht),sql:o}).then(ue).then(t=>{t.type==="sql"&&(Qt.set(t.text),xe("run_sql","GET",{id:t.id}).then(ue).then(r=>{r.type==="df"?JSON.parse(r.df).length>1?xe("generate_plotly_figure","GET",{id:r.id}).then(ue).then(s=>{ue({type:"feedback_question"}),ue({type:"feedback_buttons"})}):(ue({type:"feedback_question"}),ue({type:"feedback_buttons"})):(ue({type:"feedback_question"}),ue({type:"feedback_buttons"}))}))}),pn("user_sql"))}function Lo(){ue({type:"chart_modification"})}function Eo(){pn("feedback_buttons"),ue({type:"feedback_correct"});let o=So();o&&(xe("train","POST",o),xe("generate_followup_questions","GET",{id:pt(Ht)}).then(ue))}function Un(){pn("feedback_buttons"),ue({type:"feedback_incorrect"}),ue({type:"user_sql"})}function To(o){pn("chart_modification"),ue({type:"user_question",question:"Update the chart with these instructions: "+o}),xe("generate_plotly_figure","GET",{id:pt(Ht),chart_instructions:o}).then(ue)}function jo(){var o=new WebSocket("ws://"+window.location.host+"/api/v0/log");o.onopen=function(){console.log("Connected to WebSocket server at /log.")},o.onmessage=function(e){console.log("Received message:",e.data);try{var n=JSON.parse(e.data)}catch(r){console.error("Error parsing JSON:",r);return}var t=document.getElementById("log-contents");t&&(t.innerHTML+="
"+n.title+" "+JSON.stringify(n.message)+"

")},o.onclose=function(e){console.log("WebSocket connection closed:",e)},o.onerror=function(e){console.error("WebSocket error:",e)}}function Wn(o,e,n){const t=o.slice();return t[3]=e[n],t}function Qn(o){let e,n,t,r;return{c(){e=E("li"),n=E("button"),n.innerHTML=` - Training Data`,d(n,"class","flex items-center gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300 border-t border-b border-gray-200 dark:border-gray-700 w-full")},m(i,s){N(i,e,s),v(e,n),t||(r=Te(n,"click",Ir),t=!0)},d(i){i&&B(e),t=!1,r()}}}function Fn(o){let e,n,t,r,i,s=o[3].question+"",l,c,a,g;function h(){return o[2](o[3])}return{c(){e=E("li"),n=E("button"),t=Xe("svg"),r=Xe("path"),i=Q(),l=pe(s),c=Q(),d(r,"stroke-linecap","round"),d(r,"stroke-linejoin","round"),d(r,"d","M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"),d(t,"class","w-3.5 h-3.5"),d(t,"fill","none"),d(t,"stroke","currentColor"),d(t,"stroke-width","1.5"),d(t,"viewBox","0 0 24 24"),d(t,"xmlns","http://www.w3.org/2000/svg"),d(t,"aria-hidden","true"),d(n,"class","flex items-center text-left gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300")},m(x,k){N(x,e,k),v(e,n),v(n,t),v(t,r),v(n,i),v(n,l),v(e,c),a||(g=Te(n,"click",h),a=!0)},p(x,k){o=x,k&2&&s!==(s=o[3].question+"")&&De(l,s)},d(x){x&&B(e),a=!1,g()}}}function Po(o){let e,n,t,r,i,s,l,c,a,g,h,x,k,q,M,y,p,m,w=o[0].show_training_data&&Qn(),D=Le(o[1]),P=[];for(let C=0;C Sidebar',c=Q(),a=E("div"),g=E("ul"),w&&w.c(),h=Q(),x=E("li"),k=E("button"),k.innerHTML=` - New question`,q=Q();for(let C=0;C

+js_content = '''var En=Object.defineProperty;var tn=(E,e,T)=>e in E?En(E,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):E[e]=T;var Wt=(E,e,T)=>(tn(E,typeof e!="symbol"?e+"":e,T),T);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))t(r);new MutationObserver(r=>{for(const R of r)if(R.type==="childList")for(const A of R.addedNodes)A.tagName==="LINK"&&A.rel==="modulepreload"&&t(A)}).observe(document,{childList:!0,subtree:!0});function T(r){const R={};return r.integrity&&(R.integrity=r.integrity),r.referrerPolicy&&(R.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?R.credentials="include":r.crossOrigin==="anonymous"?R.credentials="omit":R.credentials="same-origin",R}function t(r){if(r.ep)return;r.ep=!0;const R=T(r);fetch(r.href,R)}})();function Z(){}function Tn(E,e){for(const T in e)E[T]=e[T];return E}function LR(E){return E()}function FT(){return Object.create(null)}function iE(E){E.forEach(LR)}function ZE(E){return typeof E=="function"}function Ne(E,e){return E!=E?e==e:E!==e||E&&typeof E=="object"||typeof E=="function"}let Lt;function YT(E,e){return E===e?!0:(Lt||(Lt=document.createElement("a")),Lt.href=e,E===Lt.href)}function rn(E){return Object.keys(E).length===0}function CR(E,...e){if(E==null){for(const t of e)t(void 0);return Z}const T=E.subscribe(...e);return T.unsubscribe?()=>T.unsubscribe():T}function cE(E){let e;return CR(E,T=>e=T)(),e}function RE(E,e,T){E.$$.on_destroy.push(CR(e,T))}function pt(E,e,T,t){if(E){const r=uR(E,e,T,t);return E[0](r)}}function uR(E,e,T,t){return E[1]&&t?Tn(T.ctx.slice(),E[1](t(e))):T.ctx}function Mt(E,e,T,t){if(E[2]&&t){const r=E[2](t(T));if(e.dirty===void 0)return r;if(typeof r=="object"){const R=[],A=Math.max(e.dirty.length,r.length);for(let s=0;s32){const e=[],T=E.ctx.length/32;for(let t=0;tE.removeEventListener(e,T,t)}function i(E,e,T){T==null?E.removeAttribute(e):E.getAttribute(e)!==T&&E.setAttribute(e,T)}function Rn(E){let e;return{p(...T){e=T,e.forEach(t=>E.push(t))},r(){e.forEach(T=>E.splice(E.indexOf(T),1))}}}function nn(E){return Array.from(E.childNodes)}function Pe(E,e){e=""+e,E.data!==e&&(E.data=e)}function Ye(E,e){E.value=e??""}function Ct(E,e,T,t){T==null?E.style.removeProperty(e):E.style.setProperty(e,T,t?"important":"")}function VT(E,e,T){for(let t=0;tE.indexOf(t)===-1?e.push(t):T.push(t)),T.forEach(t=>t()),jE=e}const ut=new Set;let BE;function ge(){BE={r:0,c:[],p:BE}}function He(){BE.r||iE(BE.c),BE=BE.p}function G(E,e){E&&E.i&&(ut.delete(E),E.i(e))}function B(E,e,T,t){if(E&&E.o){if(ut.has(E))return;ut.add(E),BE.c.push(()=>{ut.delete(E),t&&(T&&E.d(1),t())}),E.o(e)}else t&&t()}function ce(E){return(E==null?void 0:E.length)!==void 0?E:Array.from(E)}function Nn(E,e){E.d(1),e.delete(E.key)}function ln(E,e,T,t,r,R,A,s,o,n,S,O){let N=E.length,u=R.length,D=N;const d={};for(;D--;)d[E[D].key]=D;const C=[],_=new Map,L=new Map,c=[];for(D=u;D--;){const a=O(r,R,D),I=T(a);let f=A.get(I);f?t&&c.push(()=>f.p(a,e)):(f=n(I,a),f.c()),_.set(I,C[D]=f),I in d&&L.set(I,Math.abs(D-d[I]))}const H=new Set,y=new Set;function h(a){G(a,1),a.m(s,S),A.set(a.key,a),S=a.first,u--}for(;N&&u;){const a=C[u-1],I=E[N-1],f=a.key,m=I.key;a===I?(S=a.first,N--,u--):_.has(m)?!A.has(f)||H.has(f)?h(a):y.has(m)?N--:L.get(f)>L.get(m)?(y.add(f),h(a)):(H.add(m),N--):(o(I,A),N--)}for(;N--;){const a=E[N];_.has(a.key)||o(a,A)}for(;u;)h(C[u-1]);return iE(c),C}function _n(E,e,T){const t=E.$$.props[e];t!==void 0&&(E.$$.bound[t]=T,T(E.$$.ctx[t]))}function k(E){E&&E.c()}function $(E,e,T){const{fragment:t,after_update:r}=E.$$;t&&t.m(e,T),Pt(()=>{const R=E.$$.on_mount.map(LR).filter(ZE);E.$$.on_destroy?E.$$.on_destroy.push(...R):iE(R),E.$$.on_mount=[]}),r.forEach(Pt)}function X(E,e){const T=E.$$;T.fragment!==null&&(In(T.after_update),iE(T.on_destroy),T.fragment&&T.fragment.d(e),T.on_destroy=T.fragment=null,T.ctx=[])}function Ln(E,e){E.$$.dirty[0]===-1&&(QE.push(E),on(),E.$$.dirty.fill(0)),E.$$.dirty[e/31|0]|=1<{const D=u.length?u[0]:N;return n.ctx&&r(n.ctx[O],n.ctx[O]=D)&&(!n.skip_bound&&n.bound[O]&&n.bound[O](D),S&&Ln(E,O)),N}):[],n.update(),S=!0,iE(n.before_update),n.fragment=t?t(n.ctx):!1,e.target){if(e.hydrate){const O=nn(e.target);n.fragment&&n.fragment.l(O),O.forEach(Y)}else n.fragment&&n.fragment.c();e.intro&&G(E.$$.fragment),$(E,e.target,e.anchor),fR()}At(o)}class Le{constructor(){Wt(this,"$$");Wt(this,"$$set")}$destroy(){X(this,1),this.$destroy=Z}$on(e,T){if(!ZE(T))return Z;const t=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return t.push(T),()=>{const r=t.indexOf(T);r!==-1&&t.splice(r,1)}}$set(e){this.$$set&&!rn(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Cn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Cn);const KE=[];function aE(E,e=Z){let T;const t=new Set;function r(s){if(Ne(E,s)&&(E=s,T)){const o=!KE.length;for(const n of t)n[1](),KE.push(n,E);if(o){for(let n=0;n{t.delete(n),t.size===0&&T&&(T(),T=null)}}return{set:r,update:R,subscribe:A}}let GE=aE(""),Et=aE([]),lT=aE(null),ht=aE(null),Gt=aE(!1),st=aE(!1),DE=aE("chat"),_T=aE([]),zE=aE(""),PR=aE(!1),FE=aE({debug:!0,logo:"",title:"Welcome to Vanna.AI",subtitle:"Loading...",show_training_data:!0,suggested_questions:!0,sql:!0,table:!0,csv_download:!0,chart:!0,redraw_chart:!0,auto_fix_sql:!0,ask_results_correct:!0,followup_questions:!0,summarization:!0,function_generation:!0}),gt=aE(null),DR=aE([]);function Ht(){Et.set([]),Gt.set(!1),st.set(!1)}async function LT(E){Ht();let e=cE(FE);Se({type:"user_question",question:E}),Gt.set(!0);const T=await fe("get_function","GET",{question:E});let t;if(T.type==="function")Se(T),t=T.id,GE.set(T.id),zE.set(T.function.instantiated_sql);else{const R=await fe("generate_sql","GET",{question:E});if(Se(R),R.type!=="sql")return;window.location.hash=R.id,GE.set(R.id),zE.set(R.text),t=R.id}const r=await fe("run_sql","GET",{id:t});if(Se(r),r.type==="df"){if(r.should_generate_chart){const R=await fe("generate_plotly_figure","GET",{id:r.id});if(Se(R),R.type!=="plotly_figure")return;_T.update(A=>[...A,{question:E,id:R.id}])}if(e.summarization){const R=await fe("generate_summary","GET",{id:t});Se(R)}Se({type:"feedback_question"}),Se({type:"feedback_buttons"})}}async function un(E){let e=cE(FE);if(Se(E),E.type!=="sql")return;window.location.hash=E.id,GE.set(E.id),zE.set(E.text);const T=await fe("run_sql","GET",{id:E.id});if(Se(T),T.type!=="df")return;const t=await fe("generate_plotly_figure","GET",{id:T.id});if(Se(t),t.type==="plotly_figure"){if(e.summarization){const r=await fe("generate_summary","GET",{id:t.id});Se(r)}Se({type:"feedback_question"}),Se({type:"feedback_buttons"})}}function cn(E){Se({type:"user_question",question:"Re-run the SQL"}),fe("run_sql","GET",{id:E}).then(Se).then(e=>{e.type==="df"&&fe("generate_plotly_figure","GET",{id:e.id}).then(Se).then(T=>{T.type==="plotly_figure"&&fe("generate_followup_questions","GET",{id:T.id}).then(Se)})})}function fn(){fe("get_question_history","GET",[]).then(mn)}function Pn(){fe("get_config","GET",[]).then(Un)}function CT(){window.location.hash="functions",DE.set("functions"),fe("get_all_functions","GET",[]).then(pn)}function dR(){window.location.hash="training-data",DE.set("training-data"),fe("get_training_data","GET",[]).then(Dt)}function uT(){window.location.hash="",DE.set("chat"),Ht(),cE(lT)===null&&fe("generate_questions","GET",[]).then(Mn)}function Dn(E){window.location.hash=E,DE.set("chat"),Ht(),Gt.set(!0),fe("load_question","GET",{id:E}).then(Se)}function dn(E){ht.set(null),fe("remove_training_data","POST",{id:E}).then(e=>{fe("get_training_data","GET",[]).then(Dt)})}function Se(E){return E.type==="not_logged_in"?(gt.set(E.html),DE.set("login"),E):(Et.update(e=>[...e,E]),Gn(),E)}function Dt(E){return ht.set(E),E.type==="df"?JSON.parse(E.df).length===0&&DE.set("no-training-data"):E.type==="not_logged_in"&&(gt.set(E.html),DE.set("login")),E}function pn(E){return E.type==="functions"&&DR.set(E.functions),E}function Mn(E){return lT.set(E),E}function Un(E){return E.type==="config"?(FE.set(E.config),E.config.debug&&Vn()):E.type==="not_logged_in"&&(gt.set(E.html),DE.set("login")),E}function mn(E){return E.type==="question_history"&&_T.set(E.questions),E}function hn(E,e){ht.set(null);let T={};T[e]=E,fe("train","POST",T).then(Dt).then(t=>{t.type!=="error"&&fe("get_training_data","GET",[]).then(Dt)})}async function fe(E,e,T){try{st.set(!0);let t="",r;if(e==="GET")t=Object.entries(T).filter(([A,s])=>A!=="endpoint"&&A!=="addMessage").map(([A,s])=>`${encodeURIComponent(A)}=${encodeURIComponent(s)}`).join("&"),r=await fetch(`/api/v0/${E}?${t}`);else{let A=JSON.stringify(T);r=await fetch(`/api/v0/${E}`,{method:"POST",headers:{"Content-Type":"application/json"},body:A})}if(!r.ok)throw new Error("The server returned an error. See the server logs for more details.");const R=await r.json();return st.set(!1),R}catch(t){return st.set(!1),{type:"error",error:String(t)}}}function Gn(){setTimeout(()=>{window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},100)}function cT(){let E=cE(Et),e=E.find(T=>T.type==="user_question");if(e&&e.type==="user_question"){let T=E.findLast(t=>t.type==="sql");if(T&&T.type==="sql")return{question:e.question,sql:T.text}}return null}function Ot(E){Et.update(e=>e.filter(T=>T.type!==E))}function gn(E){fe("fix_sql","POST",{id:cE(GE),error:E}).then(un)}function Hn(E){let T=cE(Et).find(t=>t.type==="user_question");T&&T.type==="user_question"&&(fe("update_sql","POST",{id:cE(GE),sql:E}).then(Se).then(t=>{t.type==="sql"&&(zE.set(t.text),fe("run_sql","GET",{id:t.id}).then(Se).then(r=>{r.type==="df"?JSON.parse(r.df).length>1?fe("generate_plotly_figure","GET",{id:r.id}).then(Se).then(A=>{Se({type:"feedback_question"}),Se({type:"feedback_buttons"})}):(Se({type:"feedback_question"}),Se({type:"feedback_buttons"})):(Se({type:"feedback_question"}),Se({type:"feedback_buttons"}))}))}),Ot("user_sql"))}function bn(){Se({type:"chart_modification"})}function yn(){Ot("feedback_buttons"),Se({type:"feedback_correct"});let E=cT();if(E){let e={question:E.question,sql:E.sql,id:cE(GE)};fe("create_function","POST",e).then(Se)}else console.log("No Question-SQL Found")}function Bn(E,e){fe("update_function","POST",{old_function_name:E,updated_function:e})}function vn(E){fe("delete_function","POST",{function_name:E}).finally(()=>{CT()})}function Fn(){Ot("feedback_buttons"),Se({type:"feedback_correct"});let E=cT();E&&(fe("train","POST",E),fe("generate_followup_questions","GET",{id:cE(GE)}).then(Se))}function WT(){Ot("feedback_buttons"),Se({type:"feedback_incorrect"}),Se({type:"user_sql"})}function Yn(E){Ot("chart_modification"),Se({type:"user_question",question:"Update the chart with these instructions: "+E}),fe("generate_plotly_figure","GET",{id:cE(GE),chart_instructions:E}).then(Se)}function Vn(){var E=new WebSocket("ws://"+window.location.host+"/api/v0/log");E.onopen=function(){console.log("Connected to WebSocket server at /log.")},E.onmessage=function(e){console.log("Received message:",e.data);try{var T=JSON.parse(e.data)}catch(r){console.error("Error parsing JSON:",r);return}var t=document.getElementById("log-contents");t&&(t.innerHTML+="

"+T.title+" "+JSON.stringify(T.message)+"

")},E.onclose=function(e){console.log("WebSocket connection closed:",e)},E.onerror=function(e){console.error("WebSocket error:",e)}}function wT(E,e,T){const t=E.slice();return t[3]=e[T],t}function xT(E){let e,T,t,r;return{c(){e=P("li"),T=P("button"),T.innerHTML=` + Functions`,i(T,"class","flex items-center gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300 border border-gray-200 dark:border-gray-700 w-full")},m(R,A){W(R,e,A),l(e,T),t||(r=ae(T,"click",CT),t=!0)},d(R){R&&Y(e),t=!1,r()}}}function $T(E){let e,T,t,r;return{c(){e=P("li"),T=P("button"),T.innerHTML=` + Training Data`,i(T,"class","flex items-center gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300 border border-gray-200 dark:border-gray-700 w-full")},m(R,A){W(R,e,A),l(e,T),t||(r=ae(T,"click",dR),t=!0)},d(R){R&&Y(e),t=!1,r()}}}function XT(E){let e,T,t,r,R,A=E[3].question+"",s,o,n,S;function O(){return E[2](E[3])}return{c(){e=P("li"),T=P("button"),t=OE("svg"),r=OE("path"),R=x(),s=Re(A),o=x(),i(r,"stroke-linecap","round"),i(r,"stroke-linejoin","round"),i(r,"d","M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"),i(t,"class","w-3.5 h-3.5"),i(t,"fill","none"),i(t,"stroke","currentColor"),i(t,"stroke-width","1.5"),i(t,"viewBox","0 0 24 24"),i(t,"xmlns","http://www.w3.org/2000/svg"),i(t,"aria-hidden","true"),i(T,"class","flex items-center text-left gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300")},m(N,u){W(N,e,u),l(e,T),l(T,t),l(t,r),l(T,R),l(T,s),l(e,o),n||(S=ae(T,"click",O),n=!0)},p(N,u){E=N,u&2&&A!==(A=E[3].question+"")&&Pe(s,A)},d(N){N&&Y(e),n=!1,S()}}}function Wn(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d,C,_,L,c,H=E[0].function_generation&&xT(),y=E[0].show_training_data&&$T(),h=ce(E[1]),a=[];for(let I=0;I Sidebar',o=x(),n=P("div"),S=P("ul"),H&&H.c(),O=x(),y&&y.c(),N=x(),u=P("li"),D=P("button"),D.innerHTML=` + New question`,d=x();for(let I=0;I

Connected

`,d(r,"class","w-28 h-auto"),Zn(r.src,i=o[0].logo)||d(r,"src",i),d(r,"alt","Vanna Logo"),d(l,"class","lg:hidden"),d(t,"class","flex items-center justify-between py-4 pr-4 pl-7"),d(k,"class","flex items-center gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300"),d(g,"class","space-y-1.5 p-4"),d(a,"class","h-full"),d(y,"class","mt-auto"),d(n,"class","hs-accordion-group w-full h-full flex flex-col"),d(n,"data-hs-accordion-always-open",""),d(e,"id","application-sidebar"),d(e,"class","hs-overlay hs-overlay-open:translate-x-0 -translate-x-full transition-all duration-300 transform hidden fixed top-0 left-0 bottom-0 z-[60] w-64 bg-white border-r border-gray-200 overflow-y-auto scrollbar-y lg:block lg:translate-x-0 lg:right-auto lg:bottom-0 dark:scrollbar-y dark:bg-slate-900 dark:border-gray-700")},m(C,f){N(C,e,f),v(e,n),v(n,t),v(t,r),v(t,s),v(t,l),v(n,c),v(n,a),v(a,g),w&&w.m(g,null),v(g,h),v(g,x),v(x,k),v(g,q);for(let u=0;un(0,t=s)),et(o,Cn,s=>n(1,r=s)),[t,r,s=>{bo(s.id)}]}class Ao extends ve{constructor(e){super(),be(this,e,qo,Po,he,{})}}var Mo={exports:{}};/*! For license information please see preline.js.LICENSE.txt */(function(o,e){(function(n,t){o.exports=t()})(self,function(){return(()=>{var n={661:(s,l,c)=>{function a(M){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},a(M)}function g(M,y){for(var p=0;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var C,f=k(m);if(w){var u=k(this).constructor;C=Reflect.construct(f,arguments,u)}else C=f.apply(this,arguments);return x(this,C)});function P(){return function(C,f){if(!(C instanceof f))throw new TypeError("Cannot call a class as a function")}(this,P),D.call(this,".hs-accordion")}return y=P,(p=[{key:"init",value:function(){var C=this;document.addEventListener("click",function(f){var u=f.target,_=u.closest(C.selector),j=u.closest(".hs-accordion-toggle"),O=u.closest(".hs-accordion-group");_&&O&&j&&(C._hideAll(_),C.show(_))})}},{key:"show",value:function(C){var f=this;if(C.classList.contains("active"))return this.hide(C);C.classList.add("active");var u=C.querySelector(".hs-accordion-content");u.style.display="block",u.style.height=0,setTimeout(function(){u.style.height="".concat(u.scrollHeight,"px")}),this.afterTransition(u,function(){C.classList.contains("active")&&(u.style.height="",f._fireEvent("open",C),f._dispatch("open.hs.accordion",C,C))})}},{key:"hide",value:function(C){var f=this,u=C.querySelector(".hs-accordion-content");u.style.height="".concat(u.scrollHeight,"px"),setTimeout(function(){u.style.height=0}),this.afterTransition(u,function(){C.classList.contains("active")||(u.style.display="",f._fireEvent("hide",C),f._dispatch("hide.hs.accordion",C,C))}),C.classList.remove("active")}},{key:"_hideAll",value:function(C){var f=this,u=C.closest(".hs-accordion-group");u.hasAttribute("data-hs-accordion-always-open")||u.querySelectorAll(this.selector).forEach(function(_){C!==_&&f.hide(_)})}}])&&g(y.prototype,p),Object.defineProperty(y,"prototype",{writable:!1}),P}(c(765).Z);window.HSAccordion=new q,document.addEventListener("load",window.HSAccordion.init())},795:(s,l,c)=>{function a(y){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},a(y)}function g(y,p){(p==null||p>y.length)&&(p=y.length);for(var m=0,w=new Array(p);m"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var f,u=q(w);if(D){var _=q(this).constructor;f=Reflect.construct(u,arguments,_)}else f=u.apply(this,arguments);return k(this,f)});function C(){return function(f,u){if(!(f instanceof u))throw new TypeError("Cannot call a class as a function")}(this,C),P.call(this,"[data-hs-collapse]")}return p=C,(m=[{key:"init",value:function(){var f=this;document.addEventListener("click",function(u){var _=u.target.closest(f.selector);if(_){var j=document.querySelectorAll(_.getAttribute("data-hs-collapse"));f.toggle(j)}})}},{key:"toggle",value:function(f){var u,_=this;f.length&&(u=f,function(j){if(Array.isArray(j))return g(j)}(u)||function(j){if(typeof Symbol<"u"&&j[Symbol.iterator]!=null||j["@@iterator"]!=null)return Array.from(j)}(u)||function(j,O){if(j){if(typeof j=="string")return g(j,O);var T=Object.prototype.toString.call(j).slice(8,-1);return T==="Object"&&j.constructor&&(T=j.constructor.name),T==="Map"||T==="Set"?Array.from(j):T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T)?g(j,O):void 0}}(u)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()).forEach(function(j){j.classList.contains("hidden")?_.show(j):_.hide(j)})}},{key:"show",value:function(f){var u=this;f.classList.add("open"),f.classList.remove("hidden"),f.style.height=0,document.querySelectorAll(this.selector).forEach(function(_){f.closest(_.getAttribute("data-hs-collapse"))&&_.classList.add("open")}),f.style.height="".concat(f.scrollHeight,"px"),this.afterTransition(f,function(){f.classList.contains("open")&&(f.style.height="",u._fireEvent("open",f),u._dispatch("open.hs.collapse",f,f))})}},{key:"hide",value:function(f){var u=this;f.style.height="".concat(f.scrollHeight,"px"),setTimeout(function(){f.style.height=0}),f.classList.remove("open"),this.afterTransition(f,function(){f.classList.contains("open")||(f.classList.add("hidden"),f.style.height=null,u._fireEvent("hide",f),u._dispatch("hide.hs.collapse",f,f),f.querySelectorAll(".hs-mega-menu-content.block").forEach(function(_){_.classList.remove("block"),_.classList.add("hidden")}))}),document.querySelectorAll(this.selector).forEach(function(_){f.closest(_.getAttribute("data-hs-collapse"))&&_.classList.remove("open")})}}])&&h(p.prototype,m),Object.defineProperty(p,"prototype",{writable:!1}),C}(c(765).Z);window.HSCollapse=new M,document.addEventListener("load",window.HSCollapse.init())},682:(s,l,c)=>{var a=c(714),g=c(765);const h={historyIndex:-1,addHistory:function(D){this.historyIndex=D},existsInHistory:function(D){return D>this.historyIndex},clearHistory:function(){this.historyIndex=-1}};function x(D){return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},x(D)}function k(D){return function(P){if(Array.isArray(P))return q(P)}(D)||function(P){if(typeof Symbol<"u"&&P[Symbol.iterator]!=null||P["@@iterator"]!=null)return Array.from(P)}(D)||function(P,C){if(P){if(typeof P=="string")return q(P,C);var f=Object.prototype.toString.call(P).slice(8,-1);return f==="Object"&&P.constructor&&(f=P.constructor.name),f==="Map"||f==="Set"?Array.from(P):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?q(P,C):void 0}}(D)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function q(D,P){(P==null||P>D.length)&&(P=D.length);for(var C=0,f=new Array(P);C"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var O,T=m(f);if(u){var H=m(this).constructor;O=Reflect.construct(T,arguments,H)}else O=T.apply(this,arguments);return p(this,O)});function j(){var O;return function(T,H){if(!(T instanceof H))throw new TypeError("Cannot call a class as a function")}(this,j),(O=_.call(this,".hs-dropdown")).positions={top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-top":"right-start","right-bottom":"right-end",left:"left","left-top":"left-start","left-bottom":"left-end"},O.absoluteStrategyModifiers=function(T){return[{name:"applyStyles",fn:function(H){var I=(window.getComputedStyle(T).getPropertyValue("--strategy")||"absolute").replace(" ",""),F=(window.getComputedStyle(T).getPropertyValue("--adaptive")||"adaptive").replace(" ","");H.state.elements.popper.style.position=I,H.state.elements.popper.style.transform=F==="adaptive"?H.state.styles.popper.transform:null,H.state.elements.popper.style.top=null,H.state.elements.popper.style.bottom=null,H.state.elements.popper.style.left=null,H.state.elements.popper.style.right=null,H.state.elements.popper.style.margin=0}},{name:"computeStyles",options:{adaptive:!1}}]},O._history=h,O}return P=j,C=[{key:"init",value:function(){var O=this;document.addEventListener("click",function(T){var H=T.target,I=H.closest(O.selector),F=H.closest(".hs-dropdown-menu");if(I&&I.classList.contains("open")||O._closeOthers(I),F){var J=(window.getComputedStyle(I).getPropertyValue("--auto-close")||"").replace(" ","");if((J=="false"||J=="inside")&&!I.parentElement.closest(O.selector))return}I&&(I.classList.contains("open")?O.close(I):O.open(I))}),document.addEventListener("mousemove",function(T){var H=T.target,I=H.closest(O.selector);if(H.closest(".hs-dropdown-menu"),I){var F=(window.getComputedStyle(I).getPropertyValue("--trigger")||"click").replace(" ","");if(F!=="hover")return;I&&I.classList.contains("open")||O._closeOthers(I),F!=="hover"||I.classList.contains("open")||/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)||O._hover(H)}}),document.addEventListener("keydown",this._keyboardSupport.bind(this)),window.addEventListener("resize",function(){document.querySelectorAll(".hs-dropdown.open").forEach(function(T){O.close(T,!0)})})}},{key:"_closeOthers",value:function(){var O=this,T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,H=document.querySelectorAll("".concat(this.selector,".open"));H.forEach(function(I){if(!T||T.closest(".hs-dropdown.open")!==I){var F=(window.getComputedStyle(I).getPropertyValue("--auto-close")||"").replace(" ","");F!="false"&&F!="outside"&&O.close(I)}})}},{key:"_hover",value:function(O){var T=this,H=O.closest(this.selector);this.open(H),document.addEventListener("mousemove",function I(F){F.target.closest(T.selector)&&F.target.closest(T.selector)!==H.parentElement.closest(T.selector)||(T.close(H),document.removeEventListener("mousemove",I,!0))},!0)}},{key:"close",value:function(O){var T=this,H=arguments.length>1&&arguments[1]!==void 0&&arguments[1],I=O.querySelector(".hs-dropdown-menu"),F=function(){O.classList.contains("open")||(I.classList.remove("block"),I.classList.add("hidden"),I.style.inset=null,I.style.position=null,O._popper&&O._popper.destroy())};H||this.afterTransition(O.querySelector("[data-hs-dropdown-transition]")||I,function(){F()}),I.style.margin=null,O.classList.remove("open"),H&&F(),this._fireEvent("close",O),this._dispatch("close.hs.dropdown",O,O);var J=I.querySelectorAll(".hs-dropdown.open");J.forEach(function(Ce){T.close(Ce,!0)})}},{key:"open",value:function(O){var T=O.querySelector(".hs-dropdown-menu"),H=(window.getComputedStyle(O).getPropertyValue("--placement")||"").replace(" ",""),I=(window.getComputedStyle(O).getPropertyValue("--strategy")||"fixed").replace(" ",""),F=((window.getComputedStyle(O).getPropertyValue("--adaptive")||"adaptive").replace(" ",""),parseInt((window.getComputedStyle(O).getPropertyValue("--offset")||"10").replace(" ","")));if(I!=="static"){O._popper&&O._popper.destroy();var J=(0,a.fi)(O,T,{placement:this.positions[H]||"bottom-start",strategy:I,modifiers:[].concat(k(I!=="fixed"?this.absoluteStrategyModifiers(O):[]),[{name:"offset",options:{offset:[0,F]}}])});O._popper=J}T.style.margin=null,T.classList.add("block"),T.classList.remove("hidden"),setTimeout(function(){O.classList.add("open")}),this._fireEvent("open",O),this._dispatch("open.hs.dropdown",O,O)}},{key:"_keyboardSupport",value:function(O){var T=document.querySelector(".hs-dropdown.open");if(T)return O.keyCode===27?(O.preventDefault(),this._esc(T)):O.keyCode===40?(O.preventDefault(),this._down(T)):O.keyCode===38?(O.preventDefault(),this._up(T)):O.keyCode===36?(O.preventDefault(),this._start(T)):O.keyCode===35?(O.preventDefault(),this._end(T)):void this._byChar(T,O.key)}},{key:"_esc",value:function(O){this.close(O)}},{key:"_up",value:function(O){var T=O.querySelector(".hs-dropdown-menu"),H=k(T.querySelectorAll("a")).reverse().filter(function(J){return!J.disabled}),I=T.querySelector("a:focus"),F=H.findIndex(function(J){return J===I});F+1{function a(y){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},a(y)}function g(y,p){(p==null||p>y.length)&&(p=y.length);for(var m=0,w=new Array(p);m"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var f,u=q(w);if(D){var _=q(this).constructor;f=Reflect.construct(u,arguments,_)}else f=u.apply(this,arguments);return k(this,f)});function C(){var f;return function(u,_){if(!(u instanceof _))throw new TypeError("Cannot call a class as a function")}(this,C),(f=P.call(this,"[data-hs-overlay]")).openNextOverlay=!1,f}return p=C,(m=[{key:"init",value:function(){var f=this;document.addEventListener("click",function(u){var _=u.target.closest(f.selector),j=u.target.closest("[data-hs-overlay-close]"),O=u.target.getAttribute("aria-overlay")==="true";return j?f.close(j.closest(".hs-overlay.open")):_?f.toggle(document.querySelector(_.getAttribute("data-hs-overlay"))):void(O&&f._onBackdropClick(u.target))}),document.addEventListener("keydown",function(u){if(u.keyCode===27){var _=document.querySelector(".hs-overlay.open");if(!_)return;setTimeout(function(){_.getAttribute("data-hs-overlay-keyboard")!=="false"&&f.close(_)})}})}},{key:"toggle",value:function(f){f&&(f.classList.contains("hidden")?this.open(f):this.close(f))}},{key:"open",value:function(f){var u=this;if(f){var _=document.querySelector(".hs-overlay.open"),j=this.getClassProperty(f,"--body-scroll","false")!=="true";if(_)return this.openNextOverlay=!0,this.close(_).then(function(){u.open(f),u.openNextOverlay=!1});j&&(document.body.style.overflow="hidden"),this._buildBackdrop(f),this._checkTimer(f),this._autoHide(f),f.classList.remove("hidden"),f.setAttribute("aria-overlay","true"),f.setAttribute("tabindex","-1"),setTimeout(function(){f.classList.contains("hidden")||(f.classList.add("open"),u._fireEvent("open",f),u._dispatch("open.hs.overlay",f,f),u._focusInput(f))},50)}}},{key:"close",value:function(f){var u=this;return new Promise(function(_){f&&(f.classList.remove("open"),f.removeAttribute("aria-overlay"),f.removeAttribute("tabindex","-1"),u.afterTransition(f,function(){f.classList.contains("open")||(f.classList.add("hidden"),u._destroyBackdrop(),u._fireEvent("close",f),u._dispatch("close.hs.overlay",f,f),document.body.style.overflow="",_(f))}))})}},{key:"_autoHide",value:function(f){var u=this,_=parseInt(this.getClassProperty(f,"--auto-hide","0"));_&&(f.autoHide=setTimeout(function(){u.close(f)},_))}},{key:"_checkTimer",value:function(f){f.autoHide&&(clearTimeout(f.autoHide),delete f.autoHide)}},{key:"_onBackdropClick",value:function(f){this.getClassProperty(f,"--overlay-backdrop","true")!=="static"&&this.close(f)}},{key:"_buildBackdrop",value:function(f){var u,_=this,j=f.getAttribute("data-hs-overlay-backdrop-container")||!1,O=document.createElement("div"),T="transition duration fixed inset-0 z-50 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 hs-overlay-backdrop",H=function(J,Ce){var ae=typeof Symbol<"u"&&J[Symbol.iterator]||J["@@iterator"];if(!ae){if(Array.isArray(J)||(ae=function(_e,ft){if(_e){if(typeof _e=="string")return g(_e,ft);var We=Object.prototype.toString.call(_e).slice(8,-1);return We==="Object"&&_e.constructor&&(We=_e.constructor.name),We==="Map"||We==="Set"?Array.from(_e):We==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(We)?g(_e,ft):void 0}}(J))||Ce&&J&&typeof J.length=="number"){ae&&(J=ae);var ot=0,tt=function(){};return{s:tt,n:function(){return ot>=J.length?{done:!0}:{done:!1,value:J[ot++]}},e:function(_e){throw _e},f:tt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ge,Ue=!0,ht=!1;return{s:function(){ae=ae.call(J)},n:function(){var _e=ae.next();return Ue=_e.done,_e},e:function(_e){ht=!0,Ge=_e},f:function(){try{Ue||ae.return==null||ae.return()}finally{if(ht)throw Ge}}}}(f.classList.values());try{for(H.s();!(u=H.n()).done;){var I=u.value;I.startsWith("hs-overlay-backdrop-open:")&&(T+=" ".concat(I))}}catch(J){H.e(J)}finally{H.f()}var F=this.getClassProperty(f,"--overlay-backdrop","true")!=="static";this.getClassProperty(f,"--overlay-backdrop","true")==="false"||(j&&((O=document.querySelector(j).cloneNode(!0)).classList.remove("hidden"),T=O.classList,O.classList=""),F&&O.addEventListener("click",function(){return _.close(f)},!0),O.setAttribute("data-hs-overlay-backdrop-template",""),document.body.appendChild(O),setTimeout(function(){O.classList=T}))}},{key:"_destroyBackdrop",value:function(){var f=document.querySelector("[data-hs-overlay-backdrop-template]");f&&(this.openNextOverlay&&(f.style.transitionDuration="".concat(1.8*parseFloat(window.getComputedStyle(f).transitionDuration.replace(/[^\d.-]/g,"")),"s")),f.classList.add("opacity-0"),this.afterTransition(f,function(){f.remove()}))}},{key:"_focusInput",value:function(f){var u=f.querySelector("[autofocus]");u&&u.focus()}}])&&h(p.prototype,m),Object.defineProperty(p,"prototype",{writable:!1}),C}(c(765).Z);window.HSOverlay=new M,document.addEventListener("load",window.HSOverlay.init())},181:(s,l,c)=>{function a(M){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},a(M)}function g(M,y){for(var p=0;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var C,f=k(m);if(w){var u=k(this).constructor;C=Reflect.construct(f,arguments,u)}else C=f.apply(this,arguments);return x(this,C)});function P(){return function(C,f){if(!(C instanceof f))throw new TypeError("Cannot call a class as a function")}(this,P),D.call(this,"[data-hs-remove-element]")}return y=P,(p=[{key:"init",value:function(){var C=this;document.addEventListener("click",function(f){var u=f.target.closest(C.selector);if(u){var _=document.querySelector(u.getAttribute("data-hs-remove-element"));_&&(_.classList.add("hs-removing"),C.afterTransition(_,function(){_.remove()}))}})}}])&&g(y.prototype,p),Object.defineProperty(y,"prototype",{writable:!1}),P}(c(765).Z);window.HSRemoveElement=new q,document.addEventListener("load",window.HSRemoveElement.init())},778:(s,l,c)=>{function a(M){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},a(M)}function g(M,y){for(var p=0;p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var C,f=k(m);if(w){var u=k(this).constructor;C=Reflect.construct(f,arguments,u)}else C=f.apply(this,arguments);return x(this,C)});function P(){var C;return function(f,u){if(!(f instanceof u))throw new TypeError("Cannot call a class as a function")}(this,P),(C=D.call(this,"[data-hs-scrollspy] ")).activeSection=null,C}return y=P,(p=[{key:"init",value:function(){var C=this;document.querySelectorAll(this.selector).forEach(function(f){var u=document.querySelector(f.getAttribute("data-hs-scrollspy")),_=f.querySelectorAll("[href]"),j=u.children,O=f.getAttribute("data-hs-scrollspy-scrollable-parent")?document.querySelector(f.getAttribute("data-hs-scrollspy-scrollable-parent")):document;Array.from(j).forEach(function(T){T.getAttribute("id")&&O.addEventListener("scroll",function(H){return C._update({$scrollspyEl:f,$scrollspyContentEl:u,links:_,$sectionEl:T,sections:j,ev:H})})}),_.forEach(function(T){T.addEventListener("click",function(H){H.preventDefault(),T.getAttribute("href")!=="javascript:;"&&C._scrollTo({$scrollspyEl:f,$scrollableEl:O,$link:T})})})})}},{key:"_update",value:function(C){var f=C.ev,u=C.$scrollspyEl,_=(C.sections,C.links),j=C.$sectionEl,O=parseInt(this.getClassProperty(u,"--scrollspy-offset","0")),T=this.getClassProperty(j,"--scrollspy-offset")||O,H=f.target===document?0:parseInt(f.target.getBoundingClientRect().top),I=parseInt(j.getBoundingClientRect().top)-T-H,F=j.offsetHeight;if(I<=0&&I+F>0){if(this.activeSection===j)return;_.forEach(function(ot){ot.classList.remove("active")});var J=u.querySelector('[href="#'.concat(j.getAttribute("id"),'"]'));if(J){J.classList.add("active");var Ce=J.closest("[data-hs-scrollspy-group]");if(Ce){var ae=Ce.querySelector("[href]");ae&&ae.classList.add("active")}}this.activeSection=j}}},{key:"_scrollTo",value:function(C){var f=C.$scrollspyEl,u=C.$scrollableEl,_=C.$link,j=document.querySelector(_.getAttribute("href")),O=parseInt(this.getClassProperty(f,"--scrollspy-offset","0")),T=this.getClassProperty(j,"--scrollspy-offset")||O,H=u===document?0:u.offsetTop,I=j.offsetTop-T-H,F=u===document?window:u;this._fireEvent("scroll",f),this._dispatch("scroll.hs.scrollspy",f,f),window.history.replaceState(null,null,_.getAttribute("href")),F.scrollTo({top:I,left:0,behavior:"smooth"})}}])&&g(y.prototype,p),Object.defineProperty(y,"prototype",{writable:!1}),P}(c(765).Z);window.HSScrollspy=new q,document.addEventListener("load",window.HSScrollspy.init())},51:(s,l,c)=>{function a(p){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},a(p)}function g(p){return function(m){if(Array.isArray(m))return h(m)}(p)||function(m){if(typeof Symbol<"u"&&m[Symbol.iterator]!=null||m["@@iterator"]!=null)return Array.from(m)}(p)||function(m,w){if(m){if(typeof m=="string")return h(m,w);var D=Object.prototype.toString.call(m).slice(8,-1);return D==="Object"&&m.constructor&&(D=m.constructor.name),D==="Map"||D==="Set"?Array.from(m):D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D)?h(m,w):void 0}}(p)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function h(p,m){(m==null||m>p.length)&&(m=p.length);for(var w=0,D=new Array(m);w"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var u,_=M(D);if(P){var j=M(this).constructor;u=Reflect.construct(_,arguments,j)}else u=_.apply(this,arguments);return q(this,u)});function f(){return function(u,_){if(!(u instanceof _))throw new TypeError("Cannot call a class as a function")}(this,f),C.call(this,"[data-hs-tab]")}return m=f,(w=[{key:"init",value:function(){var u=this;document.addEventListener("keydown",this._keyboardSupport.bind(this)),document.addEventListener("click",function(_){var j=_.target.closest(u.selector);j&&u.open(j)}),document.querySelectorAll("[hs-data-tab-select]").forEach(function(_){var j=document.querySelector(_.getAttribute("hs-data-tab-select"));j&&j.addEventListener("change",function(O){var T=document.querySelector('[data-hs-tab="'.concat(O.target.value,'"]'));T&&u.open(T)})})}},{key:"open",value:function(u){var _=document.querySelector(u.getAttribute("data-hs-tab")),j=g(u.parentElement.children),O=g(_.parentElement.children),T=u.closest("[hs-data-tab-select]"),H=T?document.querySelector(T.getAttribute("data-hs-tab")):null;j.forEach(function(I){return I.classList.remove("active")}),O.forEach(function(I){return I.classList.add("hidden")}),u.classList.add("active"),_.classList.remove("hidden"),this._fireEvent("change",u),this._dispatch("change.hs.tab",u,u),H&&(H.value=u.getAttribute("data-hs-tab"))}},{key:"_keyboardSupport",value:function(u){var _=u.target.closest(this.selector);if(_){var j=_.closest('[role="tablist"]').getAttribute("data-hs-tabs-vertical")==="true";return(j?u.keyCode===38:u.keyCode===37)?(u.preventDefault(),this._left(_)):(j?u.keyCode===40:u.keyCode===39)?(u.preventDefault(),this._right(_)):u.keyCode===36?(u.preventDefault(),this._start(_)):u.keyCode===35?(u.preventDefault(),this._end(_)):void 0}}},{key:"_right",value:function(u){var _=u.closest('[role="tablist"]');if(_){var j=g(_.querySelectorAll(this.selector)).filter(function(H){return!H.disabled}),O=_.querySelector("button:focus"),T=j.findIndex(function(H){return H===O});T+1{var a=c(765),g=c(714);function h(p){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},h(p)}function x(p,m){for(var w=0;w"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var u,_=M(D);if(P){var j=M(this).constructor;u=Reflect.construct(_,arguments,j)}else u=_.apply(this,arguments);return q(this,u)});function f(){return function(u,_){if(!(u instanceof _))throw new TypeError("Cannot call a class as a function")}(this,f),C.call(this,".hs-tooltip")}return m=f,(w=[{key:"init",value:function(){var u=this;document.addEventListener("click",function(_){var j=_.target.closest(u.selector);j&&u.getClassProperty(j,"--trigger")==="focus"&&u._focus(j),j&&u.getClassProperty(j,"--trigger")==="click"&&u._click(j)}),document.addEventListener("mousemove",function(_){var j=_.target.closest(u.selector);j&&u.getClassProperty(j,"--trigger")!=="focus"&&u.getClassProperty(j,"--trigger")!=="click"&&u._hover(j)})}},{key:"_hover",value:function(u){var _=this;if(!u.classList.contains("show")){var j=u.querySelector(".hs-tooltip-toggle"),O=u.querySelector(".hs-tooltip-content"),T=this.getClassProperty(u,"--placement");(0,g.fi)(j,O,{placement:T||"top",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(u),u.addEventListener("mouseleave",function H(I){I.relatedTarget.closest(_.selector)&&I.relatedTarget.closest(_.selector)==u||(_.hide(u),u.removeEventListener("mouseleave",H,!0))},!0)}}},{key:"_focus",value:function(u){var _=this,j=u.querySelector(".hs-tooltip-toggle"),O=u.querySelector(".hs-tooltip-content"),T=this.getClassProperty(u,"--placement"),H=this.getClassProperty(u,"--strategy");(0,g.fi)(j,O,{placement:T||"top",strategy:H||"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(u),u.addEventListener("blur",function I(){_.hide(u),u.removeEventListener("blur",I,!0)},!0)}},{key:"_click",value:function(u){var _=this;if(!u.classList.contains("show")){var j=u.querySelector(".hs-tooltip-toggle"),O=u.querySelector(".hs-tooltip-content"),T=this.getClassProperty(u,"--placement"),H=this.getClassProperty(u,"--strategy");(0,g.fi)(j,O,{placement:T||"top",strategy:H||"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(u);var I=function F(J){setTimeout(function(){_.hide(u),u.removeEventListener("click",F,!0),u.removeEventListener("blur",F,!0)})};u.addEventListener("blur",I,!0),u.addEventListener("click",I,!0)}}},{key:"show",value:function(u){var _=this;u.querySelector(".hs-tooltip-content").classList.remove("hidden"),setTimeout(function(){u.classList.add("show"),_._fireEvent("show",u),_._dispatch("show.hs.tooltip",u,u)})}},{key:"hide",value:function(u){var _=u.querySelector(".hs-tooltip-content");u.classList.remove("show"),this._fireEvent("hide",u),this._dispatch("hide.hs.tooltip",u,u),this.afterTransition(_,function(){u.classList.contains("show")||_.classList.add("hidden")})}}])&&x(m.prototype,w),Object.defineProperty(m,"prototype",{writable:!1}),f}(a.Z);window.HSTooltip=new y,document.addEventListener("load",window.HSTooltip.init())},765:(s,l,c)=>{function a(h,x){for(var k=0;kg});var g=function(){function h(q,M){(function(y,p){if(!(y instanceof p))throw new TypeError("Cannot call a class as a function")})(this,h),this.$collection=[],this.selector=q,this.config=M,this.events={}}var x,k;return x=h,k=[{key:"_fireEvent",value:function(q){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.events.hasOwnProperty(q)&&this.events[q](M)}},{key:"_dispatch",value:function(q,M){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,p=new CustomEvent(q,{detail:{payload:y},bubbles:!0,cancelable:!0,composed:!1});M.dispatchEvent(p)}},{key:"on",value:function(q,M){this.events[q]=M}},{key:"afterTransition",value:function(q,M){window.getComputedStyle(q,null).getPropertyValue("transition")!=="all 0s ease 0s"?q.addEventListener("transitionend",function y(){M(),q.removeEventListener("transitionend",y,!0)},!0):M()}},{key:"getClassProperty",value:function(q,M){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",p=(window.getComputedStyle(q).getPropertyValue(M)||y).replace(" ","");return p}}],k&&a(x.prototype,k),Object.defineProperty(x,"prototype",{writable:!1}),h}()},714:(s,l,c)=>{function a($){if($==null)return window;if($.toString()!=="[object Window]"){var b=$.ownerDocument;return b&&b.defaultView||window}return $}function g($){return $ instanceof a($).Element||$ instanceof Element}function h($){return $ instanceof a($).HTMLElement||$ instanceof HTMLElement}function x($){return typeof ShadowRoot<"u"&&($ instanceof a($).ShadowRoot||$ instanceof ShadowRoot)}c.d(l,{fi:()=>Fr});var k=Math.max,q=Math.min,M=Math.round;function y($,b){b===void 0&&(b=!1);var S=$.getBoundingClientRect(),R=1,W=1;if(h($)&&b){var z=$.offsetHeight,V=$.offsetWidth;V>0&&(R=M(S.width)/V||1),z>0&&(W=M(S.height)/z||1)}return{width:S.width/R,height:S.height/W,top:S.top/W,right:S.right/R,bottom:S.bottom/W,left:S.left/R,x:S.left/R,y:S.top/W}}function p($){var b=a($);return{scrollLeft:b.pageXOffset,scrollTop:b.pageYOffset}}function m($){return $?($.nodeName||"").toLowerCase():null}function w($){return((g($)?$.ownerDocument:$.document)||window.document).documentElement}function D($){return y(w($)).left+p($).scrollLeft}function P($){return a($).getComputedStyle($)}function C($){var b=P($),S=b.overflow,R=b.overflowX,W=b.overflowY;return/auto|scroll|overlay|hidden/.test(S+W+R)}function f($,b,S){S===void 0&&(S=!1);var R,W,z=h(b),V=h(b)&&function(te){var Ae=te.getBoundingClientRect(),se=M(Ae.width)/te.offsetWidth||1,ye=M(Ae.height)/te.offsetHeight||1;return se!==1||ye!==1}(b),K=w(b),X=y($,V),ne={scrollLeft:0,scrollTop:0},re={x:0,y:0};return(z||!z&&!S)&&((m(b)!=="body"||C(K))&&(ne=(R=b)!==a(R)&&h(R)?{scrollLeft:(W=R).scrollLeft,scrollTop:W.scrollTop}:p(R)),h(b)?((re=y(b,!0)).x+=b.clientLeft,re.y+=b.clientTop):K&&(re.x=D(K))),{x:X.left+ne.scrollLeft-re.x,y:X.top+ne.scrollTop-re.y,width:X.width,height:X.height}}function u($){var b=y($),S=$.offsetWidth,R=$.offsetHeight;return Math.abs(b.width-S)<=1&&(S=b.width),Math.abs(b.height-R)<=1&&(R=b.height),{x:$.offsetLeft,y:$.offsetTop,width:S,height:R}}function _($){return m($)==="html"?$:$.assignedSlot||$.parentNode||(x($)?$.host:null)||w($)}function j($){return["html","body","#document"].indexOf(m($))>=0?$.ownerDocument.body:h($)&&C($)?$:j(_($))}function O($,b){var S;b===void 0&&(b=[]);var R=j($),W=R===((S=$.ownerDocument)==null?void 0:S.body),z=a(R),V=W?[z].concat(z.visualViewport||[],C(R)?R:[]):R,K=b.concat(V);return W?K:K.concat(O(_(V)))}function T($){return["table","td","th"].indexOf(m($))>=0}function H($){return h($)&&P($).position!=="fixed"?$.offsetParent:null}function I($){for(var b=a($),S=H($);S&&T(S)&&P(S).position==="static";)S=H(S);return S&&(m(S)==="html"||m(S)==="body"&&P(S).position==="static")?b:S||function(R){var W=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1;if(navigator.userAgent.indexOf("Trident")!==-1&&h(R)&&P(R).position==="fixed")return null;for(var z=_(R);h(z)&&["html","body"].indexOf(m(z))<0;){var V=P(z);if(V.transform!=="none"||V.perspective!=="none"||V.contain==="paint"||["transform","perspective"].indexOf(V.willChange)!==-1||W&&V.willChange==="filter"||W&&V.filter&&V.filter!=="none")return z;z=z.parentNode}return null}($)||b}var F="top",J="bottom",Ce="right",ae="left",ot="auto",tt=[F,J,Ce,ae],Ge="start",Ue="end",ht="viewport",_e="popper",ft=tt.reduce(function($,b){return $.concat([b+"-"+Ge,b+"-"+Ue])},[]),We=[].concat(tt,[ot]).reduce(function($,b){return $.concat([b,b+"-"+Ge,b+"-"+Ue])},[]),yt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Nt($){var b=new Map,S=new Set,R=[];function W(z){S.add(z.name),[].concat(z.requires||[],z.requiresIfExists||[]).forEach(function(V){if(!S.has(V)){var K=b.get(V);K&&W(K)}}),R.push(z)}return $.forEach(function(z){b.set(z.name,z)}),$.forEach(function(z){S.has(z.name)||W(z)}),R}var It={placement:"bottom",modifiers:[],strategy:"absolute"};function qe(){for(var $=arguments.length,b=new Array($),S=0;S<$;S++)b[S]=arguments[S];return!b.some(function(R){return!(R&&typeof R.getBoundingClientRect=="function")})}function bt($){$===void 0&&($={});var b=$,S=b.defaultModifiers,R=S===void 0?[]:S,W=b.defaultOptions,z=W===void 0?It:W;return function(V,K,X){X===void 0&&(X=z);var ne,re,te={placement:"bottom",orderedModifiers:[],options:Object.assign({},It,z),modifiersData:{},elements:{reference:V,popper:K},attributes:{},styles:{}},Ae=[],se=!1,ye={state:te,setOptions:function(ie){var Me=typeof ie=="function"?ie(te.options):ie;ge(),te.options=Object.assign({},z,te.options,Me),te.scrollParents={reference:g(V)?O(V):V.contextElement?O(V.contextElement):[],popper:O(K)};var ke,fe,we=function(le){var ce=Nt(le);return yt.reduce(function(de,me){return de.concat(ce.filter(function($e){return $e.phase===me}))},[])}((ke=[].concat(R,te.options.modifiers),fe=ke.reduce(function(le,ce){var de=le[ce.name];return le[ce.name]=de?Object.assign({},de,ce,{options:Object.assign({},de.options,ce.options),data:Object.assign({},de.data,ce.data)}):ce,le},{}),Object.keys(fe).map(function(le){return fe[le]})));return te.orderedModifiers=we.filter(function(le){return le.enabled}),te.orderedModifiers.forEach(function(le){var ce=le.name,de=le.options,me=de===void 0?{}:de,$e=le.effect;if(typeof $e=="function"){var Ne=$e({state:te,name:ce,instance:ye,options:me});Ae.push(Ne||function(){})}}),ye.update()},forceUpdate:function(){if(!se){var ie=te.elements,Me=ie.reference,ke=ie.popper;if(qe(Me,ke)){te.rects={reference:f(Me,I(ke),te.options.strategy==="fixed"),popper:u(ke)},te.reset=!1,te.placement=te.options.placement,te.orderedModifiers.forEach(function($e){return te.modifiersData[$e.name]=Object.assign({},$e.data)});for(var fe=0;fe=0?"x":"y"}function ee($){var b,S=$.reference,R=$.element,W=$.placement,z=W?ze(W):null,V=W?je(W):null,K=S.x+S.width/2-R.width/2,X=S.y+S.height/2-R.height/2;switch(z){case F:b={x:K,y:S.y-R.height};break;case J:b={x:K,y:S.y+S.height};break;case Ce:b={x:S.x+S.width,y:X};break;case ae:b={x:S.x-R.width,y:X};break;default:b={x:S.x,y:S.y}}var ne=z?Pe(z):null;if(ne!=null){var re=ne==="y"?"height":"width";switch(V){case Ge:b[ne]=b[ne]-(S[re]/2-R[re]/2);break;case Ue:b[ne]=b[ne]+(S[re]/2-R[re]/2)}}return b}var Be={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oe($){var b,S=$.popper,R=$.popperRect,W=$.placement,z=$.variation,V=$.offsets,K=$.position,X=$.gpuAcceleration,ne=$.adaptive,re=$.roundOffsets,te=$.isFixed,Ae=V.x,se=Ae===void 0?0:Ae,ye=V.y,ge=ye===void 0?0:ye,ie=typeof re=="function"?re({x:se,y:ge}):{x:se,y:ge};se=ie.x,ge=ie.y;var Me=V.hasOwnProperty("x"),ke=V.hasOwnProperty("y"),fe=ae,we=F,le=window;if(ne){var ce=I(S),de="clientHeight",me="clientWidth";ce===a(S)&&P(ce=w(S)).position!=="static"&&K==="absolute"&&(de="scrollHeight",me="scrollWidth"),ce=ce,(W===F||(W===ae||W===Ce)&&z===Ue)&&(we=J,ge-=(te&&le.visualViewport?le.visualViewport.height:ce[de])-R.height,ge*=X?1:-1),W!==ae&&(W!==F&&W!==J||z!==Ue)||(fe=Ce,se-=(te&&le.visualViewport?le.visualViewport.width:ce[me])-R.width,se*=X?1:-1)}var $e,Ne=Object.assign({position:K},ne&&Be),Ie=re===!0?function(Je){var it=Je.x,dt=Je.y,Ye=window.devicePixelRatio||1;return{x:M(it*Ye)/Ye||0,y:M(dt*Ye)/Ye||0}}({x:se,y:ge}):{x:se,y:ge};return se=Ie.x,ge=Ie.y,X?Object.assign({},Ne,(($e={})[we]=ke?"0":"",$e[fe]=Me?"0":"",$e.transform=(le.devicePixelRatio||1)<=1?"translate("+se+"px, "+ge+"px)":"translate3d("+se+"px, "+ge+"px, 0)",$e)):Object.assign({},Ne,((b={})[we]=ke?ge+"px":"",b[fe]=Me?se+"px":"",b.transform="",b))}var $t={left:"right",right:"left",bottom:"top",top:"bottom"};function Ft($){return $.replace(/left|right|bottom|top/g,function(b){return $t[b]})}var Qr={start:"end",end:"start"};function Tn($){return $.replace(/start|end/g,function(b){return Qr[b]})}function jn($,b){var S=b.getRootNode&&b.getRootNode();if($.contains(b))return!0;if(S&&x(S)){var R=b;do{if(R&&$.isSameNode(R))return!0;R=R.parentNode||R.host}while(R)}return!1}function gn($){return Object.assign({},$,{left:$.x,top:$.y,right:$.x+$.width,bottom:$.y+$.height})}function Pn($,b){return b===ht?gn(function(S){var R=a(S),W=w(S),z=R.visualViewport,V=W.clientWidth,K=W.clientHeight,X=0,ne=0;return z&&(V=z.width,K=z.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(X=z.offsetLeft,ne=z.offsetTop)),{width:V,height:K,x:X+D(S),y:ne}}($)):g(b)?function(S){var R=y(S);return R.top=R.top+S.clientTop,R.left=R.left+S.clientLeft,R.bottom=R.top+S.clientHeight,R.right=R.left+S.clientWidth,R.width=S.clientWidth,R.height=S.clientHeight,R.x=R.left,R.y=R.top,R}(b):gn(function(S){var R,W=w(S),z=p(S),V=(R=S.ownerDocument)==null?void 0:R.body,K=k(W.scrollWidth,W.clientWidth,V?V.scrollWidth:0,V?V.clientWidth:0),X=k(W.scrollHeight,W.clientHeight,V?V.scrollHeight:0,V?V.clientHeight:0),ne=-z.scrollLeft+D(S),re=-z.scrollTop;return P(V||W).direction==="rtl"&&(ne+=k(W.clientWidth,V?V.clientWidth:0)-K),{width:K,height:X,x:ne,y:re}}(w($)))}function qn($){return Object.assign({},{top:0,right:0,bottom:0,left:0},$)}function An($,b){return b.reduce(function(S,R){return S[R]=$,S},{})}function zt($,b){b===void 0&&(b={});var S=b,R=S.placement,W=R===void 0?$.placement:R,z=S.boundary,V=z===void 0?"clippingParents":z,K=S.rootBoundary,X=K===void 0?ht:K,ne=S.elementContext,re=ne===void 0?_e:ne,te=S.altBoundary,Ae=te!==void 0&&te,se=S.padding,ye=se===void 0?0:se,ge=qn(typeof ye!="number"?ye:An(ye,tt)),ie=re===_e?"reference":_e,Me=$.rects.popper,ke=$.elements[Ae?ie:re],fe=function(Ie,Je,it){var dt=Je==="clippingParents"?function(Ee){var vt=O(_(Ee)),Ke=["absolute","fixed"].indexOf(P(Ee).position)>=0&&h(Ee)?I(Ee):Ee;return g(Ke)?vt.filter(function(Qe){return g(Qe)&&jn(Qe,Ke)&&m(Qe)!=="body"}):[]}(Ie):[].concat(Je),Ye=[].concat(dt,[it]),Ze=Ye[0],He=Ye.reduce(function(Ee,vt){var Ke=Pn(Ie,vt);return Ee.top=k(Ke.top,Ee.top),Ee.right=q(Ke.right,Ee.right),Ee.bottom=q(Ke.bottom,Ee.bottom),Ee.left=k(Ke.left,Ee.left),Ee},Pn(Ie,Ze));return He.width=He.right-He.left,He.height=He.bottom-He.top,He.x=He.left,He.y=He.top,He}(g(ke)?ke:ke.contextElement||w($.elements.popper),V,X),we=y($.elements.reference),le=ee({reference:we,element:Me,strategy:"absolute",placement:W}),ce=gn(Object.assign({},Me,le)),de=re===_e?ce:we,me={top:fe.top-de.top+ge.top,bottom:de.bottom-fe.bottom+ge.bottom,left:fe.left-de.left+ge.left,right:de.right-fe.right+ge.right},$e=$.modifiersData.offset;if(re===_e&&$e){var Ne=$e[W];Object.keys(me).forEach(function(Ie){var Je=[Ce,J].indexOf(Ie)>=0?1:-1,it=[F,J].indexOf(Ie)>=0?"y":"x";me[Ie]+=Ne[it]*Je})}return me}function Vt($,b,S){return k($,q(b,S))}function Mn($,b,S){return S===void 0&&(S={x:0,y:0}),{top:$.top-b.height-S.y,right:$.right-b.width+S.x,bottom:$.bottom-b.height+S.y,left:$.left-b.width-S.x}}function Dn($){return[F,Ce,J,ae].some(function(b){return $[b]>=0})}var Fr=bt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function($){var b=$.state,S=$.instance,R=$.options,W=R.scroll,z=W===void 0||W,V=R.resize,K=V===void 0||V,X=a(b.elements.popper),ne=[].concat(b.scrollParents.reference,b.scrollParents.popper);return z&&ne.forEach(function(re){re.addEventListener("scroll",S.update,Re)}),K&&X.addEventListener("resize",S.update,Re),function(){z&&ne.forEach(function(re){re.removeEventListener("scroll",S.update,Re)}),K&&X.removeEventListener("resize",S.update,Re)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function($){var b=$.state,S=$.name;b.modifiersData[S]=ee({reference:b.rects.reference,element:b.rects.popper,strategy:"absolute",placement:b.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function($){var b=$.state,S=$.options,R=S.gpuAcceleration,W=R===void 0||R,z=S.adaptive,V=z===void 0||z,K=S.roundOffsets,X=K===void 0||K,ne={placement:ze(b.placement),variation:je(b.placement),popper:b.elements.popper,popperRect:b.rects.popper,gpuAcceleration:W,isFixed:b.options.strategy==="fixed"};b.modifiersData.popperOffsets!=null&&(b.styles.popper=Object.assign({},b.styles.popper,oe(Object.assign({},ne,{offsets:b.modifiersData.popperOffsets,position:b.options.strategy,adaptive:V,roundOffsets:X})))),b.modifiersData.arrow!=null&&(b.styles.arrow=Object.assign({},b.styles.arrow,oe(Object.assign({},ne,{offsets:b.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:X})))),b.attributes.popper=Object.assign({},b.attributes.popper,{"data-popper-placement":b.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function($){var b=$.state;Object.keys(b.elements).forEach(function(S){var R=b.styles[S]||{},W=b.attributes[S]||{},z=b.elements[S];h(z)&&m(z)&&(Object.assign(z.style,R),Object.keys(W).forEach(function(V){var K=W[V];K===!1?z.removeAttribute(V):z.setAttribute(V,K===!0?"":K)}))})},effect:function($){var b=$.state,S={popper:{position:b.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(b.elements.popper.style,S.popper),b.styles=S,b.elements.arrow&&Object.assign(b.elements.arrow.style,S.arrow),function(){Object.keys(b.elements).forEach(function(R){var W=b.elements[R],z=b.attributes[R]||{},V=Object.keys(b.styles.hasOwnProperty(R)?b.styles[R]:S[R]).reduce(function(K,X){return K[X]="",K},{});h(W)&&m(W)&&(Object.assign(W.style,V),Object.keys(z).forEach(function(K){W.removeAttribute(K)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function($){var b=$.state,S=$.options,R=$.name,W=S.offset,z=W===void 0?[0,0]:W,V=We.reduce(function(re,te){return re[te]=function(Ae,se,ye){var ge=ze(Ae),ie=[ae,F].indexOf(ge)>=0?-1:1,Me=typeof ye=="function"?ye(Object.assign({},se,{placement:Ae})):ye,ke=Me[0],fe=Me[1];return ke=ke||0,fe=(fe||0)*ie,[ae,Ce].indexOf(ge)>=0?{x:fe,y:ke}:{x:ke,y:fe}}(te,b.rects,z),re},{}),K=V[b.placement],X=K.x,ne=K.y;b.modifiersData.popperOffsets!=null&&(b.modifiersData.popperOffsets.x+=X,b.modifiersData.popperOffsets.y+=ne),b.modifiersData[R]=V}},{name:"flip",enabled:!0,phase:"main",fn:function($){var b=$.state,S=$.options,R=$.name;if(!b.modifiersData[R]._skip){for(var W=S.mainAxis,z=W===void 0||W,V=S.altAxis,K=V===void 0||V,X=S.fallbackPlacements,ne=S.padding,re=S.boundary,te=S.rootBoundary,Ae=S.altBoundary,se=S.flipVariations,ye=se===void 0||se,ge=S.allowedAutoPlacements,ie=b.options.placement,Me=ze(ie),ke=X||(Me!==ie&&ye?function(Qe){if(ze(Qe)===ot)return[];var st=Ft(Qe);return[Tn(Qe),st,Tn(st)]}(ie):[Ft(ie)]),fe=[ie].concat(ke).reduce(function(Qe,st){return Qe.concat(ze(st)===ot?function(Lt,_t){_t===void 0&&(_t={});var lt=_t,Jt=lt.placement,Yt=lt.boundary,Et=lt.rootBoundary,mn=lt.padding,hn=lt.flipVariations,Tt=lt.allowedAutoPlacements,yn=Tt===void 0?We:Tt,Gt=je(Jt),Kt=Gt?hn?ft:ft.filter(function(ct){return je(ct)===Gt}):tt,jt=Kt.filter(function(ct){return yn.indexOf(ct)>=0});jt.length===0&&(jt=Kt);var Pt=jt.reduce(function(ct,kt){return ct[kt]=zt(Lt,{placement:kt,boundary:Yt,rootBoundary:Et,padding:mn})[ze(kt)],ct},{});return Object.keys(Pt).sort(function(ct,kt){return Pt[ct]-Pt[kt]})}(b,{placement:st,boundary:re,rootBoundary:te,padding:ne,flipVariations:ye,allowedAutoPlacements:ge}):st)},[]),we=b.rects.reference,le=b.rects.popper,ce=new Map,de=!0,me=fe[0],$e=0;$e=0,dt=it?"width":"height",Ye=zt(b,{placement:Ne,boundary:re,rootBoundary:te,altBoundary:Ae,padding:ne}),Ze=it?Je?Ce:ae:Je?J:F;we[dt]>le[dt]&&(Ze=Ft(Ze));var He=Ft(Ze),Ee=[];if(z&&Ee.push(Ye[Ie]<=0),K&&Ee.push(Ye[Ze]<=0,Ye[He]<=0),Ee.every(function(Qe){return Qe})){me=Ne,de=!1;break}ce.set(Ne,Ee)}if(de)for(var vt=function(Qe){var st=fe.find(function(Lt){var _t=ce.get(Lt);if(_t)return _t.slice(0,Qe).every(function(lt){return lt})});if(st)return me=st,"break"},Ke=ye?3:1;Ke>0&&vt(Ke)!=="break";Ke--);b.placement!==me&&(b.modifiersData[R]._skip=!0,b.placement=me,b.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function($){var b=$.state,S=$.options,R=$.name,W=S.mainAxis,z=W===void 0||W,V=S.altAxis,K=V!==void 0&&V,X=S.boundary,ne=S.rootBoundary,re=S.altBoundary,te=S.padding,Ae=S.tether,se=Ae===void 0||Ae,ye=S.tetherOffset,ge=ye===void 0?0:ye,ie=zt(b,{boundary:X,rootBoundary:ne,padding:te,altBoundary:re}),Me=ze(b.placement),ke=je(b.placement),fe=!ke,we=Pe(Me),le=we==="x"?"y":"x",ce=b.modifiersData.popperOffsets,de=b.rects.reference,me=b.rects.popper,$e=typeof ge=="function"?ge(Object.assign({},b.rects,{placement:b.placement})):ge,Ne=typeof $e=="number"?{mainAxis:$e,altAxis:$e}:Object.assign({mainAxis:0,altAxis:0},$e),Ie=b.modifiersData.offset?b.modifiersData.offset[b.placement]:null,Je={x:0,y:0};if(ce){if(z){var it,dt=we==="y"?F:ae,Ye=we==="y"?J:Ce,Ze=we==="y"?"height":"width",He=ce[we],Ee=He+ie[dt],vt=He-ie[Ye],Ke=se?-me[Ze]/2:0,Qe=ke===Ge?de[Ze]:me[Ze],st=ke===Ge?-me[Ze]:-de[Ze],Lt=b.elements.arrow,_t=se&&Lt?u(Lt):{width:0,height:0},lt=b.modifiersData["arrow#persistent"]?b.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Jt=lt[dt],Yt=lt[Ye],Et=Vt(0,de[Ze],_t[Ze]),mn=fe?de[Ze]/2-Ke-Et-Jt-Ne.mainAxis:Qe-Et-Jt-Ne.mainAxis,hn=fe?-de[Ze]/2+Ke+Et+Yt+Ne.mainAxis:st+Et+Yt+Ne.mainAxis,Tt=b.elements.arrow&&I(b.elements.arrow),yn=Tt?we==="y"?Tt.clientTop||0:Tt.clientLeft||0:0,Gt=(it=Ie==null?void 0:Ie[we])!=null?it:0,Kt=He+hn-Gt,jt=Vt(se?q(Ee,He+mn-Gt-yn):Ee,He,se?k(vt,Kt):vt);ce[we]=jt,Je[we]=jt-He}if(K){var Pt,ct=we==="x"?F:ae,kt=we==="x"?J:Ce,xt=ce[le],Xt=le==="y"?"height":"width",Rn=xt+ie[ct],Hn=xt-ie[kt],bn=[F,ae].indexOf(Me)!==-1,Bn=(Pt=Ie==null?void 0:Ie[le])!=null?Pt:0,Nn=bn?Rn:xt-de[Xt]-me[Xt]-Bn+Ne.altAxis,In=bn?xt+de[Xt]+me[Xt]-Bn-Ne.altAxis:Hn,zn=se&&bn?function(Jr,Yr,vn){var Vn=Vt(Jr,Yr,vn);return Vn>vn?vn:Vn}(Nn,xt,In):Vt(se?Nn:Rn,xt,se?In:Hn);ce[le]=zn,Je[le]=zn-xt}b.modifiersData[R]=Je}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function($){var b,S=$.state,R=$.name,W=$.options,z=S.elements.arrow,V=S.modifiersData.popperOffsets,K=ze(S.placement),X=Pe(K),ne=[ae,Ce].indexOf(K)>=0?"height":"width";if(z&&V){var re=function(me,$e){return qn(typeof(me=typeof me=="function"?me(Object.assign({},$e.rects,{placement:$e.placement})):me)!="number"?me:An(me,tt))}(W.padding,S),te=u(z),Ae=X==="y"?F:ae,se=X==="y"?J:Ce,ye=S.rects.reference[ne]+S.rects.reference[X]-V[X]-S.rects.popper[ne],ge=V[X]-S.rects.reference[X],ie=I(z),Me=ie?X==="y"?ie.clientHeight||0:ie.clientWidth||0:0,ke=ye/2-ge/2,fe=re[Ae],we=Me-te[ne]-re[se],le=Me/2-te[ne]/2+ke,ce=Vt(fe,le,we),de=X;S.modifiersData[R]=((b={})[de]=ce,b.centerOffset=ce-le,b)}},effect:function($){var b=$.state,S=$.options.element,R=S===void 0?"[data-popper-arrow]":S;R!=null&&(typeof R!="string"||(R=b.elements.popper.querySelector(R)))&&jn(b.elements.popper,R)&&(b.elements.arrow=R)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function($){var b=$.state,S=$.name,R=b.rects.reference,W=b.rects.popper,z=b.modifiersData.preventOverflow,V=zt(b,{elementContext:"reference"}),K=zt(b,{altBoundary:!0}),X=Mn(V,R),ne=Mn(K,W,z),re=Dn(X),te=Dn(ne);b.modifiersData[S]={referenceClippingOffsets:X,popperEscapeOffsets:ne,isReferenceHidden:re,hasPopperEscaped:te},b.attributes.popper=Object.assign({},b.attributes.popper,{"data-popper-reference-hidden":re,"data-popper-escaped":te})}}]})}},t={};function r(s){var l=t[s];if(l!==void 0)return l.exports;var c=t[s]={exports:{}};return n[s](c,c.exports,r),c.exports}r.d=(s,l)=>{for(var c in l)r.o(l,c)&&!r.o(s,c)&&Object.defineProperty(s,c,{enumerable:!0,get:l[c]})},r.o=(s,l)=>Object.prototype.hasOwnProperty.call(s,l),r.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var i={};return r.r(i),r(661),r(795),r(682),r(284),r(181),r(778),r(51),r(185),i})()})})(Mo);function Do(o){let e=o[0].title+"",n;return{c(){n=pe(e)},m(t,r){N(t,n,r)},p(t,r){r&1&&e!==(e=t[0].title+"")&&De(n,e)},d(t){t&&B(n)}}}function Ro(o){let e,n;return{c(){e=pe("Welcome to "),n=E("span"),n.textContent="Vanna.AI",d(n,"class","nav-title")},m(t,r){N(t,e,r),N(t,n,r)},p:Y,d(t){t&&(B(e),B(n))}}}function Ho(o){let e,n,t,r,i=o[0].subtitle+"",s;function l(g,h){return g[0].title=="Welcome to Vanna.AI"?Ro:Do}let c=l(o),a=c(o);return{c(){e=E("div"),n=E("h1"),a.c(),t=Q(),r=E("p"),s=pe(i),d(n,"class","text-3xl font-bold text-gray-800 sm:text-4xl dark:text-white"),d(r,"class","mt-3 text-gray-600 dark:text-gray-400"),d(e,"class","max-w-4xl px-4 sm:px-6 lg:px-8 mx-auto text-center")},m(g,h){N(g,e,h),v(e,n),a.m(n,null),v(e,t),v(e,r),v(r,s)},p(g,[h]){c===(c=l(g))&&a?a.p(g,h):(a.d(1),a=c(g),a&&(a.c(),a.m(n,null))),h&1&&i!==(i=g[0].subtitle+"")&&De(s,i)},i:Y,o:Y,d(g){g&&B(e),a.d()}}}function Bo(o,e,n){let t;return et(o,Ot,r=>n(0,t=r)),[t]}class No extends ve{constructor(e){super(),be(this,e,Bo,Ho,he,{})}}function Io(o){let e,n;const t=o[1].default,r=on(t,o,o[0],null);return{c(){e=E("p"),r&&r.c(),d(e,"class","text-gray-800 dark:text-gray-200")},m(i,s){N(i,e,s),r&&r.m(e,null),n=!0},p(i,[s]){r&&r.p&&(!n||s&1)&&ln(r,t,i,i[0],n?sn(t,i[0],s,null):an(i[0]),null)},i(i){n||(L(r,i),n=!0)},o(i){A(r,i),n=!1},d(i){i&&B(e),r&&r.d(i)}}}function zo(o,e,n){let{$$slots:t={},$$scope:r}=e;return o.$$set=i=>{"$$scope"in i&&n(0,r=i.$$scope)},[r,t]}class at extends ve{constructor(e){super(),be(this,e,zo,Io,he,{})}}function Vo(o){let e;return{c(){e=pe(o[0])},m(n,t){N(n,e,t)},p(n,t){t&1&&De(e,n[0])},d(n){n&&B(e)}}}function Go(o){let e,n,t,r,i,s,l,c,a;l=new at({props:{$$slots:{default:[Vo]},$$scope:{ctx:o}}});const g=o[1].default,h=on(g,o,o[2],null);return{c(){e=E("li"),n=E("div"),t=E("div"),r=E("span"),r.innerHTML='You',i=Q(),s=E("div"),U(l.$$.fragment),c=Q(),h&&h.c(),d(r,"class","flex-shrink-0 inline-flex items-center justify-center h-[2.375rem] w-[2.375rem] rounded-full bg-gray-600"),d(s,"class","grow mt-2 space-y-3"),d(t,"class","max-w-2xl flex gap-x-2 sm:gap-x-4"),d(n,"class","max-w-4xl px-4 sm:px-6 lg:px-8 mx-auto"),d(e,"class","py-2 sm:py-4")},m(x,k){N(x,e,k),v(e,n),v(n,t),v(t,r),v(t,i),v(t,s),G(l,s,null),v(s,c),h&&h.m(s,null),a=!0},p(x,[k]){const q={};k&5&&(q.$$scope={dirty:k,ctx:x}),l.$set(q),h&&h.p&&(!a||k&4)&&ln(h,g,x,x[2],a?sn(g,x[2],k,null):an(x[2]),null)},i(x){a||(L(l.$$.fragment,x),L(h,x),a=!0)},o(x){A(l.$$.fragment,x),A(h,x),a=!1},d(x){x&&B(e),Z(l),h&&h.d(x)}}}function Zo(o,e,n){let{$$slots:t={},$$scope:r}=e,{message:i}=e;return o.$$set=s=>{"message"in s&&n(0,i=s.message),"$$scope"in s&&n(2,r=s.$$scope)},[i,t,r]}class Ct extends ve{constructor(e){super(),be(this,e,Zo,Go,he,{message:0})}}function Uo(o){let e,n,t;return{c(){e=E("button"),e.innerHTML='',d(e,"type","button"),d(e,"class","inline-flex flex-shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:text-blue-600 focus:z-10 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:hover:text-blue-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600")},m(r,i){N(r,e,i),n||(t=Te(e,"click",o[1]),n=!0)},p:Y,d(r){r&&B(e),n=!1,t()}}}function Wo(o){let e;return{c(){e=E("button"),e.innerHTML='',d(e,"type","button"),d(e,"class","animate-ping animate-pulse inline-flex flex-shrink-0 justify-center items-center size-8 rounded-lg text-red-500 hover:text-red-600 focus:z-10 focus:outline-none focus:ring-2 focus:ring-red-500 dark:hover:text-red-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-red-600")},m(n,t){N(n,e,t)},p:Y,d(n){n&&B(e)}}}function Qo(o){let e;function n(i,s){return i[0]?Wo:Uo}let t=n(o),r=t(o);return{c(){r.c(),e=Ve()},m(i,s){r.m(i,s),N(i,e,s)},p(i,[s]){t===(t=n(i))&&r?r.p(i,s):(r.d(1),r=t(i),r&&(r.c(),r.m(e.parentNode,e)))},i:Y,o:Y,d(i){i&&B(e),r.d(i)}}}function Fo(o,e,n){let{newMessage:t}=e,r=!1;function i(){if(n(0,r=!0),Nr.set(!0),"webkitSpeechRecognition"in window)var s=new window.webkitSpeechRecognition;else var s=new window.SpeechRecognition;s.lang="en-US",s.start(),s.onresult=l=>{const c=l.results[0][0].transcript;console.log(c),n(2,t=c),n(0,r=!1)},s.onend=()=>{n(0,r=!1)},s.onerror=()=>{n(0,r=!1)}}return o.$$set=s=>{"newMessage"in s&&n(2,t=s.newMessage)},[r,i,t]}class Jo extends ve{constructor(e){super(),be(this,e,Fo,Qo,he,{newMessage:2})}}function Yo(o){let e,n,t,r,i,s,l,c,a,g,h,x,k,q,M;function y(m){o[5](m)}let p={};return o[0]!==void 0&&(p.newMessage=o[0]),a=new Jo({props:p}),$n.push(()=>uo(a,"newMessage",y)),{c(){e=E("div"),n=E("input"),t=Q(),r=E("div"),i=E("div"),s=E("div"),s.innerHTML="",l=Q(),c=E("div"),U(a.$$.fragment),h=Q(),x=E("button"),x.innerHTML='',d(n,"type","text"),d(n,"class","p-4 pb-12 block w-full bg-gray-100 border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-800 dark:border-gray-700 dark:text-gray-400"),d(n,"placeholder","Ask me a question about your data that I can turn into SQL."),d(s,"class","flex items-center"),d(x,"type","button"),d(x,"class","inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-white bg-blue-600 hover:bg-blue-500 focus:z-10 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all"),d(c,"class","flex items-center gap-x-1"),d(i,"class","flex justify-between items-center"),d(r,"class","absolute bottom-px inset-x-px p-2 rounded-b-md bg-gray-100 dark:bg-slate-800"),d(e,"class","relative")},m(m,w){N(m,e,w),v(e,n),gt(n,o[0]),v(e,t),v(e,r),v(r,i),v(i,s),v(i,l),v(i,c),G(a,c,null),v(c,h),v(c,x),k=!0,q||(M=[Te(n,"input",o[4]),Te(n,"keydown",o[1]),Te(x,"click",o[2])],q=!0)},p(m,[w]){w&1&&n.value!==m[0]&>(n,m[0]);const D={};!g&&w&1&&(g=!0,D.newMessage=m[0],lo(()=>g=!1)),a.$set(D)},i(m){k||(L(a.$$.fragment,m),k=!0)},o(m){A(a.$$.fragment,m),k=!1},d(m){m&&B(e),Z(a),q=!1,mt(M)}}}function Ko(o,e,n){let{onSubmit:t}=e,r="";function i(a){a.key==="Enter"&&(t(r),a.preventDefault())}function s(){t(r)}function l(){r=this.value,n(0,r)}function c(a){r=a,n(0,r)}return o.$$set=a=>{"onSubmit"in a&&n(3,t=a.onSubmit)},[r,i,s,t,l,c]}class Xo extends ve{constructor(e){super(),be(this,e,Ko,Yo,he,{onSubmit:3})}}function ei(o){let e;return{c(){e=E("div"),e.innerHTML='',d(e,"class","lg:hidden flex justify-end mb-2 sm:mb-3")},m(n,t){N(n,e,t)},p:Y,i:Y,o:Y,d(n){n&&B(e)}}}class ti extends ve{constructor(e){super(),be(this,e,null,ei,he,{})}}function ni(o){let e,n,t,r;return{c(){e=E("button"),n=pe(o[0]),d(e,"type","button"),d(e,"class","mb-2.5 mr-1.5 py-2 px-3 inline-flex justify-center items-center gap-x-2 rounded-md border border-blue-600 bg-white text-blue-600 align-middle hover:bg-blue-50 text-sm dark:bg-slate-900 dark:text-blue-500 dark:border-blue-500 dark:hover:text-blue-400 dark:hover:border-blue-400")},m(i,s){N(i,e,s),v(e,n),t||(r=Te(e,"click",o[1]),t=!0)},p(i,[s]){s&1&&De(n,i[0])},i:Y,o:Y,d(i){i&&B(e),t=!1,r()}}}function ri(o,e,n){let{message:t}=e,{onSubmit:r}=e;function i(){r(t)}return o.$$set=s=>{"message"in s&&n(0,t=s.message),"onSubmit"in s&&n(2,r=s.onSubmit)},[t,i,r]}class ut extends ve{constructor(e){super(),be(this,e,ri,ni,he,{message:0,onSubmit:2})}}function oi(o){let e,n,t,r,i,s,l,c,a,g,h;return{c(){e=E("span"),n=Xe("svg"),t=Xe("defs"),r=Xe("linearGradient"),i=Xe("stop"),s=Xe("stop"),l=Xe("g"),c=Xe("g"),a=Xe("path"),g=Xe("path"),d(i,"offset","0"),d(i,"stop-color","#009efd"),d(s,"offset","1"),d(s,"stop-color","#2af598"),d(r,"gradientTransform","matrix(1.09331 0 0 1.09331 -47.1838 -88.8946)"),d(r,"gradientUnits","userSpaceOnUse"),d(r,"id","LinearGradient"),d(r,"x1","237.82"),d(r,"x2","785.097"),d(r,"y1","549.609"),d(r,"y2","549.609"),d(a,"d","M117.718 228.798C117.718 119.455 206.358 30.8151 315.701 30.8151L708.299 30.8151C817.642 30.8151 906.282 119.455 906.282 228.798L906.282 795.202C906.282 904.545 817.642 993.185 708.299 993.185L315.701 993.185C206.358 993.185 117.718 904.545 117.718 795.202L117.718 228.798Z"),d(a,"fill","#0f172a"),d(a,"fill-rule","nonzero"),d(a,"opacity","1"),d(a,"stroke","#374151"),d(a,"stroke-linecap","butt"),d(a,"stroke-linejoin","round"),d(a,"stroke-width","20"),d(g,"d","M212.828 215.239C213.095 281.169 213.629 413.028 213.629 413.028C213.629 413.028 511.51 808.257 513.993 809.681C612.915 677.809 810.759 414.065 810.759 414.065C810.759 414.065 811.034 280.901 811.172 214.319C662.105 362.973 662.105 362.973 513.038 511.627C362.933 363.433 362.933 363.433 212.828 215.239Z"),d(g,"fill","url(#LinearGradient)"),d(g,"fill-rule","nonzero"),d(g,"opacity","1"),d(g,"stroke","none"),d(c,"opacity","1"),d(l,"id","Layer-1"),d(n,"height","100%"),d(n,"stroke-miterlimit","10"),tn(n,"fill-rule","nonzero"),tn(n,"clip-rule","evenodd"),tn(n,"stroke-linecap","round"),tn(n,"stroke-linejoin","round"),d(n,"version","1.1"),d(n,"viewBox","0 0 1024 1024"),d(n,"width","100%"),d(n,"xml:space","preserve"),d(n,"xmlns","http://www.w3.org/2000/svg"),d(e,"class",h="flex-shrink-0 w-[2.375rem] h-[2.375rem] "+o[0])},m(x,k){N(x,e,k),v(e,n),v(n,t),v(t,r),v(r,i),v(r,s),v(n,l),v(l,c),v(c,a),v(c,g)},p(x,[k]){k&1&&h!==(h="flex-shrink-0 w-[2.375rem] h-[2.375rem] "+x[0])&&d(e,"class",h)},i:Y,o:Y,d(x){x&&B(e)}}}function ii(o,e,n){let t,{animate:r=!1}=e;return o.$$set=i=>{"animate"in i&&n(1,r=i.animate)},o.$$.update=()=>{o.$$.dirty&2&&n(0,t=r?"animate-bounce":"")},[t,r]}class Vr extends ve{constructor(e){super(),be(this,e,ii,oi,he,{animate:1})}}function si(o){let e,n,t,r,i;n=new Vr({});const s=o[1].default,l=on(s,o,o[0],null);return{c(){e=E("li"),U(n.$$.fragment),t=Q(),r=E("div"),l&&l.c(),d(r,"class","space-y-3 overflow-x-auto overflow-y-hidden whitespace-break-spaces"),d(e,"class","max-w-4xl py-2 px-4 sm:px-6 lg:px-8 mx-auto flex gap-x-2 sm:gap-x-4")},m(c,a){N(c,e,a),G(n,e,null),v(e,t),v(e,r),l&&l.m(r,null),i=!0},p(c,[a]){l&&l.p&&(!i||a&1)&&ln(l,s,c,c[0],i?sn(s,c[0],a,null):an(c[0]),null)},i(c){i||(L(n.$$.fragment,c),L(l,c),i=!0)},o(c){A(n.$$.fragment,c),A(l,c),i=!1},d(c){c&&B(e),Z(n),l&&l.d(c)}}}function li(o,e,n){let{$$slots:t={},$$scope:r}=e;return o.$$set=i=>{"$$scope"in i&&n(0,r=i.$$scope)},[r,t]}class Fe extends ve{constructor(e){super(),be(this,e,li,si,he,{})}}function ai(o){let e;return{c(){e=pe("Thinking...")},m(n,t){N(n,e,t)},d(n){n&&B(e)}}}function ci(o){let e,n,t,r,i,s;return n=new Vr({props:{animate:!0}}),i=new at({props:{$$slots:{default:[ai]},$$scope:{ctx:o}}}),{c(){e=E("li"),U(n.$$.fragment),t=Q(),r=E("div"),U(i.$$.fragment),d(r,"class","space-y-3"),d(e,"class","max-w-4xl py-2 px-4 sm:px-6 lg:px-8 mx-auto flex gap-x-2 sm:gap-x-4")},m(l,c){N(l,e,c),G(n,e,null),v(e,t),v(e,r),G(i,r,null),s=!0},p(l,[c]){const a={};c&1&&(a.$$scope={dirty:c,ctx:l}),i.$set(a)},i(l){s||(L(n.$$.fragment,l),L(i.$$.fragment,l),s=!0)},o(l){A(n.$$.fragment,l),A(i.$$.fragment,l),s=!1},d(l){l&&B(e),Z(n),Z(i)}}}class ui extends ve{constructor(e){super(),be(this,e,null,ci,he,{})}}function fi(o){let e,n,t,r,i,s,l,c,a,g,h;return{c(){e=E("ul"),n=E("li"),t=E("div"),r=E("span"),r.textContent="CSV",i=Q(),s=E("a"),l=Xe("svg"),c=Xe("path"),a=Xe("path"),g=pe(` - Download`),d(r,"class","mr-3 flex-1 w-0 truncate"),d(c,"d","M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"),d(a,"d","M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"),d(l,"class","flex-shrink-0 w-3 h-3"),d(l,"width","16"),d(l,"height","16"),d(l,"viewBox","0 0 16 16"),d(l,"fill","currentColor"),d(s,"class","flex items-center gap-x-2 text-gray-500 hover:text-blue-500 whitespace-nowrap"),d(s,"href",h="/api/v0/download_csv?id="+o[0]),d(t,"class","w-full flex justify-between truncate"),d(n,"class","flex items-center gap-x-2 p-3 text-sm bg-white border text-gray-800 first:rounded-t-lg first:mt-0 last:rounded-b-lg dark:bg-slate-900 dark:border-gray-700 dark:text-gray-200"),d(e,"class","flex flex-col justify-end text-start -space-y-px")},m(x,k){N(x,e,k),v(e,n),v(n,t),v(t,r),v(t,i),v(t,s),v(s,l),v(l,c),v(l,a),v(s,g)},p(x,[k]){k&1&&h!==(h="/api/v0/download_csv?id="+x[0])&&d(s,"href",h)},i:Y,o:Y,d(x){x&&B(e)}}}function di(o,e,n){let{id:t}=e;return o.$$set=r=>{"id"in r&&n(0,t=r.id)},[t]}class pi extends ve{constructor(e){super(),be(this,e,di,fi,he,{id:0})}}function Jn(o,e,n){const t=o.slice();return t[5]=e[n],t}function Yn(o,e,n){const t=o.slice();return t[8]=e[n],t}function Kn(o,e,n){const t=o.slice();return t[8]=e[n],t}function Xn(o){let e,n,t,r;return{c(){e=E("th"),n=E("div"),t=E("span"),t.textContent=`${o[8]}`,r=Q(),d(t,"class","text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-gray-200"),d(n,"class","flex items-center gap-x-2"),d(e,"scope","col"),d(e,"class","px-6 py-3 text-left")},m(i,s){N(i,e,s),v(e,n),v(n,t),v(e,r)},p:Y,d(i){i&&B(e)}}}function er(o){let e,n,t;return{c(){e=E("td"),n=E("div"),t=E("span"),t.textContent=`${o[5][o[8]]}`,d(t,"class","text-gray-800 dark:text-gray-200"),d(n,"class","px-6 py-3"),d(e,"class","h-px w-px whitespace-nowrap")},m(r,i){N(r,e,i),v(e,n),v(n,t)},p:Y,d(r){r&&B(e)}}}function tr(o){let e,n,t=Le(o[3]),r=[];for(let i=0;i{y=null}),Oe())},i(p){h||(L(y),h=!0)},o(p){A(y),h=!1},d(p){p&&(B(e),B(a),B(g)),nt(k,p),nt(M,p),y&&y.d(p)}}}function mi(o,e,n){let t;et(o,Ot,c=>n(1,t=c));let{id:r}=e,{df:i}=e,s=JSON.parse(i),l=s.length>0?Object.keys(s[0]):[];return o.$$set=c=>{"id"in c&&n(0,r=c.id),"df"in c&&n(4,i=c.df)},[r,t,s,l,i]}class Gr extends ve{constructor(e){super(),be(this,e,mi,gi,he,{id:0,df:4})}}function hi(o){let e;return{c(){e=E("div"),d(e,"id",o[0])},m(n,t){N(n,e,t)},p:Y,i:Y,o:Y,d(n){n&&B(e)}}}function yi(o,e,n){let{fig:t}=e,r=JSON.parse(t),i=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);return Hr(()=>{Plotly.newPlot(document.getElementById(i),r,{responsive:!0})}),o.$$set=s=>{"fig"in s&&n(1,t=s.fig)},[i,t]}class Zr extends ve{constructor(e){super(),be(this,e,yi,hi,he,{fig:1})}}function bi(o){let e,n,t,r;return{c(){e=E("button"),n=pe(o[0]),d(e,"type","button"),d(e,"class","mb-2.5 mr-1.5 py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border-2 border-green-200 font-semibold text-green-500 hover:text-white hover:bg-green-500 hover:border-green-500 focus:outline-none focus:ring-2 focus:ring-green-200 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800")},m(i,s){N(i,e,s),v(e,n),t||(r=Te(e,"click",o[1]),t=!0)},p(i,[s]){s&1&&De(n,i[0])},i:Y,o:Y,d(i){i&&B(e),t=!1,r()}}}function vi(o,e,n){let{message:t}=e,{onSubmit:r}=e;function i(){r(t)}return o.$$set=s=>{"message"in s&&n(0,t=s.message),"onSubmit"in s&&n(2,r=s.onSubmit)},[t,i,r]}class Ur extends ve{constructor(e){super(),be(this,e,vi,bi,he,{message:0,onSubmit:2})}}function _i(o){let e,n,t,r,i,s,l,c,a;return{c(){e=E("div"),n=E("div"),t=E("div"),t.innerHTML='',r=Q(),i=E("div"),s=E("h3"),s.textContent="Error",l=Q(),c=E("div"),a=pe(o[0]),d(t,"class","flex-shrink-0"),d(s,"class","text-sm text-yellow-800 font-semibold"),d(c,"class","mt-1 text-sm text-yellow-700"),d(i,"class","ml-4"),d(n,"class","flex"),d(e,"class","bg-yellow-50 border border-yellow-200 rounded-md p-4"),d(e,"role","alert")},m(g,h){N(g,e,h),v(e,n),v(n,t),v(n,r),v(n,i),v(i,s),v(i,l),v(i,c),v(c,a)},p(g,[h]){h&1&&De(a,g[0])},i:Y,o:Y,d(g){g&&B(e)}}}function wi(o,e,n){let{message:t}=e;return o.$$set=r=>{"message"in r&&n(0,t=r.message)},[t]}let En=class extends ve{constructor(e){super(),be(this,e,wi,_i,he,{message:0})}};function $i(o){let e,n;const t=o[1].default,r=on(t,o,o[0],null);return{c(){e=E("div"),r&&r.c(),d(e,"class","font-mono whitespace-pre-wrap")},m(i,s){N(i,e,s),r&&r.m(e,null),n=!0},p(i,[s]){r&&r.p&&(!n||s&1)&&ln(r,t,i,i[0],n?sn(t,i[0],s,null):an(i[0]),null)},i(i){n||(L(r,i),n=!0)},o(i){A(r,i),n=!1},d(i){i&&B(e),r&&r.d(i)}}}function ki(o,e,n){let{$$slots:t={},$$scope:r}=e;return o.$$set=i=>{"$$scope"in i&&n(0,r=i.$$scope)},[r,t]}class Wr extends ve{constructor(e){super(),be(this,e,ki,$i,he,{})}}function xi(o){let e;return{c(){e=pe(o[1])},m(n,t){N(n,e,t)},p(n,t){t&2&&De(e,n[1])},d(n){n&&B(e)}}}function Si(o){let e,n,t,r,i,s,l,c;return t=new ut({props:{message:"Run SQL",onSubmit:o[3]}}),i=new at({props:{$$slots:{default:[xi]},$$scope:{ctx:o}}}),{c(){e=E("textarea"),n=Q(),U(t.$$.fragment),r=Q(),U(i.$$.fragment),d(e,"rows","6"),d(e,"class","block p-2.5 w-full text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500 font-mono"),d(e,"placeholder","SELECT col1, col2, col3 FROM ...")},m(a,g){N(a,e,g),gt(e,o[1]),N(a,n,g),G(t,a,g),N(a,r,g),G(i,a,g),s=!0,l||(c=Te(e,"input",o[2]),l=!0)},p(a,[g]){g&2&>(e,a[1]);const h={};g&3&&(h.onSubmit=a[3]),t.$set(h);const x={};g&18&&(x.$$scope={dirty:g,ctx:a}),i.$set(x)},i(a){s||(L(t.$$.fragment,a),L(i.$$.fragment,a),s=!0)},o(a){A(t.$$.fragment,a),A(i.$$.fragment,a),s=!1},d(a){a&&(B(e),B(n),B(r)),Z(t,a),Z(i,a),l=!1,c()}}}function Oi(o,e,n){let t;et(o,Qt,l=>n(1,t=l));let{onSubmit:r}=e;function i(){t=this.value,Qt.set(t)}const s=()=>r(t);return o.$$set=l=>{"onSubmit"in l&&n(0,r=l.onSubmit)},[r,t,i,s]}class Ci extends ve{constructor(e){super(),be(this,e,Oi,Si,he,{onSubmit:0})}}function Li(o){let e,n,t,r,i,s;return t=new ut({props:{message:o[3],onSubmit:o[5]}}),{c(){e=E("textarea"),n=Q(),U(t.$$.fragment),d(e,"rows","6"),d(e,"class","block p-2.5 w-full text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500 font-mono"),d(e,"placeholder",o[2])},m(l,c){N(l,e,c),gt(e,o[0]),N(l,n,c),G(t,l,c),r=!0,i||(s=Te(e,"input",o[4]),i=!0)},p(l,[c]){(!r||c&4)&&d(e,"placeholder",l[2]),c&1&>(e,l[0]);const a={};c&8&&(a.message=l[3]),c&3&&(a.onSubmit=l[5]),t.$set(a)},i(l){r||(L(t.$$.fragment,l),r=!0)},o(l){A(t.$$.fragment,l),r=!1},d(l){l&&(B(e),B(n)),Z(t,l),i=!1,s()}}}function Ei(o,e,n){let{onSubmit:t}=e,{currentValue:r}=e,{placeholder:i}=e,{buttonText:s}=e;function l(){r=this.value,n(0,r)}const c=()=>t(r);return o.$$set=a=>{"onSubmit"in a&&n(1,t=a.onSubmit),"currentValue"in a&&n(0,r=a.currentValue),"placeholder"in a&&n(2,i=a.placeholder),"buttonText"in a&&n(3,s=a.buttonText)},[r,t,i,s,l,c]}class Ti extends ve{constructor(e){super(),be(this,e,Ei,Li,he,{onSubmit:1,currentValue:0,placeholder:2,buttonText:3})}}function ji(o){let e,n;return e=new ut({props:{message:"Play",onSubmit:o[2]}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,[r]){const i={};r&1&&(i.onSubmit=t[2]),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function rr(o){if("speechSynthesis"in window){const e=new SpeechSynthesisUtterance(o);e.lang="en-US",e.volume=1,e.rate=1,e.pitch=1,window.speechSynthesis.speak(e)}else console.error("SpeechSynthesis API is not supported in this browser.")}function Pi(o,e,n){let t;et(o,Nr,s=>n(1,t=s));let{message:r}=e;const i=()=>rr(r);return o.$$set=s=>{"message"in s&&n(0,r=s.message)},o.$$.update=()=>{o.$$.dirty&3&&t&&rr(r)},[r,t,i]}class qi extends ve{constructor(e){super(),be(this,e,Pi,ji,he,{message:0})}}function Ai(o){let e,n,t;return{c(){e=E("button"),e.textContent="Open Debugger",n=Q(),t=E("div"),t.innerHTML='

Server Logs

',d(e,"type","button"),d(e,"class","absolute top-0 right-0 m-1 ms-0 py-3 px-4 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"),d(e,"data-hs-overlay","#hs-overlay-right"),d(t,"id","hs-overlay-right"),d(t,"class","hs-overlay hs-overlay-open:translate-x-0 hidden translate-x-full fixed top-0 end-0 transition-all duration-300 transform h-full max-w-xs w-full z-[80] bg-white border-s dark:bg-neutral-800 dark:border-neutral-700 [--body-scroll:true] overflow-y-auto"),d(t,"tabindex","-1")},m(r,i){N(r,e,i),N(r,n,i),N(r,t,i)},p:Y,i:Y,o:Y,d(r){r&&(B(e),B(n),B(t))}}}class Mi extends ve{constructor(e){super(),be(this,e,null,Ai,he,{})}}function or(o,e,n){const t=o.slice();return t[11]=e[n],t}function ir(o,e,n){const t=o.slice();return t[14]=e[n],t}function sr(o,e,n){const t=o.slice();return t[17]=e[n],t}function lr(o,e,n){const t=o.slice();return t[17]=e[n],t}function ar(o){let e,n;return e=new Mi({}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function cr(o){let e,n;return e=new Fe({props:{$$slots:{default:[Ri]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194306&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function ur(o){let e,n;return e=new ut({props:{message:o[17],onSubmit:Ln}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&2&&(i.message=t[17]),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Di(o){let e=o[1].header+"",n,t,r,i,s=Le(o[1].questions),l=[];for(let a=0;aA(l[a],1,1,()=>{l[a]=null});return{c(){n=pe(e),t=Q();for(let a=0;a{h=null}),Oe())},i(x){g||(L(e.$$.fragment,x),L(t.$$.fragment,x),L(i.$$.fragment,x),L(l.$$.fragment,x),L(h),g=!0)},o(x){A(e.$$.fragment,x),A(t.$$.fragment,x),A(i.$$.fragment,x),A(l.$$.fragment,x),A(h),g=!1},d(x){x&&(B(n),B(r),B(s),B(c),B(a)),Z(e,x),Z(t,x),Z(i,x),Z(l,x),h&&h.d(x)}}}function zi(o){let e,n;return e=new Fe({props:{$$slots:{default:[ds]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194313&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Vi(o){let e,n;return e=new Fe({props:{$$slots:{default:[ps]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194312&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Gi(o){let e,n;return e=new Ct({props:{message:"No, the results were not correct."}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p:Y,i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Zi(o){let e,n;return e=new Ct({props:{message:"Yes, the results were correct."}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p:Y,i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Ui(o){let e,n,t=o[0].ask_results_correct&&pr(o);return{c(){t&&t.c(),e=Ve()},m(r,i){t&&t.m(r,i),N(r,e,i),n=!0},p(r,i){r[0].ask_results_correct?t?i&1&&L(t,1):(t=pr(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(Se(),A(t,1,1,()=>{t=null}),Oe())},i(r){n||(L(t),n=!0)},o(r){A(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function Wi(o){let e,n,t=o[0].ask_results_correct&&gr(o);return{c(){t&&t.c(),e=Ve()},m(r,i){t&&t.m(r,i),N(r,e,i),n=!0},p(r,i){r[0].ask_results_correct?t?i&1&&L(t,1):(t=gr(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(Se(),A(t,1,1,()=>{t=null}),Oe())},i(r){n||(L(t),n=!0)},o(r){A(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function Qi(o){let e,n;return e=new Ct({props:{message:"Change the chart based on these instructions",$$slots:{default:[ys]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194304&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Fi(o){let e,n,t=o[0].chart&&mr(o);return{c(){t&&t.c(),e=Ve()},m(r,i){t&&t.m(r,i),N(r,e,i),n=!0},p(r,i){r[0].chart?t?(t.p(r,i),i&1&&L(t,1)):(t=mr(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(Se(),A(t,1,1,()=>{t=null}),Oe())},i(r){n||(L(t),n=!0)},o(r){A(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function Ji(o){let e,n,t=o[0].table&&yr(o);return{c(){t&&t.c(),e=Ve()},m(r,i){t&&t.m(r,i),N(r,e,i),n=!0},p(r,i){r[0].table?t?(t.p(r,i),i&1&&L(t,1)):(t=yr(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(Se(),A(t,1,1,()=>{t=null}),Oe())},i(r){n||(L(t),n=!0)},o(r){A(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function Yi(o){let e,n;return e=new Fe({props:{$$slots:{default:[$s]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194312&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Ki(o){let e,n,t=o[0].sql==!0&&vr(o);return{c(){t&&t.c(),e=Ve()},m(r,i){t&&t.m(r,i),N(r,e,i),n=!0},p(r,i){r[0].sql==!0?t?(t.p(r,i),i&1&&L(t,1)):(t=vr(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(Se(),A(t,1,1,()=>{t=null}),Oe())},i(r){n||(L(t),n=!0)},o(r){A(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function Xi(o){let e,n;return e=new Ct({props:{message:o[14].question}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&8&&(i.message=t[14].question),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function es(o){let e=JSON.stringify(o[14])+"",n;return{c(){n=pe(e)},m(t,r){N(t,n,r)},p(t,r){r&8&&e!==(e=JSON.stringify(t[14])+"")&&De(n,e)},d(t){t&&B(n)}}}function ts(o){let e,n;return e=new at({props:{$$slots:{default:[es]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194312&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function ns(o){let e=o[14].text+"",n;return{c(){n=pe(e)},m(t,r){N(t,n,r)},p(t,r){r&8&&e!==(e=t[14].text+"")&&De(n,e)},d(t){t&&B(n)}}}function rs(o){let e,n,t,r;return e=new at({props:{$$slots:{default:[ns]},$$scope:{ctx:o}}}),t=new qi({props:{message:o[14].text}}),{c(){U(e.$$.fragment),n=Q(),U(t.$$.fragment)},m(i,s){G(e,i,s),N(i,n,s),G(t,i,s),r=!0},p(i,s){const l={};s&4194312&&(l.$$scope={dirty:s,ctx:i}),e.$set(l);const c={};s&8&&(c.message=i[14].text),t.$set(c)},i(i){r||(L(e.$$.fragment,i),L(t.$$.fragment,i),r=!0)},o(i){A(e.$$.fragment,i),A(t.$$.fragment,i),r=!1},d(i){i&&B(n),Z(e,i),Z(t,i)}}}function os(o){let e,n;return e=new Ci({props:{onSubmit:Co}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p:Y,i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function is(o){let e=o[14].sql+"",n;return{c(){n=pe(e)},m(t,r){N(t,n,r)},p(t,r){r&8&&e!==(e=t[14].sql+"")&&De(n,e)},d(t){t&&B(n)}}}function ss(o){let e,n;return e=new Wr({props:{$$slots:{default:[is]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194312&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function ls(o){let e,n;return e=new at({props:{$$slots:{default:[ss]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194312&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function as(o){let e,n;return e=new Gr({props:{id:o[14].id,df:o[14].df}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&8&&(i.id=t[14].id),r&8&&(i.df=t[14].df),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function cs(o){let e,n;return e=new Zr({props:{fig:o[14].fig}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&8&&(i.fig=t[14].fig),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function fr(o){let e,n;return e=new Fe({props:{$$slots:{default:[fs]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194312&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function us(o){let e=o[14].summary+"",n;return{c(){n=pe(e)},m(t,r){N(t,n,r)},p(t,r){r&8&&e!==(e=t[14].summary+"")&&De(n,e)},d(t){t&&B(n)}}}function fs(o){let e,n;return e=new at({props:{$$slots:{default:[us]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194312&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function dr(o){let e,n;function t(){return o[9](o[14])}return e=new ut({props:{message:"Auto Fix",onSubmit:t}}),{c(){U(e.$$.fragment)},m(r,i){G(e,r,i),n=!0},p(r,i){o=r;const s={};i&8&&(s.onSubmit=t),e.$set(s)},i(r){n||(L(e.$$.fragment,r),n=!0)},o(r){A(e.$$.fragment,r),n=!1},d(r){Z(e,r)}}}function ds(o){let e,n,t,r,i,s;e=new En({props:{message:o[14].error}}),t=new ut({props:{message:"Manually Fix",onSubmit:o[8]}});let l=o[0].auto_fix_sql&&dr(o);return{c(){U(e.$$.fragment),n=Q(),U(t.$$.fragment),r=Q(),l&&l.c(),i=Ve()},m(c,a){G(e,c,a),N(c,n,a),G(t,c,a),N(c,r,a),l&&l.m(c,a),N(c,i,a),s=!0},p(c,a){const g={};a&8&&(g.message=c[14].error),e.$set(g),c[0].auto_fix_sql?l?(l.p(c,a),a&1&&L(l,1)):(l=dr(c),l.c(),L(l,1),l.m(i.parentNode,i)):l&&(Se(),A(l,1,1,()=>{l=null}),Oe())},i(c){s||(L(e.$$.fragment,c),L(t.$$.fragment,c),L(l),s=!0)},o(c){A(e.$$.fragment,c),A(t.$$.fragment,c),A(l),s=!1},d(c){c&&(B(n),B(r),B(i)),Z(e,c),Z(t,c),l&&l.d(c)}}}function ps(o){let e,n;return e=new En({props:{message:o[14].error}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&8&&(i.message=t[14].error),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function pr(o){let e,n;return e=new Ct({props:{message:"",$$slots:{default:[gs]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function gs(o){let e,n,t,r;return e=new ut({props:{message:"Yes",onSubmit:o[6]}}),t=new ut({props:{message:"No",onSubmit:o[7]}}),{c(){U(e.$$.fragment),n=Q(),U(t.$$.fragment)},m(i,s){G(e,i,s),N(i,n,s),G(t,i,s),r=!0},p:Y,i(i){r||(L(e.$$.fragment,i),L(t.$$.fragment,i),r=!0)},o(i){A(e.$$.fragment,i),A(t.$$.fragment,i),r=!1},d(i){i&&B(n),Z(e,i),Z(t,i)}}}function gr(o){let e,n;return e=new Fe({props:{$$slots:{default:[hs]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function ms(o){let e;return{c(){e=pe("Were the results correct?")},m(n,t){N(n,e,t)},d(n){n&&B(e)}}}function hs(o){let e,n;return e=new at({props:{$$slots:{default:[ms]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194304&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function ys(o){let e,n;return e=new Ti({props:{onSubmit:o[5],placeholder:"Make the line red",buttonText:"Update Chart",currentValue:""}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p:Y,i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function mr(o){let e,n,t,r;e=new Fe({props:{$$slots:{default:[bs]},$$scope:{ctx:o}}});let i=o[0].redraw_chart&&hr(o);return{c(){U(e.$$.fragment),n=Q(),i&&i.c(),t=Ve()},m(s,l){G(e,s,l),N(s,n,l),i&&i.m(s,l),N(s,t,l),r=!0},p(s,l){const c={};l&4194312&&(c.$$scope={dirty:l,ctx:s}),e.$set(c),s[0].redraw_chart?i?l&1&&L(i,1):(i=hr(s),i.c(),L(i,1),i.m(t.parentNode,t)):i&&(Se(),A(i,1,1,()=>{i=null}),Oe())},i(s){r||(L(e.$$.fragment,s),L(i),r=!0)},o(s){A(e.$$.fragment,s),A(i),r=!1},d(s){s&&(B(n),B(t)),Z(e,s),i&&i.d(s)}}}function bs(o){let e,n;return e=new Zr({props:{fig:o[14].fig}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&8&&(i.fig=t[14].fig),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function hr(o){let e,n;return e=new Fe({props:{$$slots:{default:[vs]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function vs(o){let e,n;return e=new ut({props:{message:"Redraw Chart",onSubmit:Lo}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p:Y,i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function yr(o){let e,n;return e=new Fe({props:{$$slots:{default:[_s]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&4194312&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function _s(o){let e,n;return e=new Gr({props:{id:o[14].id,df:o[14].df}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&8&&(i.id=t[14].id),r&8&&(i.df=t[14].df),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function br(o){let e,n;return e=new ut({props:{message:o[17],onSubmit:Ln}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&8&&(i.message=t[17]),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function ws(o){let e=o[14].header+"",n,t,r,i,s=Le(o[14].questions),l=[];for(let a=0;aA(l[a],1,1,()=>{l[a]=null});return{c(){n=pe(e),t=Q();for(let a=0;a{s[g]=null}),Oe(),n=s[e],n?n.p(c,a):(n=s[e]=i[e](c),n.c()),L(n,1),n.m(t.parentNode,t))},i(c){r||(L(n),r=!0)},o(c){A(n),r=!1},d(c){c&&B(t),s[e].d(c)}}}function wr(o){let e,n;return e=new ui({}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Os(o){let e,n;return e=new Xo({props:{onSubmit:Ln}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p:Y,i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Cs(o){let e,n,t,r;e=new Ur({props:{message:"New Question",onSubmit:dn}});let i=Le(o[3]),s=[];for(let c=0;cA(s[c],1,1,()=>{s[c]=null});return{c(){U(e.$$.fragment),n=Q();for(let c=0;c{t=null}),Oe())},i(r){n||(L(t),n=!0)},o(r){A(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function Ls(o){let e,n,t,r,i,s,l,c,a,g,h,x,k,q,M;t=new No({});let y=o[0].debug&&ar(),p=o[1]&&o[1].type=="question_list"&&!o[2]&&cr(o),m=Le(o[3]),w=[];for(let _=0;_A(w[_],1,1,()=>{w[_]=null});let P=o[4]&&wr();h=new ti({});const C=[Cs,Os],f=[];function u(_,j){return _[2]?0:1}return k=u(o),q=f[k]=C[k](o),{c(){e=E("div"),n=E("div"),U(t.$$.fragment),r=Q(),y&&y.c(),i=Q(),p&&p.c(),s=Q(),l=E("ul");for(let _=0;_{y=null}),Oe()),_[1]&&_[1].type=="question_list"&&!_[2]?p?(p.p(_,j),j&6&&L(p,1)):(p=cr(_),p.c(),L(p,1),p.m(n,s)):p&&(Se(),A(p,1,1,()=>{p=null}),Oe()),j&9){m=Le(_[3]);let T;for(T=0;T{P=null}),Oe());let O=k;k=u(_),k===O?f[k].p(_,j):(Se(),A(f[O],1,1,()=>{f[O]=null}),Oe(),q=f[k],q?q.p(_,j):(q=f[k]=C[k](_),q.c()),L(q,1),q.m(g,null))},i(_){if(!M){L(t.$$.fragment,_),L(y),L(p);for(let j=0;jn(0,t=q)),et(o,On,q=>n(1,r=q)),et(o,un,q=>n(2,i=q)),et(o,Bt,q=>n(3,s=q)),et(o,Ut,q=>n(4,l=q)),[t,r,i,s,l,q=>{To(q)},()=>{Eo()},()=>{Un()},()=>{Un()},q=>{Oo(q.error)},q=>q.type==="question_cache"?mo(q.id):void 0]}class Ts extends ve{constructor(e){super(),be(this,e,Es,Ls,he,{})}}function js(o){let e,n,t,r,i,s,l,c,a,g,h,x,k,q,M,y,p,m,w;return{c(){e=E("div"),n=E("div"),t=E("div"),r=E("div"),i=E("h3"),i.textContent="Are you sure?",s=Q(),l=E("button"),l.innerHTML='Close ',c=Q(),a=E("div"),g=E("p"),h=pe(o[0]),x=Q(),k=E("div"),q=E("button"),q.textContent="Close",M=Q(),y=E("button"),p=pe(o[1]),d(i,"class","font-bold text-gray-800 dark:text-white"),d(l,"type","button"),d(l,"class","hs-dropdown-toggle inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-gray-500 hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 focus:ring-offset-white transition-all text-sm dark:focus:ring-gray-700 dark:focus:ring-offset-gray-800"),d(l,"data-hs-overlay","#hs-vertically-centered-modal"),d(r,"class","flex justify-between items-center py-3 px-4 border-b dark:border-gray-700"),d(g,"class","text-gray-800 dark:text-gray-400"),d(a,"class","p-4 overflow-y-auto"),d(q,"type","button"),d(q,"class","hs-dropdown-toggle py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),d(q,"data-hs-overlay","#hs-vertically-centered-modal"),d(y,"class","py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800"),d(k,"class","flex justify-end items-center gap-x-2 py-3 px-4 border-t dark:border-gray-700"),d(t,"class","flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"),d(n,"class","hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"),d(e,"class","hs-overlay open w-full h-full fixed top-0 left-0 z-[60] overflow-x-hidden overflow-y-auto")},m(D,P){N(D,e,P),v(e,n),v(n,t),v(t,r),v(r,i),v(r,s),v(r,l),v(t,c),v(t,a),v(a,g),v(g,h),v(t,x),v(t,k),v(k,q),v(k,M),v(k,y),v(y,p),m||(w=[Te(l,"click",function(){Dt(o[2])&&o[2].apply(this,arguments)}),Te(q,"click",function(){Dt(o[2])&&o[2].apply(this,arguments)}),Te(y,"click",function(){Dt(o[3])&&o[3].apply(this,arguments)})],m=!0)},p(D,[P]){o=D,P&1&&De(h,o[0]),P&2&&De(p,o[1])},i:Y,o:Y,d(D){D&&B(e),m=!1,mt(w)}}}function Ps(o,e,n){let{message:t}=e,{buttonLabel:r}=e,{onClose:i}=e,{onConfirm:s}=e;return o.$$set=l=>{"message"in l&&n(0,t=l.message),"buttonLabel"in l&&n(1,r=l.buttonLabel),"onClose"in l&&n(2,i=l.onClose),"onConfirm"in l&&n(3,s=l.onConfirm)},[t,r,i,s]}class qs extends ve{constructor(e){super(),be(this,e,Ps,js,he,{message:0,buttonLabel:1,onClose:2,onConfirm:3})}}function xr(o,e,n){const t=o.slice();return t[10]=e[n].name,t[11]=e[n].description,t[12]=e[n].example,t}function Sr(o){let e,n,t,r,i,s,l,c,a,g,h,x;return g=no(o[7][0]),{c(){e=E("div"),n=E("div"),t=E("input"),r=Q(),i=E("label"),s=E("span"),s.textContent=`${o[10]}`,l=Q(),c=E("span"),c.textContent=`${o[11]}`,a=Q(),d(t,"id","hs-radio-"+o[10]),t.__value=o[10],gt(t,t.__value),d(t,"name","hs-radio-with-description"),d(t,"type","radio"),d(t,"class","border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800"),d(t,"aria-describedby","hs-radio-delete-description"),d(n,"class","flex items-center h-5 mt-1"),d(s,"class","block text-sm font-semibold text-gray-800 dark:text-gray-300"),d(c,"id","hs-radio-ddl-description"),d(c,"class","block text-sm text-gray-600 dark:text-gray-500"),d(i,"for","hs-radio-"+o[10]),d(i,"class","ml-3"),d(e,"class","relative flex items-start"),g.p(t)},m(k,q){N(k,e,q),v(e,n),v(n,t),t.checked=t.__value===o[0],v(e,r),v(e,i),v(i,s),v(i,l),v(i,c),v(e,a),h||(x=Te(t,"change",o[6]),h=!0)},p(k,q){q&1&&(t.checked=t.__value===k[0])},d(k){k&&B(e),g.r(),h=!1,x()}}}function As(o){let e,n,t,r,i,s,l,c,a,g,h,x,k,q,M,y,p,m,w,D,P,C,f,u,_,j=Le(o[3]),O=[];for(let T=0;TClose ',c=Q(),a=E("span"),a.textContent="Training Data Type",g=Q(),h=E("div");for(let H=0;H{r(l,i.toLowerCase())},a=[[]];function g(){i=this.__value,n(0,i)}const h=k=>k.name===i;function x(){l=this.value,n(2,l)}return o.$$set=k=>{"onDismiss"in k&&n(1,t=k.onDismiss),"onTrain"in k&&n(5,r=k.onTrain),"selectedTrainingDataType"in k&&n(0,i=k.selectedTrainingDataType)},[i,t,l,s,c,r,g,a,h,x]}class Ds extends ve{constructor(e){super(),be(this,e,Ms,As,he,{onDismiss:1,onTrain:5,selectedTrainingDataType:0})}}function Or(o,e,n){const t=o.slice();return t[21]=e[n],t}function Cr(o,e,n){const t=o.slice();return t[24]=e[n],t}function Lr(o,e,n){const t=o.slice();return t[24]=e[n],t}function Er(o){let e,n;return e=new Ds({props:{onDismiss:o[13],onTrain:o[0]}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.onTrain=t[0]),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Rs(o){let e;return{c(){e=pe("Action")},m(n,t){N(n,e,t)},p:Y,d(n){n&&B(e)}}}function Hs(o){let e=o[24]+"",n;return{c(){n=pe(e)},m(t,r){N(t,n,r)},p:Y,d(t){t&&B(n)}}}function Tr(o){let e,n,t,r;function i(c,a){return c[24]!="id"?Hs:Rs}let l=i(o)(o);return{c(){e=E("th"),n=E("div"),t=E("span"),l.c(),r=Q(),d(t,"class","text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-gray-200"),d(n,"class","flex items-center gap-x-2"),d(e,"scope","col"),d(e,"class","px-6 py-3 text-left")},m(c,a){N(c,e,a),v(e,n),v(n,t),l.m(t,null),v(e,r)},p(c,a){l.p(c,a)},d(c){c&&B(e),l.d()}}}function Bs(o){let e,n,t;function r(){return o[18](o[21],o[24])}return{c(){e=E("button"),e.textContent="Delete",d(e,"type","button"),d(e,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border-2 border-red-200 font-semibold text-red-500 hover:text-white hover:bg-red-500 hover:border-red-500 focus:outline-none focus:ring-2 focus:ring-red-200 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800")},m(i,s){N(i,e,s),n||(t=Te(e,"click",r),n=!0)},p(i,s){o=i},d(i){i&&B(e),n=!1,t()}}}function Ns(o){let e,n=o[21][o[24]]+"",t;return{c(){e=E("span"),t=pe(n),d(e,"class","text-gray-800 dark:text-gray-200")},m(r,i){N(r,e,i),v(e,t)},p(r,i){i&16&&n!==(n=r[21][r[24]]+"")&&De(t,n)},d(r){r&&B(e)}}}function jr(o){let e,n;function t(s,l){return s[24]!="id"?Ns:Bs}let i=t(o)(o);return{c(){e=E("td"),n=E("div"),i.c(),d(n,"class","px-6 py-3"),d(e,"class","h-px w-px ")},m(s,l){N(s,e,l),v(e,n),i.m(n,null)},p(s,l){i.p(s,l)},d(s){s&&B(e),i.d()}}}function Pr(o){let e,n,t=Le(o[8]),r=[];for(let i=0;iTraining Data

Add or remove training data. Good training data is the key to accuracy.

',a=Q(),g=E("div"),h=E("div"),x=E("button"),x.textContent="View all",k=Q(),q=E("button"),q.innerHTML=` - Add training data`,M=Q(),y=E("table"),p=E("thead"),m=E("tr");for(let ee=0;ee - Prev`,ht=Q(),_e=E("button"),_e.innerHTML=`Next - `,ft=Q(),Pe&&Pe.c(),We=Ve(),d(x,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),d(q,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800"),d(h,"class","inline-flex gap-x-2"),d(l,"class","px-6 py-4 grid gap-3 md:flex md:justify-between md:items-center border-b border-gray-200 dark:border-gray-700"),d(p,"class","bg-gray-50 dark:bg-slate-800"),d(D,"class","divide-y divide-gray-200 dark:divide-gray-700"),d(y,"class","min-w-full divide-y divide-gray-200 dark:divide-gray-700"),d(u,"class","text-sm text-gray-600 dark:text-gray-400"),d(O,"class","py-2 px-3 pr-9 block w-full border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-900 dark:border-gray-700 dark:text-gray-400"),d(j,"class","max-w-sm space-y-3"),d(ae,"class","text-sm text-gray-600 dark:text-gray-400"),d(f,"class","inline-flex items-center gap-x-2"),d(Ue,"type","button"),d(Ue,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),d(_e,"type","button"),d(_e,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),d(Ge,"class","inline-flex gap-x-2"),d(C,"class","px-6 py-4 grid gap-3 md:flex md:justify-between md:items-center border-t border-gray-200 dark:border-gray-700"),d(s,"class","bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden dark:bg-slate-900 dark:border-gray-700"),d(i,"class","p-1.5 min-w-full inline-block align-middle"),d(r,"class","-m-1.5 overflow-x-auto"),d(t,"class","flex flex-col"),d(n,"class","max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14 mx-auto")},m(ee,Be){qe&&qe.m(ee,Be),N(ee,e,Be),N(ee,n,Be),v(n,t),v(t,r),v(r,i),v(i,s),v(s,l),v(l,c),v(l,a),v(l,g),v(g,h),v(h,x),v(h,k),v(h,q),v(s,M),v(s,y),v(y,p),v(p,m);for(let oe=0;oe{qe=null}),Oe()),Be&256){bt=Le(ee[8]);let oe;for(oe=0;oe{Pe=null}),Oe())},i(ee){yt||(L(qe),L(Pe),yt=!0)},o(ee){A(qe),A(Pe),yt=!1},d(ee){ee&&(B(e),B(n),B(ft),B(We)),qe&&qe.d(ee),nt(Re,ee),nt(je,ee),Pe&&Pe.d(ee),Nt=!1,mt(It)}}}function zs(o,e,n){let{df:t}=e,{onTrain:r}=e,{removeTrainingData:i}=e,s=JSON.parse(t),l=s.length>0?Object.keys(s[0]):[],c=10,a=1,g=Math.ceil(s.length/c),h=(a-1)*c,x=a*c,k=s.slice(h,x);const q=()=>{a>1&&n(16,a--,a)},M=()=>{a{n(16,a=1),n(15,c=s.length)};let p=null,m=!1;const w=()=>{n(6,m=!0)},D=()=>{n(6,m=!1)},P=(u,_)=>{n(5,p=u[_])},C=()=>{n(5,p=null)},f=()=>{p&&i(p)};return o.$$set=u=>{"df"in u&&n(14,t=u.df),"onTrain"in u&&n(0,r=u.onTrain),"removeTrainingData"in u&&n(1,i=u.removeTrainingData)},o.$$.update=()=>{o.$$.dirty&98304&&n(2,h=(a-1)*c),o.$$.dirty&98304&&n(3,x=a*c),o.$$.dirty&12&&n(4,k=s.slice(h,x)),o.$$.dirty&32768&&n(17,g=Math.ceil(s.length/c)),o.$$.dirty&196608&&console.log(a,g)},[r,i,h,x,k,p,m,s,l,q,M,y,w,D,t,c,a,g,P,C,f]}class Vs extends ve{constructor(e){super(),be(this,e,zs,Is,he,{df:14,onTrain:0,removeTrainingData:1})}}function Gs(o){let e;return{c(){e=E("div"),e.innerHTML='
Loading...
',d(e,"class","min-h-[15rem] flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]")},m(n,t){N(n,e,t)},p:Y,i:Y,o:Y,d(n){n&&B(e)}}}function Zs(o){let e,n,t,r;const i=[Ws,Us],s=[];function l(c,a){return c[0].type==="df"?0:c[0].type==="error"?1:-1}return~(e=l(o))&&(n=s[e]=i[e](o)),{c(){n&&n.c(),t=Ve()},m(c,a){~e&&s[e].m(c,a),N(c,t,a),r=!0},p(c,a){let g=e;e=l(c),e===g?~e&&s[e].p(c,a):(n&&(Se(),A(s[g],1,1,()=>{s[g]=null}),Oe()),~e?(n=s[e],n?n.p(c,a):(n=s[e]=i[e](c),n.c()),L(n,1),n.m(t.parentNode,t)):n=null)},i(c){r||(L(n),r=!0)},o(c){A(n),r=!1},d(c){c&&B(t),~e&&s[e].d(c)}}}function Us(o){let e,n;return e=new En({props:{message:o[0].error}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.message=t[0].error),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Ws(o){let e,n;return e=new Vs({props:{df:o[0].df,removeTrainingData:vo,onTrain:ko}}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.df=t[0].df),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function Qs(o){let e,n,t,r,i;const s=[Zs,Gs],l=[];function c(a,g){return a[0]!==null?0:1}return t=c(o),r=l[t]=s[t](o),{c(){e=E("div"),n=E("div"),r.c(),d(n,"class","py-10 lg:py-14"),d(e,"class","relative h-screen w-full lg:pl-64")},m(a,g){N(a,e,g),v(e,n),l[t].m(n,null),i=!0},p(a,[g]){let h=t;t=c(a),t===h?l[t].p(a,g):(Se(),A(l[h],1,1,()=>{l[h]=null}),Oe(),r=l[t],r?r.p(a,g):(r=l[t]=s[t](a),r.c()),L(r,1),r.m(n,null))},i(a){i||(L(r),i=!0)},o(a){A(r),i=!1},d(a){a&&B(e),l[t].d()}}}function Fs(o,e,n){let t;return et(o,cn,r=>n(0,t=r)),[t]}class Js extends ve{constructor(e){super(),be(this,e,Fs,Qs,he,{})}}function Ys(o){let e;return{c(){e=E("body"),e.innerHTML=`

No Training Data

Did you read the docs?

Oops, something went wrong.

You need some training data before you can use Vanna

`,i(r,"class","w-28 h-auto"),YT(r.src,R=E[0].logo)||i(r,"src",R),i(r,"alt","Vanna Logo"),i(s,"class","lg:hidden"),i(t,"class","flex items-center justify-between py-4 pr-4 pl-7"),i(D,"class","w-full py-2 px-4 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"),i(S,"class","space-y-1.5 p-4"),i(n,"class","h-full"),i(_,"class","mt-auto"),i(T,"class","hs-accordion-group w-full h-full flex flex-col"),i(T,"data-hs-accordion-always-open",""),i(e,"id","application-sidebar"),i(e,"class","hs-overlay hs-overlay-open:translate-x-0 -translate-x-full transition-all duration-300 transform hidden fixed top-0 left-0 bottom-0 z-[60] w-64 bg-white border-r border-gray-200 overflow-y-auto scrollbar-y lg:block lg:translate-x-0 lg:right-auto lg:bottom-0 dark:scrollbar-y dark:bg-slate-900 dark:border-gray-700")},m(I,f){W(I,e,f),l(e,T),l(T,t),l(t,r),l(t,A),l(t,s),l(T,o),l(T,n),l(n,S),H&&H.m(S,null),l(S,O),y&&y.m(S,null),l(S,N),l(S,u),l(u,D),l(S,d);for(let m=0;mT(0,t=A)),RE(E,_T,A=>T(1,r=A)),[t,r,A=>{Dn(A.id)}]}class xn extends Le{constructor(e){super(),_e(this,e,wn,Wn,Ne,{})}}var $n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xn(E){return E&&E.__esModule&&Object.prototype.hasOwnProperty.call(E,"default")?E.default:E}var kn={exports:{}};/*! For license information please see preline.js.LICENSE.txt */(function(E,e){(function(T,t){E.exports=t()})(self,function(){return(()=>{var T={661:(A,s,o)=>{function n(d){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},n(d)}function S(d,C){for(var _=0;_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var h,a=u(L);if(c){var I=u(this).constructor;h=Reflect.construct(a,arguments,I)}else h=a.apply(this,arguments);return N(this,h)});function y(){return function(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")}(this,y),H.call(this,".hs-accordion")}return C=y,(_=[{key:"init",value:function(){var h=this;document.addEventListener("click",function(a){var I=a.target,f=I.closest(h.selector),m=I.closest(".hs-accordion-toggle"),U=I.closest(".hs-accordion-group");f&&U&&m&&(h._hideAll(f),h.show(f))})}},{key:"show",value:function(h){var a=this;if(h.classList.contains("active"))return this.hide(h);h.classList.add("active");var I=h.querySelector(".hs-accordion-content");I.style.display="block",I.style.height=0,setTimeout(function(){I.style.height="".concat(I.scrollHeight,"px")}),this.afterTransition(I,function(){h.classList.contains("active")&&(I.style.height="",a._fireEvent("open",h),a._dispatch("open.hs.accordion",h,h))})}},{key:"hide",value:function(h){var a=this,I=h.querySelector(".hs-accordion-content");I.style.height="".concat(I.scrollHeight,"px"),setTimeout(function(){I.style.height=0}),this.afterTransition(I,function(){h.classList.contains("active")||(I.style.display="",a._fireEvent("hide",h),a._dispatch("hide.hs.accordion",h,h))}),h.classList.remove("active")}},{key:"_hideAll",value:function(h){var a=this,I=h.closest(".hs-accordion-group");I.hasAttribute("data-hs-accordion-always-open")||I.querySelectorAll(this.selector).forEach(function(f){h!==f&&a.hide(f)})}}])&&S(C.prototype,_),Object.defineProperty(C,"prototype",{writable:!1}),y}(o(765).Z);window.HSAccordion=new D,document.addEventListener("load",window.HSAccordion.init())},795:(A,s,o)=>{function n(C){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},n(C)}function S(C,_){(_==null||_>C.length)&&(_=C.length);for(var L=0,c=new Array(_);L<_;L++)c[L]=C[L];return c}function O(C,_){for(var L=0;L<_.length;L++){var c=_[L];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(C,c.key,c)}}function N(C,_){return N=Object.setPrototypeOf||function(L,c){return L.__proto__=c,L},N(C,_)}function u(C,_){if(_&&(n(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}(C)}function D(C){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},D(C)}var d=function(C){(function(a,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(I&&I.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),I&&N(a,I)})(h,C);var _,L,c,H,y=(c=h,H=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var a,I=D(c);if(H){var f=D(this).constructor;a=Reflect.construct(I,arguments,f)}else a=I.apply(this,arguments);return u(this,a)});function h(){return function(a,I){if(!(a instanceof I))throw new TypeError("Cannot call a class as a function")}(this,h),y.call(this,"[data-hs-collapse]")}return _=h,(L=[{key:"init",value:function(){var a=this;document.addEventListener("click",function(I){var f=I.target.closest(a.selector);if(f){var m=document.querySelectorAll(f.getAttribute("data-hs-collapse"));a.toggle(m)}})}},{key:"toggle",value:function(a){var I,f=this;a.length&&(I=a,function(m){if(Array.isArray(m))return S(m)}(I)||function(m){if(typeof Symbol<"u"&&m[Symbol.iterator]!=null||m["@@iterator"]!=null)return Array.from(m)}(I)||function(m,U){if(m){if(typeof m=="string")return S(m,U);var g=Object.prototype.toString.call(m).slice(8,-1);return g==="Object"&&m.constructor&&(g=m.constructor.name),g==="Map"||g==="Set"?Array.from(m):g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g)?S(m,U):void 0}}(I)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()).forEach(function(m){m.classList.contains("hidden")?f.show(m):f.hide(m)})}},{key:"show",value:function(a){var I=this;a.classList.add("open"),a.classList.remove("hidden"),a.style.height=0,document.querySelectorAll(this.selector).forEach(function(f){a.closest(f.getAttribute("data-hs-collapse"))&&f.classList.add("open")}),a.style.height="".concat(a.scrollHeight,"px"),this.afterTransition(a,function(){a.classList.contains("open")&&(a.style.height="",I._fireEvent("open",a),I._dispatch("open.hs.collapse",a,a))})}},{key:"hide",value:function(a){var I=this;a.style.height="".concat(a.scrollHeight,"px"),setTimeout(function(){a.style.height=0}),a.classList.remove("open"),this.afterTransition(a,function(){a.classList.contains("open")||(a.classList.add("hidden"),a.style.height=null,I._fireEvent("hide",a),I._dispatch("hide.hs.collapse",a,a),a.querySelectorAll(".hs-mega-menu-content.block").forEach(function(f){f.classList.remove("block"),f.classList.add("hidden")}))}),document.querySelectorAll(this.selector).forEach(function(f){a.closest(f.getAttribute("data-hs-collapse"))&&f.classList.remove("open")})}}])&&O(_.prototype,L),Object.defineProperty(_,"prototype",{writable:!1}),h}(o(765).Z);window.HSCollapse=new d,document.addEventListener("load",window.HSCollapse.init())},682:(A,s,o)=>{var n=o(714),S=o(765);const O={historyIndex:-1,addHistory:function(H){this.historyIndex=H},existsInHistory:function(H){return H>this.historyIndex},clearHistory:function(){this.historyIndex=-1}};function N(H){return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},N(H)}function u(H){return function(y){if(Array.isArray(y))return D(y)}(H)||function(y){if(typeof Symbol<"u"&&y[Symbol.iterator]!=null||y["@@iterator"]!=null)return Array.from(y)}(H)||function(y,h){if(y){if(typeof y=="string")return D(y,h);var a=Object.prototype.toString.call(y).slice(8,-1);return a==="Object"&&y.constructor&&(a=y.constructor.name),a==="Map"||a==="Set"?Array.from(y):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?D(y,h):void 0}}(H)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function D(H,y){(y==null||y>H.length)&&(y=H.length);for(var h=0,a=new Array(y);h"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var U,g=L(a);if(I){var F=L(this).constructor;U=Reflect.construct(g,arguments,F)}else U=g.apply(this,arguments);return _(this,U)});function m(){var U;return function(g,F){if(!(g instanceof F))throw new TypeError("Cannot call a class as a function")}(this,m),(U=f.call(this,".hs-dropdown")).positions={top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-top":"right-start","right-bottom":"right-end",left:"left","left-top":"left-start","left-bottom":"left-end"},U.absoluteStrategyModifiers=function(g){return[{name:"applyStyles",fn:function(F){var w=(window.getComputedStyle(g).getPropertyValue("--strategy")||"absolute").replace(" ",""),K=(window.getComputedStyle(g).getPropertyValue("--adaptive")||"adaptive").replace(" ","");F.state.elements.popper.style.position=w,F.state.elements.popper.style.transform=K==="adaptive"?F.state.styles.popper.transform:null,F.state.elements.popper.style.top=null,F.state.elements.popper.style.bottom=null,F.state.elements.popper.style.left=null,F.state.elements.popper.style.right=null,F.state.elements.popper.style.margin=0}},{name:"computeStyles",options:{adaptive:!1}}]},U._history=O,U}return y=m,h=[{key:"init",value:function(){var U=this;document.addEventListener("click",function(g){var F=g.target,w=F.closest(U.selector),K=F.closest(".hs-dropdown-menu");if(w&&w.classList.contains("open")||U._closeOthers(w),K){var j=(window.getComputedStyle(w).getPropertyValue("--auto-close")||"").replace(" ","");if((j=="false"||j=="inside")&&!w.parentElement.closest(U.selector))return}w&&(w.classList.contains("open")?U.close(w):U.open(w))}),document.addEventListener("mousemove",function(g){var F=g.target,w=F.closest(U.selector);if(F.closest(".hs-dropdown-menu"),w){var K=(window.getComputedStyle(w).getPropertyValue("--trigger")||"click").replace(" ","");if(K!=="hover")return;w&&w.classList.contains("open")||U._closeOthers(w),K!=="hover"||w.classList.contains("open")||/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)||U._hover(F)}}),document.addEventListener("keydown",this._keyboardSupport.bind(this)),window.addEventListener("resize",function(){document.querySelectorAll(".hs-dropdown.open").forEach(function(g){U.close(g,!0)})})}},{key:"_closeOthers",value:function(){var U=this,g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,F=document.querySelectorAll("".concat(this.selector,".open"));F.forEach(function(w){if(!g||g.closest(".hs-dropdown.open")!==w){var K=(window.getComputedStyle(w).getPropertyValue("--auto-close")||"").replace(" ","");K!="false"&&K!="outside"&&U.close(w)}})}},{key:"_hover",value:function(U){var g=this,F=U.closest(this.selector);this.open(F),document.addEventListener("mousemove",function w(K){K.target.closest(g.selector)&&K.target.closest(g.selector)!==F.parentElement.closest(g.selector)||(g.close(F),document.removeEventListener("mousemove",w,!0))},!0)}},{key:"close",value:function(U){var g=this,F=arguments.length>1&&arguments[1]!==void 0&&arguments[1],w=U.querySelector(".hs-dropdown-menu"),K=function(){U.classList.contains("open")||(w.classList.remove("block"),w.classList.add("hidden"),w.style.inset=null,w.style.position=null,U._popper&&U._popper.destroy())};F||this.afterTransition(U.querySelector("[data-hs-dropdown-transition]")||w,function(){K()}),w.style.margin=null,U.classList.remove("open"),F&&K(),this._fireEvent("close",U),this._dispatch("close.hs.dropdown",U,U);var j=w.querySelectorAll(".hs-dropdown.open");j.forEach(function(pe){g.close(pe,!0)})}},{key:"open",value:function(U){var g=U.querySelector(".hs-dropdown-menu"),F=(window.getComputedStyle(U).getPropertyValue("--placement")||"").replace(" ",""),w=(window.getComputedStyle(U).getPropertyValue("--strategy")||"fixed").replace(" ",""),K=((window.getComputedStyle(U).getPropertyValue("--adaptive")||"adaptive").replace(" ",""),parseInt((window.getComputedStyle(U).getPropertyValue("--offset")||"10").replace(" ","")));if(w!=="static"){U._popper&&U._popper.destroy();var j=(0,n.fi)(U,g,{placement:this.positions[F]||"bottom-start",strategy:w,modifiers:[].concat(u(w!=="fixed"?this.absoluteStrategyModifiers(U):[]),[{name:"offset",options:{offset:[0,K]}}])});U._popper=j}g.style.margin=null,g.classList.add("block"),g.classList.remove("hidden"),setTimeout(function(){U.classList.add("open")}),this._fireEvent("open",U),this._dispatch("open.hs.dropdown",U,U)}},{key:"_keyboardSupport",value:function(U){var g=document.querySelector(".hs-dropdown.open");if(g)return U.keyCode===27?(U.preventDefault(),this._esc(g)):U.keyCode===40?(U.preventDefault(),this._down(g)):U.keyCode===38?(U.preventDefault(),this._up(g)):U.keyCode===36?(U.preventDefault(),this._start(g)):U.keyCode===35?(U.preventDefault(),this._end(g)):void this._byChar(g,U.key)}},{key:"_esc",value:function(U){this.close(U)}},{key:"_up",value:function(U){var g=U.querySelector(".hs-dropdown-menu"),F=u(g.querySelectorAll("a")).reverse().filter(function(j){return!j.disabled}),w=g.querySelector("a:focus"),K=F.findIndex(function(j){return j===w});K+1{function n(C){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},n(C)}function S(C,_){(_==null||_>C.length)&&(_=C.length);for(var L=0,c=new Array(_);L<_;L++)c[L]=C[L];return c}function O(C,_){for(var L=0;L<_.length;L++){var c=_[L];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(C,c.key,c)}}function N(C,_){return N=Object.setPrototypeOf||function(L,c){return L.__proto__=c,L},N(C,_)}function u(C,_){if(_&&(n(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}(C)}function D(C){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},D(C)}var d=function(C){(function(a,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(I&&I.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),I&&N(a,I)})(h,C);var _,L,c,H,y=(c=h,H=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var a,I=D(c);if(H){var f=D(this).constructor;a=Reflect.construct(I,arguments,f)}else a=I.apply(this,arguments);return u(this,a)});function h(){var a;return function(I,f){if(!(I instanceof f))throw new TypeError("Cannot call a class as a function")}(this,h),(a=y.call(this,"[data-hs-overlay]")).openNextOverlay=!1,a}return _=h,(L=[{key:"init",value:function(){var a=this;document.addEventListener("click",function(I){var f=I.target.closest(a.selector),m=I.target.closest("[data-hs-overlay-close]"),U=I.target.getAttribute("aria-overlay")==="true";return m?a.close(m.closest(".hs-overlay.open")):f?a.toggle(document.querySelector(f.getAttribute("data-hs-overlay"))):void(U&&a._onBackdropClick(I.target))}),document.addEventListener("keydown",function(I){if(I.keyCode===27){var f=document.querySelector(".hs-overlay.open");if(!f)return;setTimeout(function(){f.getAttribute("data-hs-overlay-keyboard")!=="false"&&a.close(f)})}})}},{key:"toggle",value:function(a){a&&(a.classList.contains("hidden")?this.open(a):this.close(a))}},{key:"open",value:function(a){var I=this;if(a){var f=document.querySelector(".hs-overlay.open"),m=this.getClassProperty(a,"--body-scroll","false")!=="true";if(f)return this.openNextOverlay=!0,this.close(f).then(function(){I.open(a),I.openNextOverlay=!1});m&&(document.body.style.overflow="hidden"),this._buildBackdrop(a),this._checkTimer(a),this._autoHide(a),a.classList.remove("hidden"),a.setAttribute("aria-overlay","true"),a.setAttribute("tabindex","-1"),setTimeout(function(){a.classList.contains("hidden")||(a.classList.add("open"),I._fireEvent("open",a),I._dispatch("open.hs.overlay",a,a),I._focusInput(a))},50)}}},{key:"close",value:function(a){var I=this;return new Promise(function(f){a&&(a.classList.remove("open"),a.removeAttribute("aria-overlay"),a.removeAttribute("tabindex","-1"),I.afterTransition(a,function(){a.classList.contains("open")||(a.classList.add("hidden"),I._destroyBackdrop(),I._fireEvent("close",a),I._dispatch("close.hs.overlay",a,a),document.body.style.overflow="",f(a))}))})}},{key:"_autoHide",value:function(a){var I=this,f=parseInt(this.getClassProperty(a,"--auto-hide","0"));f&&(a.autoHide=setTimeout(function(){I.close(a)},f))}},{key:"_checkTimer",value:function(a){a.autoHide&&(clearTimeout(a.autoHide),delete a.autoHide)}},{key:"_onBackdropClick",value:function(a){this.getClassProperty(a,"--overlay-backdrop","true")!=="static"&&this.close(a)}},{key:"_buildBackdrop",value:function(a){var I,f=this,m=a.getAttribute("data-hs-overlay-backdrop-container")||!1,U=document.createElement("div"),g="transition duration fixed inset-0 z-50 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 hs-overlay-backdrop",F=function(j,pe){var se=typeof Symbol<"u"&&j[Symbol.iterator]||j["@@iterator"];if(!se){if(Array.isArray(j)||(se=function(me,fE){if(me){if(typeof me=="string")return S(me,fE);var TE=Object.prototype.toString.call(me).slice(8,-1);return TE==="Object"&&me.constructor&&(TE=me.constructor.name),TE==="Map"||TE==="Set"?Array.from(me):TE==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(TE)?S(me,fE):void 0}}(j))||pe&&j&&typeof j.length=="number"){se&&(j=se);var le=0,Ue=function(){};return{s:Ue,n:function(){return le>=j.length?{done:!0}:{done:!1,value:j[le++]}},e:function(me){throw me},f:Ue}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ye,tE=!0,dE=!1;return{s:function(){se=se.call(j)},n:function(){var me=se.next();return tE=me.done,me},e:function(me){dE=!0,ye=me},f:function(){try{tE||se.return==null||se.return()}finally{if(dE)throw ye}}}}(a.classList.values());try{for(F.s();!(I=F.n()).done;){var w=I.value;w.startsWith("hs-overlay-backdrop-open:")&&(g+=" ".concat(w))}}catch(j){F.e(j)}finally{F.f()}var K=this.getClassProperty(a,"--overlay-backdrop","true")!=="static";this.getClassProperty(a,"--overlay-backdrop","true")==="false"||(m&&((U=document.querySelector(m).cloneNode(!0)).classList.remove("hidden"),g=U.classList,U.classList=""),K&&U.addEventListener("click",function(){return f.close(a)},!0),U.setAttribute("data-hs-overlay-backdrop-template",""),document.body.appendChild(U),setTimeout(function(){U.classList=g}))}},{key:"_destroyBackdrop",value:function(){var a=document.querySelector("[data-hs-overlay-backdrop-template]");a&&(this.openNextOverlay&&(a.style.transitionDuration="".concat(1.8*parseFloat(window.getComputedStyle(a).transitionDuration.replace(/[^\\d.-]/g,"")),"s")),a.classList.add("opacity-0"),this.afterTransition(a,function(){a.remove()}))}},{key:"_focusInput",value:function(a){var I=a.querySelector("[autofocus]");I&&I.focus()}}])&&O(_.prototype,L),Object.defineProperty(_,"prototype",{writable:!1}),h}(o(765).Z);window.HSOverlay=new d,document.addEventListener("load",window.HSOverlay.init())},181:(A,s,o)=>{function n(d){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},n(d)}function S(d,C){for(var _=0;_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var h,a=u(L);if(c){var I=u(this).constructor;h=Reflect.construct(a,arguments,I)}else h=a.apply(this,arguments);return N(this,h)});function y(){return function(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")}(this,y),H.call(this,"[data-hs-remove-element]")}return C=y,(_=[{key:"init",value:function(){var h=this;document.addEventListener("click",function(a){var I=a.target.closest(h.selector);if(I){var f=document.querySelector(I.getAttribute("data-hs-remove-element"));f&&(f.classList.add("hs-removing"),h.afterTransition(f,function(){f.remove()}))}})}}])&&S(C.prototype,_),Object.defineProperty(C,"prototype",{writable:!1}),y}(o(765).Z);window.HSRemoveElement=new D,document.addEventListener("load",window.HSRemoveElement.init())},778:(A,s,o)=>{function n(d){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},n(d)}function S(d,C){for(var _=0;_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var h,a=u(L);if(c){var I=u(this).constructor;h=Reflect.construct(a,arguments,I)}else h=a.apply(this,arguments);return N(this,h)});function y(){var h;return function(a,I){if(!(a instanceof I))throw new TypeError("Cannot call a class as a function")}(this,y),(h=H.call(this,"[data-hs-scrollspy] ")).activeSection=null,h}return C=y,(_=[{key:"init",value:function(){var h=this;document.querySelectorAll(this.selector).forEach(function(a){var I=document.querySelector(a.getAttribute("data-hs-scrollspy")),f=a.querySelectorAll("[href]"),m=I.children,U=a.getAttribute("data-hs-scrollspy-scrollable-parent")?document.querySelector(a.getAttribute("data-hs-scrollspy-scrollable-parent")):document;Array.from(m).forEach(function(g){g.getAttribute("id")&&U.addEventListener("scroll",function(F){return h._update({$scrollspyEl:a,$scrollspyContentEl:I,links:f,$sectionEl:g,sections:m,ev:F})})}),f.forEach(function(g){g.addEventListener("click",function(F){F.preventDefault(),g.getAttribute("href")!=="javascript:;"&&h._scrollTo({$scrollspyEl:a,$scrollableEl:U,$link:g})})})})}},{key:"_update",value:function(h){var a=h.ev,I=h.$scrollspyEl,f=(h.sections,h.links),m=h.$sectionEl,U=parseInt(this.getClassProperty(I,"--scrollspy-offset","0")),g=this.getClassProperty(m,"--scrollspy-offset")||U,F=a.target===document?0:parseInt(a.target.getBoundingClientRect().top),w=parseInt(m.getBoundingClientRect().top)-g-F,K=m.offsetHeight;if(w<=0&&w+K>0){if(this.activeSection===m)return;f.forEach(function(le){le.classList.remove("active")});var j=I.querySelector('[href="#'.concat(m.getAttribute("id"),'"]'));if(j){j.classList.add("active");var pe=j.closest("[data-hs-scrollspy-group]");if(pe){var se=pe.querySelector("[href]");se&&se.classList.add("active")}}this.activeSection=m}}},{key:"_scrollTo",value:function(h){var a=h.$scrollspyEl,I=h.$scrollableEl,f=h.$link,m=document.querySelector(f.getAttribute("href")),U=parseInt(this.getClassProperty(a,"--scrollspy-offset","0")),g=this.getClassProperty(m,"--scrollspy-offset")||U,F=I===document?0:I.offsetTop,w=m.offsetTop-g-F,K=I===document?window:I;this._fireEvent("scroll",a),this._dispatch("scroll.hs.scrollspy",a,a),window.history.replaceState(null,null,f.getAttribute("href")),K.scrollTo({top:w,left:0,behavior:"smooth"})}}])&&S(C.prototype,_),Object.defineProperty(C,"prototype",{writable:!1}),y}(o(765).Z);window.HSScrollspy=new D,document.addEventListener("load",window.HSScrollspy.init())},51:(A,s,o)=>{function n(_){return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},n(_)}function S(_){return function(L){if(Array.isArray(L))return O(L)}(_)||function(L){if(typeof Symbol<"u"&&L[Symbol.iterator]!=null||L["@@iterator"]!=null)return Array.from(L)}(_)||function(L,c){if(L){if(typeof L=="string")return O(L,c);var H=Object.prototype.toString.call(L).slice(8,-1);return H==="Object"&&L.constructor&&(H=L.constructor.name),H==="Map"||H==="Set"?Array.from(L):H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?O(L,c):void 0}}(_)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function O(_,L){(L==null||L>_.length)&&(L=_.length);for(var c=0,H=new Array(L);c"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var I,f=d(H);if(y){var m=d(this).constructor;I=Reflect.construct(f,arguments,m)}else I=f.apply(this,arguments);return D(this,I)});function a(){return function(I,f){if(!(I instanceof f))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,"[data-hs-tab]")}return L=a,(c=[{key:"init",value:function(){var I=this;document.addEventListener("keydown",this._keyboardSupport.bind(this)),document.addEventListener("click",function(f){var m=f.target.closest(I.selector);m&&I.open(m)}),document.querySelectorAll("[hs-data-tab-select]").forEach(function(f){var m=document.querySelector(f.getAttribute("hs-data-tab-select"));m&&m.addEventListener("change",function(U){var g=document.querySelector('[data-hs-tab="'.concat(U.target.value,'"]'));g&&I.open(g)})})}},{key:"open",value:function(I){var f=document.querySelector(I.getAttribute("data-hs-tab")),m=S(I.parentElement.children),U=S(f.parentElement.children),g=I.closest("[hs-data-tab-select]"),F=g?document.querySelector(g.getAttribute("data-hs-tab")):null;m.forEach(function(w){return w.classList.remove("active")}),U.forEach(function(w){return w.classList.add("hidden")}),I.classList.add("active"),f.classList.remove("hidden"),this._fireEvent("change",I),this._dispatch("change.hs.tab",I,I),F&&(F.value=I.getAttribute("data-hs-tab"))}},{key:"_keyboardSupport",value:function(I){var f=I.target.closest(this.selector);if(f){var m=f.closest('[role="tablist"]').getAttribute("data-hs-tabs-vertical")==="true";return(m?I.keyCode===38:I.keyCode===37)?(I.preventDefault(),this._left(f)):(m?I.keyCode===40:I.keyCode===39)?(I.preventDefault(),this._right(f)):I.keyCode===36?(I.preventDefault(),this._start(f)):I.keyCode===35?(I.preventDefault(),this._end(f)):void 0}}},{key:"_right",value:function(I){var f=I.closest('[role="tablist"]');if(f){var m=S(f.querySelectorAll(this.selector)).filter(function(F){return!F.disabled}),U=f.querySelector("button:focus"),g=m.findIndex(function(F){return F===U});g+1{var n=o(765),S=o(714);function O(_){return O=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},O(_)}function N(_,L){for(var c=0;c"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var I,f=d(H);if(y){var m=d(this).constructor;I=Reflect.construct(f,arguments,m)}else I=f.apply(this,arguments);return D(this,I)});function a(){return function(I,f){if(!(I instanceof f))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,".hs-tooltip")}return L=a,(c=[{key:"init",value:function(){var I=this;document.addEventListener("click",function(f){var m=f.target.closest(I.selector);m&&I.getClassProperty(m,"--trigger")==="focus"&&I._focus(m),m&&I.getClassProperty(m,"--trigger")==="click"&&I._click(m)}),document.addEventListener("mousemove",function(f){var m=f.target.closest(I.selector);m&&I.getClassProperty(m,"--trigger")!=="focus"&&I.getClassProperty(m,"--trigger")!=="click"&&I._hover(m)})}},{key:"_hover",value:function(I){var f=this;if(!I.classList.contains("show")){var m=I.querySelector(".hs-tooltip-toggle"),U=I.querySelector(".hs-tooltip-content"),g=this.getClassProperty(I,"--placement");(0,S.fi)(m,U,{placement:g||"top",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(I),I.addEventListener("mouseleave",function F(w){w.relatedTarget.closest(f.selector)&&w.relatedTarget.closest(f.selector)==I||(f.hide(I),I.removeEventListener("mouseleave",F,!0))},!0)}}},{key:"_focus",value:function(I){var f=this,m=I.querySelector(".hs-tooltip-toggle"),U=I.querySelector(".hs-tooltip-content"),g=this.getClassProperty(I,"--placement"),F=this.getClassProperty(I,"--strategy");(0,S.fi)(m,U,{placement:g||"top",strategy:F||"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(I),I.addEventListener("blur",function w(){f.hide(I),I.removeEventListener("blur",w,!0)},!0)}},{key:"_click",value:function(I){var f=this;if(!I.classList.contains("show")){var m=I.querySelector(".hs-tooltip-toggle"),U=I.querySelector(".hs-tooltip-content"),g=this.getClassProperty(I,"--placement"),F=this.getClassProperty(I,"--strategy");(0,S.fi)(m,U,{placement:g||"top",strategy:F||"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(I);var w=function K(j){setTimeout(function(){f.hide(I),I.removeEventListener("click",K,!0),I.removeEventListener("blur",K,!0)})};I.addEventListener("blur",w,!0),I.addEventListener("click",w,!0)}}},{key:"show",value:function(I){var f=this;I.querySelector(".hs-tooltip-content").classList.remove("hidden"),setTimeout(function(){I.classList.add("show"),f._fireEvent("show",I),f._dispatch("show.hs.tooltip",I,I)})}},{key:"hide",value:function(I){var f=I.querySelector(".hs-tooltip-content");I.classList.remove("show"),this._fireEvent("hide",I),this._dispatch("hide.hs.tooltip",I,I),this.afterTransition(f,function(){I.classList.contains("show")||f.classList.add("hidden")})}}])&&N(L.prototype,c),Object.defineProperty(L,"prototype",{writable:!1}),a}(n.Z);window.HSTooltip=new C,document.addEventListener("load",window.HSTooltip.init())},765:(A,s,o)=>{function n(O,N){for(var u=0;uS});var S=function(){function O(D,d){(function(C,_){if(!(C instanceof _))throw new TypeError("Cannot call a class as a function")})(this,O),this.$collection=[],this.selector=D,this.config=d,this.events={}}var N,u;return N=O,u=[{key:"_fireEvent",value:function(D){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.events.hasOwnProperty(D)&&this.events[D](d)}},{key:"_dispatch",value:function(D,d){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,_=new CustomEvent(D,{detail:{payload:C},bubbles:!0,cancelable:!0,composed:!1});d.dispatchEvent(_)}},{key:"on",value:function(D,d){this.events[D]=d}},{key:"afterTransition",value:function(D,d){window.getComputedStyle(D,null).getPropertyValue("transition")!=="all 0s ease 0s"?D.addEventListener("transitionend",function C(){d(),D.removeEventListener("transitionend",C,!0)},!0):d()}},{key:"getClassProperty",value:function(D,d){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",_=(window.getComputedStyle(D).getPropertyValue(d)||C).replace(" ","");return _}}],u&&n(N.prototype,u),Object.defineProperty(N,"prototype",{writable:!1}),O}()},714:(A,s,o)=>{function n(M){if(M==null)return window;if(M.toString()!=="[object Window]"){var p=M.ownerDocument;return p&&p.defaultView||window}return M}function S(M){return M instanceof n(M).Element||M instanceof Element}function O(M){return M instanceof n(M).HTMLElement||M instanceof HTMLElement}function N(M){return typeof ShadowRoot<"u"&&(M instanceof n(M).ShadowRoot||M instanceof ShadowRoot)}o.d(s,{fi:()=>jR});var u=Math.max,D=Math.min,d=Math.round;function C(M,p){p===void 0&&(p=!1);var b=M.getBoundingClientRect(),V=1,Q=1;if(O(M)&&p){var J=M.offsetHeight,q=M.offsetWidth;q>0&&(V=d(b.width)/q||1),J>0&&(Q=d(b.height)/J||1)}return{width:b.width/V,height:b.height/Q,top:b.top/Q,right:b.right/V,bottom:b.bottom/Q,left:b.left/V,x:b.left/V,y:b.top/Q}}function _(M){var p=n(M);return{scrollLeft:p.pageXOffset,scrollTop:p.pageYOffset}}function L(M){return M?(M.nodeName||"").toLowerCase():null}function c(M){return((S(M)?M.ownerDocument:M.document)||window.document).documentElement}function H(M){return C(c(M)).left+_(M).scrollLeft}function y(M){return n(M).getComputedStyle(M)}function h(M){var p=y(M),b=p.overflow,V=p.overflowX,Q=p.overflowY;return/auto|scroll|overlay|hidden/.test(b+Q+V)}function a(M,p,b){b===void 0&&(b=!1);var V,Q,J=O(p),q=O(p)&&function(te){var We=te.getBoundingClientRect(),Oe=d(We.width)/te.offsetWidth||1,Me=d(We.height)/te.offsetHeight||1;return Oe!==1||Me!==1}(p),z=c(p),ee=C(M,q),re={scrollLeft:0,scrollTop:0},ne={x:0,y:0};return(J||!J&&!b)&&((L(p)!=="body"||h(z))&&(re=(V=p)!==n(V)&&O(V)?{scrollLeft:(Q=V).scrollLeft,scrollTop:Q.scrollTop}:_(V)),O(p)?((ne=C(p,!0)).x+=p.clientLeft,ne.y+=p.clientTop):z&&(ne.x=H(z))),{x:ee.left+re.scrollLeft-ne.x,y:ee.top+re.scrollTop-ne.y,width:ee.width,height:ee.height}}function I(M){var p=C(M),b=M.offsetWidth,V=M.offsetHeight;return Math.abs(p.width-b)<=1&&(b=p.width),Math.abs(p.height-V)<=1&&(V=p.height),{x:M.offsetLeft,y:M.offsetTop,width:b,height:V}}function f(M){return L(M)==="html"?M:M.assignedSlot||M.parentNode||(N(M)?M.host:null)||c(M)}function m(M){return["html","body","#document"].indexOf(L(M))>=0?M.ownerDocument.body:O(M)&&h(M)?M:m(f(M))}function U(M,p){var b;p===void 0&&(p=[]);var V=m(M),Q=V===((b=M.ownerDocument)==null?void 0:b.body),J=n(V),q=Q?[J].concat(J.visualViewport||[],h(V)?V:[]):V,z=p.concat(q);return Q?z:z.concat(U(f(q)))}function g(M){return["table","td","th"].indexOf(L(M))>=0}function F(M){return O(M)&&y(M).position!=="fixed"?M.offsetParent:null}function w(M){for(var p=n(M),b=F(M);b&&g(b)&&y(b).position==="static";)b=F(b);return b&&(L(b)==="html"||L(b)==="body"&&y(b).position==="static")?p:b||function(V){var Q=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1;if(navigator.userAgent.indexOf("Trident")!==-1&&O(V)&&y(V).position==="fixed")return null;for(var J=f(V);O(J)&&["html","body"].indexOf(L(J))<0;){var q=y(J);if(q.transform!=="none"||q.perspective!=="none"||q.contain==="paint"||["transform","perspective"].indexOf(q.willChange)!==-1||Q&&q.willChange==="filter"||Q&&q.filter&&q.filter!=="none")return J;J=J.parentNode}return null}(M)||p}var K="top",j="bottom",pe="right",se="left",le="auto",Ue=[K,j,pe,se],ye="start",tE="end",dE="viewport",me="popper",fE=Ue.reduce(function(M,p){return M.concat([p+"-"+ye,p+"-"+tE])},[]),TE=[].concat(Ue,[le]).reduce(function(M,p){return M.concat([p,p+"-"+ye,p+"-"+tE])},[]),pE=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function tt(M){var p=new Map,b=new Set,V=[];function Q(J){b.add(J.name),[].concat(J.requires||[],J.requiresIfExists||[]).forEach(function(q){if(!b.has(q)){var z=p.get(q);z&&Q(z)}}),V.push(J)}return M.forEach(function(J){p.set(J.name,J)}),M.forEach(function(J){b.has(J.name)||Q(J)}),V}var Tt={placement:"bottom",modifiers:[],strategy:"absolute"};function Ve(){for(var M=arguments.length,p=new Array(M),b=0;b=0?"x":"y"}function Ee(M){var p,b=M.reference,V=M.element,Q=M.placement,J=Q?je(Q):null,q=Q?ve(Q):null,z=b.x+b.width/2-V.width/2,ee=b.y+b.height/2-V.height/2;switch(J){case K:p={x:z,y:b.y-V.height};break;case j:p={x:z,y:b.y+b.height};break;case pe:p={x:b.x+b.width,y:ee};break;case se:p={x:b.x-V.width,y:ee};break;default:p={x:b.x,y:b.y}}var re=J?Fe(J):null;if(re!=null){var ne=re==="y"?"height":"width";switch(q){case ye:p[re]=p[re]-(b[ne]/2-V[ne]/2);break;case tE:p[re]=p[re]+(b[ne]/2-V[ne]/2)}}return p}var Xe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ae(M){var p,b=M.popper,V=M.popperRect,Q=M.placement,J=M.variation,q=M.offsets,z=M.position,ee=M.gpuAcceleration,re=M.adaptive,ne=M.roundOffsets,te=M.isFixed,We=q.x,Oe=We===void 0?0:We,Me=q.y,De=Me===void 0?0:Me,oe=typeof ne=="function"?ne({x:Oe,y:De}):{x:Oe,y:De};Oe=oe.x,De=oe.y;var we=q.hasOwnProperty("x"),be=q.hasOwnProperty("y"),Ce=se,he=K,ie=window;if(re){var Ie=w(b),ue="clientHeight",de="clientWidth";Ie===n(b)&&y(Ie=c(b)).position!=="static"&&z==="absolute"&&(ue="scrollHeight",de="scrollWidth"),Ie=Ie,(Q===K||(Q===se||Q===pe)&&J===tE)&&(he=j,De-=(te&&ie.visualViewport?ie.visualViewport.height:Ie[ue])-V.height,De*=ee?1:-1),Q!==se&&(Q!==K&&Q!==j||J!==tE)||(Ce=pe,Oe-=(te&&ie.visualViewport?ie.visualViewport.width:Ie[de])-V.width,Oe*=ee?1:-1)}var Ge,ke=Object.assign({position:z},re&&Xe),Ke=ne===!0?function(sE){var NE=sE.x,PE=sE.y,SE=window.devicePixelRatio||1;return{x:d(NE*SE)/SE||0,y:d(PE*SE)/SE||0}}({x:Oe,y:De}):{x:Oe,y:De};return Oe=Ke.x,De=Ke.y,ee?Object.assign({},ke,((Ge={})[he]=be?"0":"",Ge[Ce]=we?"0":"",Ge.transform=(ie.devicePixelRatio||1)<=1?"translate("+Oe+"px, "+De+"px)":"translate3d("+Oe+"px, "+De+"px, 0)",Ge)):Object.assign({},ke,((p={})[he]=be?De+"px":"",p[Ce]=we?Oe+"px":"",p.transform="",p))}var gE={left:"right",right:"left",bottom:"top",top:"bottom"};function at(M){return M.replace(/left|right|bottom|top/g,function(p){return gE[p]})}var ZR={start:"end",end:"start"};function DT(M){return M.replace(/start|end/g,function(p){return ZR[p]})}function dT(M,p){var b=p.getRootNode&&p.getRootNode();if(M.contains(p))return!0;if(b&&N(b)){var V=p;do{if(V&&M.isSameNode(V))return!0;V=V.parentNode||V.host}while(V)}return!1}function yt(M){return Object.assign({},M,{left:M.x,top:M.y,right:M.x+M.width,bottom:M.y+M.height})}function pT(M,p){return p===dE?yt(function(b){var V=n(b),Q=c(b),J=V.visualViewport,q=Q.clientWidth,z=Q.clientHeight,ee=0,re=0;return J&&(q=J.width,z=J.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(ee=J.offsetLeft,re=J.offsetTop)),{width:q,height:z,x:ee+H(b),y:re}}(M)):S(p)?function(b){var V=C(b);return V.top=V.top+b.clientTop,V.left=V.left+b.clientLeft,V.bottom=V.top+b.clientHeight,V.right=V.left+b.clientWidth,V.width=b.clientWidth,V.height=b.clientHeight,V.x=V.left,V.y=V.top,V}(p):yt(function(b){var V,Q=c(b),J=_(b),q=(V=b.ownerDocument)==null?void 0:V.body,z=u(Q.scrollWidth,Q.clientWidth,q?q.scrollWidth:0,q?q.clientWidth:0),ee=u(Q.scrollHeight,Q.clientHeight,q?q.scrollHeight:0,q?q.clientHeight:0),re=-J.scrollLeft+H(b),ne=-J.scrollTop;return y(q||Q).direction==="rtl"&&(re+=u(Q.clientWidth,q?q.clientWidth:0)-z),{width:z,height:ee,x:re,y:ne}}(c(M)))}function MT(M){return Object.assign({},{top:0,right:0,bottom:0,left:0},M)}function UT(M,p){return p.reduce(function(b,V){return b[V]=M,b},{})}function rt(M,p){p===void 0&&(p={});var b=p,V=b.placement,Q=V===void 0?M.placement:V,J=b.boundary,q=J===void 0?"clippingParents":J,z=b.rootBoundary,ee=z===void 0?dE:z,re=b.elementContext,ne=re===void 0?me:re,te=b.altBoundary,We=te!==void 0&&te,Oe=b.padding,Me=Oe===void 0?0:Oe,De=MT(typeof Me!="number"?Me:UT(Me,Ue)),oe=ne===me?"reference":me,we=M.rects.popper,be=M.elements[We?oe:ne],Ce=function(Ke,sE,NE){var PE=sE==="clippingParents"?function(Be){var UE=U(f(Be)),oE=["absolute","fixed"].indexOf(y(Be).position)>=0&&O(Be)?w(Be):Be;return S(oE)?UE.filter(function(rE){return S(rE)&&dT(rE,oE)&&L(rE)!=="body"}):[]}(Ke):[].concat(sE),SE=[].concat(PE,[NE]),EE=SE[0],$e=SE.reduce(function(Be,UE){var oE=pT(Ke,UE);return Be.top=u(oE.top,Be.top),Be.right=D(oE.right,Be.right),Be.bottom=D(oE.bottom,Be.bottom),Be.left=u(oE.left,Be.left),Be},pT(Ke,EE));return $e.width=$e.right-$e.left,$e.height=$e.bottom-$e.top,$e.x=$e.left,$e.y=$e.top,$e}(S(be)?be:be.contextElement||c(M.elements.popper),q,ee),he=C(M.elements.reference),ie=Ee({reference:he,element:we,strategy:"absolute",placement:Q}),Ie=yt(Object.assign({},we,ie)),ue=ne===me?Ie:he,de={top:Ce.top-ue.top+De.top,bottom:ue.bottom-Ce.bottom+De.bottom,left:Ce.left-ue.left+De.left,right:ue.right-Ce.right+De.right},Ge=M.modifiersData.offset;if(ne===me&&Ge){var ke=Ge[Q];Object.keys(de).forEach(function(Ke){var sE=[pe,j].indexOf(Ke)>=0?1:-1,NE=[K,j].indexOf(Ke)>=0?"y":"x";de[Ke]+=ke[NE]*sE})}return de}function Rt(M,p,b){return u(M,D(p,b))}function mT(M,p,b){return b===void 0&&(b={x:0,y:0}),{top:M.top-p.height-b.y,right:M.right-p.width+b.x,bottom:M.bottom-p.height+b.y,left:M.left-p.width-b.x}}function hT(M){return[K,pe,j,se].some(function(p){return M[p]>=0})}var jR=ME({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(M){var p=M.state,b=M.instance,V=M.options,Q=V.scroll,J=Q===void 0||Q,q=V.resize,z=q===void 0||q,ee=n(p.elements.popper),re=[].concat(p.scrollParents.reference,p.scrollParents.popper);return J&&re.forEach(function(ne){ne.addEventListener("scroll",b.update,xe)}),z&&ee.addEventListener("resize",b.update,xe),function(){J&&re.forEach(function(ne){ne.removeEventListener("scroll",b.update,xe)}),z&&ee.removeEventListener("resize",b.update,xe)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(M){var p=M.state,b=M.name;p.modifiersData[b]=Ee({reference:p.rects.reference,element:p.rects.popper,strategy:"absolute",placement:p.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(M){var p=M.state,b=M.options,V=b.gpuAcceleration,Q=V===void 0||V,J=b.adaptive,q=J===void 0||J,z=b.roundOffsets,ee=z===void 0||z,re={placement:je(p.placement),variation:ve(p.placement),popper:p.elements.popper,popperRect:p.rects.popper,gpuAcceleration:Q,isFixed:p.options.strategy==="fixed"};p.modifiersData.popperOffsets!=null&&(p.styles.popper=Object.assign({},p.styles.popper,Ae(Object.assign({},re,{offsets:p.modifiersData.popperOffsets,position:p.options.strategy,adaptive:q,roundOffsets:ee})))),p.modifiersData.arrow!=null&&(p.styles.arrow=Object.assign({},p.styles.arrow,Ae(Object.assign({},re,{offsets:p.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:ee})))),p.attributes.popper=Object.assign({},p.attributes.popper,{"data-popper-placement":p.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(M){var p=M.state;Object.keys(p.elements).forEach(function(b){var V=p.styles[b]||{},Q=p.attributes[b]||{},J=p.elements[b];O(J)&&L(J)&&(Object.assign(J.style,V),Object.keys(Q).forEach(function(q){var z=Q[q];z===!1?J.removeAttribute(q):J.setAttribute(q,z===!0?"":z)}))})},effect:function(M){var p=M.state,b={popper:{position:p.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(p.elements.popper.style,b.popper),p.styles=b,p.elements.arrow&&Object.assign(p.elements.arrow.style,b.arrow),function(){Object.keys(p.elements).forEach(function(V){var Q=p.elements[V],J=p.attributes[V]||{},q=Object.keys(p.styles.hasOwnProperty(V)?p.styles[V]:b[V]).reduce(function(z,ee){return z[ee]="",z},{});O(Q)&&L(Q)&&(Object.assign(Q.style,q),Object.keys(J).forEach(function(z){Q.removeAttribute(z)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(M){var p=M.state,b=M.options,V=M.name,Q=b.offset,J=Q===void 0?[0,0]:Q,q=TE.reduce(function(ne,te){return ne[te]=function(We,Oe,Me){var De=je(We),oe=[se,K].indexOf(De)>=0?-1:1,we=typeof Me=="function"?Me(Object.assign({},Oe,{placement:We})):Me,be=we[0],Ce=we[1];return be=be||0,Ce=(Ce||0)*oe,[se,pe].indexOf(De)>=0?{x:Ce,y:be}:{x:be,y:Ce}}(te,p.rects,J),ne},{}),z=q[p.placement],ee=z.x,re=z.y;p.modifiersData.popperOffsets!=null&&(p.modifiersData.popperOffsets.x+=ee,p.modifiersData.popperOffsets.y+=re),p.modifiersData[V]=q}},{name:"flip",enabled:!0,phase:"main",fn:function(M){var p=M.state,b=M.options,V=M.name;if(!p.modifiersData[V]._skip){for(var Q=b.mainAxis,J=Q===void 0||Q,q=b.altAxis,z=q===void 0||q,ee=b.fallbackPlacements,re=b.padding,ne=b.boundary,te=b.rootBoundary,We=b.altBoundary,Oe=b.flipVariations,Me=Oe===void 0||Oe,De=b.allowedAutoPlacements,oe=p.options.placement,we=je(oe),be=ee||(we!==oe&&Me?function(rE){if(je(rE)===le)return[];var lE=at(rE);return[DT(rE),lE,DT(lE)]}(oe):[at(oe)]),Ce=[oe].concat(be).reduce(function(rE,lE){return rE.concat(je(lE)===le?function(WE,mE){mE===void 0&&(mE={});var _E=mE,It=_E.placement,Nt=_E.boundary,wE=_E.rootBoundary,Bt=_E.padding,vt=_E.flipVariations,xE=_E.allowedAutoPlacements,Ft=xE===void 0?TE:xE,nt=ve(It),lt=nt?vt?fE:fE.filter(function(uE){return ve(uE)===nt}):Ue,$E=lt.filter(function(uE){return Ft.indexOf(uE)>=0});$E.length===0&&($E=lt);var XE=$E.reduce(function(uE,HE){return uE[HE]=rt(WE,{placement:HE,boundary:Nt,rootBoundary:wE,padding:Bt})[je(HE)],uE},{});return Object.keys(XE).sort(function(uE,HE){return XE[uE]-XE[HE]})}(p,{placement:lE,boundary:ne,rootBoundary:te,padding:re,flipVariations:Me,allowedAutoPlacements:De}):lE)},[]),he=p.rects.reference,ie=p.rects.popper,Ie=new Map,ue=!0,de=Ce[0],Ge=0;Ge=0,PE=NE?"width":"height",SE=rt(p,{placement:ke,boundary:ne,rootBoundary:te,altBoundary:We,padding:re}),EE=NE?sE?pe:se:sE?j:K;he[PE]>ie[PE]&&(EE=at(EE));var $e=at(EE),Be=[];if(J&&Be.push(SE[Ke]<=0),z&&Be.push(SE[EE]<=0,SE[$e]<=0),Be.every(function(rE){return rE})){de=ke,ue=!1;break}Ie.set(ke,Be)}if(ue)for(var UE=function(rE){var lE=Ce.find(function(WE){var mE=Ie.get(WE);if(mE)return mE.slice(0,rE).every(function(_E){return _E})});if(lE)return de=lE,"break"},oE=Me?3:1;oE>0&&UE(oE)!=="break";oE--);p.placement!==de&&(p.modifiersData[V]._skip=!0,p.placement=de,p.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(M){var p=M.state,b=M.options,V=M.name,Q=b.mainAxis,J=Q===void 0||Q,q=b.altAxis,z=q!==void 0&&q,ee=b.boundary,re=b.rootBoundary,ne=b.altBoundary,te=b.padding,We=b.tether,Oe=We===void 0||We,Me=b.tetherOffset,De=Me===void 0?0:Me,oe=rt(p,{boundary:ee,rootBoundary:re,padding:te,altBoundary:ne}),we=je(p.placement),be=ve(p.placement),Ce=!be,he=Fe(we),ie=he==="x"?"y":"x",Ie=p.modifiersData.popperOffsets,ue=p.rects.reference,de=p.rects.popper,Ge=typeof De=="function"?De(Object.assign({},p.rects,{placement:p.placement})):De,ke=typeof Ge=="number"?{mainAxis:Ge,altAxis:Ge}:Object.assign({mainAxis:0,altAxis:0},Ge),Ke=p.modifiersData.offset?p.modifiersData.offset[p.placement]:null,sE={x:0,y:0};if(Ie){if(J){var NE,PE=he==="y"?K:se,SE=he==="y"?j:pe,EE=he==="y"?"height":"width",$e=Ie[he],Be=$e+oe[PE],UE=$e-oe[SE],oE=Oe?-de[EE]/2:0,rE=be===ye?ue[EE]:de[EE],lE=be===ye?-de[EE]:-ue[EE],WE=p.elements.arrow,mE=Oe&&WE?I(WE):{width:0,height:0},_E=p.modifiersData["arrow#persistent"]?p.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},It=_E[PE],Nt=_E[SE],wE=Rt(0,ue[EE],mE[EE]),Bt=Ce?ue[EE]/2-oE-wE-It-ke.mainAxis:rE-wE-It-ke.mainAxis,vt=Ce?-ue[EE]/2+oE+wE+Nt+ke.mainAxis:lE+wE+Nt+ke.mainAxis,xE=p.elements.arrow&&w(p.elements.arrow),Ft=xE?he==="y"?xE.clientTop||0:xE.clientLeft||0:0,nt=(NE=Ke==null?void 0:Ke[he])!=null?NE:0,lt=$e+vt-nt,$E=Rt(Oe?D(Be,$e+Bt-nt-Ft):Be,$e,Oe?u(UE,lt):UE);Ie[he]=$E,sE[he]=$E-$e}if(z){var XE,uE=he==="x"?K:se,HE=he==="x"?j:pe,bE=Ie[ie],_t=ie==="y"?"height":"width",GT=bE+oe[uE],gT=bE-oe[HE],Yt=[K,se].indexOf(we)!==-1,HT=(XE=Ke==null?void 0:Ke[ie])!=null?XE:0,bT=Yt?GT:bE-ue[_t]-de[_t]-HT+ke.altAxis,yT=Yt?bE+ue[_t]+de[_t]-HT-ke.altAxis:gT,BT=Oe&&Yt?function(zR,en,Vt){var vT=Rt(zR,en,Vt);return vT>Vt?Vt:vT}(bT,bE,yT):Rt(Oe?bT:GT,bE,Oe?yT:gT);Ie[ie]=BT,sE[ie]=BT-bE}p.modifiersData[V]=sE}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(M){var p,b=M.state,V=M.name,Q=M.options,J=b.elements.arrow,q=b.modifiersData.popperOffsets,z=je(b.placement),ee=Fe(z),re=[se,pe].indexOf(z)>=0?"height":"width";if(J&&q){var ne=function(de,Ge){return MT(typeof(de=typeof de=="function"?de(Object.assign({},Ge.rects,{placement:Ge.placement})):de)!="number"?de:UT(de,Ue))}(Q.padding,b),te=I(J),We=ee==="y"?K:se,Oe=ee==="y"?j:pe,Me=b.rects.reference[re]+b.rects.reference[ee]-q[ee]-b.rects.popper[re],De=q[ee]-b.rects.reference[ee],oe=w(J),we=oe?ee==="y"?oe.clientHeight||0:oe.clientWidth||0:0,be=Me/2-De/2,Ce=ne[We],he=we-te[re]-ne[Oe],ie=we/2-te[re]/2+be,Ie=Rt(Ce,ie,he),ue=ee;b.modifiersData[V]=((p={})[ue]=Ie,p.centerOffset=Ie-ie,p)}},effect:function(M){var p=M.state,b=M.options.element,V=b===void 0?"[data-popper-arrow]":b;V!=null&&(typeof V!="string"||(V=p.elements.popper.querySelector(V)))&&dT(p.elements.popper,V)&&(p.elements.arrow=V)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(M){var p=M.state,b=M.name,V=p.rects.reference,Q=p.rects.popper,J=p.modifiersData.preventOverflow,q=rt(p,{elementContext:"reference"}),z=rt(p,{altBoundary:!0}),ee=mT(q,V),re=mT(z,Q,J),ne=hT(ee),te=hT(re);p.modifiersData[b]={referenceClippingOffsets:ee,popperEscapeOffsets:re,isReferenceHidden:ne,hasPopperEscaped:te},p.attributes.popper=Object.assign({},p.attributes.popper,{"data-popper-reference-hidden":ne,"data-popper-escaped":te})}}]})}},t={};function r(A){var s=t[A];if(s!==void 0)return s.exports;var o=t[A]={exports:{}};return T[A](o,o.exports,r),o.exports}r.d=(A,s)=>{for(var o in s)r.o(s,o)&&!r.o(A,o)&&Object.defineProperty(A,o,{enumerable:!0,get:s[o]})},r.o=(A,s)=>Object.prototype.hasOwnProperty.call(A,s),r.r=A=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})};var R={};return r.r(R),r(661),r(795),r(682),r(284),r(181),r(778),r(51),r(185),R})()})})(kn);function Kn(E){let e=E[0].title+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p(t,r){r&1&&e!==(e=t[0].title+"")&&Pe(T,e)},d(t){t&&Y(T)}}}function Jn(E){let e,T;return{c(){e=Re("Welcome to "),T=P("span"),T.textContent="Vanna.AI",i(T,"class","nav-title")},m(t,r){W(t,e,r),W(t,T,r)},p:Z,d(t){t&&(Y(e),Y(T))}}}function qn(E){let e,T,t,r,R=E[0].subtitle+"",A;function s(S,O){return S[0].title=="Welcome to Vanna.AI"?Jn:Kn}let o=s(E),n=o(E);return{c(){e=P("div"),T=P("h1"),n.c(),t=x(),r=P("p"),A=Re(R),i(T,"class","text-3xl font-bold text-gray-800 sm:text-4xl dark:text-white"),i(r,"class","mt-3 text-gray-600 dark:text-gray-400"),i(e,"class","max-w-4xl px-4 sm:px-6 lg:px-8 mx-auto text-center")},m(S,O){W(S,e,O),l(e,T),n.m(T,null),l(e,t),l(e,r),l(r,A)},p(S,[O]){o===(o=s(S))&&n?n.p(S,O):(n.d(1),n=o(S),n&&(n.c(),n.m(T,null))),O&1&&R!==(R=S[0].subtitle+"")&&Pe(A,R)},i:Z,o:Z,d(S){S&&Y(e),n.d()}}}function Qn(E,e,T){let t;return RE(E,FE,r=>T(0,t=r)),[t]}class Zn extends Le{constructor(e){super(),_e(this,e,Qn,qn,Ne,{})}}function jn(E){let e,T;const t=E[1].default,r=pt(t,E,E[0],null);return{c(){e=P("p"),r&&r.c(),i(e,"class","text-gray-800 dark:text-gray-200")},m(R,A){W(R,e,A),r&&r.m(e,null),T=!0},p(R,[A]){r&&r.p&&(!T||A&1)&&Ut(r,t,R,R[0],T?Mt(t,R[0],A,null):mt(R[0]),null)},i(R){T||(G(r,R),T=!0)},o(R){B(r,R),T=!1},d(R){R&&Y(e),r&&r.d(R)}}}function zn(E,e,T){let{$$slots:t={},$$scope:r}=e;return E.$$set=R=>{"$$scope"in R&&T(0,r=R.$$scope)},[r,t]}class IE extends Le{constructor(e){super(),_e(this,e,zn,jn,Ne,{})}}function eA(E){let e;return{c(){e=Re(E[0])},m(T,t){W(T,e,t)},p(T,t){t&1&&Pe(e,T[0])},d(T){T&&Y(e)}}}function EA(E){let e,T,t,r,R,A,s,o,n;s=new IE({props:{$$slots:{default:[eA]},$$scope:{ctx:E}}});const S=E[1].default,O=pt(S,E,E[2],null);return{c(){e=P("li"),T=P("div"),t=P("div"),r=P("span"),r.innerHTML='You',R=x(),A=P("div"),k(s.$$.fragment),o=x(),O&&O.c(),i(r,"class","flex-shrink-0 inline-flex items-center justify-center h-[2.375rem] w-[2.375rem] rounded-full bg-gray-600"),i(A,"class","grow mt-2 space-y-3"),i(t,"class","max-w-2xl flex gap-x-2 sm:gap-x-4"),i(T,"class","max-w-4xl px-4 sm:px-6 lg:px-8 mx-auto"),i(e,"class","py-2 sm:py-4")},m(N,u){W(N,e,u),l(e,T),l(T,t),l(t,r),l(t,R),l(t,A),$(s,A,null),l(A,o),O&&O.m(A,null),n=!0},p(N,[u]){const D={};u&5&&(D.$$scope={dirty:u,ctx:N}),s.$set(D),O&&O.p&&(!n||u&4)&&Ut(O,S,N,N[2],n?Mt(S,N[2],u,null):mt(N[2]),null)},i(N){n||(G(s.$$.fragment,N),G(O,N),n=!0)},o(N){B(s.$$.fragment,N),B(O,N),n=!1},d(N){N&&Y(e),X(s),O&&O.d(N)}}}function tA(E,e,T){let{$$slots:t={},$$scope:r}=e,{message:R}=e;return E.$$set=A=>{"message"in A&&T(0,R=A.message),"$$scope"in A&&T(2,r=A.$$scope)},[R,t,r]}class YE extends Le{constructor(e){super(),_e(this,e,tA,EA,Ne,{message:0})}}function TA(E){let e,T,t;return{c(){e=P("button"),e.innerHTML='',i(e,"type","button"),i(e,"class","inline-flex flex-shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:text-blue-600 focus:z-10 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:hover:text-blue-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600")},m(r,R){W(r,e,R),T||(t=ae(e,"click",E[1]),T=!0)},p:Z,d(r){r&&Y(e),T=!1,t()}}}function rA(E){let e;return{c(){e=P("button"),e.innerHTML='',i(e,"type","button"),i(e,"class","animate-ping animate-pulse inline-flex flex-shrink-0 justify-center items-center size-8 rounded-lg text-red-500 hover:text-red-600 focus:z-10 focus:outline-none focus:ring-2 focus:ring-red-500 dark:hover:text-red-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-red-600")},m(T,t){W(T,e,t)},p:Z,d(T){T&&Y(e)}}}function RA(E){let e;function T(R,A){return R[0]?rA:TA}let t=T(E),r=t(E);return{c(){r.c(),e=Ze()},m(R,A){r.m(R,A),W(R,e,A)},p(R,[A]){t===(t=T(R))&&r?r.p(R,A):(r.d(1),r=t(R),r&&(r.c(),r.m(e.parentNode,e)))},i:Z,o:Z,d(R){R&&Y(e),r.d(R)}}}function nA(E,e,T){let{newMessage:t}=e,r=!1;function R(){if(T(0,r=!0),PR.set(!0),"webkitSpeechRecognition"in window)var A=new window.webkitSpeechRecognition;else var A=new window.SpeechRecognition;A.lang="en-US",A.start(),A.onresult=s=>{const o=s.results[0][0].transcript;console.log(o),T(2,t=o),T(0,r=!1)},A.onend=()=>{T(0,r=!1)},A.onerror=()=>{T(0,r=!1)}}return E.$$set=A=>{"newMessage"in A&&T(2,t=A.newMessage)},[r,R,t]}class AA extends Le{constructor(e){super(),_e(this,e,nA,RA,Ne,{newMessage:2})}}function sA(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d;function C(L){E[5](L)}let _={};return E[0]!==void 0&&(_.newMessage=E[0]),n=new AA({props:_}),oT.push(()=>_n(n,"newMessage",C)),{c(){e=P("div"),T=P("input"),t=x(),r=P("div"),R=P("div"),A=P("div"),A.innerHTML="",s=x(),o=P("div"),k(n.$$.fragment),O=x(),N=P("button"),N.innerHTML='',i(T,"type","text"),i(T,"class","p-4 pb-12 block w-full bg-gray-100 border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-800 dark:border-gray-700 dark:text-gray-400"),i(T,"placeholder","Ask me a question about your data that I can turn into SQL."),i(A,"class","flex items-center"),i(N,"type","button"),i(N,"class","inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-white bg-blue-600 hover:bg-blue-500 focus:z-10 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all"),i(o,"class","flex items-center gap-x-1"),i(R,"class","flex justify-between items-center"),i(r,"class","absolute bottom-px inset-x-px p-2 rounded-b-md bg-gray-100 dark:bg-slate-800"),i(e,"class","relative")},m(L,c){W(L,e,c),l(e,T),Ye(T,E[0]),l(e,t),l(e,r),l(r,R),l(R,A),l(R,s),l(R,o),$(n,o,null),l(o,O),l(o,N),u=!0,D||(d=[ae(T,"input",E[4]),ae(T,"keydown",E[1]),ae(N,"click",E[2])],D=!0)},p(L,[c]){c&1&&T.value!==L[0]&&Ye(T,L[0]);const H={};!S&&c&1&&(S=!0,H.newMessage=L[0],On(()=>S=!1)),n.$set(H)},i(L){u||(G(n.$$.fragment,L),u=!0)},o(L){B(n.$$.fragment,L),u=!1},d(L){L&&Y(e),X(n),D=!1,iE(d)}}}function SA(E,e,T){let{onSubmit:t}=e,r="";function R(n){n.key==="Enter"&&(t(r),n.preventDefault())}function A(){t(r)}function s(){r=this.value,T(0,r)}function o(n){r=n,T(0,r)}return E.$$set=n=>{"onSubmit"in n&&T(3,t=n.onSubmit)},[r,R,A,t,s,o]}class oA extends Le{constructor(e){super(),_e(this,e,SA,sA,Ne,{onSubmit:3})}}function OA(E){let e;return{c(){e=P("div"),e.innerHTML='',i(e,"class","lg:hidden flex justify-end mb-2 sm:mb-3")},m(T,t){W(T,e,t)},p:Z,i:Z,o:Z,d(T){T&&Y(e)}}}class iA extends Le{constructor(e){super(),_e(this,e,null,OA,Ne,{})}}function aA(E){let e,T,t,r;return{c(){e=P("button"),T=Re(E[0]),i(e,"type","button"),i(e,"class","mb-2.5 mr-1.5 py-2 px-3 inline-flex justify-center items-center gap-x-2 rounded-md border border-blue-600 bg-white text-blue-600 align-middle hover:bg-blue-50 text-sm dark:bg-slate-900 dark:text-blue-500 dark:border-blue-500 dark:hover:text-blue-400 dark:hover:border-blue-400")},m(R,A){W(R,e,A),l(e,T),t||(r=ae(e,"click",E[1]),t=!0)},p(R,[A]){A&1&&Pe(T,R[0])},i:Z,o:Z,d(R){R&&Y(e),t=!1,r()}}}function IA(E,e,T){let{message:t}=e,{onSubmit:r}=e;function R(){r(t)}return E.$$set=A=>{"message"in A&&T(0,t=A.message),"onSubmit"in A&&T(2,r=A.onSubmit)},[t,R,r]}class CE extends Le{constructor(e){super(),_e(this,e,IA,aA,Ne,{message:0,onSubmit:2})}}function NA(E){let e,T,t,r,R,A,s,o,n,S,O;return{c(){e=P("span"),T=OE("svg"),t=OE("defs"),r=OE("linearGradient"),R=OE("stop"),A=OE("stop"),s=OE("g"),o=OE("g"),n=OE("path"),S=OE("path"),i(R,"offset","0"),i(R,"stop-color","#009efd"),i(A,"offset","1"),i(A,"stop-color","#2af598"),i(r,"gradientTransform","matrix(1.09331 0 0 1.09331 -47.1838 -88.8946)"),i(r,"gradientUnits","userSpaceOnUse"),i(r,"id","LinearGradient"),i(r,"x1","237.82"),i(r,"x2","785.097"),i(r,"y1","549.609"),i(r,"y2","549.609"),i(n,"d","M117.718 228.798C117.718 119.455 206.358 30.8151 315.701 30.8151L708.299 30.8151C817.642 30.8151 906.282 119.455 906.282 228.798L906.282 795.202C906.282 904.545 817.642 993.185 708.299 993.185L315.701 993.185C206.358 993.185 117.718 904.545 117.718 795.202L117.718 228.798Z"),i(n,"fill","#0f172a"),i(n,"fill-rule","nonzero"),i(n,"opacity","1"),i(n,"stroke","#374151"),i(n,"stroke-linecap","butt"),i(n,"stroke-linejoin","round"),i(n,"stroke-width","20"),i(S,"d","M212.828 215.239C213.095 281.169 213.629 413.028 213.629 413.028C213.629 413.028 511.51 808.257 513.993 809.681C612.915 677.809 810.759 414.065 810.759 414.065C810.759 414.065 811.034 280.901 811.172 214.319C662.105 362.973 662.105 362.973 513.038 511.627C362.933 363.433 362.933 363.433 212.828 215.239Z"),i(S,"fill","url(#LinearGradient)"),i(S,"fill-rule","nonzero"),i(S,"opacity","1"),i(S,"stroke","none"),i(o,"opacity","1"),i(s,"id","Layer-1"),i(T,"height","100%"),i(T,"stroke-miterlimit","10"),Ct(T,"fill-rule","nonzero"),Ct(T,"clip-rule","evenodd"),Ct(T,"stroke-linecap","round"),Ct(T,"stroke-linejoin","round"),i(T,"version","1.1"),i(T,"viewBox","0 0 1024 1024"),i(T,"width","100%"),i(T,"xml:space","preserve"),i(T,"xmlns","http://www.w3.org/2000/svg"),i(e,"class",O="flex-shrink-0 w-[2.375rem] h-[2.375rem] "+E[0])},m(N,u){W(N,e,u),l(e,T),l(T,t),l(t,r),l(r,R),l(r,A),l(T,s),l(s,o),l(o,n),l(o,S)},p(N,[u]){u&1&&O!==(O="flex-shrink-0 w-[2.375rem] h-[2.375rem] "+N[0])&&i(e,"class",O)},i:Z,o:Z,d(N){N&&Y(e)}}}function lA(E,e,T){let t,{animate:r=!1}=e;return E.$$set=R=>{"animate"in R&&T(1,r=R.animate)},E.$$.update=()=>{E.$$.dirty&2&&T(0,t=r?"animate-bounce":"")},[t,r]}class pR extends Le{constructor(e){super(),_e(this,e,lA,NA,Ne,{animate:1})}}function _A(E){let e,T,t,r,R;T=new pR({});const A=E[1].default,s=pt(A,E,E[0],null);return{c(){e=P("li"),k(T.$$.fragment),t=x(),r=P("div"),s&&s.c(),i(r,"class","space-y-3 overflow-x-auto overflow-y-hidden whitespace-break-spaces w-full"),i(e,"class","max-w-4xl py-2 px-4 sm:px-6 lg:px-8 mx-auto flex gap-x-2 sm:gap-x-4")},m(o,n){W(o,e,n),$(T,e,null),l(e,t),l(e,r),s&&s.m(r,null),R=!0},p(o,[n]){s&&s.p&&(!R||n&1)&&Ut(s,A,o,o[0],R?Mt(A,o[0],n,null):mt(o[0]),null)},i(o){R||(G(T.$$.fragment,o),G(s,o),R=!0)},o(o){B(T.$$.fragment,o),B(s,o),R=!1},d(o){o&&Y(e),X(T),s&&s.d(o)}}}function LA(E,e,T){let{$$slots:t={},$$scope:r}=e;return E.$$set=R=>{"$$scope"in R&&T(0,r=R.$$scope)},[r,t]}class ze extends Le{constructor(e){super(),_e(this,e,LA,_A,Ne,{})}}function CA(E){let e;return{c(){e=Re("Thinking...")},m(T,t){W(T,e,t)},d(T){T&&Y(e)}}}function uA(E){let e,T,t,r,R,A;return T=new pR({props:{animate:!0}}),R=new IE({props:{$$slots:{default:[CA]},$$scope:{ctx:E}}}),{c(){e=P("li"),k(T.$$.fragment),t=x(),r=P("div"),k(R.$$.fragment),i(r,"class","space-y-3"),i(e,"class","max-w-4xl py-2 px-4 sm:px-6 lg:px-8 mx-auto flex gap-x-2 sm:gap-x-4")},m(s,o){W(s,e,o),$(T,e,null),l(e,t),l(e,r),$(R,r,null),A=!0},p(s,[o]){const n={};o&1&&(n.$$scope={dirty:o,ctx:s}),R.$set(n)},i(s){A||(G(T.$$.fragment,s),G(R.$$.fragment,s),A=!0)},o(s){B(T.$$.fragment,s),B(R.$$.fragment,s),A=!1},d(s){s&&Y(e),X(T),X(R)}}}class cA extends Le{constructor(e){super(),_e(this,e,null,uA,Ne,{})}}function fA(E){let e,T,t,r,R,A,s,o,n,S,O;return{c(){e=P("ul"),T=P("li"),t=P("div"),r=P("span"),r.textContent="CSV",R=x(),A=P("a"),s=OE("svg"),o=OE("path"),n=OE("path"),S=Re(` + Download`),i(r,"class","mr-3 flex-1 w-0 truncate"),i(o,"d","M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"),i(n,"d","M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"),i(s,"class","flex-shrink-0 w-3 h-3"),i(s,"width","16"),i(s,"height","16"),i(s,"viewBox","0 0 16 16"),i(s,"fill","currentColor"),i(A,"class","flex items-center gap-x-2 text-gray-500 hover:text-blue-500 whitespace-nowrap"),i(A,"href",O="/api/v0/download_csv?id="+E[0]),i(t,"class","w-full flex justify-between truncate"),i(T,"class","flex items-center gap-x-2 p-3 text-sm bg-white border text-gray-800 first:rounded-t-lg first:mt-0 last:rounded-b-lg dark:bg-slate-900 dark:border-gray-700 dark:text-gray-200"),i(e,"class","flex flex-col justify-end text-start -space-y-px")},m(N,u){W(N,e,u),l(e,T),l(T,t),l(t,r),l(t,R),l(t,A),l(A,s),l(s,o),l(s,n),l(A,S)},p(N,[u]){u&1&&O!==(O="/api/v0/download_csv?id="+N[0])&&i(A,"href",O)},i:Z,o:Z,d(N){N&&Y(e)}}}function PA(E,e,T){let{id:t}=e;return E.$$set=r=>{"id"in r&&T(0,t=r.id)},[t]}class DA extends Le{constructor(e){super(),_e(this,e,PA,fA,Ne,{id:0})}}function kT(E,e,T){const t=E.slice();return t[5]=e[T],t}function KT(E,e,T){const t=E.slice();return t[8]=e[T],t}function JT(E,e,T){const t=E.slice();return t[8]=e[T],t}function qT(E){let e,T,t,r;return{c(){e=P("th"),T=P("div"),t=P("span"),t.textContent=`${E[8]}`,r=x(),i(t,"class","text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-gray-200"),i(T,"class","flex items-center gap-x-2"),i(e,"scope","col"),i(e,"class","px-6 py-3 text-left")},m(R,A){W(R,e,A),l(e,T),l(T,t),l(e,r)},p:Z,d(R){R&&Y(e)}}}function QT(E){let e,T,t;return{c(){e=P("td"),T=P("div"),t=P("span"),t.textContent=`${E[5][E[8]]}`,i(t,"class","text-gray-800 dark:text-gray-200"),i(T,"class","px-6 py-3"),i(e,"class","h-px w-px whitespace-nowrap")},m(r,R){W(r,e,R),l(e,T),l(T,t)},p:Z,d(r){r&&Y(e)}}}function ZT(E){let e,T,t=ce(E[3]),r=[];for(let R=0;R{C=null}),He())},i(_){O||(G(C),O=!0)},o(_){B(C),O=!1},d(_){_&&(Y(e),Y(n),Y(S)),nE(u,_),nE(d,_),C&&C.d(_)}}}function pA(E,e,T){let t;RE(E,FE,o=>T(1,t=o));let{id:r}=e,{df:R}=e,A=JSON.parse(R),s=A.length>0?Object.keys(A[0]):[];return E.$$set=o=>{"id"in o&&T(0,r=o.id),"df"in o&&T(4,R=o.df)},[r,t,A,s,R]}class MR extends Le{constructor(e){super(),_e(this,e,pA,dA,Ne,{id:0,df:4})}}function MA(E){let e;return{c(){e=P("div"),i(e,"id",E[0])},m(T,t){W(T,e,t)},p:Z,i:Z,o:Z,d(T){T&&Y(e)}}}function UA(E,e,T){let{fig:t}=e,r=JSON.parse(t),R=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);return cR(()=>{Plotly.newPlot(document.getElementById(R),r,{responsive:!0})}),E.$$set=A=>{"fig"in A&&T(1,t=A.fig)},[R,t]}class UR extends Le{constructor(e){super(),_e(this,e,UA,MA,Ne,{fig:1})}}function mA(E){let e,T,t,r;return{c(){e=P("button"),T=Re(E[0]),i(e,"type","button"),i(e,"class","mb-2.5 mr-1.5 py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border-2 border-green-200 font-semibold text-green-500 hover:text-white hover:bg-green-500 hover:border-green-500 focus:outline-none focus:ring-2 focus:ring-green-200 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800")},m(R,A){W(R,e,A),l(e,T),t||(r=ae(e,"click",E[1]),t=!0)},p(R,[A]){A&1&&Pe(T,R[0])},i:Z,o:Z,d(R){R&&Y(e),t=!1,r()}}}function hA(E,e,T){let{message:t}=e,{onSubmit:r}=e;function R(){r(t)}return E.$$set=A=>{"message"in A&&T(0,t=A.message),"onSubmit"in A&&T(2,r=A.onSubmit)},[t,R,r]}class mR extends Le{constructor(e){super(),_e(this,e,hA,mA,Ne,{message:0,onSubmit:2})}}function GA(E){let e,T,t,r,R,A,s,o,n;return{c(){e=P("div"),T=P("div"),t=P("div"),t.innerHTML='',r=x(),R=P("div"),A=P("h3"),A.textContent="Error",s=x(),o=P("div"),n=Re(E[0]),i(t,"class","flex-shrink-0"),i(A,"class","text-sm text-yellow-800 font-semibold"),i(o,"class","mt-1 text-sm text-yellow-700"),i(R,"class","ml-4"),i(T,"class","flex"),i(e,"class","bg-yellow-50 border border-yellow-200 rounded-md p-4"),i(e,"role","alert")},m(S,O){W(S,e,O),l(e,T),l(T,t),l(T,r),l(T,R),l(R,A),l(R,s),l(R,o),l(o,n)},p(S,[O]){O&1&&Pe(n,S[0])},i:Z,o:Z,d(S){S&&Y(e)}}}function gA(E,e,T){let{message:t}=e;return E.$$set=r=>{"message"in r&&T(0,t=r.message)},[t]}let fT=class extends Le{constructor(e){super(),_e(this,e,gA,GA,Ne,{message:0})}};function HA(E){let e,T;const t=E[1].default,r=pt(t,E,E[0],null);return{c(){e=P("div"),r&&r.c(),i(e,"class","font-mono whitespace-pre-wrap")},m(R,A){W(R,e,A),r&&r.m(e,null),T=!0},p(R,[A]){r&&r.p&&(!T||A&1)&&Ut(r,t,R,R[0],T?Mt(t,R[0],A,null):mt(R[0]),null)},i(R){T||(G(r,R),T=!0)},o(R){B(r,R),T=!1},d(R){R&&Y(e),r&&r.d(R)}}}function bA(E,e,T){let{$$slots:t={},$$scope:r}=e;return E.$$set=R=>{"$$scope"in R&&T(0,r=R.$$scope)},[r,t]}class hR extends Le{constructor(e){super(),_e(this,e,bA,HA,Ne,{})}}function yA(E){let e;return{c(){e=Re(E[1])},m(T,t){W(T,e,t)},p(T,t){t&2&&Pe(e,T[1])},d(T){T&&Y(e)}}}function BA(E){let e,T,t,r,R,A,s,o;return t=new CE({props:{message:"Run SQL",onSubmit:E[3]}}),R=new IE({props:{$$slots:{default:[yA]},$$scope:{ctx:E}}}),{c(){e=P("textarea"),T=x(),k(t.$$.fragment),r=x(),k(R.$$.fragment),i(e,"rows","6"),i(e,"class","block p-2.5 w-full text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500 font-mono"),i(e,"placeholder","SELECT col1, col2, col3 FROM ...")},m(n,S){W(n,e,S),Ye(e,E[1]),W(n,T,S),$(t,n,S),W(n,r,S),$(R,n,S),A=!0,s||(o=ae(e,"input",E[2]),s=!0)},p(n,[S]){S&2&&Ye(e,n[1]);const O={};S&3&&(O.onSubmit=n[3]),t.$set(O);const N={};S&18&&(N.$$scope={dirty:S,ctx:n}),R.$set(N)},i(n){A||(G(t.$$.fragment,n),G(R.$$.fragment,n),A=!0)},o(n){B(t.$$.fragment,n),B(R.$$.fragment,n),A=!1},d(n){n&&(Y(e),Y(T),Y(r)),X(t,n),X(R,n),s=!1,o()}}}function vA(E,e,T){let t;RE(E,zE,s=>T(1,t=s));let{onSubmit:r}=e;function R(){t=this.value,zE.set(t)}const A=()=>r(t);return E.$$set=s=>{"onSubmit"in s&&T(0,r=s.onSubmit)},[r,t,R,A]}class FA extends Le{constructor(e){super(),_e(this,e,vA,BA,Ne,{onSubmit:0})}}function YA(E){let e,T,t,r,R,A;return t=new CE({props:{message:E[3],onSubmit:E[5]}}),{c(){e=P("textarea"),T=x(),k(t.$$.fragment),i(e,"rows","6"),i(e,"class","block p-2.5 w-full text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500 font-mono"),i(e,"placeholder",E[2])},m(s,o){W(s,e,o),Ye(e,E[0]),W(s,T,o),$(t,s,o),r=!0,R||(A=ae(e,"input",E[4]),R=!0)},p(s,[o]){(!r||o&4)&&i(e,"placeholder",s[2]),o&1&&Ye(e,s[0]);const n={};o&8&&(n.message=s[3]),o&3&&(n.onSubmit=s[5]),t.$set(n)},i(s){r||(G(t.$$.fragment,s),r=!0)},o(s){B(t.$$.fragment,s),r=!1},d(s){s&&(Y(e),Y(T)),X(t,s),R=!1,A()}}}function VA(E,e,T){let{onSubmit:t}=e,{currentValue:r}=e,{placeholder:R}=e,{buttonText:A}=e;function s(){r=this.value,T(0,r)}const o=()=>t(r);return E.$$set=n=>{"onSubmit"in n&&T(1,t=n.onSubmit),"currentValue"in n&&T(0,r=n.currentValue),"placeholder"in n&&T(2,R=n.placeholder),"buttonText"in n&&T(3,A=n.buttonText)},[r,t,R,A,s,o]}class WA extends Le{constructor(e){super(),_e(this,e,VA,YA,Ne,{onSubmit:1,currentValue:0,placeholder:2,buttonText:3})}}function wA(E){let e,T;return e=new CE({props:{message:"Play",onSubmit:E[2]}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,[r]){const R={};r&1&&(R.onSubmit=t[2]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function zT(E){if("speechSynthesis"in window){const e=new SpeechSynthesisUtterance(E);e.lang="en-US",e.volume=1,e.rate=1,e.pitch=1,window.speechSynthesis.speak(e)}else console.error("SpeechSynthesis API is not supported in this browser.")}function xA(E,e,T){let t;RE(E,PR,A=>T(1,t=A));let{message:r}=e;const R=()=>zT(r);return E.$$set=A=>{"message"in A&&T(0,r=A.message)},E.$$.update=()=>{E.$$.dirty&3&&t&&zT(r)},[r,t,R]}class $A extends Le{constructor(e){super(),_e(this,e,xA,wA,Ne,{message:0})}}function XA(E){let e,T,t;return{c(){e=P("button"),e.textContent="Open Debugger",T=x(),t=P("div"),t.innerHTML='

Server Logs

',i(e,"type","button"),i(e,"class","absolute top-0 right-0 m-1 ms-0 py-3 px-4 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"),i(e,"data-hs-overlay","#hs-overlay-right"),i(t,"id","hs-overlay-right"),i(t,"class","hs-overlay hs-overlay-open:translate-x-0 hidden translate-x-full fixed top-0 end-0 transition-all duration-300 transform h-full max-w-xs w-full z-[80] bg-white border-s dark:bg-neutral-800 dark:border-neutral-700 [--body-scroll:true] overflow-y-auto"),i(t,"tabindex","-1")},m(r,R){W(r,e,R),W(r,T,R),W(r,t,R)},p:Z,i:Z,o:Z,d(r){r&&(Y(e),Y(T),Y(t))}}}class kA extends Le{constructor(e){super(),_e(this,e,null,XA,Ne,{})}}var GR={exports:{}};(function(E){(function(e,T){E.exports?E.exports=T():e.nearley=T()})($n,function(){function e(n,S,O){return this.id=++e.highestId,this.name=n,this.symbols=S,this.postprocess=O,this}e.highestId=0,e.prototype.toString=function(n){var S=typeof n>"u"?this.symbols.map(o).join(" "):this.symbols.slice(0,n).map(o).join(" ")+" ● "+this.symbols.slice(n).map(o).join(" ");return this.name+" → "+S};function T(n,S,O,N){this.rule=n,this.dot=S,this.reference=O,this.data=[],this.wantedBy=N,this.isComplete=this.dot===n.symbols.length}T.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},T.prototype.nextState=function(n){var S=new T(this.rule,this.dot+1,this.reference,this.wantedBy);return S.left=this,S.right=n,S.isComplete&&(S.data=S.build(),S.right=void 0),S},T.prototype.build=function(){var n=[],S=this;do n.push(S.right.data),S=S.left;while(S.left);return n.reverse(),n},T.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,A.fail))};function t(n,S){this.grammar=n,this.index=S,this.states=[],this.wants={},this.scannable=[],this.completed={}}t.prototype.process=function(n){for(var S=this.states,O=this.wants,N=this.completed,u=0;u0&&S.push(" ^ "+N+" more lines identical to this"),N=0,S.push(" "+d)),O=d}},A.prototype.getSymbolDisplay=function(n){return s(n)},A.prototype.buildFirstStateStack=function(n,S){if(S.indexOf(n)!==-1)return null;if(n.wantedBy.length===0)return[n];var O=n.wantedBy[0],N=[n].concat(S),u=this.buildFirstStateStack(O,N);return u===null?null:[n].concat(u)},A.prototype.save=function(){var n=this.table[this.current];return n.lexerState=this.lexerState,n},A.prototype.restore=function(n){var S=n.index;this.current=S,this.table[S]=n,this.table.splice(S+1),this.lexerState=n.lexerState,this.results=this.finish()},A.prototype.rewind=function(n){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[n])},A.prototype.finish=function(){var n=[],S=this.grammar.start,O=this.table[this.table.length-1];return O.states.forEach(function(N){N.rule.name===S&&N.dot===N.rule.symbols.length&&N.reference===0&&N.data!==A.fail&&n.push(N)}),n.map(function(N){return N.data})};function s(n){var S=typeof n;if(S==="string")return n;if(S==="object"){if(n.literal)return JSON.stringify(n.literal);if(n instanceof RegExp)return"character matching "+n;if(n.type)return n.type+" token";if(n.test)return"token matching "+String(n.test);throw new Error("Unknown symbol type: "+n)}}function o(n){var S=typeof n;if(S==="string")return n;if(S==="object"){if(n.literal)return JSON.stringify(n.literal);if(n instanceof RegExp)return n.toString();if(n.type)return"%"+n.type;if(n.test)return"<"+String(n.test)+">";throw new Error("Unknown symbol type: "+n)}}return{Parser:A,Grammar:r,Rule:e}})})(GR);var KA=GR.exports;const JA=Xn(KA);var gR=Object.defineProperty,qA=Object.defineProperties,QA=Object.getOwnPropertyDescriptors,dt=Object.getOwnPropertySymbols,HR=Object.prototype.hasOwnProperty,bR=Object.prototype.propertyIsEnumerable,er=(E,e,T)=>e in E?gR(E,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):E[e]=T,eE=(E,e)=>{for(var T in e||(e={}))HR.call(e,T)&&er(E,T,e[T]);if(dt)for(var T of dt(e))bR.call(e,T)&&er(E,T,e[T]);return E},AE=(E,e)=>qA(E,QA(e)),ZA=(E,e)=>{var T={};for(var t in E)HR.call(E,t)&&e.indexOf(t)<0&&(T[t]=E[t]);if(E!=null&&dt)for(var t of dt(E))e.indexOf(t)<0&&bR.call(E,t)&&(T[t]=E[t]);return T},jA=(E,e)=>{for(var T in e)gR(E,T,{get:e[T],enumerable:!0})},yR={};jA(yR,{bigquery:()=>ls,db2:()=>ms,db2i:()=>Fs,hive:()=>Ks,mariadb:()=>tS,mysql:()=>OS,n1ql:()=>mS,plsql:()=>FS,postgresql:()=>JS,redshift:()=>To,singlestoredb:()=>RO,snowflake:()=>IO,spark:()=>io,sql:()=>go,sqlite:()=>fo,tidb:()=>uS,transactsql:()=>Qo,trino:()=>Wo});var v=E=>E.flatMap(zA),zA=E=>ct(Es(E)).map(es),es=E=>E.replace(/ +/g," ").trim(),Es=E=>({type:"mandatory_block",items:PT(E,0)[0]}),PT=(E,e,T)=>{const t=[];for(;E[e];){const[r,R]=ts(E,e);if(t.push(r),e=R,E[e]==="|")e++;else if(E[e]==="}"||E[e]==="]"){if(T!==E[e])throw new Error(`Unbalanced parenthesis in: ${E}`);return e++,[t,e]}else if(e===E.length){if(T)throw new Error(`Unbalanced parenthesis in: ${E}`);return[t,e]}else throw new Error(`Unexpected "${E[e]}"`)}return[t,e]},ts=(E,e)=>{const T=[];for(;;){const[t,r]=Ts(E,e);if(t)T.push(t),e=r;else break}return T.length===1?[T[0],e]:[{type:"concatenation",items:T},e]},Ts=(E,e)=>{if(E[e]==="{")return rs(E,e+1);if(E[e]==="[")return Rs(E,e+1);{let T="";for(;E[e]&&/[A-Za-z0-9_ ]/.test(E[e]);)T+=E[e],e++;return[T,e]}},rs=(E,e)=>{const[T,t]=PT(E,e,"}");return[{type:"mandatory_block",items:T},t]},Rs=(E,e)=>{const[T,t]=PT(E,e,"]");return[{type:"optional_block",items:T},t]},ct=E=>{if(typeof E=="string")return[E];if(E.type==="concatenation")return E.items.map(ct).reduce(ns,[""]);if(E.type==="mandatory_block")return E.items.flatMap(ct);if(E.type==="optional_block")return["",...E.items.flatMap(ct)];throw new Error(`Unknown node type: ${E}`)},ns=(E,e)=>{const T=[];for(const t of E)for(const r of e)T.push(t+r);return T},BR=(E=>(E.QUOTED_IDENTIFIER="QUOTED_IDENTIFIER",E.IDENTIFIER="IDENTIFIER",E.STRING="STRING",E.VARIABLE="VARIABLE",E.RESERVED_DATA_TYPE="RESERVED_DATA_TYPE",E.RESERVED_PARAMETERIZED_DATA_TYPE="RESERVED_PARAMETERIZED_DATA_TYPE",E.RESERVED_KEYWORD="RESERVED_KEYWORD",E.RESERVED_FUNCTION_NAME="RESERVED_FUNCTION_NAME",E.RESERVED_PHRASE="RESERVED_PHRASE",E.RESERVED_SET_OPERATION="RESERVED_SET_OPERATION",E.RESERVED_CLAUSE="RESERVED_CLAUSE",E.RESERVED_SELECT="RESERVED_SELECT",E.RESERVED_JOIN="RESERVED_JOIN",E.ARRAY_IDENTIFIER="ARRAY_IDENTIFIER",E.ARRAY_KEYWORD="ARRAY_KEYWORD",E.CASE="CASE",E.END="END",E.WHEN="WHEN",E.ELSE="ELSE",E.THEN="THEN",E.LIMIT="LIMIT",E.BETWEEN="BETWEEN",E.AND="AND",E.OR="OR",E.XOR="XOR",E.OPERATOR="OPERATOR",E.COMMA="COMMA",E.ASTERISK="ASTERISK",E.PROPERTY_ACCESS_OPERATOR="PROPERTY_ACCESS_OPERATOR",E.OPEN_PAREN="OPEN_PAREN",E.CLOSE_PAREN="CLOSE_PAREN",E.LINE_COMMENT="LINE_COMMENT",E.BLOCK_COMMENT="BLOCK_COMMENT",E.DISABLE_COMMENT="DISABLE_COMMENT",E.NUMBER="NUMBER",E.NAMED_PARAMETER="NAMED_PARAMETER",E.QUOTED_PARAMETER="QUOTED_PARAMETER",E.NUMBERED_PARAMETER="NUMBERED_PARAMETER",E.POSITIONAL_PARAMETER="POSITIONAL_PARAMETER",E.CUSTOM_PARAMETER="CUSTOM_PARAMETER",E.DELIMITER="DELIMITER",E.EOF="EOF",E))(BR||{}),vR=E=>({type:"EOF",raw:"«EOF»",text:"«EOF»",start:E}),et=vR(1/0),JE=E=>e=>e.type===E.type&&e.text===E.text,vE={ARRAY:JE({text:"ARRAY",type:"RESERVED_DATA_TYPE"}),BY:JE({text:"BY",type:"RESERVED_KEYWORD"}),SET:JE({text:"SET",type:"RESERVED_CLAUSE"}),STRUCT:JE({text:"STRUCT",type:"RESERVED_DATA_TYPE"}),WINDOW:JE({text:"WINDOW",type:"RESERVED_CLAUSE"}),VALUES:JE({text:"VALUES",type:"RESERVED_CLAUSE"})},FR=E=>E==="RESERVED_DATA_TYPE"||E==="RESERVED_KEYWORD"||E==="RESERVED_FUNCTION_NAME"||E==="RESERVED_PHRASE"||E==="RESERVED_CLAUSE"||E==="RESERVED_SELECT"||E==="RESERVED_SET_OPERATION"||E==="RESERVED_JOIN"||E==="ARRAY_KEYWORD"||E==="CASE"||E==="END"||E==="WHEN"||E==="ELSE"||E==="THEN"||E==="LIMIT"||E==="BETWEEN"||E==="AND"||E==="OR"||E==="XOR",As=E=>E==="AND"||E==="OR"||E==="XOR",ss=["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","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","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","APPROX_COUNT_DISTINCT","APPROX_QUANTILES","APPROX_TOP_COUNT","APPROX_TOP_SUM","ARRAY_CONCAT","ARRAY_LENGTH","ARRAY_TO_STRING","GENERATE_ARRAY","GENERATE_DATE_ARRAY","GENERATE_TIMESTAMP_ARRAY","ARRAY_REVERSE","OFFSET","SAFE_OFFSET","ORDINAL","SAFE_ORDINAL","BIT_COUNT","PARSE_BIGNUMERIC","PARSE_NUMERIC","SAFE_CAST","CURRENT_DATE","EXTRACT","DATE","DATE_ADD","DATE_SUB","DATE_DIFF","DATE_TRUNC","DATE_FROM_UNIX_DATE","FORMAT_DATE","LAST_DAY","PARSE_DATE","UNIX_DATE","CURRENT_DATETIME","DATETIME","EXTRACT","DATETIME_ADD","DATETIME_SUB","DATETIME_DIFF","DATETIME_TRUNC","FORMAT_DATETIME","LAST_DAY","PARSE_DATETIME","ERROR","EXTERNAL_QUERY","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","FARM_FINGERPRINT","MD5","SHA1","SHA256","SHA512","HLL_COUNT.INIT","HLL_COUNT.MERGE","HLL_COUNT.MERGE_PARTIAL","HLL_COUNT.EXTRACT","MAKE_INTERVAL","EXTRACT","JUSTIFY_DAYS","JUSTIFY_HOURS","JUSTIFY_INTERVAL","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","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","FIRST_VALUE","LAST_VALUE","NTH_VALUE","LEAD","LAG","PERCENTILE_CONT","PERCENTILE_DISC","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","RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","NTILE","ROW_NUMBER","SESSION_USER","CORR","COVAR_POP","COVAR_SAMP","STDDEV_POP","STDDEV_SAMP","STDDEV","VAR_POP","VAR_SAMP","VARIANCE","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","CURRENT_TIME","TIME","EXTRACT","TIME_ADD","TIME_SUB","TIME_DIFF","TIME_TRUNC","FORMAT_TIME","PARSE_TIME","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","GENERATE_UUID","COALESCE","IF","IFNULL","NULLIF","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","BIT_COUNT","BOOLEAN","BYTES","CAST","FLOAT","HEX_STRING","INTEGER","STRING","COALESCE","GREATEST","IFNULL","IS_INF","IS_NAN","IS_EXPLICITLY_DEFINED","LEAST","NVL","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","FORMAT_IP","PARSE_IP","FORMAT_PACKED_IP","PARSE_PACKED_IP","JSON_EXTRACT","JSON_EXTRACT_SCALAR","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","REGEXP_MATCH","REGEXP_EXTRACT","REGEXP_REPLACE","CONCAT","INSTR","LEFT","LENGTH","LOWER","LPAD","LTRIM","REPLACE","RIGHT","RPAD","RTRIM","SPLIT","SUBSTR","UPPER","TABLE_DATE_RANGE","TABLE_DATE_RANGE_STRICT","TABLE_QUERY","HOST","DOMAIN","TLD","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","CURRENT_USER","EVERY","FROM_BASE64","HASH","FARM_FINGERPRINT","IF","POSITION","SHA1","SOME","TO_BASE64","BQ.JOBS.CANCEL","BQ.REFRESH_MATERIALIZED_VIEW","OPTIONS","PIVOT","UNPIVOT"],Ss=["ALL","AND","ANY","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","INTO","IS","JOIN","LATERAL","LEFT","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","TABLE","TABLESAMPLE","THEN","TO","TREAT","TRUE","UNBOUNDED","UNION","UNNEST","USING","WHEN","WHERE","WINDOW","WITH","WITHIN","SAFE","LIKE","COPY","CLONE","IN","OUT","INOUT","RETURNS","LANGUAGE","CASCADE","RESTRICT","DETERMINISTIC"],os=["ARRAY","BOOL","BYTES","DATE","DATETIME","GEOGRAPHY","INTERVAL","INT64","INT","SMALLINT","INTEGER","BIGINT","TINYINT","BYTEINT","NUMERIC","DECIMAL","BIGNUMERIC","BIGDECIMAL","FLOAT64","STRING","STRUCT","TIME","TIMEZONE"],Os=v(["SELECT [ALL | DISTINCT] [AS STRUCT | AS VALUE]"]),is=v(["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","CLUSTER BY","FOR SYSTEM_TIME AS OF","WITH CONNECTION","WITH PARTITION COLUMNS","REMOTE WITH CONNECTION"]),Er=v(["CREATE [OR REPLACE] [TEMP|TEMPORARY|SNAPSHOT|EXTERNAL] TABLE [IF NOT EXISTS]"]),xt=v(["CREATE [OR REPLACE] [MATERIALIZED] VIEW [IF NOT EXISTS]","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"]),as=v(["UNION {ALL | DISTINCT}","EXCEPT DISTINCT","INTERSECT DISTINCT"]),Is=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),Ns=v(["TABLESAMPLE SYSTEM","ANY TYPE","ALL COLUMNS","NOT DETERMINISTIC","{ROWS | RANGE} BETWEEN","IS [NOT] DISTINCT FROM"]),ls={name:"bigquery",tokenizerOptions:{reservedSelect:Os,reservedClauses:[...is,...xt,...Er],reservedSetOperations:as,reservedJoins:Is,reservedPhrases:Ns,reservedKeywords:Ss,reservedDataTypes:os,reservedFunctionNames:ss,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:_s},formatOptions:{onelineClauses:[...Er,...xt],tabularOnelineClauses:xt}};function _s(E){return Ls(Cs(E))}function Ls(E){let e=et;return E.map(T=>T.text==="OFFSET"&&e.text==="["?(e=T,AE(eE({},T),{type:"RESERVED_FUNCTION_NAME"})):(e=T,T))}function Cs(E){var e;const T=[];for(let t=0;te=>e.type==="IDENTIFIER"||e.type==="COMMA"?e[E]+" ":e[E];function us(E,e){let T=0;for(let t=e;t"?T--:r.text===">>"&&(T-=2),T===0)return t}return E.length-1}var cs=["ARRAY_AGG","AVG","CORRELATION","COUNT","COUNT_BIG","COVARIANCE","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","STDDEV_SAMP","SUM","VARIANCE","VARIANCE_SAMP","XMLAGG","XMLGROUP","ABS","ABSVAL","ACOS","ADD_DAYS","ADD_HOURS","ADD_MINUTES","ADD_MONTHS","ADD_SECONDS","ADD_YEARS","AGE","ARRAY_DELETE","ARRAY_FIRST","ARRAY_LAST","ARRAY_NEXT","ARRAY_PRIOR","ASCII","ASCII_STR","ASIN","ATAN","ATAN2","ATANH","BITAND","BITANDNOT","BITOR","BITXOR","BITNOT","BPCHAR","BSON_TO_JSON","BTRIM","CARDINALITY","CEILING","CEIL","CHARACTER_LENGTH","CHR","COALESCE","COLLATION_KEY","COLLATION_KEY_BIT","COMPARE_DECFLOAT","CONCAT","COS","COSH","COT","CURSOR_ROWCOUNT","DATAPARTITIONNUM","DATE_PART","DATE_TRUNC","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFWEEK_ISO","DAYOFYEAR","DAYS","DAYS_BETWEEN","DAYS_TO_END_OF_MONTH","DBPARTITIONNUM","DECFLOAT","DECFLOAT_FORMAT","DECODE","DECRYPT_BIN","DECRYPT_CHAR","DEGREES","DEREF","DIFFERENCE","DIGITS","DOUBLE_PRECISION","EMPTY_BLOB","EMPTY_CLOB","EMPTY_DBCLOB","EMPTY_NCLOB","ENCRYPT","EVENT_MON_STATE","EXP","EXTRACT","FIRST_DAY","FLOOR","FROM_UTC_TIMESTAMP","GENERATE_UNIQUE","GETHINT","GREATEST","HASH","HASH4","HASH8","HASHEDVALUE","HEX","HEXTORAW","HOUR","HOURS_BETWEEN","IDENTITY_VAL_LOCAL","IFNULL","INITCAP","INSERT","INSTR","INSTR2","INSTR4","INSTRB","INTNAND","INTNOR","INTNXOR","INTNNOT","ISNULL","JSON_ARRAY","JSON_OBJECT","JSON_QUERY","JSON_TO_BSON","JSON_VALUE","JULIAN_DAY","LAST_DAY","LCASE","LEAST","LEFT","LENGTH","LENGTH2","LENGTH4","LENGTHB","LN","LOCATE","LOCATE_IN_STRING","LOG10","LONG_VARCHAR","LONG_VARGRAPHIC","LOWER","LPAD","LTRIM","MAX","MAX_CARDINALITY","MICROSECOND","MIDNIGHT_SECONDS","MIN","MINUTE","MINUTES_BETWEEN","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","MULTIPLY_ALT","NEXT_DAY","NEXT_MONTH","NEXT_QUARTER","NEXT_WEEK","NEXT_YEAR","NORMALIZE_DECFLOAT","NOW","NULLIF","NVL","NVL2","OCTET_LENGTH","OVERLAY","PARAMETER","POSITION","POSSTR","POW","POWER","QUANTIZE","QUARTER","QUOTE_IDENT","QUOTE_LITERAL","RADIANS","RAISE_ERROR","RAND","RANDOM","RAWTOHEX","REC2XML","REGEXP_COUNT","REGEXP_EXTRACT","REGEXP_INSTR","REGEXP_LIKE","REGEXP_MATCH_COUNT","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","RID","RID_BIT","RIGHT","ROUND","ROUND_TIMESTAMP","RPAD","RTRIM","SECLABEL","SECLABEL_BY_NAME","SECLABEL_TO_CHAR","SECOND","SECONDS_BETWEEN","SIGN","SIN","SINH","SOUNDEX","SPACE","SQRT","STRIP","STRLEFT","STRPOS","STRRIGHT","SUBSTR","SUBSTR2","SUBSTR4","SUBSTRB","SUBSTRING","TABLE_NAME","TABLE_SCHEMA","TAN","TANH","THIS_MONTH","THIS_QUARTER","THIS_WEEK","THIS_YEAR","TIMESTAMP_FORMAT","TIMESTAMP_ISO","TIMESTAMPDIFF","TIMEZONE","TO_CHAR","TO_CLOB","TO_DATE","TO_HEX","TO_MULTI_BYTE","TO_NCHAR","TO_NCLOB","TO_NUMBER","TO_SINGLE_BYTE","TO_TIMESTAMP","TO_UTC_TIMESTAMP","TOTALORDER","TRANSLATE","TRIM","TRIM_ARRAY","TRUNC_TIMESTAMP","TRUNCATE","TRUNC","TYPE_ID","TYPE_NAME","TYPE_SCHEMA","UCASE","UNICODE_STR","UPPER","VALUE","VARCHAR_BIT_FORMAT","VARCHAR_FORMAT","VARCHAR_FORMAT_BIT","VERIFY_GROUP_FOR_USER","VERIFY_ROLE_FOR_USER","VERIFY_TRUSTED_CONTEXT_ROLE_FOR_USER","WEEK","WEEK_ISO","WEEKS_BETWEEN","WIDTH_BUCKET","XMLATTRIBUTES","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLQUERY","XMLROW","XMLSERIALIZE","XMLTEXT","XMLVALIDATE","XMLXSROBJECTID","XSLTRANSFORM","YEAR","YEARS_BETWEEN","YMD_BETWEEN","BASE_TABLE","JSON_TABLE","UNNEST","XMLTABLE","RANK","DENSE_RANK","NTILE","LAG","LEAD","ROW_NUMBER","FIRST_VALUE","LAST_VALUE","NTH_VALUE","RATIO_TO_REPORT","CAST"],fs=["ACTIVATE","ADD","AFTER","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","AND","ANY","AS","ASENSITIVE","ASSOCIATE","ASUTIME","AT","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","BEFORE","BEGIN","BETWEEN","BINARY","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CHECK","CLONE","CLOSE","CLUSTER","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","COUNT","COUNT_BIG","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPT","EXCEPTION","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FENCED","FETCH","FIELDPROC","FILE","FINAL","FIRST1","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GENERAL","GENERATED","GET","GLOBAL","GO","GOTO","GRANT","GRAPHIC","GROUP","HANDLER","HASH","HASHED_VALUE","HAVING","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IMPORT","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INTEGRITY","INTERSECT","INTO","IS","ISNULL","ISOBID","ISOLATION","ITERATE","JAR","JAVA","JOIN","KEEP","KEY","LABEL","LANGUAGE","LAST3","LATERAL","LC_CTYPE","LEAVE","LEFT","LIKE","LIMIT","LINKTYPE","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LOOP","MAINTAINED","MATERIALIZED","MAXVALUE","MICROSECOND","MICROSECONDS","MINUTE","MINUTES","MINVALUE","MODE","MODIFIES","MONTH","MONTHS","NAN","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZED","NOT2","NOTNULL","NULL","NULLS","NUMPARTS","OBID","OF","OFF","OFFSET","OLD","OLD_TABLE","ON","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","OR","ORDER","OUT","OUTER","OVER","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENT","PIECESIZE","PLAN","POSITION","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","RECOVERY","REFERENCES","REFERENCING","REFRESH","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SELECT","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SET","SIGNAL","SIMPLE","SNAN","SOME","SOURCE","SPECIFIC","SQL","SQLID","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STOGROUP","STORES","STYLE","SUBSTRING","SUMMARY","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESPACE","THEN","TO","TRANSACTION","TRIGGER","TRIM","TRUNCATE","TYPE","UNDO","UNION","UNIQUE","UNTIL","UPDATE","USAGE","USER","USING","VALIDPROC","VALUE","VALUES","VARIABLE","VARIANT","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHERE","WHILE","WITH","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],Ps=["ARRAY","BIGINT","BINARY","BLOB","BOOLEAN","CCSID","CHAR","CHARACTER","CLOB","DATE","DATETIME","DBCLOB","DEC","DECIMAL","DOUBLE","DOUBLE PRECISION","FLOAT","FLOAT4","FLOAT8","GRAPHIC","INT","INT2","INT4","INT8","INTEGER","INTERVAL","LONG VARCHAR","LONG VARGRAPHIC","NCHAR","NCHR","NCLOB","NVARCHAR","NUMERIC","SMALLINT","REAL","TIME","TIMESTAMP","VARBINARY","VARCHAR","VARGRAPHIC"],Ds=v(["SELECT [ALL | DISTINCT]"]),ds=v(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY [INPUT SEQUENCE]","LIMIT","OFFSET","FETCH NEXT","FOR UPDATE [OF]","FOR {READ | FETCH} ONLY","FOR {RR | CS | UR | RS} [USE AND KEEP {SHARE | UPDATE | EXCLUSIVE} LOCKS]","WAIT FOR OUTCOME","SKIP LOCKED DATA","INTO","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","INSERT"]),Tr=v(["CREATE [GLOBAL TEMPORARY | EXTERNAL] TABLE [IF NOT EXISTS]"]),$t=v(["CREATE [OR REPLACE] VIEW","UPDATE","WHERE CURRENT OF","WITH {RR | RS | CS | UR}","DELETE FROM","DROP TABLE [IF EXISTS]","ALTER TABLE","ADD [COLUMN]","DROP [COLUMN]","RENAME COLUMN","ALTER [COLUMN]","SET DATA TYPE","SET NOT NULL","DROP {DEFAULT | GENERATED | NOT NULL}","TRUNCATE [TABLE]","ALLOCATE","ALTER AUDIT POLICY","ALTER BUFFERPOOL","ALTER DATABASE PARTITION GROUP","ALTER DATABASE","ALTER EVENT MONITOR","ALTER FUNCTION","ALTER HISTOGRAM TEMPLATE","ALTER INDEX","ALTER MASK","ALTER METHOD","ALTER MODULE","ALTER NICKNAME","ALTER PACKAGE","ALTER PERMISSION","ALTER PROCEDURE","ALTER SCHEMA","ALTER SECURITY LABEL COMPONENT","ALTER SECURITY POLICY","ALTER SEQUENCE","ALTER SERVER","ALTER SERVICE CLASS","ALTER STOGROUP","ALTER TABLESPACE","ALTER THRESHOLD","ALTER TRIGGER","ALTER TRUSTED CONTEXT","ALTER TYPE","ALTER USAGE LIST","ALTER USER MAPPING","ALTER VIEW","ALTER WORK ACTION SET","ALTER WORK CLASS SET","ALTER WORKLOAD","ALTER WRAPPER","ALTER XSROBJECT","ALTER STOGROUP","ALTER TABLESPACE","ALTER TRIGGER","ALTER TRUSTED CONTEXT","ALTER VIEW","ASSOCIATE [RESULT SET] {LOCATOR | LOCATORS}","AUDIT","BEGIN DECLARE SECTION","CALL","CLOSE","COMMENT ON","COMMIT [WORK]","CONNECT","CREATE [OR REPLACE] [PUBLIC] ALIAS","CREATE AUDIT POLICY","CREATE BUFFERPOOL","CREATE DATABASE PARTITION GROUP","CREATE EVENT MONITOR","CREATE [OR REPLACE] FUNCTION","CREATE FUNCTION MAPPING","CREATE HISTOGRAM TEMPLATE","CREATE [UNIQUE] INDEX","CREATE INDEX EXTENSION","CREATE [OR REPLACE] MASK","CREATE [SPECIFIC] METHOD","CREATE [OR REPLACE] MODULE","CREATE [OR REPLACE] NICKNAME","CREATE [OR REPLACE] PERMISSION","CREATE [OR REPLACE] PROCEDURE","CREATE ROLE","CREATE SCHEMA","CREATE SECURITY LABEL [COMPONENT]","CREATE SECURITY POLICY","CREATE [OR REPLACE] SEQUENCE","CREATE SERVICE CLASS","CREATE SERVER","CREATE STOGROUP","CREATE SYNONYM","CREATE [LARGE | REGULAR | {SYSTEM | USER} TEMPORARY] TABLESPACE","CREATE THRESHOLD","CREATE {TRANSFORM | TRANSFORMS} FOR","CREATE [OR REPLACE] TRIGGER","CREATE TRUSTED CONTEXT","CREATE [OR REPLACE] TYPE","CREATE TYPE MAPPING","CREATE USAGE LIST","CREATE USER MAPPING FOR","CREATE [OR REPLACE] VARIABLE","CREATE WORK ACTION SET","CREATE WORK CLASS SET","CREATE WORKLOAD","CREATE WRAPPER","DECLARE","DECLARE GLOBAL TEMPORARY TABLE","DESCRIBE [INPUT | OUTPUT]","DISCONNECT","DROP [PUBLIC] ALIAS","DROP AUDIT POLICY","DROP BUFFERPOOL","DROP DATABASE PARTITION GROUP","DROP EVENT MONITOR","DROP [SPECIFIC] FUNCTION","DROP FUNCTION MAPPING","DROP HISTOGRAM TEMPLATE","DROP INDEX [EXTENSION]","DROP MASK","DROP [SPECIFIC] METHOD","DROP MODULE","DROP NICKNAME","DROP PACKAGE","DROP PERMISSION","DROP [SPECIFIC] PROCEDURE","DROP ROLE","DROP SCHEMA","DROP SECURITY LABEL [COMPONENT]","DROP SECURITY POLICY","DROP SEQUENCE","DROP SERVER","DROP SERVICE CLASS","DROP STOGROUP","DROP TABLE HIERARCHY","DROP {TABLESPACE | TABLESPACES}","DROP {TRANSFORM | TRANSFORMS}","DROP THRESHOLD","DROP TRIGGER","DROP TRUSTED CONTEXT","DROP TYPE [MAPPING]","DROP USAGE LIST","DROP USER MAPPING FOR","DROP VARIABLE","DROP VIEW [HIERARCHY]","DROP WORK {ACTION | CLASS} SET","DROP WORKLOAD","DROP WRAPPER","DROP XSROBJECT","END DECLARE SECTION","EXECUTE [IMMEDIATE]","EXPLAIN {PLAN [SECTION] | ALL}","FETCH [FROM]","FLUSH {BUFFERPOOL | BUFFERPOOLS} ALL","FLUSH EVENT MONITOR","FLUSH FEDERATED CACHE","FLUSH OPTIMIZATION PROFILE CACHE","FLUSH PACKAGE CACHE [DYNAMIC]","FLUSH AUTHENTICATION CACHE [FOR ALL]","FREE LOCATOR","GET DIAGNOSTICS","GOTO","GRANT","INCLUDE","ITERATE","LEAVE","LOCK TABLE","LOOP","OPEN","PIPE","PREPARE","REFRESH TABLE","RELEASE","RELEASE [TO] SAVEPOINT","RENAME [TABLE | INDEX | STOGROUP | TABLESPACE]","REPEAT","RESIGNAL","RETURN","REVOKE","ROLLBACK [WORK] [TO SAVEPOINT]","SAVEPOINT","SET COMPILATION ENVIRONMENT","SET CONNECTION","SET CURRENT","SET ENCRYPTION PASSWORD","SET EVENT MONITOR STATE","SET INTEGRITY","SET PASSTHRU","SET PATH","SET ROLE","SET SCHEMA","SET SERVER OPTION","SET {SESSION AUTHORIZATION | SESSION_USER}","SET USAGE LIST","SIGNAL","TRANSFER OWNERSHIP OF","WHENEVER {NOT FOUND | SQLERROR | SQLWARNING}","WHILE"]),ps=v(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),Ms=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN"]),Us=v(["ON DELETE","ON UPDATE","SET NULL","{ROWS | RANGE} BETWEEN"]),ms={name:"db2",tokenizerOptions:{reservedSelect:Ds,reservedClauses:[...ds,...Tr,...$t],reservedSetOperations:ps,reservedJoins:Ms,reservedPhrases:Us,reservedKeywords:fs,reservedDataTypes:Ps,reservedFunctionNames:cs,extraParens:["[]"],stringTypes:[{quote:"''-qq",prefixes:["G","N","U&"]},{quote:"''-raw",prefixes:["X","BX","GX","UX"],requirePrefix:!0}],identTypes:['""-qq'],identChars:{first:"@#$",rest:"@#$"},paramTypes:{positional:!0,named:[":"]},paramChars:{first:"@#$",rest:"@#$"},operators:["**","%","|","&","^","~","¬=","¬>","¬<","!>","!<","^=","^>","^<","||","->","=>"]},formatOptions:{onelineClauses:[...Tr,...$t],tabularOnelineClauses:$t}},hs=["ARRAY_AGG","AVG","CORR","CORRELATION","COUNT","COUNT_BIG","COVAR_POP","COVARIANCE","COVAR","COVAR_SAMP","COVARIANCE_SAMP","EVERY","GROUPING","JSON_ARRAYAGG","JSON_OBJECTAGG","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","PERCENTILE_DISC","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","SOME","STDDEV_POP","STDDEV","STDDEV_SAMP","SUM","VAR_POP","VARIANCE","VAR","VAR_SAMP","VARIANCE_SAMP","XMLAGG","XMLGROUP","ABS","ABSVAL","ACOS","ADD_DAYS","ADD_HOURS","ADD_MINUTES","ADD_MONTHS","ADD_SECONDS","ADD_YEARS","ANTILOG","ARRAY_MAX_CARDINALITY","ARRAY_TRIM","ASCII","ASIN","ATAN","ATAN2","ATANH","BASE64_DECODE","BASE64_ENCODE","BIT_LENGTH","BITAND","BITANDNOT","BITNOT","BITOR","BITXOR","BSON_TO_JSON","CARDINALITY","CEIL","CEILING","CHAR_LENGTH","CHARACTER_LENGTH","CHR","COALESCE","COMPARE_DECFLOAT","CONCAT","CONTAINS","COS","COSH","COT","CURDATE","CURTIME","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK_ISO","DAYOFWEEK","DAYOFYEAR","DAYS","DBPARTITIONNAME","DBPARTITIONNUM","DECFLOAT_FORMAT","DECFLOAT_SORTKEY","DECRYPT_BINARY","DECRYPT_BIT","DECRYPT_CHAR","DECRYPT_DB","DEGREES","DIFFERENCE","DIGITS","DLCOMMENT","DLLINKTYPE","DLURLCOMPLETE","DLURLPATH","DLURLPATHONLY","DLURLSCHEME","DLURLSERVER","DLVALUE","DOUBLE_PRECISION","DOUBLE","ENCRPYT","ENCRYPT_AES","ENCRYPT_AES256","ENCRYPT_RC2","ENCRYPT_TDES","EXP","EXTRACT","FIRST_DAY","FLOOR","GENERATE_UNIQUE","GET_BLOB_FROM_FILE","GET_CLOB_FROM_FILE","GET_DBCLOB_FROM_FILE","GET_XML_FILE","GETHINT","GREATEST","HASH_MD5","HASH_ROW","HASH_SHA1","HASH_SHA256","HASH_SHA512","HASH_VALUES","HASHED_VALUE","HEX","HEXTORAW","HOUR","HTML_ENTITY_DECODE","HTML_ENTITY_ENCODE","HTTP_DELETE_BLOB","HTTP_DELETE","HTTP_GET_BLOB","HTTP_GET","HTTP_PATCH_BLOB","HTTP_PATCH","HTTP_POST_BLOB","HTTP_POST","HTTP_PUT_BLOB","HTTP_PUT","IDENTITY_VAL_LOCAL","IFNULL","INSERT","INSTR","INTERPRET","ISFALSE","ISNOTFALSE","ISNOTTRUE","ISTRUE","JSON_ARRAY","JSON_OBJECT","JSON_QUERY","JSON_TO_BSON","JSON_UPDATE","JSON_VALUE","JULIAN_DAY","LAND","LAST_DAY","LCASE","LEAST","LEFT","LENGTH","LN","LNOT","LOCATE_IN_STRING","LOCATE","LOG10","LOR","LOWER","LPAD","LTRIM","MAX_CARDINALITY","MAX","MICROSECOND","MIDNIGHT_SECONDS","MIN","MINUTE","MOD","MONTH","MONTHNAME","MONTHS_BETWEEN","MQREAD","MQREADCLOB","MQRECEIVE","MQRECEIVECLOB","MQSEND","MULTIPLY_ALT","NEXT_DAY","NORMALIZE_DECFLOAT","NOW","NULLIF","NVL","OCTET_LENGTH","OVERLAY","PI","POSITION","POSSTR","POW","POWER","QUANTIZE","QUARTER","RADIANS","RAISE_ERROR","RANDOM","RAND","REGEXP_COUNT","REGEXP_INSTR","REGEXP_REPLACE","REGEXP_SUBSTR","REPEAT","REPLACE","RID","RIGHT","ROUND_TIMESTAMP","ROUND","RPAD","RRN","RTRIM","SCORE","SECOND","SIGN","SIN","SINH","SOUNDEX","SPACE","SQRT","STRIP","STRLEFT","STRPOS","STRRIGHT","SUBSTR","SUBSTRING","TABLE_NAME","TABLE_SCHEMA","TAN","TANH","TIMESTAMP_FORMAT","TIMESTAMP_ISO","TIMESTAMPDIFF_BIG","TIMESTAMPDIFF","TO_CHAR","TO_CLOB","TO_DATE","TO_NUMBER","TO_TIMESTAMP","TOTALORDER","TRANSLATE","TRIM_ARRAY","TRIM","TRUNC_TIMESTAMP","TRUNC","TRUNCATE","UCASE","UPPER","URL_DECODE","URL_ENCODE","VALUE","VARBINARY_FORMAT","VARCHAR_BIT_FORMAT","VARCHAR_FORMAT_BINARY","VARCHAR_FORMAT","VERIFY_GROUP_FOR_USER","WEEK_ISO","WEEK","WRAP","XMLATTRIBUTES","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROW","XMLSERIALIZE","XMLTEXT","XMLVALIDATE","XOR","XSLTRANSFORM","YEAR","ZONED","BASE_TABLE","HTTP_DELETE_BLOB_VERBOSE","HTTP_DELETE_VERBOSE","HTTP_GET_BLOB_VERBOSE","HTTP_GET_VERBOSE","HTTP_PATCH_BLOB_VERBOSE","HTTP_PATCH_VERBOSE","HTTP_POST_BLOB_VERBOSE","HTTP_POST_VERBOSE","HTTP_PUT_BLOB_VERBOSE","HTTP_PUT_VERBOSE","JSON_TABLE","MQREADALL","MQREADALLCLOB","MQRECEIVEALL","MQRECEIVEALLCLOB","XMLTABLE","UNPACK","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","RATIO_TO_REPORT","ROW_NUMBER","CAST"],Gs=["ABSENT","ACCORDING","ACCTNG","ACTION","ACTIVATE","ADD","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","AND","ANY","APPEND","APPLNAME","ARRAY","ARRAY_AGG","ARRAY_TRIM","AS","ASC","ASENSITIVE","ASSOCIATE","ATOMIC","ATTACH","ATTRIBUTES","AUTHORIZATION","AUTONOMOUS","BEFORE","BEGIN","BETWEEN","BIND","BSON","BUFFERPOOL","BY","CACHE","CALL","CALLED","CARDINALITY","CASE","CAST","CHECK","CL","CLOSE","CLUSTER","COLLECT","COLLECTION","COLUMN","COMMENT","COMMIT","COMPACT","COMPARISONS","COMPRESS","CONCAT","CONCURRENT","CONDITION","CONNECT","CONNECT_BY_ROOT","CONNECTION","CONSTANT","CONSTRAINT","CONTAINS","CONTENT","CONTINUE","COPY","COUNT","COUNT_BIG","CREATE","CREATEIN","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_PATH","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_USER","CURSOR","CYCLE","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEACTIVATE","DEALLOCATE","DECLARE","DEFAULT","DEFAULTS","DEFER","DEFINE","DEFINITION","DELETE","DELETING","DENSE_RANK","DENSERANK","DESC","DESCRIBE","DESCRIPTOR","DETACH","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DROP","DYNAMIC","EACH","ELSE","ELSEIF","EMPTY","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ENFORCED","ERROR","ESCAPE","EVERY","EXCEPT","EXCEPTION","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTEND","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FINAL","FIRST_VALUE","FOR","FOREIGN","FORMAT","FREE","FREEPAGE","FROM","FULL","FUNCTION","GBPCACHE","GENERAL","GENERATED","GET","GLOBAL","GO","GOTO","GRANT","GROUP","HANDLER","HASH","HASH_ROW","HASHED_VALUE","HAVING","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IGNORE","IMMEDIATE","IMPLICITLY","IN","INCLUDE","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDEXBP","INDICATOR","INF","INFINITY","INHERIT","INLINE","INNER","INOUT","INSENSITIVE","INSERT","INSERTING","INTEGRITY","INTERPRET","INTERSECT","INTO","IS","ISNULL","ISOLATION","ITERATE","JAVA","JOIN","JSON","JSON_ARRAY","JSON_ARRAYAGG","JSON_EXISTS","JSON_OBJECT","JSON_OBJECTAGG","JSON_QUERY","JSON_TABLE","JSON_VALUE","KEEP","KEY","KEYS","LABEL","LAG","LANGUAGE","LAST_VALUE","LATERAL","LEAD","LEAVE","LEFT","LEVEL2","LIKE","LIMIT","LINKTYPE","LISTAGG","LOCAL","LOCALDATE","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCATOR","LOCK","LOCKSIZE","LOG","LOGGED","LOOP","MAINTAINED","MASK","MATCHED","MATERIALIZED","MAXVALUE","MERGE","MICROSECOND","MICROSECONDS","MINPCTUSED","MINUTE","MINUTES","MINVALUE","MIRROR","MIXED","MODE","MODIFIES","MONTH","MONTHS","NAMESPACE","NAN","NATIONAL","NCHAR","NCLOB","NESTED","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZED","NOT","NOTNULL","NTH_VALUE","NTILE","NULL","NULLS","NVARCHAR","OBID","OBJECT","OF","OFF","OFFSET","OLD","OLD_TABLE","OMIT","ON","ONLY","OPEN","OPTIMIZE","OPTION","OR","ORDER","ORDINALITY","ORGANIZE","OUT","OUTER","OVER","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGE","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSING","PASSWORD","PATH","PCTFREE","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","PERIOD","PERMISSION","PIECESIZE","PIPE","PLAN","POSITION","PREPARE","PREVVAL","PRIMARY","PRIOR","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PROGRAMID","QUERY","RANGE","RANK","RATIO_TO_REPORT","RCDFMT","READ","READS","RECOVERY","REFERENCES","REFERENCING","REFRESH","REGEXP_LIKE","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNING","RETURNS","REVOKE","RID","RIGHT","ROLLBACK","ROLLUP","ROUTINE","ROW","ROW_NUMBER","ROWNUMBER","ROWS","RRN","RUN","SAVEPOINT","SBCS","SCALAR","SCHEMA","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURED","SELECT","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SET","SIGNAL","SIMPLE","SKIP","SNAN","SOME","SOURCE","SPECIFIC","SQL","SQLID","SQLIND_DEFAULT","SQLIND_UNASSIGNED","STACKED","START","STARTING","STATEMENT","STATIC","STOGROUP","SUBSTRING","SUMMARY","SYNONYM","SYSTEM_TIME","SYSTEM_USER","TABLE","TABLESPACE","TABLESPACES","TAG","THEN","THREADSAFE","TO","TRANSACTION","TRANSFER","TRIGGER","TRIM","TRIM_ARRAY","TRUE","TRUNCATE","TRY_CAST","TYPE","UNDO","UNION","UNIQUE","UNIT","UNKNOWN","UNNEST","UNTIL","UPDATE","UPDATING","URI","USAGE","USE","USER","USERID","USING","VALUE","VALUES","VARIABLE","VARIANT","VCAT","VERSION","VERSIONING","VIEW","VOLATILE","WAIT","WHEN","WHENEVER","WHERE","WHILE","WITH","WITHIN","WITHOUT","WRAPPED","WRAPPER","WRITE","WRKSTNNAME","XMLAGG","XMLATTRIBUTES","XMLCAST","XMLCOMMENT","XMLCONCAT","XMLDOCUMENT","XMLELEMENT","XMLFOREST","XMLGROUP","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROW","XMLSERIALIZE","XMLTABLE","XMLTEXT","XMLVALIDATE","XSLTRANSFORM","XSROBJECT","YEAR","YEARS","YES","ZONE"],gs=["ARRAY","BIGINT","BINARY","BIT","BLOB","BOOLEAN","CCSID","CHAR","CHARACTER","CLOB","DATA","DATALINK","DATE","DBCLOB","DECFLOAT","DECIMAL","DEC","DOUBLE","DOUBLE PRECISION","FLOAT","GRAPHIC","INT","INTEGER","LONG","NUMERIC","REAL","ROWID","SMALLINT","TIME","TIMESTAMP","VARBINARY","VARCHAR","VARGRAPHIC","XML"],Hs=v(["SELECT [ALL | DISTINCT]"]),bs=v(["WITH [RECURSIVE]","INTO","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER [SIBLINGS] BY [INPUT SEQUENCE]","LIMIT","OFFSET","FETCH {FIRST | NEXT}","FOR UPDATE [OF]","FOR READ ONLY","OPTIMIZE FOR","INSERT INTO","VALUES","SET","MERGE INTO","WHEN [NOT] MATCHED [THEN]","UPDATE SET","DELETE","INSERT","FOR SYSTEM NAME"]),rr=v(["CREATE [OR REPLACE] TABLE"]),Xt=v(["CREATE [OR REPLACE] [RECURSIVE] VIEW","UPDATE","WHERE CURRENT OF","WITH {NC | RR | RS | CS | UR}","DELETE FROM","DROP TABLE","ALTER TABLE","ADD [COLUMN]","ALTER [COLUMN]","DROP [COLUMN]","SET DATA TYPE","SET {GENERATED ALWAYS | GENERATED BY DEFAULT}","SET NOT NULL","SET {NOT HIDDEN | IMPLICITLY HIDDEN}","SET FIELDPROC","DROP {DEFAULT | NOT NULL | GENERATED | IDENTITY | ROW CHANGE TIMESTAMP | FIELDPROC}","TRUNCATE [TABLE]","SET [CURRENT] SCHEMA","SET CURRENT_SCHEMA","ALLOCATE CURSOR","ALLOCATE [SQL] DESCRIPTOR [LOCAL | GLOBAL] SQL","ALTER [SPECIFIC] {FUNCTION | PROCEDURE}","ALTER {MASK | PERMISSION | SEQUENCE | TRIGGER}","ASSOCIATE [RESULT SET] {LOCATOR | LOCATORS}","BEGIN DECLARE SECTION","CALL","CLOSE","COMMENT ON {ALIAS | COLUMN | CONSTRAINT | INDEX | MASK | PACKAGE | PARAMETER | PERMISSION | SEQUENCE | TABLE | TRIGGER | VARIABLE | XSROBJECT}","COMMENT ON [SPECIFIC] {FUNCTION | PROCEDURE | ROUTINE}","COMMENT ON PARAMETER SPECIFIC {FUNCTION | PROCEDURE | ROUTINE}","COMMENT ON [TABLE FUNCTION] RETURN COLUMN","COMMENT ON [TABLE FUNCTION] RETURN COLUMN SPECIFIC [PROCEDURE | ROUTINE]","COMMIT [WORK] [HOLD]","CONNECT [TO | RESET] USER","CREATE [OR REPLACE] {ALIAS | FUNCTION | MASK | PERMISSION | PROCEDURE | SEQUENCE | TRIGGER | VARIABLE}","CREATE [ENCODED VECTOR] INDEX","CREATE UNIQUE [WHERE NOT NULL] INDEX","CREATE SCHEMA","CREATE TYPE","DEALLOCATE [SQL] DESCRIPTOR [LOCAL | GLOBAL]","DECLARE CURSOR","DECLARE GLOBAL TEMPORARY TABLE","DECLARE","DESCRIBE CURSOR","DESCRIBE INPUT","DESCRIBE [OUTPUT]","DESCRIBE {PROCEDURE | ROUTINE}","DESCRIBE TABLE","DISCONNECT ALL [SQL]","DISCONNECT [CURRENT]","DROP {ALIAS | INDEX | MASK | PACKAGE | PERMISSION | SCHEMA | SEQUENCE | TABLE | TYPE | VARIABLE | XSROBJECT} [IF EXISTS]","DROP [SPECIFIC] {FUNCTION | PROCEDURE | ROUTINE} [IF EXISTS]","END DECLARE SECTION","EXECUTE [IMMEDIATE]","FREE LOCATOR","GET [SQL] DESCRIPTOR [LOCAL | GLOBAL]","GET [CURRENT | STACKED] DIAGNOSTICS","GRANT {ALL [PRIVILEGES] | ALTER | EXECUTE} ON {FUNCTION | PROCEDURE | ROUTINE | PACKAGE | SCHEMA | SEQUENCE | TABLE | TYPE | VARIABLE | XSROBJECT}","HOLD LOCATOR","INCLUDE","LABEL ON {ALIAS | COLUMN | CONSTRAINT | INDEX | MASK | PACKAGE | PERMISSION | SEQUENCE | TABLE | TRIGGER | VARIABLE | XSROBJECT}","LABEL ON [SPECIFIC] {FUNCTION | PROCEDURE | ROUTINE}","LOCK TABLE","OPEN","PREPARE","REFRESH TABLE","RELEASE","RELEASE [TO] SAVEPOINT","RENAME [TABLE | INDEX] TO","REVOKE {ALL [PRIVILEGES] | ALTER | EXECUTE} ON {FUNCTION | PROCEDURE | ROUTINE | PACKAGE | SCHEMA | SEQUENCE | TABLE | TYPE | VARIABLE | XSROBJECT}","ROLLBACK [WORK] [HOLD | TO SAVEPOINT]","SAVEPOINT","SET CONNECTION","SET CURRENT {DEBUG MODE | DECFLOAT ROUNDING MODE | DEGREE | IMPLICIT XMLPARSE OPTION | TEMPORAL SYSTEM_TIME}","SET [SQL] DESCRIPTOR [LOCAL | GLOBAL]","SET ENCRYPTION PASSWORD","SET OPTION","SET {[CURRENT [FUNCTION]] PATH | CURRENT_PATH}","SET RESULT SETS [WITH RETURN [TO CALLER | TO CLIENT]]","SET SESSION AUTHORIZATION","SET SESSION_USER","SET TRANSACTION","SIGNAL SQLSTATE [VALUE]","TAG","TRANSFER OWNERSHIP OF","WHENEVER {NOT FOUND | SQLERROR | SQLWARNING}"]),ys=v(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),Bs=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","[LEFT | RIGHT] EXCEPTION JOIN","{INNER | CROSS} JOIN"]),vs=v(["ON DELETE","ON UPDATE","SET NULL","{ROWS | RANGE} BETWEEN"]),Fs={name:"db2i",tokenizerOptions:{reservedSelect:Hs,reservedClauses:[...bs,...rr,...Xt],reservedSetOperations:ys,reservedJoins:Bs,reservedPhrases:vs,reservedKeywords:Gs,reservedDataTypes:gs,reservedFunctionNames:hs,nestedBlockComments:!0,extraParens:["[]"],stringTypes:[{quote:"''-qq",prefixes:["G","N"]},{quote:"''-raw",prefixes:["X","BX","GX","UX"],requirePrefix:!0}],identTypes:['""-qq'],identChars:{first:"@#$",rest:"@#$"},paramTypes:{positional:!0,named:[":"]},paramChars:{first:"@#$",rest:"@#$"},operators:["**","¬=","¬>","¬<","!>","!<","||","=>"]},formatOptions:{onelineClauses:[...rr,...Xt],tabularOnelineClauses:Xt}},Ys=["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_CONTAINS","MAP_KEYS","MAP_VALUES","SIZE","SORT_ARRAY","BINARY","CAST","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","ASSERT_TRUE","COALESCE","IF","ISNOTNULL","ISNULL","NULLIF","NVL","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","MASK","MASK_FIRST_N","MASK_HASH","MASK_LAST_N","MASK_SHOW_FIRST_N","MASK_SHOW_LAST_N","AES_DECRYPT","AES_ENCRYPT","CRC32","CURRENT_DATABASE","CURRENT_USER","HASH","JAVA_METHOD","LOGGED_IN_USER","MD5","REFLECT","SHA","SHA1","SHA2","SURROGATE_KEY","VERSION","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","EXPLODE","INLINE","JSON_TUPLE","PARSE_URL_TUPLE","POSEXPLODE","STACK","LEAD","LAG","FIRST_VALUE","LAST_VALUE","RANK","ROW_NUMBER","DENSE_RANK","CUME_DIST","PERCENT_RANK","NTILE"],Vs=["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","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","ALL","ALTER","AND","AS","AUTHORIZATION","BETWEEN","BOTH","BY","CASE","CAST","COLUMN","CONF","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIMESTAMP","CURSOR","DATABASE","DELETE","DESCRIBE","DISTINCT","DROP","ELSE","END","EXCHANGE","EXISTS","EXTENDED","EXTERNAL","FALSE","FETCH","FOLLOWING","FOR","FROM","FULL","FUNCTION","GRANT","GROUP","GROUPING","HAVING","IF","IMPORT","IN","INNER","INSERT","INTERSECT","INTO","IS","JOIN","LATERAL","LEFT","LESS","LIKE","LOCAL","MACRO","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","TABLE","TABLESAMPLE","THEN","TO","TRANSFORM","TRIGGER","TRUE","TRUNCATE","UNBOUNDED","UNION","UNIQUEJOIN","UPDATE","USER","USING","UTC_TMESTAMP","VALUES","WHEN","WHERE","WINDOW","WITH","COMMIT","ONLY","REGEXP","RLIKE","ROLLBACK","START","CACHE","CONSTRAINT","FOREIGN","PRIMARY","REFERENCES","DAYOFWEEK","EXTRACT","FLOOR","VIEWS","TIME","SYNC","TEXTFILE","SEQUENCEFILE","ORC","CSV","TSV","PARQUET","AVRO","RCFILE","JSONFILE","INPUTFORMAT","OUTPUTFORMAT"],Ws=["ARRAY","BIGINT","BINARY","BOOLEAN","CHAR","DATE","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","INTERVAL","MAP","NUMERIC","PRECISION","SMALLINT","STRUCT","TIMESTAMP","VARCHAR"],ws=v(["SELECT [ALL | DISTINCT]"]),xs=v(["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"]),Rr=v(["CREATE [TEMPORARY] [EXTERNAL] TABLE [IF NOT EXISTS]"]),kt=v(["CREATE [MATERIALIZED] VIEW [IF NOT EXISTS]","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"]),$s=v(["UNION [ALL | DISTINCT]"]),Xs=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","LEFT SEMI JOIN"]),ks=v(["{ROWS | RANGE} BETWEEN"]),Ks={name:"hive",tokenizerOptions:{reservedSelect:ws,reservedClauses:[...xs,...Rr,...kt],reservedSetOperations:$s,reservedJoins:Xs,reservedPhrases:ks,reservedKeywords:Vs,reservedDataTypes:Ws,reservedFunctionNames:Ys,extraParens:["[]"],stringTypes:['""-bs',"''-bs"],identTypes:["``"],variableTypes:[{quote:"{}",prefixes:["$"],requirePrefix:!0}],operators:["%","~","^","|","&","<=>","==","!","||"]},formatOptions:{onelineClauses:[...Rr,...kt],tabularOnelineClauses:kt}};function bt(E){return E.map((e,T)=>{const t=E[T+1]||et;if(vE.SET(e)&&t.text==="(")return AE(eE({},e),{type:"RESERVED_FUNCTION_NAME"});const r=E[T-1]||et;return vE.VALUES(e)&&r.text==="="?AE(eE({},e),{type:"RESERVED_FUNCTION_NAME"}):e})}var Js=["ACCESSIBLE","ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DECLARE","DEFAULT","DELAYED","DELETE","DELETE_DOMAIN_ID","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO_DOMAIN_IDS","DROP","DUAL","EACH","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FOR","FORCE","FOREIGN","FROM","FULLTEXT","GENERAL","GRANT","GROUP","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IGNORE_DOMAIN_IDS","IGNORE_SERVER_IDS","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","INTERSECT","INTERVAL","INTO","IS","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LOOP","LOW_PRIORITY","MASTER_HEARTBEAT_PERIOD","MASTER_SSL_VERIFY_SERVER_CERT","MATCH","MAXVALUE","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NOT","NO_WRITE_TO_BINLOG","NULL","OFFSET","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PAGE_CHECKSUM","PARSE_VCOL_EXPR","PARTITION","POSITION","PRIMARY","PROCEDURE","PURGE","RANGE","READ","READS","READ_WRITE","RECURSIVE","REF_SYSTEM_ID","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESIGNAL","RESTRICT","RETURN","RETURNING","REVOKE","RIGHT","RLIKE","ROW_NUMBER","ROWS","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SLOW","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STRAIGHT_JOIN","TABLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","UNDO","UNION","UNIQUE","UNLOCK","UNSIGNED","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],qs=["BIGINT","BINARY","BIT","BLOB","CHAR BYTE","CHAR","CHARACTER","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","FLOAT","FLOAT4","FLOAT8","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONG","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","REAL","SMALLINT","TEXT","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","VARBINARY","VARCHAR","VARCHARACTER","VARYING","YEAR"],Qs=["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"],Zs=v(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),js=v(["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","ON DUPLICATE KEY UPDATE","SET","RETURNING"]),nr=v(["CREATE [OR REPLACE] [TEMPORARY] TABLE [IF NOT EXISTS]"]),Kt=v(["CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","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"]),zs=v(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]","MINUS [ALL | DISTINCT]"]),eS=v(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),ES=v(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),tS={name:"mariadb",tokenizerOptions:{reservedSelect:Zs,reservedClauses:[...js,...nr,...Kt],reservedSetOperations:zs,reservedJoins:eS,reservedPhrases:ES,supportsXor:!0,reservedKeywords:Js,reservedDataTypes:qs,reservedFunctionNames:Qs,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:bt},formatOptions:{onelineClauses:[...nr,...Kt],tabularOnelineClauses:Kt}},TS=["ACCESSIBLE","ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CUBE","CUME_DIST","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DECLARE","DEFAULT","DELAYED","DELETE","DENSE_RANK","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DROP","DUAL","EACH","ELSE","ELSEIF","EMPTY","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FIRST_VALUE","FOR","FORCE","FOREIGN","FROM","FULLTEXT","FUNCTION","GENERATED","GET","GRANT","GROUP","GROUPING","GROUPS","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","IN","INTERSECT","INTERVAL","INTO","IO_AFTER_GTIDS","IO_BEFORE_GTIDS","IS","ITERATE","JOIN","JSON_TABLE","KEY","KEYS","KILL","LAG","LAST_VALUE","LATERAL","LEAD","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LONG","LOOP","LOW_PRIORITY","MASTER_BIND","MASTER_SSL_VERIFY_SERVER_CERT","MATCH","MAXVALUE","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NOT","NO_WRITE_TO_BINLOG","NTH_VALUE","NTILE","NULL","OF","ON","OPTIMIZE","OPTIMIZER_COSTS","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PARTITION","PERCENT_RANK","PRIMARY","PROCEDURE","PURGE","RANGE","RANK","READ","READS","READ_WRITE","RECURSIVE","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESIGNAL","RESTRICT","RETURN","REVOKE","RIGHT","RLIKE","ROW","ROWS","ROW_NUMBER","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STORED","STRAIGHT_JOIN","SYSTEM","TABLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","UNDO","UNION","UNIQUE","UNLOCK","UNSIGNED","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","VIRTUAL","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],rS=["BIGINT","BINARY","BIT","BLOB","BOOL","BOOLEAN","CHAR","CHARACTER","DATE","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","FLOAT","FLOAT4","FLOAT8","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","REAL","SMALLINT","TEXT","TIME","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","VARBINARY","VARCHAR","VARCHARACTER","VARYING","YEAR"],RS=["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","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"],nS=v(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),AS=v(["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","ON DUPLICATE KEY UPDATE","SET"]),Ar=v(["CREATE [TEMPORARY] TABLE [IF NOT EXISTS]"]),Jt=v(["CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","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"]),sS=v(["UNION [ALL | DISTINCT]"]),SS=v(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),oS=v(["ON {UPDATE | DELETE} [SET NULL]","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),OS={name:"mysql",tokenizerOptions:{reservedSelect:nS,reservedClauses:[...AS,...Ar,...Jt],reservedSetOperations:sS,reservedJoins:SS,reservedPhrases:oS,supportsXor:!0,reservedKeywords:TS,reservedDataTypes:rS,reservedFunctionNames:RS,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:bt},formatOptions:{onelineClauses:[...Ar,...Jt],tabularOnelineClauses:Jt}},iS=["ADD","ALL","ALTER","ANALYZE","AND","ARRAY","AS","ASC","BETWEEN","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEFAULT","DELAYED","DELETE","DESC","DESCRIBE","DISTINCT","DISTINCTROW","DIV","DOUBLE","DROP","DUAL","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FOR","FORCE","FOREIGN","FROM","FULLTEXT","GENERATED","GRANT","GROUP","GROUPS","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","ILIKE","IN","INDEX","INFILE","INNER","INOUT","INSERT","INTERSECT","INTERVAL","INTO","IS","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LONG","LOW_PRIORITY","MATCH","MAXVALUE","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","NATURAL","NOT","NO_WRITE_TO_BINLOG","NULL","OF","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PARTITION","PRIMARY","PROCEDURE","RANGE","READ","RECURSIVE","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESTRICT","REVOKE","RIGHT","RLIKE","ROW","ROWS","SECOND_MICROSECOND","SELECT","SET","SHOW","SPATIAL","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STATS_EXTENDED","STORED","STRAIGHT_JOIN","TABLE","TABLESAMPLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","TiDB_CURRENT_TSO","UNION","UNIQUE","UNLOCK","UNSIGNED","UNTIL","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","VIRTUAL","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],aS=["BIGINT","BINARY","BIT","BLOB","BOOL","BOOLEAN","CHAR","CHARACTER","DATE","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","SMALLINT","TEXT","TIME","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","VARBINARY","VARCHAR","VARCHARACTER","VARYING","YEAR"],IS=["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","ASCII","ASIN","ATAN","ATAN2","AVG","BENCHMARK","BIN","BIN_TO_UUID","BIT_AND","BIT_COUNT","BIT_LENGTH","BIT_OR","BIT_XOR","BITAND","BITNEG","BITOR","BITXOR","CASE","CAST","CEIL","CEILING","CHAR_FUNC","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_RESOURCE_GROUP","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DECODE","DEFAULT_FUNC","DEGREES","DENSE_RANK","DES_DECRYPT","DES_ENCRYPT","DIV","ELT","ENCODE","ENCRYPT","EQ","EXP","EXPORT_SET","EXTRACT","FIELD","FIND_IN_SET","FIRST_VALUE","FLOOR","FORMAT","FORMAT_BYTES","FORMAT_NANO_TIME","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GE","GET_FORMAT","GET_LOCK","GETPARAM","GREATEST","GROUP_CONCAT","GROUPING","GT","HEX","HOUR","IF","IFNULL","ILIKE","INET6_ATON","INET6_NTOA","INET_ATON","INET_NTOA","INSERT_FUNC","INSTR","INTDIV","INTERVAL","IS_FREE_LOCK","IS_IPV4","IS_IPV4_COMPAT","IS_IPV4_MAPPED","IS_IPV6","IS_USED_LOCK","IS_UUID","ISFALSE","ISNULL","ISTRUE","JSON_ARRAY","JSON_ARRAYAGG","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_MEMBEROF","JSON_MERGE","JSON_MERGE_PATCH","JSON_MERGE_PRESERVE","JSON_OBJECT","JSON_OBJECTAGG","JSON_OVERLAPS","JSON_PRETTY","JSON_QUOTE","JSON_REMOVE","JSON_REPLACE","JSON_SEARCH","JSON_SET","JSON_STORAGE_FREE","JSON_STORAGE_SIZE","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","LAG","LAST_DAY","LAST_INSERT_ID","LAST_VALUE","LASTVAL","LCASE","LE","LEAD","LEAST","LEFT","LEFTSHIFT","LENGTH","LIKE","LN","LOAD_FILE","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LT","LTRIM","MAKE_SET","MAKEDATE","MAKETIME","MASTER_POS_WAIT","MAX","MD5","MICROSECOND","MID","MIN","MINUS","MINUTE","MOD","MONTH","MONTHNAME","MUL","NAME_CONST","NE","NEXTVAL","NOT","NOW","NTH_VALUE","NTILE","NULLEQ","OCT","OCTET_LENGTH","OLD_PASSWORD","ORD","PASSWORD_FUNC","PERCENT_RANK","PERIOD_ADD","PERIOD_DIFF","PI","PLUS","POSITION","POW","POWER","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","RIGHTSHIFT","ROUND","ROW_COUNT","ROW_NUMBER","RPAD","RTRIM","SCHEMA","SEC_TO_TIME","SECOND","SESSION_USER","SETVAL","SETVAR","SHA","SHA1","SHA2","SIGN","SIN","SLEEP","SM3","SPACE","SQRT","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","STRCMP","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUBTIME","SUM","SYSDATE","SYSTEM_USER","TAN","TIDB_BOUNDED_STALENESS","TIDB_CURRENT_TSO","TIDB_DECODE_BINARY_PLAN","TIDB_DECODE_KEY","TIDB_DECODE_PLAN","TIDB_DECODE_SQL_DIGESTS","TIDB_ENCODE_SQL_DIGEST","TIDB_IS_DDL_OWNER","TIDB_PARSE_TSO","TIDB_PARSE_TSO_LOGICAL","TIDB_ROW_CHECKSUM","TIDB_SHARD","TIDB_VERSION","TIME","TIME_FORMAT","TIME_TO_SEC","TIMEDIFF","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TO_BASE64","TO_DAYS","TO_SECONDS","TRANSLATE","TRIM","TRUNCATE","UCASE","UNARYMINUS","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UPPER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","UUID_SHORT","UUID_TO_BIN","VALIDATE_PASSWORD_STRENGTH","VAR_POP","VAR_SAMP","VARIANCE","VERSION","VITESS_HASH","WEEK","WEEKDAY","WEEKOFYEAR","WEIGHT_STRING","YEAR","YEARWEEK"],NS=v(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),lS=v(["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","ON DUPLICATE KEY UPDATE","SET"]),sr=v(["CREATE [TEMPORARY] TABLE [IF NOT EXISTS]"]),qt=v(["CREATE [OR REPLACE] [SQL SECURITY DEFINER | SQL SECURITY INVOKER] VIEW [IF NOT EXISTS]","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 INSTANCE","ALTER RESOURCE GROUP","ALTER SEQUENCE","ALTER USER","ALTER VIEW","ANALYZE TABLE","CHECK TABLE","CHECKSUM TABLE","COMMIT","CREATE DATABASE","CREATE INDEX","CREATE RESOURCE GROUP","CREATE ROLE","CREATE SEQUENCE","CREATE USER","DEALLOCATE PREPARE","DESCRIBE","DROP DATABASE","DROP INDEX","DROP RESOURCE GROUP","DROP ROLE","DROP TABLESPACE","DROP USER","DROP VIEW","EXPLAIN","FLUSH","GRANT","IMPORT TABLE","INSTALL COMPONENT","INSTALL PLUGIN","KILL","LOAD DATA","LOCK INSTANCE FOR BACKUP","LOCK TABLES","OPTIMIZE TABLE","PREPARE","RELEASE SAVEPOINT","RENAME TABLE","RENAME USER","REPAIR TABLE","RESET","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 TABLE","SHOW CREATE USER","SHOW CREATE VIEW","SHOW DATABASES","SHOW ENGINE","SHOW ENGINES","SHOW ERRORS","SHOW EVENTS","SHOW GRANTS","SHOW INDEX","SHOW MASTER STATUS","SHOW OPEN TABLES","SHOW PLUGINS","SHOW PRIVILEGES","SHOW PROCESSLIST","SHOW PROFILE","SHOW PROFILES","SHOW STATUS","SHOW TABLE STATUS","SHOW TABLES","SHOW TRIGGERS","SHOW VARIABLES","SHOW WARNINGS","TABLE","UNINSTALL COMPONENT","UNINSTALL PLUGIN","UNLOCK INSTANCE","UNLOCK TABLES","USE"]),_S=v(["UNION [ALL | DISTINCT]"]),LS=v(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),CS=v(["ON {UPDATE | DELETE} [SET NULL]","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),uS={name:"tidb",tokenizerOptions:{reservedSelect:NS,reservedClauses:[...lS,...sr,...qt],reservedSetOperations:_S,reservedJoins:LS,reservedPhrases:CS,supportsXor:!0,reservedKeywords:iS,reservedDataTypes:aS,reservedFunctionNames:IS,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:bt},formatOptions:{onelineClauses:[...sr,...qt],tabularOnelineClauses:qt}},cS=["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"],fS=["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","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","ISOLATION","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"],PS=[],DS=v(["SELECT [ALL | DISTINCT]"]),dS=v(["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"]),Sr=v(["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"]),pS=v(["UNION [ALL]","EXCEPT [ALL]","INTERSECT [ALL]"]),MS=v(["JOIN","{LEFT | RIGHT} [OUTER] JOIN","INNER JOIN"]),US=v(["{ROWS | RANGE | GROUPS} BETWEEN"]),mS={name:"n1ql",tokenizerOptions:{reservedSelect:DS,reservedClauses:[...dS,...Sr],reservedSetOperations:pS,reservedJoins:MS,reservedPhrases:US,supportsXor:!0,reservedKeywords:fS,reservedDataTypes:PS,reservedFunctionNames:cS,stringTypes:['""-bs',"''-bs"],identTypes:["``"],extraParens:["[]","{}"],paramTypes:{positional:!0,numbered:["$"],named:["$"]},lineCommentTypes:["#","--"],operators:["%","==",":","||"]},formatOptions:{onelineClauses:Sr}},hS=["ADD","AGENT","AGGREGATE","ALL","ALTER","AND","ANY","ARROW","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BEGIN","BETWEEN","BLOCK","BODY","BOTH","BOUND","BULK","BY","BYTE","CALL","CALLING","CASCADE","CASE","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOSE","CLUSTER","CLUSTERS","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONVERT","COUNT","CRASH","CREATE","CURRENT","CURSOR","CUSTOMDATUM","DANGLING","DATA","DAY","DECLARE","DEFAULT","DEFINE","DELETE","DESC","DETERMINISTIC","DISTINCT","DROP","DURATION","ELEMENT","ELSE","ELSIF","EMPTY","END","ESCAPE","EXCEPT","EXCEPTION","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTERNAL","FETCH","FINAL","FIXED","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","INTERFACE","INTERSECT","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMIT","LIMITED","LOCAL","LOCK","LOOP","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUS","MINUTE","MOD","MODE","MODIFY","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NEW","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","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","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","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","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","VIEW","VIEWS","VOID","WHEN","WHERE","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],GS=["ARRAY","BFILE_BASE","BINARY","BLOB_BASE","CHAR VARYING","CHAR_BASE","CHAR","CHARACTER VARYING","CHARACTER","CLOB_BASE","DATE_BASE","DATE","DECIMAL","DOUBLE","FLOAT","INT","INTERVAL DAY","INTERVAL YEAR","LONG","NATIONAL CHAR VARYING","NATIONAL CHAR","NATIONAL CHARACTER VARYING","NATIONAL CHARACTER","NCHAR VARYING","NCHAR","NCHAR","NUMBER_BASE","NUMBER","NUMBERIC","NVARCHAR","PRECISION","RAW","TIMESTAMP","UROWID","VARCHAR","VARCHAR2"],gS=["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","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","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","GREATEST","LEAST","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","BFILENAME","EMPTY_BLOB,","EMPTY_CLOB","CARDINALITY","COLLECT","POWERMULTISET","POWERMULTISET_BY_CARDINALITY","SET","SYS_CONNECT_BY_PATH","CLUSTER_ID","CLUSTER_PROBABILITY","CLUSTER_SET","FEATURE_ID","FEATURE_SET","FEATURE_VALUE","PREDICTION","PREDICTION_COST","PREDICTION_DETAILS","PREDICTION_PROBABILITY","PREDICTION_SET","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","DECODE","DUMP","ORA_HASH","VSIZE","COALESCE","LNNVL","NULLIF","NVL","NVL2","SYS_CONTEXT","SYS_GUID","SYS_TYPEID","UID","USER","USERENV","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","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTILE","RATIO_TO_REPORT","ROW_NUMBER","DEREF","MAKE_REF","REF","REFTOHEX","VALUE","CV","ITERATION_NUMBER","PRESENTNNV","PRESENTV","PREVIOUS"],HS=v(["SELECT [ALL | DISTINCT | UNIQUE]"]),bS=v(["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","RETURNING"]),or=v(["CREATE [GLOBAL TEMPORARY | PRIVATE TEMPORARY | SHARDED | DUPLICATED | IMMUTABLE BLOCKCHAIN | BLOCKCHAIN | IMMUTABLE] TABLE"]),Qt=v(["CREATE [OR REPLACE] [NO FORCE | FORCE] [EDITIONING | EDITIONABLE | EDITIONABLE EDITIONING | NONEDITIONABLE] VIEW","CREATE MATERIALIZED VIEW","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"]),yS=v(["UNION [ALL]","EXCEPT","INTERSECT"]),BS=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | OUTER} APPLY"]),vS=v(["ON {UPDATE | DELETE} [SET NULL]","ON COMMIT","{ROWS | RANGE} BETWEEN"]),FS={name:"plsql",tokenizerOptions:{reservedSelect:HS,reservedClauses:[...bS,...or,...Qt],reservedSetOperations:yS,reservedJoins:BS,reservedPhrases:vS,supportsXor:!0,reservedKeywords:hS,reservedDataTypes:GS,reservedFunctionNames:gS,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:YS},formatOptions:{alwaysDenseOperators:["@"],onelineClauses:[...or,...Qt],tabularOnelineClauses:Qt}};function YS(E){let e=et;return E.map(T=>vE.SET(T)&&vE.BY(e)?AE(eE({},T),{type:"RESERVED_KEYWORD"}):(FR(T.type)&&(e=T),T))}var VS=["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","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","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","BIT_COUNT","BIT_LENGTH","GET_BIT","LENGTH","OCTET_LENGTH","OVERLAY","POSITION","SET_BIT","SUBSTRING","REGEXP_MATCH","REGEXP_MATCHES","REGEXP_REPLACE","REGEXP_SPLIT_TO_ARRAY","REGEXP_SPLIT_TO_TABLE","TO_CHAR","TO_DATE","TO_NUMBER","TO_TIMESTAMP","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_FIRST","ENUM_LAST","ENUM_RANGE","AREA","BOUND_BOX","BOX","CENTER","CIRCLE","DIAGONAL","DIAMETER","HEIGHT","ISCLOSED","ISOPEN","LENGTH","LINE","LSEG","NPOINTS","PATH","PCLOSE","POINT","POLYGON","POPEN","RADIUS","SLOPE","WIDTH","ABBREV","BROADCAST","FAMILY","HOST","HOSTMASK","INET_MERGE","INET_SAME_FAMILY","MACADDR8_SET7BIT","MASKLEN","NETMASK","NETWORK","SET_MASKLEN","TRUNC","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","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","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","CURRVAL","LASTVAL","NEXTVAL","SETVAL","COALESCE","GREATEST","LEAST","NULLIF","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","ISEMPTY","LOWER","LOWER_INC","LOWER_INF","MULTIRANGE","RANGE_MERGE","UPPER","UPPER_INC","UPPER_INF","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","CUME_DIST","DENSE_RANK","FIRST_VALUE","LAG","LAST_VALUE","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER","GENERATE_SERIES","GENERATE_SUBSCRIPTS","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","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","SUPPRESS_REDUNDANT_UPDATES_TRIGGER","TSVECTOR_UPDATE_TRIGGER","TSVECTOR_UPDATE_TRIGGER_COLUMN","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","PG_MCV_LIST_ITEMS","CAST"],WS=["ALL","ANALYSE","ANALYZE","AND","ANY","AS","ASC","ASYMMETRIC","AUTHORIZATION","BETWEEN","BINARY","BOTH","CASE","CAST","CHECK","COLLATE","COLLATION","COLUMN","CONCURRENTLY","CONSTRAINT","CREATE","CROSS","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","DAY","DEFAULT","DEFERRABLE","DESC","DISTINCT","DO","ELSE","END","EXCEPT","EXISTS","FALSE","FETCH","FILTER","FOR","FOREIGN","FREEZE","FROM","FULL","GRANT","GROUP","HAVING","HOUR","ILIKE","IN","INITIALLY","INNER","INOUT","INTERSECT","INTO","IS","ISNULL","JOIN","LATERAL","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","MINUTE","MONTH","NATURAL","NOT","NOTNULL","NULL","NULLIF","OFFSET","ON","ONLY","OR","ORDER","OUT","OUTER","OVER","OVERLAPS","PLACING","PRIMARY","REFERENCES","RETURNING","RIGHT","ROW","SECOND","SELECT","SESSION_USER","SIMILAR","SOME","SYMMETRIC","TABLE","TABLESAMPLE","THEN","TO","TRAILING","TRUE","UNION","UNIQUE","USER","USING","VALUES","VARIADIC","VERBOSE","WHEN","WHERE","WINDOW","WITH","WITHIN","WITHOUT","YEAR"],wS=["ARRAY","BIGINT","BIT","BIT VARYING","BOOL","BOOLEAN","CHAR","CHARACTER","CHARACTER VARYING","DECIMAL","DEC","DOUBLE","ENUM","FLOAT","INT","INTEGER","INTERVAL","NCHAR","NUMERIC","PRECISION","REAL","SMALLINT","TEXT","TIME","TIMESTAMP","TIMESTAMPTZ","VARCHAR","XML","ZONE"],xS=v(["SELECT [ALL | DISTINCT]"]),$S=v(["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","DEFAULT VALUES","SET","RETURNING"]),Or=v(["CREATE [GLOBAL | LOCAL] [TEMPORARY | TEMP | UNLOGGED] TABLE [IF NOT EXISTS]"]),Zt=v(["CREATE [OR REPLACE] [TEMP | TEMPORARY] [RECURSIVE] VIEW","CREATE [MATERIALIZED] VIEW [IF NOT EXISTS]","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","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"]),XS=v(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),kS=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),KS=v(["PRIMARY KEY","GENERATED {ALWAYS | BY DEFAULT} AS IDENTITY","ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN","[TIMESTAMP | TIME] {WITH | WITHOUT} TIME ZONE","IS [NOT] DISTINCT FROM"]),JS={name:"postgresql",tokenizerOptions:{reservedSelect:xS,reservedClauses:[...$S,...Or,...Zt],reservedSetOperations:XS,reservedJoins:kS,reservedPhrases:KS,reservedKeywords:WS,reservedDataTypes:wS,reservedFunctionNames:VS,nestedBlockComments:!0,extraParens:["[]"],stringTypes:["$$",{quote:"''-qq",prefixes:["U&"]},{quote:"''-qq-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:[...Or,...Zt],tabularOnelineClauses:Zt}},qS=["ANY_VALUE","APPROXIMATE PERCENTILE_DISC","AVG","COUNT","LISTAGG","MAX","MEDIAN","MIN","PERCENTILE_CONT","STDDEV_SAMP","STDDEV_POP","SUM","VAR_SAMP","VAR_POP","array","array_concat","array_flatten","get_array_length","split_to_array","subarray","BIT_AND","BIT_OR","BOOL_AND","BOOL_OR","COALESCE","DECODE","GREATEST","LEAST","NVL","NVL2","NULLIF","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","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","CHECKSUM","FUNC_SHA1","FNV_HASH","MD5","SHA","SHA1","SHA2","HLL","HLL_CREATE_SKETCH","HLL_CARDINALITY","HLL_COMBINE","IS_VALID_JSON","IS_VALID_JSON_ARRAY","JSON_ARRAY_LENGTH","JSON_EXTRACT_ARRAY_ELEMENT_TEXT","JSON_EXTRACT_PATH_TEXT","JSON_PARSE","JSON_SERIALIZE","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","EXPLAIN_MODEL","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","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","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","CAST","CONVERT","TO_CHAR","TO_DATE","TO_NUMBER","TEXT_TO_INT_ALT","TEXT_TO_NUMERIC_ALT","CHANGE_QUERY_PRIORITY","CHANGE_SESSION_PRIORITY","CHANGE_USER_PRIORITY","CURRENT_SETTING","PG_CANCEL_BACKEND","PG_TERMINATE_BACKEND","REBOOT_CLUSTER","SET_CONFIG","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"],QS=["AES128","AES256","ALL","ALLOWOVERWRITE","ANY","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","ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS","COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE","FORMAT","CSV","DELIMITER","FIXEDWIDTH","SHAPEFILE","AVRO","JSON","PARQUET","ORC","ACCESS_KEY_ID","CREDENTIALS","ENCRYPTED","IAM_ROLE","MASTER_SYMMETRIC_KEY","SECRET_ACCESS_KEY","SESSION_TOKEN","BZIP2","GZIP","LZOP","ZSTD","MANIFEST","READRATIO","REGION","SSH","RAW","AZ64","BYTEDICT","DELTA","DELTA32K","LZO","MOSTLY8","MOSTLY16","MOSTLY32","RUNLENGTH","TEXT255","TEXT32K","CATALOG_ROLE","SECRET_ARN","EXTERNAL","AUTO","EVEN","KEY","PREDICATE","COMPRESSION"],ZS=["ARRAY","BIGINT","BPCHAR","CHAR","CHARACTER VARYING","CHARACTER","DECIMAL","INT","INT2","INT4","INT8","INTEGER","NCHAR","NUMERIC","NVARCHAR","SMALLINT","TEXT","VARBYTE","VARCHAR"],jS=v(["SELECT [ALL | DISTINCT]"]),zS=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT INTO","VALUES","SET"]),ir=v(["CREATE [TEMPORARY | TEMP | LOCAL TEMPORARY | LOCAL TEMP] TABLE [IF NOT EXISTS]"]),jt=v(["CREATE [OR REPLACE | MATERIALIZED] VIEW","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","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"]),eo=v(["UNION [ALL]","EXCEPT","INTERSECT","MINUS"]),Eo=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),to=v(["NULL AS","DATA CATALOG","HIVE METASTORE","{ROWS | RANGE} BETWEEN"]),To={name:"redshift",tokenizerOptions:{reservedSelect:jS,reservedClauses:[...zS,...ir,...jt],reservedSetOperations:eo,reservedJoins:Eo,reservedPhrases:to,reservedKeywords:QS,reservedDataTypes:ZS,reservedFunctionNames:qS,stringTypes:["''-qq"],identTypes:['""-qq'],identChars:{first:"#"},paramTypes:{numbered:["$"]},operators:["^","%","@","|/","||/","&","|","~","<<",">>","||","::"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:[...ir,...jt],tabularOnelineClauses:jt}},ro=["ADD","AFTER","ALL","ALTER","ANALYZE","AND","ANTI","ANY","ARCHIVE","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","INTO","IS","ITEMS","KEYS","LAST","LAST_VALUE","LATERAL","LAZY","LEADING","LEFT","LIKE","LINES","LIST","LOCAL","LOCATION","LOCK","LOCKS","LOGICAL","MACRO","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","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","TYPE","TYPES","UNSIGNED","VARIABLES","YEAR_MONTH"],Ro=["ARRAY","BIGINT","BINARY","BOOLEAN","BYTE","CHAR","DATE","DEC","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","INTERVAL","LONG","MAP","NUMERIC","REAL","SHORT","SMALLINT","STRING","STRUCT","TIMESTAMP_LTZ","TIMESTAMP_NTZ","TIMESTAMP","TINYINT","VARCHAR"],no=["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","CUME_DIST","DENSE_RANK","LAG","LEAD","NTH_VALUE","NTILE","PERCENT_RANK","RANK","ROW_NUMBER","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","ELEMENT_AT","ELEMENT_AT","MAP_CONCAT","MAP_ENTRIES","MAP_FROM_ARRAYS","MAP_FROM_ENTRIES","MAP_KEYS","MAP_VALUES","STR_TO_MAP","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","FROM_JSON","GET_JSON_OBJECT","JSON_ARRAY_LENGTH","JSON_OBJECT_KEYS","JSON_TUPLE","SCHEMA_OF_JSON","TO_JSON","ABS","ACOS","ACOSH","AGGREGATE","ARRAY_SORT","ASCII","ASIN","ASINH","ASSERT_TRUE","ATAN","ATAN2","ATANH","BASE64","BIN","BIT_COUNT","BIT_GET","BIT_LENGTH","BROUND","BTRIM","CARDINALITY","CBRT","CEIL","CEILING","CHAR_LENGTH","CHARACTER_LENGTH","CHR","CONCAT","CONCAT_WS","CONV","COS","COSH","COT","CRC32","CURRENT_CATALOG","CURRENT_DATABASE","CURRENT_USER","DEGREES","ELT","EXP","EXPM1","FACTORIAL","FIND_IN_SET","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","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","SOUNDEX","SPACE","SPARK_PARTITION_ID","SPLIT","SQRT","STACK","SUBSTR","SUBSTRING","SUBSTRING_INDEX","TAN","TANH","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","COALESCE","NULLIF"],Ao=v(["SELECT [ALL | DISTINCT]"]),so=v(["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"]),ar=v(["CREATE [EXTERNAL] TABLE [IF NOT EXISTS]"]),zt=v(["CREATE [OR REPLACE] [GLOBAL TEMPORARY | TEMPORARY] VIEW [IF NOT EXISTS]","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"]),So=v(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),oo=v(["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"]),Oo=v(["ON DELETE","ON UPDATE","CURRENT ROW","{ROWS | RANGE} BETWEEN"]),io={name:"spark",tokenizerOptions:{reservedSelect:Ao,reservedClauses:[...so,...ar,...zt],reservedSetOperations:So,reservedJoins:oo,reservedPhrases:Oo,supportsXor:!0,reservedKeywords:ro,reservedDataTypes:Ro,reservedFunctionNames:no,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:ao},formatOptions:{onelineClauses:[...ar,...zt],tabularOnelineClauses:zt}};function ao(E){return E.map((e,T)=>{const t=E[T-1]||et,r=E[T+1]||et;return vE.WINDOW(e)&&r.type==="OPEN_PAREN"?AE(eE({},e),{type:"RESERVED_FUNCTION_NAME"}):e.text==="ITEMS"&&e.type==="RESERVED_KEYWORD"&&!(t.text==="COLLECTION"&&r.text==="TERMINATED")?AE(eE({},e),{type:"IDENTIFIER",text:e.raw}):e})}var Io=["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","AVG","COUNT","GROUP_CONCAT","MAX","MIN","SUM","TOTAL","DATE","TIME","DATETIME","JULIANDAY","UNIXEPOCH","STRFTIME","row_number","rank","dense_rank","percent_rank","cume_dist","ntile","lag","lead","first_value","last_value","nth_value","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_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"],No=["ABORT","ACTION","ADD","AFTER","ALL","ALTER","AND","ARE","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"],lo=["ANY","ARRAY","BLOB","CHARACTER","DECIMAL","INT","INTEGER","NATIVE CHARACTER","NCHAR","NUMERIC","NVARCHAR","REAL","TEXT","VARCHAR","VARYING CHARACTER"],_o=v(["SELECT [ALL | DISTINCT]"]),Lo=v(["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"]),Ir=v(["CREATE [TEMPORARY | TEMP] TABLE [IF NOT EXISTS]"]),eT=v(["CREATE [TEMPORARY | TEMP] VIEW [IF NOT EXISTS]","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"]),Co=v(["UNION [ALL]","EXCEPT","INTERSECT"]),uo=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),co=v(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE | GROUPS} BETWEEN"]),fo={name:"sqlite",tokenizerOptions:{reservedSelect:_o,reservedClauses:[...Lo,...Ir,...eT],reservedSetOperations:Co,reservedJoins:uo,reservedPhrases:co,reservedKeywords:No,reservedDataTypes:lo,reservedFunctionNames:Io,stringTypes:["''-qq",{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``","[]"],paramTypes:{positional:!0,numbered:["?"],named:[":","@","$"]},operators:["%","~","&","|","<<",">>","==","->","->>","||"]},formatOptions:{onelineClauses:[...Ir,...eT],tabularOnelineClauses:eT}},Po=["GROUPING","RANK","DENSE_RANK","PERCENT_RANK","CUME_DIST","ROW_NUMBER","POSITION","OCCURRENCES_REGEX","POSITION_REGEX","EXTRACT","CHAR_LENGTH","CHARACTER_LENGTH","OCTET_LENGTH","CARDINALITY","ABS","MOD","LN","EXP","POWER","SQRT","FLOOR","CEIL","CEILING","WIDTH_BUCKET","SUBSTRING","SUBSTRING_REGEX","UPPER","LOWER","CONVERT","TRANSLATE","TRANSLATE_REGEX","TRIM","OVERLAY","NORMALIZE","SPECIFICTYPE","CURRENT_DATE","CURRENT_TIME","LOCALTIME","CURRENT_TIMESTAMP","LOCALTIMESTAMP","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","COALESCE","NULLIF","ROUND","SIN","COS","TAN","ASIN","ACOS","ATAN"],Do=["ALL","ALLOCATE","ALTER","ANY","ARE","AS","ASC","ASENSITIVE","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","BEGIN","BETWEEN","BOTH","BY","CALL","CALLED","CASCADED","CAST","CHECK","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","DEALLOCATE","DAY","DECLARE","DEFAULT","DELETE","DEREF","DESC","DESCRIBE","DETERMINISTIC","DISCONNECT","DISTINCT","DROP","DYNAMIC","EACH","ELEMENT","END-EXEC","ESCAPE","EVERY","EXCEPT","EXEC","EXECUTE","EXISTS","EXTERNAL","FALSE","FETCH","FILTER","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","GET","GLOBAL","GRANT","GROUP","HAVING","HOLD","HOUR","IDENTITY","IN","INDICATOR","INNER","INOUT","INSENSITIVE","INSERT","INTERSECT","INTO","IS","LANGUAGE","LARGE","LATERAL","LEADING","LEFT","LIKE","LIKE_REGEX","LOCAL","MATCH","MEMBER","MERGE","METHOD","MINUTE","MODIFIES","MODULE","MONTH","NATURAL","NEW","NO","NONE","NOT","NULL","NULLIF","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","SOME","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","START","STATIC","SUBMULTISET","SYMMETRIC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","THEN","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSLATION","TREAT","TRIGGER","TRUE","UESCAPE","UNION","UNIQUE","UNKNOWN","UNNEST","UPDATE","USER","USING","VALUE","VALUES","WHENEVER","WINDOW","WITHIN","WITHOUT","YEAR"],po=["ARRAY","BIGINT","BINARY LARGE OBJECT","BINARY VARYING","BINARY","BLOB","BOOLEAN","CHAR LARGE OBJECT","CHAR VARYING","CHAR","CHARACTER LARGE OBJECT","CHARACTER VARYING","CHARACTER","CLOB","DATE","DEC","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","INTERVAL","MULTISET","NATIONAL CHAR VARYING","NATIONAL CHAR","NATIONAL CHARACTER LARGE OBJECT","NATIONAL CHARACTER VARYING","NATIONAL CHARACTER","NCHAR LARGE OBJECT","NCHAR VARYING","NCHAR","NCLOB","NUMERIC","SMALLINT","TIME","TIMESTAMP","VARBINARY","VARCHAR"],Mo=v(["SELECT [ALL | DISTINCT]"]),Uo=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET"]),Nr=v(["CREATE [GLOBAL TEMPORARY | LOCAL TEMPORARY] TABLE"]),ET=v(["CREATE [RECURSIVE] VIEW","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"]),mo=v(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),ho=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),Go=v(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),go={name:"sql",tokenizerOptions:{reservedSelect:Mo,reservedClauses:[...Uo,...Nr,...ET],reservedSetOperations:mo,reservedJoins:ho,reservedPhrases:Go,reservedKeywords:Do,reservedDataTypes:po,reservedFunctionNames:Po,stringTypes:[{quote:"''-qq-bs",prefixes:["N","U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq',"``"],paramTypes:{positional:!0},operators:["||"]},formatOptions:{onelineClauses:[...Nr,...ET],tabularOnelineClauses:ET}},Ho=["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","CLASSIFIER","FIRST","LAST","MATCH_NUMBER","NEXT","PERMUTE","PREV"],bo=["ABSENT","ADD","ADMIN","AFTER","ALL","ALTER","ANALYZE","AND","ANY","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"],yo=["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"],Bo=v(["SELECT [ALL | DISTINCT]"]),vo=v(["WITH [RECURSIVE]","FROM","WHERE","GROUP BY [ALL | DISTINCT]","HAVING","WINDOW","PARTITION BY","ORDER BY","LIMIT","OFFSET","FETCH {FIRST | NEXT}","INSERT INTO","VALUES","SET","MATCH_RECOGNIZE","MEASURES","ONE ROW PER MATCH","ALL ROWS PER MATCH","AFTER MATCH","PATTERN","SUBSET","DEFINE"]),lr=v(["CREATE TABLE [IF NOT EXISTS]"]),tT=v(["CREATE [OR REPLACE] [MATERIALIZED] VIEW","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","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"]),Fo=v(["UNION [ALL | DISTINCT]","EXCEPT [ALL | DISTINCT]","INTERSECT [ALL | DISTINCT]"]),Yo=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL [INNER] JOIN","NATURAL {LEFT | RIGHT | FULL} [OUTER] JOIN"]),Vo=v(["{ROWS | RANGE | GROUPS} BETWEEN","IS [NOT] DISTINCT FROM"]),Wo={name:"trino",tokenizerOptions:{reservedSelect:Bo,reservedClauses:[...vo,...lr,...tT],reservedSetOperations:Fo,reservedJoins:Yo,reservedPhrases:Vo,reservedKeywords:bo,reservedDataTypes:yo,reservedFunctionNames:Ho,extraParens:["[]","{}"],stringTypes:[{quote:"''-qq",prefixes:["U&"]},{quote:"''-raw",prefixes:["X"],requirePrefix:!0}],identTypes:['""-qq'],paramTypes:{positional:!0},operators:["%","->","=>",":","||","|","^","$"]},formatOptions:{onelineClauses:[...lr,...tT],tabularOnelineClauses:tT}},wo=["APPROX_COUNT_DISTINCT","AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","STDEV","STDEVP","SUM","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","Collation - COLLATIONPROPERTY","Collation - TERTIARY_WEIGHTS","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","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_ROWS","@@FETCH_STATUS","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","@@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","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","@@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","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","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","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","$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","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACK_SENT","@@PACKET_ERRORS","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","COALESCE","NULLIF"],xo=["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","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","NOCHECK","NONCLUSTERED","NOT","NULL","NULLIF","OF","OFF","OFFSETS","ON","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OUTER","OVER","PERCENT","PIVOT","PLAN","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","VIEW","WAITFOR","WHERE","WHILE","WITH","WITHIN GROUP","WRITETEXT","ABSOLUTE","ACTION","ADA","ALLOCATE","ARE","ASSERTION","AT","AVG","BIT_LENGTH","BOTH","CASCADED","CAST","CATALOG","CHARACTER_LENGTH","CHAR_LENGTH","COLLATION","CONNECT","CONNECTION","CONSTRAINTS","CORRESPONDING","COUNT","DAY","DEFERRABLE","DEFERRED","DESCRIBE","DESCRIPTOR","DIAGNOSTICS","DISCONNECT","DOMAIN","END-EXEC","EXCEPTION","EXTRACT","FALSE","FIRST","FORTRAN","FOUND","GET","GLOBAL","GO","HOUR","IMMEDIATE","INCLUDE","INDICATOR","INITIALLY","INPUT","INSENSITIVE","INTERVAL","ISOLATION","LANGUAGE","LAST","LEADING","LEVEL","LOCAL","LOWER","MATCH","MAX","MIN","MINUTE","MODULE","MONTH","NAMES","NATURAL","NEXT","NO","NONE","OCTET_LENGTH","ONLY","OUTPUT","OVERLAPS","PAD","PARTIAL","PASCAL","POSITION","PREPARE","PRESERVE","PRIOR","PRIVILEGES","RELATIVE","ROWS","SCROLL","SECOND","SECTION","SESSION","SIZE","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","SUBSTRING","SUM","TEMPORARY","TIMEZONE_HOUR","TIMEZONE_MINUTE","TRAILING","TRANSLATE","TRANSLATION","TRIM","TRUE","UNKNOWN","UPPER","USAGE","VALUE","WHENEVER","WORK","WRITE","YEAR","ZONE"],$o=["BINARY","BIT","CHAR","CHAR","CHARACTER","DATE","DATETIME2","DATETIMEOFFSET","DEC","DECIMAL","DOUBLE","FLOAT","INT","INTEGER","NATIONAL","NCHAR","NUMERIC","NVARCHAR","PRECISION","REAL","SMALLINT","TIME","TIMESTAMP","VARBINARY","VARCHAR"],Xo=v(["SELECT [ALL | DISTINCT]"]),ko=v(["WITH","INTO","FROM","WHERE","GROUP BY","HAVING","WINDOW","PARTITION BY","ORDER BY","OFFSET","FETCH {FIRST | NEXT}","FOR {BROWSE | XML | JSON}","OPTION","INSERT [INTO]","VALUES","SET","MERGE [INTO]","WHEN [NOT] MATCHED [BY TARGET | BY SOURCE] [THEN]","UPDATE SET","CREATE [OR ALTER] {PROC | PROCEDURE}"]),_r=v(["CREATE TABLE"]),TT=v(["CREATE [OR ALTER] [MATERIALIZED] VIEW","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"]),Ko=v(["UNION [ALL]","EXCEPT","INTERSECT"]),Jo=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","{CROSS | OUTER} APPLY"]),qo=v(["ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]","{ROWS | RANGE} BETWEEN"]),Qo={name:"transactsql",tokenizerOptions:{reservedSelect:Xo,reservedClauses:[...ko,..._r,...TT],reservedSetOperations:Ko,reservedJoins:Jo,reservedPhrases:qo,reservedKeywords:xo,reservedDataTypes:$o,reservedFunctionNames:wo,nestedBlockComments:!0,stringTypes:[{quote:"''-qq",prefixes:["N"]}],identTypes:['""-qq',"[]"],identChars:{first:"#@",rest:"#@$"},paramTypes:{named:["@"],quoted:["@"]},operators:["%","&","|","^","~","!<","!>","+=","-=","*=","/=","%=","|=","&=","^=","::",":"],propertyAccessOperators:[".."]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:[..._r,...TT],tabularOnelineClauses:TT}},Zo=["ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","_BINARY","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DECLARE","DEFAULT","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DROP","DUAL","EACH","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","EXTRA_JOIN","FALSE","FETCH","FOR","FORCE","FORCE_COMPILED_MODE","FORCE_INTERPRETER_MODE","FOREIGN","FROM","FULL","FULLTEXT","GRANT","GROUP","HAVING","HEARTBEAT_NO_LOGGING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","IN","_INTERNAL_DYNAMIC_TYPECAST","INTERSECT","INTERVAL","INTO","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LOOP","LOW_PRIORITY","MATCH","MAXVALUE","MINUS","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NO_QUERY_REWRITE","NOT","NO_WRITE_TO_BINLOG","NO_QUERY_REWRITE","NULL","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PRIMARY","PROCEDURE","PURGE","RANGE","READ","READS","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESTRICT","RETURN","REVOKE","RIGHT","RIGHT_ANTI_JOIN","RIGHT_SEMI_JOIN","RIGHT_STRAIGHT_JOIN","RLIKE","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SEMI_JOIN","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SPATIAL","SPECIFIC","SQL","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQLEXCEPTION","SQL_NO_CACHE","SQL_NO_LOGGING","SQL_SMALL_RESULT","SQLSTATE","SQLWARNING","STRAIGHT_JOIN","TABLE","TERMINATED","THEN","TO","TRAILING","TRIGGER","TRUE","UNBOUNDED","UNDO","UNION","UNIQUE","UNLOCK","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","_UTF8","VALUES","WHEN","WHERE","WHILE","WINDOW","WITH","WITHIN","WRITE","XOR","YEAR_MONTH","ZEROFILL"],jo=["BIGINT","BINARY","BIT","BLOB","CHAR","CHARACTER","DATETIME","DEC","DECIMAL","DOUBLE PRECISION","DOUBLE","ENUM","FIXED","FLOAT","FLOAT4","FLOAT8","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","LONG","LONGBLOB","LONGTEXT","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","NATIONAL CHAR","NATIONAL VARCHAR","NUMERIC","PRECISION","REAL","SMALLINT","TEXT","TIME","TIMESTAMP","TINYBLOB","TINYINT","TINYTEXT","UNSIGNED","VARBINARY","VARCHAR","VARCHARACTER","YEAR"],zo=["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","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","VALUES","VARIANCE","VAR_POP","VAR_SAMP","VECTOR_SUB","VERSION","WEEK","WEEKDAY","WEEKOFYEAR","YEAR"],eO=v(["SELECT [ALL | DISTINCT | DISTINCTROW]"]),EO=v(["WITH","FROM","WHERE","GROUP BY","HAVING","PARTITION BY","ORDER BY","LIMIT","OFFSET","INSERT [IGNORE] [INTO]","VALUES","REPLACE [INTO]","ON DUPLICATE KEY UPDATE","SET","CREATE [OR REPLACE] [TEMPORARY] PROCEDURE [IF NOT EXISTS]","CREATE [OR REPLACE] [EXTERNAL] FUNCTION"]),Lr=v(["CREATE [ROWSTORE] [REFERENCE | TEMPORARY | GLOBAL TEMPORARY] TABLE [IF NOT EXISTS]"]),rT=v(["CREATE VIEW","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"]),tO=v(["UNION [ALL | DISTINCT]","EXCEPT","INTERSECT","MINUS"]),TO=v(["JOIN","{LEFT | RIGHT | FULL} [OUTER] JOIN","{INNER | CROSS} JOIN","NATURAL {LEFT | RIGHT} [OUTER] JOIN","STRAIGHT_JOIN"]),rO=v(["ON DELETE","ON UPDATE","CHARACTER SET","{ROWS | RANGE} BETWEEN","IDENTIFIED BY"]),RO={name:"singlestoredb",tokenizerOptions:{reservedSelect:eO,reservedClauses:[...EO,...Lr,...rT],reservedSetOperations:tO,reservedJoins:TO,reservedPhrases:rO,reservedKeywords:Zo,reservedDataTypes:jo,reservedFunctionNames:zo,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:bt},formatOptions:{alwaysDenseOperators:["::","::$","::%"],onelineClauses:[...Lr,...rT],tabularOnelineClauses:rT}},nO=["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"],AO=["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","COMMENT"],sO=["NUMBER","DECIMAL","NUMERIC","INT","INTEGER","BIGINT","SMALLINT","TINYINT","BYTEINT","FLOAT","FLOAT4","FLOAT8","DOUBLE","DOUBLE PRECISION","REAL","VARCHAR","CHAR","CHARACTER","STRING","TEXT","BINARY","VARBINARY","BOOLEAN","DATE","DATETIME","TIME","TIMESTAMP","TIMESTAMP_LTZ","TIMESTAMP_NTZ","TIMESTAMP","TIMESTAMP_TZ","VARIANT","OBJECT","ARRAY","GEOGRAPHY","GEOMETRY"],SO=v(["SELECT [ALL | DISTINCT]"]),oO=v(["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","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"]),Cr=v(["CREATE [OR REPLACE] [VOLATILE] TABLE [IF NOT EXISTS]","CREATE [OR REPLACE] [LOCAL | GLOBAL] {TEMP|TEMPORARY} TABLE [IF NOT EXISTS]"]),RT=v(["CREATE [OR REPLACE] [SECURE] [RECURSIVE] VIEW [IF NOT EXISTS]","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"]),OO=v(["UNION [ALL]","MINUS","EXCEPT","INTERSECT"]),iO=v(["[INNER] JOIN","[NATURAL] {LEFT | RIGHT | FULL} [OUTER] JOIN","{CROSS | NATURAL} JOIN"]),aO=v(["{ROWS | RANGE} BETWEEN","ON {UPDATE | DELETE} [SET NULL | SET DEFAULT]"]),IO={name:"snowflake",tokenizerOptions:{reservedSelect:SO,reservedClauses:[...oO,...Cr,...RT],reservedSetOperations:OO,reservedJoins:iO,reservedPhrases:aO,reservedKeywords:AO,reservedDataTypes:sO,reservedFunctionNames:nO,stringTypes:["$$","''-qq-bs"],identTypes:['""-qq'],variableTypes:[{regex:"[$][1-9]\\\\d*"},{regex:"[$][_a-zA-Z][_a-zA-Z0-9$]*"}],extraParens:["[]"],identChars:{rest:"$"},lineCommentTypes:["--","//"],operators:["%","::","||","=>"],propertyAccessOperators:[":"]},formatOptions:{alwaysDenseOperators:["::"],onelineClauses:[...Cr,...RT],tabularOnelineClauses:RT}},St=E=>E[E.length-1],YR=E=>E.sort((e,T)=>T.length-e.length||e.localeCompare(T)),ft=E=>E.replace(/\\s+/gu," "),nT=E=>/\\n/.test(E),LE=E=>E.replace(/[.*+?^${}()|[\\]\\\\]/gu,"\\\\$&"),ur=/\\s+/uy,VE=E=>new RegExp(`(?:${E})`,"uy"),NO=E=>E.split("").map(e=>/ /gu.test(e)?"\\\\s+":`[${e.toUpperCase()}${e.toLowerCase()}]`).join(""),lO=E=>E+"(?:-"+E+")*",_O=({prefixes:E,requirePrefix:e})=>`(?:${E.map(NO).join("|")}${e?"":"|"})`,LO=E=>new RegExp(`(?:${E.map(LE).join("|")}).*?(?=\\r +|\\r| +|$)`,"uy"),cr=(E,e=[])=>{const T=E==="open"?0:1,t=["()",...e].map(r=>r[T]);return VE(t.map(LE).join("|"))},fr=E=>VE(`${YR(E).map(LE).join("|")}`),CO=({rest:E,dashes:e})=>E||e?`(?![${E||""}${e?"-":""}])`:"",hE=(E,e={})=>{if(E.length===0)return/^\\b$/u;const T=CO(e),t=YR(E).map(LE).join("|").replace(/ /gu,"\\\\s+");return new RegExp(`(?:${t})${T}\\\\b`,"iuy")},AT=(E,e)=>{if(!E.length)return;const T=E.map(LE).join("|");return VE(`(?:${T})(?:${e})`)},uO=()=>{const E={"<":">","[":"]","(":")","{":"}"},e="{left}(?:(?!{right}').)*?{right}",T=Object.entries(E).map(([A,s])=>e.replace(/{left}/g,LE(A)).replace(/{right}/g,LE(s))),t=LE(Object.keys(E).join(""));return`[Qq]'(?:${String.raw`(?[^\\s${t}])(?:(?!\\k').)*?\\k`}|${T.join("|")})'`},Pr={"``":"(?:`[^`]*`)+","[]":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''":uO()},VR=E=>typeof E=="string"?Pr[E]:"regex"in E?E.regex:_O(E)+Pr[E.quote],cO=E=>VE(E.map(e=>"regex"in e?e.regex:VR(e)).join("|")),WR=E=>E.map(VR).join("|"),Dr=E=>VE(WR(E)),fO=(E={})=>VE(wR(E)),wR=({first:E,rest:e,dashes:T,allowFirstCharNumber:t}={})=>{const r="\\\\p{Alphabetic}\\\\p{Mark}_",R="\\\\p{Decimal_Number}",A=LE(E??""),s=LE(e??""),o=t?`[${r}${R}${A}][${r}${R}${s}]*`:`[${r}${A}][${r}${R}${s}]*`;return T?lO(o):o};function xR(E,e){const T=E.slice(0,e).split(/\\n/);return{line:T.length,col:T[T.length-1].length+1}}var PO=class{constructor(E,e){this.rules=E,this.dialectName=e,this.input="",this.index=0}tokenize(E){this.input=E,this.index=0;const e=[];let T;for(;this.index0;)if(T=this.matchSection(dr,E))e+=T,t++;else if(T=this.matchSection(dO,E))e+=T,t--;else if(T=this.matchSection(DO,E))e+=T;else return null;return[e]}matchSection(E,e){E.lastIndex=this.lastIndex;const T=E.exec(e);return T&&(this.lastIndex+=T[0].length),T?T[0]:null}},MO=class{constructor(E,e){this.cfg=E,this.dialectName=e,this.rulesBeforeParams=this.buildRulesBeforeParams(E),this.rulesAfterParams=this.buildRulesAfterParams(E)}tokenize(E,e){const T=[...this.rulesBeforeParams,...this.buildParamRules(this.cfg,e),...this.rulesAfterParams],t=new PO(T,this.dialectName).tokenize(E);return this.cfg.postProcess?this.cfg.postProcess(t):t}buildRulesBeforeParams(E){var e,T;return this.validRules([{type:"BLOCK_COMMENT",regex:/(\\/\\* *sql-formatter-disable *\\*\\/[\\s\\S]*?(?:\\/\\* *sql-formatter-enable *\\*\\/|$))/uy},{type:"BLOCK_COMMENT",regex:E.nestedBlockComments?new pO:/(\\/\\*[^]*?\\*\\/)/uy},{type:"LINE_COMMENT",regex:LO((e=E.lineCommentTypes)!=null?e:["--"])},{type:"QUOTED_IDENTIFIER",regex:Dr(E.identTypes)},{type:"NUMBER",regex:/(?:0x[0-9a-fA-F]+|0b[01]+|(?:-\\s*)?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+(?:\\.[0-9]+)?)?)(?![\\w\\p{Alphabetic}])/uy},{type:"RESERVED_PHRASE",regex:hE((T=E.reservedPhrases)!=null?T:[],E.identChars),text:Je},{type:"CASE",regex:/CASE\\b/iuy,text:Je},{type:"END",regex:/END\\b/iuy,text:Je},{type:"BETWEEN",regex:/BETWEEN\\b/iuy,text:Je},{type:"LIMIT",regex:E.reservedClauses.includes("LIMIT")?/LIMIT\\b/iuy:void 0,text:Je},{type:"RESERVED_CLAUSE",regex:hE(E.reservedClauses,E.identChars),text:Je},{type:"RESERVED_SELECT",regex:hE(E.reservedSelect,E.identChars),text:Je},{type:"RESERVED_SET_OPERATION",regex:hE(E.reservedSetOperations,E.identChars),text:Je},{type:"WHEN",regex:/WHEN\\b/iuy,text:Je},{type:"ELSE",regex:/ELSE\\b/iuy,text:Je},{type:"THEN",regex:/THEN\\b/iuy,text:Je},{type:"RESERVED_JOIN",regex:hE(E.reservedJoins,E.identChars),text:Je},{type:"AND",regex:/AND\\b/iuy,text:Je},{type:"OR",regex:/OR\\b/iuy,text:Je},{type:"XOR",regex:E.supportsXor?/XOR\\b/iuy:void 0,text:Je},{type:"RESERVED_FUNCTION_NAME",regex:hE(E.reservedFunctionNames,E.identChars),text:Je},{type:"RESERVED_DATA_TYPE",regex:hE(E.reservedDataTypes,E.identChars),text:Je},{type:"RESERVED_KEYWORD",regex:hE(E.reservedKeywords,E.identChars),text:Je}])}buildRulesAfterParams(E){var e,T;return this.validRules([{type:"VARIABLE",regex:E.variableTypes?cO(E.variableTypes):void 0},{type:"STRING",regex:Dr(E.stringTypes)},{type:"IDENTIFIER",regex:fO(E.identChars)},{type:"DELIMITER",regex:/[;]/uy},{type:"COMMA",regex:/[,]/y},{type:"OPEN_PAREN",regex:cr("open",E.extraParens)},{type:"CLOSE_PAREN",regex:cr("close",E.extraParens)},{type:"OPERATOR",regex:fr(["+","-","/",">","<","=","<>","<=",">=","!=",...(e=E.operators)!=null?e:[]])},{type:"ASTERISK",regex:/[*]/uy},{type:"PROPERTY_ACCESS_OPERATOR",regex:fr([".",...(T=E.propertyAccessOperators)!=null?T:[]])}])}buildParamRules(E,e){var T,t,r,R,A;const s={named:(e==null?void 0:e.named)||((T=E.paramTypes)==null?void 0:T.named)||[],quoted:(e==null?void 0:e.quoted)||((t=E.paramTypes)==null?void 0:t.quoted)||[],numbered:(e==null?void 0:e.numbered)||((r=E.paramTypes)==null?void 0:r.numbered)||[],positional:typeof(e==null?void 0:e.positional)=="boolean"?e.positional:(R=E.paramTypes)==null?void 0:R.positional,custom:(e==null?void 0:e.custom)||((A=E.paramTypes)==null?void 0:A.custom)||[]};return this.validRules([{type:"NAMED_PARAMETER",regex:AT(s.named,wR(E.paramChars||E.identChars)),key:o=>o.slice(1)},{type:"QUOTED_PARAMETER",regex:AT(s.quoted,WR(E.identTypes)),key:o=>(({tokenKey:n,quoteChar:S})=>n.replace(new RegExp(LE("\\\\"+S),"gu"),S))({tokenKey:o.slice(2,-1),quoteChar:o.slice(-1)})},{type:"NUMBERED_PARAMETER",regex:AT(s.numbered,"[0-9]+"),key:o=>o.slice(1)},{type:"POSITIONAL_PARAMETER",regex:s.positional?/[?]/y:void 0},...s.custom.map(o=>{var n;return{type:"CUSTOM_PARAMETER",regex:VE(o.regex),key:(n=o.key)!=null?n:S=>S}})])}validRules(E){return E.filter(e=>!!e.regex)}},Je=E=>ft(E.toUpperCase()),pr=new Map,UO=E=>{let e=pr.get(E);return e||(e=mO(E),pr.set(E,e)),e},mO=E=>({tokenizer:new MO(E.tokenizerOptions,E.name),formatOptions:hO(E.formatOptions)}),hO=E=>{var e;return{alwaysDenseOperators:E.alwaysDenseOperators||[],onelineClauses:Object.fromEntries(E.onelineClauses.map(T=>[T,!0])),tabularOnelineClauses:Object.fromEntries(((e=E.tabularOnelineClauses)!=null?e:E.onelineClauses).map(T=>[T,!0]))}};function GO(E){return E.indentStyle==="tabularLeft"||E.indentStyle==="tabularRight"?" ".repeat(10):E.useTabs?" ":" ".repeat(E.tabWidth)}function qE(E){return E.indentStyle==="tabularLeft"||E.indentStyle==="tabularRight"}var gO=class{constructor(E){this.params=E,this.index=0}get({key:E,text:e}){return this.params?E?this.params[E]:this.params[this.index++]:e}getPositionalParameterIndex(){return this.index}setPositionalParameterIndex(E){this.index=E}};function HO(E){return E.map(bO).map(yO).map(BO).map(vO).map(FO)}var bO=(E,e,T)=>{if(FR(E.type)){const t=YO(T,e);if(t&&t.type==="PROPERTY_ACCESS_OPERATOR")return AE(eE({},E),{type:"IDENTIFIER",text:E.raw})}return E},yO=(E,e,T)=>{if(E.type==="RESERVED_FUNCTION_NAME"){const t=it(T,e);if(!t||!$R(t))return AE(eE({},E),{type:"RESERVED_KEYWORD"})}return E},BO=(E,e,T)=>{if(E.type==="RESERVED_DATA_TYPE"){const t=it(T,e);if(t&&$R(t))return AE(eE({},E),{type:"RESERVED_PARAMETERIZED_DATA_TYPE"})}return E},vO=(E,e,T)=>{if(E.type==="IDENTIFIER"){const t=it(T,e);if(t&&XR(t))return AE(eE({},E),{type:"ARRAY_IDENTIFIER"})}return E},FO=(E,e,T)=>{if(E.type==="RESERVED_DATA_TYPE"){const t=it(T,e);if(t&&XR(t))return AE(eE({},E),{type:"ARRAY_KEYWORD"})}return E},YO=(E,e)=>it(E,e,-1),it=(E,e,T=1)=>{let t=1;for(;E[e+t*T]&&VO(E[e+t*T]);)t++;return E[e+t*T]},$R=E=>E.type==="OPEN_PAREN"&&E.text==="(",XR=E=>E.type==="OPEN_PAREN"&&E.text==="[",VO=E=>E.type==="BLOCK_COMMENT"||E.type==="LINE_COMMENT",kR=class{constructor(E){this.tokenize=E,this.index=0,this.tokens=[],this.input=""}reset(E,e){this.input=E,this.index=0,this.tokens=this.tokenize(E)}next(){return this.tokens[this.index++]}save(){}formatError(E){const{line:e,col:T}=xR(this.input,E.start);return`Parse error at token: ${E.text} at line ${e} column ${T}`}has(E){return E in BR}};function sT(E){return E[0]}var Te=new kR(E=>[]),yE=([[E]])=>E,qe=E=>({type:"keyword",tokenType:E.type,text:E.text,raw:E.raw}),Mr=E=>({type:"data_type",text:E.text,raw:E.raw}),Qe=(E,{leading:e,trailing:T})=>(e!=null&&e.length&&(E=AE(eE({},E),{leadingComments:e})),T!=null&&T.length&&(E=AE(eE({},E),{trailingComments:T})),E),WO=(E,{leading:e,trailing:T})=>{if(e!=null&&e.length){const[t,...r]=E;E=[Qe(t,{leading:e}),...r]}if(T!=null&&T.length){const t=E.slice(0,-1),r=E[E.length-1];E=[...t,Qe(r,{trailing:T})]}return E},wO={Lexer:Te,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])=>{const e=E[E.length-1];return e&&!e.hasSemicolon?e.children.length>0?E:E.slice(0,-1):E}},{name:"statement$subexpression$1",symbols:[Te.has("DELIMITER")?{type:"DELIMITER"}:DELIMITER]},{name:"statement$subexpression$1",symbols:[Te.has("EOF")?{type:"EOF"}:EOF]},{name:"statement",symbols:["expressions_or_clauses","statement$subexpression$1"],postprocess:([E,[e]])=>({type:"statement",children:E,hasSemicolon:e.type==="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,e])=>[...E,...e]},{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:yE},{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:[Te.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:sT},{name:"limit_clause$ebnf$1",symbols:[],postprocess:()=>null},{name:"limit_clause",symbols:[Te.has("LIMIT")?{type:"LIMIT"}:LIMIT,"_","expression_chain_","limit_clause$ebnf$1"],postprocess:([E,e,T,t])=>{if(t){const[r,R]=t;return{type:"limit_clause",limitKw:Qe(qe(E),{trailing:e}),offset:T,count:R}}else return{type:"limit_clause",limitKw:Qe(qe(E),{trailing:e}),count:T}}},{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:[Te.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT,"select_clause$subexpression$1"],postprocess:([E,[e,T]])=>({type:"clause",nameKw:qe(E),children:[e,...T]})},{name:"select_clause",symbols:[Te.has("RESERVED_SELECT")?{type:"RESERVED_SELECT"}:RESERVED_SELECT],postprocess:([E])=>({type:"clause",nameKw:qe(E),children:[]})},{name:"all_columns_asterisk",symbols:[Te.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK],postprocess:()=>({type:"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:[Te.has("RESERVED_CLAUSE")?{type:"RESERVED_CLAUSE"}:RESERVED_CLAUSE,"other_clause$ebnf$1"],postprocess:([E,e])=>({type:"clause",nameKw:qe(E),children:e})},{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:[Te.has("RESERVED_SET_OPERATION")?{type:"RESERVED_SET_OPERATION"}:RESERVED_SET_OPERATION,"set_operation$ebnf$1"],postprocess:([E,e])=>({type:"set_operation",nameKw:qe(E),children:e})},{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:sT},{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,e])=>[E,...e]},{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,e])=>[E,...e]},{name:"expression_with_comments_",symbols:["expression","_"],postprocess:([E,e])=>Qe(E,{trailing:e})},{name:"_expression_with_comments",symbols:["_","expression"],postprocess:([E,e])=>Qe(e,{leading:E})},{name:"_andless_expression_with_comments",symbols:["_","andless_expression"],postprocess:([E,e])=>Qe(e,{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:yE},{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:["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:yE},{name:"expression$subexpression$1",symbols:["andless_expression"]},{name:"expression$subexpression$1",symbols:["logic_operator"]},{name:"expression",symbols:["expression$subexpression$1"],postprocess:yE},{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:yE},{name:"asteriskless_andless_expression$subexpression$1",symbols:["atomic_expression"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["between_predicate"]},{name:"asteriskless_andless_expression$subexpression$1",symbols:["case_expression"]},{name:"asteriskless_andless_expression",symbols:["asteriskless_andless_expression$subexpression$1"],postprocess:yE},{name:"atomic_expression$subexpression$1",symbols:["array_subscript"]},{name:"atomic_expression$subexpression$1",symbols:["function_call"]},{name:"atomic_expression$subexpression$1",symbols:["property_access"]},{name:"atomic_expression$subexpression$1",symbols:["parenthesis"]},{name:"atomic_expression$subexpression$1",symbols:["curly_braces"]},{name:"atomic_expression$subexpression$1",symbols:["square_brackets"]},{name:"atomic_expression$subexpression$1",symbols:["operator"]},{name:"atomic_expression$subexpression$1",symbols:["identifier"]},{name:"atomic_expression$subexpression$1",symbols:["parameter"]},{name:"atomic_expression$subexpression$1",symbols:["literal"]},{name:"atomic_expression$subexpression$1",symbols:["data_type"]},{name:"atomic_expression$subexpression$1",symbols:["keyword"]},{name:"atomic_expression",symbols:["atomic_expression$subexpression$1"],postprocess:yE},{name:"array_subscript",symbols:[Te.has("ARRAY_IDENTIFIER")?{type:"ARRAY_IDENTIFIER"}:ARRAY_IDENTIFIER,"_","square_brackets"],postprocess:([E,e,T])=>({type:"array_subscript",array:Qe({type:"identifier",quoted:!1,text:E.text},{trailing:e}),parenthesis:T})},{name:"array_subscript",symbols:[Te.has("ARRAY_KEYWORD")?{type:"ARRAY_KEYWORD"}:ARRAY_KEYWORD,"_","square_brackets"],postprocess:([E,e,T])=>({type:"array_subscript",array:Qe(qe(E),{trailing:e}),parenthesis:T})},{name:"function_call",symbols:[Te.has("RESERVED_FUNCTION_NAME")?{type:"RESERVED_FUNCTION_NAME"}:RESERVED_FUNCTION_NAME,"_","parenthesis"],postprocess:([E,e,T])=>({type:"function_call",nameKw:Qe(qe(E),{trailing:e}),parenthesis:T})},{name:"parenthesis",symbols:[{literal:"("},"expressions_or_clauses",{literal:")"}],postprocess:([E,e,T])=>({type:"parenthesis",children:e,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,e,T])=>({type:"parenthesis",children:e,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,e,T])=>({type:"parenthesis",children:e,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$subexpression$1",symbols:["parameter"]},{name:"property_access",symbols:["atomic_expression","_",Te.has("PROPERTY_ACCESS_OPERATOR")?{type:"PROPERTY_ACCESS_OPERATOR"}:PROPERTY_ACCESS_OPERATOR,"_","property_access$subexpression$1"],postprocess:([E,e,T,t,[r]])=>({type:"property_access",object:Qe(E,{trailing:e}),operator:T.text,property:Qe(r,{leading:t})})},{name:"between_predicate",symbols:[Te.has("BETWEEN")?{type:"BETWEEN"}:BETWEEN,"_","andless_expression_chain","_",Te.has("AND")?{type:"AND"}:AND,"_","andless_expression"],postprocess:([E,e,T,t,r,R,A])=>({type:"between_predicate",betweenKw:qe(E),expr1:WO(T,{leading:e,trailing:t}),andKw:qe(r),expr2:[Qe(A,{leading:R})]})},{name:"case_expression$ebnf$1",symbols:["expression_chain_"],postprocess:sT},{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:[Te.has("CASE")?{type:"CASE"}:CASE,"_","case_expression$ebnf$1","case_expression$ebnf$2",Te.has("END")?{type:"END"}:END],postprocess:([E,e,T,t,r])=>({type:"case_expression",caseKw:Qe(qe(E),{trailing:e}),endKw:qe(r),expr:T||[],clauses:t})},{name:"case_clause",symbols:[Te.has("WHEN")?{type:"WHEN"}:WHEN,"_","expression_chain_",Te.has("THEN")?{type:"THEN"}:THEN,"_","expression_chain_"],postprocess:([E,e,T,t,r,R])=>({type:"case_when",whenKw:Qe(qe(E),{trailing:e}),thenKw:Qe(qe(t),{trailing:r}),condition:T,result:R})},{name:"case_clause",symbols:[Te.has("ELSE")?{type:"ELSE"}:ELSE,"_","expression_chain_"],postprocess:([E,e,T])=>({type:"case_else",elseKw:Qe(qe(E),{trailing:e}),result:T})},{name:"comma$subexpression$1",symbols:[Te.has("COMMA")?{type:"COMMA"}:COMMA]},{name:"comma",symbols:["comma$subexpression$1"],postprocess:([[E]])=>({type:"comma"})},{name:"asterisk$subexpression$1",symbols:[Te.has("ASTERISK")?{type:"ASTERISK"}:ASTERISK]},{name:"asterisk",symbols:["asterisk$subexpression$1"],postprocess:([[E]])=>({type:"operator",text:E.text})},{name:"operator$subexpression$1",symbols:[Te.has("OPERATOR")?{type:"OPERATOR"}:OPERATOR]},{name:"operator",symbols:["operator$subexpression$1"],postprocess:([[E]])=>({type:"operator",text:E.text})},{name:"identifier$subexpression$1",symbols:[Te.has("IDENTIFIER")?{type:"IDENTIFIER"}:IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[Te.has("QUOTED_IDENTIFIER")?{type:"QUOTED_IDENTIFIER"}:QUOTED_IDENTIFIER]},{name:"identifier$subexpression$1",symbols:[Te.has("VARIABLE")?{type:"VARIABLE"}:VARIABLE]},{name:"identifier",symbols:["identifier$subexpression$1"],postprocess:([[E]])=>({type:"identifier",quoted:E.type!=="IDENTIFIER",text:E.text})},{name:"parameter$subexpression$1",symbols:[Te.has("NAMED_PARAMETER")?{type:"NAMED_PARAMETER"}:NAMED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Te.has("QUOTED_PARAMETER")?{type:"QUOTED_PARAMETER"}:QUOTED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Te.has("NUMBERED_PARAMETER")?{type:"NUMBERED_PARAMETER"}:NUMBERED_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Te.has("POSITIONAL_PARAMETER")?{type:"POSITIONAL_PARAMETER"}:POSITIONAL_PARAMETER]},{name:"parameter$subexpression$1",symbols:[Te.has("CUSTOM_PARAMETER")?{type:"CUSTOM_PARAMETER"}:CUSTOM_PARAMETER]},{name:"parameter",symbols:["parameter$subexpression$1"],postprocess:([[E]])=>({type:"parameter",key:E.key,text:E.text})},{name:"literal$subexpression$1",symbols:[Te.has("NUMBER")?{type:"NUMBER"}:NUMBER]},{name:"literal$subexpression$1",symbols:[Te.has("STRING")?{type:"STRING"}:STRING]},{name:"literal",symbols:["literal$subexpression$1"],postprocess:([[E]])=>({type:"literal",text:E.text})},{name:"keyword$subexpression$1",symbols:[Te.has("RESERVED_KEYWORD")?{type:"RESERVED_KEYWORD"}:RESERVED_KEYWORD]},{name:"keyword$subexpression$1",symbols:[Te.has("RESERVED_PHRASE")?{type:"RESERVED_PHRASE"}:RESERVED_PHRASE]},{name:"keyword$subexpression$1",symbols:[Te.has("RESERVED_JOIN")?{type:"RESERVED_JOIN"}:RESERVED_JOIN]},{name:"keyword",symbols:["keyword$subexpression$1"],postprocess:([[E]])=>qe(E)},{name:"data_type$subexpression$1",symbols:[Te.has("RESERVED_DATA_TYPE")?{type:"RESERVED_DATA_TYPE"}:RESERVED_DATA_TYPE]},{name:"data_type",symbols:["data_type$subexpression$1"],postprocess:([[E]])=>Mr(E)},{name:"data_type",symbols:[Te.has("RESERVED_PARAMETERIZED_DATA_TYPE")?{type:"RESERVED_PARAMETERIZED_DATA_TYPE"}:RESERVED_PARAMETERIZED_DATA_TYPE,"_","parenthesis"],postprocess:([E,e,T])=>({type:"parameterized_data_type",dataType:Qe(Mr(E),{trailing:e}),parenthesis:T})},{name:"logic_operator$subexpression$1",symbols:[Te.has("AND")?{type:"AND"}:AND]},{name:"logic_operator$subexpression$1",symbols:[Te.has("OR")?{type:"OR"}:OR]},{name:"logic_operator$subexpression$1",symbols:[Te.has("XOR")?{type:"XOR"}:XOR]},{name:"logic_operator",symbols:["logic_operator$subexpression$1"],postprocess:([[E]])=>qe(E)},{name:"other_keyword$subexpression$1",symbols:[Te.has("WHEN")?{type:"WHEN"}:WHEN]},{name:"other_keyword$subexpression$1",symbols:[Te.has("THEN")?{type:"THEN"}:THEN]},{name:"other_keyword$subexpression$1",symbols:[Te.has("ELSE")?{type:"ELSE"}:ELSE]},{name:"other_keyword$subexpression$1",symbols:[Te.has("END")?{type:"END"}:END]},{name:"other_keyword",symbols:["other_keyword$subexpression$1"],postprocess:([[E]])=>qe(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:[Te.has("LINE_COMMENT")?{type:"LINE_COMMENT"}:LINE_COMMENT],postprocess:([E])=>({type:"line_comment",text:E.text,precedingWhitespace:E.precedingWhitespace})},{name:"comment",symbols:[Te.has("BLOCK_COMMENT")?{type:"BLOCK_COMMENT"}:BLOCK_COMMENT],postprocess:([E])=>({type:"block_comment",text:E.text,precedingWhitespace:E.precedingWhitespace})},{name:"comment",symbols:[Te.has("DISABLE_COMMENT")?{type:"DISABLE_COMMENT"}:DISABLE_COMMENT],postprocess:([E])=>({type:"disable_comment",text:E.text,precedingWhitespace:E.precedingWhitespace})}],ParserStart:"main"},xO=wO,{Parser:$O,Grammar:XO}=JA;function kO(E){let e={};const T=new kR(r=>[...HO(E.tokenize(r,e)),vR(r.length)]),t=new $O(XO.fromCompiled(xO),{lexer:T});return{parse:(r,R)=>{e=R;const{results:A}=t.feed(r);if(A.length===1)return A[0];throw A.length===0?new Error("Parse error: Invalid SQL"):new Error(`Parse error: Ambiguous grammar +${JSON.stringify(A,void 0,2)}`)}}}var KR=class{constructor(E){this.indentation=E,this.items=[]}add(...E){for(const e of E)switch(e){case 0:this.items.push(0);break;case 1:this.trimHorizontalWhitespace();break;case 2:this.trimWhitespace();break;case 3:this.trimHorizontalWhitespace(),this.addNewline(3);break;case 4:this.trimHorizontalWhitespace(),this.addNewline(4);break;case 5:this.addIndentation();break;case 6:this.items.push(6);break;default:this.items.push(e)}}trimHorizontalWhitespace(){for(;KO(St(this.items));)this.items.pop()}trimWhitespace(){for(;JO(St(this.items));)this.items.pop()}addNewline(E){if(this.items.length>0)switch(St(this.items)){case 3:this.items.pop(),this.items.push(E);break;case 4:break;default:this.items.push(E);break}}addIndentation(){for(let E=0;Ethis.itemToString(E)).join("")}getLayoutItems(){return this.items}itemToString(E){switch(E){case 0:return" ";case 3:case 4:return` +`;case 6:return this.indentation.getSingleIndent();default:return E}}},KO=E=>E===0||E===6,JO=E=>E===0||E===6||E===3;function Ur(E,e){if(e==="standard")return E;let T=[];return E.length>=10&&E.includes(" ")&&([E,...T]=E.split(" ")),e==="tabularLeft"?E=E.padEnd(9," "):E=E.padStart(9," "),E+["",...T].join(" ")}function mr(E){return As(E)||E==="RESERVED_CLAUSE"||E==="RESERVED_SELECT"||E==="RESERVED_SET_OPERATION"||E==="RESERVED_JOIN"||E==="LIMIT"}var ST="top-level",qO="block-level",JR=class{constructor(E){this.indent=E,this.indentTypes=[]}getSingleIndent(){return this.indent}getLevel(){return this.indentTypes.length}increaseTopLevel(){this.indentTypes.push(ST)}increaseBlockLevel(){this.indentTypes.push(qO)}decreaseTopLevel(){this.indentTypes.length>0&&St(this.indentTypes)===ST&&this.indentTypes.pop()}decreaseBlockLevel(){for(;this.indentTypes.length>0&&this.indentTypes.pop()===ST;);}},QO=class extends KR{constructor(E){super(new JR("")),this.expressionWidth=E,this.length=0,this.trailingSpace=!1}add(...E){if(E.forEach(e=>this.addToLength(e)),this.length>this.expressionWidth)throw new aT;super.add(...E)}addToLength(E){if(typeof E=="string")this.length+=E.length,this.trailingSpace=!1;else{if(E===4||E===3)throw new aT;E===5||E===6||E===0?this.trailingSpace||(this.length++,this.trailingSpace=!0):(E===2||E===1)&&this.trailingSpace&&(this.trailingSpace=!1,this.length--)}}},aT=class extends Error{},ZO=class IT{constructor({cfg:e,dialectCfg:T,params:t,layout:r,inline:R=!1}){this.inline=!1,this.nodes=[],this.index=-1,this.cfg=e,this.dialectCfg=T,this.inline=R,this.params=t,this.layout=r}format(e){for(this.nodes=e,this.index=0;this.index{this.layout.add(this.showFunctionKw(e.nameKw))}),this.formatNode(e.parenthesis)}formatParameterizedDataType(e){this.withComments(e.dataType,()=>{this.layout.add(this.showDataType(e.dataType))}),this.formatNode(e.parenthesis)}formatArraySubscript(e){let T;switch(e.array.type){case"data_type":T=this.showDataType(e.array);break;case"keyword":T=this.showKw(e.array);break;default:T=this.showIdentifier(e.array);break}this.withComments(e.array,()=>{this.layout.add(T)}),this.formatNode(e.parenthesis)}formatPropertyAccess(e){this.formatNode(e.object),this.layout.add(1,e.operator),this.formatNode(e.property)}formatParenthesis(e){const T=this.formatInlineExpression(e.children);T?(this.layout.add(e.openParen),this.layout.add(...T.getLayoutItems()),this.layout.add(1,e.closeParen,0)):(this.layout.add(e.openParen,3),qE(this.cfg)?(this.layout.add(5),this.layout=this.formatSubExpression(e.children)):(this.layout.indentation.increaseBlockLevel(),this.layout.add(5),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseBlockLevel()),this.layout.add(3,5,e.closeParen,0))}formatBetweenPredicate(e){this.layout.add(this.showKw(e.betweenKw),0),this.layout=this.formatSubExpression(e.expr1),this.layout.add(1,0,this.showNonTabularKw(e.andKw),0),this.layout=this.formatSubExpression(e.expr2),this.layout.add(0)}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(3,5),this.formatNode(e.endKw)}formatCaseWhen(e){this.layout.add(3,5),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(3,5),this.formatNode(e.elseKw),this.layout=this.formatSubExpression(e.result)}formatClause(e){this.isOnelineClause(e)?this.formatClauseInOnelineStyle(e):qE(this.cfg)?this.formatClauseInTabularStyle(e):this.formatClauseInIndentedStyle(e)}isOnelineClause(e){return qE(this.cfg)?this.dialectCfg.tabularOnelineClauses[e.nameKw.text]:this.dialectCfg.onelineClauses[e.nameKw.text]}formatClauseInIndentedStyle(e){this.layout.add(3,5,this.showKw(e.nameKw),3),this.layout.indentation.increaseTopLevel(),this.layout.add(5),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseTopLevel()}formatClauseInOnelineStyle(e){this.layout.add(3,5,this.showKw(e.nameKw),0),this.layout=this.formatSubExpression(e.children)}formatClauseInTabularStyle(e){this.layout.add(3,5,this.showKw(e.nameKw),0),this.layout.indentation.increaseTopLevel(),this.layout=this.formatSubExpression(e.children),this.layout.indentation.decreaseTopLevel()}formatSetOperation(e){this.layout.add(3,5,this.showKw(e.nameKw),3),this.layout.add(5),this.layout=this.formatSubExpression(e.children)}formatLimitClause(e){this.withComments(e.limitKw,()=>{this.layout.add(3,5,this.showKw(e.limitKw))}),this.layout.indentation.increaseTopLevel(),qE(this.cfg)?this.layout.add(0):this.layout.add(3,5),e.offset?(this.layout=this.formatSubExpression(e.offset),this.layout.add(1,",",0),this.layout=this.formatSubExpression(e.count)):this.layout=this.formatSubExpression(e.count),this.layout.indentation.decreaseTopLevel()}formatAllColumnsAsterisk(e){this.layout.add("*",0)}formatLiteral(e){this.layout.add(e.text,0)}formatIdentifier(e){this.layout.add(this.showIdentifier(e),0)}formatParameter(e){this.layout.add(this.params.get(e),0)}formatOperator({text:e}){this.cfg.denseOperators||this.dialectCfg.alwaysDenseOperators.includes(e)?this.layout.add(1,e):e===":"?this.layout.add(1,e,0):this.layout.add(e,0)}formatComma(e){this.inline?this.layout.add(1,",",0):this.layout.add(1,",",3,5)}withComments(e,T){this.formatComments(e.leadingComments),T(),this.formatComments(e.trailingComments)}formatComments(e){e&&e.forEach(T=>{T.type==="line_comment"?this.formatLineComment(T):this.formatBlockComment(T)})}formatLineComment(e){nT(e.precedingWhitespace||"")?this.layout.add(3,5,e.text,4,5):this.layout.getLayoutItems().length>0?this.layout.add(2,0,e.text,4,5):this.layout.add(e.text,4,5)}formatBlockComment(e){e.type==="block_comment"&&this.isMultilineBlockComment(e)?(this.splitBlockComment(e.text).forEach(T=>{this.layout.add(3,5,T)}),this.layout.add(3,5)):this.layout.add(e.text,0)}isMultilineBlockComment(e){return nT(e.text)||nT(e.precedingWhitespace||"")}isDocComment(e){const T=e.split(/\\n/);return/^\\/\\*\\*?$/.test(T[0])&&T.slice(1,T.length-1).every(t=>/^\\s*\\*/.test(t))&&/^\\s*\\*\\/$/.test(St(T))}splitBlockComment(e){return this.isDocComment(e)?e.split(/\\n/).map(T=>/^\\s*\\*/.test(T)?" "+T.replace(/^\\s*/,""):T):e.split(/\\n/).map(T=>T.replace(/^\\s*/,""))}formatSubExpression(e){return new IT({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:this.layout,inline:this.inline}).format(e)}formatInlineExpression(e){const T=this.params.getPositionalParameterIndex();try{return new IT({cfg:this.cfg,dialectCfg:this.dialectCfg,params:this.params,layout:new QO(this.cfg.expressionWidth),inline:!0}).format(e)}catch(t){if(t instanceof aT){this.params.setPositionalParameterIndex(T);return}else throw t}}formatKeywordNode(e){switch(e.tokenType){case"RESERVED_JOIN":return this.formatJoin(e);case"AND":case"OR":case"XOR":return this.formatLogicalOperator(e);default:return this.formatKeyword(e)}}formatJoin(e){qE(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(3,5,this.showKw(e),0),this.layout.indentation.increaseTopLevel()):this.layout.add(3,5,this.showKw(e),0)}formatKeyword(e){this.layout.add(this.showKw(e),0)}formatLogicalOperator(e){this.cfg.logicalOperatorNewline==="before"?qE(this.cfg)?(this.layout.indentation.decreaseTopLevel(),this.layout.add(3,5,this.showKw(e),0),this.layout.indentation.increaseTopLevel()):this.layout.add(3,5,this.showKw(e),0):this.layout.add(this.showKw(e),3,5)}formatDataType(e){this.layout.add(this.showDataType(e),0)}showKw(e){return mr(e.tokenType)?Ur(this.showNonTabularKw(e),this.cfg.indentStyle):this.showNonTabularKw(e)}showNonTabularKw(e){switch(this.cfg.keywordCase){case"preserve":return ft(e.raw);case"upper":return e.text;case"lower":return e.text.toLowerCase()}}showFunctionKw(e){return mr(e.tokenType)?Ur(this.showNonTabularFunctionKw(e),this.cfg.indentStyle):this.showNonTabularFunctionKw(e)}showNonTabularFunctionKw(e){switch(this.cfg.functionCase){case"preserve":return ft(e.raw);case"upper":return e.text;case"lower":return e.text.toLowerCase()}}showIdentifier(e){if(e.quoted)return e.text;switch(this.cfg.identifierCase){case"preserve":return e.text;case"upper":return e.text.toUpperCase();case"lower":return e.text.toLowerCase()}}showDataType(e){switch(this.cfg.dataTypeCase){case"preserve":return ft(e.raw);case"upper":return e.text;case"lower":return e.text.toLowerCase()}}},jO=class{constructor(E,e){this.dialect=E,this.cfg=e,this.params=new gO(this.cfg.params)}format(E){const e=this.parse(E);return this.formatAst(e).trimEnd()}parse(E){return kO(this.dialect.tokenizer).parse(E,this.cfg.paramTypes||{})}formatAst(E){return E.map(e=>this.formatStatement(e)).join(` +`.repeat(this.cfg.linesBetweenQueries+1))}formatStatement(E){const e=new ZO({cfg:this.cfg,dialectCfg:this.dialect.formatOptions,params:this.params,layout:new KR(new JR(GO(this.cfg)))}).format(E.children);return E.hasSemicolon&&(this.cfg.newlineBeforeSemicolon?e.add(3,";"):e.add(2,";")),e.toString()}},NT=class extends Error{};function zO(E){const e=["multilineLists","newlineBeforeOpenParen","newlineBeforeCloseParen","aliasAs","commaPosition","tabulateAlias"];for(const T of e)if(T in E)throw new NT(`${T} config is no more supported.`);if(E.expressionWidth<=0)throw new NT(`expressionWidth config must be positive number. Received ${E.expressionWidth} instead.`);return E.params&&!ei(E.params)&&console.warn('WARNING: All "params" option values should be strings.'),E}function ei(E){return(E instanceof Array?E:Object.values(E)).every(T=>typeof T=="string")}var qR={bigquery:"bigquery",db2:"db2",db2i:"db2i",hive:"hive",mariadb:"mariadb",mysql:"mysql",n1ql:"n1ql",plsql:"plsql",postgresql:"postgresql",redshift:"redshift",spark:"spark",sqlite:"sqlite",sql:"sql",tidb:"tidb",trino:"trino",transactsql:"transactsql",tsql:"transactsql",singlestoredb:"singlestoredb",snowflake:"snowflake"},Ei=Object.keys(qR),ti={tabWidth:2,useTabs:!1,keywordCase:"preserve",identifierCase:"preserve",dataTypeCase:"preserve",functionCase:"preserve",indentStyle:"standard",logicalOperatorNewline:"before",expressionWidth:50,linesBetweenQueries:1,denseOperators:!1,newlineBeforeSemicolon:!1},hr=(E,e={})=>{if(typeof e.language=="string"&&!Ei.includes(e.language))throw new NT(`Unsupported SQL dialect: ${e.language}`);const T=qR[e.language||"sql"];return Ti(E,AE(eE({},e),{dialect:yR[T]}))},Ti=(E,e)=>{var T=e,{dialect:t}=T,r=ZA(T,["dialect"]);if(typeof E!="string")throw new Error("Invalid query argument. Expected string, instead got "+typeof E);const R=zO(eE(eE({},ti),r));return new jO(UO(t),R).format(E)};function Gr(E,e,T){const t=E.slice();return t[1]=e[T],t}function gr(E,e){let T,t=e[1].name+"",r,R,A,s=e[1].instantiated_value+"",o,n;return{key:E,first:null,c(){T=P("b"),r=Re(t),R=Re(":"),A=x(),o=Re(s),n=P("br"),this.first=T},m(S,O){W(S,T,O),l(T,r),l(T,R),W(S,A,O),W(S,o,O),W(S,n,O)},p(S,O){e=S,O&1&&t!==(t=e[1].name+"")&&Pe(r,t),O&1&&s!==(s=e[1].instantiated_value+"")&&Pe(o,s)},d(S){S&&(Y(T),Y(A),Y(o),Y(n))}}}function ri(E){let e,T,t,r,R,A,s,o=E[0].function_name+"",n,S,O,N=[],u=new Map,D,d,C,_,L,c,H,y=E[0].description+"",h,a,I,f,m=hr(E[0].instantiated_sql)+"",U,g,F,w,K=E[0].sql_template+"",j,pe=ce(E[0].arguments);const se=le=>le[1].name;for(let le=0;le',r=x(),R=P("div"),A=P("h3"),s=Re("Function: "),n=Re(o),S=x(),O=P("p");for(let le=0;le ',_=x(),L=P("div"),c=P("div"),H=P("p"),h=Re(y),a=x(),I=P("div"),f=P("p"),U=Re(m),g=x(),F=P("div"),w=P("p"),j=Re(K),i(t,"class","flex-shrink-0"),i(A,"class","text-gray-800 font-semibold dark:text-white"),i(O,"class","text-sm text-gray-700 dark:text-neutral-400"),i(R,"class","ms-3"),i(T,"class","flex"),i(C,"class","border-b border-gray-200 px-4 dark:border-neutral-700"),i(H,"class","text-gray-500 dark:text-neutral-400"),i(c,"id","basic-tabs-1"),i(c,"role","tabpanel"),i(c,"aria-labelledby","basic-tabs-item-1"),i(f,"class","text-gray-500 dark:text-neutral-400 font-mono text-teal-800"),i(I,"id","basic-tabs-2"),i(I,"class","hidden"),i(I,"role","tabpanel"),i(I,"aria-labelledby","basic-tabs-item-2"),i(w,"class","text-gray-500 dark:text-neutral-400 font-mono"),i(F,"id","basic-tabs-3"),i(F,"class","hidden"),i(F,"role","tabpanel"),i(F,"aria-labelledby","basic-tabs-item-3"),i(L,"class","px-4"),i(d,"class","w-full bg-white rounded-lg shadow-md dark:bg-neutral-800"),i(e,"class","bg-teal-50 border-t-2 border-teal-500 rounded-lg p-4 dark:bg-teal-800/30"),i(e,"role","alert")},m(le,Ue){W(le,e,Ue),l(e,T),l(T,t),l(T,r),l(T,R),l(R,A),l(A,s),l(A,n),l(R,S),l(R,O);for(let ye=0;ye{"functionData"in r&&T(0,t=r.functionData)},[t]}class ni extends Le{constructor(e){super(),_e(this,e,Ri,ri,Ne,{functionData:0})}}function Hr(E,e,T){const t=E.slice();return t[12]=e[T],t}function br(E,e,T){const t=E.slice();return t[12]=e[T],t[13]=e,t[14]=T,t}function Ai(E){let e,T,t,r=E[0].function_name+"",R,A,s,o=E[0].description+"",n,S,O,N,u,D,d,C,_,L=ce(E[0].arguments),c=[];for(let H=0;H{T(1,r=null)},N=()=>{r&&(Bn(t.function_name,r),T(0,t=r),T(1,r=null))},u=()=>{t&&window.confirm("Are you sure you want to delete this function?")&&vn(t.function_name)},D=()=>{T(1,r=structuredClone(t))};return E.$$set=d=>{"functionTemplate"in d&&T(0,t=d.functionTemplate)},[t,r,R,A,s,o,n,S,O,N,u,D]}class QR extends Le{constructor(e){super(),_e(this,e,oi,Si,Ne,{functionTemplate:0})}}function vr(E,e,T){const t=E.slice();return t[12]=e[T],t}function Fr(E,e,T){const t=E.slice();return t[15]=e[T],t}function Yr(E,e,T){const t=E.slice();return t[18]=e[T],t}function Vr(E,e,T){const t=E.slice();return t[18]=e[T],t}function Wr(E){let e,T;return e=new kA({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function wr(E){let e,T;return e=new ze({props:{$$slots:{default:[ii]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388610&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function xr(E){let e,T;return e=new CE({props:{message:E[18],onSubmit:LT}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&2&&(R.message=t[18]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Oi(E){let e=E[1].header+"",T,t,r,R,A=ce(E[1].questions),s=[];for(let n=0;nB(s[n],1,1,()=>{s[n]=null});return{c(){T=Re(e),t=x();for(let n=0;n{O=null}),He())},i(N){S||(G(e.$$.fragment,N),G(t.$$.fragment,N),G(R.$$.fragment,N),G(s.$$.fragment,N),G(O),S=!0)},o(N){B(e.$$.fragment,N),B(t.$$.fragment,N),B(R.$$.fragment,N),B(s.$$.fragment,N),B(O),S=!1},d(N){N&&(Y(T),Y(r),Y(A),Y(o),Y(n)),X(e,N),X(t,N),X(R,N),X(s,N),O&&O.d(N)}}}function Ci(E){let e,T;return e=new ze({props:{$$slots:{default:[Xi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388617&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ui(E){let e,T;return e=new ze({props:{$$slots:{default:[ki]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ci(E){let e,T;return e=new YE({props:{message:"No, the results were not correct."}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function fi(E){let e,T;return e=new YE({props:{message:"Yes, the results were correct."}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Pi(E){let e,T,t=E[0].ask_results_correct&&kr(E);return{c(){t&&t.c(),e=Ze()},m(r,R){t&&t.m(r,R),W(r,e,R),T=!0},p(r,R){r[0].ask_results_correct?t?R&1&&G(t,1):(t=kr(r),t.c(),G(t,1),t.m(e.parentNode,e)):t&&(ge(),B(t,1,1,()=>{t=null}),He())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function Di(E){let e,T,t=E[0].ask_results_correct&&Kr(E);return{c(){t&&t.c(),e=Ze()},m(r,R){t&&t.m(r,R),W(r,e,R),T=!0},p(r,R){r[0].ask_results_correct?t?R&1&&G(t,1):(t=Kr(r),t.c(),G(t,1),t.m(e.parentNode,e)):t&&(ge(),B(t,1,1,()=>{t=null}),He())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function di(E){let e,T;return e=new YE({props:{message:"Change the chart based on these instructions",$$slots:{default:[Zi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388608&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function pi(E){let e,T,t=E[0].chart&&Jr(E);return{c(){t&&t.c(),e=Ze()},m(r,R){t&&t.m(r,R),W(r,e,R),T=!0},p(r,R){r[0].chart?t?(t.p(r,R),R&1&&G(t,1)):(t=Jr(r),t.c(),G(t,1),t.m(e.parentNode,e)):t&&(ge(),B(t,1,1,()=>{t=null}),He())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function Mi(E){let e,T,t=E[0].table&&Qr(E);return{c(){t&&t.c(),e=Ze()},m(r,R){t&&t.m(r,R),W(r,e,R),T=!0},p(r,R){r[0].table?t?(t.p(r,R),R&1&&G(t,1)):(t=Qr(r),t.c(),G(t,1),t.m(e.parentNode,e)):t&&(ge(),B(t,1,1,()=>{t=null}),He())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function Ui(E){let e,T;return e=new ze({props:{$$slots:{default:[ta]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function mi(E){let e,T,t=E[0].sql==!0&&jr(E);return{c(){t&&t.c(),e=Ze()},m(r,R){t&&t.m(r,R),W(r,e,R),T=!0},p(r,R){r[0].sql==!0?t?(t.p(r,R),R&1&&G(t,1)):(t=jr(r),t.c(),G(t,1),t.m(e.parentNode,e)):t&&(ge(),B(t,1,1,()=>{t=null}),He())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function hi(E){let e,T;return e=new YE({props:{message:E[15].question}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.message=t[15].question),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Gi(E){let e=JSON.stringify(E[15])+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p(t,r){r&8&&e!==(e=JSON.stringify(t[15])+"")&&Pe(T,e)},d(t){t&&Y(T)}}}function gi(E){let e,T;return e=new IE({props:{$$slots:{default:[Gi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Hi(E){let e,T;return e=new QR({props:{functionTemplate:E[15].function_template}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.functionTemplate=t[15].function_template),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function bi(E){let e,T;return e=new ni({props:{functionData:E[15].function}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.functionData=t[15].function),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function yi(E){let e=E[15].text+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p(t,r){r&8&&e!==(e=t[15].text+"")&&Pe(T,e)},d(t){t&&Y(T)}}}function Bi(E){let e,T,t,r;return e=new IE({props:{$$slots:{default:[yi]},$$scope:{ctx:E}}}),t=new $A({props:{message:E[15].text}}),{c(){k(e.$$.fragment),T=x(),k(t.$$.fragment)},m(R,A){$(e,R,A),W(R,T,A),$(t,R,A),r=!0},p(R,A){const s={};A&8388616&&(s.$$scope={dirty:A,ctx:R}),e.$set(s);const o={};A&8&&(o.message=R[15].text),t.$set(o)},i(R){r||(G(e.$$.fragment,R),G(t.$$.fragment,R),r=!0)},o(R){B(e.$$.fragment,R),B(t.$$.fragment,R),r=!1},d(R){R&&Y(T),X(e,R),X(t,R)}}}function vi(E){let e,T;return e=new FA({props:{onSubmit:Hn}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Fi(E){let e=E[15].sql+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p(t,r){r&8&&e!==(e=t[15].sql+"")&&Pe(T,e)},d(t){t&&Y(T)}}}function Yi(E){let e,T;return e=new hR({props:{$$slots:{default:[Fi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Vi(E){let e,T;return e=new IE({props:{$$slots:{default:[Yi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Wi(E){let e,T;return e=new MR({props:{id:E[15].id,df:E[15].df}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.id=t[15].id),r&8&&(R.df=t[15].df),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function wi(E){let e,T;return e=new UR({props:{fig:E[15].fig}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.fig=t[15].fig),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function $r(E){let e,T;return e=new ze({props:{$$slots:{default:[$i]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function xi(E){let e=E[15].summary+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p(t,r){r&8&&e!==(e=t[15].summary+"")&&Pe(T,e)},d(t){t&&Y(T)}}}function $i(E){let e,T;return e=new IE({props:{$$slots:{default:[xi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Xr(E){let e,T;function t(){return E[10](E[15])}return e=new CE({props:{message:"Auto Fix",onSubmit:t}}),{c(){k(e.$$.fragment)},m(r,R){$(e,r,R),T=!0},p(r,R){E=r;const A={};R&8&&(A.onSubmit=t),e.$set(A)},i(r){T||(G(e.$$.fragment,r),T=!0)},o(r){B(e.$$.fragment,r),T=!1},d(r){X(e,r)}}}function Xi(E){let e,T,t,r,R,A;e=new fT({props:{message:E[15].error}}),t=new CE({props:{message:"Manually Fix",onSubmit:E[9]}});let s=E[0].auto_fix_sql&&Xr(E);return{c(){k(e.$$.fragment),T=x(),k(t.$$.fragment),r=x(),s&&s.c(),R=Ze()},m(o,n){$(e,o,n),W(o,T,n),$(t,o,n),W(o,r,n),s&&s.m(o,n),W(o,R,n),A=!0},p(o,n){const S={};n&8&&(S.message=o[15].error),e.$set(S),o[0].auto_fix_sql?s?(s.p(o,n),n&1&&G(s,1)):(s=Xr(o),s.c(),G(s,1),s.m(R.parentNode,R)):s&&(ge(),B(s,1,1,()=>{s=null}),He())},i(o){A||(G(e.$$.fragment,o),G(t.$$.fragment,o),G(s),A=!0)},o(o){B(e.$$.fragment,o),B(t.$$.fragment,o),B(s),A=!1},d(o){o&&(Y(T),Y(r),Y(R)),X(e,o),X(t,o),s&&s.d(o)}}}function ki(E){let e,T;return e=new fT({props:{message:E[15].error}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.message=t[15].error),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function kr(E){let e,T;return e=new YE({props:{message:"",$$slots:{default:[Ji]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ki(E){let e,T,t,r;return e=new CE({props:{message:"Yes, create function",onSubmit:E[6]}}),t=new CE({props:{message:"Yes, train as raw SQL",onSubmit:E[7]}}),{c(){k(e.$$.fragment),T=x(),k(t.$$.fragment)},m(R,A){$(e,R,A),W(R,T,A),$(t,R,A),r=!0},i(R){r||(G(e.$$.fragment,R),G(t.$$.fragment,R),r=!0)},o(R){B(e.$$.fragment,R),B(t.$$.fragment,R),r=!1},d(R){R&&Y(T),X(e,R),X(t,R)}}}function Ji(E){let e=cT()!==null,T,t,r,R=e&&Ki(E);return t=new CE({props:{message:"No",onSubmit:E[8]}}),{c(){R&&R.c(),T=x(),k(t.$$.fragment)},m(A,s){R&&R.m(A,s),W(A,T,s),$(t,A,s),r=!0},p:Z,i(A){r||(G(R),G(t.$$.fragment,A),r=!0)},o(A){B(R),B(t.$$.fragment,A),r=!1},d(A){A&&Y(T),R&&R.d(A),X(t,A)}}}function Kr(E){let e,T;return e=new ze({props:{$$slots:{default:[Qi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function qi(E){let e;return{c(){e=Re("Were the results correct?")},m(T,t){W(T,e,t)},d(T){T&&Y(e)}}}function Qi(E){let e,T;return e=new IE({props:{$$slots:{default:[qi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388608&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Zi(E){let e,T;return e=new WA({props:{onSubmit:E[5],placeholder:"Make the line red",buttonText:"Update Chart",currentValue:""}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Jr(E){let e,T,t,r;e=new ze({props:{$$slots:{default:[ji]},$$scope:{ctx:E}}});let R=E[0].redraw_chart&&qr(E);return{c(){k(e.$$.fragment),T=x(),R&&R.c(),t=Ze()},m(A,s){$(e,A,s),W(A,T,s),R&&R.m(A,s),W(A,t,s),r=!0},p(A,s){const o={};s&8388616&&(o.$$scope={dirty:s,ctx:A}),e.$set(o),A[0].redraw_chart?R?s&1&&G(R,1):(R=qr(A),R.c(),G(R,1),R.m(t.parentNode,t)):R&&(ge(),B(R,1,1,()=>{R=null}),He())},i(A){r||(G(e.$$.fragment,A),G(R),r=!0)},o(A){B(e.$$.fragment,A),B(R),r=!1},d(A){A&&(Y(T),Y(t)),X(e,A),R&&R.d(A)}}}function ji(E){let e,T;return e=new UR({props:{fig:E[15].fig}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.fig=t[15].fig),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function qr(E){let e,T;return e=new ze({props:{$$slots:{default:[zi]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function zi(E){let e,T;return e=new CE({props:{message:"Redraw Chart",onSubmit:bn}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Qr(E){let e,T;return e=new ze({props:{$$slots:{default:[ea]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8388616&&(R.$$scope={dirty:r,ctx:t}),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ea(E){let e,T;return e=new MR({props:{id:E[15].id,df:E[15].df}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.id=t[15].id),r&8&&(R.df=t[15].df),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Zr(E){let e,T;return e=new CE({props:{message:E[18],onSubmit:LT}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&8&&(R.message=t[18]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ea(E){let e=E[15].header+"",T,t,r,R,A=ce(E[15].questions),s=[];for(let n=0;nB(s[n],1,1,()=>{s[n]=null});return{c(){T=Re(e),t=x();for(let n=0;n{A[S]=null}),He(),T=A[e],T?T.p(o,n):(T=A[e]=R[e](o),T.c()),G(T,1),T.m(t.parentNode,t))},i(o){r||(G(T),r=!0)},o(o){B(T),r=!1},d(o){o&&Y(t),A[e].d(o)}}}function eR(E){let e,T;return e=new cA({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function na(E){let e,T;return e=new oA({props:{onSubmit:LT}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p:Z,i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Aa(E){let e,T,t,r;e=new mR({props:{message:"New Question",onSubmit:Ht}});let R=ce(E[3]),A=[];for(let o=0;oB(A[o],1,1,()=>{A[o]=null});return{c(){k(e.$$.fragment),T=x();for(let o=0;o{t=null}),He())},i(r){T||(G(t),T=!0)},o(r){B(t),T=!1},d(r){r&&Y(e),t&&t.d(r)}}}function sa(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d;t=new Zn({});let C=E[0].debug&&Wr(),_=E[1]&&E[1].type=="question_list"&&!E[2]&&wr(E),L=ce(E[3]),c=[];for(let f=0;fB(c[f],1,1,()=>{c[f]=null});let y=E[4]&&eR();O=new iA({});const h=[Aa,na],a=[];function I(f,m){return f[2]?0:1}return u=I(E),D=a[u]=h[u](E),{c(){e=P("div"),T=P("div"),k(t.$$.fragment),r=x(),C&&C.c(),R=x(),_&&_.c(),A=x(),s=P("ul");for(let f=0;f{C=null}),He()),f[1]&&f[1].type=="question_list"&&!f[2]?_?(_.p(f,m),m&6&&G(_,1)):(_=wr(f),_.c(),G(_,1),_.m(T,A)):_&&(ge(),B(_,1,1,()=>{_=null}),He()),m&9){L=ce(f[3]);let g;for(g=0;g{y=null}),He());let U=u;u=I(f),u===U?a[u].p(f,m):(ge(),B(a[U],1,1,()=>{a[U]=null}),He(),D=a[u],D?D.p(f,m):(D=a[u]=h[u](f),D.c()),G(D,1),D.m(S,null))},i(f){if(!d){G(t.$$.fragment,f),G(C),G(_);for(let m=0;mT(0,t=d)),RE(E,lT,d=>T(1,r=d)),RE(E,Gt,d=>T(2,R=d)),RE(E,Et,d=>T(3,A=d)),RE(E,st,d=>T(4,s=d)),[t,r,R,A,s,d=>{Yn(d)},()=>{yn()},()=>{Fn()},()=>{WT()},()=>{WT()},d=>{gn(d.error)},d=>d.type==="question_cache"?cn(d.id):void 0]}class oa extends Le{constructor(e){super(),_e(this,e,Sa,sa,Ne,{})}}function Oa(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d,C,_,L,c;return{c(){e=P("div"),T=P("div"),t=P("div"),r=P("div"),R=P("h3"),R.textContent="Are you sure?",A=x(),s=P("button"),s.innerHTML='Close ',o=x(),n=P("div"),S=P("p"),O=Re(E[0]),N=x(),u=P("div"),D=P("button"),D.textContent="Close",d=x(),C=P("button"),_=Re(E[1]),i(R,"class","font-bold text-gray-800 dark:text-white"),i(s,"type","button"),i(s,"class","hs-dropdown-toggle inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-gray-500 hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 focus:ring-offset-white transition-all text-sm dark:focus:ring-gray-700 dark:focus:ring-offset-gray-800"),i(s,"data-hs-overlay","#hs-vertically-centered-modal"),i(r,"class","flex justify-between items-center py-3 px-4 border-b dark:border-gray-700"),i(S,"class","text-gray-800 dark:text-gray-400"),i(n,"class","p-4 overflow-y-auto"),i(D,"type","button"),i(D,"class","hs-dropdown-toggle py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),i(D,"data-hs-overlay","#hs-vertically-centered-modal"),i(C,"class","py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800"),i(u,"class","flex justify-end items-center gap-x-2 py-3 px-4 border-t dark:border-gray-700"),i(t,"class","flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"),i(T,"class","hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"),i(e,"class","hs-overlay open w-full h-full fixed top-0 left-0 z-[60] overflow-x-hidden overflow-y-auto")},m(H,y){W(H,e,y),l(e,T),l(T,t),l(t,r),l(r,R),l(r,A),l(r,s),l(t,o),l(t,n),l(n,S),l(S,O),l(t,N),l(t,u),l(u,D),l(u,d),l(u,C),l(C,_),L||(c=[ae(s,"click",function(){ZE(E[2])&&E[2].apply(this,arguments)}),ae(D,"click",function(){ZE(E[2])&&E[2].apply(this,arguments)}),ae(C,"click",function(){ZE(E[3])&&E[3].apply(this,arguments)})],L=!0)},p(H,[y]){E=H,y&1&&Pe(O,E[0]),y&2&&Pe(_,E[1])},i:Z,o:Z,d(H){H&&Y(e),L=!1,iE(c)}}}function ia(E,e,T){let{message:t}=e,{buttonLabel:r}=e,{onClose:R}=e,{onConfirm:A}=e;return E.$$set=s=>{"message"in s&&T(0,t=s.message),"buttonLabel"in s&&T(1,r=s.buttonLabel),"onClose"in s&&T(2,R=s.onClose),"onConfirm"in s&&T(3,A=s.onConfirm)},[t,r,R,A]}class aa extends Le{constructor(e){super(),_e(this,e,ia,Oa,Ne,{message:0,buttonLabel:1,onClose:2,onConfirm:3})}}function TR(E,e,T){const t=E.slice();return t[10]=e[T].name,t[11]=e[T].description,t[12]=e[T].example,t}function rR(E){let e,T,t,r,R,A,s,o,n,S,O,N;return S=Rn(E[7][0]),{c(){e=P("div"),T=P("div"),t=P("input"),r=x(),R=P("label"),A=P("span"),A.textContent=`${E[10]}`,s=x(),o=P("span"),o.textContent=`${E[11]}`,n=x(),i(t,"id","hs-radio-"+E[10]),t.__value=E[10],Ye(t,t.__value),i(t,"name","hs-radio-with-description"),i(t,"type","radio"),i(t,"class","border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800"),i(t,"aria-describedby","hs-radio-delete-description"),i(T,"class","flex items-center h-5 mt-1"),i(A,"class","block text-sm font-semibold text-gray-800 dark:text-gray-300"),i(o,"id","hs-radio-ddl-description"),i(o,"class","block text-sm text-gray-600 dark:text-gray-500"),i(R,"for","hs-radio-"+E[10]),i(R,"class","ml-3"),i(e,"class","relative flex items-start"),S.p(t)},m(u,D){W(u,e,D),l(e,T),l(T,t),t.checked=t.__value===E[0],l(e,r),l(e,R),l(R,A),l(R,s),l(R,o),l(e,n),O||(N=ae(t,"change",E[6]),O=!0)},p(u,D){D&1&&(t.checked=t.__value===u[0])},d(u){u&&Y(e),S.r(),O=!1,N()}}}function Ia(E){let e,T,t,r,R,A,s,o,n,S,O,N,u,D,d,C,_,L,c,H,y,h,a,I,f,m=ce(E[3]),U=[];for(let g=0;gClose ',o=x(),n=P("span"),n.textContent="Training Data Type",S=x(),O=P("div");for(let F=0;F{r(s,R.toLowerCase())},n=[[]];function S(){R=this.__value,T(0,R)}const O=u=>u.name===R;function N(){s=this.value,T(2,s)}return E.$$set=u=>{"onDismiss"in u&&T(1,t=u.onDismiss),"onTrain"in u&&T(5,r=u.onTrain),"selectedTrainingDataType"in u&&T(0,R=u.selectedTrainingDataType)},[R,t,s,A,o,r,S,n,O,N]}class la extends Le{constructor(e){super(),_e(this,e,Na,Ia,Ne,{onDismiss:1,onTrain:5,selectedTrainingDataType:0})}}function RR(E,e,T){const t=E.slice();return t[21]=e[T],t}function nR(E,e,T){const t=E.slice();return t[24]=e[T],t}function AR(E,e,T){const t=E.slice();return t[24]=e[T],t}function sR(E){let e,T;return e=new la({props:{onDismiss:E[13],onTrain:E[0]}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&1&&(R.onTrain=t[0]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function _a(E){let e;return{c(){e=Re("Action")},m(T,t){W(T,e,t)},p:Z,d(T){T&&Y(e)}}}function La(E){let e=E[24]+"",T;return{c(){T=Re(e)},m(t,r){W(t,T,r)},p:Z,d(t){t&&Y(T)}}}function SR(E){let e,T,t,r;function R(o,n){return o[24]!="id"?La:_a}let s=R(E)(E);return{c(){e=P("th"),T=P("div"),t=P("span"),s.c(),r=x(),i(t,"class","text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-gray-200"),i(T,"class","flex items-center gap-x-2"),i(e,"scope","col"),i(e,"class","px-6 py-3 text-left")},m(o,n){W(o,e,n),l(e,T),l(T,t),s.m(t,null),l(e,r)},p(o,n){s.p(o,n)},d(o){o&&Y(e),s.d()}}}function Ca(E){let e,T,t;function r(){return E[18](E[21],E[24])}return{c(){e=P("button"),e.textContent="Delete",i(e,"type","button"),i(e,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border-2 border-red-200 font-semibold text-red-500 hover:text-white hover:bg-red-500 hover:border-red-500 focus:outline-none focus:ring-2 focus:ring-red-200 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800")},m(R,A){W(R,e,A),T||(t=ae(e,"click",r),T=!0)},p(R,A){E=R},d(R){R&&Y(e),T=!1,t()}}}function ua(E){let e,T=E[21][E[24]]+"",t;return{c(){e=P("span"),t=Re(T),i(e,"class","text-gray-800 dark:text-gray-200")},m(r,R){W(r,e,R),l(e,t)},p(r,R){R&16&&T!==(T=r[21][r[24]]+"")&&Pe(t,T)},d(r){r&&Y(e)}}}function oR(E){let e,T;function t(A,s){return A[24]!="id"?ua:Ca}let R=t(E)(E);return{c(){e=P("td"),T=P("div"),R.c(),i(T,"class","px-6 py-3"),i(e,"class","h-px w-px ")},m(A,s){W(A,e,s),l(e,T),R.m(T,null)},p(A,s){R.p(A,s)},d(A){A&&Y(e),R.d()}}}function iR(E){let e,T,t=ce(E[8]),r=[];for(let R=0;RTraining Data

Add or remove training data. Good training data is the key to accuracy.

',n=x(),S=P("div"),O=P("div"),N=P("button"),N.textContent="View all",u=x(),D=P("button"),D.innerHTML=` + Add training data`,d=x(),C=P("table"),_=P("thead"),L=P("tr");for(let Ee=0;Ee + Prev`,dE=x(),me=P("button"),me.innerHTML=`Next + `,fE=x(),Fe&&Fe.c(),TE=Ze(),i(N,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),i(D,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800"),i(O,"class","inline-flex gap-x-2"),i(s,"class","px-6 py-4 grid gap-3 md:flex md:justify-between md:items-center border-b border-gray-200 dark:border-gray-700"),i(_,"class","bg-gray-50 dark:bg-slate-800"),i(H,"class","divide-y divide-gray-200 dark:divide-gray-700"),i(C,"class","min-w-full divide-y divide-gray-200 dark:divide-gray-700"),i(I,"class","text-sm text-gray-600 dark:text-gray-400"),i(U,"class","py-2 px-3 pr-9 block w-full border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-900 dark:border-gray-700 dark:text-gray-400"),i(m,"class","max-w-sm space-y-3"),i(se,"class","text-sm text-gray-600 dark:text-gray-400"),i(a,"class","inline-flex items-center gap-x-2"),i(tE,"type","button"),i(tE,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),i(me,"type","button"),i(me,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),i(ye,"class","inline-flex gap-x-2"),i(h,"class","px-6 py-4 grid gap-3 md:flex md:justify-between md:items-center border-t border-gray-200 dark:border-gray-700"),i(A,"class","bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden dark:bg-slate-900 dark:border-gray-700"),i(R,"class","p-1.5 min-w-full inline-block align-middle"),i(r,"class","-m-1.5 overflow-x-auto"),i(t,"class","flex flex-col"),i(T,"class","max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14 mx-auto")},m(Ee,Xe){Ve&&Ve.m(Ee,Xe),W(Ee,e,Xe),W(Ee,T,Xe),l(T,t),l(t,r),l(r,R),l(R,A),l(A,s),l(s,o),l(s,n),l(s,S),l(S,O),l(O,N),l(O,u),l(O,D),l(A,d),l(A,C),l(C,_),l(_,L);for(let Ae=0;Ae{Ve=null}),He()),Xe&256){ME=ce(Ee[8]);let Ae;for(Ae=0;Ae{Fe=null}),He())},i(Ee){pE||(G(Ve),G(Fe),pE=!0)},o(Ee){B(Ve),B(Fe),pE=!1},d(Ee){Ee&&(Y(e),Y(T),Y(fE),Y(TE)),Ve&&Ve.d(Ee),nE(xe,Ee),nE(ve,Ee),Fe&&Fe.d(Ee),tt=!1,iE(Tt)}}}function fa(E,e,T){let{df:t}=e,{onTrain:r}=e,{removeTrainingData:R}=e,A=JSON.parse(t),s=A.length>0?Object.keys(A[0]):[],o=10,n=1,S=Math.ceil(A.length/o),O=(n-1)*o,N=n*o,u=A.slice(O,N);const D=()=>{n>1&&T(16,n--,n)},d=()=>{n{T(16,n=1),T(15,o=A.length)};let _=null,L=!1;const c=()=>{T(6,L=!0)},H=()=>{T(6,L=!1)},y=(I,f)=>{T(5,_=I[f])},h=()=>{T(5,_=null)},a=()=>{_&&R(_)};return E.$$set=I=>{"df"in I&&T(14,t=I.df),"onTrain"in I&&T(0,r=I.onTrain),"removeTrainingData"in I&&T(1,R=I.removeTrainingData)},E.$$.update=()=>{E.$$.dirty&98304&&T(2,O=(n-1)*o),E.$$.dirty&98304&&T(3,N=n*o),E.$$.dirty&12&&T(4,u=A.slice(O,N)),E.$$.dirty&32768&&T(17,S=Math.ceil(A.length/o)),E.$$.dirty&196608&&console.log(n,S)},[r,R,O,N,u,_,L,A,s,D,d,C,c,H,t,o,n,S,y,h,a]}class Pa extends Le{constructor(e){super(),_e(this,e,fa,ca,Ne,{df:14,onTrain:0,removeTrainingData:1})}}function Da(E){let e;return{c(){e=P("div"),e.innerHTML='
Loading...
',i(e,"class","min-h-[15rem] flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]")},m(T,t){W(T,e,t)},p:Z,i:Z,o:Z,d(T){T&&Y(e)}}}function da(E){let e,T,t,r;const R=[Ma,pa],A=[];function s(o,n){return o[0].type==="df"?0:o[0].type==="error"?1:-1}return~(e=s(E))&&(T=A[e]=R[e](E)),{c(){T&&T.c(),t=Ze()},m(o,n){~e&&A[e].m(o,n),W(o,t,n),r=!0},p(o,n){let S=e;e=s(o),e===S?~e&&A[e].p(o,n):(T&&(ge(),B(A[S],1,1,()=>{A[S]=null}),He()),~e?(T=A[e],T?T.p(o,n):(T=A[e]=R[e](o),T.c()),G(T,1),T.m(t.parentNode,t)):T=null)},i(o){r||(G(T),r=!0)},o(o){B(T),r=!1},d(o){o&&Y(t),~e&&A[e].d(o)}}}function pa(E){let e,T;return e=new fT({props:{message:E[0].error}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&1&&(R.message=t[0].error),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ma(E){let e,T;return e=new Pa({props:{df:E[0].df,removeTrainingData:dn,onTrain:hn}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&1&&(R.df=t[0].df),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ua(E){let e,T,t,r,R;const A=[da,Da],s=[];function o(n,S){return n[0]!==null?0:1}return t=o(E),r=s[t]=A[t](E),{c(){e=P("div"),T=P("div"),r.c(),i(T,"class","py-10 lg:py-14"),i(e,"class","relative h-screen w-full lg:pl-64")},m(n,S){W(n,e,S),l(e,T),s[t].m(T,null),R=!0},p(n,[S]){let O=t;t=o(n),t===O?s[t].p(n,S):(ge(),B(s[O],1,1,()=>{s[O]=null}),He(),r=s[t],r?r.p(n,S):(r=s[t]=A[t](n),r.c()),G(r,1),r.m(T,null))},i(n){R||(G(r),R=!0)},o(n){B(r),R=!1},d(n){n&&Y(e),s[t].d()}}}function ma(E,e,T){let t;return RE(E,ht,r=>T(0,t=r)),[t]}class ha extends Le{constructor(e){super(),_e(this,e,ma,Ua,Ne,{})}}function Ga(E){let e;return{c(){e=P("body"),e.innerHTML=`

No Training Data

Did you read the docs?

Oops, something went wrong.

You need some training data before you can use Vanna

© All Rights Reserved. 2022.

`,d(e,"class","flex h-full")},m(n,t){N(n,e,t)},p:Y,i:Y,o:Y,d(n){n&&B(e)}}}class Ks extends ve{constructor(e){super(),be(this,e,null,Ys,he,{})}}function Xs(o){let e,n,t;return{c(){e=E("div"),n=E("div"),t=E("div"),d(t,"class","mt-7 bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700"),d(n,"class","w-full max-w-md mx-auto p-6"),d(e,"class","dark:bg-slate-900 bg-gray-100 flex h-screen items-center py-16")},m(r,i){N(r,e,i),v(e,n),v(n,t),t.innerHTML=o[0]},p(r,[i]){i&1&&(t.innerHTML=r[0])},i:Y,o:Y,d(r){r&&B(e)}}}function el(o,e,n){let t;return et(o,fn,r=>n(0,t=r)),[t]}class tl extends ve{constructor(e){super(),be(this,e,el,Xs,he,{})}}function Ar(o){let e,n;return e=new Ao({}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function nl(o){let e,n;return e=new tl({}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function rl(o){let e,n;return e=new Ks({}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function ol(o){let e,n;return e=new Js({}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function il(o){let e,n;return e=new Ts({}),{c(){U(e.$$.fragment)},m(t,r){G(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){A(e.$$.fragment,t),n=!1},d(t){Z(e,t)}}}function sl(o){let e,n,t,r,i,s=o[0]!=="login"&&Ar();const l=[il,ol,rl,nl],c=[];function a(g,h){return g[0]==="chat"?0:g[0]==="training-data"?1:g[0]==="no-training-data"?2:g[0]==="login"?3:-1}return~(t=a(o))&&(r=c[t]=l[t](o)),{c(){e=E("main"),s&&s.c(),n=Q(),r&&r.c()},m(g,h){N(g,e,h),s&&s.m(e,null),v(e,n),~t&&c[t].m(e,null),i=!0},p(g,[h]){g[0]!=="login"?s?h&1&&L(s,1):(s=Ar(),s.c(),L(s,1),s.m(e,n)):s&&(Se(),A(s,1,1,()=>{s=null}),Oe());let x=t;t=a(g),t!==x&&(r&&(Se(),A(c[x],1,1,()=>{c[x]=null}),Oe()),~t?(r=c[t],r||(r=c[t]=l[t](g),r.c()),L(r,1),r.m(e,null)):r=null)},i(g){i||(L(s),L(r),i=!0)},o(g){A(s),A(r),i=!1},d(g){g&&B(e),s&&s.d(),~t&&c[t].d()}}}function ll(o,e,n){let t;return et(o,wt,r=>n(0,t=r)),Hr(async()=>{yo(),ho(),new URL(window.location.href).hash.slice(1)==="training-data"?Ir():zr()}),[t]}class al extends ve{constructor(e){super(),be(this,e,ll,sl,he,{})}}new al({target:document.getElementById("app")}); + Back to examples

© All Rights Reserved. 2022.

`,i(e,"class","flex h-full")},m(T,t){W(T,e,t)},p:Z,i:Z,o:Z,d(T){T&&Y(e)}}}class ga extends Le{constructor(e){super(),_e(this,e,null,Ga,Ne,{})}}function Ha(E){let e,T,t;return{c(){e=P("div"),T=P("div"),t=P("div"),i(t,"class","mt-7 bg-white border border-gray-200 rounded-xl shadow-sm dark:bg-gray-800 dark:border-gray-700"),i(T,"class","w-full max-w-md mx-auto p-6"),i(e,"class","dark:bg-slate-900 bg-gray-100 flex h-screen items-center py-16")},m(r,R){W(r,e,R),l(e,T),l(T,t),t.innerHTML=E[0]},p(r,[R]){R&1&&(t.innerHTML=r[0])},i:Z,o:Z,d(r){r&&Y(e)}}}function ba(E,e,T){let t;return RE(E,gt,r=>T(0,t=r)),[t]}class ya extends Le{constructor(e){super(),_e(this,e,ba,Ha,Ne,{})}}function Ba(E){let e,T,t,r,R,A;return{c(){e=P("div"),T=P("div"),T.innerHTML='

New

Create a New Function

',t=x(),r=P("button"),r.innerHTML=`Create + `,i(r,"class","mt-3 inline-flex items-center gap-x-1 text-sm font-semibold rounded-lg border border-transparent text-green-600 hover:text-green-800 disabled:opacity-50 disabled:pointer-events-none dark:text-green-500 dark:hover:text-green-400"),i(e,"class","p-4 flex flex-col justify-between bg-white border border-t-4 border-t-green-600 shadow-sm rounded-xl dark:bg-neutral-900 dark:border-neutral-700 dark:border-t-green-500 dark:shadow-neutral-700/70")},m(s,o){W(s,e,o),l(e,T),l(e,t),l(e,r),R||(A=ae(r,"click",E[0]),R=!0)},p:Z,i:Z,o:Z,d(s){s&&Y(e),R=!1,A()}}}function va(E){return[()=>{uT()}]}class Fa extends Le{constructor(e){super(),_e(this,e,va,Ba,Ne,{})}}function IR(E,e,T){const t=E.slice();return t[1]=e[T],t}function NR(E){let e,T;return e=new IE({props:{$$slots:{default:[Ya]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ya(E){let e;return{c(){e=Re("No functions found")},m(T,t){W(T,e,t)},d(T){T&&Y(e)}}}function lR(E){let e,T;return e=new QR({props:{functionTemplate:E[1]}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},p(t,r){const R={};r&1&&(R.functionTemplate=t[1]),e.$set(R)},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Va(E){let e,T,t,r,R,A,s,o,n,S=E[0].length==0&&NR(E),O=ce(E[0]),N=[];for(let D=0;DB(N[D],1,1,()=>{N[D]=null});return o=new Fa({}),{c(){e=P("div"),T=P("div"),t=P("h1"),t.textContent="Functions",r=x(),S&&S.c(),R=x(),A=P("div");for(let D=0;D{S=null}),He()),d&1){O=ce(D[0]);let C;for(C=0;CT(0,t=r)),[t]}class wa extends Le{constructor(e){super(),_e(this,e,Wa,Va,Ne,{})}}function _R(E){let e,T;return e=new xn({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function xa(E){let e,T;return e=new IE({props:{$$slots:{default:[qa]},$$scope:{ctx:E}}}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function $a(E){let e,T;return e=new wa({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Xa(E){let e,T;return e=new ya({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function ka(E){let e,T;return e=new ga({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ka(E){let e,T;return e=new ha({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function Ja(E){let e,T;return e=new oa({}),{c(){k(e.$$.fragment)},m(t,r){$(e,t,r),T=!0},i(t){T||(G(e.$$.fragment,t),T=!0)},o(t){B(e.$$.fragment,t),T=!1},d(t){X(e,t)}}}function qa(E){let e;return{c(){e=Re("Unknown page")},m(T,t){W(T,e,t)},d(T){T&&Y(e)}}}function Qa(E){let e,T,t,r,R,A=E[0]!=="login"&&_R();const s=[Ja,Ka,ka,Xa,$a,xa],o=[];function n(S,O){return S[0]==="chat"?0:S[0]==="training-data"?1:S[0]==="no-training-data"?2:S[0]==="login"?3:S[0]==="functions"?4:5}return t=n(E),r=o[t]=s[t](E),{c(){e=P("main"),A&&A.c(),T=x(),r.c()},m(S,O){W(S,e,O),A&&A.m(e,null),l(e,T),o[t].m(e,null),R=!0},p(S,[O]){S[0]!=="login"?A?O&1&&G(A,1):(A=_R(),A.c(),G(A,1),A.m(e,T)):A&&(ge(),B(A,1,1,()=>{A=null}),He());let N=t;t=n(S),t!==N&&(ge(),B(o[N],1,1,()=>{o[N]=null}),He(),r=o[t],r||(r=o[t]=s[t](S),r.c()),G(r,1),r.m(e,null))},i(S){R||(G(A),G(r),R=!0)},o(S){B(A),B(r),R=!1},d(S){S&&Y(e),A&&A.d(),o[t].d()}}}function Za(E,e,T){let t;return RE(E,DE,r=>T(0,t=r)),cR(async()=>{Pn(),fn();const R=new URL(window.location.href).hash.slice(1);R==="training-data"?dR():R==="functions"?CT():uT()}),[t]}class ja extends Le{constructor(e){super(),_e(this,e,Za,Qa,Ne,{})}}new ja({target:document.getElementById("app")}); ''' \ No newline at end of file diff --git a/src/vanna/vannadb/vannadb_vector.py b/src/vanna/vannadb/vannadb_vector.py index fabe8204..644ba728 100644 --- a/src/vanna/vannadb/vannadb_vector.py +++ b/src/vanna/vannadb/vannadb_vector.py @@ -5,6 +5,7 @@ import pandas as pd import requests +from ..advanced import VannaAdvanced from ..base import VannaBase from ..types import ( DataFrameJSON, @@ -20,7 +21,7 @@ from ..utils import sanitize_model_name -class VannaDB_VectorStore(VannaBase): +class VannaDB_VectorStore(VannaBase, VannaAdvanced): def __init__(self, vanna_model: str, vanna_api_key: str, config=None): VannaBase.__init__(self, config=config) @@ -33,6 +34,7 @@ def __init__(self, vanna_model: str, vanna_api_key: str, config=None): else config["endpoint"] ) self.related_training_data = {} + self._graphql_endpoint = "http://localhost:8080/query" def _rpc_call(self, method, params): if method != "list_orgs": @@ -59,6 +61,262 @@ def _rpc_call(self, method, params): def _dataclass_to_dict(self, obj): return dataclasses.asdict(obj) + def get_all_functions(self) -> list: + # return [ + # { + # "function_name": "calculate_average", + # "description": "Calculates the average value for a specified column in a table.", + # "arguments": [ + # { + # "name": "column", + # "general_type": "STRING", + # "is_user_editable": True, + # "available_values": None + # }, + # { + # "name": "table", + # "general_type": "STRING", + # "is_user_editable": True, + # "available_values": None + # } + # ], + # "sql_template": "SELECT AVG({column}) FROM {table};" + # }, + # { + # "function_name": "get_top_customers_by_sales", + # "description": "Get the top customers by sales", + # "arguments": [ + # { + # "name": "number_of_customers", + # "general_type": "NUMERIC", + # "is_user_editable": True, + # "available_values": None + # } + # ], + # "sql_template": "SELECT * FROM customers ORDER BY sales DESC LIMIT {number_of_customers};" + # } + # ] + + query = """ + { + get_all_sql_functions { + function_name + description + post_processing_code_template + arguments { + name + description + general_type + is_user_editable + available_values + } + sql_template + } + } + """ + + response = requests.post(self._graphql_endpoint, json={'query': query}) + response_json = response.json() + if response.status_code == 200 and 'data' in response_json and 'get_all_sql_functions' in response_json['data']: + self.log(response_json['data']['get_all_sql_functions']) + resp = response_json['data']['get_all_sql_functions'] + + print(resp) + + return resp + else: + raise Exception(f"Query failed to run by returning code of {response.status_code}. {response.text}") + + + + + def get_function(self, question: str, additional_data: dict = {}) -> dict: + # return {'function_name': 'get_artist_with_most_albums', 'description': 'What is the name of the artist that has the most albums?', 'arguments': [], 'sql_template': 'SELECT a.Name, COUNT(al.AlbumId) AS AlbumCount FROM Artist a JOIN Album al ON a.ArtistId = al.ArtistId GROUP BY a.Name ORDER BY AlbumCount DESC LIMIT 1;', 'instantiated_sql': 'SELECT a.Name, COUNT(al.AlbumId) AS AlbumCount FROM Artist a JOIN Album al ON a.ArtistId = al.ArtistId GROUP BY a.Name ORDER BY AlbumCount DESC LIMIT 1;'} + + query = """ + query GetFunction($question: String!) { + get_function(question: $question) { + ... on SQLFunction { + function_name + description + post_processing_code_template + instantiated_post_processing_code + arguments { + name + description + general_type + is_user_editable + instantiated_value + available_values + } + sql_template + instantiated_sql + } + } + } + """ + variables = {"question": question} + response = requests.post(self._graphql_endpoint, json={'query': query, 'variables': variables}) + response_json = response.json() + if response.status_code == 200 and 'data' in response_json and 'get_function' in response_json['data']: + self.log(response_json['data']['get_function']) + resp = response_json['data']['get_function'] + + print(resp) + + return resp + else: + raise Exception(f"Query failed to run by returning code of {response.status_code}. {response.text}") + + + # params = [Question(question=question)] + + # # For now this is just a mock + # mock_function_return = { + # "function_name": "example_function", + # "arguments": [ + # { + # "name": "arg1", + # "general_type": "String", + # "is_user_editable": True, + # "instantiated_value": "value1", + # "available_values": ["value1", "value2", "value3"] + # }, + # { + # "name": "arg2", + # "general_type": "Integer", + # "is_user_editable": False, + # "instantiated_value": "10", + # "available_values": [] + # } + # ], + # "sql_template": "SELECT * FROM table WHERE column1 = {{arg1}} AND column2 = {{arg2}};", + # "instantiated_sql": "SELECT COUNT(*) FROM Artist" + # } + + return mock_function_return + + def create_function(self, question: str, sql: str, plotly_code: str, **kwargs) -> dict: + # return {'function_name': 'get_top_artists_by_sales', 'description': 'Who are the top {limit} artists by sales?', 'arguments': [{'name': 'limit', 'description': 'The number of top artists to retrieve based on sales', 'general_type': 'STRING', 'is_user_editable': True}], 'sql_template': 'SELECT a.Name, SUM(i.UnitPrice * i.Quantity) AS TotalSales FROM Artist a JOIN Album al ON a.ArtistId = al.ArtistId JOIN Track t ON al.AlbumId = t.AlbumId JOIN InvoiceLine i ON t.TrackId = i.TrackId GROUP BY a.Name ORDER BY TotalSales DESC LIMIT {limit};'} + + query = """ + mutation CreateFunction($question: String!, $sql: String!, $plotly_code: String!) { + create_sql_function(question: $question, sql: $sql, post_processing_code: $plotly_code) { + function_name + description + arguments { + name + description + general_type + is_user_editable + } + sql_template + post_processing_code_template + } + } + """ + variables = {"question": question, "sql": sql, "plotly_code": plotly_code} + response = requests.post(self._graphql_endpoint, json={'query': query, 'variables': variables}) + response_json = response.json() + if response.status_code == 200 and 'data' in response_json and response_json['data'] is not None and 'create_sql_function' in response_json['data']: + resp = response_json['data']['create_sql_function'] + + print(resp) + + return resp + else: + raise Exception(f"Query failed to run by returning code of {response.status_code}. {response.text}") + + def update_function(self, old_function_name: str, updated_function: dict) -> bool: + """ + Update an existing SQL function based on the provided parameters. + + Args: + old_function_name (str): The current name of the function to be updated. + updated_function (dict): A dictionary containing the updated function details. Expected keys: + - 'function_name': The new name of the function. + - 'description': The new description of the function. + - 'arguments': A list of dictionaries describing the function arguments. + - 'sql_template': The new SQL template for the function. + - 'post_processing_code_template': The new post-processing code template. + + Returns: + bool: True if the function was successfully updated, False otherwise. + """ + mutation = """ + mutation UpdateSQLFunction($input: SQLFunctionUpdate!) { + update_sql_function(input: $input) + } + """ + + # input SQLFunctionUpdate { + # old_function_name: String! + # function_name: String! + # description: String! + # arguments: [ArgumentUpdate]! + # sql_template: String! + # post_processing_code_template: String! + # } + + # input ArgumentUpdate { + # name: String! + # general_type: GeneralType! + # description: String! + # is_user_editable: Boolean! + # available_values: [String] + # } + + SQLFunctionUpdate = { + 'function_name', 'description', 'arguments', 'sql_template', 'post_processing_code_template' + } + + # Define the expected keys for each argument in the arguments list + ArgumentKeys = {'name', 'general_type', 'description', 'is_user_editable', 'available_values'} + + # Function to validate and transform arguments + def validate_arguments(args): + return [ + {key: arg[key] for key in arg if key in ArgumentKeys} + for arg in args + ] + + # Keep only the keys that conform to the SQLFunctionUpdate GraphQL input type + updated_function = {key: value for key, value in updated_function.items() if key in SQLFunctionUpdate} + + # Special handling for 'arguments' to ensure they conform to the spec + if 'arguments' in updated_function: + updated_function['arguments'] = validate_arguments(updated_function['arguments']) + + variables = { + "input": { + "old_function_name": old_function_name, + **updated_function + } + } + + print("variables", variables) + + response = requests.post(self._graphql_endpoint, json={'query': mutation, 'variables': variables}) + response_json = response.json() + if response.status_code == 200 and 'data' in response_json and response_json['data'] is not None and 'update_sql_function' in response_json['data']: + return response_json['data']['update_sql_function'] + else: + raise Exception(f"Mutation failed to run by returning code of {response.status_code}. {response.text}") + + def delete_function(self, function_name: str) -> bool: + mutation = """ + mutation DeleteSQLFunction($function_name: String!) { + delete_sql_function(function_name: $function_name) + } + """ + variables = {"function_name": function_name} + response = requests.post(self._graphql_endpoint, json={'query': mutation, 'variables': variables}) + response_json = response.json() + if response.status_code == 200 and 'data' in response_json and response_json['data'] is not None and 'delete_sql_function' in response_json['data']: + return response_json['data']['delete_sql_function'] + else: + raise Exception(f"Mutation failed to run by returning code of {response.status_code}. {response.text}") + def create_model(self, model: str, **kwargs) -> bool: """ **Example:**