Use Langflow in OpenRAG
OpenRAG includes a built-in Langflow instance for creating and managing functional application workflows called flows. +
Use Langflow in OpenRAG
OpenRAG includes a built-in Langflow instance for creating and managing functional application workflows called flows. In a flow, the individual workflow steps are represented by components that are connected together to form a complete process.
OpenRAG includes several built-in flows:
-
@@ -28,29 +28,40 @@ In a flow, the individual workflow steps are represented by Inspect and modify flows
-
-
In OpenRAG, click Chat.
+In OpenRAG, click Settings, and then find the Agent section.
-
-
Click Settings, and then click Edit in Langflow to launch the Langflow visual editor in a new browser window.
+If you only need to edit the language model or agent instructions, edit those fields directly on the Settings page. +Language model changes are saved automatically. +To apply new instructions, click Save Agent Instructions.
+
+ -
+
To edit all flow settings and components with full customization capabilities, click Edit in Langflow to launch the Langflow visual editor in a new browser tab.
If prompted to acknowledge that you are entering Langflow, click Proceed.
If Langflow requests login information, enter the
LANGFLOW_SUPERUSERandLANGFLOW_SUPERUSER_PASSWORDfrom your OpenRAG.envfile.
-
Modify the flow as desired, and then press Command+S (Ctrl+S) to save your changes.
-You can close the Langflow browser window, or leave it open if you want to continue experimenting with the flow editor.
-+tipIf you modify the built-in Chat flow, make sure you click in the Conversations tab to start a new conversation. This ensures that the chat doesn't persist any context from the previous conversation with the original flow settings.
You can close the Langflow browser tab, or leave it open if you want to continue experimenting with the flow editor.
+
+ -
+
After you modify any Agent flow settings, go to the OpenRAG Chat, and then click Start new conversation in the Conversations list. +This ensures that the chat doesn't persist any context from the previous conversation with the original flow settings.
- ${e} \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`
- ${e} \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`
All OpenRAG flows are designed to be modular, performant, and provider-agnostic.
-To modify a flow in OpenRAG, click Settings. -From here, you can quickly edit commonly used parameters, such as the Language model and Agent Instructions. -To further explore and edit the flow, click Edit in Langflow to launch the embedded Langflow visual editor where you can fully customize the flow to suit your use case.
-For example, to view and edit the built-in Chat flow (the OpenRAG OpenSearch Agent flow), do the following:
+To view and modify a flow in OpenRAG, click Settings. +From here, you can manage OAuth connectors, model providers, and common parameters for the Agent and Knowledge Ingestion flows.
+To further explore and edit flows, click Edit in Langflow to launch the embedded Langflow visual editor where you can fully customize the flow to suit your use case.
+After you click Edit in Langflow, you can access and edit all of OpenRAG's built-in flows from the Langflow editor's Projects page.
If you edit any flows other than the Agent or Knowledge Ingestion flows, it is recommended that you export the flows before editing so you can revert them to their original state if needed.
For example, the following steps explain how to edit the built-in Agent flow, which is the OpenRAG OpenSearch Agent flow used for the OpenRAG Chat:
Revert a built-in flow to its original configuration
-After you edit a built-in flow, you can click Restore flow on the Settings page to revert the flow to its original state when you first installed OpenRAG. +
After you edit the Agent or Knowledge Ingestion built-in flows, you can click Restore flow on the Settings page to revert either flow to its original state when you first installed OpenRAG. This is a destructive action that discards all customizations to the flow.
+This option isn't available for other built-in flows such as the Nudges flow. +To restore these flows to their original state, you must reimport the flow from a backup (if you exported one before editing), or reset or reinstall OpenRAG.
Build custom flows and use other Langflow functionality
In addition to OpenRAG's built-in flows, all Langflow features are available through OpenRAG, including the ability to create your own flows and popular extensibility features such as the following:
-
diff --git a/assets/js/0ba6a408.e094a5ab.js b/assets/js/0ba6a408.e094a5ab.js
new file mode 100644
index 00000000..ff3ba29c
--- /dev/null
+++ b/assets/js/0ba6a408.e094a5ab.js
@@ -0,0 +1 @@
+"use strict";(globalThis.webpackChunkopenrag_docs=globalThis.webpackChunkopenrag_docs||[]).push([[571],{3227:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>a,default:()=>p,frontMatter:()=>c,metadata:()=>t,toc:()=>u});const t=JSON.parse('{"id":"core-components/knowledge","title":"Configure knowledge","description":"OpenRAG includes a built-in OpenSearch instance that serves as the underlying datastore for your knowledge (documents).","source":"@site/docs/core-components/knowledge.mdx","sourceDirName":"core-components","slug":"/knowledge","permalink":"/knowledge","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/core-components/knowledge.mdx","tags":[],"version":"current","frontMatter":{"title":"Configure knowledge","slug":"/knowledge"},"sidebar":"tutorialSidebar","previous":{"title":"Flows","permalink":"/agents"},"next":{"title":"Ingest knowledge","permalink":"/ingestion"}}');var i=s(4848),o=s(8453),r=s(9179),d=s(7637),l=s(6567);const c={title:"Configure knowledge",slug:"/knowledge"},a=void 0,h={},u=[{value:"Browse knowledge",id:"browse-knowledge",level:2},{value:"Inspect knowledge",id:"inspect-knowledge",level:3},...l.RM,{value:"Search knowledge",id:"search-knowledge",level:3},{value:"Default documents",id:"default-documents",level:3},{value:"OpenSearch authentication and document access",id:"auth",level:2},...d.RM,{value:"OpenSearch indexes",id:"opensearch-indexes",level:2},{value:"Knowledge ingestion settings",id:"knowledge-ingestion-settings",level:2},{value:"Set the embedding model and dimensions",id:"set-the-embedding-model-and-dimensions",level:3},{value:"Set Docling parameters",id:"set-docling-parameters",level:3},{value:"Select a Docling implementation",id:"select-a-docling-implementation",level:4},{value:"Configure Docling ingestion settings",id:"configure-docling-ingestion-settings",level:4},{value:"Set the local documents path",id:"set-the-local-documents-path",level:3},{value:"Delete knowledge",id:"delete-knowledge",level:2},{value:"See also",id:"see-also",level:2}];function g(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["OpenRAG includes a built-in ",(0,i.jsx)(n.a,{href:"https://docs.opensearch.org/latest/",children:"OpenSearch"})," instance that serves as the underlying datastore for your ",(0,i.jsx)(n.em,{children:"knowledge"})," (documents).\nThis specialized database is used to store and retrieve your documents and the associated vector data (embeddings)."]}),"\n",(0,i.jsxs)(n.p,{children:["The documents in your OpenSearch knowledge base provide specialized context in addition to the general knowledge available to the language model that you select when you ",(0,i.jsx)(n.a,{href:"/install-options",children:"install OpenRAG"})," or ",(0,i.jsx)(n.a,{href:"/agents",children:"edit a flow"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You can ",(0,i.jsx)(n.a,{href:"/ingestion",children:"upload documents"})," from a variety of sources to populate your knowledge base with unique content, such as your own company documents, research papers, or websites.\nDocuments are processed through OpenRAG's knowledge ingestion flows with Docling."]}),"\n",(0,i.jsxs)(n.p,{children:["Then, the ",(0,i.jsxs)(n.a,{href:"/chat",children:["OpenRAG ",(0,i.jsx)(n.strong,{children:"Chat"})]})," can run ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/think/topics/vector-search",children:"similarity searches"})," against your OpenSearch database to retrieve relevant information and generate context-aware responses."]}),"\n",(0,i.jsxs)(n.p,{children:["You can configure how documents are ingested and how the ",(0,i.jsx)(n.strong,{children:"Chat"})," interacts with your knowledge base."]}),"\n",(0,i.jsx)(n.h2,{id:"browse-knowledge",children:"Browse knowledge"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"Knowledge"})," page lists the documents OpenRAG has ingested into your OpenSearch database, specifically in an ",(0,i.jsx)(n.a,{href:"https://docs.opensearch.org/latest/getting-started/intro/#index",children:"OpenSearch index"})," named ",(0,i.jsx)(n.code,{children:"documents"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["To explore the raw contents of your knowledge base, click ",(0,i.jsx)(r.A,{name:"Library","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Knowledge"})," to get a list of all ingested documents."]}),"\n",(0,i.jsx)(n.h3,{id:"inspect-knowledge",children:"Inspect knowledge"}),"\n",(0,i.jsxs)(n.p,{children:["For each document, the ",(0,i.jsx)(n.strong,{children:"Knowledge"})," page provides the following information:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Source"}),": Name of the ingested content, such as the file name."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Size"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Type"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Owner"}),": User that uploaded the document."]}),"\n",(0,i.jsx)(l.Ay,{}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Chunks"}),": Number of chunks created by splitting the document during ingestion."]}),"\n",(0,i.jsxs)(n.p,{children:["Click a document to view the individual chunks and technical details related to chunking.\nIf the chunks seem incorrect or incomplete, see ",(0,i.jsx)(n.a,{href:"/ingestion#troubleshoot-ingestion",children:"Troubleshoot ingestion"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Avg score"}),": Average similarity score across all chunks of the document."]}),"\n",(0,i.jsxs)(n.p,{children:["If you ",(0,i.jsx)(n.a,{href:"#search-knowledge",children:"search the knowledge base"}),", the ",(0,i.jsx)(n.strong,{children:"Avg score"})," column shows the similarity score for your search query or filter."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Embedding model"})," and ",(0,i.jsx)(n.strong,{children:"Dimensions"}),": The embedding model and dimensions used to embed the chunks."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Status"}),": Status of document ingestion.\nIf ingestion is complete and successful, then the status is ",(0,i.jsx)(n.strong,{children:"Active"}),".\nFor more information, see ",(0,i.jsx)(n.a,{href:"/ingestion#monitor-ingestion",children:"Monitor ingestion"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"search-knowledge",children:"Search knowledge"}),"\n",(0,i.jsxs)(n.p,{children:["You can use the search field on the ",(0,i.jsx)(n.strong,{children:"Knowledge"})," page to find documents using semantic search and knowledge filters:"]}),"\n",(0,i.jsxs)(n.p,{children:["To search all documents, enter a search string in the search field, and then press ",(0,i.jsx)("kbd",{children:"Enter"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["To apply a ",(0,i.jsx)(n.a,{href:"/knowledge-filters",children:"knowledge filter"}),", select the filter from the ",(0,i.jsx)(n.strong,{children:"Knowledge Filters"})," list.\nThe filter settings pane opens, and the filter appears in the search field.\nTo remove the filter, close the filter settings pane or clear the filter from the search field."]}),"\n",(0,i.jsxs)(n.p,{children:["You can use the filter alone or in combination with a search string.\nIf a knowledge filter has a ",(0,i.jsx)(n.strong,{children:"Search Query"}),", that query is applied in addition to any text string you enter in the search field."]}),"\n",(0,i.jsx)(n.p,{children:"Only one filter can be applied at a time."}),"\n",(0,i.jsx)(n.h3,{id:"default-documents",children:"Default documents"}),"\n",(0,i.jsxs)(n.p,{children:["By default, OpenRAG includes some initial documents about OpenRAG.\nThese documents are ingested automatically during the ",(0,i.jsx)(n.a,{href:"/install#application-onboarding",children:"application onboarding process"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You can use these documents to ask OpenRAG about itself, or to test the ",(0,i.jsx)(n.a,{href:"/chat",children:(0,i.jsx)(n.strong,{children:"Chat"})})," feature before uploading your own documents."]}),"\n",(0,i.jsxs)(n.p,{children:["If you ",(0,i.jsx)(n.a,{href:"#delete-knowledge",children:"delete these documents"}),", then you won't be able to ask OpenRAG about itself and it's own functionality.\nIt is recommended that you keep these documents, and use ",(0,i.jsx)(n.a,{href:"/knowledge-filters",children:"filters"})," to separate them from your other knowledge.\nAn ",(0,i.jsx)(n.strong,{children:"OpenRAG Docs"})," filter is created automatically for these documents."]}),"\n",(0,i.jsx)(n.h2,{id:"auth",children:"OpenSearch authentication and document access"}),"\n",(0,i.jsxs)(n.p,{children:["When you ",(0,i.jsx)(n.a,{href:"/install-options",children:"install OpenRAG"}),", you provide the initial configuration values for your OpenRAG services, including authentication credentials for OpenSearch and OAuth connectors.\nThis configuration determines how OpenRAG authenticates with your deployment's OpenSearch instance, and it controls user access to documents in your knowledge base:"]}),"\n",(0,i.jsx)(d.Ay,{}),"\n",(0,i.jsx)(n.h2,{id:"opensearch-indexes",children:"OpenSearch indexes"}),"\n",(0,i.jsxs)(n.p,{children:["An ",(0,i.jsx)(n.a,{href:"https://docs.opensearch.org/latest/getting-started/intro/#index",children:"OpenSearch index"})," is a collection of documents in an OpenSearch database."]}),"\n",(0,i.jsxs)(n.p,{children:["By default, all documents you upload to your OpenRAG knowledge base are stored in an index named ",(0,i.jsx)(n.code,{children:"documents"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["It is possible to change the index name by ",(0,i.jsx)(n.a,{href:"/agents#inspect-and-modify-flows",children:"editing the ingestion flow"}),".\nHowever, this can impact dependent processes, such as the ",(0,i.jsx)(n.a,{href:"/knowledge-filters",children:"filters"})," and ",(0,i.jsx)(n.a,{href:"/chat",children:(0,i.jsx)(n.strong,{children:"Chat"})}),", that reference the ",(0,i.jsx)(n.code,{children:"documents"})," index by default.\nMake sure you edit other flows as needed to ensure all processes use the same index name."]}),"\n",(0,i.jsxs)(n.p,{children:["If you encounter errors or unexpected behavior after changing the index name, you can ",(0,i.jsx)(n.a,{href:"/agents#revert-a-built-in-flow-to-its-original-configuration",children:"revert the flows to their original configuration"}),", or ",(0,i.jsx)(n.a,{href:"/knowledge#delete-knowledge",children:"delete knowledge"})," to clear the existing documents from your knowledge base."]}),"\n",(0,i.jsx)(n.h2,{id:"knowledge-ingestion-settings",children:"Knowledge ingestion settings"}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"Knowledge ingestion settings apply to documents you upload after making the changes.\nDocuments uploaded before changing these settings aren't reprocessed."})}),"\n",(0,i.jsx)(n.p,{children:"After changing knowledge ingestion settings, you must determine if you need to reupload any documents to be consistent with the new settings."}),"\n",(0,i.jsx)(n.p,{children:"It isn't always necessary to reupload documents after changing knowledge ingestion settings.\nFor example, it is typical to upload some documents with OCR enabled and others without OCR enabled."}),"\n",(0,i.jsxs)(n.p,{children:["If needed, you can use ",(0,i.jsx)(n.a,{href:"/knowledge-filters",children:"filters"})," to separate documents that you uploaded with different settings, such as different embedding models."]}),"\n",(0,i.jsx)(n.h3,{id:"set-the-embedding-model-and-dimensions",children:"Set the embedding model and dimensions"}),"\n",(0,i.jsxs)(n.p,{children:["When you ",(0,i.jsx)(n.a,{href:"/install-options",children:"install OpenRAG"}),", you select at least one embedding model during the ",(0,i.jsx)(n.a,{href:"/install#application-onboarding",children:"application onboarding process"}),".\nOpenRAG automatically detects and configures the appropriate vector dimensions for your selected embedding model, ensuring optimal search performance and compatibility."]}),"\n",(0,i.jsxs)(n.p,{children:["In the OpenRAG repository, you can find the complete list of supported models in ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/services/models_service.py",children:(0,i.jsx)(n.code,{children:"models_service.py"})})," and the corresponding vector dimensions in ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py",children:(0,i.jsx)(n.code,{children:"settings.py"})}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["During the application onboarding process, you can select from the supported models.\nThe default embedding dimension is ",(0,i.jsx)(n.code,{children:"1536"}),", and the default model is the OpenAI ",(0,i.jsx)(n.code,{children:"text-embedding-3-small"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["If you want to use an unsupported model, you must manually set the model in your ",(0,i.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,i.jsx)(n.code,{children:".env"})," file"]}),".\nIf you use an unsupported embedding model that doesn't have defined dimensions in ",(0,i.jsx)(n.code,{children:"settings.py"}),", then OpenRAG falls back to the default dimensions (1536) and logs a warning. OpenRAG's OpenSearch instance and flows continue to work, but ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/think/topics/vector-search",children:"similarity search"})," quality can be affected if the actual model dimensions aren't 1536."]}),"\n",(0,i.jsxs)(n.p,{children:["To change the embedding model after onboarding, modify the embedding model configuration on the OpenRAG ",(0,i.jsx)(n.strong,{children:"Settings"})," page or in your ",(0,i.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,i.jsx)(n.code,{children:".env"})," file"]}),".\nThis ensures that all relevant ",(0,i.jsx)(n.a,{href:"/agents",children:"OpenRAG flows"})," are updated to use the new embedding model configuration."]}),"\n",(0,i.jsxs)(n.p,{children:["If you edit these settings in the ",(0,i.jsx)(n.code,{children:".env"})," file, you must ",(0,i.jsx)(n.a,{href:"/manage-services#stop-and-start-containers",children:"stop and restart the OpenRAG containers"})," to apply the changes."]}),"\n",(0,i.jsx)(n.h3,{id:"set-docling-parameters",children:"Set Docling parameters"}),"\n",(0,i.jsxs)(n.p,{children:["OpenRAG uses ",(0,i.jsx)(n.a,{href:"https://docling-project.github.io/docling/",children:"Docling"})," for document ingestion because it supports many file formats, processes tables and images well, and performs efficiently."]}),"\n",(0,i.jsxs)(n.p,{children:["When you ",(0,i.jsx)(n.a,{href:"/ingestion",children:"upload documents"}),", Docling processes the files, splits them into chunks, and stores them as separate, structured documents in your OpenSearch knowledge base."]}),"\n",(0,i.jsx)(n.h4,{id:"select-a-docling-implementation",children:"Select a Docling implementation"}),"\n",(0,i.jsx)(n.p,{children:"You can use either Docling Serve or OpenRAG's built-in Docling ingestion pipeline to process documents."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Docling Serve ingestion"}),": By default, OpenRAG uses ",(0,i.jsx)(n.a,{href:"https://github.com/docling-project/docling-serve",children:"Docling Serve"}),".\nIt starts a local ",(0,i.jsx)(n.code,{children:"docling serve"})," process, and then runs Docling ingestion through the Docling Serve API."]}),"\n",(0,i.jsxs)(n.p,{children:["To use a remote ",(0,i.jsx)(n.code,{children:"docling serve"})," instance or your own local instance, set ",(0,i.jsx)(n.code,{children:"DOCLING_SERVE_URL=http://**HOST_IP**:5001"})," in your ",(0,i.jsxs)(n.a,{href:"/reference/configuration#document-processing-settings",children:["OpenRAG ",(0,i.jsx)(n.code,{children:".env"})," file"]}),".\nThe service must run on port 5001."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Built-in Docling ingestion"}),": If you want to use OpenRAG's built-in Docling ingestion pipeline instead of the separate Docling Serve service, set ",(0,i.jsx)(n.code,{children:"DISABLE_INGEST_WITH_LANGFLOW=true"})," in your ",(0,i.jsxs)(n.a,{href:"/reference/configuration#document-processing-settings",children:["OpenRAG ",(0,i.jsx)(n.code,{children:".env"})," file"]}),".\nThe built-in pipeline uses the Docling processor directly instead of through the Docling Serve API.\nFor the underlying functionality, see ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/models/processors.py#L58",children:(0,i.jsx)(n.code,{children:"processors.py"})})," in the OpenRAG repository."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"configure-docling-ingestion-settings",children:"Configure Docling ingestion settings"}),"\n",(0,i.jsxs)(n.p,{children:["To modify the Docling document processing and embedding parameters, click ",(0,i.jsx)(r.A,{name:"Settings2","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Settings"})," in OpenRAG, and then find the ",(0,i.jsx)(n.strong,{children:"Knowledge Ingest"})," section."]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["The TUI warns you if ",(0,i.jsx)(n.code,{children:"docling serve"})," isn't running.\nFor information about starting and stopping OpenRAG native services, like Docling, see ",(0,i.jsx)(n.a,{href:"/manage-services",children:"Manage OpenRAG services"}),"."]})}),"\n",(0,i.jsx)(n.p,{children:"You can edit the following parameters:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Embedding model"}),": Select the model to use to generate vector embeddings for your documents."]}),"\n",(0,i.jsxs)(n.p,{children:["This is initially set during installation.\nThe recommended way to change this setting is in the OpenRAG ",(0,i.jsx)(r.A,{name:"Settings2","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Settings"})," or your ",(0,i.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,i.jsx)(n.code,{children:".env"})," file"]}),".\nThis ensures that all relevant ",(0,i.jsx)(n.a,{href:"/agents",children:"OpenRAG flows"})," are updated to use the new embedding model configuration."]}),"\n",(0,i.jsxs)(n.p,{children:["If you uploaded documents prior to changing the embedding model, you can ",(0,i.jsx)(n.a,{href:"/knowledge-filters",children:"create filters"})," to separate documents embedded with different models, or you can reupload all documents to regenerate embeddings with the new model.\nIf you want to use multiple embeddings models, similarity search (in the ",(0,i.jsx)(n.strong,{children:"Chat"}),") can take longer as it searches each model's embeddings separately."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Chunk size"}),": Set the number of characters for each text chunk when breaking down a file.\nLarger chunks yield more context per chunk, but can include irrelevant information. Smaller chunks yield more precise semantic search, but can lack context.\nThe default value is 1000 characters, which is usually a good balance between context and precision."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Chunk overlap"}),": Set the number of characters to overlap over chunk boundaries.\nUse larger overlap values for documents where context is most important. Use smaller overlap values for simpler documents or when optimization is most important.\nThe default value is 200 characters, which represents an overlap of 20 percent if the ",(0,i.jsx)(n.strong,{children:"Chunk size"})," is 1000. This is suitable for general use. For faster processing, decrease the overlap to approximately 10 percent. For more complex documents where you need to preserve context across chunks, increase it to approximately 40 percent."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Table structure"}),": Enables Docling's ",(0,i.jsx)(n.a,{href:"https://docling-project.github.io/docling/reference/document_converter/",children:(0,i.jsx)(n.code,{children:"DocumentConverter"})})," tool for parsing tables. Instead of treating tables as plain text, tables are output as structured table data with preserved relationships and metadata. This option is enabled by default."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"OCR"}),": Enables Optical Character Recognition (OCR) processing when extracting text from images and ingesting scanned documents. This setting is best suited for processing text-based documents faster with Docling's ",(0,i.jsx)(n.a,{href:"https://docling-project.github.io/docling/reference/document_converter/",children:(0,i.jsx)(n.code,{children:"DocumentConverter"})}),". Images are ignored and not processed."]}),"\n",(0,i.jsx)(n.p,{children:"This option is disabled by default. Enabling OCR can slow ingestion performance."}),"\n",(0,i.jsxs)(n.p,{children:["If OpenRAG detects that the local machine is running on macOS, OpenRAG uses the ",(0,i.jsx)(n.a,{href:"https://www.piwheels.org/project/ocrmac/",children:"ocrmac"})," OCR engine. Other platforms use ",(0,i.jsx)(n.a,{href:"https://www.jaided.ai/easyocr/",children:"easyocr"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Picture descriptions"}),": Only applicable if ",(0,i.jsx)(n.strong,{children:"OCR"})," is enabled. Adds image descriptions generated by the ",(0,i.jsx)(n.a,{href:"https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct",children:(0,i.jsx)(n.code,{children:"SmolVLM-256M-Instruct"})})," model. Enabling picture descriptions can slow ingestion performance."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"set-the-local-documents-path",children:"Set the local documents path"}),"\n",(0,i.jsxs)(n.p,{children:["The default path for local uploads is ",(0,i.jsx)(n.code,{children:"~/.openrag/documents"}),". This is mounted to the ",(0,i.jsx)(n.code,{children:"/app/openrag-documents/"})," directory inside the OpenRAG container. Files added to the host or container directory are visible in both locations."]}),"\n",(0,i.jsxs)(n.p,{children:["To change this location, modify the ",(0,i.jsx)(n.strong,{children:"Documents Paths"})," variable in either the ",(0,i.jsxs)(n.a,{href:"/install#setup",children:[(0,i.jsx)(n.strong,{children:"Basic/Advanced Setup"})," menu"]})," or in your ",(0,i.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,i.jsx)(n.code,{children:".env"})," file"]}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"delete-knowledge",children:"Delete knowledge"}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"This is a destructive operation that cannot be undone."})}),"\n",(0,i.jsxs)(n.p,{children:["To delete documents from your knowledge base, click ",(0,i.jsx)(r.A,{name:"Library","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Knowledge"}),", use the checkboxes to select one or more documents, and then click ",(0,i.jsx)(n.strong,{children:"Delete"}),".\nIf you select the checkbox at the top of the list, all documents are selected and your entire knowledge base will be deleted."]}),"\n",(0,i.jsxs)(n.p,{children:["To delete an individual document, you can also click ",(0,i.jsx)(r.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"More"})," next to that document, and then select ",(0,i.jsx)(n.strong,{children:"Delete"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["To completely clear your entire knowledge base and OpenSearch index, ",(0,i.jsx)(n.a,{href:"/manage-services#reset-containers",children:"reset your OpenRAG containers"})," or ",(0,i.jsx)(n.a,{href:"/reinstall",children:"reinstall OpenRAG"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/ingestion",children:"Ingest knowledge"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/knowledge-filters",children:"Filter knowledge"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/chat",children:"Chat with knowledge"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/agents#inspect-and-modify-flows",children:"Inspect and modify flows"})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(g,{...e})}):g(e)}},6567:(e,n,s)=>{s.d(n,{Ay:()=>d,RM:()=>o});var t=s(4848),i=s(8453);const o=[];function r(e){const n={a:"a",p:"p",strong:"strong",...(0,i.R)(),...e.components};return(0,t.jsxs)(n.p,{children:["In no-auth mode, all documents are attributed to ",(0,t.jsx)(n.strong,{children:"Anonymous User"})," because there is no distinct document ownership or unique JWTs. For more control over document ownership and visibility, use OAuth mode. For more information, see ",(0,t.jsx)(n.a,{href:"/knowledge#auth",children:"OpenSearch authentication and document access"}),"."]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(r,{...e})}):r(e)}},7637:(e,n,s)=>{s.d(n,{Ay:()=>d,RM:()=>o});var t=s(4848),i=s(8453);const o=[];function r(e){const n={a:"a",code:"code",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"No-auth mode"}),": If you select ",(0,t.jsx)(n.strong,{children:"Basic Setup"})," in the ",(0,t.jsx)(n.a,{href:"/tui",children:"TUI"}),", or your ",(0,t.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,t.jsx)(n.code,{children:".env"})," file"]})," doesn't include OAuth credentials, then the OpenRAG OpenSearch instance runs in no-auth mode."]}),"\n",(0,t.jsx)(n.p,{children:"This mode uses one anonymous JWT token for OpenSearch authentication.\nThere is no differentiation between users; all users that access your OpenRAG instance can access all documents uploaded to your knowledge base."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"OAuth mode"}),": If you select ",(0,t.jsx)(n.strong,{children:"Advanced Setup"})," in the ",(0,t.jsx)(n.a,{href:"/tui",children:"TUI"}),", or your ",(0,t.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,t.jsx)(n.code,{children:".env"})," file"]})," includes OAuth credentials, then the OpenRAG OpenSearch instance runs in OAuth mode."]}),"\n",(0,t.jsx)(n.p,{children:"This mode uses a unique JWT token for each OpenRAG user, and each document is tagged with user ownership.\nDocuments are filtered by user owner; users see only the documents that they uploaded or have access to through their cloud storage accounts."}),"\n",(0,t.jsxs)(n.p,{children:["To enable OAuth mode after initial setup, see ",(0,t.jsx)(n.a,{href:"/ingestion#oauth-ingestion",children:"Ingest files with OAuth connectors"}),"."]}),"\n"]}),"\n"]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(r,{...e})}):r(e)}},9179:(e,n,s)=>{s.d(n,{A:()=>o});s(6540);var t=s(7856),i=s(4848);function o({name:e,...n}){const s=t[e];return s?(0,i.jsx)(s,{...n}):null}}}]);
\ No newline at end of file
diff --git a/assets/js/0ba6a408.e346183d.js b/assets/js/0ba6a408.e346183d.js
deleted file mode 100644
index c9019337..00000000
--- a/assets/js/0ba6a408.e346183d.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(globalThis.webpackChunkopenrag_docs=globalThis.webpackChunkopenrag_docs||[]).push([[571],{3227:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>d,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"core-components/knowledge","title":"Configure knowledge","description":"OpenRAG includes a built-in OpenSearch instance that serves as the underlying datastore for your knowledge (documents).","source":"@site/docs/core-components/knowledge.mdx","sourceDirName":"core-components","slug":"/knowledge","permalink":"/knowledge","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/core-components/knowledge.mdx","tags":[],"version":"current","frontMatter":{"title":"Configure knowledge","slug":"/knowledge"},"sidebar":"tutorialSidebar","previous":{"title":"Flows","permalink":"/agents"},"next":{"title":"Ingest knowledge","permalink":"/ingestion"}}');var i=s(4848),o=s(8453),r=s(9179),a=s(7637);const d={title:"Configure knowledge",slug:"/knowledge"},l=void 0,c={},h=[{value:"Browse knowledge",id:"browse-knowledge",level:2},{value:"Default documents",id:"default-documents",level:3},{value:"OpenSearch authentication and document access",id:"auth",level:2},...a.RM,{value:"OpenSearch indexes",id:"opensearch-indexes",level:2},{value:"Knowledge ingestion settings",id:"knowledge-ingestion-settings",level:2},{value:"Set the embedding model and dimensions",id:"set-the-embedding-model-and-dimensions",level:3},{value:"Set Docling parameters",id:"set-docling-parameters",level:3},{value:"Set the local documents path",id:"set-the-local-documents-path",level:3},{value:"Delete knowledge",id:"delete-knowledge",level:2},{value:"See also",id:"see-also",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["OpenRAG includes a built-in ",(0,i.jsx)(n.a,{href:"https://docs.opensearch.org/latest/",children:"OpenSearch"})," instance that serves as the underlying datastore for your ",(0,i.jsx)(n.em,{children:"knowledge"})," (documents).\nThis specialized database is used to store and retrieve your documents and the associated vector data (embeddings)."]}),"\n",(0,i.jsxs)(n.p,{children:["The documents in your OpenSearch knowledge base provide specialized context in addition to the general knowledge available to the language model that you select when you ",(0,i.jsx)(n.a,{href:"/install-options",children:"install OpenRAG"})," or ",(0,i.jsx)(n.a,{href:"/agents",children:"edit a flow"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You can ",(0,i.jsx)(n.a,{href:"/ingestion",children:"upload documents"})," from a variety of sources to populate your knowledge base with unique content, such as your own company documents, research papers, or websites.\nDocuments are processed through OpenRAG's knowledge ingestion flows with Docling."]}),"\n",(0,i.jsxs)(n.p,{children:["Then, the ",(0,i.jsxs)(n.a,{href:"/chat",children:["OpenRAG ",(0,i.jsx)(n.strong,{children:"Chat"})]})," can run ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/think/topics/vector-search",children:"similarity searches"})," against your OpenSearch database to retrieve relevant information and generate context-aware responses."]}),"\n",(0,i.jsxs)(n.p,{children:["You can configure how documents are ingested and how the ",(0,i.jsx)(n.strong,{children:"Chat"})," interacts with your knowledge base."]}),"\n",(0,i.jsx)(n.h2,{id:"browse-knowledge",children:"Browse knowledge"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"Knowledge"})," page lists the documents OpenRAG has ingested into your OpenSearch database, specifically in an ",(0,i.jsx)(n.a,{href:"https://docs.opensearch.org/latest/getting-started/intro/#index",children:"OpenSearch index"})," named ",(0,i.jsx)(n.code,{children:"documents"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["To explore the raw contents of your knowledge base, click ",(0,i.jsx)(r.A,{name:"Library","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Knowledge"})," to get a list of all ingested documents.\nClick a document to view the chunks produced from splitting the document during ingestion."]}),"\n",(0,i.jsx)(n.h3,{id:"default-documents",children:"Default documents"}),"\n",(0,i.jsxs)(n.p,{children:["By default, OpenRAG includes some initial documents about OpenRAG.\nThese documents are ingested automatically during the ",(0,i.jsx)(n.a,{href:"/install#application-onboarding",children:"application onboarding process"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["You can use these documents to ask OpenRAG about itself, and to test the ",(0,i.jsx)(n.a,{href:"/chat",children:(0,i.jsx)(n.strong,{children:"Chat"})})," feature before uploading your own documents."]}),"\n",(0,i.jsxs)(n.p,{children:["If you ",(0,i.jsx)(n.a,{href:"#delete-knowledge",children:"delete"})," these documents, you won't be able to ask OpenRAG about itself and it's own functionality.\nIt is recommended that you keep these documents, and use ",(0,i.jsx)(n.a,{href:"/knowledge-filters",children:"filters"})," to separate them from your other knowledge."]}),"\n",(0,i.jsx)(n.h2,{id:"auth",children:"OpenSearch authentication and document access"}),"\n",(0,i.jsxs)(n.p,{children:["When you ",(0,i.jsx)(n.a,{href:"/install-options",children:"install OpenRAG"}),", you provide the initial configuration values for your OpenRAG services, including authentication credentials for OpenSearch and OAuth connectors.\nThis configuration determines how OpenRAG authenticates with your deployment's OpenSearch instance, and it controls user access to documents in your knowledge base:"]}),"\n",(0,i.jsx)(a.Ay,{}),"\n",(0,i.jsx)(n.h2,{id:"opensearch-indexes",children:"OpenSearch indexes"}),"\n",(0,i.jsxs)(n.p,{children:["An ",(0,i.jsx)(n.a,{href:"https://docs.opensearch.org/latest/getting-started/intro/#index",children:"OpenSearch index"})," is a collection of documents in an OpenSearch database."]}),"\n",(0,i.jsxs)(n.p,{children:["By default, all documents you upload to your OpenRAG knowledge base are stored in an index named ",(0,i.jsx)(n.code,{children:"documents"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["It is possible to change the index name by ",(0,i.jsx)(n.a,{href:"/agents#inspect-and-modify-flows",children:"editing the ingestion flow"}),".\nHowever, this can impact dependent processes, such as the ",(0,i.jsx)(n.a,{href:"/knowledge-filters",children:"filters"})," and ",(0,i.jsx)(n.a,{href:"/chat",children:(0,i.jsx)(n.strong,{children:"Chat"})})," flow, that reference the ",(0,i.jsx)(n.code,{children:"documents"})," index by default.\nMake sure you edit other flows as needed to ensure all processes use the same index name."]}),"\n",(0,i.jsxs)(n.p,{children:["If you encounter errors or unexpected behavior after changing the index name, you can ",(0,i.jsx)(n.a,{href:"/agents#revert-a-built-in-flow-to-its-original-configuration",children:"revert the flows to their original configuration"}),", or ",(0,i.jsx)(n.a,{href:"/knowledge#delete-knowledge",children:"delete knowledge"})," to clear the existing documents from your knowledge base."]}),"\n",(0,i.jsx)(n.h2,{id:"knowledge-ingestion-settings",children:"Knowledge ingestion settings"}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"Knowledge ingestion settings apply to documents you upload after making the changes.\nDocuments uploaded before changing these settings aren't reprocessed."})}),"\n",(0,i.jsx)(n.p,{children:"After changing knowledge ingestion settings, you must determine if you need to reupload any documents to be consistent with the new settings."}),"\n",(0,i.jsx)(n.p,{children:"It isn't always necessary to reupload documents after changing knowledge ingestion settings.\nFor example, it is typical to upload some documents with OCR enabled and others without OCR enabled."}),"\n",(0,i.jsxs)(n.p,{children:["If needed, you can use ",(0,i.jsx)(n.a,{href:"/knowledge-filters",children:"filters"})," to separate documents that you uploaded with different settings, such as different embedding models."]}),"\n",(0,i.jsx)(n.h3,{id:"set-the-embedding-model-and-dimensions",children:"Set the embedding model and dimensions"}),"\n",(0,i.jsxs)(n.p,{children:["When you ",(0,i.jsx)(n.a,{href:"/install-options",children:"install OpenRAG"}),", you select at least one embedding model during the ",(0,i.jsx)(n.a,{href:"/install#application-onboarding",children:"application onboarding process"}),".\nOpenRAG automatically detects and configures the appropriate vector dimensions for your selected embedding model, ensuring optimal search performance and compatibility."]}),"\n",(0,i.jsxs)(n.p,{children:["In the OpenRAG repository, you can find the complete list of supported models in ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/services/models_service.py",children:(0,i.jsx)(n.code,{children:"models_service.py"})})," and the corresponding vector dimensions in ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py",children:(0,i.jsx)(n.code,{children:"settings.py"})}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["During the application onboarding process, you can select from the supported models.\nThe default embedding dimension is ",(0,i.jsx)(n.code,{children:"1536"}),", and the default model is the OpenAI ",(0,i.jsx)(n.code,{children:"text-embedding-3-small"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["If you want to use an unsupported model, you must manually set the model in your ",(0,i.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,i.jsx)(n.code,{children:".env"})," file"]}),".\nIf you use an unsupported embedding model that doesn't have defined dimensions in ",(0,i.jsx)(n.code,{children:"settings.py"}),", then OpenRAG falls back to the default dimensions (1536) and logs a warning. OpenRAG's OpenSearch instance and flows continue to work, but ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/think/topics/vector-search",children:"similarity search"})," quality can be affected if the actual model dimensions aren't 1536."]}),"\n",(0,i.jsxs)(n.p,{children:["To change the embedding model after onboarding, it is recommended that you modify the embedding model setting in the OpenRAG ",(0,i.jsx)(n.strong,{children:"Settings"})," page or in your ",(0,i.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,i.jsx)(n.code,{children:".env"})," file"]}),".\nThis will automatically update all relevant ",(0,i.jsx)(n.a,{href:"/agents",children:"OpenRAG flows"})," to use the new embedding model configuration."]}),"\n",(0,i.jsx)(n.h3,{id:"set-docling-parameters",children:"Set Docling parameters"}),"\n",(0,i.jsxs)(n.p,{children:["OpenRAG uses ",(0,i.jsx)(n.a,{href:"https://docling-project.github.io/docling/",children:"Docling"})," for document ingestion because it supports many file formats, processes tables and images well, and performs efficiently."]}),"\n",(0,i.jsxs)(n.p,{children:["When you ",(0,i.jsx)(n.a,{href:"/ingestion",children:"upload documents"}),", Docling processes the files, splits them into chunks, and stores them as separate, structured documents in your OpenSearch knowledge base."]}),"\n",(0,i.jsx)(n.p,{children:"You can use either Docling Serve or OpenRAG's built-in Docling ingestion pipeline to process documents."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Docling Serve ingestion"}),": By default, OpenRAG uses ",(0,i.jsx)(n.a,{href:"https://github.com/docling-project/docling-serve",children:"Docling Serve"}),".\nThis means that OpenRAG starts a ",(0,i.jsx)(n.code,{children:"docling serve"})," process on your local machine and runs Docling ingestion through an API service."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Built-in Docling ingestion"}),": If you want to use OpenRAG's built-in Docling ingestion pipeline instead of the separate Docling Serve service, set ",(0,i.jsx)(n.code,{children:"DISABLE_INGEST_WITH_LANGFLOW=true"})," in your ",(0,i.jsx)(n.a,{href:"/reference/configuration#document-processing-settings",children:"OpenRAG environment variables"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"The built-in pipeline uses the Docling processor directly instead of through the Docling Serve API."}),"\n",(0,i.jsxs)(n.p,{children:["For the underlying functionality, see ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/models/processors.py#L58",children:(0,i.jsx)(n.code,{children:"processors.py"})})," in the OpenRAG repository."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["To modify the Docling ingestion and embedding parameters, click ",(0,i.jsx)(r.A,{name:"Settings2","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Settings"})," in the OpenRAG user interface."]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["OpenRAG warns you if ",(0,i.jsx)(n.code,{children:"docling serve"})," isn't running.\nFor information about starting and stopping OpenRAG native services, like Docling, see ",(0,i.jsx)(n.a,{href:"/manage-services",children:"Manage OpenRAG services"}),"."]})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Embedding model"}),": Select the model to use to generate vector embeddings for your documents."]}),"\n",(0,i.jsxs)(n.p,{children:["This is initially set during installation.\nThe recommended way to change this setting is in the OpenRAG ",(0,i.jsx)(n.strong,{children:"Settings"})," or your ",(0,i.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,i.jsx)(n.code,{children:".env"})," file"]}),".\nThis will automatically update all relevant ",(0,i.jsx)(n.a,{href:"/agents",children:"OpenRAG flows"})," to use the new embedding model configuration."]}),"\n",(0,i.jsxs)(n.p,{children:["If you uploaded documents prior to changing the embedding model, you can ",(0,i.jsx)(n.a,{href:"/knowledge-filters",children:"create filters"})," to separate documents embedded with different models, or you can reupload all documents to regenerate embeddings with the new model.\nIf you want to use multiple embeddings models, similarity search (in the ",(0,i.jsx)(n.strong,{children:"Chat"}),") can take longer as it searching each model's embeddings separately."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Chunk size"}),": Set the number of characters for each text chunk when breaking down a file.\nLarger chunks yield more context per chunk, but can include irrelevant information. Smaller chunks yield more precise semantic search, but can lack context.\nThe default value is 1000 characters, which is usually a good balance between context and precision."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Chunk overlap"}),": Set the number of characters to overlap over chunk boundaries.\nUse larger overlap values for documents where context is most important. Use smaller overlap values for simpler documents or when optimization is most important.\nThe default value is 200 characters, which represents an overlap of 20 percent if the ",(0,i.jsx)(n.strong,{children:"Chunk size"})," is 1000. This is suitable for general use. For faster processing, decrease the overlap to approximately 10 percent. For more complex documents where you need to preserve context across chunks, increase it to approximately 40 percent."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Table Structure"}),": Enables Docling's ",(0,i.jsx)(n.a,{href:"https://docling-project.github.io/docling/reference/document_converter/",children:(0,i.jsx)(n.code,{children:"DocumentConverter"})})," tool for parsing tables. Instead of treating tables as plain text, tables are output as structured table data with preserved relationships and metadata. This option is enabled by default."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"OCR"}),": Enables Optical Character Recognition (OCR) processing when extracting text from images and ingesting scanned documents. This setting is best suited for processing text-based documents faster with Docling's ",(0,i.jsx)(n.a,{href:"https://docling-project.github.io/docling/reference/document_converter/",children:(0,i.jsx)(n.code,{children:"DocumentConverter"})}),". Images are ignored and not processed."]}),"\n",(0,i.jsx)(n.p,{children:"This option is disabled by default. Enabling OCR can slow ingestion performance."}),"\n",(0,i.jsxs)(n.p,{children:["If OpenRAG detects that the local machine is running on macOS, OpenRAG uses the ",(0,i.jsx)(n.a,{href:"https://www.piwheels.org/project/ocrmac/",children:"ocrmac"})," OCR engine. Other platforms use ",(0,i.jsx)(n.a,{href:"https://www.jaided.ai/easyocr/",children:"easyocr"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Picture descriptions"}),": Only applicable if ",(0,i.jsx)(n.strong,{children:"OCR"})," is enabled. Adds image descriptions generated by the ",(0,i.jsx)(n.a,{href:"https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct",children:(0,i.jsx)(n.code,{children:"SmolVLM-256M-Instruct"})})," model. Enabling picture descriptions can slow ingestion performance."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"set-the-local-documents-path",children:"Set the local documents path"}),"\n",(0,i.jsxs)(n.p,{children:["The default path for local uploads is ",(0,i.jsx)(n.code,{children:"~/.openrag/documents"}),". This is mounted to the ",(0,i.jsx)(n.code,{children:"/app/openrag-documents/"})," directory inside the OpenRAG container. Files added to the host or container directory are visible in both locations."]}),"\n",(0,i.jsxs)(n.p,{children:["To change this location, modify the ",(0,i.jsx)(n.strong,{children:"Documents Paths"})," variable in either the ",(0,i.jsxs)(n.a,{href:"/install#setup",children:[(0,i.jsx)(n.strong,{children:"Basic/Advanced Setup"})," menu"]})," or in your ",(0,i.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,i.jsx)(n.code,{children:".env"})," file"]}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"delete-knowledge",children:"Delete knowledge"}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"This is a destructive operation that cannot be undone."})}),"\n",(0,i.jsxs)(n.p,{children:["To clear your entire knowledge base, ",(0,i.jsx)(n.a,{href:"/manage-services#reset-containers",children:"reset your OpenRAG containers"})," or ",(0,i.jsx)(n.a,{href:"/reinstall",children:"reinstall OpenRAG"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/ingestion",children:"Ingest knowledge"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/knowledge-filters",children:"Filter knowledge"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/chat",children:"Chat with knowledge"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/agents#inspect-and-modify-flows",children:"Inspect and modify flows"})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},7637:(e,n,s)=>{s.d(n,{Ay:()=>a,RM:()=>o});var t=s(4848),i=s(8453);const o=[];function r(e){const n={a:"a",code:"code",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"No-auth mode"}),": If you select ",(0,t.jsx)(n.strong,{children:"Basic Setup"})," in the ",(0,t.jsx)(n.a,{href:"/tui",children:"TUI"}),", or your ",(0,t.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,t.jsx)(n.code,{children:".env"})," file"]})," doesn't include OAuth credentials, then the OpenRAG OpenSearch instance runs in no-auth mode."]}),"\n",(0,t.jsx)(n.p,{children:"This mode uses one anonymous JWT token for OpenSearch authentication.\nThere is no differentiation between users; all users that access your OpenRAG instance can access all documents uploaded to your knowledge base."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"OAuth mode"}),": If you select ",(0,t.jsx)(n.strong,{children:"Advanced Setup"})," in the ",(0,t.jsx)(n.a,{href:"/tui",children:"TUI"}),", or your ",(0,t.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,t.jsx)(n.code,{children:".env"})," file"]})," includes OAuth credentials, then the OpenRAG OpenSearch instance runs in OAuth mode."]}),"\n",(0,t.jsx)(n.p,{children:"This mode uses a unique JWT token for each OpenRAG user, and each document is tagged with user ownership.\nDocuments are filtered by user owner; users see only the documents that they uploaded or have access to through their cloud storage accounts."}),"\n",(0,t.jsxs)(n.p,{children:["To enable OAuth mode after initial setup, see ",(0,t.jsx)(n.a,{href:"/ingestion#oauth-ingestion",children:"Ingest files with OAuth connectors"}),"."]}),"\n"]}),"\n"]})}function a(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(r,{...e})}):r(e)}},9179:(e,n,s)=>{s.d(n,{A:()=>o});s(6540);var t=s(7856),i=s(4848);function o({name:e,...n}){const s=t[e];return s?(0,i.jsx)(s,{...n}):null}}}]);
\ No newline at end of file
diff --git a/assets/js/21afe7ac.52236fad.js b/assets/js/21afe7ac.52236fad.js
deleted file mode 100644
index 736d369a..00000000
--- a/assets/js/21afe7ac.52236fad.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(globalThis.webpackChunkopenrag_docs=globalThis.webpackChunkopenrag_docs||[]).push([[961],{3929:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/openrag_tui_dec_2025-c7022e66cc6675f25aced7b8acd8274d.png"},5818:(e,n,t)=>{t.d(n,{Ay:()=>c,RM:()=>r});var i=t(4848),s=t(8453);const r=[];function o(e){const n={code:"code",p:"p",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"GPU acceleration isn't required for most use cases.\nOpenRAG's CPU-only deployment doesn't prevent you from using GPU acceleration in external services, such as Ollama servers."}),"\n",(0,i.jsxs)(n.p,{children:["GPU acceleration is required only for specific use cases, typically involving customization of the ingestion flows or ingestion logic.\nFor example, writing alternate ingest logic in OpenRAG that uses GPUs directly in the container, or customizing the ingestion flows to use Langflow's Docling component with GPU acceleration instead of OpenRAG's ",(0,i.jsx)(n.code,{children:"docling serve"})," service."]})]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},6239:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>c,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"get-started/tui","title":"Use the TUI","description":"The OpenRAG Terminal User Interface (TUI) provides a simplified and guided experience for configuring, managing, and monitoring your OpenRAG deployment directly from the terminal.","source":"@site/docs/get-started/tui.mdx","sourceDirName":"get-started","slug":"/tui","permalink":"/tui","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/tui.mdx","tags":[],"version":"current","frontMatter":{"title":"Use the TUI","slug":"/tui"},"sidebar":"tutorialSidebar","previous":{"title":"Remove OpenRAG","permalink":"/uninstall"},"next":{"title":"Manage services","permalink":"/manage-services"}}');var s=t(4848),r=t(8453),o=t(5818);const c={title:"Use the TUI",slug:"/tui"},a=void 0,d={},l=[{value:"Access the TUI",id:"access-the-tui",level:2},{value:"Navigate the TUI",id:"navigate-the-tui",level:2},{value:"Manage services with the TUI",id:"manage-services-with-the-tui",level:2},{value:"Toggle GPU/CPU mode",id:"toggle-gpucpu-mode",level:2},...o.RM,{value:"Exit the OpenRAG TUI",id:"exit-the-openrag-tui",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"The OpenRAG Terminal User Interface (TUI) provides a simplified and guided experience for configuring, managing, and monitoring your OpenRAG deployment directly from the terminal."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"OpenRAG TUI Interface",src:t(3929).A+"",width:"653",height:"397"})}),"\n",(0,s.jsxs)(n.p,{children:["If you install OpenRAG with the ",(0,s.jsx)(n.a,{href:"/install",children:"automatic installer script"}),", ",(0,s.jsx)(n.a,{href:"/install-uv",children:(0,s.jsx)(n.code,{children:"uv"})}),", or ",(0,s.jsx)(n.a,{href:"/install-uvx",children:(0,s.jsx)(n.code,{children:"uvx"})}),", you use the TUI to manage your OpenRAG deployment.\nThe TUI guides you through the initial setup, automatically manages your OpenRAG ",(0,s.jsx)(n.code,{children:".env"})," and ",(0,s.jsx)(n.code,{children:"docker-compose"})," files, and provides convenient access to ",(0,s.jsx)(n.a,{href:"/manage-services",children:"service management"})," controls."]}),"\n",(0,s.jsxs)(n.p,{children:["In contrast, when you ",(0,s.jsx)(n.a,{href:"/docker",children:"deploy OpenRAG with self-managed services"}),", you must manually configure OpenRAG by preparing a ",(0,s.jsx)(n.code,{children:".env"})," file, and then use Docker or Podman commands to deploy and manage your OpenRAG services."]}),"\n",(0,s.jsx)(n.h2,{id:"access-the-tui",children:"Access the TUI"}),"\n",(0,s.jsxs)(n.p,{children:["If you installed OpenRAG with ",(0,s.jsx)(n.code,{children:"uv"}),", access the TUI with ",(0,s.jsx)(n.code,{children:"uv run openrag"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you installed OpenRAG with the automatic installer script or ",(0,s.jsx)(n.code,{children:"uvx"}),", access the TUI with ",(0,s.jsx)(n.code,{children:"uvx openrag"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"navigate-the-tui",children:"Navigate the TUI"}),"\n",(0,s.jsx)(n.p,{children:"You can navigate the TUI with your mouse or keyboard.\nKeyboard shortcuts for additional menus are printed at the bottom of the TUI screen."}),"\n",(0,s.jsx)(n.h2,{id:"manage-services-with-the-tui",children:"Manage services with the TUI"}),"\n",(0,s.jsxs)(n.p,{children:["Use the TUI's ",(0,s.jsx)(n.strong,{children:"Status"})," page to access controls and information for your OpenRAG services.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/manage-services",children:"Manage OpenRAG services"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"toggle-gpucpu-mode",children:"Toggle GPU/CPU mode"}),"\n",(0,s.jsx)(n.p,{children:"You can toggle between GPU and CPU mode from within the TUI if your system has compatible GPU hardware and drivers installed."}),"\n",(0,s.jsxs)(n.p,{children:["In the TUI, click ",(0,s.jsx)(n.strong,{children:"Status"}),", and then click ",(0,s.jsx)(n.strong,{children:"Switch to GPU Mode"})," or ",(0,s.jsx)(n.strong,{children:"Switch to CPU Mode"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["This change requires restarting all OpenRAG services because each mode has its own ",(0,s.jsx)(n.code,{children:"docker-compose"})," file."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(o.Ay,{})}),"\n",(0,s.jsx)(n.h2,{id:"exit-the-openrag-tui",children:"Exit the OpenRAG TUI"}),"\n",(0,s.jsxs)(n.p,{children:["To exit the OpenRAG TUI, press ",(0,s.jsx)("kbd",{children:"q"})," on the TUI main page."]}),"\n",(0,s.jsx)(n.p,{children:"Exiting the TUI doesn't stop your OpenRAG services.\nYour OpenRAG services continue to run until they are stopped from within the TUI or by another process that inadvertently stops them."}),"\n",(0,s.jsxs)(n.p,{children:["To restart the TUI, see ",(0,s.jsx)(n.a,{href:"#access-the-tui",children:"Access the TUI"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>c});var i=t(6540);const s={},r=i.createContext(s);function o(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/21afe7ac.a600b84a.js b/assets/js/21afe7ac.a600b84a.js
new file mode 100644
index 00000000..87c43084
--- /dev/null
+++ b/assets/js/21afe7ac.a600b84a.js
@@ -0,0 +1 @@
+"use strict";(globalThis.webpackChunkopenrag_docs=globalThis.webpackChunkopenrag_docs||[]).push([[961],{3929:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/openrag_tui_dec_2025-c7022e66cc6675f25aced7b8acd8274d.png"},5818:(e,n,t)=>{t.d(n,{Ay:()=>a,RM:()=>r});var i=t(4848),s=t(8453);const r=[];function o(e){const n={p:"p",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"GPU acceleration isn't required for most use cases.\nOpenRAG's CPU-only deployment doesn't prevent you from using GPU acceleration in external services, such as Ollama servers."}),"\n",(0,i.jsx)(n.p,{children:"GPU acceleration is required only for specific use cases, typically involving customization of the ingestion flows or ingestion logic.\nFor example, writing alternate ingest logic in OpenRAG that uses GPUs directly in the container, or customizing the ingestion flows to use Langflow's Docling component with GPU acceleration instead of OpenRAG's Docling Serve service."})]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},6239:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>u,frontMatter:()=>a,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"get-started/tui","title":"Use the TUI","description":"The OpenRAG Terminal User Interface (TUI) provides a simplified and guided experience for configuring, managing, and monitoring your OpenRAG deployment directly from the terminal.","source":"@site/docs/get-started/tui.mdx","sourceDirName":"get-started","slug":"/tui","permalink":"/tui","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/tui.mdx","tags":[],"version":"current","frontMatter":{"title":"Use the TUI","slug":"/tui"},"sidebar":"tutorialSidebar","previous":{"title":"Remove OpenRAG","permalink":"/uninstall"},"next":{"title":"Manage services","permalink":"/manage-services"}}');var s=t(4848),r=t(8453),o=t(5818);const a={title:"Use the TUI",slug:"/tui"},c=void 0,l={},d=[{value:"Access the TUI",id:"access-the-tui",level:2},{value:"Navigate the TUI",id:"navigate-the-tui",level:2},{value:"Manage services with the TUI",id:"manage-services-with-the-tui",level:2},{value:"Toggle GPU/CPU mode",id:"toggle-gpucpu-mode",level:2},...o.RM,{value:"Exit the OpenRAG TUI",id:"exit-the-openrag-tui",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"The OpenRAG Terminal User Interface (TUI) provides a simplified and guided experience for configuring, managing, and monitoring your OpenRAG deployment directly from the terminal."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"OpenRAG TUI Interface",src:t(3929).A+"",width:"653",height:"397"})}),"\n",(0,s.jsxs)(n.p,{children:["If you install OpenRAG with the ",(0,s.jsx)(n.a,{href:"/install",children:"automatic installer script"}),", ",(0,s.jsx)(n.a,{href:"/install-uv",children:(0,s.jsx)(n.code,{children:"uv"})}),", or ",(0,s.jsx)(n.a,{href:"/install-uvx",children:(0,s.jsx)(n.code,{children:"uvx"})}),", you use the TUI to manage your OpenRAG deployment.\nThe TUI guides you through the initial setup, automatically manages your OpenRAG ",(0,s.jsx)(n.code,{children:".env"})," and ",(0,s.jsx)(n.code,{children:"docker-compose"})," files, and provides convenient access to ",(0,s.jsx)(n.a,{href:"/manage-services",children:"service management"})," controls."]}),"\n",(0,s.jsxs)(n.p,{children:["In contrast, when you ",(0,s.jsx)(n.a,{href:"/docker",children:"deploy OpenRAG with self-managed services"}),", you must manually configure OpenRAG by preparing a ",(0,s.jsx)(n.code,{children:".env"})," file, and then use Docker or Podman commands to deploy and manage your OpenRAG services."]}),"\n",(0,s.jsx)(n.h2,{id:"access-the-tui",children:"Access the TUI"}),"\n",(0,s.jsxs)(n.p,{children:["If you installed OpenRAG with ",(0,s.jsx)(n.code,{children:"uv"}),", access the TUI with ",(0,s.jsx)(n.code,{children:"uv run openrag"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you installed OpenRAG with the automatic installer script or ",(0,s.jsx)(n.code,{children:"uvx"}),", access the TUI with ",(0,s.jsx)(n.code,{children:"uvx openrag"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"navigate-the-tui",children:"Navigate the TUI"}),"\n",(0,s.jsx)(n.p,{children:"You can navigate the TUI with your mouse or keyboard.\nKeyboard shortcuts for additional menus are printed at the bottom of the TUI screen."}),"\n",(0,s.jsx)(n.h2,{id:"manage-services-with-the-tui",children:"Manage services with the TUI"}),"\n",(0,s.jsxs)(n.p,{children:["Use the TUI's ",(0,s.jsx)(n.strong,{children:"Status"})," page to access controls and information for your OpenRAG services.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/manage-services",children:"Manage OpenRAG services"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"toggle-gpucpu-mode",children:"Toggle GPU/CPU mode"}),"\n",(0,s.jsx)(n.p,{children:"You can toggle between GPU and CPU mode from within the TUI if your system has compatible GPU hardware and drivers installed."}),"\n",(0,s.jsxs)(n.p,{children:["In the TUI, click ",(0,s.jsx)(n.strong,{children:"Status"}),", and then click ",(0,s.jsx)(n.strong,{children:"Switch to GPU Mode"})," or ",(0,s.jsx)(n.strong,{children:"Switch to CPU Mode"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["This change requires restarting all OpenRAG services because each mode has its own ",(0,s.jsx)(n.code,{children:"docker-compose"})," file."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(o.Ay,{})}),"\n",(0,s.jsx)(n.h2,{id:"exit-the-openrag-tui",children:"Exit the OpenRAG TUI"}),"\n",(0,s.jsxs)(n.p,{children:["To exit the OpenRAG TUI, press ",(0,s.jsx)("kbd",{children:"q"})," on the TUI main page."]}),"\n",(0,s.jsx)(n.p,{children:"Exiting the TUI doesn't stop your OpenRAG services.\nYour OpenRAG services continue to run until they are stopped from within the TUI or by another process that inadvertently stops them."}),"\n",(0,s.jsxs)(n.p,{children:["To restart the TUI, see ",(0,s.jsx)(n.a,{href:"#access-the-tui",children:"Access the TUI"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var i=t(6540);const s={},r=i.createContext(s);function o(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/2279.44341cb1.js b/assets/js/2279.632a870f.js
similarity index 99%
rename from assets/js/2279.44341cb1.js
rename to assets/js/2279.632a870f.js
index aa38ce17..83b92fb0 100644
--- a/assets/js/2279.44341cb1.js
+++ b/assets/js/2279.632a870f.js
@@ -1,2 +1,2 @@
-/*! For license information please see 2279.44341cb1.js.LICENSE.txt */
-(globalThis.webpackChunkopenrag_docs=globalThis.webpackChunkopenrag_docs||[]).push([[2279],{45:(t,e,r)=>{"use strict";r.d(e,{XX:()=>u,q7:()=>d,sO:()=>h});var i=r(5164),n=r(5894),a=r(3226),o=r(7633),s=r(797),l={common:o.Y2,getConfig:o.zj,insertCluster:n.U,insertEdge:i.Jo,insertEdgeLabel:i.jP,insertMarkers:i.g0,insertNode:n.on,interpolateToCurve:a.Ib,labelHelper:n.Zk,log:s.Rm,positionEdgeLabel:i.T_},c={},h=(0,s.K2)(t=>{for(const e of t)c[e.name]=e},"registerLayoutLoaders");(0,s.K2)(()=>{h([{name:"dagre",loader:(0,s.K2)(async()=>await Promise.all([r.e(3624),r.e(2334),r.e(7873)]).then(r.bind(r,7873)),"loader")},{name:"cose-bilkent",loader:(0,s.K2)(async()=>await Promise.all([r.e(165),r.e(7928)]).then(r.bind(r,7928)),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,s.K2)(async(t,e)=>{if(!(t.layoutAlgorithm in c))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=c[t.layoutAlgorithm];return(await r.loader()).render(t,e,l,{algorithm:r.algorithm})},"render"),d=(0,s.K2)((t="",{fallback:e="dagre"}={})=>{if(t in c)return t;if(e in c)return s.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},92:(t,e,r)=>{"use strict";r.d(e,{W6:()=>ie,GZ:()=>se,WY:()=>Wt,pC:()=>Pt,hE:()=>oe,Gc:()=>It});var i=r(3226),n=r(7633),a=r(797);const o=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c=Object.freeze({...s,...l}),h=Object.freeze({...c,body:"",hidden:!1});function u(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in h)i in l?i in t&&!(i in r)&&(r[i]=l[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function d(t,e,r){const i=t.icons,n=t.aliases||Object.create(null);let a={};function o(t){a=u(i[t]||n[t],a)}return o(e),r.forEach(o),u(t,a)}function p(t,e){if(t.icons[e])return d(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return n[e]=[];if(!(e in n)){n[e]=null;const r=i[e]&&i[e].parent,a=r&&t(r);a&&(n[e]=[r].concat(a))}return n[e]}),n}(t,[e])[e];return r?d(t,e,r):null}const f=Object.freeze({width:null,height:null}),g=Object.freeze({...f,...l}),y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function x(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(y);if(null===i||!i.length)return t;const n=[];let a=i.shift(),o=m.test(a);for(;;){if(o){const t=parseFloat(a);isNaN(t)?n.push(a):n.push(Math.ceil(t*e*r)/r)}else n.push(a);if(a=i.shift(),void 0===a)return n.join("");o=!o}}const b=/\sid="(\S+)"/g,k=new Map;function w(t){const e=[];let r;for(;r=b.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=k.get(t)||0;return k.set(t,e+1),e?`${t}${e}`:t}(e),n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}var C=r(451);function _(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var v={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function S(t){v=t}var T={exec:()=>null};function A(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let n="string"==typeof e?e:e.source;return n=n.replace(B.caret,"$1"),r=r.replace(t,n),i},getRegex:()=>new RegExp(r,e)};return i}var M=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,F=/(?:[*+-]|\d{1,9}[.)])/,$=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,E=A($).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),D=A($).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),O=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,R=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,K=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",R).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),I=A(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,F).getRegex(),N="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",z=/|$))/,P=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",z).replace("tag",N).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),q=A(O).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),j={blockquote:A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",q).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:K,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:L,html:P,lheading:E,list:I,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:q,table:T,text:/^[^\n]+/},W=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),H={...j,lheading:D,table:W,paragraph:A(O).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",W).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex()},U={...j,html:A("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|
'+(r?n:vt(n,!0))+"\n":""+(r?n:vt(n,!0))+"\n"}blockquote({tokens:t}){return`\n${this.parser.parse(t)}\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`
\n"}list(t){let e=t.ordered,r=t.start,i="";for(let a=0;a
${this.parser.parseInline(t)}
\n`}table(t){let e="",r="";for(let n=0;n${vt(t,!0)}`}br(t){return""}del({tokens:t}){return`
An error occurred:
"+vt(r.message+"",!0)+"";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function Rt(t,e){return Ot.parse(t,e)}Rt.options=Rt.setOptions=function(t){return Ot.setOptions(t),Rt.defaults=Ot.defaults,S(Rt.defaults),Rt},Rt.getDefaults=_,Rt.defaults=v,Rt.use=function(...t){return Ot.use(...t),Rt.defaults=Ot.defaults,S(Rt.defaults),Rt},Rt.walkTokens=function(t,e){return Ot.walkTokens(t,e)},Rt.parseInline=Ot.parseInline,Rt.Parser=Et,Rt.parser=Et.parse,Rt.Renderer=Ft,Rt.TextRenderer=$t,Rt.Lexer=Lt,Rt.lexer=Lt.lex,Rt.Tokenizer=Bt,Rt.Hooks=Dt,Rt.parse=Rt;Rt.options,Rt.setOptions,Rt.use,Rt.walkTokens,Rt.parseInline,Et.parse,Lt.lex;var Kt=r(513),It={body:'
/g,"\n").replace(/\n{2,}/g,"\n"),i=(0,Kt.T)(r);return!1===e?i.replace(/ /g," "):i}function Ut(t,e={}){const r=Ht(t,e),i=Rt.lexer(r),n=[[]];let o=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(o++,n.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&n[o].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&n[o].push({content:t.text,type:"normal"})}return(0,a.K2)(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?n[o].push({content:t.text,type:"normal"}):n[o].push({content:t.raw,type:"normal"})}),n}function Yt(t,{markdownAutoWrap:e}={}){const r=Rt.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
").replace(/ /g," "):t.text.replace(/\n */g,"
"):"strong"===t.type?`${t.tokens?.map(i).join("")}`:"em"===t.type?`${t.tokens?.map(i).join("")}`:"paragraph"===t.type?`
${t.tokens?.map(i).join("")}
`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.Rm.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,a.K2)(i,"output"),r.map(i).join("")}function Gt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Xt(t,e){return Vt(t,[],Gt(e.content),e.type)}function Vt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...e,n];return t([{content:o.join(""),type:i}])?Vt(t,o,a,i):(0===e.length&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Zt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return Qt(t,e)}function Qt(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let n="";" "===t[0].content&&(n=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},o=[...i];if(""!==n&&o.push({content:n,type:"normal"}),o.push(a),e(o))return Qt(t,e,r,o);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[i,n]=Xt(e,a);r.push([i]),n.content&&t.unshift(n)}return Qt(t,e,r)}function Jt(t,e){e&&t.attr("style",e)}async function te(t,e,r,i,a=!1,o=(0,n.zj)()){const s=t.append("foreignObject");s.attr("width",10*r+"px"),s.attr("height",10*r+"px");const l=s.append("xhtml:div"),c=(0,n.Wi)(e.label)?await(0,n.dj)(e.label.replace(n.Y2.lineBreakRegex,"\n"),o):(0,n.jZ)(e.label,o),h=e.isNode?"nodeLabel":"edgeLabel",u=l.append("span");u.html(c),Jt(u,e.labelStyle),u.attr("class",`${h} ${i}`),Jt(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),l.style("max-width",r+"px"),l.style("text-align","center"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),d=l.node().getBoundingClientRect()),s.node()}function ee(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function re(t,e,r){const i=t.append("text"),n=ee(i,1,e);ae(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}function ie(t,e,r){const i=t.append("text"),n=ee(i,1,e);ae(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}function ne(t,e,r,i=!1){const n=e.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),s=n.append("text").attr("y","-10.1");let l=0;for(const c of r){const e=(0,a.K2)(e=>re(n,1.1,e)<=t,"checkWidth"),r=e(c)?[c]:Zt(c,e);for(const t of r){ae(ee(s,l,1.1),t),l++}}if(i){const t=s.node().getBBox(),e=2;return o.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),n.node()}return s.node()}function ae(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(e.content):i.text(" "+e.content)})}async function oe(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,a)=>(r.push((async()=>{const r=`${i}:${a}`;return await jt(r)?await Wt(r,void 0,{class:"label-icon"}):``})()),t));const i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}(0,a.K2)(Ht,"preprocessMarkdown"),(0,a.K2)(Ut,"markdownToLines"),(0,a.K2)(Yt,"markdownToHTML"),(0,a.K2)(Gt,"splitTextToChars"),(0,a.K2)(Xt,"splitWordToFitWidth"),(0,a.K2)(Vt,"splitWordToFitWidthRecursion"),(0,a.K2)(Zt,"splitLineToFitWidth"),(0,a.K2)(Qt,"splitLineToFitWidthRecursion"),(0,a.K2)(Jt,"applyStyle"),(0,a.K2)(te,"addHtmlSpan"),(0,a.K2)(ee,"createTspan"),(0,a.K2)(re,"computeWidthOfText"),(0,a.K2)(ie,"computeDimensionOfText"),(0,a.K2)(ne,"createFormattedText"),(0,a.K2)(ae,"updateTextContentAndStyles"),(0,a.K2)(oe,"replaceIconSubstring");var se=(0,a.K2)(async(t,e="",{style:r="",isTitle:o=!1,classes:s="",useHtmlLabels:l=!0,isNode:c=!0,width:h=200,addSvgBackground:u=!1}={},d)=>{if(a.Rm.debug("XYZ createText",e,r,o,s,l,c,"addSvgBackground: ",u),l){const a=Yt(e,d),o=await oe((0,i.Sm)(a),d),l=e.replace(/\\\\/g,"\\"),p={isNode:c,label:(0,n.Wi)(e)?l:o,labelStyle:r.replace("fill:","color:")};return await te(t,p,h,s,u,d)}{const i=ne(h,t,Ut(e.replace(//g,"
").replace("
","
"),d),!!e&&u);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,C.Ltv)(i).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,C.Ltv)(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,C.Ltv)(i).select("text").attr("style",e)}return i}},"createText")},127:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});const i=function(){this.__data__=[],this.size=0};var n=r(6984);const a=function(t,e){for(var r=t.length;r--;)if((0,n.A)(t[r][0],e))return r;return-1};var o=Array.prototype.splice;const s=function(t){var e=this.__data__,r=a(e,t);return!(r<0)&&(r==e.length-1?e.pop():o.call(e,r,1),--this.size,!0)};const l=function(t){var e=this.__data__,r=a(e,t);return r<0?void 0:e[r][1]};const c=function(t){return a(this.__data__,t)>-1};const h=function(t,e){var r=this.__data__,i=a(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e
/g,"
"),i},"cleanUpSvgCode"),ve=(0,h.K2)((t="",e)=>``,"putIntoIFrame"),Se=(0,h.K2)((t,e,r,i,n)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&o.attr("xmlns:xlink",n),o.append("g"),t},"appendDivSvgG");function Te(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,h.K2)(Te,"sandboxedIframe");var Ae=(0,h.K2)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),Me=(0,h.K2)(async function(t,e,r){re();const n=xe(e);e=n.code;const a=(0,c.zj)();h.Rm.debug(a),e.length>(a?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+t,s="i"+t,l="#"+s,u="d"+t,p="#"+u,f=(0,h.K2)(()=>{const t=y?l:p,e=(0,d.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let g=(0,d.Ltv)("body");const y="sandbox"===a.securityLevel,m="loose"===a.securityLevel,x=a.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),y){const t=Te((0,d.Ltv)(r),s);g=(0,d.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,d.Ltv)(r);Se(g,t,u,`font-family: ${x}`,"http://www.w3.org/1999/xlink")}else{if(Ae(document,t,u,s),y){const t=Te((0,d.Ltv)("body"),s);g=(0,d.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,d.Ltv)("body");Se(g,t,u)}let b,k;try{b=await oe.fromText(e,{title:n.title})}catch($){if(a.suppressErrorRendering)throw f(),$;b=await oe.fromText("error"),k=$}const w=g.select(p).node(),C=b.type,_=w.firstChild,v=_.firstChild,S=b.renderer.getClasses?.(e,b),T=Ce(a,C,S,o),A=document.createElement("style");A.innerHTML=T,_.insertBefore(A,v);try{await b.renderer.draw(e,t,i.n.version,b)}catch(E){throw a.suppressErrorRendering?f():Et.draw(e,t,i.n.version),E}const M=g.select(`${p} svg`),B=b.db.getAccTitle?.(),L=b.db.getAccDescription?.();Fe(C,M,B,L),g.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let F=g.select(p).node().innerHTML;if(h.Rm.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),F=_e(F,y,(0,c._3)(a.arrowMarkerAbsolute)),y){const t=g.select(p+" svg").node();F=ve(F,t)}else m||(F=J.A.sanitize(F,{ADD_TAGS:ye,ADD_ATTR:me,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(le(),k)throw k;return f(),{diagramType:C,svg:F,bindFunctions:b.db.bindFunctions}},"render");function Be(t={}){const e=(0,c.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,c.wZ)(e),e?.theme&&e.theme in c.H$?e.themeVariables=c.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=c.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,c.UU)(e):(0,c.Q2)();(0,h.He)(r.logLevel),re()}(0,h.K2)(Be,"initialize");var Le=(0,h.K2)((t,e={})=>{const{code:r}=fe(t);return oe.fromText(r,e)},"getDiagramFromText");function Fe(t,e,r,i){ne(e,t),ae(e,r,i,e.attr("id"))}(0,h.K2)(Fe,"addA11yInfo");var $e=Object.freeze({render:Me,parse:be,getDiagramFromText:Le,initialize:Be,getConfig:c.zj,setConfig:c.Nk,getSiteConfig:c.Q2,updateSiteConfig:c.B6,reset:(0,h.K2)(()=>{(0,c.cL)()},"reset"),globalReset:(0,h.K2)(()=>{(0,c.cL)(c.sb)},"globalReset"),defaultConfig:c.sb});(0,h.He)((0,c.zj)().logLevel),(0,c.cL)((0,c.zj)());var Ee=(0,h.K2)((t,e,r)=>{h.Rm.warn(t),(0,l.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),De=(0,h.K2)(async function(t={querySelector:".mermaid"}){try{await Oe(t)}catch(e){if((0,l.dq)(e)&&h.Rm.error(e.str),Ye.parseError&&Ye.parseError(e),!t.suppressErrors)throw h.Rm.error("Use the suppressErrors option to suppress these errors"),e}},"run"),Oe=(0,h.K2)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=$e.getConfig();let n;if(h.Rm.debug((t?"":"No ")+"Callback function found"),r)n=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(e)}h.Rm.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(h.Rm.debug("Start On Load: "+i?.startOnLoad),$e.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new l._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const d of Array.from(n)){if(h.Rm.info("Rendering diagram: "+d.id),d.getAttribute("data-processed"))continue;d.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;o=d.innerHTML,o=(0,u.T)(l._K.entityDecode(o)).trim().replace(/
/gi,"
");const r=l._K.detectInit(o);r&&h.Rm.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await He(e,o,d);d.innerHTML=r,t&&await t(e),i&&i(d)}catch(c){Ee(c,s,Ye.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Re=(0,h.K2)(function(t){$e.initialize(t)},"initialize"),Ke=(0,h.K2)(async function(t,e,r){h.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&Re(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await De(i)},"init"),Ie=(0,h.K2)(async(t,{lazyLoad:e=!0}={})=>{re(),(0,c.Xd)(...t),!1===e&&await ie()},"registerExternalDiagrams"),Ne=(0,h.K2)(function(){if(Ye.startOnLoad){const{startOnLoad:t}=$e.getConfig();t&&Ye.run().catch(t=>h.Rm.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Ne,!1);var ze=(0,h.K2)(function(t){Ye.parseError=t},"setParseErrorHandler"),Pe=[],qe=!1,je=(0,h.K2)(async()=>{if(!qe){for(qe=!0;Pe.length>0;){const e=Pe.shift();if(e)try{await e()}catch(t){h.Rm.error("Error executing queue",t)}}qe=!1}},"executeQueue"),We=(0,h.K2)(async(t,e)=>new Promise((r,i)=>{const n=(0,h.K2)(()=>new Promise((n,a)=>{$e.parse(t,e).then(t=>{n(t),r(t)},t=>{h.Rm.error("Error parsing",t),Ye.parseError?.(t),a(t),i(t)})}),"performCall");Pe.push(n),je().catch(i)}),"parse"),He=(0,h.K2)((t,e,r)=>new Promise((i,n)=>{const a=(0,h.K2)(()=>new Promise((a,o)=>{$e.render(t,e,r).then(t=>{a(t),i(t)},t=>{h.Rm.error("Error parsing",t),Ye.parseError?.(t),o(t),n(t)})}),"performCall");Pe.push(a),je().catch(n)}),"render"),Ue=(0,h.K2)(()=>Object.keys(c.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Ye={startOnLoad:!0,mermaidAPI:$e,parse:We,render:He,init:Ke,run:De,registerExternalDiagrams:Ie,registerLayoutLoaders:o.sO,initialize:Re,parseError:void 0,contentLoaded:Ne,setParseErrorHandler:ze,detectType:c.Ch,registerIconPacks:s.pC,getRegisteredDiagramsMetadata:Ue},Ge=Ye},2387:(t,e,r)=>{"use strict";r.d(e,{Fr:()=>h,GX:()=>c,KX:()=>l,WW:()=>o,ue:()=>a});var i=r(7633),n=r(797),a=(0,n.K2)(t=>{const{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),o=(0,n.K2)(t=>{const e=s([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),s=(0,n.K2)(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),l=(0,n.K2)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),c=(0,n.K2)(t=>{const{stylesArray:e}=o(t),r=[],i=[],n=[],a=[];return e.forEach(t=>{const e=t[0];l(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&n.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:a}},"styles2String"),h=(0,n.K2)((t,e)=>{const{themeVariables:r,handDrawnSeed:n}=(0,i.D7)(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:l}=o(t);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||a,seed:n,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,n.K2)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},2453:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,o=2*r-a;switch(n){case"r":return 255*i.hue2rgb(o,a,t+1/3);case"g":return 255*i.hue2rgb(o,a,t);case"b":return 255*i.hue2rgb(o,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),a=Math.min(t,e,r),o=(n+a)/2;if("l"===i)return 100*o;if(n===a)return 0;const s=n-a;if("s"===i)return 100*(o>.5?s/(2-n-a):s/(n+a));switch(n){case t:return 60*((e-r)/s+(e
"},r),i.Y2.lineBreakRegex.test(t))return t;const n=t.split(" ").filter(Boolean),a=[];let o="";return n.forEach((t,i)=>{const s=R(`${t} `,r),l=R(o,r);if(s>e){const{hyphenatedStrings:i,remainingWord:n}=D(t,e,"-",r);a.push(o,...i),o=n}else l+s>=e?(a.push(o),o=t):o=[o,t].filter(Boolean).join(" ");i+1===n.length&&a.push(o)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),D=(0,s.A)((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],a=[];let o="";return n.forEach((t,s)=>{const l=`${o}${t}`;if(R(l,i)>=e){const t=s+1,e=n.length===t,i=`${l}${r}`;a.push(e?l:i),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function O(t,e){return I(t,e).height}function R(t,e){return I(t,e).width}(0,n.K2)(O,"calculateTextHeight"),(0,n.K2)(R,"calculateTextWidth");var K,I=(0,s.A)((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,s]=j(r),l=["sans-serif",n],h=t.split(i.Y2.lineBreakRegex),u=[],d=(0,o.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const i of l){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of h){const n=F();n.text=r||c;const o=$(p,n).style("font-size",s).style("font-weight",a).style("font-family",i),l=(o._groups||o)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}u.push(e)}p.remove();return u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),N=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,n.K2)(this,"InitIDGenerator")}},z=(0,n.K2)(function(t){return K=K||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),K.innerHTML=t,unescape(K.textContent)},"entityDecode");function P(t){return"str"in t}(0,n.K2)(P,"isDetailedError");var q=(0,n.K2)((t,e,r,i)=>{if(!i)return;const n=t.node()?.getBBox();n&&t.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},"insertTitle"),j=(0,n.K2)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function W(t,e){return(0,l.A)({},t,e)}(0,n.K2)(W,"cleanAndMerge");var H={assignWithDepth:i.hH,wrapLabel:E,calculateTextHeight:O,calculateTextWidth:R,calculateTextDimensions:I,cleanAndMerge:W,detectInit:d,detectDirective:p,isSubstringInArray:g,interpolateToCurve:y,calcLabelPosition:w,calcCardinalityPosition:v,calcTerminalLabelPosition:S,formatUrl:m,getStylesFromArray:T,generateId:M,random:L,runFunc:x,entityDecode:z,insertTitle:q,isLabelCoordinateInPath:V,parseFontSize:j,InitIDGenerator:N},U=(0,n.K2)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"}),e},"encodeEntities"),Y=(0,n.K2)(function(t){return t.replace(/\ufb02\xb0\xb0/g,"").replace(/\ufb02\xb0/g,"&").replace(/\xb6\xdf/g,";")},"decodeEntities"),G=(0,n.K2)((t,e,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${n?`_${n}`:""}`,"getEdgeId");function X(t){return t??null}function V(t,e){const r=Math.round(t.x),i=Math.round(t.y),n=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return n.includes(r.toString())||n.includes(i.toString())}(0,n.K2)(X,"handleUndefinedAttr"),(0,n.K2)(V,"isLabelCoordinateInPath")},3245:(t,e,r)=>{"use strict";r.d(e,{O:()=>i});var i=(0,r(797).K2)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins")},3533:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(8446),n=r(3098);const a=function(t){return(0,n.A)(t)&&(0,i.A)(t)}},3539:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(2453),n=r(3122);const a=class{constructor(){this.type=n.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=n.Z.ALL}is(t){return this.type===t}};const o=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=n.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},3590:(t,e,r)=>{"use strict";r.d(e,{D:()=>o});var i=r(7633),n=r(797),a=r(451),o=(0,n.K2)(t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,a.Ltv)("body");if("sandbox"===e){const e=(0,a.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,a.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},3607:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});const i=function(t,e){for(var r=-1,i=Array(t);++r
"),l.Rm.info("vertexText"+n);const t={isNode:i,label:(0,o.Sm)(n).replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),labelStyle:e?e.replace("fill:","color:"):e};return await k(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let i=[];i="string"==typeof n?n.split(/\\n|\n|
/gi):Array.isArray(n)?n:[];for(const e of i){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),r?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}},"createLabel"),C=(0,l.K2)((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD"),_=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:o,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=o,{labelStyles:f,nodeStyles:g,borderStyles:y,backgroundStyles:m}=(0,n.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),k=(0,s._3)(r.flowchart.htmlLabels),w=b.insert("g").attr("class","cluster-label "),_=await(0,a.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0});let v=_.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=_.children[0],e=(0,c.Ltv)(_);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}const S=e.width<=v.width+e.padding?v.width+e.padding:e.width;e.width<=v.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,A=e.x-S/2,M=e.y-T/2;let B;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(b),r=(0,n.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:3,seed:u}),i=t.path(C(A,M,S,T,0),r);B=b.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),B.select("path:nth-child(2)").attr("style",y.join(";")),B.select("path").attr("style",m.join(";").replace("fill","stroke"))}else B=b.insert("rect",":first-child"),B.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",M).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:L}=(0,i.O)(r);if(w.attr("transform",`translate(${e.x-v.width/2}, ${e.y-e.height/2+L})`),f){const t=w.select("span");t&&t.attr("style",f)}const F=B.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=v.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:v}},"rect"),v=(0,l.K2)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,a=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return x(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),S=(0,l.K2)(async(t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=i,d=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),p=d.insert("g",":first-child"),f=d.insert("g").attr("class","cluster-label");let g=d.append("rect");const y=f.node().appendChild(await w(e.label,e.labelStyle,void 0,!0));let m=y.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=y.children[0],e=(0,c.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}const b=0*e.padding,k=b/2,_=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+b;e.width<=m.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height+b,S=e.height+b-m.height-6,T=e.x-_/2,A=e.y-v/2;e.width=_;const M=e.y-e.height/2-k+m.height+2;let B;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=h.A.svg(d),i=e.rx||e.ry?r.path(C(T,A,_,v,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:n}):r.rectangle(T,A,_,v,{seed:n});B=d.insert(()=>i,":first-child");const s=r.rectangle(T,M,_,S,{fill:t?a:o,fillStyle:t?"hachure":"solid",stroke:u,seed:n});B=d.insert(()=>i,":first-child"),g=d.insert(()=>s)}else{B=p.insert("rect",":first-child");const t="outer";B.attr("class",t).attr("x",T).attr("y",A).attr("width",_).attr("height",v).attr("data-look",e.look),g.attr("class","inner").attr("x",T).attr("y",M).attr("width",_).attr("height",S)}f.attr("transform",`translate(${e.x-m.width/2}, ${A+1-((0,s._3)(r.flowchart.htmlLabels)?0:3)})`);const L=B.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:d,labelBBox:m}},"roundedWithTitle"),T=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:o,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=o,{labelStyles:f,nodeStyles:g,borderStyles:y,backgroundStyles:m}=(0,n.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),k=(0,s._3)(r.flowchart.htmlLabels),w=b.insert("g").attr("class","cluster-label "),_=await(0,a.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width});let v=_.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=_.children[0],e=(0,c.Ltv)(_);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}const S=e.width<=v.width+e.padding?v.width+e.padding:e.width;e.width<=v.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,A=e.x-S/2,M=e.y-T/2;let B;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(b),r=(0,n.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:4,seed:u}),i=t.path(C(A,M,S,T,e.rx),r);B=b.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),B.select("path:nth-child(2)").attr("style",y.join(";")),B.select("path").attr("style",m.join(";").replace("fill","stroke"))}else B=b.insert("rect",":first-child"),B.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",M).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:L}=(0,i.O)(r);if(w.attr("transform",`translate(${e.x-v.width/2}, ${e.y-e.height/2+L})`),f){const t=w.select("span");t&&t.attr("style",f)}const F=B.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=v.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:v}},"kanbanSection"),A={rect:_,squareRect:_,roundedWithTitle:S,noteGroup:v,divider:(0,l.K2)((t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=o.insert("g",":first-child"),c=0*e.padding,u=e.width+c;e.diff=-e.padding;const d=e.height+c,p=e.x-u/2,f=e.y-d/2;let g;if(e.width=u,"handDrawn"===e.look){const t=h.A.svg(o).rectangle(p,f,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});g=o.insert(()=>t,":first-child")}else{g=l.insert("rect",":first-child");const t="divider";g.attr("class",t).attr("x",p).attr("y",f).attr("width",u).attr("height",d).attr("data-look",e.look)}const y=g.node().getBBox();return e.height=y.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:T},M=new Map,B=(0,l.K2)(async(t,e)=>{const r=e.shape||"rect",i=await A[r](t,e);return M.set(e.id,i),i},"insertCluster"),L=(0,l.K2)(()=>{M=new Map},"clear");function F(t,e){return t.intersect(e)}(0,l.K2)(F,"intersectNode");var $=F;function E(t,e,r,i){var n=t.x,a=t.y,o=n-i.x,s=a-i.y,l=Math.sqrt(e*e*s*s+r*r*o*o),c=Math.abs(e*r*o/l);i.x
"):x,e.labelStyle,!0,!0)),_=k.children[0],v=(0,c.Ltv)(k);m=_.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height);const S=(e.padding||0)/2;(0,c.Ltv)(k).attr("transform","translate( "+(m.width>b.width?0:(b.width-m.width)/2)+", "+(b.height+S+5)+")"),(0,c.Ltv)(y).attr("transform","translate( "+(m.width
").length,t.innerHTML.includes("")&&(g+=t.innerHTML.split("
/gi,dt=(0,i.K2)(t=>{if(!t)return[""];return Ct(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),pt=(()=>{let t=!1;return()=>{t||(ft(),t=!0)}})();function ft(){const t="data-temp-href-target";f.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),f.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,i.K2)(ft,"setupDompurifyHooks");var gt=(0,i.K2)(t=>{pt();return f.A.sanitize(t)},"removeScript"),yt=(0,i.K2)((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=gt(t):"loose"!==r&&(t=(t=(t=Ct(t)).replace(/
"),"placeholderToBreak"),Ct=(0,i.K2)(t=>t.replace(ut,"#br#"),"breakToPlaceholder"),_t=(0,i.K2)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),vt=(0,i.K2)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),St=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Tt=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),At=(0,i.K2)(function(t){const e=t.split(/(,)/),r=[];for(let i=0;i
=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){const{angle:e,deltaY:r}=o(i[i.length-1],i[i.length-2]);a=n[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const c=Math.abs(s(e).y-s(i[i.length-1]).y),h=Math.abs(s(e).x-s(i[i.length-1]).x),u=Math.abs(s(e).y-s(i[0]).y),d=Math.abs(s(e).x-s(i[0]).x),p=n[t.arrowTypeStart],f=n[t.arrowTypeEnd];if(c {"use strict";r.d(e,{A:()=>x});var i=r(9610);const n=r(1917).A["__core-js_shared__"];var a,o=(a=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";const s=function(t){return!!o&&o in t};var l=r(3149),c=r(1121),h=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,p=u.toString,f=d.hasOwnProperty,g=RegExp("^"+p.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const y=function(t){return!(!(0,l.A)(t)||s(t))&&((0,i.A)(t)?g:h).test((0,c.A)(t))};const m=function(t,e){return null==t?void 0:t[e]};const x=function(t,e){var r=m(t,e);return y(r)?r:void 0}},9008:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return t}},9119:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},9142:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return function(){return t}}},9264:(t,e,r)=>{"use strict";r.d(e,{n:()=>i});var i={name:"mermaid",version:"11.12.2",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}},9418:(t,e,r)=>{"use strict";r.d(e,{A:()=>st});const{entries:i,setPrototypeOf:n,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:s}=Object;let{freeze:l,seal:c,create:h}=Object,{apply:u,construct:d}="undefined"!=typeof Reflect&&Reflect;l||(l=function(t){return t}),c||(c=function(t){return t}),u||(u=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),n=2;n ${this.parser.parseInline(t)} An error occurred: ${t.tokens?.map(i).join("")}
\n":"'+(r?n:vt(n,!0))+"
\n"}blockquote({tokens:t}){return`"+(r?n:vt(n,!0))+"\n${this.parser.parse(t)}
\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`
\n"}list(t){let e=t.ordered,r=t.start,i="";for(let a=0;a\n\n"+e+"\n"+i+"
\n"}tablerow({text:t}){return`\n${t} \n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`${r}>\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${vt(t,!0)}`}br(t){return"
"}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),n=St(t);if(null===n)return i;let a='"+i+"",a}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let n=St(t);if(null===n)return vt(r);let a=`",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:vt(t.text)}},$t=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Et=class t{options;renderer;textRenderer;constructor(t){this.options=t||v,this.options.renderer=this.options.renderer||new Ft,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $t}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let i=0;i
"+vt(r.message+"",!0)+"
";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function Rt(t,e){return Ot.parse(t,e)}Rt.options=Rt.setOptions=function(t){return Ot.setOptions(t),Rt.defaults=Ot.defaults,S(Rt.defaults),Rt},Rt.getDefaults=_,Rt.defaults=v,Rt.use=function(...t){return Ot.use(...t),Rt.defaults=Ot.defaults,S(Rt.defaults),Rt},Rt.walkTokens=function(t,e){return Ot.walkTokens(t,e)},Rt.parseInline=Ot.parseInline,Rt.Parser=Et,Rt.parser=Et.parse,Rt.Renderer=Ft,Rt.TextRenderer=$t,Rt.Lexer=Lt,Rt.lexer=Lt.lex,Rt.Tokenizer=Bt,Rt.Hooks=Dt,Rt.parse=Rt;Rt.options,Rt.setOptions,Rt.use,Rt.walkTokens,Rt.parseInline,Et.parse,Lt.lex;var Kt=r(513),It={body:'
/g,"\n").replace(/\n{2,}/g,"\n"),i=(0,Kt.T)(r);return!1===e?i.replace(/ /g," "):i}function Ut(t,e={}){const r=Ht(t,e),i=Rt.lexer(r),n=[[]];let o=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(o++,n.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&n[o].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&n[o].push({content:t.text,type:"normal"})}return(0,a.K2)(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?n[o].push({content:t.text,type:"normal"}):n[o].push({content:t.raw,type:"normal"})}),n}function Yt(t,{markdownAutoWrap:e}={}){const r=Rt.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
").replace(/ /g," "):t.text.replace(/\n */g,"
"):"strong"===t.type?`${t.tokens?.map(i).join("")}`:"em"===t.type?`${t.tokens?.map(i).join("")}`:"paragraph"===t.type?`
/g,"
").replace("
","
"),d),!!e&&u);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,C.Ltv)(i).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,C.Ltv)(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,C.Ltv)(i).select("text").attr("style",e)}return i}},"createText")},127:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});const i=function(){this.__data__=[],this.size=0};var n=r(6984);const a=function(t,e){for(var r=t.length;r--;)if((0,n.A)(t[r][0],e))return r;return-1};var o=Array.prototype.splice;const s=function(t){var e=this.__data__,r=a(e,t);return!(r<0)&&(r==e.length-1?e.pop():o.call(e,r,1),--this.size,!0)};const l=function(t){var e=this.__data__,r=a(e,t);return r<0?void 0:e[r][1]};const c=function(t){return a(this.__data__,t)>-1};const h=function(t,e){var r=this.__data__,i=a(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e0)for(var r,i,n=new Array(r),a=0;ae?1:t>=e?0:NaN}function Xi(t,e){return null==t||null==e?NaN:e0;){if((n=Ui(l,c,r))===i)return a[o]=l,a[s]=c,e(a);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}i=n}return t},t}function bn(){var t=yn();return t.copy=function(){return fn(t,bn())},Ei.apply(t,arguments),xn(t)}const kn=1e3,wn=6e4,Cn=36e5,_n=864e5,vn=6048e5,Sn=2592e6,Tn=31536e6,An=new Date,Mn=new Date;function Bn(t,e,r,i){function n(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return n.floor=e=>(t(e=new Date(+e)),e),n.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),n.round=t=>{const e=n(t),r=n.ceil(t);return t-e=l)return-1;if(37===(n=e.charCodeAt(o++))){if(n=e.charAt(o++),!(a=w[n in ga?e.charAt(o++):n])||(i=a(t,r,i))<0)return-1}else if(n!=r.charCodeAt(i++))return-1}return i}return b.x=C(r,b),b.X=C(i,b),b.c=C(e,b),k.x=C(r,k),k.X=C(i,k),k.c=C(e,k),{format:function(t){var e=C(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=_(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=C(t+="",k);return e.toString=function(){return t},e},utcParse:function(t){var e=_(t+="",!0);return e.toString=function(){return t},e}}}(t),fa=pa.format,pa.parse,pa.utcFormat,pa.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const Ko=function(t){for(var e=t.length/6|0,r=new Array(e),i=0;i
/g,"
"),i},"cleanUpSvgCode"),ve=(0,h.K2)((t="",e)=>`