diff --git a/404.html b/404.html index ad72b9a..e518e64 100644 --- a/404.html +++ b/404.html @@ -7,8 +7,8 @@ - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

diff --git a/assets/js/6e787a66.8776d2c8.js b/assets/js/09fb1470.94e222ed.js similarity index 92% rename from assets/js/6e787a66.8776d2c8.js rename to assets/js/09fb1470.94e222ed.js index fa60697..08ec39f 100644 --- a/assets/js/6e787a66.8776d2c8.js +++ b/assets/js/09fb1470.94e222ed.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[301],{8708:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var r=n(4848),o=n(8453);const a={},d="\ud83d\udc50 Generate embeddings",i={id:"prepare-the-data/embed-data",title:"\ud83d\udc50 Generate embeddings",description:"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB.",source:"@site/docs/50-prepare-the-data/4-embed-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/embed-data",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/4-embed-data.mdx",tags:[],version:"current",sidebarPosition:4,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Chunk up the data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data"},next:{title:"\ud83d\udc50 Ingest data into MongoDB",permalink:"/ai-rag-lab/docs/prepare-the-data/ingest-data"}},s={},c=[];function l(e){const t={admonition:"admonition",code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components},{Details:n}=t;return n||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"-generate-embeddings",children:"\ud83d\udc50 Generate embeddings"}),"\n",(0,r.jsx)(t.p,{children:"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB."}),"\n",(0,r.jsxs)(t.p,{children:["Fill in any ",(0,r.jsx)(t.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(t.strong,{children:"Step 5: Generate embeddings"})," section in the notebook to embed the chunked articles."]}),"\n",(0,r.jsx)(t.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"CODE_BLOCK_4"})}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"embedding_model.encode(text)\n"})})})]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"CODE_BLOCK_5"})}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'doc["embedding"] = get_embedding(doc["body"])\n'})})})]}),"\n",(0,r.jsx)(t.admonition,{type:"caution",children:(0,r.jsx)(t.p,{children:"If the embedding generation is taking too long (> 5 min), kill/interrupt the cell and move on to the next step with the documents that have been embedded up until that point."})})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>d,x:()=>i});var r=n(6540);const o={},a=r.createContext(o);function d(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:d(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[464],{2793:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var r=n(4848),o=n(8453);const a={},d="\ud83d\udc50 Generate embeddings",i={id:"prepare-the-data/embed-data",title:"\ud83d\udc50 Generate embeddings",description:"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB.",source:"@site/docs/50-prepare-the-data/3-embed-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/embed-data",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/3-embed-data.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Chunk up the data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data"},next:{title:"\ud83d\udc50 Ingest data into MongoDB",permalink:"/ai-rag-lab/docs/prepare-the-data/ingest-data"}},s={},c=[];function l(e){const t={admonition:"admonition",code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components},{Details:n}=t;return n||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"-generate-embeddings",children:"\ud83d\udc50 Generate embeddings"}),"\n",(0,r.jsx)(t.p,{children:"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB."}),"\n",(0,r.jsxs)(t.p,{children:["Fill in any ",(0,r.jsx)(t.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(t.strong,{children:"Step 5: Generate embeddings"})," section in the notebook to embed the chunked articles."]}),"\n",(0,r.jsx)(t.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"CODE_BLOCK_4"})}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"embedding_model.encode(text)\n"})})})]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"CODE_BLOCK_5"})}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'doc["embedding"] = get_embedding(doc["body"])\n'})})})]}),"\n",(0,r.jsx)(t.admonition,{type:"caution",children:(0,r.jsx)(t.p,{children:"If the embedding generation is taking too long (> 5 min), kill/interrupt the cell and move on to the next step with the documents that have been embedded up until that point."})})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>d,x:()=>i});var r=n(6540);const o={},a=r.createContext(o);function d(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:d(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/843aaef4.55423b8b.js b/assets/js/2053ae10.60e8ca36.js similarity index 92% rename from assets/js/843aaef4.55423b8b.js rename to assets/js/2053ae10.60e8ca36.js index e49b00a..0d5eed6 100644 --- a/assets/js/843aaef4.55423b8b.js +++ b/assets/js/2053ae10.60e8ca36.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[507],{8529:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>c});var r=t(4848),a=t(8453);const s={},o="\ud83d\udc50 Chunk up the data",i={id:"prepare-the-data/chunk-data",title:"\ud83d\udc50 Chunk up the data",description:"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB.",source:"@site/docs/50-prepare-the-data/3-chunk-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/chunk-data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/3-chunk-data.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Load the dataset",permalink:"/ai-rag-lab/docs/prepare-the-data/load-data"},next:{title:"\ud83d\udc50 Generate embeddings",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data"}},d={},c=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-chunk-up-the-data",children:"\ud83d\udc50 Chunk up the data"}),"\n",(0,r.jsx)(n.p,{children:"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB."}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Step 4: Chunk up the data"})," section in the notebook to chunk up the articles we loaded."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_1"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'RecursiveCharacterTextSplitter.from_tiktoken_encoder(\n encoding_name="cl100k_base", separators=separators, chunk_size=200, chunk_overlap=30\n)\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_2"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"text_splitter.split_text(text)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_3"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'get_chunks(doc, "body")\n'})})})]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var r=t(6540);const a={},s=r.createContext(a);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[276],{6302:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>c});var r=t(4848),a=t(8453);const s={},o="\ud83d\udc50 Chunk up the data",i={id:"prepare-the-data/chunk-data",title:"\ud83d\udc50 Chunk up the data",description:"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB.",source:"@site/docs/50-prepare-the-data/2-chunk-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/chunk-data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/2-chunk-data.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Load the dataset",permalink:"/ai-rag-lab/docs/prepare-the-data/load-data"},next:{title:"\ud83d\udc50 Generate embeddings",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data"}},d={},c=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-chunk-up-the-data",children:"\ud83d\udc50 Chunk up the data"}),"\n",(0,r.jsx)(n.p,{children:"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB."}),"\n",(0,r.jsxs)(n.p,{children:["Fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Step 4: Chunk up the data"})," section in the notebook to chunk up the articles we loaded."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_1"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'RecursiveCharacterTextSplitter.from_tiktoken_encoder(\n encoding_name="cl100k_base", separators=separators, chunk_size=200, chunk_overlap=30\n)\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_2"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"text_splitter.split_text(text)\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_3"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'get_chunks(doc, "body")\n'})})})]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var r=t(6540);const a={},s=r.createContext(a);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/350ab7ce.e4dd0929.js b/assets/js/350ab7ce.4cde5cbe.js similarity index 85% rename from assets/js/350ab7ce.e4dd0929.js rename to assets/js/350ab7ce.4cde5cbe.js index 26cf173..753413c 100644 --- a/assets/js/350ab7ce.e4dd0929.js +++ b/assets/js/350ab7ce.4cde5cbe.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[807],{8817:a=>{a.exports=JSON.parse('{"title":"Add memory to the RAG application","description":"Retrieve chat message history from MongoDB and incorporate it into the RAG application.","slug":"/category/add-memory-to-the-rag-application","permalink":"/ai-rag-lab/docs/category/add-memory-to-the-rag-application","navigation":{"previous":{"title":"\ud83e\uddb9 Stream responses from the RAG application","permalink":"/ai-rag-lab/docs/build-rag-app/stream-responses"},"next":{"title":"\ud83d\udcd8 Tools, libraries, and concepts","permalink":"/ai-rag-lab/docs/add-memory/concepts"}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[807],{8817:a=>{a.exports=JSON.parse('{"title":"Add memory to the RAG application","description":"Retrieve chat message history from MongoDB and incorporate it into the RAG application.","slug":"/category/add-memory-to-the-rag-application","permalink":"/ai-rag-lab/docs/category/add-memory-to-the-rag-application","navigation":{"previous":{"title":"\ud83e\uddb9 Stream responses from the RAG application","permalink":"/ai-rag-lab/docs/build-rag-app/stream-responses"},"next":{"title":"\ud83d\udc50 Add memory to the RAG application","permalink":"/ai-rag-lab/docs/add-memory/add-memory"}}}')}}]); \ No newline at end of file diff --git a/assets/js/36c22dfc.b38987cc.js b/assets/js/36c22dfc.b38987cc.js deleted file mode 100644 index 7df5e70..0000000 --- a/assets/js/36c22dfc.b38987cc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[988],{9711:(t,n,e)=>{e.r(n),e.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>g,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var o=e(4848),s=e(8453),r=(e(4059),e(1179));const c={},a="\ud83d\udc50 Get your connection string",i={id:"mongodb-atlas/get-connection-string",title:"\ud83d\udc50 Get your connection string",description:"In order to ingest data into your cluster later in the lab, you will need to get the connection string for your cluster.",source:"@site/docs/20-mongodb-atlas/3-get-connection-string.mdx",sourceDirName:"20-mongodb-atlas",slug:"/mongodb-atlas/get-connection-string",permalink:"/ai-rag-lab/docs/mongodb-atlas/get-connection-string",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/20-mongodb-atlas/3-get-connection-string.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Deploy a database cluster",permalink:"/ai-rag-lab/docs/mongodb-atlas/create-cluster"},next:{title:"Fireworks AI",permalink:"/ai-rag-lab/docs/category/fireworks-ai"}},l={},d=[];function u(t){const n={admonition:"admonition",code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"-get-your-connection-string",children:"\ud83d\udc50 Get your connection string"}),"\n",(0,o.jsx)(n.p,{children:"In order to ingest data into your cluster later in the lab, you will need to get the connection string for your cluster."}),"\n",(0,o.jsxs)(n.p,{children:["In the Atlas UI, navigate to the ",(0,o.jsx)(n.strong,{children:"Overview"})," page. In the ",(0,o.jsx)(n.strong,{children:"Clusters section"}),", select the cluster you just created and click ",(0,o.jsx)(n.strong,{children:"Connect"}),"."]}),"\n",(0,o.jsx)(r.A,{url:"https://cloud.mongodb.com",src:"img/screenshots/20-mongodb-atlas/3-get-conn-string/1-connect-button.png",alt:"Screenshot of the connect button"}),"\n",(0,o.jsx)(n.p,{children:"A modal will display several ways to connect to your database."}),"\n",(0,o.jsx)(r.A,{url:"https://cloud.mongodb.com",src:"img/screenshots/20-mongodb-atlas/3-get-conn-string/2-connect-modal.png",alt:"Screenshot of the connect modal"}),"\n",(0,o.jsxs)(n.p,{children:["Select ",(0,o.jsx)(n.strong,{children:"Compass"}),". While we won't be using Compass to import the data, it's an easy way to see your connection string."]}),"\n",(0,o.jsx)(r.A,{url:"https://cloud.mongodb.com",src:"img/screenshots/20-mongodb-atlas/3-get-conn-string/3-connect-compass.png",alt:"Screenshot of the connection string"}),"\n",(0,o.jsx)(n.p,{children:"Look for your connection string. It should look something like:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"mongodb+srv://:@/\n"})}),"\n",(0,o.jsx)(n.p,{children:"Click the copy button next to your connection string to copy it to your clipboard. Paste the connection string somewhere safe."}),"\n",(0,o.jsx)(n.admonition,{type:"tip",children:(0,o.jsxs)(n.p,{children:["Don't forget to replace ",(0,o.jsx)(n.code,{children:""})," with the password you set when you created the cluster."]})})]})}function g(t={}){const{wrapper:n}={...(0,s.R)(),...t.components};return n?(0,o.jsx)(n,{...t,children:(0,o.jsx)(u,{...t})}):u(t)}},4059:(t,n,e)=>{e.d(n,{A:()=>c});e(6540);var o=e(4783),s=e(7639),r=e(4848);function c(t){const n=(0,s.A)(),e=n?.siteConfig?.customFields?.utmParams||"",c=`${t.to}?${e}`;return(0,r.jsx)(o.A,{...t,to:c})}},1179:(t,n,e)=>{e.d(n,{A:()=>c});e(6540);var o=e(4848);function s(t){const n=t.url||"http://localhost:3000";return(0,o.jsxs)("div",{className:"browser container",children:[(0,o.jsxs)("div",{className:"row",children:[(0,o.jsxs)("div",{className:"column left",children:[(0,o.jsx)("span",{className:"dot",style:{background:"#ED594A"}}),(0,o.jsx)("span",{className:"dot",style:{background:"#FDD800"}}),(0,o.jsx)("span",{className:"dot",style:{background:"#5AC05A"}})]}),(0,o.jsx)("div",{className:"column middle",children:(0,o.jsx)("input",{type:"text",value:n})}),(0,o.jsx)("div",{className:"column right",children:(0,o.jsxs)("div",{style:{float:"right"},children:[(0,o.jsx)("span",{className:"bar"}),(0,o.jsx)("span",{className:"bar"}),(0,o.jsx)("span",{className:"bar"})]})})]}),(0,o.jsx)("div",{className:"content",children:t.children})]})}var r=e(8180);function c(t){return(0,o.jsx)(s,{...t,children:(0,o.jsx)("img",{src:(0,r.A)(t.src),alt:t.alt})})}},8453:(t,n,e)=>{e.d(n,{R:()=>c,x:()=>a});var o=e(6540);const s={},r=o.createContext(s);function c(t){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof t?t(n):{...n,...t}}),[n,t])}function a(t){let n;return n=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:c(t.components),o.createElement(r.Provider,{value:n},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/36c22dfc.b860388d.js b/assets/js/36c22dfc.b860388d.js new file mode 100644 index 0000000..1681dde --- /dev/null +++ b/assets/js/36c22dfc.b860388d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[988],{9711:(t,n,e)=>{e.r(n),e.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>g,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var o=e(4848),s=e(8453),r=(e(4059),e(1179));const c={},a="\ud83d\udc50 Get your connection string",i={id:"mongodb-atlas/get-connection-string",title:"\ud83d\udc50 Get your connection string",description:"In order to ingest data into your cluster later in the lab, you will need to get the connection string for your cluster.",source:"@site/docs/20-mongodb-atlas/3-get-connection-string.mdx",sourceDirName:"20-mongodb-atlas",slug:"/mongodb-atlas/get-connection-string",permalink:"/ai-rag-lab/docs/mongodb-atlas/get-connection-string",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/20-mongodb-atlas/3-get-connection-string.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Deploy a database cluster",permalink:"/ai-rag-lab/docs/mongodb-atlas/create-cluster"},next:{title:"Fireworks AI",permalink:"/ai-rag-lab/docs/category/fireworks-ai"}},l={},d=[];function u(t){const n={admonition:"admonition",code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"-get-your-connection-string",children:"\ud83d\udc50 Get your connection string"}),"\n",(0,o.jsx)(n.p,{children:"In order to ingest data into your cluster later in the lab, you will need to get the connection string for your cluster."}),"\n",(0,o.jsxs)(n.p,{children:["In the Atlas UI, navigate to the ",(0,o.jsx)(n.strong,{children:"Overview"})," page. In the ",(0,o.jsx)(n.strong,{children:"Clusters section"}),", select the cluster you just created and click ",(0,o.jsx)(n.strong,{children:"Connect"}),"."]}),"\n",(0,o.jsx)(r.A,{url:"https://cloud.mongodb.com",src:"img/screenshots/20-mongodb-atlas/3-get-conn-string/1-connect-button.png",alt:"Screenshot of the connect button"}),"\n",(0,o.jsxs)(n.p,{children:["A modal will display several ways to connect to your database. Select ",(0,o.jsx)(n.strong,{children:"Drivers"}),"."]}),"\n",(0,o.jsx)(r.A,{url:"https://cloud.mongodb.com",src:"img/screenshots/20-mongodb-atlas/3-get-conn-string/2-connect-modal.png",alt:"Screenshot of the connect modal"}),"\n",(0,o.jsxs)(n.p,{children:["Look for your connection string. It should look something like ",(0,o.jsx)(n.code,{children:"mongodb+srv://:@/"})]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{})}),"\n",(0,o.jsx)(r.A,{url:"https://cloud.mongodb.com",src:"img/screenshots/20-mongodb-atlas/3-get-conn-string/3-connect-compass.png",alt:"Screenshot of the connection string"}),"\n",(0,o.jsx)(n.p,{children:"Click the copy button next to your connection string to copy it to your clipboard. Paste the connection string somewhere safe."}),"\n",(0,o.jsx)(n.admonition,{type:"tip",children:(0,o.jsxs)(n.p,{children:["Don't forget to replace ",(0,o.jsx)(n.code,{children:""})," with the password you set when you created the cluster."]})})]})}function g(t={}){const{wrapper:n}={...(0,s.R)(),...t.components};return n?(0,o.jsx)(n,{...t,children:(0,o.jsx)(u,{...t})}):u(t)}},4059:(t,n,e)=>{e.d(n,{A:()=>c});e(6540);var o=e(4783),s=e(7639),r=e(4848);function c(t){const n=(0,s.A)(),e=n?.siteConfig?.customFields?.utmParams||"",c=`${t.to}?${e}`;return(0,r.jsx)(o.A,{...t,to:c})}},1179:(t,n,e)=>{e.d(n,{A:()=>c});e(6540);var o=e(4848);function s(t){const n=t.url||"http://localhost:3000";return(0,o.jsxs)("div",{className:"browser container",children:[(0,o.jsxs)("div",{className:"row",children:[(0,o.jsxs)("div",{className:"column left",children:[(0,o.jsx)("span",{className:"dot",style:{background:"#ED594A"}}),(0,o.jsx)("span",{className:"dot",style:{background:"#FDD800"}}),(0,o.jsx)("span",{className:"dot",style:{background:"#5AC05A"}})]}),(0,o.jsx)("div",{className:"column middle",children:(0,o.jsx)("input",{type:"text",value:n})}),(0,o.jsx)("div",{className:"column right",children:(0,o.jsxs)("div",{style:{float:"right"},children:[(0,o.jsx)("span",{className:"bar"}),(0,o.jsx)("span",{className:"bar"}),(0,o.jsx)("span",{className:"bar"})]})})]}),(0,o.jsx)("div",{className:"content",children:t.children})]})}var r=e(8180);function c(t){return(0,o.jsx)(s,{...t,children:(0,o.jsx)("img",{src:(0,r.A)(t.src),alt:t.alt})})}},8453:(t,n,e)=>{e.d(n,{R:()=>c,x:()=>a});var o=e(6540);const s={},r=o.createContext(s);function c(t){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof t?t(n):{...n,...t}}),[n,t])}function a(t){let n;return n=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:c(t.components),o.createElement(r.Provider,{value:n},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/36d48778.5c024004.js b/assets/js/36d48778.5c024004.js deleted file mode 100644 index 8867627..0000000 --- a/assets/js/36d48778.5c024004.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[850],{780:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var a=n(4848),r=n(8453);const s={},o="\ud83d\udcd8 Tools, libraries, and concepts",c={id:"prepare-the-data/concepts",title:"\ud83d\udcd8 Tools, libraries, and concepts",description:"datasets",source:"@site/docs/50-prepare-the-data/1-concepts.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/concepts",permalink:"/ai-rag-lab/docs/prepare-the-data/concepts",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/1-concepts.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Prepare the Data",permalink:"/ai-rag-lab/docs/category/prepare-the-data"},next:{title:"\ud83d\udc50 Load the dataset",permalink:"/ai-rag-lab/docs/prepare-the-data/load-data"}},i={},d=[{value:"datasets",id:"datasets",level:2},{value:"RecursiveCharacterTextSplitter",id:"recursivecharactertextsplitter",level:2},{value:"Sentence Transformers",id:"sentence-transformers",level:2},{value:"PyMongo",id:"pymongo",level:2}];function l(e){const t={a:"a",h1:"h1",h2:"h2",p:"p",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h1,{id:"-tools-libraries-and-concepts",children:"\ud83d\udcd8 Tools, libraries, and concepts"}),"\n",(0,a.jsx)(t.h2,{id:"datasets",children:(0,a.jsx)(t.a,{href:"https://huggingface.co/docs/datasets/en/index",children:"datasets"})}),"\n",(0,a.jsx)(t.p,{children:"Library used to download a dataset of MongoDB Developer center tutorials from Hugging Face."}),"\n",(0,a.jsx)(t.h2,{id:"recursivecharactertextsplitter",children:(0,a.jsx)(t.a,{href:"https://python.langchain.com/v0.1/docs/modules/data_connection/document_transformers/split_by_token/",children:"RecursiveCharacterTextSplitter"})}),"\n",(0,a.jsx)(t.p,{children:"A LangChain text splitter that first splits documents by a list of characters and then recursively merges characters into tokens until the specified chunk size is reached."}),"\n",(0,a.jsx)(t.h2,{id:"sentence-transformers",children:(0,a.jsx)(t.a,{href:"https://sbert.net/",children:"Sentence Transformers"})}),"\n",(0,a.jsx)(t.p,{children:"Python library for accessing, using, and training open-source embedding models."}),"\n",(0,a.jsx)(t.h2,{id:"pymongo",children:(0,a.jsx)(t.a,{href:"https://pymongo.readthedocs.io/en/stable/",children:"PyMongo"})}),"\n",(0,a.jsx)(t.p,{children:"Python driver for MongoDB. Used to connect to MongoDB databases, delete and insert documents into a MongoDB collection."})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>c});var a=n(6540);const r={},s=a.createContext(r);function o(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),a.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3c8d921e.dace39cb.js b/assets/js/3c8d921e.dace39cb.js new file mode 100644 index 0000000..f9e7ccc --- /dev/null +++ b/assets/js/3c8d921e.dace39cb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[294],{5778:(t,e,a)=>{a.r(e),a.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>n,metadata:()=>d,toc:()=>i});var o=a(4848),r=a(8453);const n={},s="\ud83d\udc50 Load the dataset",d={id:"prepare-the-data/load-data",title:"\ud83d\udc50 Load the dataset",description:"First, let's download the dataset for our lab. We'll use a subset of articles from the MongoDB Developer Center as the source data for our RAG application.",source:"@site/docs/50-prepare-the-data/1-load-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/load-data",permalink:"/ai-rag-lab/docs/prepare-the-data/load-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/1-load-data.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Prepare the Data",permalink:"/ai-rag-lab/docs/category/prepare-the-data"},next:{title:"\ud83d\udc50 Chunk up the data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data"}},l={},i=[];function c(t){const e={h1:"h1",p:"p",strong:"strong",...(0,r.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h1,{id:"-load-the-dataset",children:"\ud83d\udc50 Load the dataset"}),"\n",(0,o.jsx)(e.p,{children:"First, let's download the dataset for our lab. We'll use a subset of articles from the MongoDB Developer Center as the source data for our RAG application."}),"\n",(0,o.jsxs)(e.p,{children:["Run all the cells under the ",(0,o.jsx)(e.strong,{children:"Step 3: Load the dataset"})," section in the notebook to load the articles as a list of Python objects consisting of the content and relevant metadata."]})]})}function p(t={}){const{wrapper:e}={...(0,r.R)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(c,{...t})}):c(t)}},8453:(t,e,a)=>{a.d(e,{R:()=>s,x:()=>d});var o=a(6540);const r={},n=o.createContext(r);function s(t){const e=o.useContext(n);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function d(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:s(t.components),o.createElement(n.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/400dfa73.184a7b29.js b/assets/js/400dfa73.184a7b29.js deleted file mode 100644 index c71f806..0000000 --- a/assets/js/400dfa73.184a7b29.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[254],{6223:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>t,metadata:()=>a,toc:()=>d});var o=s(4848),r=s(8453);const t={},i="\ud83d\udc50 Add memory to the RAG application",a={id:"add-memory/add-memory",title:"\ud83d\udc50 Add memory to the RAG application",description:'In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of "memory" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.',source:"@site/docs/80-add-memory/2-add-memory.mdx",sourceDirName:"80-add-memory",slug:"/add-memory/add-memory",permalink:"/ai-rag-lab/docs/add-memory/add-memory",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/80-add-memory/2-add-memory.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcd8 Tools, libraries, and concepts",permalink:"/ai-rag-lab/docs/add-memory/concepts"},next:{title:"\ud83c\udfaf Summary",permalink:"/ai-rag-lab/docs/summary"}},c={},d=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"-add-memory-to-the-rag-application",children:"\ud83d\udc50 Add memory to the RAG application"}),"\n",(0,o.jsx)(n.p,{children:'In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of "memory" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.'}),"\n",(0,o.jsxs)(n.p,{children:["Fill in any ",(0,o.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,o.jsx)(n.strong,{children:"Step 10: Add memory to the RAG application"})," section in the notebook to add memory to the RAG application."]}),"\n",(0,o.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_20"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:'history_collection.create_index("session_id")\n'})})})]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_21"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"history_collection.insert_one(message)\n"})})})]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_22"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:'history_collection.find({"session_id": session_id}).sort("timestamp", 1)\n'})})})]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_23"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"retrieve_session_history(session_id)\n"})})})]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_24"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:'{"role": "user", "content": user_query}\n'})})})]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_25"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:'store_chat_message(session_id, "user", user_query)\nstore_chat_message(session_id, "assistant", answer)\n'})})})]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>a});var o=s(6540);const r={},t=o.createContext(r);function i(e){const n=o.useContext(t);return o.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(r):e.components||r:i(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/412449fd.40d85668.js b/assets/js/412449fd.40d85668.js deleted file mode 100644 index b6eb23c..0000000 --- a/assets/js/412449fd.40d85668.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[199],{3889:(t,e,a)=>{a.r(e),a.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>n,metadata:()=>d,toc:()=>i});var o=a(4848),r=a(8453);const n={},s="\ud83d\udc50 Load the dataset",d={id:"prepare-the-data/load-data",title:"\ud83d\udc50 Load the dataset",description:"First, let's download the dataset for our lab. We'll use a subset of articles from the MongoDB Developer Center as the source data for our RAG application.",source:"@site/docs/50-prepare-the-data/2-load-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/load-data",permalink:"/ai-rag-lab/docs/prepare-the-data/load-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/2-load-data.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcd8 Tools, libraries, and concepts",permalink:"/ai-rag-lab/docs/prepare-the-data/concepts"},next:{title:"\ud83d\udc50 Chunk up the data",permalink:"/ai-rag-lab/docs/prepare-the-data/chunk-data"}},l={},i=[];function c(t){const e={h1:"h1",p:"p",strong:"strong",...(0,r.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h1,{id:"-load-the-dataset",children:"\ud83d\udc50 Load the dataset"}),"\n",(0,o.jsx)(e.p,{children:"First, let's download the dataset for our lab. We'll use a subset of articles from the MongoDB Developer Center as the source data for our RAG application."}),"\n",(0,o.jsxs)(e.p,{children:["Run all the cells under the ",(0,o.jsx)(e.strong,{children:"Step 3: Load the dataset"})," section in the notebook to load the articles as a list of Python objects consisting of the content and relevant metadata."]})]})}function p(t={}){const{wrapper:e}={...(0,r.R)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(c,{...t})}):c(t)}},8453:(t,e,a)=>{a.d(e,{R:()=>s,x:()=>d});var o=a(6540);const r={},n=o.createContext(r);function s(t){const e=o.useContext(n);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function d(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:s(t.components),o.createElement(n.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/47cd1b4f.eeed1185.js b/assets/js/47cd1b4f.5d6402e6.js similarity index 69% rename from assets/js/47cd1b4f.eeed1185.js rename to assets/js/47cd1b4f.5d6402e6.js index 69b2fa9..cb54210 100644 --- a/assets/js/47cd1b4f.eeed1185.js +++ b/assets/js/47cd1b4f.5d6402e6.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[454],{3630:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>c,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var r=t(4848),o=t(8453);const i={},c="\ud83d\udcd8 Semantic search in MongoDB",a={id:"perform-semantic-search/concepts",title:"\ud83d\udcd8 Semantic search in MongoDB",description:"In MongoDB, you can semantically search through your data using MongoDB Atlas Vector Search.",source:"@site/docs/60-perform-semantic-search/1-concepts.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/concepts",permalink:"/ai-rag-lab/docs/perform-semantic-search/concepts",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/1-concepts.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Perform Semantic Search on Your Data",permalink:"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data"},next:{title:"\ud83d\udc50 Create a vector search index",permalink:"/ai-rag-lab/docs/perform-semantic-search/create-vector-index"}},s={},d=[];function h(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-semantic-search-in-mongodb",children:"\ud83d\udcd8 Semantic search in MongoDB"}),"\n",(0,r.jsx)(n.p,{children:"In MongoDB, you can semantically search through your data using MongoDB Atlas Vector Search."}),"\n",(0,r.jsx)(n.p,{children:"To perform vector search on your data in MongoDB, you need to create a vector search index. An example of a vector search index definition looks as follows:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'{\n "fields":[\n {\n "type": "vector",\n "path": "embedding",\n "numDimensions": 1536,\n "similarity": "euclidean | cosine | dotProduct"\n },\n {\n "type": "filter",\n "path": "symbol"\n },\n ...\n ]\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["In the index definition, you specify the path to the embedding field (",(0,r.jsx)(n.code,{children:"path"}),"), the number of dimensions in the embedding vectors (",(0,r.jsx)(n.code,{children:"numDimensions"}),"), and a similarity metric that specifies how to determine nearest neighbors (",(0,r.jsx)(n.code,{children:"similarity"}),"). You can also index filter fields that allow you to pre-filter on certain metadata to narrow the scope of the vector search."]}),"\n",(0,r.jsxs)(n.p,{children:["Vector search in MongoDB takes the form of an aggregation pipeline stage. It always needs to be the first stage in the pipeline and can be followed by other stages to further process the semantic search results. An example pipeline including the ",(0,r.jsx)(n.code,{children:"$vectorSearch"})," stage is as follows:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'[\n {\n "$vectorSearch": {\n "index": "vector_index", \n "path": "embedding", \n "filter": {"symbol": "ABMD"}, \n "queryVector": [0.02421053, -0.022372592,...], \n "numCandidates": 150, \n "limit": 10\n }\n }, \n {\n "$project": {\n "_id": 0, \n "Content": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})}),"\n",(0,r.jsxs)(n.p,{children:["In this example, you can see a vector search query with a pre-filter. The ",(0,r.jsx)(n.code,{children:"limit"})," field in the query definition specifies how many documents to return from the vector search."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"$project"})," stage that follows only returns documents with the ",(0,r.jsx)(n.code,{children:"Content"})," field and the similarity score from the vector search."]})]})}function l(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>a});var r=t(6540);const o={},i=r.createContext(o);function c(e){const n=r.useContext(i);return r.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(o):e.components||o:c(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[454],{3630:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>c,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var r=t(4848),o=t(8453);const i={},c="\ud83d\udcd8 Semantic search in MongoDB",a={id:"perform-semantic-search/concepts",title:"\ud83d\udcd8 Semantic search in MongoDB",description:"In MongoDB, you can semantically search through your data using MongoDB Atlas Vector Search.",source:"@site/docs/60-perform-semantic-search/1-concepts.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/concepts",permalink:"/ai-rag-lab/docs/perform-semantic-search/concepts",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/1-concepts.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Perform Semantic Search on Your Data",permalink:"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data"},next:{title:"\ud83d\udc50 Create a vector search index",permalink:"/ai-rag-lab/docs/perform-semantic-search/create-vector-index"}},s={},d=[];function h(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-semantic-search-in-mongodb",children:"\ud83d\udcd8 Semantic search in MongoDB"}),"\n",(0,r.jsx)(n.p,{children:"In MongoDB, you can semantically search through your data using MongoDB Atlas Vector Search."}),"\n",(0,r.jsx)(n.p,{children:"To perform vector search on your data in MongoDB, you need to create a vector search index. An example of a vector search index definition looks as follows:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'{\n "fields":[\n {\n "type": "vector",\n "path": "embedding",\n "numDimensions": 1536,\n "similarity": "euclidean | cosine | dotProduct"\n },\n {\n "type": "filter",\n "path": "symbol"\n },\n ...\n ]\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["In the index definition, you specify the path to the embedding field (",(0,r.jsx)(n.code,{children:"path"}),"), the number of dimensions in the embedding vectors (",(0,r.jsx)(n.code,{children:"numDimensions"}),"), and a similarity metric that specifies how to determine nearest neighbors (",(0,r.jsx)(n.code,{children:"similarity"}),"). You can also index filter fields that allow you to pre-filter on certain metadata to narrow the scope of the vector search."]}),"\n",(0,r.jsxs)(n.p,{children:["Vector search in MongoDB takes the form of an aggregation pipeline stage. It always needs to be the first stage in the pipeline and can be followed by other stages to further process the semantic search results. An example pipeline including the ",(0,r.jsx)(n.code,{children:"$vectorSearch"})," stage is as follows:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'[\n {\n "$vectorSearch": {\n "index": "vector_index", \n "path": "embedding", \n "queryVector": [0.02421053, -0.022372592,...], \n "numCandidates": 150,\n "filter": {"symbol": "ABMD"},\n "limit": 10\n }\n }, \n {\n "$project": {\n "_id": 0, \n "Content": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})}),"\n",(0,r.jsxs)(n.p,{children:["In this example, you can see a vector search query with a pre-filter. The ",(0,r.jsx)(n.code,{children:"limit"})," field in the query definition specifies how many documents to return from the vector search."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"$project"})," stage that follows only returns documents with the ",(0,r.jsx)(n.code,{children:"Content"})," field and the similarity score from the vector search."]})]})}function l(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>a});var r=t(6540);const o={},i=r.createContext(o);function c(e){const n=r.useContext(i);return r.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(o):e.components||o:c(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6effaccf.43550ce6.js b/assets/js/6effaccf.b1c13912.js similarity index 95% rename from assets/js/6effaccf.43550ce6.js rename to assets/js/6effaccf.b1c13912.js index 004c205..2fd699f 100644 --- a/assets/js/6effaccf.43550ce6.js +++ b/assets/js/6effaccf.b1c13912.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[839],{8031:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var s=r(4848),t=r(8453);const o={},a="\ud83e\uddb9 Stream responses from the RAG application",i={id:"build-rag-app/stream-responses",title:"\ud83e\uddb9 Stream responses from the RAG application",description:"By default, generation results are returned once the generation is completed. Another option is to stream the results as they come, which is useful for chat use cases where the user can incrementally see results as each token is generated.",source:"@site/docs/70-build-rag-app/3-stream-responses.mdx",sourceDirName:"70-build-rag-app",slug:"/build-rag-app/stream-responses",permalink:"/ai-rag-lab/docs/build-rag-app/stream-responses",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/70-build-rag-app/3-stream-responses.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83e\uddb9 Re-rank retrieved results",permalink:"/ai-rag-lab/docs/build-rag-app/add-reranking"},next:{title:"Add memory to the RAG application",permalink:"/ai-rag-lab/docs/category/add-memory-to-the-rag-application"}},c={},l=[];function d(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components},{Details:r}=n;return r||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"-stream-responses-from-the-rag-application",children:"\ud83e\uddb9 Stream responses from the RAG application"}),"\n",(0,s.jsx)(n.p,{children:"By default, generation results are returned once the generation is completed. Another option is to stream the results as they come, which is useful for chat use cases where the user can incrementally see results as each token is generated."}),"\n",(0,s.jsxs)(n.p,{children:["Fill in any ",(0,s.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,s.jsx)(n.strong,{children:"\ud83e\uddb9\u200d\u2640\ufe0f Return streaming responses"})," section in the notebook to stream the results from your RAG application."]}),"\n",(0,s.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_17"})}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"create_prompt(user_query)\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_18"})}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'fw_client.chat.completions.create(\n model=model,\n messages=[{"role": "user", "content": prompt}],\n stream=True\n)\n'})})})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_19"})}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'for chunk in response:\n if chunk.choices[0].delta.content:\n print(chunk.choices[0].delta.content, end="")\n'})})})]})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>a,x:()=>i});var s=r(6540);const t={},o=s.createContext(t);function a(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[839],{8031:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var s=r(4848),t=r(8453);const o={},a="\ud83e\uddb9 Stream responses from the RAG application",i={id:"build-rag-app/stream-responses",title:"\ud83e\uddb9 Stream responses from the RAG application",description:"By default, generation results are returned once the generation is completed. Another option is to stream the results as they come, which is useful for chat use cases where the user can incrementally see results as each token is generated.",source:"@site/docs/70-build-rag-app/3-stream-responses.mdx",sourceDirName:"70-build-rag-app",slug:"/build-rag-app/stream-responses",permalink:"/ai-rag-lab/docs/build-rag-app/stream-responses",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/70-build-rag-app/3-stream-responses.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83e\uddb9 Re-rank retrieved results",permalink:"/ai-rag-lab/docs/build-rag-app/add-reranking"},next:{title:"Add memory to the RAG application",permalink:"/ai-rag-lab/docs/category/add-memory-to-the-rag-application"}},c={},l=[];function d(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components},{Details:r}=n;return r||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"-stream-responses-from-the-rag-application",children:"\ud83e\uddb9 Stream responses from the RAG application"}),"\n",(0,s.jsx)(n.p,{children:"By default, generation results are returned once the generation is completed. Another option is to stream the results as they come, which is useful for chat use cases where the user can incrementally see results as each token is generated."}),"\n",(0,s.jsxs)(n.p,{children:["Fill in any ",(0,s.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,s.jsx)(n.strong,{children:"\ud83e\uddb9\u200d\u2640\ufe0f Return streaming responses"})," section in the notebook to stream the results from your RAG application."]}),"\n",(0,s.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_20"})}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"create_prompt(user_query)\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_21"})}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'fw_client.chat.completions.create(\n model=model,\n messages=[{"role": "user", "content": prompt}],\n stream=True\n)\n'})})})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"CODE_BLOCK_22"})}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:'for chunk in response:\n if chunk.choices[0].delta.content:\n print(chunk.choices[0].delta.content, end="")\n'})})})]})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>a,x:()=>i});var s=r(6540);const t={},o=s.createContext(t);function a(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/71a1ca8e.eb8eb148.js b/assets/js/71a1ca8e.6b0e8496.js similarity index 98% rename from assets/js/71a1ca8e.eb8eb148.js rename to assets/js/71a1ca8e.6b0e8496.js index 74bc21b..9dacadc 100644 --- a/assets/js/71a1ca8e.eb8eb148.js +++ b/assets/js/71a1ca8e.6b0e8496.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[264],{8622:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var t=n(4848),a=n(8453);const i={},o="\ud83e\uddb9 Re-rank retrieved results",s={id:"build-rag-app/add-reranking",title:"\ud83e\uddb9 Re-rank retrieved results",description:"Re-rankers are specialized models that are trained to calculate the relevance between query-document pairs. Without re-ranking the order of retrieved results is governed by the embedding model, which isn't optimized for relevance and can lead to poor LLM recall in RAG applications.",source:"@site/docs/70-build-rag-app/2-add-reranking.mdx",sourceDirName:"70-build-rag-app",slug:"/build-rag-app/add-reranking",permalink:"/ai-rag-lab/docs/build-rag-app/add-reranking",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/70-build-rag-app/2-add-reranking.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Build the RAG application",permalink:"/ai-rag-lab/docs/build-rag-app/build-rag-app"},next:{title:"\ud83e\uddb9 Stream responses from the RAG application",permalink:"/ai-rag-lab/docs/build-rag-app/stream-responses"}},d={},l=[];function c(e){const r={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.h1,{id:"-re-rank-retrieved-results",children:"\ud83e\uddb9 Re-rank retrieved results"}),"\n",(0,t.jsx)(r.p,{children:"Re-rankers are specialized models that are trained to calculate the relevance between query-document pairs. Without re-ranking the order of retrieved results is governed by the embedding model, which isn't optimized for relevance and can lead to poor LLM recall in RAG applications."}),"\n",(0,t.jsxs)(r.p,{children:["Fill in any ",(0,t.jsx)(r.code,{children:""})," placeholders and run the cells under the ",(0,t.jsx)(r.strong,{children:"\ud83e\uddb9\u200d\u2640\ufe0f Re-rank retrieved results"})," section in the notebook to add a re-ranking stage to the RAG application."]}),"\n",(0,t.jsx)(r.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,t.jsx)(r.p,{children:(0,t.jsx)(r.strong,{children:"CODE_BLOCK_16"})}),"\n",(0,t.jsxs)(n,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-python",children:"rerank_model.rank(\n user_query, documents, return_documents=True, top_k=5\n)\n"})})})]})]})}function p(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>o,x:()=>s});var t=n(6540);const a={},i=t.createContext(a);function o(e){const r=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function s(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),t.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[264],{8622:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var t=n(4848),a=n(8453);const i={},o="\ud83e\uddb9 Re-rank retrieved results",s={id:"build-rag-app/add-reranking",title:"\ud83e\uddb9 Re-rank retrieved results",description:"Re-rankers are specialized models that are trained to calculate the relevance between query-document pairs. Without re-ranking the order of retrieved results is governed by the embedding model, which isn't optimized for relevance and can lead to poor LLM recall in RAG applications.",source:"@site/docs/70-build-rag-app/2-add-reranking.mdx",sourceDirName:"70-build-rag-app",slug:"/build-rag-app/add-reranking",permalink:"/ai-rag-lab/docs/build-rag-app/add-reranking",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/70-build-rag-app/2-add-reranking.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Build the RAG application",permalink:"/ai-rag-lab/docs/build-rag-app/build-rag-app"},next:{title:"\ud83e\uddb9 Stream responses from the RAG application",permalink:"/ai-rag-lab/docs/build-rag-app/stream-responses"}},d={},l=[];function c(e){const r={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.h1,{id:"-re-rank-retrieved-results",children:"\ud83e\uddb9 Re-rank retrieved results"}),"\n",(0,t.jsx)(r.p,{children:"Re-rankers are specialized models that are trained to calculate the relevance between query-document pairs. Without re-ranking the order of retrieved results is governed by the embedding model, which isn't optimized for relevance and can lead to poor LLM recall in RAG applications."}),"\n",(0,t.jsxs)(r.p,{children:["Fill in any ",(0,t.jsx)(r.code,{children:""})," placeholders and run the cells under the ",(0,t.jsx)(r.strong,{children:"\ud83e\uddb9\u200d\u2640\ufe0f Re-rank retrieved results"})," section in the notebook to add a re-ranking stage to the RAG application."]}),"\n",(0,t.jsx)(r.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,t.jsx)(r.p,{children:(0,t.jsx)(r.strong,{children:"CODE_BLOCK_19"})}),"\n",(0,t.jsxs)(n,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-python",children:"rerank_model.rank(\n user_query, documents, return_documents=True, top_k=5\n)\n"})})})]})]})}function p(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>o,x:()=>s});var t=n(6540);const a={},i=t.createContext(a);function o(e){const r=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function s(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),t.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/798f680c.7474a8ee.js b/assets/js/798f680c.0dfa536d.js similarity index 83% rename from assets/js/798f680c.7474a8ee.js rename to assets/js/798f680c.0dfa536d.js index 8d696a9..645f6fe 100644 --- a/assets/js/798f680c.7474a8ee.js +++ b/assets/js/798f680c.0dfa536d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[260],{5285:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>i,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>a,toc:()=>d});var s=n(4848),t=n(8453);const c={},o="\ud83d\udc50 Perform semantic search",a={id:"perform-semantic-search/vector-search",title:"\ud83d\udc50 Perform semantic search",description:"Now let's run some vector search queries against our data present in MongoDB.",source:"@site/docs/60-perform-semantic-search/3-vector-search.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/vector-search",permalink:"/ai-rag-lab/docs/perform-semantic-search/vector-search",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/3-vector-search.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Create a vector search index",permalink:"/ai-rag-lab/docs/perform-semantic-search/create-vector-index"},next:{title:"\ud83e\uddb9 Combine pre-filtering with vector search",permalink:"/ai-rag-lab/docs/perform-semantic-search/pre-filtering"}},i={},d=[];function l(e){const r={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.h1,{id:"-perform-semantic-search",children:"\ud83d\udc50 Perform semantic search"}),"\n",(0,s.jsx)(r.p,{children:"Now let's run some vector search queries against our data present in MongoDB."}),"\n",(0,s.jsxs)(r.p,{children:["Fill in any ",(0,s.jsx)(r.code,{children:""})," placeholders and run the cells under the ",(0,s.jsx)(r.strong,{children:"Step 8: Perform semantic search on your data"})," section in the notebook to run vector search queries against your data."]}),"\n",(0,s.jsx)(r.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_8"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"get_embedding(user_query)\n"})})})]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_9"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "queryVector": query_embedding,\n "path": "embedding",\n "numCandidates": 150,\n "limit": 5,\n }\n },\n {\n "$project": {\n "_id": 0,\n "body": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})})})]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_10"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"collection.aggregate(pipeline)\n"})})})]})]})}function h(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>o,x:()=>a});var s=n(6540);const t={},c=s.createContext(t);function o(e){const r=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),s.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[260],{5285:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>i,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>a,toc:()=>d});var s=n(4848),t=n(8453);const c={},o="\ud83d\udc50 Perform semantic search",a={id:"perform-semantic-search/vector-search",title:"\ud83d\udc50 Perform semantic search",description:"Now let's run some vector search queries against our data present in MongoDB.",source:"@site/docs/60-perform-semantic-search/3-vector-search.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/vector-search",permalink:"/ai-rag-lab/docs/perform-semantic-search/vector-search",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/3-vector-search.mdx",tags:[],version:"current",sidebarPosition:3,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Create a vector search index",permalink:"/ai-rag-lab/docs/perform-semantic-search/create-vector-index"},next:{title:"\ud83e\uddb9 Combine pre-filtering with vector search",permalink:"/ai-rag-lab/docs/perform-semantic-search/pre-filtering"}},i={},d=[];function l(e){const r={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,t.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.h1,{id:"-perform-semantic-search",children:"\ud83d\udc50 Perform semantic search"}),"\n",(0,s.jsx)(r.p,{children:"Now let's run some vector search queries against our data present in MongoDB."}),"\n",(0,s.jsxs)(r.p,{children:["Fill in any ",(0,s.jsx)(r.code,{children:""})," placeholders and run the cells under the ",(0,s.jsx)(r.strong,{children:"Step 8: Perform semantic search on your data"})," section in the notebook to run vector search queries against your data."]}),"\n",(0,s.jsx)(r.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_9"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"get_embedding(user_query)\n"})})})]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_10"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "queryVector": query_embedding,\n "path": "embedding",\n "numCandidates": 150,\n "limit": 5\n }\n },\n {\n "$project": {\n "_id": 0,\n "body": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})})})]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"CODE_BLOCK_11"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-python",children:"collection.aggregate(pipeline)\n"})})})]})]})}function h(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,r,n)=>{n.d(r,{R:()=>o,x:()=>a});var s=n(6540);const t={},c=s.createContext(t);function o(e){const r=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),s.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7a749954.55798db9.js b/assets/js/7a749954.55798db9.js new file mode 100644 index 0000000..99a2dc1 --- /dev/null +++ b/assets/js/7a749954.55798db9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[711],{9129:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>s,default:()=>l,frontMatter:()=>c,metadata:()=>a,toc:()=>d});var o=t(4848),n=t(8453);const c={},s="\ud83d\udc50 Create a vector search index",a={id:"perform-semantic-search/create-vector-index",title:"\ud83d\udc50 Create a vector search index",description:"To retrieve documents from MongoDB using vector search, you must configure a vector search index on the collection into which you ingested your data. The recommended way to do this is via the MongoDB drivers.",source:"@site/docs/60-perform-semantic-search/2-create-vector-index.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/create-vector-index",permalink:"/ai-rag-lab/docs/perform-semantic-search/create-vector-index",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/2-create-vector-index.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcd8 Semantic search in MongoDB",permalink:"/ai-rag-lab/docs/perform-semantic-search/concepts"},next:{title:"\ud83d\udc50 Perform semantic search",permalink:"/ai-rag-lab/docs/perform-semantic-search/vector-search"}},i={},d=[];function h(e){const r={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,n.R)(),...e.components},{Details:t}=r;return t||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.h1,{id:"-create-a-vector-search-index",children:"\ud83d\udc50 Create a vector search index"}),"\n",(0,o.jsx)(r.p,{children:"To retrieve documents from MongoDB using vector search, you must configure a vector search index on the collection into which you ingested your data. The recommended way to do this is via the MongoDB drivers."}),"\n",(0,o.jsxs)(r.p,{children:["Fill in any ",(0,o.jsx)(r.code,{children:""})," placeholders and run the cells under the ",(0,o.jsx)(r.strong,{children:"Step 7: Create a vector search index"})," section in the notebook to create a vector search index."]}),"\n",(0,o.jsx)(r.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,o.jsx)(r.p,{children:(0,o.jsx)(r.strong,{children:"CODE_BLOCK_8"})}),"\n",(0,o.jsxs)(t,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-python",children:"collection.create_search_index(model=model)\n"})})})]})]})}function l(e={}){const{wrapper:r}={...(0,n.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},8453:(e,r,t)=>{t.d(r,{R:()=>s,x:()=>a});var o=t(6540);const n={},c=o.createContext(n);function s(e){const r=o.useContext(c);return o.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),o.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7a749954.5da4c1f2.js b/assets/js/7a749954.5da4c1f2.js deleted file mode 100644 index fc3edd8..0000000 --- a/assets/js/7a749954.5da4c1f2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[711],{9129:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>l,frontMatter:()=>c,metadata:()=>s,toc:()=>d});var r=t(4848),o=t(8453);const c={},i="\ud83d\udc50 Create a vector search index",s={id:"perform-semantic-search/create-vector-index",title:"\ud83d\udc50 Create a vector search index",description:"To retrieve documents from MongoDB using vector search, you must configure a vector search index on the collection into which you ingested your data.",source:"@site/docs/60-perform-semantic-search/2-create-vector-index.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/create-vector-index",permalink:"/ai-rag-lab/docs/perform-semantic-search/create-vector-index",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/2-create-vector-index.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udcd8 Semantic search in MongoDB",permalink:"/ai-rag-lab/docs/perform-semantic-search/concepts"},next:{title:"\ud83d\udc50 Perform semantic search",permalink:"/ai-rag-lab/docs/perform-semantic-search/vector-search"}},a={},d=[];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components},{Screenshot:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Screenshot",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-create-a-vector-search-index",children:"\ud83d\udc50 Create a vector search index"}),"\n",(0,r.jsx)(n.p,{children:"To retrieve documents from MongoDB using vector search, you must configure a vector search index on the collection into which you ingested your data."}),"\n",(0,r.jsxs)(n.p,{children:["To do this, open the ",(0,r.jsx)(n.strong,{children:"Database Deployments"})," page in the Atlas UI and select ",(0,r.jsx)(n.strong,{children:"Create Index"})," in the lower right corner under Atlas Search."]}),"\n",(0,r.jsx)(t,{url:"https://cloud.mongodb.com",src:"img/screenshots/60-perform-semantic-search/1-create-index.png",alt:"Select create index"}),"\n",(0,r.jsxs)(n.p,{children:["Click the ",(0,r.jsx)(n.strong,{children:"Create Search Index"})," button."]}),"\n",(0,r.jsx)(t,{url:"https://cloud.mongodb.com",src:"img/screenshots/60-perform-semantic-search/2-create-search-index.png",alt:"Create search index"}),"\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"JSON Editor"})," under Atlas Vector Search to create your index"]}),"\n",(0,r.jsx)(t,{url:"https://cloud.mongodb.com",src:"img/screenshots/60-perform-semantic-search/3-json-editor.png",alt:"The 'Create Index' page with the 'JSON Editor' tab highlighted"}),"\n",(0,r.jsxs)(n.p,{children:["Select the ",(0,r.jsx)(n.code,{children:"mongodb_rag_lab"})," database and the ",(0,r.jsx)(n.code,{children:"knowledge"})," collection, change the index name to ",(0,r.jsx)(n.code,{children:"vector_index"}),", and add the following index definition in the JSON editor:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'{\n "fields": [\n {\n "type": "vector",\n "path": "embedding",\n "numDimensions": 384,\n "similarity": "cosine"\n }\n ]\n}\n'})}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["The number of dimensions in the index definition is 384 since we are using the ",(0,r.jsx)(n.a,{href:"https://huggingface.co/thenlper/gte-small",children:"gte-small"})," model to generate embeddings in this lab."]})})]})}function l(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>s});var r=t(6540);const o={},c=r.createContext(o);function i(e){const n=r.useContext(c);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),r.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/86a88343.2b95dab3.js b/assets/js/86a88343.2b95dab3.js new file mode 100644 index 0000000..dcdd219 --- /dev/null +++ b/assets/js/86a88343.2b95dab3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[186],{6742:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>h,frontMatter:()=>c,metadata:()=>o,toc:()=>d});var t=r(4848),i=r(8453);const c={},s="\ud83e\uddb9 Combine pre-filtering with vector search",o={id:"perform-semantic-search/pre-filtering",title:"\ud83e\uddb9 Combine pre-filtering with vector search",description:"Pre-filtering is a technique to optimize vector search by only considering documents that match certain criteria during vector search.",source:"@site/docs/60-perform-semantic-search/4-pre-filtering.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/pre-filtering",permalink:"/ai-rag-lab/docs/perform-semantic-search/pre-filtering",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/4-pre-filtering.mdx",tags:[],version:"current",sidebarPosition:4,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Perform semantic search",permalink:"/ai-rag-lab/docs/perform-semantic-search/vector-search"},next:{title:"Build the RAG Application",permalink:"/ai-rag-lab/docs/category/build-the-rag-application"}},a={},d=[];function l(e){const n={code:"code",h1:"h1",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components},{Details:r}=n;return r||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"-combine-pre-filtering-with-vector-search",children:"\ud83e\uddb9 Combine pre-filtering with vector search"}),"\n",(0,t.jsx)(n.p,{children:"Pre-filtering is a technique to optimize vector search by only considering documents that match certain criteria during vector search."}),"\n",(0,t.jsx)(n.p,{children:"In this section, you will learn how to combine filters with vector search. This mainly involves:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Updating the vector search index to include the appropriate filter fields"}),"\n",(0,t.jsxs)(n.li,{children:["Updating the ",(0,t.jsx)(n.code,{children:"$vectorSearch"})," stage in the aggregation pipeline definition to include the filters"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Fill in any ",(0,t.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,t.jsx)(n.strong,{children:"\ud83e\uddb9\u200d\u2640\ufe0f Combine pre-filtering with vector search"})," section in the notebook to experiment with combining pre-filters with your vector search queries."]}),"\n",(0,t.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_12"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'{\n "name": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "type": "vectorSearch",\n "definition": {\n "fields": [\n {\n "type": "vector",\n "path": "embedding",\n "numDimensions": 384,\n "similarity": "cosine"\n },\n {"type": "filter", "path": "metadata.contentType"}\n ]\n }\n}\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_13"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "path": "embedding",\n "queryVector": query_embedding,\n "numCandidates": 150,\n "limit": 5,\n "filter": {"metadata.contentType": "Video"}\n }\n },\n {\n "$project": {\n "_id": 0,\n "body": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_14"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'{\n "name": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "type": "vectorSearch",\n "definition": {\n "fields": [\n {\n "type": "vector",\n "path": "embedding",\n "numDimensions": 384,\n "similarity": "cosine"\n },\n {"type": "filter", "path": "metadata.contentType"},\n {"type": "filter", "path": "updated"}\n ]\n }\n}\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"CODE_BLOCK_15"})}),"\n",(0,t.jsxs)(r,{children:[(0,t.jsx)("summary",{children:"Answer"}),(0,t.jsx)("div",{children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": ATLAS_VECTOR_SEARCH_INDEX_NAME,\n "path": "embedding",\n "queryVector": query_embedding,\n "numCandidates": 150,\n "limit": 5,\n "filter": {\n "$and": [\n {"metadata.contentType": "Tutorial"},\n {"updated": {"$gte": "2024-05-19"}}\n ]\n }\n }\n },\n {\n "$project": {\n "_id": 0,\n "body": 1,\n "updated": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})})})]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>o});var t=r(6540);const i={},c=t.createContext(i);function s(e){const n=t.useContext(c);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/86a88343.be9144b8.js b/assets/js/86a88343.be9144b8.js deleted file mode 100644 index 5d3ca2e..0000000 --- a/assets/js/86a88343.be9144b8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[186],{6742:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>l,frontMatter:()=>o,metadata:()=>s,toc:()=>a});var r=t(4848),i=t(8453);const o={},c="\ud83e\uddb9 Combine pre-filtering with vector search",s={id:"perform-semantic-search/pre-filtering",title:"\ud83e\uddb9 Combine pre-filtering with vector search",description:"Pre-filtering is a technique to optimize vector search by only considering documents that match certain criteria during vector search.",source:"@site/docs/60-perform-semantic-search/4-pre-filtering.mdx",sourceDirName:"60-perform-semantic-search",slug:"/perform-semantic-search/pre-filtering",permalink:"/ai-rag-lab/docs/perform-semantic-search/pre-filtering",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/60-perform-semantic-search/4-pre-filtering.mdx",tags:[],version:"current",sidebarPosition:4,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Perform semantic search",permalink:"/ai-rag-lab/docs/perform-semantic-search/vector-search"},next:{title:"Build the RAG Application",permalink:"/ai-rag-lab/docs/category/build-the-rag-application"}},d={},a=[{value:"Filter for documents where the content type is Video",id:"filter-for-documents-where-the-content-type-is-video",level:2},{value:"Filter on documents which have been updated on or after 2024-05-19 and where the content type is Tutorial",id:"filter-on-documents-which-have-been-updated-on-or-after-2024-05-19-and-where-the-content-type-is-tutorial",level:2}];function h(e){const n={code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components},{Details:t}=n;return t||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"-combine-pre-filtering-with-vector-search",children:"\ud83e\uddb9 Combine pre-filtering with vector search"}),"\n",(0,r.jsx)(n.p,{children:"Pre-filtering is a technique to optimize vector search by only considering documents that match certain criteria during vector search."}),"\n",(0,r.jsx)(n.p,{children:"In this section, you will learn how to combine filters with vector search. This mainly involves:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Updating the vector search index to include the appropriate filter fields"}),"\n",(0,r.jsxs)(n.li,{children:["Updating the ",(0,r.jsx)(n.code,{children:"$vectorSearch"})," stage in the aggregation pipeline definition to include the filters"]}),"\n"]}),"\n",(0,r.jsxs)(n.h2,{id:"filter-for-documents-where-the-content-type-is-video",children:["Filter for documents where the content type is ",(0,r.jsx)(n.code,{children:"Video"})]}),"\n",(0,r.jsx)(n.p,{children:"To do this, you will first need to modify the vector search index you created previously."}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Updated index definition"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'{\n "fields": [\n {\n "type": "vector",\n "path": "embedding",\n "numDimensions": 384,\n "similarity": "cosine"\n },\n {\n "type":"filter",\n "path":"metadata.contentType"\n }\n ]\n}\n'})})})]}),"\n",(0,r.jsxs)(n.p,{children:["Once you have updated the vector search index, fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Filter for documents where the content type is Video"})," section in the notebook to see how the filter impacts the vector search results."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_11"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": "vector_index",\n "path": "embedding",\n "queryVector": query_embedding,\n "numCandidates": 150,\n "limit": 5,\n "filter": {"metadata.contentType": "Video"}\n }\n },\n {\n "$project": {\n "_id": 0,\n "body": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})})})]}),"\n",(0,r.jsxs)(n.h2,{id:"filter-on-documents-which-have-been-updated-on-or-after-2024-05-19-and-where-the-content-type-is-tutorial",children:["Filter on documents which have been updated on or after ",(0,r.jsx)(n.code,{children:"2024-05-19"})," and where the content type is ",(0,r.jsx)(n.code,{children:"Tutorial"})]}),"\n",(0,r.jsx)(n.p,{children:"Again, you will first need to modify the vector search index."}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Updated index definition"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'{\n "fields": [\n {\n "type": "vector",\n "path": "embedding",\n "numDimensions": 384,\n "similarity": "cosine"\n },\n {\n "type":"filter",\n "path":"metadata.contentType"\n },\n {\n "type":"filter",\n "path":"updated"\n }\n ]\n}\n'})})})]}),"\n",(0,r.jsxs)(n.p,{children:["Once you have updated the vector search index, fill in any ",(0,r.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(n.strong,{children:"Filter on documents which have been updated on or after 2024-05-19 and where the content type is Tutorial"})," section in the notebook to see how the filter impacts the vector search results."]}),"\n",(0,r.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"CODE_BLOCK_12"})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'[\n {\n "$vectorSearch": {\n "index": "vector_index",\n "path": "embedding",\n "queryVector": query_embedding,\n "numCandidates": 150,\n "limit": 5,\n "filter": {\n "metadata.contentType": "Tutorial",\n "updated": {"$gte": "2024-05-19"}\n }\n }\n },\n {\n "$project": {\n "_id": 0,\n "body": 1,\n "score": {"$meta": "vectorSearchScore"}\n }\n }\n]\n'})})})]})]})}function l(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>s});var r=t(6540);const i={},o=r.createContext(i);function c(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8e28e76d.8cdd0315.js b/assets/js/8e28e76d.0cfc4bd0.js similarity index 95% rename from assets/js/8e28e76d.8cdd0315.js rename to assets/js/8e28e76d.0cfc4bd0.js index b8e353a..b457cb3 100644 --- a/assets/js/8e28e76d.8cdd0315.js +++ b/assets/js/8e28e76d.0cfc4bd0.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[722],{2479:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var r=n(4848),a=n(8453);const s={},i="\ud83d\udc50 Build the RAG application",o={id:"build-rag-app/build-rag-app",title:"\ud83d\udc50 Build the RAG application",description:"Let's create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the Llama 3 8B Instruct model to generate an answer to the user question.",source:"@site/docs/70-build-rag-app/1-build-rag-app.mdx",sourceDirName:"70-build-rag-app",slug:"/build-rag-app/build-rag-app",permalink:"/ai-rag-lab/docs/build-rag-app/build-rag-app",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/70-build-rag-app/1-build-rag-app.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Build the RAG Application",permalink:"/ai-rag-lab/docs/category/build-the-rag-application"},next:{title:"\ud83e\uddb9 Re-rank retrieved results",permalink:"/ai-rag-lab/docs/build-rag-app/add-reranking"}},l={},c=[];function d(e){const t={code:"code",em:"em",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components},{Details:n}=t;return n||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"-build-the-rag-application",children:"\ud83d\udc50 Build the RAG application"}),"\n",(0,r.jsxs)(t.p,{children:["Let's create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the ",(0,r.jsx)(t.em,{children:"Llama 3 8B Instruct"})," model to generate an answer to the user question."]}),"\n",(0,r.jsxs)(t.p,{children:["Fill in any ",(0,r.jsx)(t.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(t.strong,{children:"Step 9: Build the RAG application"})," section in the notebook to build the RAG application."]}),"\n",(0,r.jsx)(t.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"CODE_BLOCK_13"})}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"vector_search(user_query)\n"})})})]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"CODE_BLOCK_14"})}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"create_prompt(user_query)\n"})})})]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"CODE_BLOCK_15"})}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'fw_client.chat.completions.create(\n model=model,\n messages=[{"role": "user", "content": prompt}]\n)\n'})})})]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>o});var r=n(6540);const a={},s=r.createContext(a);function i(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[722],{2479:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var r=n(4848),a=n(8453);const s={},i="\ud83d\udc50 Build the RAG application",o={id:"build-rag-app/build-rag-app",title:"\ud83d\udc50 Build the RAG application",description:"Let's create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the Llama 3 8B Instruct model to generate an answer to the user question.",source:"@site/docs/70-build-rag-app/1-build-rag-app.mdx",sourceDirName:"70-build-rag-app",slug:"/build-rag-app/build-rag-app",permalink:"/ai-rag-lab/docs/build-rag-app/build-rag-app",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/70-build-rag-app/1-build-rag-app.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Build the RAG Application",permalink:"/ai-rag-lab/docs/category/build-the-rag-application"},next:{title:"\ud83e\uddb9 Re-rank retrieved results",permalink:"/ai-rag-lab/docs/build-rag-app/add-reranking"}},l={},c=[];function d(e){const t={code:"code",em:"em",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components},{Details:n}=t;return n||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"-build-the-rag-application",children:"\ud83d\udc50 Build the RAG application"}),"\n",(0,r.jsxs)(t.p,{children:["Let's create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the ",(0,r.jsx)(t.em,{children:"Llama 3 8B Instruct"})," model to generate an answer to the user question."]}),"\n",(0,r.jsxs)(t.p,{children:["Fill in any ",(0,r.jsx)(t.code,{children:""})," placeholders and run the cells under the ",(0,r.jsx)(t.strong,{children:"Step 9: Build the RAG application"})," section in the notebook to build the RAG application."]}),"\n",(0,r.jsx)(t.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"CODE_BLOCK_16"})}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"vector_search(user_query)\n"})})})]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"CODE_BLOCK_17"})}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"create_prompt(user_query)\n"})})})]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"CODE_BLOCK_18"})}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Answer"}),(0,r.jsx)("div",{children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:'fw_client.chat.completions.create(\n model=model,\n messages=[{"role": "user", "content": prompt}]\n)\n'})})})]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>o});var r=n(6540);const a={},s=r.createContext(a);function i(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.5728985f.js b/assets/js/935f2afb.5728985f.js deleted file mode 100644 index ac3f041..0000000 --- a/assets/js/935f2afb.5728985f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[581],{5610:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Introduction","href":"/ai-rag-lab/docs/intro","docId":"intro","unlisted":false},{"type":"category","label":"Retrieval Augmented Generation","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 What is RAG?","href":"/ai-rag-lab/docs/rag/what-is-rag","docId":"rag/what-is-rag","unlisted":false},{"type":"link","label":"\ud83d\udcd8 When to use RAG?","href":"/ai-rag-lab/docs/rag/rag-usecases","docId":"rag/rag-usecases","unlisted":false},{"type":"link","label":"\ud83d\udcd8 Components of a RAG system","href":"/ai-rag-lab/docs/rag/components-of-rag","docId":"rag/components-of-rag","unlisted":false}],"href":"/ai-rag-lab/docs/category/retrieval-augmented-generation"},{"type":"category","label":"MongoDB Atlas","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Create your account","href":"/ai-rag-lab/docs/mongodb-atlas/create-account","docId":"mongodb-atlas/create-account","unlisted":false},{"type":"link","label":"\ud83d\udc50 Deploy a database cluster","href":"/ai-rag-lab/docs/mongodb-atlas/create-cluster","docId":"mongodb-atlas/create-cluster","unlisted":false},{"type":"link","label":"\ud83d\udc50 Get your connection string","href":"/ai-rag-lab/docs/mongodb-atlas/get-connection-string","docId":"mongodb-atlas/get-connection-string","unlisted":false}],"href":"/ai-rag-lab/docs/category/mongodb-atlas"},{"type":"category","label":"Fireworks AI","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Create an account","href":"/ai-rag-lab/docs/fireworks-ai/create-account","docId":"fireworks-ai/create-account","unlisted":false},{"type":"link","label":"\ud83d\udc50 Create an API key","href":"/ai-rag-lab/docs/fireworks-ai/create-api-key","docId":"fireworks-ai/create-api-key","unlisted":false}],"href":"/ai-rag-lab/docs/category/fireworks-ai"},{"type":"category","label":"Dev Environment","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Setup dev environment","href":"/ai-rag-lab/docs/dev-env/dev-setup","docId":"dev-env/dev-setup","unlisted":false},{"type":"link","label":"\ud83d\udc50 Setup prerequisites","href":"/ai-rag-lab/docs/dev-env/setup-pre-reqs","docId":"dev-env/setup-pre-reqs","unlisted":false}],"href":"/ai-rag-lab/docs/category/dev-environment"},{"type":"category","label":"Prepare the Data","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Tools, libraries, and concepts","href":"/ai-rag-lab/docs/prepare-the-data/concepts","docId":"prepare-the-data/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Load the dataset","href":"/ai-rag-lab/docs/prepare-the-data/load-data","docId":"prepare-the-data/load-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Chunk up the data","href":"/ai-rag-lab/docs/prepare-the-data/chunk-data","docId":"prepare-the-data/chunk-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Generate embeddings","href":"/ai-rag-lab/docs/prepare-the-data/embed-data","docId":"prepare-the-data/embed-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Ingest data into MongoDB","href":"/ai-rag-lab/docs/prepare-the-data/ingest-data","docId":"prepare-the-data/ingest-data","unlisted":false}],"href":"/ai-rag-lab/docs/category/prepare-the-data"},{"type":"category","label":"Perform Semantic Search on Your Data","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Semantic search in MongoDB","href":"/ai-rag-lab/docs/perform-semantic-search/concepts","docId":"perform-semantic-search/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Create a vector search index","href":"/ai-rag-lab/docs/perform-semantic-search/create-vector-index","docId":"perform-semantic-search/create-vector-index","unlisted":false},{"type":"link","label":"\ud83d\udc50 Perform semantic search","href":"/ai-rag-lab/docs/perform-semantic-search/vector-search","docId":"perform-semantic-search/vector-search","unlisted":false},{"type":"link","label":"\ud83e\uddb9 Combine pre-filtering with vector search","href":"/ai-rag-lab/docs/perform-semantic-search/pre-filtering","docId":"perform-semantic-search/pre-filtering","unlisted":false}],"href":"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data"},{"type":"category","label":"Build the RAG Application","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Build the RAG application","href":"/ai-rag-lab/docs/build-rag-app/build-rag-app","docId":"build-rag-app/build-rag-app","unlisted":false},{"type":"link","label":"\ud83e\uddb9 Re-rank retrieved results","href":"/ai-rag-lab/docs/build-rag-app/add-reranking","docId":"build-rag-app/add-reranking","unlisted":false},{"type":"link","label":"\ud83e\uddb9 Stream responses from the RAG application","href":"/ai-rag-lab/docs/build-rag-app/stream-responses","docId":"build-rag-app/stream-responses","unlisted":false}],"href":"/ai-rag-lab/docs/category/build-the-rag-application"},{"type":"category","label":"Add memory to the RAG application","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Tools, libraries, and concepts","href":"/ai-rag-lab/docs/add-memory/concepts","docId":"add-memory/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Add memory to the RAG application","href":"/ai-rag-lab/docs/add-memory/add-memory","docId":"add-memory/add-memory","unlisted":false}],"href":"/ai-rag-lab/docs/category/add-memory-to-the-rag-application"},{"type":"link","label":"\ud83c\udfaf Summary","href":"/ai-rag-lab/docs/summary","docId":"summary","unlisted":false}]},"docs":{"add-memory/add-memory":{"id":"add-memory/add-memory","title":"\ud83d\udc50 Add memory to the RAG application","description":"In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of \\"memory\\" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.","sidebar":"tutorialSidebar"},"add-memory/concepts":{"id":"add-memory/concepts","title":"\ud83d\udcd8 Tools, libraries, and concepts","description":"Memory is important for the LLM to have multi-turn conversations with the user.","sidebar":"tutorialSidebar"},"build-rag-app/add-reranking":{"id":"build-rag-app/add-reranking","title":"\ud83e\uddb9 Re-rank retrieved results","description":"Re-rankers are specialized models that are trained to calculate the relevance between query-document pairs. Without re-ranking the order of retrieved results is governed by the embedding model, which isn\'t optimized for relevance and can lead to poor LLM recall in RAG applications.","sidebar":"tutorialSidebar"},"build-rag-app/build-rag-app":{"id":"build-rag-app/build-rag-app","title":"\ud83d\udc50 Build the RAG application","description":"Let\'s create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the Llama 3 8B Instruct model to generate an answer to the user question.","sidebar":"tutorialSidebar"},"build-rag-app/stream-responses":{"id":"build-rag-app/stream-responses","title":"\ud83e\uddb9 Stream responses from the RAG application","description":"By default, generation results are returned once the generation is completed. Another option is to stream the results as they come, which is useful for chat use cases where the user can incrementally see results as each token is generated.","sidebar":"tutorialSidebar"},"dev-env/dev-setup":{"id":"dev-env/dev-setup","title":"\ud83d\udc50 Setup dev environment","description":"You will be working in a Jupyter Notebook throughout this lab. The easiest and recommended way to run the lab notebook is using Google Colab.","sidebar":"tutorialSidebar"},"dev-env/setup-pre-reqs":{"id":"dev-env/setup-pre-reqs","title":"\ud83d\udc50 Setup prerequisites","description":"Replace any placeholders and run the cells under the Step 1 Setup prerequisites sections in the notebook.","sidebar":"tutorialSidebar"},"fireworks-ai/create-account":{"id":"fireworks-ai/create-account","title":"\ud83d\udc50 Create an account","description":"In this lab, we will use the Llama 3 8B Instruct model hosted by Fireworks AI. Fireworks gives you $1 credit upon sign up which is plenty to experiment with industry-leading models on their platform.","sidebar":"tutorialSidebar"},"fireworks-ai/create-api-key":{"id":"fireworks-ai/create-api-key","title":"\ud83d\udc50 Create an API key","description":"To use the Fireworks API, you will need an API Key. To create a secure API key, follow the steps below.","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Introduction","description":"|Lab goals|Learn how to build a RAG application from scratch|","sidebar":"tutorialSidebar"},"mongodb-atlas/create-account":{"id":"mongodb-atlas/create-account","title":"\ud83d\udc50 Create your account","description":"In this lab, you will learn how to use MongoDB Atlas as a knowledge base as well as a memory provider for RAG applications.","sidebar":"tutorialSidebar"},"mongodb-atlas/create-cluster":{"id":"mongodb-atlas/create-cluster","title":"\ud83d\udc50 Deploy a database cluster","description":"Now that you have a MongoDB Atlas account, you can create your first cluster for free.","sidebar":"tutorialSidebar"},"mongodb-atlas/get-connection-string":{"id":"mongodb-atlas/get-connection-string","title":"\ud83d\udc50 Get your connection string","description":"In order to ingest data into your cluster later in the lab, you will need to get the connection string for your cluster.","sidebar":"tutorialSidebar"},"perform-semantic-search/concepts":{"id":"perform-semantic-search/concepts","title":"\ud83d\udcd8 Semantic search in MongoDB","description":"In MongoDB, you can semantically search through your data using MongoDB Atlas Vector Search.","sidebar":"tutorialSidebar"},"perform-semantic-search/create-vector-index":{"id":"perform-semantic-search/create-vector-index","title":"\ud83d\udc50 Create a vector search index","description":"To retrieve documents from MongoDB using vector search, you must configure a vector search index on the collection into which you ingested your data.","sidebar":"tutorialSidebar"},"perform-semantic-search/pre-filtering":{"id":"perform-semantic-search/pre-filtering","title":"\ud83e\uddb9 Combine pre-filtering with vector search","description":"Pre-filtering is a technique to optimize vector search by only considering documents that match certain criteria during vector search.","sidebar":"tutorialSidebar"},"perform-semantic-search/vector-search":{"id":"perform-semantic-search/vector-search","title":"\ud83d\udc50 Perform semantic search","description":"Now let\'s run some vector search queries against our data present in MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/chunk-data":{"id":"prepare-the-data/chunk-data","title":"\ud83d\udc50 Chunk up the data","description":"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/concepts":{"id":"prepare-the-data/concepts","title":"\ud83d\udcd8 Tools, libraries, and concepts","description":"datasets","sidebar":"tutorialSidebar"},"prepare-the-data/embed-data":{"id":"prepare-the-data/embed-data","title":"\ud83d\udc50 Generate embeddings","description":"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/ingest-data":{"id":"prepare-the-data/ingest-data","title":"\ud83d\udc50 Ingest data into MongoDB","description":"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded article chunks into MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/load-data":{"id":"prepare-the-data/load-data","title":"\ud83d\udc50 Load the dataset","description":"First, let\'s download the dataset for our lab. We\'ll use a subset of articles from the MongoDB Developer Center as the source data for our RAG application.","sidebar":"tutorialSidebar"},"rag/components-of-rag":{"id":"rag/components-of-rag","title":"\ud83d\udcd8 Components of a RAG system","description":"RAG systems have two main components: Retrieval and Generation.","sidebar":"tutorialSidebar"},"rag/rag-usecases":{"id":"rag/rag-usecases","title":"\ud83d\udcd8 When to use RAG?","description":"RAG is best suited for the following:","sidebar":"tutorialSidebar"},"rag/what-is-rag":{"id":"rag/what-is-rag","title":"\ud83d\udcd8 What is RAG?","description":"RAG, short for Retrieval Augmented Generation, is a technique to enhance the quality of responses generated by a large language model (LLM), by augmenting its pre-trained knowledge with information retrieved from external sources. This results is more accurate responses from the LLM by grounding them in real, contextually relevant data.","sidebar":"tutorialSidebar"},"summary":{"id":"summary","title":"\ud83c\udfaf Summary","description":"Congratulations! Following this lab, you have successfully:","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.ba9222c5.js b/assets/js/935f2afb.ba9222c5.js new file mode 100644 index 0000000..4cd68e2 --- /dev/null +++ b/assets/js/935f2afb.ba9222c5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[581],{5610:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Introduction","href":"/ai-rag-lab/docs/intro","docId":"intro","unlisted":false},{"type":"category","label":"Retrieval Augmented Generation","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 What is RAG?","href":"/ai-rag-lab/docs/rag/what-is-rag","docId":"rag/what-is-rag","unlisted":false},{"type":"link","label":"\ud83d\udcd8 When to use RAG?","href":"/ai-rag-lab/docs/rag/rag-usecases","docId":"rag/rag-usecases","unlisted":false},{"type":"link","label":"\ud83d\udcd8 Components of a RAG system","href":"/ai-rag-lab/docs/rag/components-of-rag","docId":"rag/components-of-rag","unlisted":false}],"href":"/ai-rag-lab/docs/category/retrieval-augmented-generation"},{"type":"category","label":"MongoDB Atlas","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Create your account","href":"/ai-rag-lab/docs/mongodb-atlas/create-account","docId":"mongodb-atlas/create-account","unlisted":false},{"type":"link","label":"\ud83d\udc50 Deploy a database cluster","href":"/ai-rag-lab/docs/mongodb-atlas/create-cluster","docId":"mongodb-atlas/create-cluster","unlisted":false},{"type":"link","label":"\ud83d\udc50 Get your connection string","href":"/ai-rag-lab/docs/mongodb-atlas/get-connection-string","docId":"mongodb-atlas/get-connection-string","unlisted":false}],"href":"/ai-rag-lab/docs/category/mongodb-atlas"},{"type":"category","label":"Fireworks AI","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Create an account","href":"/ai-rag-lab/docs/fireworks-ai/create-account","docId":"fireworks-ai/create-account","unlisted":false},{"type":"link","label":"\ud83d\udc50 Create an API key","href":"/ai-rag-lab/docs/fireworks-ai/create-api-key","docId":"fireworks-ai/create-api-key","unlisted":false}],"href":"/ai-rag-lab/docs/category/fireworks-ai"},{"type":"category","label":"Dev Environment","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Setup dev environment","href":"/ai-rag-lab/docs/dev-env/dev-setup","docId":"dev-env/dev-setup","unlisted":false},{"type":"link","label":"\ud83d\udc50 Setup prerequisites","href":"/ai-rag-lab/docs/dev-env/setup-pre-reqs","docId":"dev-env/setup-pre-reqs","unlisted":false}],"href":"/ai-rag-lab/docs/category/dev-environment"},{"type":"category","label":"Prepare the Data","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Load the dataset","href":"/ai-rag-lab/docs/prepare-the-data/load-data","docId":"prepare-the-data/load-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Chunk up the data","href":"/ai-rag-lab/docs/prepare-the-data/chunk-data","docId":"prepare-the-data/chunk-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Generate embeddings","href":"/ai-rag-lab/docs/prepare-the-data/embed-data","docId":"prepare-the-data/embed-data","unlisted":false},{"type":"link","label":"\ud83d\udc50 Ingest data into MongoDB","href":"/ai-rag-lab/docs/prepare-the-data/ingest-data","docId":"prepare-the-data/ingest-data","unlisted":false}],"href":"/ai-rag-lab/docs/category/prepare-the-data"},{"type":"category","label":"Perform Semantic Search on Your Data","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udcd8 Semantic search in MongoDB","href":"/ai-rag-lab/docs/perform-semantic-search/concepts","docId":"perform-semantic-search/concepts","unlisted":false},{"type":"link","label":"\ud83d\udc50 Create a vector search index","href":"/ai-rag-lab/docs/perform-semantic-search/create-vector-index","docId":"perform-semantic-search/create-vector-index","unlisted":false},{"type":"link","label":"\ud83d\udc50 Perform semantic search","href":"/ai-rag-lab/docs/perform-semantic-search/vector-search","docId":"perform-semantic-search/vector-search","unlisted":false},{"type":"link","label":"\ud83e\uddb9 Combine pre-filtering with vector search","href":"/ai-rag-lab/docs/perform-semantic-search/pre-filtering","docId":"perform-semantic-search/pre-filtering","unlisted":false}],"href":"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data"},{"type":"category","label":"Build the RAG Application","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Build the RAG application","href":"/ai-rag-lab/docs/build-rag-app/build-rag-app","docId":"build-rag-app/build-rag-app","unlisted":false},{"type":"link","label":"\ud83e\uddb9 Re-rank retrieved results","href":"/ai-rag-lab/docs/build-rag-app/add-reranking","docId":"build-rag-app/add-reranking","unlisted":false},{"type":"link","label":"\ud83e\uddb9 Stream responses from the RAG application","href":"/ai-rag-lab/docs/build-rag-app/stream-responses","docId":"build-rag-app/stream-responses","unlisted":false}],"href":"/ai-rag-lab/docs/category/build-the-rag-application"},{"type":"category","label":"Add memory to the RAG application","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"\ud83d\udc50 Add memory to the RAG application","href":"/ai-rag-lab/docs/add-memory/add-memory","docId":"add-memory/add-memory","unlisted":false}],"href":"/ai-rag-lab/docs/category/add-memory-to-the-rag-application"},{"type":"link","label":"\ud83c\udfaf Summary","href":"/ai-rag-lab/docs/summary","docId":"summary","unlisted":false}]},"docs":{"add-memory/add-memory":{"id":"add-memory/add-memory","title":"\ud83d\udc50 Add memory to the RAG application","description":"In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of \\"memory\\" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.","sidebar":"tutorialSidebar"},"build-rag-app/add-reranking":{"id":"build-rag-app/add-reranking","title":"\ud83e\uddb9 Re-rank retrieved results","description":"Re-rankers are specialized models that are trained to calculate the relevance between query-document pairs. Without re-ranking the order of retrieved results is governed by the embedding model, which isn\'t optimized for relevance and can lead to poor LLM recall in RAG applications.","sidebar":"tutorialSidebar"},"build-rag-app/build-rag-app":{"id":"build-rag-app/build-rag-app","title":"\ud83d\udc50 Build the RAG application","description":"Let\'s create a simple RAG application that takes in a user query, retrieves contextually relevant documents from MongoDB Atlas, and passes the query and retrieved context to the Llama 3 8B Instruct model to generate an answer to the user question.","sidebar":"tutorialSidebar"},"build-rag-app/stream-responses":{"id":"build-rag-app/stream-responses","title":"\ud83e\uddb9 Stream responses from the RAG application","description":"By default, generation results are returned once the generation is completed. Another option is to stream the results as they come, which is useful for chat use cases where the user can incrementally see results as each token is generated.","sidebar":"tutorialSidebar"},"dev-env/dev-setup":{"id":"dev-env/dev-setup","title":"\ud83d\udc50 Setup dev environment","description":"You will be working in a Jupyter Notebook throughout this lab. The easiest and recommended way to run the lab notebook is using Google Colab.","sidebar":"tutorialSidebar"},"dev-env/setup-pre-reqs":{"id":"dev-env/setup-pre-reqs","title":"\ud83d\udc50 Setup prerequisites","description":"Replace any placeholders and run the cells under the Step 1 Setup prerequisites sections in the notebook.","sidebar":"tutorialSidebar"},"fireworks-ai/create-account":{"id":"fireworks-ai/create-account","title":"\ud83d\udc50 Create an account","description":"In this lab, we will use the Llama 3 8B Instruct model hosted by Fireworks AI. Fireworks gives you $1 credit upon sign up which is plenty to experiment with industry-leading models on their platform.","sidebar":"tutorialSidebar"},"fireworks-ai/create-api-key":{"id":"fireworks-ai/create-api-key","title":"\ud83d\udc50 Create an API key","description":"To use the Fireworks API, you will need an API Key. To create a secure API key, follow the steps below.","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Introduction","description":"|Lab goals|Learn how to build a RAG application from scratch|","sidebar":"tutorialSidebar"},"mongodb-atlas/create-account":{"id":"mongodb-atlas/create-account","title":"\ud83d\udc50 Create your account","description":"In this lab, you will learn how to use MongoDB Atlas as a knowledge base as well as a memory provider for RAG applications.","sidebar":"tutorialSidebar"},"mongodb-atlas/create-cluster":{"id":"mongodb-atlas/create-cluster","title":"\ud83d\udc50 Deploy a database cluster","description":"Now that you have a MongoDB Atlas account, you can create your first cluster for free.","sidebar":"tutorialSidebar"},"mongodb-atlas/get-connection-string":{"id":"mongodb-atlas/get-connection-string","title":"\ud83d\udc50 Get your connection string","description":"In order to ingest data into your cluster later in the lab, you will need to get the connection string for your cluster.","sidebar":"tutorialSidebar"},"perform-semantic-search/concepts":{"id":"perform-semantic-search/concepts","title":"\ud83d\udcd8 Semantic search in MongoDB","description":"In MongoDB, you can semantically search through your data using MongoDB Atlas Vector Search.","sidebar":"tutorialSidebar"},"perform-semantic-search/create-vector-index":{"id":"perform-semantic-search/create-vector-index","title":"\ud83d\udc50 Create a vector search index","description":"To retrieve documents from MongoDB using vector search, you must configure a vector search index on the collection into which you ingested your data. The recommended way to do this is via the MongoDB drivers.","sidebar":"tutorialSidebar"},"perform-semantic-search/pre-filtering":{"id":"perform-semantic-search/pre-filtering","title":"\ud83e\uddb9 Combine pre-filtering with vector search","description":"Pre-filtering is a technique to optimize vector search by only considering documents that match certain criteria during vector search.","sidebar":"tutorialSidebar"},"perform-semantic-search/vector-search":{"id":"perform-semantic-search/vector-search","title":"\ud83d\udc50 Perform semantic search","description":"Now let\'s run some vector search queries against our data present in MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/chunk-data":{"id":"prepare-the-data/chunk-data","title":"\ud83d\udc50 Chunk up the data","description":"Since we are working with large documents, we first need to break them up into smaller chunks before embedding and storing them in MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/embed-data":{"id":"prepare-the-data/embed-data","title":"\ud83d\udc50 Generate embeddings","description":"To perform vector search on our data, we need to embed it (i.e. generate embedding vectors) before ingesting it into MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/ingest-data":{"id":"prepare-the-data/ingest-data","title":"\ud83d\udc50 Ingest data into MongoDB","description":"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded article chunks into MongoDB.","sidebar":"tutorialSidebar"},"prepare-the-data/load-data":{"id":"prepare-the-data/load-data","title":"\ud83d\udc50 Load the dataset","description":"First, let\'s download the dataset for our lab. We\'ll use a subset of articles from the MongoDB Developer Center as the source data for our RAG application.","sidebar":"tutorialSidebar"},"rag/components-of-rag":{"id":"rag/components-of-rag","title":"\ud83d\udcd8 Components of a RAG system","description":"RAG systems have two main components: Retrieval and Generation.","sidebar":"tutorialSidebar"},"rag/rag-usecases":{"id":"rag/rag-usecases","title":"\ud83d\udcd8 When to use RAG?","description":"RAG is best suited for the following:","sidebar":"tutorialSidebar"},"rag/what-is-rag":{"id":"rag/what-is-rag","title":"\ud83d\udcd8 What is RAG?","description":"RAG, short for Retrieval Augmented Generation, is a technique to enhance the quality of responses generated by a large language model (LLM), by augmenting its pre-trained knowledge with information retrieved from external sources. This results is more accurate responses from the LLM by grounding them in real, contextually relevant data.","sidebar":"tutorialSidebar"},"summary":{"id":"summary","title":"\ud83c\udfaf Summary","description":"Congratulations! Following this lab, you have successfully:","sidebar":"tutorialSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/9cb2f711.d3dded73.js b/assets/js/9cb2f711.d3dded73.js new file mode 100644 index 0000000..ec5534c --- /dev/null +++ b/assets/js/9cb2f711.d3dded73.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[192],{5518:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>t,metadata:()=>a,toc:()=>c});var o=s(4848),r=s(8453);const t={},i="\ud83d\udc50 Add memory to the RAG application",a={id:"add-memory/add-memory",title:"\ud83d\udc50 Add memory to the RAG application",description:'In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of "memory" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.',source:"@site/docs/80-add-memory/1-add-memory.mdx",sourceDirName:"80-add-memory",slug:"/add-memory/add-memory",permalink:"/ai-rag-lab/docs/add-memory/add-memory",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/80-add-memory/1-add-memory.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Add memory to the RAG application",permalink:"/ai-rag-lab/docs/category/add-memory-to-the-rag-application"},next:{title:"\ud83c\udfaf Summary",permalink:"/ai-rag-lab/docs/summary"}},d={},c=[];function l(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"-add-memory-to-the-rag-application",children:"\ud83d\udc50 Add memory to the RAG application"}),"\n",(0,o.jsx)(n.p,{children:'In many Q&A applications we want to allow the user to have a back-and-forth conversation with the LLM, meaning the application needs some sort of "memory" of past questions and answers, and some logic for incorporating those into its current thinking. In this section, you will retrieve chat message history from MongoDB and incorporate it in your RAG application.'}),"\n",(0,o.jsxs)(n.p,{children:["Fill in any ",(0,o.jsx)(n.code,{children:""})," placeholders and run the cells under the ",(0,o.jsx)(n.strong,{children:"Step 10: Add memory to the RAG application"})," section in the notebook to add memory to the RAG application."]}),"\n",(0,o.jsx)(n.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_23"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:'history_collection.create_index("session_id")\n'})})})]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_24"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"history_collection.insert_one(message)\n"})})})]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_25"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:'history_collection.find({"session_id": session_id}).sort("timestamp", 1)\n'})})})]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_26"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"retrieve_session_history(session_id)\n"})})})]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_27"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:'{"role": "user", "content": user_query}\n'})})})]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"CODE_BLOCK_28"})}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Answer"}),(0,o.jsx)("div",{children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:'store_chat_message(session_id, "user", user_query)\nstore_chat_message(session_id, "assistant", answer)\n'})})})]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>a});var o=s(6540);const r={},t=o.createContext(r);function i(e){const n=o.useContext(t);return o.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(r):e.components||r:i(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a541a3e1.b7a6b495.js b/assets/js/a541a3e1.b7a6b495.js deleted file mode 100644 index 36728b0..0000000 --- a/assets/js/a541a3e1.b7a6b495.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[426],{6314:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>m,frontMatter:()=>s,metadata:()=>i,toc:()=>d});var n=o(4848),r=o(8453);const s={},a="\ud83d\udcd8 Tools, libraries, and concepts",i={id:"add-memory/concepts",title:"\ud83d\udcd8 Tools, libraries, and concepts",description:"Memory is important for the LLM to have multi-turn conversations with the user.",source:"@site/docs/80-add-memory/1-concepts.mdx",sourceDirName:"80-add-memory",slug:"/add-memory/concepts",permalink:"/ai-rag-lab/docs/add-memory/concepts",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/80-add-memory/1-concepts.mdx",tags:[],version:"current",sidebarPosition:1,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Add memory to the RAG application",permalink:"/ai-rag-lab/docs/category/add-memory-to-the-rag-application"},next:{title:"\ud83d\udc50 Add memory to the RAG application",permalink:"/ai-rag-lab/docs/add-memory/add-memory"}},c={},d=[];function l(e){const t={h1:"h1",p:"p",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"-tools-libraries-and-concepts",children:"\ud83d\udcd8 Tools, libraries, and concepts"}),"\n",(0,n.jsx)(t.p,{children:"Memory is important for the LLM to have multi-turn conversations with the user."}),"\n",(0,n.jsx)(t.p,{children:"In this lab, you will persist chat messages in a separate MongoDB collection, indexed by session ID."}),"\n",(0,n.jsx)(t.p,{children:"For each new user query, you will fetch previous messages for that session from the collection and pass them to the LLM."}),"\n",(0,n.jsx)(t.p,{children:"Then once the LLM has generated a response to the query, you will write the query and the LLM's answer to the collection as two separate entries but having the same session ID."})]})}function m(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>i});var n=o(6540);const r={},s=n.createContext(r);function a(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ade674ed.99a0fb3b.js b/assets/js/ade674ed.a86778a4.js similarity index 98% rename from assets/js/ade674ed.99a0fb3b.js rename to assets/js/ade674ed.a86778a4.js index ca357a0..e23e7c3 100644 --- a/assets/js/ade674ed.99a0fb3b.js +++ b/assets/js/ade674ed.a86778a4.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[888],{8022:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var r=a(4848),s=a(8453),n=a(1179);const i={},o="\ud83d\udc50 Create an API key",c={id:"fireworks-ai/create-api-key",title:"\ud83d\udc50 Create an API key",description:"To use the Fireworks API, you will need an API Key. To create a secure API key, follow the steps below.",source:"@site/docs/30-fireworks-ai/2-create-api-key.mdx",sourceDirName:"30-fireworks-ai",slug:"/fireworks-ai/create-api-key",permalink:"/ai-rag-lab/docs/fireworks-ai/create-api-key",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/30-fireworks-ai/2-create-api-key.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Create an account",permalink:"/ai-rag-lab/docs/fireworks-ai/create-account"},next:{title:"Dev Environment",permalink:"/ai-rag-lab/docs/category/dev-environment"}},l={},d=[];function p(e){const t={h1:"h1",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"-create-an-api-key",children:"\ud83d\udc50 Create an API key"}),"\n",(0,r.jsx)(t.p,{children:"To use the Fireworks API, you will need an API Key. To create a secure API key, follow the steps below."}),"\n",(0,r.jsxs)(t.p,{children:["Upon logging in, click the ",(0,r.jsx)(t.strong,{children:"User"})," tab."]}),"\n",(0,r.jsx)(n.A,{url:"https://fireworks.ai/",src:"img/screenshots/30-fireworks-ai/2-create-api-key/1-api-key.png",alt:"Select API keys"}),"\n",(0,r.jsxs)(t.p,{children:["Click the purple ",(0,r.jsx)(t.strong,{children:"Create API Key"})," button. In the modal that appears, enter a name and click ",(0,r.jsx)(t.strong,{children:"Create Key"})," to create an API key."]}),"\n",(0,r.jsx)(n.A,{url:"https://fireworks.ai/",src:"img/screenshots/30-fireworks-ai/2-create-api-key/2-create-api-key.png",alt:"Create API key"}),"\n",(0,r.jsx)(t.p,{children:"When prompted, copy the API key to a safe location."})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},1179:(e,t,a)=>{a.d(t,{A:()=>i});a(6540);var r=a(4848);function s(e){const t=e.url||"http://localhost:3000";return(0,r.jsxs)("div",{className:"browser container",children:[(0,r.jsxs)("div",{className:"row",children:[(0,r.jsxs)("div",{className:"column left",children:[(0,r.jsx)("span",{className:"dot",style:{background:"#ED594A"}}),(0,r.jsx)("span",{className:"dot",style:{background:"#FDD800"}}),(0,r.jsx)("span",{className:"dot",style:{background:"#5AC05A"}})]}),(0,r.jsx)("div",{className:"column middle",children:(0,r.jsx)("input",{type:"text",value:t})}),(0,r.jsx)("div",{className:"column right",children:(0,r.jsxs)("div",{style:{float:"right"},children:[(0,r.jsx)("span",{className:"bar"}),(0,r.jsx)("span",{className:"bar"}),(0,r.jsx)("span",{className:"bar"})]})})]}),(0,r.jsx)("div",{className:"content",children:e.children})]})}var n=a(8180);function i(e){return(0,r.jsx)(s,{...e,children:(0,r.jsx)("img",{src:(0,n.A)(e.src),alt:e.alt})})}},8453:(e,t,a)=>{a.d(t,{R:()=>i,x:()=>o});var r=a(6540);const s={},n=r.createContext(s);function i(e){const t=r.useContext(n);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[507],{8022:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var r=a(4848),s=a(8453),n=a(1179);const i={},o="\ud83d\udc50 Create an API key",c={id:"fireworks-ai/create-api-key",title:"\ud83d\udc50 Create an API key",description:"To use the Fireworks API, you will need an API Key. To create a secure API key, follow the steps below.",source:"@site/docs/30-fireworks-ai/2-create-api-key.mdx",sourceDirName:"30-fireworks-ai",slug:"/fireworks-ai/create-api-key",permalink:"/ai-rag-lab/docs/fireworks-ai/create-api-key",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/30-fireworks-ai/2-create-api-key.mdx",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Create an account",permalink:"/ai-rag-lab/docs/fireworks-ai/create-account"},next:{title:"Dev Environment",permalink:"/ai-rag-lab/docs/category/dev-environment"}},l={},d=[];function p(e){const t={h1:"h1",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"-create-an-api-key",children:"\ud83d\udc50 Create an API key"}),"\n",(0,r.jsx)(t.p,{children:"To use the Fireworks API, you will need an API Key. To create a secure API key, follow the steps below."}),"\n",(0,r.jsxs)(t.p,{children:["Upon logging in, click the ",(0,r.jsx)(t.strong,{children:"User"})," tab."]}),"\n",(0,r.jsx)(n.A,{url:"https://fireworks.ai/",src:"img/screenshots/30-fireworks-ai/2-create-api-key/1-api-key.png",alt:"Select API keys"}),"\n",(0,r.jsxs)(t.p,{children:["Click the purple ",(0,r.jsx)(t.strong,{children:"Create API Key"})," button. In the modal that appears, enter a name and click ",(0,r.jsx)(t.strong,{children:"Create Key"})," to create an API key."]}),"\n",(0,r.jsx)(n.A,{url:"https://fireworks.ai/",src:"img/screenshots/30-fireworks-ai/2-create-api-key/2-create-api-key.png",alt:"Create API key"}),"\n",(0,r.jsx)(t.p,{children:"When prompted, copy the API key to a safe location."})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},1179:(e,t,a)=>{a.d(t,{A:()=>i});a(6540);var r=a(4848);function s(e){const t=e.url||"http://localhost:3000";return(0,r.jsxs)("div",{className:"browser container",children:[(0,r.jsxs)("div",{className:"row",children:[(0,r.jsxs)("div",{className:"column left",children:[(0,r.jsx)("span",{className:"dot",style:{background:"#ED594A"}}),(0,r.jsx)("span",{className:"dot",style:{background:"#FDD800"}}),(0,r.jsx)("span",{className:"dot",style:{background:"#5AC05A"}})]}),(0,r.jsx)("div",{className:"column middle",children:(0,r.jsx)("input",{type:"text",value:t})}),(0,r.jsx)("div",{className:"column right",children:(0,r.jsxs)("div",{style:{float:"right"},children:[(0,r.jsx)("span",{className:"bar"}),(0,r.jsx)("span",{className:"bar"}),(0,r.jsx)("span",{className:"bar"})]})})]}),(0,r.jsx)("div",{className:"content",children:e.children})]})}var n=a(8180);function i(e){return(0,r.jsx)(s,{...e,children:(0,r.jsx)("img",{src:(0,n.A)(e.src),alt:e.alt})})}},8453:(e,t,a)=>{a.d(t,{R:()=>i,x:()=>o});var r=a(6540);const s={},n=r.createContext(s);function i(e){const t=r.useContext(n);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d09226b2.3ce758ff.js b/assets/js/d09226b2.363f860e.js similarity index 69% rename from assets/js/d09226b2.3ce758ff.js rename to assets/js/d09226b2.363f860e.js index 0427a9c..644a8cf 100644 --- a/assets/js/d09226b2.3ce758ff.js +++ b/assets/js/d09226b2.363f860e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[710],{2889:e=>{e.exports=JSON.parse('{"title":"Prepare the Data","description":"Download, chunk, embed, and ingest the data","slug":"/category/prepare-the-data","permalink":"/ai-rag-lab/docs/category/prepare-the-data","navigation":{"previous":{"title":"\ud83d\udc50 Setup prerequisites","permalink":"/ai-rag-lab/docs/dev-env/setup-pre-reqs"},"next":{"title":"\ud83d\udcd8 Tools, libraries, and concepts","permalink":"/ai-rag-lab/docs/prepare-the-data/concepts"}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[710],{2889:a=>{a.exports=JSON.parse('{"title":"Prepare the Data","description":"Download, chunk, embed, and ingest the data","slug":"/category/prepare-the-data","permalink":"/ai-rag-lab/docs/category/prepare-the-data","navigation":{"previous":{"title":"\ud83d\udc50 Setup prerequisites","permalink":"/ai-rag-lab/docs/dev-env/setup-pre-reqs"},"next":{"title":"\ud83d\udc50 Load the dataset","permalink":"/ai-rag-lab/docs/prepare-the-data/load-data"}}}')}}]); \ No newline at end of file diff --git a/assets/js/e962eb68.a5640a76.js b/assets/js/d0cf7cb8.ffac2aab.js similarity index 93% rename from assets/js/e962eb68.a5640a76.js rename to assets/js/d0cf7cb8.ffac2aab.js index 15a38a6..37d04ed 100644 --- a/assets/js/e962eb68.a5640a76.js +++ b/assets/js/d0cf7cb8.ffac2aab.js @@ -1 +1 @@ -"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[214],{1634:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var s=n(4848),a=n(8453);n(1179);const o={},r="\ud83d\udc50 Ingest data into MongoDB",i={id:"prepare-the-data/ingest-data",title:"\ud83d\udc50 Ingest data into MongoDB",description:"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded article chunks into MongoDB.",source:"@site/docs/50-prepare-the-data/5-ingest-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/ingest-data",permalink:"/ai-rag-lab/docs/prepare-the-data/ingest-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/5-ingest-data.mdx",tags:[],version:"current",sidebarPosition:5,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Generate embeddings",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data"},next:{title:"Perform Semantic Search on Your Data",permalink:"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data"}},c={},d=[];function l(e){const t={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components},{Details:n}=t;return n||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"-ingest-data-into-mongodb",children:"\ud83d\udc50 Ingest data into MongoDB"}),"\n",(0,s.jsx)(t.p,{children:"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded article chunks into MongoDB."}),"\n",(0,s.jsxs)(t.p,{children:["Fill in any ",(0,s.jsx)(t.code,{children:""})," placeholders and run the cells under the ",(0,s.jsx)(t.strong,{children:"Step 6: Ingest data into MongoDB"})," section in the notebook to ingest the embedded documents into MongoDB."]}),"\n",(0,s.jsx)(t.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"CODE_BLOCK_6"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"mongodb_client[DB_NAME][COLLECTION_NAME]\n"})})})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"CODE_BLOCK_7"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"collection.insert_many(embedded_docs)\n"})})})]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1179:(e,t,n)=>{n.d(t,{A:()=>r});n(6540);var s=n(4848);function a(e){const t=e.url||"http://localhost:3000";return(0,s.jsxs)("div",{className:"browser container",children:[(0,s.jsxs)("div",{className:"row",children:[(0,s.jsxs)("div",{className:"column left",children:[(0,s.jsx)("span",{className:"dot",style:{background:"#ED594A"}}),(0,s.jsx)("span",{className:"dot",style:{background:"#FDD800"}}),(0,s.jsx)("span",{className:"dot",style:{background:"#5AC05A"}})]}),(0,s.jsx)("div",{className:"column middle",children:(0,s.jsx)("input",{type:"text",value:t})}),(0,s.jsx)("div",{className:"column right",children:(0,s.jsxs)("div",{style:{float:"right"},children:[(0,s.jsx)("span",{className:"bar"}),(0,s.jsx)("span",{className:"bar"}),(0,s.jsx)("span",{className:"bar"})]})})]}),(0,s.jsx)("div",{className:"content",children:e.children})]})}var o=n(8180);function r(e){return(0,s.jsx)(a,{...e,children:(0,s.jsx)("img",{src:(0,o.A)(e.src),alt:e.alt})})}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>i});var s=n(6540);const a={},o=s.createContext(a);function r(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[800],{1315:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var s=n(4848),a=n(8453);n(1179);const o={},r="\ud83d\udc50 Ingest data into MongoDB",i={id:"prepare-the-data/ingest-data",title:"\ud83d\udc50 Ingest data into MongoDB",description:"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded article chunks into MongoDB.",source:"@site/docs/50-prepare-the-data/4-ingest-data.mdx",sourceDirName:"50-prepare-the-data",slug:"/prepare-the-data/ingest-data",permalink:"/ai-rag-lab/docs/prepare-the-data/ingest-data",draft:!1,unlisted:!1,editUrl:"https://github.com/mongodb-developer/ai-rag-lab/blob/main/docs/50-prepare-the-data/4-ingest-data.mdx",tags:[],version:"current",sidebarPosition:4,frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc50 Generate embeddings",permalink:"/ai-rag-lab/docs/prepare-the-data/embed-data"},next:{title:"Perform Semantic Search on Your Data",permalink:"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data"}},c={},d=[];function l(e){const t={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components},{Details:n}=t;return n||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"-ingest-data-into-mongodb",children:"\ud83d\udc50 Ingest data into MongoDB"}),"\n",(0,s.jsx)(t.p,{children:"The final step to build a MongoDB vector store for our RAG application is to ingest the embedded article chunks into MongoDB."}),"\n",(0,s.jsxs)(t.p,{children:["Fill in any ",(0,s.jsx)(t.code,{children:""})," placeholders and run the cells under the ",(0,s.jsx)(t.strong,{children:"Step 6: Ingest data into MongoDB"})," section in the notebook to ingest the embedded documents into MongoDB."]}),"\n",(0,s.jsx)(t.p,{children:"The answers for code blocks in this section are as follows:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"CODE_BLOCK_6"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"mongodb_client[DB_NAME][COLLECTION_NAME]\n"})})})]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"CODE_BLOCK_7"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Answer"}),(0,s.jsx)("div",{children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"collection.insert_many(embedded_docs)\n"})})})]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},1179:(e,t,n)=>{n.d(t,{A:()=>r});n(6540);var s=n(4848);function a(e){const t=e.url||"http://localhost:3000";return(0,s.jsxs)("div",{className:"browser container",children:[(0,s.jsxs)("div",{className:"row",children:[(0,s.jsxs)("div",{className:"column left",children:[(0,s.jsx)("span",{className:"dot",style:{background:"#ED594A"}}),(0,s.jsx)("span",{className:"dot",style:{background:"#FDD800"}}),(0,s.jsx)("span",{className:"dot",style:{background:"#5AC05A"}})]}),(0,s.jsx)("div",{className:"column middle",children:(0,s.jsx)("input",{type:"text",value:t})}),(0,s.jsx)("div",{className:"column right",children:(0,s.jsxs)("div",{style:{float:"right"},children:[(0,s.jsx)("span",{className:"bar"}),(0,s.jsx)("span",{className:"bar"}),(0,s.jsx)("span",{className:"bar"})]})})]}),(0,s.jsx)("div",{className:"content",children:e.children})]})}var o=n(8180);function r(e){return(0,s.jsx)(a,{...e,children:(0,s.jsx)("img",{src:(0,o.A)(e.src),alt:e.alt})})}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>i});var s=n(6540);const a={},o=s.createContext(a);function r(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.712f3daf.js b/assets/js/main.712f3daf.js new file mode 100644 index 0000000..6e7bcb9 --- /dev/null +++ b/assets/js/main.712f3daf.js @@ -0,0 +1,2 @@ +/*! For license information please see main.712f3daf.js.LICENSE.txt */ +(self.webpackChunkai_rag_lab=self.webpackChunkai_rag_lab||[]).push([[792],{2413:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});n(6540);var r=n(3259),o=n.n(r),a=n(4054);const i={"09fb1470":[()=>n.e(464).then(n.bind(n,2793)),"@site/docs/50-prepare-the-data/3-embed-data.mdx",2793],"0e16189c":[()=>n.e(24).then(n.bind(n,490)),"@site/docs/10-rag/3-components-of-rag.mdx",490],"14eb3368":[()=>Promise.all([n.e(869),n.e(969)]).then(n.bind(n,3533)),"@theme/DocCategoryGeneratedIndexPage",3533],17896441:[()=>Promise.all([n.e(869),n.e(904),n.e(401)]).then(n.bind(n,2010)),"@theme/DocItem",2010],"2053ae10":[()=>n.e(276).then(n.bind(n,6302)),"@site/docs/50-prepare-the-data/2-chunk-data.mdx",6302],"2a2ea0d2":[()=>n.e(458).then(n.t.bind(n,9207,19)),"~docs/default/category-ai-rag-labdocs-tutorialsidebar-category-build-the-rag-application-9a4.json",9207],"350ab7ce":[()=>n.e(807).then(n.t.bind(n,8817,19)),"~docs/default/category-ai-rag-labdocs-tutorialsidebar-category-add-memory-to-the-rag-application-8a4.json",8817],"36c22dfc":[()=>Promise.all([n.e(869),n.e(988)]).then(n.bind(n,9711)),"@site/docs/20-mongodb-atlas/3-get-connection-string.mdx",9711],"3aaaf183":[()=>n.e(93).then(n.bind(n,5258)),"@site/docs/summary.mdx",5258],"3bf69056":[()=>n.e(462).then(n.bind(n,5849)),"@site/docs/10-rag/2-rag-usecases.mdx",5849],"3c8d921e":[()=>n.e(294).then(n.bind(n,5778)),"@site/docs/50-prepare-the-data/1-load-data.mdx",5778],"45b31a90":[()=>n.e(350).then(n.t.bind(n,1966,19)),"/home/runner/work/ai-rag-lab/ai-rag-lab/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",1966],"47cd1b4f":[()=>n.e(454).then(n.bind(n,3630)),"@site/docs/60-perform-semantic-search/1-concepts.mdx",3630],"49a3b57d":[()=>n.e(548).then(n.t.bind(n,8931,19)),"~docs/default/category-ai-rag-labdocs-tutorialsidebar-category-fireworks-ai-ad8.json",8931],"5e95c892":[()=>n.e(647).then(n.bind(n,3124)),"@theme/DocsRoot",3124],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"6bb24948":[()=>Promise.all([n.e(869),n.e(730)]).then(n.bind(n,2936)),"@site/docs/40-dev-env/1-dev-setup.mdx",2936],"6effaccf":[()=>n.e(839).then(n.bind(n,8031)),"@site/docs/70-build-rag-app/3-stream-responses.mdx",8031],"71a1ca8e":[()=>n.e(264).then(n.bind(n,8622)),"@site/docs/70-build-rag-app/2-add-reranking.mdx",8622],"72d756b8":[()=>n.e(256).then(n.bind(n,7421)),"@site/src/pages/helloWorld.js",7421],"798f680c":[()=>n.e(260).then(n.bind(n,5285)),"@site/docs/60-perform-semantic-search/3-vector-search.mdx",5285],"7a749954":[()=>n.e(711).then(n.bind(n,9129)),"@site/docs/60-perform-semantic-search/2-create-vector-index.mdx",9129],"86a88343":[()=>n.e(186).then(n.bind(n,6742)),"@site/docs/60-perform-semantic-search/4-pre-filtering.mdx",6742],88870176:[()=>n.e(970).then(n.t.bind(n,2686,19)),"~docs/default/category-ai-rag-labdocs-tutorialsidebar-category-mongodb-atlas-814.json",2686],"88a0bd0a":[()=>n.e(983).then(n.t.bind(n,4061,19)),"/home/runner/work/ai-rag-lab/ai-rag-lab/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",4061],"8be1a27a":[()=>Promise.all([n.e(869),n.e(262)]).then(n.bind(n,408)),"@site/docs/30-fireworks-ai/1-create-account.mdx",408],"8e28e76d":[()=>n.e(722).then(n.bind(n,2479)),"@site/docs/70-build-rag-app/1-build-rag-app.mdx",2479],"935f2afb":[()=>n.e(581).then(n.t.bind(n,5610,19)),"~docs/default/version-current-metadata-prop-751.json",5610],"9cb2f711":[()=>n.e(192).then(n.bind(n,5518)),"@site/docs/80-add-memory/1-add-memory.mdx",5518],a17e1ad5:[()=>n.e(290).then(n.t.bind(n,4953,19)),"~docs/default/category-ai-rag-labdocs-tutorialsidebar-category-dev-environment-670.json",4953],a7bd4aaa:[()=>n.e(98).then(n.bind(n,2881)),"@theme/DocVersionRoot",2881],a94703ab:[()=>Promise.all([n.e(869),n.e(48)]).then(n.bind(n,4644)),"@theme/DocRoot",4644],ade674ed:[()=>Promise.all([n.e(869),n.e(507)]).then(n.bind(n,8022)),"@site/docs/30-fireworks-ai/2-create-api-key.mdx",8022],bac890e3:[()=>n.e(906).then(n.t.bind(n,5964,19)),"~docs/default/category-ai-rag-labdocs-tutorialsidebar-category-perform-semantic-search-on-your-data-48e.json",5964],c4f5d8e4:[()=>Promise.all([n.e(869),n.e(634)]).then(n.bind(n,2047)),"@site/src/pages/index.js",2047],c8620672:[()=>Promise.all([n.e(869),n.e(723)]).then(n.bind(n,8650)),"@site/docs/20-mongodb-atlas/2-create-cluster.mdx",8650],d09226b2:[()=>n.e(710).then(n.t.bind(n,2889,19)),"~docs/default/category-ai-rag-labdocs-tutorialsidebar-category-prepare-the-data-a7b.json",2889],d0cf7cb8:[()=>Promise.all([n.e(869),n.e(800)]).then(n.bind(n,1315)),"@site/docs/50-prepare-the-data/4-ingest-data.mdx",1315],d6501d9d:[()=>n.e(142).then(n.bind(n,4635)),"@site/docs/40-dev-env/2-setup-pre-reqs.mdx",4635],e6ef851e:[()=>Promise.all([n.e(869),n.e(676)]).then(n.bind(n,9092)),"@site/docs/20-mongodb-atlas/1-create-account.mdx",9092],f23f5105:[()=>n.e(459).then(n.t.bind(n,2591,19)),"~docs/default/category-ai-rag-labdocs-tutorialsidebar-category-retrieval-augmented-generation-a70.json",2591],f8409a7e:[()=>Promise.all([n.e(869),n.e(903)]).then(n.bind(n,3551)),"@site/docs/intro.mdx",3551],fa1a64f0:[()=>n.e(902).then(n.bind(n,5049)),"@site/docs/10-rag/1-what-is-rag.mdx",5049]};var l=n(4848);function s(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var u=n(1604),c=n(3363);function d(e,t){if("*"===e)return o()({loading:s,loader:()=>n.e(560).then(n.bind(n,2560)),modules:["@theme/NotFound"],webpack:()=>[2560],render(e,t){const n=e.default;return(0,l.jsx)(c.W,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,{...t})})}});const r=a[`${e}-${t}`],d={},f=[],p=[],m=(0,u.A)(r);return Object.entries(m).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))})),o().Map({loading:s,loader:d,modules:f,webpack:()=>p,render(t,n){const o=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let i=o;const l=n.split(".");l.slice(0,-1).forEach((e=>{i=i[e]})),i[l[l.length-1]]=a}));const a=o.__comp;delete o.__comp;const i=o.__context;return delete o.__context,(0,l.jsx)(c.W,{value:i,children:(0,l.jsx)(a,{...o,...n})})}})}const f=[{path:"/ai-rag-lab/helloWorld",component:d("/ai-rag-lab/helloWorld","e76"),exact:!0},{path:"/ai-rag-lab/docs",component:d("/ai-rag-lab/docs","b51"),routes:[{path:"/ai-rag-lab/docs",component:d("/ai-rag-lab/docs","578"),routes:[{path:"/ai-rag-lab/docs",component:d("/ai-rag-lab/docs","03c"),routes:[{path:"/ai-rag-lab/docs/add-memory/add-memory",component:d("/ai-rag-lab/docs/add-memory/add-memory","831"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/build-rag-app/add-reranking",component:d("/ai-rag-lab/docs/build-rag-app/add-reranking","737"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/build-rag-app/build-rag-app",component:d("/ai-rag-lab/docs/build-rag-app/build-rag-app","d2d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/build-rag-app/stream-responses",component:d("/ai-rag-lab/docs/build-rag-app/stream-responses","e98"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/category/add-memory-to-the-rag-application",component:d("/ai-rag-lab/docs/category/add-memory-to-the-rag-application","b63"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/category/build-the-rag-application",component:d("/ai-rag-lab/docs/category/build-the-rag-application","a3d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/category/dev-environment",component:d("/ai-rag-lab/docs/category/dev-environment","a02"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/category/fireworks-ai",component:d("/ai-rag-lab/docs/category/fireworks-ai","28a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/category/mongodb-atlas",component:d("/ai-rag-lab/docs/category/mongodb-atlas","ed6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data",component:d("/ai-rag-lab/docs/category/perform-semantic-search-on-your-data","9b9"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/category/prepare-the-data",component:d("/ai-rag-lab/docs/category/prepare-the-data","a45"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/category/retrieval-augmented-generation",component:d("/ai-rag-lab/docs/category/retrieval-augmented-generation","d4b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/dev-env/dev-setup",component:d("/ai-rag-lab/docs/dev-env/dev-setup","10e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/dev-env/setup-pre-reqs",component:d("/ai-rag-lab/docs/dev-env/setup-pre-reqs","25b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/fireworks-ai/create-account",component:d("/ai-rag-lab/docs/fireworks-ai/create-account","a57"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/fireworks-ai/create-api-key",component:d("/ai-rag-lab/docs/fireworks-ai/create-api-key","05b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/intro",component:d("/ai-rag-lab/docs/intro","b45"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/mongodb-atlas/create-account",component:d("/ai-rag-lab/docs/mongodb-atlas/create-account","0cf"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/mongodb-atlas/create-cluster",component:d("/ai-rag-lab/docs/mongodb-atlas/create-cluster","aa0"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/mongodb-atlas/get-connection-string",component:d("/ai-rag-lab/docs/mongodb-atlas/get-connection-string","1ea"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/perform-semantic-search/concepts",component:d("/ai-rag-lab/docs/perform-semantic-search/concepts","4d1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/perform-semantic-search/create-vector-index",component:d("/ai-rag-lab/docs/perform-semantic-search/create-vector-index","abc"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/perform-semantic-search/pre-filtering",component:d("/ai-rag-lab/docs/perform-semantic-search/pre-filtering","176"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/perform-semantic-search/vector-search",component:d("/ai-rag-lab/docs/perform-semantic-search/vector-search","932"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/prepare-the-data/chunk-data",component:d("/ai-rag-lab/docs/prepare-the-data/chunk-data","fb0"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/prepare-the-data/embed-data",component:d("/ai-rag-lab/docs/prepare-the-data/embed-data","b17"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/prepare-the-data/ingest-data",component:d("/ai-rag-lab/docs/prepare-the-data/ingest-data","060"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/prepare-the-data/load-data",component:d("/ai-rag-lab/docs/prepare-the-data/load-data","237"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/rag/components-of-rag",component:d("/ai-rag-lab/docs/rag/components-of-rag","993"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/rag/rag-usecases",component:d("/ai-rag-lab/docs/rag/rag-usecases","59f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/rag/what-is-rag",component:d("/ai-rag-lab/docs/rag/what-is-rag","b7a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ai-rag-lab/docs/summary",component:d("/ai-rag-lab/docs/summary","3d5"),exact:!0,sidebar:"tutorialSidebar"}]}]}]},{path:"/ai-rag-lab/",component:d("/ai-rag-lab/","cfd"),exact:!0},{path:"*",component:d("*")}]},774:(e,t,n)=>{var r,o;!function(){var a,i,l,s,u,c,d,f,p,m,h,g,y,b,v,w,S,k,x,_,E,O,C,P,j,A,T,I,N,L,R=function(e){var t=new R.Builder;return t.pipeline.add(R.trimmer,R.stopWordFilter,R.stemmer),t.searchPipeline.add(R.stemmer),e.call(t,t),t.build()};R.version="2.3.9",R.utils={},R.utils.warn=(a=this,function(e){a.console&&console.warn&&console.warn(e)}),R.utils.asString=function(e){return null==e?"":e.toString()},R.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r0){var s=R.utils.clone(t)||{};s.position=[i,l],s.index=o.length,o.push(new R.Token(n.slice(i,a),s))}i=a+1}}return o},R.tokenizer.separator=/[\s\-]+/,R.Pipeline=function(){this._stack=[]},R.Pipeline.registeredFunctions=Object.create(null),R.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&R.utils.warn("Overwriting existing registered function: "+t),e.label=t,R.Pipeline.registeredFunctions[e.label]=e},R.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||R.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},R.Pipeline.load=function(e){var t=new R.Pipeline;return e.forEach((function(e){var n=R.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},R.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){R.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},R.Pipeline.prototype.after=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},R.Pipeline.prototype.before=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},R.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},R.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(ae&&(n=o),a!=e);)r=n-t,o=t+Math.floor(r/2),a=this.elements[2*o];return a==e||a>e?2*o:al?u+=2:i==l&&(t+=n[s+1]*r[u+1],s+=2,u+=2);return t},R.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},R.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var a,i=o.str.charAt(0);i in o.node.edges?a=o.node.edges[i]:(a=new R.TokenSet,o.node.edges[i]=a),1==o.str.length&&(a.final=!0),r.push({node:a,editsRemaining:o.editsRemaining,str:o.str.slice(1)})}if(0!=o.editsRemaining){if("*"in o.node.edges)var l=o.node.edges["*"];else{l=new R.TokenSet;o.node.edges["*"]=l}if(0==o.str.length&&(l.final=!0),r.push({node:l,editsRemaining:o.editsRemaining-1,str:o.str}),o.str.length>1&&r.push({node:o.node,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)}),1==o.str.length&&(o.node.final=!0),o.str.length>=1){if("*"in o.node.edges)var s=o.node.edges["*"];else{s=new R.TokenSet;o.node.edges["*"]=s}1==o.str.length&&(s.final=!0),r.push({node:s,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)})}if(o.str.length>1){var u,c=o.str.charAt(0),d=o.str.charAt(1);d in o.node.edges?u=o.node.edges[d]:(u=new R.TokenSet,o.node.edges[d]=u),1==o.str.length&&(u.final=!0),r.push({node:u,editsRemaining:o.editsRemaining-1,str:c+o.str.slice(2)})}}}return n},R.TokenSet.fromString=function(e){for(var t=new R.TokenSet,n=t,r=0,o=e.length;r=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},R.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},R.Index.prototype.search=function(e){return this.query((function(t){new R.QueryParser(e,t).parse()}))},R.Index.prototype.query=function(e){for(var t=new R.Query(this.fields),n=Object.create(null),r=Object.create(null),o=Object.create(null),a=Object.create(null),i=Object.create(null),l=0;l1?1:e},R.Builder.prototype.k1=function(e){this._k1=e},R.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var o=0;o=this.length)return R.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},R.QueryLexer.prototype.width=function(){return this.pos-this.start},R.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},R.QueryLexer.prototype.backup=function(){this.pos-=1},R.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=R.QueryLexer.EOS&&this.backup()},R.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(R.QueryLexer.TERM)),e.ignore(),e.more())return R.QueryLexer.lexText},R.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.EDIT_DISTANCE),R.QueryLexer.lexText},R.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.BOOST),R.QueryLexer.lexText},R.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(R.QueryLexer.TERM)},R.QueryLexer.termSeparator=R.tokenizer.separator,R.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==R.QueryLexer.EOS)return R.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return R.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if(t.match(R.QueryLexer.termSeparator))return R.QueryLexer.lexTerm}else e.escapeCharacter()}},R.QueryParser=function(e,t){this.lexer=new R.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},R.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=R.QueryParser.parseClause;e;)e=e(this);return this.query},R.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},R.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},R.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},R.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case R.QueryLexer.PRESENCE:return R.QueryParser.parsePresence;case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new R.QueryParseError(n,t.start,t.end)}},R.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=R.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=R.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new R.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new R.QueryParseError(n,t.start,t.end)}switch(r.type){case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new R.QueryParseError(n,r.start,r.end)}}},R.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new R.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var o=e.peekLexeme();if(null==o){r="expecting term, found nothing";throw new R.QueryParseError(r,t.start,t.end)}if(o.type===R.QueryLexer.TERM)return R.QueryParser.parseTerm;r="expecting term, found '"+o.type+"'";throw new R.QueryParseError(r,o.start,o.end)}},R.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new R.QueryParseError(r,n.start,n.end)}else e.nextClause()}},R.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new R.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var o=e.peekLexeme();if(null!=o)switch(o.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+o.type+"'";throw new R.QueryParseError(r,o.start,o.end)}else e.nextClause()}},R.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new R.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var o=e.peekLexeme();if(null!=o)switch(o.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+o.type+"'";throw new R.QueryParseError(r,o.start,o.end)}else e.nextClause()}},void 0===(o="function"==typeof(r=function(){return R})?r.call(t,n,t,e):r)||(e.exports=o)}()},8848:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>i});var r=n(6540),o=n(4848);const a=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,o.jsx)(a.Provider,{value:n,children:t})}},5022:(e,t,n)=>{"use strict";var r=n(6540),o=n(5338),a=n(4625),i=n(545),l=n(1712);const s=[n(9128),n(5300),n(4753),n(5729),n(8252)];var u=n(2413),c=n(6347),d=n(2831),f=n(4848);function p(e){let{children:t}=e;return(0,f.jsx)(f.Fragment,{children:t})}var m=n(1141),h=n(7639),g=n(8180),y=n(6957),b=n(9817),v=n(2098),w=n(9503),S=n(1482),k=n(4609),x=n(1210);function _(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,h.A)(),r=(0,v.o)(),o=n[e].htmlLang,a=e=>e.replace("-","_");return(0,f.jsxs)(m.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:a(o)}),Object.values(n).filter((e=>o!==e.htmlLang)).map((e=>(0,f.jsx)("meta",{property:"og:locale:alternate",content:a(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function E(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,h.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,h.A)(),{pathname:r}=(0,c.zy)();return e+(0,k.applyTrailingSlash)((0,g.A)(r),{trailingSlash:n,baseUrl:t})}(),o=t?`${n}${t}`:r;return(0,f.jsxs)(m.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:o}),(0,f.jsx)("link",{rel:"canonical",href:o})]})}function O(){const{i18n:{currentLocale:e}}=(0,h.A)(),{metadata:t,image:n}=(0,y.p)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(m.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:w.w})]}),n&&(0,f.jsx)(b.be,{image:n}),(0,f.jsx)(E,{}),(0,f.jsx)(_,{}),(0,f.jsx)(x.A,{tag:S.Cy,locale:e}),(0,f.jsx)(m.A,{children:t.map(((e,t)=>(0,f.jsx)("meta",{...e},t)))})]})}const C=new Map;function P(e){if(C.has(e.pathname))return{...e,pathname:C.get(e.pathname)};if((0,d.u)(u.A,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return C.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return C.set(e.pathname,t),{...e,pathname:t}}var j=n(8848),A=n(3366),T=n(6494);function I(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>o.forEach((e=>e?.()))}const N=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,T.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,o=t.hash===n.hash,a=t.search===n.search;if(r&&o&&!a)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),I("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function L(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.u)(u.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class R extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=l.A.canUseDOM?I("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=I("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),L(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,f.jsx)(N,{previousLocation:this.previousLocation,location:t,children:(0,f.jsx)(c.qh,{location:t,render:()=>e})})}}const D=R,F="__docusaurus-base-url-issue-banner-container",M="__docusaurus-base-url-issue-banner",B="__docusaurus-base-url-issue-banner-suggestion-container";function z(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '${F}';\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const o=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;o?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Y=n(1604);const Z=new Set,J=new Set,X=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ee={prefetch(e){if(!(e=>!X()&&!J.has(e)&&!Z.has(e))(e))return!1;Z.add(e);const t=(0,d.u)(u.A,e).flatMap((e=>{return t=e.route.path,Object.entries(G).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Y.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?K(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!X()&&!J.has(e))(e)&&(J.add(e),L(e))},te=Object.freeze(ee),ne=Boolean(!0);if(l.A.canUseDOM){window.docusaurus=te;const e=document.getElementById("__docusaurus"),t=(0,f.jsx)(i.vd,{children:(0,f.jsx)(a.Kd,{children:(0,f.jsx)(q,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},l=()=>{if(ne)r.startTransition((()=>{o.hydrateRoot(e,t,{onRecoverableError:n})}));else{const a=o.createRoot(e,{onRecoverableError:n});r.startTransition((()=>{a.render(t)}))}};L(window.location.pathname).then(l)}},3366:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>f});var r=n(6540),o=n(4784);const a=JSON.parse('{"docusaurus-plugin-google-gtag":{"default":{"trackingID":["G-ZJ28V71VTQ"],"anonymizeIP":true,"id":"default"}},"@cmfcmf/docusaurus-search-local":{"default":{"titleBoost":5,"contentBoost":1,"tagsBoost":3,"parentCategoriesBoost":2,"indexDocSidebarParentCategories":0,"maxSearchResults":8}},"docusaurus-plugin-content-docs":{"default":{"path":"/ai-rag-lab/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/ai-rag-lab/docs","mainDocId":"intro","docs":[{"id":"add-memory/add-memory","path":"/ai-rag-lab/docs/add-memory/add-memory","sidebar":"tutorialSidebar"},{"id":"build-rag-app/add-reranking","path":"/ai-rag-lab/docs/build-rag-app/add-reranking","sidebar":"tutorialSidebar"},{"id":"build-rag-app/build-rag-app","path":"/ai-rag-lab/docs/build-rag-app/build-rag-app","sidebar":"tutorialSidebar"},{"id":"build-rag-app/stream-responses","path":"/ai-rag-lab/docs/build-rag-app/stream-responses","sidebar":"tutorialSidebar"},{"id":"dev-env/dev-setup","path":"/ai-rag-lab/docs/dev-env/dev-setup","sidebar":"tutorialSidebar"},{"id":"dev-env/setup-pre-reqs","path":"/ai-rag-lab/docs/dev-env/setup-pre-reqs","sidebar":"tutorialSidebar"},{"id":"fireworks-ai/create-account","path":"/ai-rag-lab/docs/fireworks-ai/create-account","sidebar":"tutorialSidebar"},{"id":"fireworks-ai/create-api-key","path":"/ai-rag-lab/docs/fireworks-ai/create-api-key","sidebar":"tutorialSidebar"},{"id":"intro","path":"/ai-rag-lab/docs/intro","sidebar":"tutorialSidebar"},{"id":"mongodb-atlas/create-account","path":"/ai-rag-lab/docs/mongodb-atlas/create-account","sidebar":"tutorialSidebar"},{"id":"mongodb-atlas/create-cluster","path":"/ai-rag-lab/docs/mongodb-atlas/create-cluster","sidebar":"tutorialSidebar"},{"id":"mongodb-atlas/get-connection-string","path":"/ai-rag-lab/docs/mongodb-atlas/get-connection-string","sidebar":"tutorialSidebar"},{"id":"perform-semantic-search/concepts","path":"/ai-rag-lab/docs/perform-semantic-search/concepts","sidebar":"tutorialSidebar"},{"id":"perform-semantic-search/create-vector-index","path":"/ai-rag-lab/docs/perform-semantic-search/create-vector-index","sidebar":"tutorialSidebar"},{"id":"perform-semantic-search/pre-filtering","path":"/ai-rag-lab/docs/perform-semantic-search/pre-filtering","sidebar":"tutorialSidebar"},{"id":"perform-semantic-search/vector-search","path":"/ai-rag-lab/docs/perform-semantic-search/vector-search","sidebar":"tutorialSidebar"},{"id":"prepare-the-data/chunk-data","path":"/ai-rag-lab/docs/prepare-the-data/chunk-data","sidebar":"tutorialSidebar"},{"id":"prepare-the-data/embed-data","path":"/ai-rag-lab/docs/prepare-the-data/embed-data","sidebar":"tutorialSidebar"},{"id":"prepare-the-data/ingest-data","path":"/ai-rag-lab/docs/prepare-the-data/ingest-data","sidebar":"tutorialSidebar"},{"id":"prepare-the-data/load-data","path":"/ai-rag-lab/docs/prepare-the-data/load-data","sidebar":"tutorialSidebar"},{"id":"rag/components-of-rag","path":"/ai-rag-lab/docs/rag/components-of-rag","sidebar":"tutorialSidebar"},{"id":"rag/rag-usecases","path":"/ai-rag-lab/docs/rag/rag-usecases","sidebar":"tutorialSidebar"},{"id":"rag/what-is-rag","path":"/ai-rag-lab/docs/rag/what-is-rag","sidebar":"tutorialSidebar"},{"id":"summary","path":"/ai-rag-lab/docs/summary","sidebar":"tutorialSidebar"},{"id":"/category/retrieval-augmented-generation","path":"/ai-rag-lab/docs/category/retrieval-augmented-generation","sidebar":"tutorialSidebar"},{"id":"/category/mongodb-atlas","path":"/ai-rag-lab/docs/category/mongodb-atlas","sidebar":"tutorialSidebar"},{"id":"/category/fireworks-ai","path":"/ai-rag-lab/docs/category/fireworks-ai","sidebar":"tutorialSidebar"},{"id":"/category/dev-environment","path":"/ai-rag-lab/docs/category/dev-environment","sidebar":"tutorialSidebar"},{"id":"/category/prepare-the-data","path":"/ai-rag-lab/docs/category/prepare-the-data","sidebar":"tutorialSidebar"},{"id":"/category/perform-semantic-search-on-your-data","path":"/ai-rag-lab/docs/category/perform-semantic-search-on-your-data","sidebar":"tutorialSidebar"},{"id":"/category/build-the-rag-application","path":"/ai-rag-lab/docs/category/build-the-rag-application","sidebar":"tutorialSidebar"},{"id":"/category/add-memory-to-the-rag-application","path":"/ai-rag-lab/docs/category/add-memory-to-the-rag-application","sidebar":"tutorialSidebar"}],"draftIds":[],"sidebars":{"tutorialSidebar":{"link":{"path":"/ai-rag-lab/docs/intro","label":"intro"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"3.1.1","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.1.1"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.1.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.1.1"},"docusaurus-plugin-google-gtag":{"type":"package","name":"@docusaurus/plugin-google-gtag","version":"3.1.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.1.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.1.1"},"@cmfcmf/docusaurus-search-local":{"type":"package","name":"@cmfcmf/docusaurus-search-local","version":"1.2.0"}}}');var u=n(4848);const c={siteConfig:o.default,siteMetadata:s,globalData:a,i18n:i,codeTranslations:l},d=r.createContext(c);function f(e){let{children:t}=e;return(0,u.jsx)(d.Provider,{value:c,children:t})}},3832:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(6540),o=n(1712),a=n(1141),i=n(4609),l=n(7685),s=n(4848);function u(e){let{error:t,tryAgain:n}=e;return(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,s.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,s.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,s.jsx)(c,{error:t})]})}function c(e){let{error:t}=e;const n=(0,i.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,s.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function d(e){let{error:t,tryAgain:n}=e;return(0,s.jsxs)(p,{fallback:()=>(0,s.jsx)(u,{error:t,tryAgain:n}),children:[(0,s.jsx)(a.A,{children:(0,s.jsx)("title",{children:"Page Error"})}),(0,s.jsx)(l.A,{children:(0,s.jsx)(u,{error:t,tryAgain:n})})]})}const f=e=>(0,s.jsx)(d,{...e});class p extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){o.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??f)(e)}return e??null}}},1712:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},1141:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);var r=n(545),o=n(4848);function a(e){return(0,o.jsx)(r.mg,{...e})}},4783:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(6540),o=n(4625),a=n(4609),i=n(7639),l=n(877),s=n(1712),u=n(7344),c=n(8180),d=n(4848);function f(e,t){let{isNavLink:n,to:f,href:p,activeClassName:m,isActive:h,"data-noBrokenLinkCheck":g,autoAddBaseUrl:y=!0,...b}=e;const{siteConfig:{trailingSlash:v,baseUrl:w}}=(0,i.A)(),{withBaseUrl:S}=(0,c.h)(),k=(0,u.A)(),x=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>x.current));const _=f||p;const E=(0,l.A)(_),O=_?.replace("pathname://","");let C=void 0!==O?(P=O,y&&(e=>e.startsWith("/"))(P)?S(P):P):void 0;var P;C&&E&&(C=(0,a.applyTrailingSlash)(C,{trailingSlash:v,baseUrl:w}));const j=(0,r.useRef)(!1),A=n?o.k2:o.N_,T=s.A.canUseIntersectionObserver,I=(0,r.useRef)(),N=()=>{j.current||null==C||(window.docusaurus.preload(C),j.current=!0)};(0,r.useEffect)((()=>(!T&&E&&null!=C&&window.docusaurus.prefetch(C),()=>{T&&I.current&&I.current.disconnect()})),[I,C,T,E]);const L=C?.startsWith("#")??!1,R=!b.target||"_self"===b.target,D=!C||!E||!R||L;return g||!L&&D||k.collectLink(C),b.id&&k.collectAnchor(b.id),D?(0,d.jsx)("a",{ref:x,href:C,..._&&!E&&{target:"_blank",rel:"noopener noreferrer"},...b}):(0,d.jsx)(A,{...b,onMouseEnter:N,onTouchStart:N,innerRef:e=>{x.current=e,T&&e&&E&&(I.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(I.current.unobserve(e),I.current.disconnect(),null!=C&&window.docusaurus.prefetch(C))}))})),I.current.observe(e))},to:C,...n&&{isActive:h,activeClassName:m}})}const p=r.forwardRef(f)},3230:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,T:()=>s});var r=n(6540),o=n(4848);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(2654);function l(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function s(e,t){let{message:n,id:r}=e;return a(l({message:n,id:r}),t)}function u(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const i=l({message:t,id:n});return(0,o.jsx)(o.Fragment,{children:a(i,r)})}},4598:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},877:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>o,z:()=>r})},8180:(e,t,n)=>{"use strict";n.d(t,{A:()=>l,h:()=>i});var r=n(6540),o=n(7639),a=n(877);function i(){const{siteConfig:{baseUrl:e,url:t}}=(0,o.A)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:o=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,a.z)(n))return n;if(o)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const l=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+l:l}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function l(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},7344:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);n(4848);const o=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),a=()=>(0,r.useContext)(o);function i(){return a()}},7639:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540),o=n(3366);function a(){return(0,r.useContext)(o.o)}},6503:(e,t,n)=>{"use strict";n.d(t,{P_:()=>i,kh:()=>a});var r=n(7639),o=n(4598);function a(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,r.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}function i(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});const r=a(e),i=r?.[t];if(!i&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return i}},1062:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540),o=n(8848);function a(){return(0,r.useContext)(o.o)}},6494:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const o=n(1712).A.canUseDOM?r.useLayoutEffect:r.useEffect},1604:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function o(e){const t={};return function e(n,o){Object.entries(n).forEach((n=>{let[a,i]=n;const l=o?`${o}.${a}`:a;r(i)?e(i,l):t[l]=i}))}(e),t}},3363:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>a});var r=n(6540),o=n(4848);const a=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(a),l=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,o.jsx)(a.Provider,{value:l,children:t})}},9802:(e,t,n)=>{"use strict";n.d(t,{zK:()=>h,vT:()=>d,gk:()=>f,Gy:()=>u,HW:()=>g,ht:()=>c,r7:()=>m,jh:()=>p});var r=n(6347),o=n(6503);const a=e=>e.versions.find((e=>e.isLast));function i(e,t){const n=a(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}function l(e,t){const n=i(e,t),o=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:o,alternateDocVersions:o?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(o.id):{}}}const s={},u=()=>(0,o.kh)("docusaurus-plugin-content-docs")??s,c=e=>(0,o.P_)("docusaurus-plugin-content-docs",e,{failfast:!0});function d(e){void 0===e&&(e={});const t=u(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const o=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return a}(t,n,e)}function f(e){void 0===e&&(e={});const t=d(e),{pathname:n}=(0,r.zy)();if(!t)return;return{activePlugin:t,activeVersion:i(t.pluginData,n)}}function p(e){return c(e).versions}function m(e){const t=c(e);return a(t)}function h(e){const t=c(e),{pathname:n}=(0,r.zy)();return l(t,n)}function g(e){const t=c(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=a(e);return{latestDocSuggestion:l(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},9128:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={onRouteDidUpdate(e){let{location:t,previousLocation:n}=e;!n||t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash||setTimeout((()=>{window.gtag("set","page_path",t.pathname+t.search+t.hash),window.gtag("event","page_view")}))}}},5729:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(5947),o=n.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{o().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){o().done()}}},4753:(e,t,n)=>{"use strict";n.r(t);var r=n(8181),o=n(4784);!function(e){const{themeConfig:{prism:t}}=o.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(9700),n(6719)(`./prism-${e}`)})),delete globalThis.Prism}(r.My)},5225:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});n(6540);var r=n(8215),o=n(3230),a=n(6957),i=n(4783),l=n(7344);const s={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var u=n(4848);function c(e){let{as:t,id:n,...c}=e;const d=(0,l.A)(),{navbar:{hideOnScroll:f}}=(0,a.p)();if("h1"===t||!n)return(0,u.jsx)(t,{...c,id:void 0});d.collectAnchor(n);const p=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof c.children?c.children:n});return(0,u.jsxs)(t,{...c,className:(0,r.A)("anchor",f?s.anchorWithHideOnScrollNavbar:s.anchorWithStickyNavbar,c.className),id:n,children:[c.children,(0,u.jsx)(i.A,{className:"hash-link",to:`#${n}`,"aria-label":p,title:p,children:"\u200b"})]})}},716:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);const r={iconExternalLink:"iconExternalLink_nPIU"};var o=n(4848);function a(e){let{width:t=13.5,height:n=13.5}=e;return(0,o.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,o.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},7685:(e,t,n)=>{"use strict";n.d(t,{A:()=>ci});var r=n(6540),o=n(8215),a=n(3832),i=n(9817),l=n(6347),s=n(3230),u=n(4067),c=n(4848);const d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){const e=(0,r.useRef)(null),{action:t}=(0,l.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&f(t)}),[]);return(0,u.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}const m=(0,s.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){const t=e.children??m,{containerRef:n,onClick:r}=p();return(0,c.jsx)("div",{ref:n,role:"region","aria-label":m,children:(0,c.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var g=n(8630),y=n(9503);const b={skipToContent:"skipToContent_fXgn"};function v(){return(0,c.jsx)(h,{className:b.skipToContent})}var w=n(6957),S=n(2);function k(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:o=1.2,className:a,...i}=e;return(0,c.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,c.jsx)("g",{stroke:r,strokeWidth:o,children:(0,c.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const x={closeButton:"closeButton_CVFx"};function _(e){return(0,c.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,o.A)("clean-btn close",x.closeButton,e.className),children:(0,c.jsx)(k,{width:14,height:14,strokeWidth:3.1})})}const E={content:"content_knG7"};function O(e){const{announcementBar:t}=(0,w.p)(),{content:n}=t;return(0,c.jsx)("div",{...e,className:(0,o.A)(E.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const C={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function P(){const{announcementBar:e}=(0,w.p)(),{isActive:t,close:n}=(0,S.Mj)();if(!t)return null;const{backgroundColor:r,textColor:o,isCloseable:a}=e;return(0,c.jsxs)("div",{className:C.announcementBar,style:{backgroundColor:r,color:o},role:"banner",children:[a&&(0,c.jsx)("div",{className:C.announcementBarPlaceholder}),(0,c.jsx)(O,{className:C.announcementBarContent}),a&&(0,c.jsx)(_,{onClick:n,className:C.announcementBarClose})]})}var j=n(5755),A=n(4245);var T=n(4799),I=n(763);const N=r.createContext(null);function L(e){let{children:t}=e;const n=function(){const e=(0,j.M)(),t=(0,I.YL)(),[n,o]=(0,r.useState)(!1),a=null!==t.component,i=(0,T.ZC)(a);return(0,r.useEffect)((()=>{a&&!i&&o(!0)}),[a,i]),(0,r.useEffect)((()=>{a?e.shown||o(!0):o(!1)}),[e.shown,a]),(0,r.useMemo)((()=>[n,o]),[n])}();return(0,c.jsx)(N.Provider,{value:n,children:t})}function R(e){if(e.component){const t=e.component;return(0,c.jsx)(t,{...e.props})}}function D(){const e=(0,r.useContext)(N);if(!e)throw new T.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,o=(0,r.useCallback)((()=>n(!1)),[n]),a=(0,I.YL)();return(0,r.useMemo)((()=>({shown:t,hide:o,content:R(a)})),[o,a,t])}function F(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:a}=D();return(0,c.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,c.jsxs)("div",{className:(0,o.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a}),children:[(0,c.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,c.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var M=n(7710),B=n(1062);function z(e){return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,c.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function $(e){return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,c.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const U={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function V(e){let{className:t,buttonClassName:n,value:r,onChange:a}=e;const i=(0,B.A)(),l=(0,s.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,s.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,s.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,c.jsx)("div",{className:(0,o.A)(U.toggle,t),children:(0,c.jsxs)("button",{className:(0,o.A)("clean-btn",U.toggleButton,!i&&U.toggleButtonDisabled,n),type:"button",onClick:()=>a("dark"===r?"light":"dark"),disabled:!i,title:l,"aria-label":l,"aria-live":"polite",children:[(0,c.jsx)(z,{className:(0,o.A)(U.toggleIcon,U.lightToggleIcon)}),(0,c.jsx)($,{className:(0,o.A)(U.toggleIcon,U.darkToggleIcon)})]})})}const Q=r.memo(V),W={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function H(e){let{className:t}=e;const n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode.disableSwitch,{colorMode:o,setColorMode:a}=(0,M.G)();return r?null:(0,c.jsx)(Q,{className:t,buttonClassName:"dark"===n?W.darkNavbarColorModeToggle:void 0,value:o,onChange:a})}var q=n(20);function G(){return(0,c.jsx)(q.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function K(){const e=(0,j.M)();return(0,c.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,c.jsx)(k,{color:"var(--ifm-color-emphasis-600)"})})}function Y(){return(0,c.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,c.jsx)(G,{}),(0,c.jsx)(H,{className:"margin-right--md"}),(0,c.jsx)(K,{})]})}var Z=n(4783),J=n(8180),X=n(877);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(716);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:o,label:a,html:i,isDropdownLink:l,prependBaseUrlToHref:s,...u}=e;const d=(0,J.A)(r),f=(0,J.A)(t),p=(0,J.A)(o,{forcePrependBaseUrl:!0}),m=a&&o&&!(0,X.A)(o),h=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,c.jsxs)(c.Fragment,{children:[a,m&&(0,c.jsx)(te.A,{...l&&{width:12,height:12}})]})};return o?(0,c.jsx)(Z.A,{href:s?p:o,...u,...h}):(0,c.jsx)(Z.A,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(f)},...u,...h})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const a=(0,c.jsx)(ne,{className:(0,o.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,c.jsx)("li",{children:a}):a}function oe(e){let{className:t,isDropdownItem:n,...r}=e;return(0,c.jsx)("li",{className:"menu__list-item",children:(0,c.jsx)(ne,{className:(0,o.A)("menu__link",t),...r})})}function ae(e){let{mobile:t=!1,position:n,...r}=e;const o=t?oe:re;return(0,c.jsx)(o,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(4549),le=n(260),se=n(7639);const ue={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};function ce(e,t){return e.some((e=>function(e,t){return!!(0,le.ys)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:a,onClick:i,...l}=e;const s=(0,r.useRef)(null),[u,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[s]),(0,c.jsxs)("div",{ref:s,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":u}),children:[(0,c.jsx)(ne,{"aria-haspopup":"true","aria-expanded":u,role:"button",href:l.to?void 0:"#",className:(0,o.A)("navbar__link",a),...l,onClick:l.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!u))},children:l.children??l.label}),(0,c.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(ka,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function fe(e){let{items:t,className:n,position:a,onClick:i,...s}=e;const u=function(){const{siteConfig:{baseUrl:e}}=(0,se.A)(),{pathname:t}=(0,l.zy)();return t.replace(e,"/")}(),d=ce(t,u),{collapsed:f,toggleCollapsed:p,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[u,d,m]),(0,c.jsxs)("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":f}),children:[(0,c.jsx)(ne,{role:"button",className:(0,o.A)(ue.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",n),...s,onClick:e=>{e.preventDefault(),p()},children:s.children??s.label}),(0,c.jsx)(ie.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:f,children:t.map(((e,t)=>(0,r.createElement)(ka,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function pe(e){let{mobile:t=!1,...n}=e;const r=t?fe:de;return(0,c.jsx)(r,{...n})}var me=n(2098);function he(e){let{width:t=20,height:n=20,...r}=e;return(0,c.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,c.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const ge="iconLanguage_nlXk";var ye=n(961);function be(e,t){var n=void 0;return function(){for(var r=arguments.length,o=new Array(r),a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t=3||2===n&&r>=4||1===n&&r>=10}(e);function n(n,r,o){if(t&&void 0!==o){var a=o[0].__autocomplete_algoliaCredentials,i={"X-Algolia-Application-Id":a.appId,"X-Algolia-API-Key":a.apiKey};e.apply(void 0,[n].concat(je(r),[{headers:i}]))}else e.apply(void 0,[n].concat(je(r)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e("setAuthenticatedUserToken",t)},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("clickedObjectIDsAfterSearch",Re(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("clickedObjectIDs",Re(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("convertedObjectIDsAfterSearch",Re(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&n("convertedObjectIDs",Re(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&t.reduce((function(e,t){var n=t.items,r=Te(t,Ce);return[].concat(je(e),je(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function Fe(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function Me(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function Be(e){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Be(e)}function ze(e){return function(e){if(Array.isArray(e))return $e(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $e(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&qe({onItemsChange:o,items:n,insights:u,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive,o=!1;function c(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:Ve(Ve({},l?{clickAnalytics:!0}:{}),e?{userToken:Ye(e)}:{}),insights:u}})}s("addAlgoliaAgent","insights-plugin"),c(),s("onUserTokenChange",(function(e){o||c(e)})),s("getUserToken",null,(function(e,t){o||c(t)})),s("onAuthenticatedUserTokenChange",(function(e){e?(o=!0,c(e)):(o=!1,s("getUserToken",null,(function(e,t){return c(t)})))})),s("getAuthenticatedUserToken",null,(function(e,t){t&&(o=!0,c(t))})),n((function(e){var t=e.item,n=e.state,r=e.event,o=e.source;Me(t)&&a({state:n,event:r,insights:u,item:t,insightsEvents:[Ve({eventName:"Item Selected"},xe({item:t,items:o.getItems().filter(Me)}))]})})),r((function(e){var t=e.item,n=e.source,r=e.state,o=e.event;Me(t)&&i({state:r,event:o,insights:u,item:t,insightsEvents:[Ve({eventName:"Item Active"},xe({item:t,items:n.getItems().filter(Me)}))]})}))},onStateChange:function(e){var t=e.state;d({state:t})},__autocomplete_pluginOptions:e}}function Ke(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(ze(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),["autocomplete-internal"],ze(null!==(e=t.algoliaInsightsPlugin)&&void 0!==e&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function Ye(e){return"number"==typeof e?e.toString():e}function Ze(e){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(e)}function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xe(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Ze(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ze(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ze(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e,t,n){var r,o=t.initialState;return{getState:function(){return o},dispatch:function(r,a){var i=function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:st(),plugins:o,initialState:yt({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(mt(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Array.isArray(e),Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:ke,onResolve:ke};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=ct(ct({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return tt(e)})).then((function(e){return e.map((function(e){return yt(yt({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:yt({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}function St(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wt,Ht,qt,Gt=null,Kt=(Wt=-1,Ht=-1,qt=void 0,function(e){var t=++Wt;return Promise.resolve(e).then((function(e){return qt&&t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var on=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function an(e){return e.nativeEvent||e}function ln(e){return ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ln(e)}var sn=["props","refresh","store"],un=["inputElement","formElement","panelElement"],cn=["inputElement"],dn=["inputElement","maxLength"],fn=["source"],pn=["item","source"];function mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hn(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function bn(e){var t=e.props,n=e.refresh,r=e.store,o=yn(e,sn);return{getEnvironmentProps:function(e){var n=e.inputElement,o=e.formElement,a=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[o,a].some((function(t){return n=t,r=e.target,n===r||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return hn({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},yn(e,un))},getRootProps:function(e){return hn({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return Zt(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":Zt(t.id,"label")},e)},getFormProps:function(e){e.inputElement;return hn({action:"",noValidate:!0,role:"search",onSubmit:function(a){var i;a.preventDefault(),t.onSubmit(hn({event:a,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()},onReset:function(a){var i;a.preventDefault(),t.onReset(hn({event:a,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},yn(e,cn))},getLabelProps:function(e){return hn({htmlFor:Zt(t.id,"input"),id:Zt(t.id,"label")},e)},getInputProps:function(e){var a;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&Yt(hn({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var l=e||{},s=(l.inputElement,l.maxLength),u=void 0===s?512:s,c=yn(l,dn),d=Mt(r.getState()),f=function(e){return Boolean(e&&e.match(on))}((null===(a=t.environment.navigator)||void 0===a?void 0:a.userAgent)||""),p=t.enterKeyHint||(null!=d&&d.itemUrl&&!f?"go":"search");return hn({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?Zt(t.id,"item-".concat(r.getState().activeItemId),null==d?void 0:d.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return Zt(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":Zt(t.id,"label"),value:r.getState().completion||r.getState().query,id:Zt(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:u,type:"search",onChange:function(e){var a=e.currentTarget.value;t.ignoreCompositionEvents&&an(e).isComposing?o.setQuery(a):Yt(hn({event:e,props:t,query:a.slice(0,u),refresh:n,store:r},o))},onCompositionEnd:function(e){Yt(hn({event:e,props:t,query:e.currentTarget.value.slice(0,u),refresh:n,store:r},o))},onKeyDown:function(e){an(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,o=e.store,a=rn(e,Xt);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=Mt(o.getState()),t=n.environment.document.getElementById(Zt(n.id,"item-".concat(o.getState().activeItemId),null==e?void 0:e.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},l=function(){var e=Mt(o.getState());if(null!==o.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,l=e.itemUrl,s=e.source;s.onActive(tn({event:t,item:n,itemInputValue:i,itemUrl:l,refresh:r,source:s,state:o.getState()},a))}};t.preventDefault(),!1===o.getState().isOpen&&(n.openOnFocus||Boolean(o.getState().query))?Yt(tn({event:t,props:n,query:o.getState().query,refresh:r,store:o},a)).then((function(){o.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),l(),setTimeout(i,0)})):(o.dispatch(t.key,{}),l(),i())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||o.pendingRequests.cancelAll());t.preventDefault();var s=Mt(o.getState()),u=s.item,c=s.itemInputValue,d=s.itemUrl,f=s.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(f.onSelect(tn({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:f,state:o.getState()},a)),n.navigator.navigateNewTab({itemUrl:d,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==d&&(f.onSelect(tn({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:f,state:o.getState()},a)),n.navigator.navigateNewWindow({itemUrl:d,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==d)return f.onSelect(tn({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:f,state:o.getState()},a)),void n.navigator.navigate({itemUrl:d,item:u,state:o.getState()});Yt(tn({event:t,nextState:{isOpen:!1},props:n,query:c,refresh:r,store:o},a)).then((function(){f.onSelect(tn({event:t,item:u,itemInputValue:c,itemUrl:d,refresh:r,source:f,state:o.getState()},a))}))}}}(hn({event:e,props:t,refresh:n,store:r},o))},onFocus:i,onBlur:ke,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},c)},getPanelProps:function(e){return hn({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.source,o=yn(n,fn);return hn({role:"listbox","aria-labelledby":Zt(t.id,"label"),id:Zt(t.id,"list",r)},o)},getItemProps:function(e){var a=e.item,i=e.source,l=yn(e,pn);return hn({id:Zt(t.id,"item-".concat(a.__autocomplete_id),i),role:"option","aria-selected":r.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",a.__autocomplete_id);var t=Mt(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,l=t.itemInputValue,s=t.itemUrl,u=t.source;u.onActive(hn({event:e,item:i,itemInputValue:l,itemUrl:s,refresh:n,source:u,state:r.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var l=i.getItemInputValue({item:a,state:r.getState()}),s=i.getItemUrl({item:a,state:r.getState()});(s?Promise.resolve():Yt(hn({event:e,nextState:{isOpen:!1},props:t,query:l,refresh:n,store:r},o))).then((function(){i.onSelect(hn({event:e,item:a,itemInputValue:l,itemUrl:s,refresh:n,source:i,state:r.getState()},o))}))}},l)}}}var vn="1.17.0",wn=[{segment:"autocomplete-core",version:vn}];function Sn(e){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sn(e)}function kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t=n?null===r?null:0:o}function Pn(e){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(e)}function jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function An(e){for(var t=1;t=5&&((o||!e&&5===r)&&(i.push(r,0,o,n),r=6),e&&(i.push(r,e,0,n),r=6)),o=""},s=0;s"===t?(r=1,o=""):o=t+o[0]:a?t===a?a="":o+=t:'"'===t||"'"===t?a=t:">"===t?(l(),r=1):r&&("="===t?(r=5,n=o,o=""):"/"===t&&(r<5||">"===e[s][u+1])?(l(),3===r&&(i=i[0]),r=i,(i=i[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(l(),r=2):o+=t),3===r&&"!--"===o&&(r=4,i=i[0])}return l(),i}(e)),t),arguments,[])).length>1?t:t[0]}var $n=function(e){var t=e.environment,n=t.document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("class","aa-SubmitIcon"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("width","20"),n.setAttribute("height","20"),n.setAttribute("fill","currentColor");var r=t.document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d","M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z"),n.appendChild(r),n},Un=function(e){var t=e.environment,n=t.document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("class","aa-ClearIcon"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("width","18"),n.setAttribute("height","18"),n.setAttribute("fill","currentColor");var r=t.document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d","M5.293 6.707l5.293 5.293-5.293 5.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-5.293-5.293 5.293-5.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z"),n.appendChild(r),n},Vn=function(e){var t=e.environment.document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("class","aa-LoadingIcon"),t.setAttribute("viewBox","0 0 100 100"),t.setAttribute("width","20"),t.setAttribute("height","20"),t.innerHTML='\n \n',t},Qn=["ontouchstart","ontouchend","ontouchmove","ontouchcancel"];function Wn(e,t,n){e[t]=null===n?"":"number"!=typeof n?n:n+"px"}function Hn(e){this._listeners[e.type](e)}function qn(e,t,n){var r,o,a=e[t];if("style"===t)if("string"==typeof n)e.style=n;else if(null===n)e.style="";else for(t in n)a&&n[t]===a[t]||Wn(e.style,t,n[t]);else"o"===t[0]&&"n"===t[1]?(r=t!==(t=t.replace(/Capture$/,"")),((o=t.toLowerCase())in e||Qn.includes(o))&&(t=o),t=t.slice(2),e._listeners||(e._listeners={}),e._listeners[t]=n,n?a||e.addEventListener(t,Hn,r):e.removeEventListener(t,Hn,r)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&"download"!==t&&"href"!==t&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function Gn(e){switch(e){case"onChange":return"onInput";case"onCompositionEnd":return"oncompositionend";default:return e}}function Kn(e,t){for(var n in t)qn(e,Gn(n),t[n])}function Yn(e,t){for(var n in t)"o"===n[0]&&"n"===n[1]||qn(e,Gn(n),t[n])}var Zn=["children"];function Jn(e){return function(e){if(Array.isArray(e))return Xn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Xn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function tr(e){return function(t,n){var r=n.children,o=void 0===r?[]:r,a=er(n,Zn),i=e.document.createElement(t);return Kn(i,a),i.append.apply(i,Jn(o)),i}}function nr(e){return nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nr(e)}var rr=["autocompleteScopeApi","environment","classNames","getInputProps","getInputPropsCore","isDetached","state"];function or(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ar(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sr=function(e){var t=e.autocompleteScopeApi,n=e.environment,r=(e.classNames,e.getInputProps),o=e.getInputPropsCore,a=e.isDetached,i=e.state,l=lr(e,rr),s=tr(n)("input",l),u=r(ar({state:i,props:o({inputElement:s}),inputElement:s},t));return Kn(s,ar(ar({},u),{},{onKeyDown:function(e){a&&"Tab"===e.key||u.onKeyDown(e)}})),s};function ur(e){return ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ur(e)}function cr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dr(e){for(var t=1;t2&&(i.children=arguments.length>3?pr.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===i[a]&&(i[a]=e.defaultProps[a]);return Cr(e,i,r,o,null)}function Cr(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==o?++hr:o,__i:-1,__u:0};return null==o&&null!=mr.vnode&&mr.vnode(a),a}function Pr(e){return e.children}function jr(e,t){this.props=e,this.context=t}function Ar(e,t){if(null==t)return e.__?Ar(e.__,e.__i+1):null;for(var n;tn?(Qr(r,t,o),o.length=r.length=0,t=void 0,gr.sort(vr)):t&&mr.__c&&mr.__c(t,Sr));t&&Qr(r,t,o),Lr.__r=0}function Rr(e,t,n,r,o,a,i,l,s,u,c){var d,f,p,m,h,g=r&&r.__k||Sr,y=t.length;for(n.__d=s,Dr(n,t,g),s=n.__d,d=0;d0?Cr(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,l=Mr(o,n,i=r+d,c),o.__i=l,a=null,-1!==l&&(c--,(a=n[l])&&(a.__u|=131072)),null==a||null===a.__v?(-1==l&&d--,"function"!=typeof o.type&&(o.__u|=65536)):l!==i&&(l===i+1?d++:l>i?c>s-i?d+=l-i:d--:d=l(null!=s&&0==(131072&s.__u)?1:0))for(;i>=0||l=0){if((s=t[i])&&0==(131072&s.__u)&&o==s.key&&a===s.type)return i;i--}if(l0&&void 0!==arguments[0]?arguments[0]:[];return{get:function(){return e},add:function(t){var n=e[e.length-1];(null==n?void 0:n.isHighlighted)===t.isHighlighted?e[e.length-1]={value:n.value+t.value,isHighlighted:n.isHighlighted}:e.push(t)}}}(n?[{value:n,isHighlighted:!1}]:[]);return t.forEach((function(e){var t=e.split(Jr);r.add({value:t[0],isHighlighted:!0}),""!==t[1]&&r.add({value:t[1],isHighlighted:!1})})),r.get()}function eo(e){return function(e){if(Array.isArray(e))return to(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return to(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return to(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function to(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n",""":'"',"'":"'"},ao=new RegExp(/\w/i),io=/&(amp|quot|lt|gt|#39);/g,lo=RegExp(io.source);function so(e,t){var n,r,o,a=e[t],i=(null===(n=e[t+1])||void 0===n?void 0:n.isHighlighted)||!0,l=(null===(r=e[t-1])||void 0===r?void 0:r.isHighlighted)||!0;return ao.test((o=a.value)&&lo.test(o)?o.replace(io,(function(e){return oo[e]})):o)||l!==i?a.isHighlighted:l}function uo(e){return uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uo(e)}function co(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fo(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var jo={clearButton:"aa-ClearButton",detachedCancelButton:"aa-DetachedCancelButton",detachedContainer:"aa-DetachedContainer",detachedFormContainer:"aa-DetachedFormContainer",detachedOverlay:"aa-DetachedOverlay",detachedSearchButton:"aa-DetachedSearchButton",detachedSearchButtonIcon:"aa-DetachedSearchButtonIcon",detachedSearchButtonPlaceholder:"aa-DetachedSearchButtonPlaceholder",detachedSearchButtonQuery:"aa-DetachedSearchButtonQuery",form:"aa-Form",input:"aa-Input",inputWrapper:"aa-InputWrapper",inputWrapperPrefix:"aa-InputWrapperPrefix",inputWrapperSuffix:"aa-InputWrapperSuffix",item:"aa-Item",label:"aa-Label",list:"aa-List",loadingIndicator:"aa-LoadingIndicator",panel:"aa-Panel",panelLayout:"aa-PanelLayout aa-Panel--scrollable",root:"aa-Autocomplete",source:"aa-Source",sourceFooter:"aa-SourceFooter",sourceHeader:"aa-SourceHeader",sourceNoResults:"aa-SourceNoResults",submitButton:"aa-SubmitButton"},Ao=function(e,t){var n=e.children;(0,e.render)(n,t)},To={createElement:Or,Fragment:Pr,render:Kr};function Io(e){var t=e.panelPlacement,n=e.container,r=e.form,o=e.environment,a=n.getBoundingClientRect(),i=(o.pageYOffset||o.document.documentElement.scrollTop||o.document.body.scrollTop||0)+a.top+a.height;switch(t){case"start":return{top:i,left:a.left};case"end":return{top:i,right:o.document.documentElement.clientWidth-(a.left+a.width)};case"full-width":return{top:i,left:0,right:0,width:"unset",maxWidth:"unset"};case"input-wrapper-width":var l=r.getBoundingClientRect();return{top:i,left:l.left,right:o.document.documentElement.clientWidth-(l.left+l.width),width:"unset",maxWidth:"unset"};default:throw new Error("[Autocomplete] The `panelPlacement` value ".concat(JSON.stringify(t)," is not valid."))}}function No(e){return No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},No(e)}function Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Xo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ea(e){for(var t=1;t0;if(!f.value.core.openOnFocus&&!t.query)return n;var r=Boolean(u.current||f.value.renderer.renderNoResults);return!n&&r||n},__autocomplete_metadata:{userAgents:Mo,options:e}}))})),h=ve(ea({collections:[],completion:null,context:{},isOpen:!1,query:"",activeItemId:null,status:"idle"},f.value.core.initialState)),g={getEnvironmentProps:f.value.renderer.getEnvironmentProps,getFormProps:f.value.renderer.getFormProps,getInputProps:f.value.renderer.getInputProps,getItemProps:f.value.renderer.getItemProps,getLabelProps:f.value.renderer.getLabelProps,getListProps:f.value.renderer.getListProps,getPanelProps:f.value.renderer.getPanelProps,getRootProps:f.value.renderer.getRootProps},y={setActiveItemId:m.value.setActiveItemId,setQuery:m.value.setQuery,setCollections:m.value.setCollections,setIsOpen:m.value.setIsOpen,setStatus:m.value.setStatus,setContext:m.value.setContext,refresh:m.value.refresh,navigator:m.value.navigator},b=l((function(){return zn.bind(f.value.renderer.renderer.createElement)})),v=l((function(){return function(e){var t=e.autocomplete,n=e.autocompleteScopeApi,r=e.classNames,o=e.environment,a=e.isDetached,i=e.placeholder,l=void 0===i?"Search":i,s=e.propGetters,u=e.setIsModalOpen,c=e.state,d=e.translations,f=tr(o),p=s.getRootProps(dr({state:c,props:t.getRootProps({})},n)),m=f("div",dr({class:r.root},p)),h=f("div",{class:r.detachedContainer,onMouseDown:function(e){e.stopPropagation()}}),g=f("div",{class:r.detachedOverlay,children:[h],onMouseDown:function(){u(!1),t.setIsOpen(!1)}}),y=s.getLabelProps(dr({state:c,props:t.getLabelProps({})},n)),b=f("button",{class:r.submitButton,type:"submit",title:d.submitButtonTitle,children:[$n({environment:o})]}),v=f("label",dr({class:r.label,children:[b]},y)),w=f("button",{class:r.clearButton,type:"reset",title:d.clearButtonTitle,children:[Un({environment:o})]}),S=f("div",{class:r.loadingIndicator,children:[Vn({environment:o})]}),k=sr({class:r.input,environment:o,state:c,getInputProps:s.getInputProps,getInputPropsCore:t.getInputProps,autocompleteScopeApi:n,isDetached:a}),x=f("div",{class:r.inputWrapperPrefix,children:[v,S]}),_=f("div",{class:r.inputWrapperSuffix,children:[w]}),E=f("div",{class:r.inputWrapper,children:[k]}),O=s.getFormProps(dr({state:c,props:t.getFormProps({inputElement:k})},n)),C=f("form",dr({class:r.form,children:[x,E,_]},O)),P=s.getPanelProps(dr({state:c,props:t.getPanelProps({})},n)),j=f("div",dr({class:r.panel},P)),A=f("div",{class:r.detachedSearchButtonQuery,textContent:c.query}),T=f("div",{class:r.detachedSearchButtonPlaceholder,hidden:Boolean(c.query),textContent:l});if(a){var I=f("div",{class:r.detachedSearchButtonIcon,children:[$n({environment:o})]}),N=f("button",{type:"button",class:r.detachedSearchButton,title:d.detachedSearchButtonTitle,id:y.id,onClick:function(){u(!0)},children:[I,T,A]}),L=f("button",{type:"button",class:r.detachedCancelButton,textContent:d.detachedCancelButtonText,onTouchStart:function(e){e.stopPropagation()},onClick:function(){t.setIsOpen(!1),u(!1)}}),R=f("div",{class:r.detachedFormContainer,children:[C,L]});h.appendChild(R),m.appendChild(N)}else m.appendChild(C);return{detachedContainer:h,detachedOverlay:g,detachedSearchButtonQuery:A,detachedSearchButtonPlaceholder:T,inputWrapper:E,input:k,root:m,form:C,label:v,submitButton:b,clearButton:w,loadingIndicator:S,panel:j}}({autocomplete:m.value,autocompleteScopeApi:y,classNames:f.value.renderer.classNames,environment:f.value.core.environment,isDetached:p.value,placeholder:f.value.core.placeholder,propGetters:g,setIsModalOpen:x,state:h.current,translations:f.value.renderer.translations})}));function w(){Kn(v.value.panel,{style:p.value?{}:Io({panelPlacement:f.value.renderer.panelPlacement,container:v.value.root,form:v.value.form,environment:f.value.core.environment})})}function S(e){h.current=e;var t={autocomplete:m.value,autocompleteScopeApi:y,classNames:f.value.renderer.classNames,components:f.value.renderer.components,container:f.value.renderer.container,html:b.value,dom:v.value,panelContainer:p.value?v.value.detachedContainer:f.value.renderer.panelContainer,propGetters:g,state:h.current,renderer:f.value.renderer.renderer},n=!it(e)&&!u.current&&f.value.renderer.renderNoResults||f.value.renderer.render;!function(e){var t=e.autocomplete,n=e.autocompleteScopeApi,r=e.dom,o=e.propGetters,a=e.state;Yn(r.root,o.getRootProps(Do({state:a,props:t.getRootProps({})},n))),Yn(r.input,o.getInputProps(Do({state:a,props:t.getInputProps({inputElement:r.input}),inputElement:r.input},n))),Kn(r.label,{hidden:"stalled"===a.status}),Kn(r.loadingIndicator,{hidden:"stalled"!==a.status}),Kn(r.clearButton,{hidden:!a.query}),Kn(r.detachedSearchButtonQuery,{textContent:a.query}),Kn(r.detachedSearchButtonPlaceholder,{hidden:Boolean(a.query)})}(t),function(e,t){var n=t.autocomplete,r=t.autocompleteScopeApi,o=t.classNames,a=t.html,i=t.dom,l=t.panelContainer,s=t.propGetters,u=t.state,c=t.components,d=t.renderer;if(u.isOpen){l.contains(i.panel)||"loading"===u.status||l.appendChild(i.panel),i.panel.classList.toggle("aa-Panel--stalled","stalled"===u.status);var f=u.collections.filter((function(e){var t=e.source,n=e.items;return t.templates.noResults||n.length>0})).map((function(e,t){var i=e.source,l=e.items;return d.createElement("section",{key:t,className:o.source,"data-autocomplete-source-id":i.sourceId},i.templates.header&&d.createElement("div",{className:o.sourceHeader},i.templates.header({components:c,createElement:d.createElement,Fragment:d.Fragment,items:l,source:i,state:u,html:a})),i.templates.noResults&&0===l.length?d.createElement("div",{className:o.sourceNoResults},i.templates.noResults({components:c,createElement:d.createElement,Fragment:d.Fragment,source:i,state:u,html:a})):d.createElement("ul",Lo({className:o.list},s.getListProps(Do({state:u,props:n.getListProps({source:i})},r))),l.map((function(e){var t=n.getItemProps({item:e,source:i});return d.createElement("li",Lo({key:t.id,className:o.item},s.getItemProps(Do({state:u,props:t},r))),i.templates.item({components:c,createElement:d.createElement,Fragment:d.Fragment,item:e,state:u,html:a}))}))),i.templates.footer&&d.createElement("div",{className:o.sourceFooter},i.templates.footer({components:c,createElement:d.createElement,Fragment:d.Fragment,items:l,source:i,state:u,html:a})))})),p=d.createElement(d.Fragment,null,d.createElement("div",{className:o.panelLayout},f),d.createElement("div",{className:"aa-GradientBottom"})),m=f.reduce((function(e,t){return e[t.props["data-autocomplete-source-id"]]=t,e}),{});e(Do(Do({children:p,state:u,sections:f,elements:m},d),{},{components:c,html:a},r),i.panel)}else l.contains(i.panel)&&l.removeChild(i.panel)}(n,t)}function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o();var t,n,r=f.value.renderer,i=r.components,l=Jo(r,Yo);c.current=Vo(l,f.value.core,{components:(t=i,n=function(e){return!e.value.hasOwnProperty("__autocomplete_componentName")},Object.entries(t).reduce((function(e,t){var r=Go(t,2),o=r[0],a=r[1];return n({key:o,value:a})?Ho(Ho({},e),{},qo({},o,a)):e}),{})),initialState:h.current},e),s(),a(),m.value.refresh().then((function(){S(h.current)}))}function x(e){e!==f.value.core.environment.document.body.contains(v.value.detachedOverlay)&&(e?(f.value.core.environment.document.body.appendChild(v.value.detachedOverlay),f.value.core.environment.document.body.classList.add("aa-Detached"),v.value.input.focus()):(f.value.core.environment.document.body.removeChild(v.value.detachedOverlay),f.value.core.environment.document.body.classList.remove("aa-Detached")))}return r((function(){var e=m.value.getEnvironmentProps({formElement:v.value.form,panelElement:v.value.panel,inputElement:v.value.input});return Kn(f.value.core.environment,e),function(){Kn(f.value.core.environment,Object.keys(e).reduce((function(e,t){return ea(ea({},e),{},ta({},t,void 0))}),{}))}})),r((function(){var e=p.value?f.value.core.environment.document.body:f.value.renderer.panelContainer,t=p.value?v.value.detachedOverlay:v.value.panel;return p.value&&h.current.isOpen&&x(!0),S(h.current),function(){e.contains(t)&&e.removeChild(t)}})),r((function(){var e=f.value.renderer.container;return e.appendChild(v.value.root),function(){e.removeChild(v.value.root)}})),r((function(){var e=be((function(e){S(e.state)}),0);return d.current=function(t){var n=t.state,r=t.prevState;(p.value&&r.isOpen!==n.isOpen&&x(n.isOpen),p.value||!n.isOpen||r.isOpen||w(),n.query!==r.query)&&f.value.core.environment.document.querySelectorAll(".aa-Panel--scrollable").forEach((function(e){0!==e.scrollTop&&(e.scrollTop=0)}));e({state:n})},function(){d.current=void 0}})),r((function(){var e=be((function(){var e=p.value;p.value=f.value.core.environment.matchMedia(f.value.renderer.detachedMediaQuery).matches,e!==p.value?k({}):requestAnimationFrame(w)}),20);return f.value.core.environment.addEventListener("resize",e),function(){f.value.core.environment.removeEventListener("resize",e)}})),r((function(){if(!p.value)return function(){};function e(e){v.value.detachedContainer.classList.toggle("aa-DetachedContainer--modal",e)}function t(t){e(t.matches)}var n=f.value.core.environment.matchMedia(getComputedStyle(f.value.core.environment.document.documentElement).getPropertyValue("--aa-detached-modal-media-query"));e(n.matches);var r=Boolean(n.addEventListener);return r?n.addEventListener("change",t):n.addListener(t),function(){r?n.removeEventListener("change",t):n.removeListener(t)}})),r((function(){return requestAnimationFrame(w),function(){}})),ea(ea({},y),{},{update:k,destroy:function(){o()}})}var ra=n(1141);const oa=n(774),aa=oa;var ia=n(689),la=n.n(ia);function sa(){const e=(0,l.zy)(),t=(0,l.W6)(),{siteConfig:{baseUrl:n}}=(0,se.A)(),[o,a]=(0,r.useState)({terms:[],isDocsOrBlog:!1});return(0,r.useEffect)((()=>{if(!e.state?.cmfcmfhighlight||0===e.state.cmfcmfhighlight.terms.length)return;a(e.state.cmfcmfhighlight);const{cmfcmfhighlight:n,...r}=e.state;t.replace({...e,state:r})}),[e.state?.cmfcmfhighlight,t,e]),(0,r.useEffect)((()=>{if(0===o.terms.length)return;const e=o.isDocsOrBlog?document.getElementsByTagName("article")[0]:document.getElementsByTagName("main")[0];if(!e)return;const t=new(la())(e),n={ignoreJoiners:!0};return t.mark(o.terms,n),()=>t.unmark(n)}),[o,n]),null}var ua=n(6503),ca=n(1482);function da(e){let{document:t}=e;const[n,r]=t.sectionRoute.split("#");let o=n;return r&&(o+="#"+r),o}const fa={documents:[],index:aa((function(){this.ref("id"),this.field("title"),this.field("content")}))};const pa=()=>{const e=(0,B.A)(),[t,n]=(0,r.useState)((()=>!!e&&"dark"===document.documentElement.getAttribute("data-theme")));(0,r.useEffect)((()=>{const e=new MutationObserver((()=>{n("dark"===document.documentElement.getAttribute("data-theme"))}));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>e.disconnect()}),[]);const{siteConfig:{baseUrl:o}}=(0,se.A)(),{titleBoost:a,contentBoost:i,tagsBoost:u,parentCategoriesBoost:c,indexDocSidebarParentCategories:d,maxSearchResults:f}=(0,ua.P_)("@cmfcmf/docusaurus-search-local"),p=(0,l.W6)(),{tags:m}=(0,ca.af)(),h=(0,r.useRef)(m);(0,r.useEffect)((()=>{h.current=m}),[m]);const g=(0,r.useRef)({}),y=async e=>{const t=g.current[e];switch(t?.state){case"ready":return t;case void 0:{const t=[];g.current[e]={state:"loading",callbacks:t};const n=await async function(e,t){{let r;try{const n=await fetch(`${e}search-index-${t}.json`);if(!n.ok)return fa;r=await n.json()}catch(n){return fa}return{documents:r.documents,index:aa.Index.load(r.index)}}}(o,e);return t.forEach((e=>e(n))),g.current[e]={state:"ready",...n}}case"loading":return new Promise((e=>{t.callbacks.push(e)}))}},b=(0,s.T)({message:"cmfcmf/d-s-l.searchBar.placeholder",description:"Placeholder shown in the searchbar"}),v=(0,r.useRef)(null),w=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(v.current)return w.current=na({container:v.current,placeholder:b,renderer:{createElement:r.createElement,Fragment:r.Fragment,render:ye.render},navigator:{navigate(e){let{item:t,itemUrl:n}=e;p.push(n,{cmfcmfhighlight:{terms:t.terms,isDocsOrBlog:"docs"===t.document.type||"blog"===t.document.type}})}},detachedMediaQuery:"",defaultActiveItemId:0,translations:{clearButtonTitle:(0,s.T)({message:"cmfcmf/d-s-l.searchBar.clearButtonTitle",description:"Title of the button to clear the current search input"}),detachedCancelButtonText:(0,s.T)({message:"cmfcmf/d-s-l.searchBar.detachedCancelButtonText",description:"Text of the button to close the detached search window"}),submitButtonTitle:(0,s.T)({message:"cmfcmf/d-s-l.searchBar.submitButtonTitle",description:"Title of the button to submit a new search"})},getSources(e){let{query:t}=e;return[{sourceId:"search-results",templates:{item(e){let{item:t}=e;const n=da(t);return r.createElement("a",{href:n,className:"aa-ItemLink",onClick:e=>{e.preventDefault(),p.push(n,{cmfcmfhighlight:{terms:t.terms,isDocsOrBlog:"docs"===t.document.type||"blog"===t.document.type}})}},r.createElement("div",{className:"aa-ItemContent"},r.createElement("div",{className:"aa-ItemContentBody"},r.createElement("div",{className:"aa-ItemContentTitle"},t.document.sectionTitle),t.document.pageTitle!==t.document.sectionTitle&&r.createElement("div",{className:"aa-ItemContentDescription"},t.document.pageTitle))),r.createElement("div",{className:"aa-ItemActions"},r.createElement("button",{className:"aa-ItemActionButton aa-DesktopOnly aa-ActiveOnly",type:"button",title:"Select"},r.createElement("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},r.createElement("path",{d:"M18.984 6.984h2.016v6h-15.188l3.609 3.609-1.406 1.406-6-6 6-6 1.406 1.406-3.609 3.609h13.172v-4.031z"})))))},noResults:()=>r.createElement("div",{className:"aa-ItemContent"},r.createElement("div",{className:"aa-ItemContentBody"},(0,s.T)({message:"cmfcmf/d-s-l.searchBar.noResults",description:"message shown if no results are found"})))},getItemUrl(e){let{item:t}=e;return da(t)},async getItems(){const e=h.current,n=await Promise.all(e.map((e=>y(e)))),r=(e=>oa.tokenizer(e).map((e=>e.str)))(t);return n.flatMap((e=>{let{index:t,documents:n}=e;return t.query((e=>{e.term(r,{fields:["title"],boost:a}),e.term(r,{fields:["title"],boost:a,wildcard:aa.Query.wildcard.TRAILING}),e.term(r,{fields:["content"],boost:i}),e.term(r,{fields:["content"],boost:i,wildcard:aa.Query.wildcard.TRAILING}),e.term(r,{fields:["tags"],boost:u}),e.term(r,{fields:["tags"],boost:u,wildcard:aa.Query.wildcard.TRAILING}),d&&(e.term(r,{fields:["sidebarParentCategories"],boost:c}),e.term(r,{fields:["sidebarParentCategories"],boost:c,wildcard:aa.Query.wildcard.TRAILING}))})).slice(0,f).map((e=>({document:n.find((t=>t.id.toString()===e.ref)),score:e.score,terms:r})))})).sort(((e,t)=>t.score-e.score)).slice(0,f)}}]}}),()=>w.current?.destroy()}),[f]),r.createElement(r.Fragment,null,r.createElement(ra.A,null,r.createElement("body",{"data-theme":t?"dark":"light"})),r.createElement(sa,null),r.createElement("div",{className:"dsla-search-wrapper"},r.createElement("div",{className:"dsla-search-field",ref:v,"data-tags":m.join(",")})))},ma={navbarSearchContainer:"navbarSearchContainer_Bca1"};function ha(e){let{children:t,className:n}=e;return(0,c.jsx)("div",{className:(0,o.A)(n,ma.navbarSearchContainer),children:t})}var ga=n(9802),ya=n(9048);var ba=n(2780);const va=e=>e.docs.find((t=>t.id===e.mainDocId));const wa={default:ae,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:o="",...a}=e;const{i18n:{currentLocale:i,locales:u,localeConfigs:d}}=(0,se.A)(),f=(0,me.o)(),{search:p,hash:m}=(0,l.zy)(),h=[...n,...u.map((e=>{const n=`${`pathname://${f.createUrl({locale:e,fullyQualified:!1})}`}${p}${m}${o}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],g=t?(0,s.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,c.jsx)(pe,{...a,mobile:t,label:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(he,{className:ge}),g]}),items:h})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,c.jsx)(ha,{className:n,children:(0,c.jsx)(pa,{})})},dropdown:pe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:a=!1}=e;const i=a?"li":"div";return(0,c.jsx)(i,{className:(0,o.A)({navbar__item:!r&&!a,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,ga.zK)(r),i=(0,ya.QB)(t,r),l=a?.path===i?.path;return null===i||i.unlisted&&!l?null:(0,c.jsx)(ae,{exact:!0,...o,isActive:()=>l||!!a?.sidebar&&a.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,ga.zK)(r),i=(0,ya.fW)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,c.jsx)(ae,{exact:!0,...o,isActive:()=>a?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...o}=e;const a=(0,ya.Vd)(r)[0],i=t??a.label,l=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(a).path;return(0,c.jsx)(ae,{...o,label:i,to:l})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:o,dropdownItemsAfter:a,...i}=e;const{search:u,hash:d}=(0,l.zy)(),f=(0,ga.zK)(n),p=(0,ga.jh)(n),{savePreferredVersionName:m}=(0,ba.g1)(n),h=p.map((e=>{const t=f.alternateDocVersions[e.name]??va(e);return{label:e.label,to:`${t.path}${u}${d}`,isActive:()=>e===f.activeVersion,onClick:()=>m(e.name)}})),g=[...o,...h,...a],y=(0,ya.Vd)(n)[0],b=t&&g.length>1?(0,s.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):y.label,v=t&&g.length>1?void 0:va(y).path;return g.length<=1?(0,c.jsx)(ae,{...i,mobile:t,label:b,to:v,isActive:r?()=>!1:void 0}):(0,c.jsx)(pe,{...i,mobile:t,label:b,to:v,items:g,isActive:r?()=>!1:void 0})}},Sa=wa;function ka(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=Sa[r];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,c.jsx)(o,{...n})}function xa(){const e=(0,j.M)(),t=(0,w.p)().navbar.items;return(0,c.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(ka,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function _a(e){return(0,c.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,c.jsx)(s.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Ea(){const e=0===(0,w.p)().navbar.items.length,t=D();return(0,c.jsxs)(c.Fragment,{children:[!e&&(0,c.jsx)(_a,{onClick:()=>t.hide()}),t.content]})}function Oa(){const e=(0,j.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,c.jsx)(F,{header:(0,c.jsx)(Y,{}),primaryMenu:(0,c.jsx)(xa,{}),secondaryMenu:(0,c.jsx)(Ea,{})}):null}const Ca={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Pa(e){return(0,c.jsx)("div",{role:"presentation",...e,className:(0,o.A)("navbar-sidebar__backdrop",e.className)})}function ja(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:a}}=(0,w.p)(),i=(0,j.M)(),{navbarRef:l,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),o=(0,r.useRef)(!1),a=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(a.current=e.getBoundingClientRect().height)}),[]);return(0,A.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=l?n(!1):i+u{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return o.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,c.jsxs)("nav",{ref:l,"aria-label":(0,s.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,o.A)("navbar","navbar--fixed-top",n&&[Ca.navbarHideable,!d&&Ca.navbarHidden],{"navbar--dark":"dark"===a,"navbar--primary":"primary"===a,"navbar-sidebar--show":i.shown}),children:[t,(0,c.jsx)(Pa,{onClick:i.toggle}),(0,c.jsx)(Oa,{})]})}var Aa=n(4609);const Ta={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function Ia(e){return(0,c.jsx)("button",{type:"button",...e,children:(0,c.jsx)(s.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function Na(e){let{error:t}=e;const n=(0,Aa.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,c.jsx)("p",{className:Ta.errorBoundaryError,children:n})}class La extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const Ra="right";function Da(e){let{width:t=30,height:n=30,className:r,...o}=e;return(0,c.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...o,children:(0,c.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function Fa(){const{toggle:e,shown:t}=(0,j.M)();return(0,c.jsx)("button",{onClick:e,"aria-label":(0,s.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,c.jsx)(Da,{})})}const Ma={colorModeToggle:"colorModeToggle_DEke"};function Ba(e){let{items:t}=e;return(0,c.jsx)(c.Fragment,{children:t.map(((e,t)=>(0,c.jsx)(La,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,c.jsx)(ka,{...e})},t)))})}function za(e){let{left:t,right:n}=e;return(0,c.jsxs)("div",{className:"navbar__inner",children:[(0,c.jsx)("div",{className:"navbar__items",children:t}),(0,c.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function $a(){const e=(0,j.M)(),t=(0,w.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??Ra)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return(0,c.jsx)(za,{left:(0,c.jsxs)(c.Fragment,{children:[!e.disabled&&(0,c.jsx)(Fa,{}),(0,c.jsx)(G,{}),(0,c.jsx)(Ba,{items:n})]}),right:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Ba,{items:r}),(0,c.jsx)(H,{className:Ma.colorModeToggle}),!o&&(0,c.jsx)(ha,{children:(0,c.jsx)(pa,{})})]})})}function Ua(){return(0,c.jsx)(ja,{children:(0,c.jsx)($a,{})})}function Va(e){let{item:t}=e;const{to:n,href:r,label:o,prependBaseUrlToHref:a,...i}=t,l=(0,J.A)(n),s=(0,J.A)(r,{forcePrependBaseUrl:!0});return(0,c.jsxs)(Z.A,{className:"footer__link-item",...r?{href:a?s:r}:{to:l},...i,children:[o,r&&!(0,X.A)(r)&&(0,c.jsx)(te.A,{})]})}function Qa(e){let{item:t}=e;return t.html?(0,c.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,c.jsx)("li",{className:"footer__item",children:(0,c.jsx)(Va,{item:t})},t.href??t.to)}function Wa(e){let{column:t}=e;return(0,c.jsxs)("div",{className:"col footer__col",children:[(0,c.jsx)("div",{className:"footer__title",children:t.title}),(0,c.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,c.jsx)(Qa,{item:e},t)))})]})}function Ha(e){let{columns:t}=e;return(0,c.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,c.jsx)(Wa,{column:e},t)))})}function qa(){return(0,c.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function Ga(e){let{item:t}=e;return t.html?(0,c.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,c.jsx)(Va,{item:t})}function Ka(e){let{links:t}=e;return(0,c.jsx)("div",{className:"footer__links text--center",children:(0,c.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,c.jsxs)(r.Fragment,{children:[(0,c.jsx)(Ga,{item:e}),t.length!==n+1&&(0,c.jsx)(qa,{})]},n)))})})}function Ya(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,c.jsx)(Ha,{columns:t}):(0,c.jsx)(Ka,{links:t})}var Za=n(975);const Ja={footerLogoLink:"footerLogoLink_BH7S"};function Xa(e){let{logo:t}=e;const{withBaseUrl:n}=(0,J.h)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,c.jsx)(Za.A,{className:(0,o.A)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function ei(e){let{logo:t}=e;return t.href?(0,c.jsx)(Z.A,{href:t.href,className:Ja.footerLogoLink,target:t.target,children:(0,c.jsx)(Xa,{logo:t})}):(0,c.jsx)(Xa,{logo:t})}function ti(e){let{copyright:t}=e;return(0,c.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function ni(e){let{style:t,links:n,logo:r,copyright:a}=e;return(0,c.jsx)("footer",{className:(0,o.A)("footer",{"footer--dark":"dark"===t}),children:(0,c.jsxs)("div",{className:"container container-fluid",children:[n,(r||a)&&(0,c.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,c.jsx)("div",{className:"margin-bottom--sm",children:r}),a]})]})})}function ri(){const{footer:e}=(0,w.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:o}=e;return(0,c.jsx)(ni,{style:o,links:n&&n.length>0&&(0,c.jsx)(Ya,{links:n}),logo:r&&(0,c.jsx)(ei,{logo:r}),copyright:t&&(0,c.jsx)(ti,{copyright:t})})}const oi=r.memo(ri),ai=(0,T.fM)([M.a,S.oq,A.Tv,ba.VQ,i.Jx,function(e){let{children:t}=e;return(0,c.jsx)(I.y_,{children:(0,c.jsx)(j.e,{children:(0,c.jsx)(L,{children:t})})})}]);function ii(e){let{children:t}=e;return(0,c.jsx)(ai,{children:t})}var li=n(5225);function si(e){let{error:t,tryAgain:n}=e;return(0,c.jsx)("main",{className:"container margin-vert--xl",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,c.jsx)(li.A,{as:"h1",className:"hero__title",children:(0,c.jsx)(s.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,c.jsx)("div",{className:"margin-vert--lg",children:(0,c.jsx)(Ia,{onClick:n,className:"button button--primary shadow--lw"})}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"margin-vert--md",children:(0,c.jsx)(Na,{error:t})})]})})})}const ui={mainWrapper:"mainWrapper_z2l0"};function ci(e){const{children:t,noFooter:n,wrapperClassName:r,title:l,description:s}=e;return(0,y.J)(),(0,c.jsxs)(ii,{children:[(0,c.jsx)(i.be,{title:l,description:s}),(0,c.jsx)(v,{}),(0,c.jsx)(P,{}),(0,c.jsx)(Ua,{}),(0,c.jsx)("div",{id:d,className:(0,o.A)(g.G.wrapper.main,ui.mainWrapper,r),children:(0,c.jsx)(a.A,{fallback:e=>(0,c.jsx)(si,{...e}),children:t})}),!n&&(0,c.jsx)(oi,{})]})}},20:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});n(6540);var r=n(4783),o=n(8180),a=n(7639),i=n(6957),l=n(975),s=n(4848);function u(e){let{logo:t,alt:n,imageClassName:r}=e;const a={light:(0,o.A)(t.src),dark:(0,o.A)(t.srcDark||t.src)},i=(0,s.jsx)(l.A,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,s.jsx)("div",{className:r,children:i}):i}function c(e){const{siteConfig:{title:t}}=(0,a.A)(),{navbar:{title:n,logo:l}}=(0,i.p)(),{imageClassName:c,titleClassName:d,...f}=e,p=(0,o.A)(l?.href||"/"),m=n?"":t,h=l?.alt??m;return(0,s.jsxs)(r.A,{to:p,...f,...l?.target&&{target:l.target},children:[l&&(0,s.jsx)(u,{logo:l,alt:h,imageClassName:c}),null!=n&&(0,s.jsx)("b",{className:d,children:n})]})}},1210:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);var r=n(1141),o=n(4848);function a(e){let{locale:t,version:n,tag:a}=e;const i=t;return(0,o.jsxs)(r.A,{children:[t&&(0,o.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,o.jsx)("meta",{name:"docusaurus_version",content:n}),a&&(0,o.jsx)("meta",{name:"docusaurus_tag",content:a}),i&&(0,o.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,o.jsx)("meta",{name:"docsearch:version",content:n}),a&&(0,o.jsx)("meta",{name:"docsearch:docusaurus_tag",content:a})]})}},975:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(6540),o=n(5066),a=n(1062),i=n(7710);const l={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var s=n(4848);function u(e){let{className:t,children:n}=e;const u=(0,a.A)(),{colorMode:c}=(0,i.G)();return(0,s.jsx)(s.Fragment,{children:(u?"dark"===c?["dark"]:["light"]:["light","dark"]).map((e=>{const a=n({theme:e,className:(0,o.A)(t,l.themedComponent,l[`themedComponent--${e}`])});return(0,s.jsx)(r.Fragment,{children:a},e)}))})}function c(e){const{sources:t,className:n,alt:r,...o}=e;return(0,s.jsx)(u,{className:n,children:e=>{let{theme:n,className:a}=e;return(0,s.jsx)("img",{src:t[n],alt:r,className:a,...o})}})}},4549:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,u:()=>u});var r=n(6540),o=n(1712),a=n(6494),i=n(6350),l=n(4848);const s="ease-in-out";function u(e){let{initialState:t}=e;const[n,o]=(0,r.useState)(t??!1),a=(0,r.useCallback)((()=>{o((e=>!e))}),[]);return{collapsed:n,setCollapsed:o,toggleCollapsed:a}}const c={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function f(e,t){const n=t?c:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function p(e){let{collapsibleRef:t,collapsed:n,animation:o}=e;const a=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=o?.duration??function(e){if((0,i.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${o?.easing??s}`,height:`${t}px`}}function l(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return f(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(l(),requestAnimationFrame((()=>{e.style.height=c.height,e.style.overflow=c.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{l()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,o])}function m(e){if(!o.A.canUseDOM)return e?c:d}function h(e){let{as:t="div",collapsed:n,children:o,animation:a,onCollapseTransitionEnd:i,className:s,disableSSRStyle:u}=e;const c=(0,r.useRef)(null);return p({collapsibleRef:c,collapsed:n,animation:a}),(0,l.jsx)(t,{ref:c,style:u?void 0:m(n),onTransitionEnd:e=>{"height"===e.propertyName&&(f(c.current,n),i?.(n))},className:s,children:o})}function g(e){let{collapsed:t,...n}=e;const[o,i]=(0,r.useState)(!t),[s,u]=(0,r.useState)(t);return(0,a.A)((()=>{t||i(!0)}),[t]),(0,a.A)((()=>{o&&u(t)}),[o,t]),o?(0,l.jsx)(h,{...n,collapsed:s}):null}function y(e){let{lazy:t,...n}=e;const r=t?g:h;return(0,l.jsx)(r,{...n})}},2:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>h,oq:()=>m});var r=n(6540),o=n(1062),a=n(1269),i=n(4799),l=n(6957),s=n(4848);const u=(0,a.Wf)("docusaurus.announcement.dismiss"),c=(0,a.Wf)("docusaurus.announcement.id"),d=()=>"true"===u.get(),f=e=>u.set(String(e)),p=r.createContext(null);function m(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,l.p)(),t=(0,o.A)(),[n,a]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{a(d())}),[]);const i=(0,r.useCallback)((()=>{f(!0),a(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=c.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;c.set(t),r&&f(!1),!r&&d()||a(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,s.jsx)(p.Provider,{value:n,children:t})}function h(){const e=(0,r.useContext)(p);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},7710:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>g});var r=n(6540),o=n(1712),a=n(4799),i=n(1269),l=n(6957),s=n(4848);const u=r.createContext(void 0),c="theme",d=(0,i.Wf)(c),f={light:"light",dark:"dark"},p=e=>e===f.dark?f.dark:f.light,m=e=>o.A.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e),h=e=>{d.set(p(e))};function g(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,l.p)(),[o,a]=(0,r.useState)(m(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:o=!0}=r;t?(a(t),o&&h(t)):(a(n?window.matchMedia("(prefers-color-scheme: dark)").matches?f.dark:f.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",p(o))}),[o]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==c)return;const t=d.get();null!==t&&i(p(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const s=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||s.current?s.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:o,setColorMode:i,get isDarkTheme(){return o===f.dark},setLightTheme(){i(f.light)},setDarkTheme(){i(f.dark)}})),[o,i])}();return(0,s.jsx)(u.Provider,{value:n,children:t})}function y(){const e=(0,r.useContext)(u);if(null==e)throw new a.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},2780:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>y,XK:()=>w,g1:()=>v});var r=n(6540),o=n(9802),a=n(4598),i=n(6957),l=n(9048),s=n(4799),u=n(1269),c=n(4848);const d=e=>`docs-preferred-version-${e}`,f={save:(e,t,n)=>{(0,u.Wf)(d(e),{persistence:t}).set(n)},read:(e,t)=>(0,u.Wf)(d(e),{persistence:t}).get(),clear:(e,t)=>{(0,u.Wf)(d(e),{persistence:t}).del()}},p=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const m=r.createContext(null);function h(){const e=(0,o.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[a,l]=(0,r.useState)((()=>p(n)));(0,r.useEffect)((()=>{l(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function o(e){const t=f.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(f.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,o(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[a,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){f.save(e,t,n),l((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function g(e){let{children:t}=e;const n=h();return(0,c.jsx)(m.Provider,{value:n,children:t})}function y(e){let{children:t}=e;return l.C5?(0,c.jsx)(g,{children:t}):(0,c.jsx)(c.Fragment,{children:t})}function b(){const e=(0,r.useContext)(m);if(!e)throw new s.dV("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=a.W);const t=(0,o.ht)(e),[n,i]=b(),{preferredVersionName:l}=n[e];return{preferredVersion:t.versions.find((e=>e.name===l))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}function w(){const e=(0,o.Gy)(),[t]=b();function n(n){const r=e[n],{preferredVersionName:o}=t[n];return r.versions.find((e=>e.name===o))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},403:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,t:()=>u});var r=n(6540),o=n(4799),a=n(4848);const i=Symbol("EmptyContext"),l=r.createContext(i);function s(e){let{children:t,name:n,items:o}=e;const i=(0,r.useMemo)((()=>n&&o?{name:n,items:o}:null),[n,o]);return(0,a.jsx)(l.Provider,{value:i,children:t})}function u(){const e=(0,r.useContext)(l);if(e===i)throw new o.dV("DocsSidebarProvider");return e}},3403:(e,t,n)=>{"use strict";n.d(t,{n:()=>l,r:()=>s});var r=n(6540),o=n(4799),a=n(4848);const i=r.createContext(null);function l(e){let{children:t,version:n}=e;return(0,a.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(null===e)throw new o.dV("DocsVersionProvider");return e}},5755:(e,t,n)=>{"use strict";n.d(t,{e:()=>p,M:()=>m});var r=n(6540),o=n(763),a=n(2216),i=n(6347),l=n(4799);function s(e){!function(e){const t=(0,i.W6)(),n=(0,l._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}var u=n(6957),c=n(4848);const d=r.createContext(void 0);function f(){const e=function(){const e=(0,o.YL)(),{items:t}=(0,u.p)().navbar;return 0===t.length&&!e.component}(),t=(0,a.l)(),n=!e&&"mobile"===t,[i,l]=(0,r.useState)(!1);s((()=>{if(i)return l(!1),!1}));const c=(0,r.useCallback)((()=>{l((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&l(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:c,shown:i})),[e,n,c,i])}function p(e){let{children:t}=e;const n=f();return(0,c.jsx)(d.Provider,{value:n,children:t})}function m(){const e=r.useContext(d);if(void 0===e)throw new l.dV("NavbarMobileSidebarProvider");return e}},763:(e,t,n)=>{"use strict";n.d(t,{GX:()=>u,YL:()=>s,y_:()=>l});var r=n(6540),o=n(4799),a=n(4848);const i=r.createContext(null);function l(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,a.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(!e)throw new o.dV("NavbarSecondaryMenuContentProvider");return e[0]}function u(e){let{component:t,props:n}=e;const a=(0,r.useContext)(i);if(!a)throw new o.dV("NavbarSecondaryMenuContentProvider");const[,l]=a,s=(0,o.Be)(n);return(0,r.useEffect)((()=>{l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((()=>()=>l({component:null,props:null})),[l]),null}},9503:(e,t,n)=>{"use strict";n.d(t,{w:()=>o,J:()=>a});var r=n(6540);const o="navigation-with-keyboard";function a(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},2216:(e,t,n)=>{"use strict";n.d(t,{l:()=>l});var r=n(6540),o=n(1712);const a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(e){let{desktopBreakpoint:t=i}=void 0===e?{}:e;const[n,l]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){l(function(e){if(!o.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?a.desktop:a.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},8630:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},6350:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},9048:(e,t,n)=>{"use strict";n.d(t,{d1:()=>C,Nr:()=>m,w8:()=>b,C5:()=>f,$S:()=>h,cC:()=>p,B5:()=>O,Vd:()=>x,QB:()=>E,fW:()=>_,OF:()=>k,Y:()=>w});var r=n(6540),o=n(6347),a=n(2831),i=n(9802),l=n(2780),s=n(3403),u=n(403);function c(e){return Array.from(new Set(e))}var d=n(260);const f=!!i.Gy;function p(e){const t=(0,s.r)();if(!e)return;const n=t.docs[e];if(!n)throw new Error(`no version doc found by id=${e}`);return n}function m(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=m(t);if(e)return e}}(e):void 0:e.href}function h(){const{pathname:e}=(0,o.zy)(),t=(0,u.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=S({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const g=(e,t)=>void 0!==e&&(0,d.ys)(e,t),y=(e,t)=>e.some((e=>b(e,t)));function b(e,t){return"link"===e.type?g(e.href,t):"category"===e.type&&(g(e.href,t)||y(e.items,t))}function v(e,t){switch(e.type){case"category":return b(e,t)||e.items.some((e=>v(e,t)));case"link":return!e.unlisted||b(e,t);default:return!0}}function w(e,t){return(0,r.useMemo)((()=>e.filter((e=>v(e,t)))),[e,t])}function S(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const o=[];return function e(t){for(const a of t)if("category"===a.type&&((0,d.ys)(a.href,n)||e(a.items))||"link"===a.type&&(0,d.ys)(a.href,n)){return r&&"category"!==a.type||o.unshift(a),!0}return!1}(t),o}function k(){const e=(0,u.t)(),{pathname:t}=(0,o.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?S({sidebarItems:e.items,pathname:t}):null}function x(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,l.g1)(e),o=(0,i.r7)(e);return(0,r.useMemo)((()=>c([t,n,o].filter(Boolean))),[t,n,o])}function _(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function E(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${c(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function O(e){let{route:t}=e;const n=(0,o.zy)(),r=(0,s.r)(),i=t.routes,l=i.find((e=>(0,o.B6)(n.pathname,e)));if(!l)return null;const u=l.sidebar,c=u?r.docsSidebars[u]:void 0;return{docElement:(0,a.v)(i),sidebarName:u,sidebarItems:c}}function C(e){return e.filter((e=>!("category"===e.type||"link"===e.type)||!!m(e)))}},9817:(e,t,n)=>{"use strict";n.d(t,{e3:()=>p,be:()=>d,Jx:()=>m});var r=n(6540),o=n(5066),a=n(1141),i=n(3363);function l(){const e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(8180),u=n(7639);var c=n(4848);function d(e){let{title:t,description:n,keywords:r,image:o,children:i}=e;const l=function(e){const{siteConfig:t}=(0,u.A)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,s.h)(),f=o?d(o,{absolute:!0}):void 0;return(0,c.jsxs)(a.A,{children:[t&&(0,c.jsx)("title",{children:l}),t&&(0,c.jsx)("meta",{property:"og:title",content:l}),n&&(0,c.jsx)("meta",{name:"description",content:n}),n&&(0,c.jsx)("meta",{property:"og:description",content:n}),r&&(0,c.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),f&&(0,c.jsx)("meta",{property:"og:image",content:f}),f&&(0,c.jsx)("meta",{name:"twitter:image",content:f}),i]})}const f=r.createContext(void 0);function p(e){let{className:t,children:n}=e;const i=r.useContext(f),l=(0,o.A)(i,t);return(0,c.jsxs)(f.Provider,{value:l,children:[(0,c.jsx)(a.A,{children:(0,c.jsx)("html",{className:l})}),n]})}function m(e){let{children:t}=e;const n=l(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const a=`plugin-id-${n.plugin.id}`;return(0,c.jsx)(p,{className:(0,o.A)(r,a),children:t})}},4799:(e,t,n)=>{"use strict";n.d(t,{Be:()=>u,ZC:()=>l,_q:()=>i,dV:()=>s,fM:()=>c});var r=n(6540),o=n(6494),a=n(4848);function i(e){const t=(0,r.useRef)(e);return(0,o.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function l(e){const t=(0,r.useRef)();return(0,o.A)((()=>{t.current=e})),t.current}class s extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function u(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function c(e){return t=>{let{children:n}=t;return(0,a.jsx)(a.Fragment,{children:e.reduceRight(((e,t)=>(0,a.jsx)(t,{children:e})),n)})}}},260:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>l,ys:()=>i});var r=n(6540),o=n(2413),a=n(7639);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function l(){const{baseUrl:e}=(0,a.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function o(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(o).flatMap((e=>e.routes??[])))}(n)}({routes:o.A,baseUrl:e})),[e])}},4245:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,gk:()=>p});var r=n(6540),o=n(1712),a=n(1062),i=(n(6494),n(4799)),l=n(4848);const s=r.createContext(void 0);function u(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,l.jsx)(s.Provider,{value:n,children:t})}function c(){const e=(0,r.useContext)(s);if(null==e)throw new i.dV("ScrollControllerProvider");return e}const d=()=>o.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function f(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=c(),o=(0,r.useRef)(d()),a=(0,i._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=d();a(e,o.current),o.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[a,n,...t])}function p(){const e=(0,r.useRef)(null),t=(0,a.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const o=document.documentElement.scrollTop;(n&&o>e||!n&&ot&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},1482:(e,t,n)=>{"use strict";n.d(t,{Cy:()=>i,af:()=>s,tU:()=>l});var r=n(9802),o=n(7639),a=n(2780);const i="default";function l(e,t){return`docs-${e}-${t}`}function s(){const{i18n:e}=(0,o.A)(),t=(0,r.Gy)(),n=(0,r.gk)(),s=(0,a.XK)();const u=[i,...Object.keys(t).map((function(e){const r=n?.activePlugin.pluginId===e?n.activeVersion:void 0,o=s[e],a=t[e].versions.find((e=>e.isLast));return l(e,(r??o??a).name)}))];return{locale:e.currentLocale,tags:u}}},1269:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>s});n(6540);const r="localStorage";function o(e){let{key:t,oldValue:n,newValue:r,storage:o}=e;if(n===r)return;const a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,o),window.dispatchEvent(a)}function a(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,i||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),i=!0),null}var t}let i=!1;const l={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function s(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(e);const n=a(t?.persistence);return null===n?l:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),o({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),o({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}},2098:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(7639),o=n(6347),a=n(4609);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:l}}=(0,r.A)(),{pathname:s}=(0,o.zy)(),u=(0,a.applyTrailingSlash)(s,{trailingSlash:n,baseUrl:e}),c=l===i?e:e.replace(`/${l}/`,"/"),d=u.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${c}`:`${c}${e}/`}(n)}${d}`}}}},4067:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(6540),o=n(6347),a=n(4799);function i(e){const t=(0,o.zy)(),n=(0,a.ZC)(t),i=(0,a._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6957:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(7639);function o(){return(0,r.A)().siteConfig.themeConfig}},4356:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[o]=e.split(/[#?]/),a="/"===o||o===r?o:(i=o,n?function(e){return e.endsWith("/")?e:`${e}/`}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));var i;return e.replace(o,a)}},8274:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t,...e(t.cause)]:[t]}},4609:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var o=n(4356);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(o).default}});var a=n(8274);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return a.getErrorCausalChain}})},1513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>w,TM:()=>O,yJ:()=>p,sC:()=>P,AO:()=>f});var r=n(8168);function o(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,o=e.length;r=0;f--){var p=i[f];"."===p?a(i,f):".."===p?(a(i,f),d++):d&&(a(i,f),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&o(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(1561);function s(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function p(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.A)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=p(e,t,h(),w.location);c.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(4363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=p(n);o&&o!==m&&e(t,o,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=s(t),h=s(n),g=0;g{"use strict";e.exports=function(e,t,n,r,o,a,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,l],c=0;(s=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},689:function(e){e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=o,this.iframesTimeout=a}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(t){var n=e.filter((function(e){return e.contains(t)})).length>0;-1!==e.indexOf(t)||n||e.push(t)})),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var o=e.contentWindow;if(r=o.document,!o||!r)throw new Error("iframe inaccessible")}catch(a){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,o=!1,a=null,i=function i(){if(!o){o=!0,clearTimeout(a);try{r.isIframeBlank(e)||(e.removeEventListener("load",i),r.getIframeContents(e,t,n))}catch(l){n()}}};e.addEventListener("load",i),a=setTimeout(i,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(r){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,(function(){return!0}),(function(e){r++,n.waitForIframes(e.querySelector("html"),(function(){--r||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,n,r){var o=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=t.querySelectorAll("iframe"),l=i.length,s=0;i=Array.prototype.slice.call(i);var u=function(){--l<=0&&a(s)};l||u(),i.forEach((function(t){e.matches(t,o.exclude)?u():o.onIframeReady(t,(function(e){n(t)&&(s++,r(e)),u()}),u)}))}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var o=!1,a=!1;return r.forEach((function(e,t){e.val===n&&(o=t,a=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==o||a?!1===o||a||(r[o].handled=!0):r.push({val:n,handled:!0}),!0):(!1===o&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var o=this;e.forEach((function(e){e.handled||o.getIframeContents(e.val,(function(e){o.createInstanceOnIframe(e).forEachNode(t,n,r)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,r,o){for(var a=this,i=this.createIterator(t,e,r),l=[],s=[],u=void 0,c=void 0,d=function(){var e=a.getIteratorNode(i);return c=e.prevNode,u=e.node};d();)this.iframes&&this.forEachIframe(t,(function(e){return a.checkIframeFilter(u,c,e,l)}),(function(t){a.createInstanceOnIframe(t).forEachNode(e,(function(e){return s.push(e)}),r)})),s.push(u);s.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(l,e,n,r),o()}},{key:"forEachNode",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=this.getContexts(),i=a.length;i||o(),a.forEach((function(a){var l=function(){r.iterateThroughNodes(e,a,t,n,(function(){--i<=0&&o()}))};r.iframes?r.waitForIframes(a,l):l()}))}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var o=!1;return n.every((function(t){return!r.call(e,t)||(o=!0,!1)})),o}return!1}}]),e}(),a=function(){function a(e){t(this,a),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(a,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var o in t)if(t.hasOwnProperty(o)){var a=t[o],i="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o),l="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(a):this.escapeStr(a);""!==i&&""!==l&&(e=e.replace(new RegExp("("+this.escapeStr(i)+"|"+this.escapeStr(l)+")","gm"+n),r+"("+this.processSynomyms(i)+"|"+this.processSynomyms(l)+")"+r))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,(function(e){return"\\"===e.charAt(0)?"?":"\x01"}))).replace(/(?:\\)*\*/g,(function(e){return"\\"===e.charAt(0)?"*":"\x02"}))}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,(function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"}))}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105","A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010d","C\xc7\u0106\u010c","d\u0111\u010f","D\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119","E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012b","I\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142","L\u0141","n\xf1\u0148\u0144","N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014d","O\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159","R\u0158","s\u0161\u015b\u0219\u015f","S\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163","T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016b","U\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xff","Y\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017a","Z\u017d\u017b\u0179"]:["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010dC\xc7\u0106\u010c","d\u0111\u010fD\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012bI\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142L\u0141","n\xf1\u0148\u0144N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014dO\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159R\u0158","s\u0161\u015b\u0219\u015fS\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016bU\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xffY\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017aZ\u017d\u017b\u0179"],r=[];return e.split("").forEach((function(o){n.every((function(n){if(-1!==n.indexOf(o)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0}))})),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\xa1\xbf",r=this.opt.accuracy,o="string"==typeof r?r:r.value,a="string"==typeof r?[]:r.limiters,i="";switch(a.forEach((function(e){i+="|"+t.escapeStr(e)})),o){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(i="\\s"+(i||this.escapeStr(n)))+"]*"+e+"[^"+i+"]*)";case"exactly":return"(^|\\s"+i+")("+e+")(?=$|\\s"+i+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach((function(e){t.opt.separateWordSearch?e.split(" ").forEach((function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)})):e.trim()&&-1===n.indexOf(e)&&n.push(e)})),{keywords:n.sort((function(e,t){return t.length-e.length})),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var o=t.callNoMatchOnInvalidRanges(e,r),a=o.start,i=o.end;o.valid&&(e.start=a,e.length=i-a,n.push(e),r=i)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,o=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?o=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:o}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,o=!0,a=n.length,i=t-a,l=parseInt(e.start,10)-i;return(r=(l=l>a?a:l)+parseInt(e.length,10))>a&&(r=a,this.log("End range automatically set to the max value of "+a)),l<0||r-l<0||l>a||r>a?(o=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(l,r).replace(/\s+/g,"")&&(o=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:l,end:r,valid:o}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})}),(function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){e({value:n,nodes:r})}))}},{key:"matchesExclude",value:function(e){return o.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",o=e.splitText(t),a=o.splitText(n-t),i=document.createElement(r);return i.setAttribute("data-markjs","true"),this.opt.className&&i.setAttribute("class",this.opt.className),i.textContent=o.textContent,o.parentNode.replaceChild(i,o),a}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,o){var a=this;e.nodes.every((function(i,l){var s=e.nodes[l+1];if(void 0===s||s.start>t){if(!r(i.node))return!1;var u=t-i.start,c=(n>i.end?i.end:n)-i.start,d=e.value.substr(0,i.start),f=e.value.substr(c+i.start);if(i.node=a.wrapRangeInTextNode(i.node,u,c),e.value=d+f,e.nodes.forEach((function(t,n){n>=l&&(e.nodes[n].start>0&&n!==l&&(e.nodes[n].start-=c),e.nodes[n].end-=c)})),n-=c,o(i.node.previousSibling,i.start),!(n>i.end))return!1;t=i.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,r,o){var a=this,i=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var o=void 0;null!==(o=e.exec(t.textContent))&&""!==o[i];)if(n(o[i],t)){var l=o.index;if(0!==i)for(var s=1;s{"use strict";n.r(t)},8252:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,o;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),u=a.querySelector(r.barSelector),c=r.speed,d=r.easing;return a.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){s(a,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),l=e?"-100":a(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&p(o),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},5302:(e,t,n)=>{var r=n(4634);e.exports=p,e.exports.parse=a,e.exports.compile=function(e,t){return l(a(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=f;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,i=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var d=n[0],f=n[1],p=n.index;if(l+=e.slice(i,p),i=p+d.length,f)l+=f[1];else{var m=e[i],h=n[2],g=n[3],y=n[4],b=n[5],v=n[6],w=n[7];l&&(r.push(l),l="");var S=null!=h&&null!=m&&m!==h,k="+"===v||"*"===v,x="?"===v||"*"===v,_=n[2]||c,E=y||b;r.push({name:g||a++,prefix:h||"",delimiter:_,optional:x,repeat:k,partial:S,asterisk:!!w,pattern:E?u(E):w?".*":"[^"+s(_)+"]+?"})}}return i{!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(Prism)},9700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,l=i.length;-1!==n.code.indexOf(o=t(r,l));)++l;return i[l]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=a.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=a[o],d=n.tokenStack[c],f="string"==typeof u?u:u.content,p=t(r,c),m=f.indexOf(p);if(m>-1){++o;var h=f.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=f.substring(m+p.length),b=[];h&&b.push.apply(b,i([h])),b.push(g),y&&b.push.apply(b,i([y])),"string"==typeof u?l.splice.apply(l,[s,1].concat(b)):u.content=b}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(Prism)},905:()=>{!function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}(Prism)},4793:()=>{Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift}))},6719:(e,t,n)=>{var r={"./prism-kotlin":9913,"./prism-powershell":905,"./prism-swift":4793};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=6719},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),o=n(9982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n