diff --git a/versions/beta/404.html b/versions/beta/404.html index 987e1db6b..08cb78077 100644 --- a/versions/beta/404.html +++ b/versions/beta/404.html @@ -4,13 +4,13 @@ Page Not Found | mongodb-memory-server - - + +
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.

- - + + \ No newline at end of file diff --git a/versions/beta/assets/js/088ea2b2.9727c4b6.js b/versions/beta/assets/js/088ea2b2.9727c4b6.js deleted file mode 100644 index 2e930885c..000000000 --- a/versions/beta/assets/js/088ea2b2.9727c4b6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[990],{3905:function(e,t,n){n.d(t,{Zo:function(){return l},kt:function(){return y}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(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 i(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 m=r.createContext({}),u=function(e){var t=r.useContext(m),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},l=function(e){var t=u(e.components);return r.createElement(m.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,m=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),p=u(n),d=o,y=p["".concat(m,".").concat(d)]||p[d]||c[d]||a;return n?r.createElement(y,i(i({ref:t},l),{},{components:n})):r.createElement(y,i({ref:t},l))}));function y(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var s={};for(var m in t)hasOwnProperty.call(t,m)&&(s[m]=t[m]);s.originalType=e,s[p]="string"==typeof e?e:o,i[1]=s;for(var u=2;u=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 m=r.createContext({}),u=function(e){var t=r.useContext(m),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},l=function(e){var t=u(e.components);return r.createElement(m.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,m=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),p=u(n),d=o,y=p["".concat(m,".").concat(d)]||p[d]||c[d]||a;return n?r.createElement(y,i(i({ref:t},l),{},{components:n})):r.createElement(y,i({ref:t},l))}));function y(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var s={};for(var m in t)hasOwnProperty.call(t,m)&&(s[m]=t[m]);s.originalType=e,s[p]="string"==typeof e?e:o,i[1]=s;for(var u=2;u=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 s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),c=l(n),f=o,d=c["".concat(s,".").concat(f)]||c[f]||u[f]||a;return n?r.createElement(d,i(i({ref:t},m),{},{components:n})):r.createElement(d,i({ref:t},m))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=f;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[c]="string"==typeof e?e:o,i[1]=p;for(var l=2;l=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 s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),c=l(n),f=o,d=c["".concat(s,".").concat(f)]||c[f]||u[f]||a;return n?r.createElement(d,i(i({ref:t},m),{},{components:n})):r.createElement(d,i({ref:t},m))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=f;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[c]="string"==typeof e?e:o,i[1]=p;for(var l=2;l=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=o.createContext({}),d=function(e){var n=o.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=d(e.components);return o.createElement(s.Provider,{value:n},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},c=o.forwardRef((function(e,n){var t=e.components,a=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),m=d(t),c=a,h=m["".concat(s,".").concat(c)]||m[c]||u[c]||r;return t?o.createElement(h,i(i({ref:n},p),{},{components:t})):o.createElement(h,i({ref:n},p))}));function h(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var r=t.length,i=new Array(r);i[0]=c;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[m]="string"==typeof e?e:a,i[1]=l;for(var d=2;d14",id:"minimal-nodejs-version-is-now-14",level:3},{value:"Mongodb Driver Version upgraded to 5.x",id:"mongodb-driver-version-upgraded-to-5x",level:3},{value:"Default binary version is now 6.x",id:"default-binary-version-is-now-6x",level:3},{value:"Removed platform translations",id:"removed-platform-translations",level:3},{value:"Removed architectures",id:"removed-architectures",level:3},{value:"MongoMemoryServer instance.auth option is now ignored",id:"mongomemoryserver-instanceauth-option-is-now-ignored",level:3},{value:"AutomaticAuth changes",id:"automaticauth-changes",level:3},{value:"MongoMemoryServer and MongoReplSet .cleanup(boolean) and .stop(boolean) have been removed",id:"mongomemoryserver-and-mongoreplset-cleanupboolean-and-stopboolean-have-been-removed",level:3},{value:"MD5_CHECK is now enabled by default",id:"md5_check-is-now-enabled-by-default",level:3},{value:"Merged Error types",id:"merged-error-types",level:3},{value:"Removed Storage engine devnull and mmapv1",id:"removed-storage-engine-devnull-and-mmapv1",level:3},{value:"Linux fallback binary has been removed",id:"linux-fallback-binary-has-been-removed",level:3},{value:"Ubuntu fallback year has been updated",id:"ubuntu-fallback-year-has-been-updated",level:3},{value:"Non-Breaking changes / Additions",id:"non-breaking-changes--additions",level:2},{value:"Compiler target is now es2019",id:"compiler-target-is-now-es2019",level:3},{value:"Crypto function have been changed to use nodejs internals",id:"crypto-function-have-been-changed-to-use-nodejs-internals",level:2},{value:"Binary childprocess is now also .unref()",id:"binary-childprocess-is-now-also-unref",level:2},{value:"The port testing package has been replaced",id:"the-port-testing-package-has-been-replaced",level:2},{value:"Mongodb version 7.0.0 is now supported",id:"mongodb-version-700-is-now-supported",level:2}],u={toc:m},c="wrapper";function h(e){var n=e.components,t=(0,a.Z)(e,i);return(0,r.kt)(c,(0,o.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Here are the Important changes made for 9.0.0"),(0,r.kt)("admonition",{title:"Important, Read this first",type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"This Guide is written for migration from version ",(0,r.kt)("inlineCode",{parentName:"p"},"8.16.0")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"9.0.0"),", for versions ",(0,r.kt)("inlineCode",{parentName:"p"},">9.0.0 <10.0.0"),", please consult the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/nodkz/mongodb-memory-server/blob/master/CHANGELOG.md"},"CHANGELOG"))),(0,r.kt)("h2",{id:"breaking-changes"},"Breaking Changes"),(0,r.kt)("h3",{id:"minimal-nodejs-version-is-now-14"},"Minimal NodeJS version is now ",(0,r.kt)("inlineCode",{parentName:"h3"},"14")),(0,r.kt)("p",null,"With 9.0.0 the minimal nodejs required is ",(0,r.kt)("inlineCode",{parentName:"p"},"14.20.1"),"."),(0,r.kt)("h3",{id:"mongodb-driver-version-upgraded-to-5x"},"Mongodb Driver Version upgraded to 5.x"),(0,r.kt)("p",null,"The used MongoDB Driver version is now ",(0,r.kt)("inlineCode",{parentName:"p"},"5.9.0"),"."),(0,r.kt)("h3",{id:"default-binary-version-is-now-6x"},"Default binary version is now 6.x"),(0,r.kt)("p",null,"The default binary version has been upgraded from ",(0,r.kt)("inlineCode",{parentName:"p"},"5.0.x")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"6.0.x"),". For more specifics see ",(0,r.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/guides/mongodb-server-versions"},"mongodb-server-versions"),"."),(0,r.kt)("h3",{id:"removed-platform-translations"},"Removed platform translations"),(0,r.kt)("p",null,"Some platform translations have been removed, because they are either not needed anymore or werent properly supported in the first place:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"sunos")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"linux")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"elementary OS")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"linux"))),(0,r.kt)("h3",{id:"removed-architectures"},"Removed architectures"),(0,r.kt)("p",null,"Some architectures were removed because they were not being build by mongodb anymore and support in mongodb-memory-server has been largely untested:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ia32")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"i686")," / ",(0,r.kt)("inlineCode",{parentName:"li"},"i386"))),(0,r.kt)("h3",{id:"mongomemoryserver-instanceauth-option-is-now-ignored"},"MongoMemoryServer ",(0,r.kt)("inlineCode",{parentName:"h3"},"instance.auth")," option is now ignored"),(0,r.kt)("p",null,"With 9.0.0 the option ",(0,r.kt)("inlineCode",{parentName:"p"},"instance.auth")," option is going to be ignored, because its set via the (top-level) ",(0,r.kt)("inlineCode",{parentName:"p"},"auth")," option directly."),(0,r.kt)("p",null,"Example:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"new MongoMemoryServer({ instance: { auth: true } })")," is going to be ignored, use ",(0,r.kt)("inlineCode",{parentName:"p"},"new MongoMemoryServer({ auth: { enable: true } })")),(0,r.kt)("h3",{id:"automaticauth-changes"},(0,r.kt)("inlineCode",{parentName:"h3"},"AutomaticAuth")," changes"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"AutomaticAuth")," has been changed to ",(0,r.kt)("strong",{parentName:"p"},"not")," be enabled anymore by just having a empty object. Also property ",(0,r.kt)("inlineCode",{parentName:"p"},"disable")," has been removed and ",(0,r.kt)("inlineCode",{parentName:"p"},"enable")," has been added."),(0,r.kt)("p",null,"Replace ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: {}")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: { enable: true }"),".",(0,r.kt)("br",{parentName:"p"}),"\n","Replace ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: { disable: true }")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: { enable: false }"),".",(0,r.kt)("br",{parentName:"p"}),"\n","Replace ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: { disable: false }")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: { enable: true }"),". "),(0,r.kt)("h3",{id:"mongomemoryserver-and-mongoreplset-cleanupboolean-and-stopboolean-have-been-removed"},"MongoMemoryServer and MongoReplSet ",(0,r.kt)("inlineCode",{parentName:"h3"},".cleanup(boolean)")," and ",(0,r.kt)("inlineCode",{parentName:"h3"},".stop(boolean)")," have been removed"),(0,r.kt)("p",null,"Previously ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," was the only option for the ",(0,r.kt)("inlineCode",{parentName:"p"},".cleanup")," and ",(0,r.kt)("inlineCode",{parentName:"p"},".stop")," function, but they behaved differently between those 2 function and were replaced with ",(0,r.kt)("inlineCode",{parentName:"p"},"Cleanup")," object-options and now have been completely removed."),(0,r.kt)("p",null,"Replace ",(0,r.kt)("inlineCode",{parentName:"p"},".stop(true)")," with ",(0,r.kt)("inlineCode",{parentName:"p"},".stop({ doCleanup: true })"),".",(0,r.kt)("br",{parentName:"p"}),"\n","Replace ",(0,r.kt)("inlineCode",{parentName:"p"},".cleanup(true)")," with ",(0,r.kt)("inlineCode",{parentName:"p"},".stop({ doCleanup: true, force: true })"),". "),(0,r.kt)("p",null,"Default is still for both ",(0,r.kt)("inlineCode",{parentName:"p"},"{ doCleanup: true, force: false }"),"."),(0,r.kt)("h3",{id:"md5_check-is-now-enabled-by-default"},(0,r.kt)("inlineCode",{parentName:"h3"},"MD5_CHECK")," is now enabled by default"),(0,r.kt)("p",null,"The config option ",(0,r.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#md5_check"},(0,r.kt)("inlineCode",{parentName:"a"},"MD5_CHECK"))," has been enabled by default now, resulting in always comparing the downloaded archive with a md5 after a download."),(0,r.kt)("h3",{id:"merged-error-types"},"Merged Error types"),(0,r.kt)("p",null,"Some error classes have been merged:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"EnsureInstanceError")," & ",(0,r.kt)("inlineCode",{parentName:"li"},"InstanceInfoError")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"InstanceInfoError")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"NoSystemBinaryFoundError")," & ",(0,r.kt)("inlineCode",{parentName:"li"},"BinaryNotFoundError")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"BinaryNotFoundError"))),(0,r.kt)("h3",{id:"removed-storage-engine-devnull-and-mmapv1"},"Removed Storage engine ",(0,r.kt)("inlineCode",{parentName:"h3"},"devnull")," and ",(0,r.kt)("inlineCode",{parentName:"h3"},"mmapv1")),(0,r.kt)("p",null,"Storage Engines ",(0,r.kt)("inlineCode",{parentName:"p"},"devnull")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"mmapv1")," have been removed because they are not supported in newer versions of mongodb anymore, ",(0,r.kt)("inlineCode",{parentName:"p"},"wiredTiger")," should be used instead."),(0,r.kt)("h3",{id:"linux-fallback-binary-has-been-removed"},"Linux fallback binary has been removed"),(0,r.kt)("p",null,"Previously there was a code-path for a fallback linux binary, but this has been removed because mongodb has stopped shipping generic linux binaries since versions after 4.0."),(0,r.kt)("p",null,"If a fallback is still required, try to use the ubuntu binary via ",(0,r.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#distro"},"Config Options ",(0,r.kt)("inlineCode",{parentName:"a"},"DISTRO")),"."),(0,r.kt)("h3",{id:"ubuntu-fallback-year-has-been-updated"},"Ubuntu fallback year has been updated"),(0,r.kt)("p",null,"The ubuntu fallback year has been updated to ",(0,r.kt)("inlineCode",{parentName:"p"},"22"),", instead of the previous ",(0,r.kt)("inlineCode",{parentName:"p"},"14"),", because newer versions of mongodb dont ship for any EOL ubuntu version anymore."),(0,r.kt)("p",null,"This fallback is only used if the ubuntu year could not be parsed from the os-file.",(0,r.kt)("br",{parentName:"p"}),"\n","This can also be overwritten with ",(0,r.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#distro"},"Config Option ",(0,r.kt)("inlineCode",{parentName:"a"},"DISTRO")),"."),(0,r.kt)("h2",{id:"non-breaking-changes--additions"},"Non-Breaking changes / Additions"),(0,r.kt)("h3",{id:"compiler-target-is-now-es2019"},"Compiler target is now ",(0,r.kt)("inlineCode",{parentName:"h3"},"es2019")),(0,r.kt)("p",null,"The tsconfig ",(0,r.kt)("inlineCode",{parentName:"p"},"target")," option has been updated to ",(0,r.kt)("inlineCode",{parentName:"p"},"es2019"),", which will result in less polyfills.\nThis should be a non-breaking change"),(0,r.kt)("h2",{id:"crypto-function-have-been-changed-to-use-nodejs-internals"},"Crypto function have been changed to use nodejs internals"),(0,r.kt)("p",null,"Crypto functions like for the md5 check and uuidv4 generation have been moved to use the ",(0,r.kt)("inlineCode",{parentName:"p"},"node:crypto")," support, resulting in dropping 2 dependencies."),(0,r.kt)("p",null,"Dropped dependencies are ",(0,r.kt)("inlineCode",{parentName:"p"},"md5-file")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"uuid"),"."),(0,r.kt)("h2",{id:"binary-childprocess-is-now-also-unref"},"Binary childprocess is now also ",(0,r.kt)("inlineCode",{parentName:"h2"},".unref()")),(0,r.kt)("p",null,"The Mongodb Binary childprocess is now also ",(0,r.kt)("inlineCode",{parentName:"p"},".unref()"),", like the killer process has been for some time."),(0,r.kt)("p",null,"This ",(0,r.kt)("em",{parentName:"p"},"should")," help with non-closed instances not exiting the nodejs process."),(0,r.kt)("h2",{id:"the-port-testing-package-has-been-replaced"},"The port testing package has been replaced"),(0,r.kt)("p",null,"Previously MMS used ",(0,r.kt)("inlineCode",{parentName:"p"},"get-port"),", but it caused some big memory-leakage across big projects, so it has been replaced with one that uses less maps."),(0,r.kt)("p",null,"It also has been replaced because newer versions were ESM only, but we couldnt switch to ESM yet (and using ESM in CommonJS is not a great experience)"),(0,r.kt)("h2",{id:"mongodb-version-700-is-now-supported"},"Mongodb version 7.0.0 is now supported"),(0,r.kt)("p",null,"Mongob version ",(0,r.kt)("inlineCode",{parentName:"p"},"7.0.0")," removed storage engine ",(0,r.kt)("inlineCode",{parentName:"p"},"ephemeralForTest"),", with mongodb-memory-server 9.0.0 storage engine ",(0,r.kt)("inlineCode",{parentName:"p"},"wiredTiger")," is the default for binary versions ",(0,r.kt)("inlineCode",{parentName:"p"},"7.0.0")," and higher.\nOlder versions (before ",(0,r.kt)("inlineCode",{parentName:"p"},"7.0.0"),") will still continue to use ",(0,r.kt)("inlineCode",{parentName:"p"},"ephemeralForTest")," by default."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"The version used for the decision is the version provided via the resolved ",(0,r.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#version"},(0,r.kt)("inlineCode",{parentName:"a"},"VERSION"))," config option.",(0,r.kt)("br",{parentName:"p"}),"\n","This mean it needs to match the version the system binary is (a warning is printed if they are not the same)."),(0,r.kt)("p",{parentName:"admonition"},"If the option is unset, the default version will be used, which is likely not correct for the system binary."),(0,r.kt)("p",{parentName:"admonition"},"If the decision should not be automatic, the storage engine can be explicitly defined as a instance option.")),(0,r.kt)("p",null,"It is recommended to run those instances with a db path which is equivalent to ",(0,r.kt)("a",{parentName:"p",href:"https://wiki.archlinux.org/title/tmpfs"},(0,r.kt)("inlineCode",{parentName:"a"},"tmpfs")),"."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/12f3979d.907acbf8.js b/versions/beta/assets/js/12f3979d.907acbf8.js new file mode 100644 index 000000000..6693be3a5 --- /dev/null +++ b/versions/beta/assets/js/12f3979d.907acbf8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[4313],{3905:function(e,n,t){t.d(n,{Zo:function(){return p},kt:function(){return h}});var o=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function i(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=o.createContext({}),d=function(e){var n=o.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=d(e.components);return o.createElement(s.Provider,{value:n},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},c=o.forwardRef((function(e,n){var t=e.components,a=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),m=d(t),c=a,h=m["".concat(s,".").concat(c)]||m[c]||u[c]||r;return t?o.createElement(h,i(i({ref:n},p),{},{components:t})):o.createElement(h,i({ref:n},p))}));function h(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var r=t.length,i=new Array(r);i[0]=c;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[m]="string"==typeof e?e:a,i[1]=l;for(var d=2;d14",id:"minimal-nodejs-version-is-now-14",level:3},{value:"Mongodb Driver Version upgraded to 5.x",id:"mongodb-driver-version-upgraded-to-5x",level:3},{value:"Default binary version is now 6.x",id:"default-binary-version-is-now-6x",level:3},{value:"Removed platform translations",id:"removed-platform-translations",level:3},{value:"Removed architectures",id:"removed-architectures",level:3},{value:"MongoMemoryServer instance.auth option is now ignored",id:"mongomemoryserver-instanceauth-option-is-now-ignored",level:3},{value:"AutomaticAuth changes",id:"automaticauth-changes",level:3},{value:"MongoMemoryServer and MongoReplSet .cleanup(boolean) and .stop(boolean) have been removed",id:"mongomemoryserver-and-mongoreplset-cleanupboolean-and-stopboolean-have-been-removed",level:3},{value:"MD5_CHECK is now enabled by default",id:"md5_check-is-now-enabled-by-default",level:3},{value:"Merged Error types",id:"merged-error-types",level:3},{value:"Removed Storage engine devnull and mmapv1",id:"removed-storage-engine-devnull-and-mmapv1",level:3},{value:"Linux fallback binary has been removed",id:"linux-fallback-binary-has-been-removed",level:3},{value:"Ubuntu fallback year has been updated",id:"ubuntu-fallback-year-has-been-updated",level:3},{value:"Non-Breaking changes / Additions",id:"non-breaking-changes--additions",level:2},{value:"Compiler target is now es2019",id:"compiler-target-is-now-es2019",level:3},{value:"Crypto function have been changed to use nodejs internals",id:"crypto-function-have-been-changed-to-use-nodejs-internals",level:2},{value:"Binary childprocess is now also .unref()",id:"binary-childprocess-is-now-also-unref",level:2},{value:"The port testing package has been replaced",id:"the-port-testing-package-has-been-replaced",level:2},{value:"Mongodb version 7.0.0 is now supported",id:"mongodb-version-700-is-now-supported",level:2}],u={toc:m},c="wrapper";function h(e){var n=e.components,t=(0,a.Z)(e,i);return(0,r.kt)(c,(0,o.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Here are the Important changes made for 9.0.0"),(0,r.kt)("admonition",{title:"Important, Read this first",type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"This Guide is written for migration from version ",(0,r.kt)("inlineCode",{parentName:"p"},"8.16.0")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"9.0.0"),", for versions ",(0,r.kt)("inlineCode",{parentName:"p"},">9.0.0 <10.0.0"),", please consult the ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/nodkz/mongodb-memory-server/blob/master/CHANGELOG.md"},"CHANGELOG"))),(0,r.kt)("h2",{id:"breaking-changes"},"Breaking Changes"),(0,r.kt)("h3",{id:"minimal-nodejs-version-is-now-14"},"Minimal NodeJS version is now ",(0,r.kt)("inlineCode",{parentName:"h3"},"14")),(0,r.kt)("p",null,"With 9.0.0 the minimal nodejs required is ",(0,r.kt)("inlineCode",{parentName:"p"},"14.20.1"),"."),(0,r.kt)("h3",{id:"mongodb-driver-version-upgraded-to-5x"},"Mongodb Driver Version upgraded to 5.x"),(0,r.kt)("p",null,"The used MongoDB Driver version is now ",(0,r.kt)("inlineCode",{parentName:"p"},"5.9.0"),"."),(0,r.kt)("h3",{id:"default-binary-version-is-now-6x"},"Default binary version is now 6.x"),(0,r.kt)("p",null,"The default binary version has been upgraded from ",(0,r.kt)("inlineCode",{parentName:"p"},"5.0.x")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"6.0.x"),". For more specifics see ",(0,r.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/guides/mongodb-server-versions"},"mongodb-server-versions"),"."),(0,r.kt)("h3",{id:"removed-platform-translations"},"Removed platform translations"),(0,r.kt)("p",null,"Some platform translations have been removed, because they are either not needed anymore or werent properly supported in the first place:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"sunos")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"linux")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"elementary OS")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"linux"))),(0,r.kt)("h3",{id:"removed-architectures"},"Removed architectures"),(0,r.kt)("p",null,"Some architectures were removed because they were not being build by mongodb anymore and support in mongodb-memory-server has been largely untested:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"ia32")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"i686")," / ",(0,r.kt)("inlineCode",{parentName:"li"},"i386"))),(0,r.kt)("h3",{id:"mongomemoryserver-instanceauth-option-is-now-ignored"},"MongoMemoryServer ",(0,r.kt)("inlineCode",{parentName:"h3"},"instance.auth")," option is now ignored"),(0,r.kt)("p",null,"With 9.0.0 the option ",(0,r.kt)("inlineCode",{parentName:"p"},"instance.auth")," option is going to be ignored, because its set via the (top-level) ",(0,r.kt)("inlineCode",{parentName:"p"},"auth")," option directly."),(0,r.kt)("p",null,"Example:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"new MongoMemoryServer({ instance: { auth: true } })")," is going to be ignored, use ",(0,r.kt)("inlineCode",{parentName:"p"},"new MongoMemoryServer({ auth: { enable: true } })")),(0,r.kt)("h3",{id:"automaticauth-changes"},(0,r.kt)("inlineCode",{parentName:"h3"},"AutomaticAuth")," changes"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"AutomaticAuth")," has been changed to ",(0,r.kt)("strong",{parentName:"p"},"not")," be enabled anymore by just having a empty object. Also property ",(0,r.kt)("inlineCode",{parentName:"p"},"disable")," has been removed and ",(0,r.kt)("inlineCode",{parentName:"p"},"enable")," has been added."),(0,r.kt)("p",null,"Replace ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: {}")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: { enable: true }"),".",(0,r.kt)("br",{parentName:"p"}),"\n","Replace ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: { disable: true }")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: { enable: false }"),".",(0,r.kt)("br",{parentName:"p"}),"\n","Replace ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: { disable: false }")," with ",(0,r.kt)("inlineCode",{parentName:"p"},"auth: { enable: true }"),". "),(0,r.kt)("h3",{id:"mongomemoryserver-and-mongoreplset-cleanupboolean-and-stopboolean-have-been-removed"},"MongoMemoryServer and MongoReplSet ",(0,r.kt)("inlineCode",{parentName:"h3"},".cleanup(boolean)")," and ",(0,r.kt)("inlineCode",{parentName:"h3"},".stop(boolean)")," have been removed"),(0,r.kt)("p",null,"Previously ",(0,r.kt)("inlineCode",{parentName:"p"},"boolean")," was the only option for the ",(0,r.kt)("inlineCode",{parentName:"p"},".cleanup")," and ",(0,r.kt)("inlineCode",{parentName:"p"},".stop")," function, but they behaved differently between those 2 function and were replaced with ",(0,r.kt)("inlineCode",{parentName:"p"},"Cleanup")," object-options and now have been completely removed."),(0,r.kt)("p",null,"Replace ",(0,r.kt)("inlineCode",{parentName:"p"},".stop(true)")," with ",(0,r.kt)("inlineCode",{parentName:"p"},".stop({ doCleanup: true })"),".",(0,r.kt)("br",{parentName:"p"}),"\n","Replace ",(0,r.kt)("inlineCode",{parentName:"p"},".cleanup(true)")," with ",(0,r.kt)("inlineCode",{parentName:"p"},".stop({ doCleanup: true, force: true })"),". "),(0,r.kt)("p",null,"Default is still for both ",(0,r.kt)("inlineCode",{parentName:"p"},"{ doCleanup: true, force: false }"),"."),(0,r.kt)("h3",{id:"md5_check-is-now-enabled-by-default"},(0,r.kt)("inlineCode",{parentName:"h3"},"MD5_CHECK")," is now enabled by default"),(0,r.kt)("p",null,"The config option ",(0,r.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#md5_check"},(0,r.kt)("inlineCode",{parentName:"a"},"MD5_CHECK"))," has been enabled by default now, resulting in always comparing the downloaded archive with a md5 after a download."),(0,r.kt)("h3",{id:"merged-error-types"},"Merged Error types"),(0,r.kt)("p",null,"Some error classes have been merged:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"EnsureInstanceError")," & ",(0,r.kt)("inlineCode",{parentName:"li"},"InstanceInfoError")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"InstanceInfoError")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"NoSystemBinaryFoundError")," & ",(0,r.kt)("inlineCode",{parentName:"li"},"BinaryNotFoundError")," -> ",(0,r.kt)("inlineCode",{parentName:"li"},"BinaryNotFoundError"))),(0,r.kt)("h3",{id:"removed-storage-engine-devnull-and-mmapv1"},"Removed Storage engine ",(0,r.kt)("inlineCode",{parentName:"h3"},"devnull")," and ",(0,r.kt)("inlineCode",{parentName:"h3"},"mmapv1")),(0,r.kt)("p",null,"Storage Engines ",(0,r.kt)("inlineCode",{parentName:"p"},"devnull")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"mmapv1")," have been removed because they are not supported in newer versions of mongodb anymore, ",(0,r.kt)("inlineCode",{parentName:"p"},"wiredTiger")," should be used instead."),(0,r.kt)("h3",{id:"linux-fallback-binary-has-been-removed"},"Linux fallback binary has been removed"),(0,r.kt)("p",null,"Previously there was a code-path for a fallback linux binary, but this has been removed because mongodb has stopped shipping generic linux binaries since versions after 4.0."),(0,r.kt)("p",null,"If a fallback is still required, try to use the ubuntu binary via ",(0,r.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#distro"},"Config Options ",(0,r.kt)("inlineCode",{parentName:"a"},"DISTRO")),"."),(0,r.kt)("h3",{id:"ubuntu-fallback-year-has-been-updated"},"Ubuntu fallback year has been updated"),(0,r.kt)("p",null,"The ubuntu fallback year has been updated to ",(0,r.kt)("inlineCode",{parentName:"p"},"22"),", instead of the previous ",(0,r.kt)("inlineCode",{parentName:"p"},"14"),", because newer versions of mongodb dont ship for any EOL ubuntu version anymore."),(0,r.kt)("p",null,"This fallback is only used if the ubuntu year could not be parsed from the os-file.",(0,r.kt)("br",{parentName:"p"}),"\n","This can also be overwritten with ",(0,r.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#distro"},"Config Option ",(0,r.kt)("inlineCode",{parentName:"a"},"DISTRO")),"."),(0,r.kt)("h2",{id:"non-breaking-changes--additions"},"Non-Breaking changes / Additions"),(0,r.kt)("h3",{id:"compiler-target-is-now-es2019"},"Compiler target is now ",(0,r.kt)("inlineCode",{parentName:"h3"},"es2019")),(0,r.kt)("p",null,"The tsconfig ",(0,r.kt)("inlineCode",{parentName:"p"},"target")," option has been updated to ",(0,r.kt)("inlineCode",{parentName:"p"},"es2019"),", which will result in less polyfills.\nThis should be a non-breaking change"),(0,r.kt)("h2",{id:"crypto-function-have-been-changed-to-use-nodejs-internals"},"Crypto function have been changed to use nodejs internals"),(0,r.kt)("p",null,"Crypto functions like for the md5 check and uuidv4 generation have been moved to use the ",(0,r.kt)("inlineCode",{parentName:"p"},"node:crypto")," support, resulting in dropping 2 dependencies."),(0,r.kt)("p",null,"Dropped dependencies are ",(0,r.kt)("inlineCode",{parentName:"p"},"md5-file")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"uuid"),"."),(0,r.kt)("h2",{id:"binary-childprocess-is-now-also-unref"},"Binary childprocess is now also ",(0,r.kt)("inlineCode",{parentName:"h2"},".unref()")),(0,r.kt)("p",null,"The Mongodb Binary childprocess is now also ",(0,r.kt)("inlineCode",{parentName:"p"},".unref()"),", like the killer process has been for some time."),(0,r.kt)("p",null,"This ",(0,r.kt)("em",{parentName:"p"},"should")," help with non-closed instances not exiting the nodejs process."),(0,r.kt)("h2",{id:"the-port-testing-package-has-been-replaced"},"The port testing package has been replaced"),(0,r.kt)("p",null,"Previously MMS used ",(0,r.kt)("inlineCode",{parentName:"p"},"get-port"),", but it caused some big memory-leakage across big projects, so it has been replaced with one that uses less maps."),(0,r.kt)("p",null,"It also has been replaced because newer versions were ESM only, but we couldnt switch to ESM yet (and using ESM in CommonJS is not a great experience)"),(0,r.kt)("h2",{id:"mongodb-version-700-is-now-supported"},"Mongodb version 7.0.0 is now supported"),(0,r.kt)("p",null,"Mongob version ",(0,r.kt)("inlineCode",{parentName:"p"},"7.0.0")," removed storage engine ",(0,r.kt)("inlineCode",{parentName:"p"},"ephemeralForTest"),", with mongodb-memory-server 9.0.0 storage engine ",(0,r.kt)("inlineCode",{parentName:"p"},"wiredTiger")," is the default for binary versions ",(0,r.kt)("inlineCode",{parentName:"p"},"7.0.0")," and higher.\nOlder versions (before ",(0,r.kt)("inlineCode",{parentName:"p"},"7.0.0"),") will still continue to use ",(0,r.kt)("inlineCode",{parentName:"p"},"ephemeralForTest")," by default."),(0,r.kt)("admonition",{type:"info"},(0,r.kt)("p",{parentName:"admonition"},"The version used for the decision is the version provided via the resolved ",(0,r.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#version"},(0,r.kt)("inlineCode",{parentName:"a"},"VERSION"))," config option.",(0,r.kt)("br",{parentName:"p"}),"\n","This mean it needs to match the version the system binary is (a warning is printed if they are not the same)."),(0,r.kt)("p",{parentName:"admonition"},"If the option is unset, the default version will be used, which is likely not correct for the system binary."),(0,r.kt)("p",{parentName:"admonition"},"If the decision should not be automatic, the storage engine can be explicitly defined as a instance option.")),(0,r.kt)("p",null,"It is recommended to run those instances with a db path which is equivalent to ",(0,r.kt)("a",{parentName:"p",href:"https://wiki.archlinux.org/title/tmpfs"},(0,r.kt)("inlineCode",{parentName:"a"},"tmpfs")),"."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/1426.062de0a2.js b/versions/beta/assets/js/1426.062de0a2.js new file mode 100644 index 000000000..469e63ba0 --- /dev/null +++ b/versions/beta/assets/js/1426.062de0a2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[1426],{1426:function(e,t,r){function n(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t=3||2===r&&n>=4||1===r&&n>=10);function i(t,r,n){if(o&&void 0!==n){var i=n[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(p(r),[{headers:a}]))}else e.apply(void 0,[t].concat(p(r)))}return{init:function(t,r){e("init",{appId:t,apiKey:r})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDsAfterSearch",g(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDs",g(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["clickedFilters"].concat(r))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDsAfterSearch",g(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDs",g(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["convertedFilters"].concat(r))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&t.reduce((function(e,t){var r=t.items,n=d(t,f);return[].concat(p(e),p(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n0&&e.apply(void 0,["viewedFilters"].concat(r))}}}function S(e){var t=e.items.reduce((function(e,t){var r;return e[t.__autocomplete_indexName]=(null!==(r=e[t.__autocomplete_indexName])&&void 0!==r?r:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function j(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function w(e){return w="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},w(e)}function E(e){return function(e){if(Array.isArray(e))return P(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 P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(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 P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&C({onItemsChange:o,items:r,insights:f,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,r=e.onSelect,n=e.onActive;s("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:f}}),r((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&u({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Selected"},c({item:t,items:m.current}))]})})),n((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&l({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Active"},c({item:t,items:m.current}))]})}))},onStateChange:function(e){var t=e.state;p({state:t})},__autocomplete_pluginOptions:e}}function N(e){return N="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},N(e)}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==N(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===N(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e,t,r){var n,o=t.initialState;return{getState:function(){return o},dispatch:function(n,i){var a=function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0},reshape:function(e){return e.sources}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(V++),plugins:o,initialState:X({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(Q(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var r=[];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,r.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));r.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:a,onResolve:a};Object.keys(t).forEach((function(e){t[e].__default=!0}));var n=$($({},t),e);return Promise.resolve(n)})))}))}(e,r)}))).then((function(e){return L(e)})).then((function(e){return e.map((function(e){return X(X({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onActive:function(r){e.onActive(r),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,r)}))},onResolve:function(r){e.onResolve(r),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:X({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}function te(e){return te="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},te(e)}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ie,De,Ae,ke=null,xe=(Ie=-1,De=-1,Ae=void 0,function(e){var t=++Ie;return Promise.resolve(e).then((function(e){return Ae&&t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Me=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function He(e){return He="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},He(e)}var Fe=["props","refresh","store"],Ue=["inputElement","formElement","panelElement"],Be=["inputElement"],Ve=["inputElement","maxLength"],Ke=["sourceIndex"],$e=["sourceIndex"],Je=["item","source","sourceIndex"];function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ge(e){var t=e.props,r=e.refresh,n=e.store,o=Ze(e,Fe),i=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var r=e.inputElement,o=e.formElement,i=e.panelElement;function a(e){!n.getState().isOpen&&n.pendingRequests.isEmpty()||e.target===r||!1===[o,i].some((function(t){return r=t,n=e.target,r===n||r.contains(n);var r,n}))&&(n.dispatch("blur",null),t.debug||n.pendingRequests.cancelAll())}return We({onTouchStart:a,onMouseDown:a,onTouchMove:function(e){!1!==n.getState().isOpen&&r===t.environment.document.activeElement&&e.target!==r&&r.blur()}},Ze(e,Ue))},getRootProps:function(e){return We({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return We({action:"",noValidate:!0,role:"search",onSubmit:function(i){var a;i.preventDefault(),t.onSubmit(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(a=e.inputElement)||void 0===a||a.blur()},onReset:function(i){var a;i.preventDefault(),t.onReset(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(a=e.inputElement)||void 0===a||a.focus()}},Ze(e,Be))},getLabelProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,Ke);return We({htmlFor:"".concat(i(t.id,n),"-input"),id:"".concat(i(t.id,n),"-label")},o)},getInputProps:function(e){var i;function c(e){(t.openOnFocus||Boolean(n.getState().query))&&Ce(We({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var u=e||{},l=(u.inputElement,u.maxLength),s=void 0===l?512:l,f=Ze(u,Ve),m=ge(n.getState()),p=function(e){return Boolean(e&&e.match(Me))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),v=null!=m&&m.itemUrl&&!p?"go":"search";return We({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().activeItemId?"".concat(t.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:v,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:s,type:"search",onChange:function(e){Ce(We({event:e,props:t,query:e.currentTarget.value.slice(0,s),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,i=Le(e,Ne);if("ArrowUp"===t.key||"ArrowDown"===t.key){var a=function(){var e=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},c=function(){var e=ge(o.getState());if(null!==o.getState().activeItemId&&e){var r=e.item,a=e.itemInputValue,c=e.itemUrl,u=e.source;u.onActive(qe({event:t,item:r,itemInputValue:a,itemUrl:c,refresh:n,source:u,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(r.openOnFocus||Boolean(o.getState().query))?Ce(qe({event:t,props:r,query:o.getState().query,refresh:n,store:o},i)).then((function(){o.dispatch(t.key,{nextActiveItemId:r.defaultActiveItemId}),c(),setTimeout(a,0)})):(o.dispatch(t.key,{}),c(),a())}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(r.debug||o.pendingRequests.cancelAll());t.preventDefault();var u=ge(o.getState()),l=u.item,s=u.itemInputValue,f=u.itemUrl,m=u.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(m.onSelect(qe({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewTab({itemUrl:f,item:l,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(m.onSelect(qe({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewWindow({itemUrl:f,item:l,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return m.onSelect(qe({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),void r.navigator.navigate({itemUrl:f,item:l,state:o.getState()});Ce(qe({event:t,nextState:{isOpen:!1},props:r,query:s,refresh:n,store:o},i)).then((function(){m.onSelect(qe({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i))}))}}}(We({event:e,props:t,refresh:r,store:n},o))},onFocus:c,onBlur:a,onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||c(r)}},f)},getPanelProps:function(e){return We({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,$e);return We({role:"listbox","aria-labelledby":"".concat(i(t.id,n),"-label"),id:"".concat(i(t.id,n),"-list")},o)},getItemProps:function(e){var a=e.item,c=e.source,u=e.sourceIndex,l=Ze(e,Je);return We({id:"".concat(i(t.id,u),"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=ge(n.getState());if(null!==n.getState().activeItemId&&t){var i=t.item,c=t.itemInputValue,u=t.itemUrl,l=t.source;l.onActive(We({event:e,item:i,itemInputValue:c,itemUrl:u,refresh:r,source:l,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),u=c.getItemUrl({item:a,state:n.getState()});(u?Promise.resolve():Ce(We({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(We({event:e,item:a,itemInputValue:i,itemUrl:u,refresh:r,source:c,state:n.getState()},o))}))}},l)}}}var Xe=[{segment:"autocomplete-core",version:"1.9.3"}];function Ye(e){return Ye="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},Ye(e)}function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t=r?null===n?null:0:o}function at(e){return at="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},at(e)}function ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ut(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kt(e){var t=e.translations,r=void 0===t?{}:t,n=At(e,Pt),o=r.noResultsText,i=void 0===o?"No results for":o,a=r.suggestedQueryText,c=void 0===a?"Try searching for":a,u=r.reportMissingResultsText,l=void 0===u?"Believe this query should return results?":u,s=r.reportMissingResultsLinkText,f=void 0===s?"Let us know.":s,m=n.state.context.searchSuggestions;return yt.createElement("div",{className:"DocSearch-NoResults"},yt.createElement("div",{className:"DocSearch-Screen-Icon"},yt.createElement(Et,null)),yt.createElement("p",{className:"DocSearch-Title"},i,' "',yt.createElement("strong",null,n.state.query),'"'),m&&m.length>0&&yt.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},yt.createElement("p",{className:"DocSearch-Help"},c,":"),yt.createElement("ul",null,m.slice(0,3).reduce((function(e,t){return[].concat(It(e),[yt.createElement("li",{key:t},yt.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){n.setQuery(t.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},t))])}),[]))),n.getMissingResultsUrl&&yt.createElement("p",{className:"DocSearch-Help"},"".concat(l," "),yt.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var xt=function(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Ct(e){switch(e.type){case"lvl1":return yt.createElement(xt,null);case"content":return yt.createElement(Nt,null);default:return yt.createElement(_t,null)}}function _t(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Nt(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Tt(){return yt.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},yt.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),yt.createElement("path",{d:"M8 17l-6-6 6-6"})))}var qt=["hit","attribute","tagName"];function Rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ft(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function Ut(e){var t=e.hit,r=e.attribute,n=e.tagName,o=void 0===n?"span":n,i=Ht(e,qt);return(0,yt.createElement)(o,Lt(Lt({},i),{},{dangerouslySetInnerHTML:{__html:Ft(t,"_snippetResult.".concat(r,".value"))||Ft(t,r)}}))}function Bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r|<\/mark>)/g,Wt=RegExp(zt.source);function Qt(e){var t,r,n=e;if(!n.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=((n.__docsearch_parent?null===(t=n.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(r=e._highlightResult)||void 0===r||null===(r=r.hierarchy)||void 0===r?void 0:r.lvl0)||{}).value;return o&&Wt.test(o)?o.replace(zt,""):o}function Zt(){return Zt=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function or(e){var t=e.translations,r=void 0===t?{}:t,n=nr(e,tr),o=r.recentSearchesTitle,i=void 0===o?"Recent":o,a=r.noRecentSearchesText,c=void 0===a?"No recent searches":a,u=r.saveRecentSearchButtonTitle,l=void 0===u?"Save this search":u,s=r.removeRecentSearchButtonTitle,f=void 0===s?"Remove this search from history":s,m=r.favoriteSearchesTitle,p=void 0===m?"Favorite":m,v=r.removeFavoriteSearchButtonTitle,d=void 0===v?"Remove this search from favorites":v;return"idle"===n.state.status&&!1===n.hasCollections?n.disableUserPersonalization?null:yt.createElement("div",{className:"DocSearch-StartScreen"},yt.createElement("p",{className:"DocSearch-Help"},c)):!1===n.hasCollections?null:yt.createElement("div",{className:"DocSearch-Dropdown-Container"},yt.createElement($t,rr({},n,{title:i,collection:n.state.collections[0],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Xt,null))},renderAction:function(e){var t=e.item,r=e.runFavoriteTransition,o=e.runDeleteTransition;return yt.createElement(yt.Fragment,null,yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:l,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.add(t),n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(Yt,null))),yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(er,null))))}})),yt.createElement($t,rr({},n,{title:p,collection:n.state.collections[1],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Yt,null))},renderAction:function(e){var t=e.item,r=e.runDeleteTransition;return yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:d,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.remove(t),n.refresh()}))}},yt.createElement(er,null)))}})))}var ir=["translations"];function ar(){return ar=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var ur=yt.memo((function(e){var t=e.translations,r=void 0===t?{}:t,n=cr(e,ir);if("error"===n.state.status)return yt.createElement(wt,{translations:null==r?void 0:r.errorScreen});var o=n.state.collections.some((function(e){return e.items.length>0}));return n.state.query?!1===o?yt.createElement(kt,ar({},n,{translations:null==r?void 0:r.noResultsScreen})):yt.createElement(Gt,n):yt.createElement(or,ar({},n,{hasCollections:o,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function lr(){return yt.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},yt.createElement("g",{fill:"none",fillRule:"evenodd"},yt.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},yt.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),yt.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},yt.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var sr=r(830),fr=["translations"];function mr(){return mr=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function vr(e){var t=e.translations,r=void 0===t?{}:t,n=pr(e,fr),o=r.resetButtonTitle,i=void 0===o?"Clear the query":o,a=r.resetButtonAriaLabel,c=void 0===a?"Clear the query":a,u=r.cancelButtonText,l=void 0===u?"Cancel":u,s=r.cancelButtonAriaLabel,f=void 0===s?"Cancel":s,m=n.getFormProps({inputElement:n.inputRef.current}).onReset;return yt.useEffect((function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()}),[n.autoFocus,n.inputRef]),yt.useEffect((function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()}),[n.isFromSelection,n.inputRef]),yt.createElement(yt.Fragment,null,yt.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:m},yt.createElement("label",mr({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),yt.createElement(sr.W,null)),yt.createElement("div",{className:"DocSearch-LoadingIndicator"},yt.createElement(lr,null)),yt.createElement("input",mr({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:ht}))),yt.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":c,hidden:!n.state.query},yt.createElement(er,null))),yt.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:n.onClose},l))}var dr=["_highlightResult","_snippetResult"];function yr(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hr(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function br(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=hr(t),i=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,yr(t,dr)),a=i.findIndex((function(e){return e.objectID===r.objectID}));a>-1&&i.splice(a,1),i.unshift(r),i=i.slice(0,n),o.setItem(i)},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),o.setItem(i)},getAll:function(){return i}}}function gr(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}"),i=e=>{n().setItem(t,JSON.stringify(e))};return{get(t,r,n={miss:()=>Promise.resolve()}){return Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),n=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(i(n),!t)return;const a=Object.fromEntries(Object.entries(n).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||n.miss(e)]))).then((([e])=>e))},set(e,r){return Promise.resolve().then((()=>{const i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:r},n().setItem(t,JSON.stringify(i)),r}))},delete(e){return Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))}))},clear(){return Promise.resolve().then((()=>{n().removeItem(t)}))}}}function Or(e){const t=[...e.caches],r=t.shift();return void 0===r?{get(e,t,r={miss:()=>Promise.resolve()}){return t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e))},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}:{get(e,n,o={miss:()=>Promise.resolve()}){return r.get(e,n,o).catch((()=>Or({caches:t}).get(e,n,o)))},set(e,n){return r.set(e,n).catch((()=>Or({caches:t}).set(e,n)))},delete(e){return r.delete(e).catch((()=>Or({caches:t}).delete(e)))},clear(){return r.clear().catch((()=>Or({caches:t}).clear()))}}}function Sr(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const i=JSON.stringify(r);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);const a=n(),c=o&&o.miss||(()=>Promise.resolve());return a.then((e=>c(e))).then((()=>a))},set(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}function jr(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function wr(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Er(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Pr="4.20.0",Ir={WithinQueryParameters:0,WithinHeaders:1};function Dr(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Ar={Read:1,Write:2,Any:3},kr={Up:1,Down:2,Timeouted:3},xr=12e4;function Cr(e,t=kr.Up){return{...e,status:t,lastUpdate:Date.now()}}function _r(e){return"string"==typeof e?{protocol:"https",url:e,accept:Ar.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Ar.Any}}const Nr={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};function Tr(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(Cr(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===kr.Up||Date.now()-e.lastUpdate>xr}(e))),n=e.filter((e=>function(e){return e.status===kr.Timeouted&&Date.now()-e.lastUpdate<=xr}(e))),o=[...r,...n];return{getTimeout(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:o.length>0?o.map((e=>_r(e))):t}}))}const qr=(e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&0==~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e);function Rr(e,t,r,n){const o=[],i=function(e,t){if(e.method===Nr.Get||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),a=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),c=r.method,u=r.method!==Nr.Get?{}:{...r.data,...n.data},l={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...u,...n.queryParameters};let s=0;const f=(t,u)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Fr(o)};const p={data:i,headers:a,method:c,url:Mr(m,r.path,l),connectTimeout:u(s,e.timeouts.connect),responseTimeout:u(s,n.timeout)},v=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},d={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=v(r);return r.isTimedOut&&s++,Promise.all([e.logger.info("Retryable failure",Ur(n)),e.hostsCache.set(m,Cr(m,r.isTimedOut?kr.Timeouted:kr.Down))]).then((()=>f(t,u)))},onFail(e){throw v(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,Fr(o))}};return e.requester.send(p).then((e=>qr(e,d)))};return Tr(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function Lr(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function Mr(e,t,r){const n=Hr(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function Hr(e){return Object.keys(e).map((t=>{return Er("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function Fr(e){return e.map((e=>Ur(e)))}function Ur(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const Br=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers(){return e===Ir.WithinHeaders?n:{}},queryParameters(){return e===Ir.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:Ir.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,hosts:u,queryParameters:l,headers:s}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,headers:s,queryParameters:l,hosts:u.map((e=>_r(e))),read(e,t){const r=Dr(t,f.timeouts.read),n=()=>Rr(f,f.hosts.filter((e=>0!=(e.accept&Ar.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write(e,t){return Rr(f,f.hosts.filter((e=>0!=(e.accept&Ar.Write))),e,Dr(t,f.timeouts.write))}};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Ar.Read},{url:`${t}.algolia.net`,accept:Ar.Write}].concat(jr([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),o={transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache(){return Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))}};return wr(o,e.methods)},Vr=e=>(t,r)=>t.method===Nr.Get?e.transporter.read(t,r):e.transporter.write(t,r),Kr=e=>(t,r={})=>wr({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),$r=e=>(t,r)=>{const n=t.map((e=>({...e,params:Hr(e.params||{})})));return e.transporter.read({method:Nr.Post,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},Jr=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...i}=t.params;return Kr(e)(t.indexName,{methods:{searchForFacetValues:Qr}}).searchForFacetValues(n,o,{...r,...i})}))),zr=e=>(t,r,n)=>e.transporter.read({method:Nr.Post,path:Er("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),Wr=e=>(t,r)=>e.transporter.read({method:Nr.Post,path:Er("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),Qr=e=>(t,r,n)=>e.transporter.read({method:Nr.Post,path:Er("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),Zr={Debug:1,Info:2,Error:3};function Gr(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let i;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===i&&(clearTimeout(o),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(i),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(i),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(o=Zr.Error,{debug(e,t){return Zr.Debug>=o&&console.debug(e,t),Promise.resolve()},info(e,t){return Zr.Info>=o&&console.info(e,t),Promise.resolve()},error(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:Sr(),requestsCache:Sr({serializable:!1}),hostsCache:Or({caches:[gr({key:`${Pr}-${e}`}),Sr()]}),userAgent:Lr(Pr).add({segment:"Browser",version:"lite"}),authMode:Ir.WithinQueryParameters};var o;return Br({...n,...r,methods:{search:$r,searchForFacetValues:Jr,multipleQueries:$r,multipleSearchForFacetValues:Jr,customRequest:Vr,initIndex:e=>t=>Kr(e)(t,{methods:{search:Wr,searchForFacetValues:Qr,findAnswers:zr}})}})}Gr.version=Pr;var Xr=Gr,Yr="3.5.2";function en(){}function tn(e){return e}function rn(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function nn(e,t,r){return e.reduce((function(e,n){var o=t(n);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(r||5)&&e[o].push(n),e}),{})}var on=["footer","searchBox"];function an(){return an=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function pn(e){var t=e.appId,r=e.apiKey,n=e.indexName,o=e.placeholder,i=void 0===o?"Search docs":o,a=e.searchParameters,c=e.maxResultsPerGroup,u=e.onClose,l=void 0===u?en:u,s=e.transformItems,f=void 0===s?tn:s,m=e.hitComponent,p=void 0===m?St:m,v=e.resultsFooterComponent,d=void 0===v?function(){return null}:v,y=e.navigator,h=e.initialScrollY,b=void 0===h?0:h,g=e.transformSearchClient,O=void 0===g?tn:g,S=e.disableUserPersonalization,j=void 0!==S&&S,w=e.initialQuery,E=void 0===w?"":w,P=e.translations,I=void 0===P?{}:P,D=e.getMissingResultsUrl,A=e.insights,k=void 0!==A&&A,x=I.footer,C=I.searchBox,_=mn(I,on),N=sn(yt.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),T=N[0],q=N[1],R=yt.useRef(null),L=yt.useRef(null),M=yt.useRef(null),H=yt.useRef(null),F=yt.useRef(null),U=yt.useRef(10),B=yt.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,ht):"").current,V=yt.useRef(E||B).current,K=function(e,t,r){return yt.useMemo((function(){var n=Xr(e,t);return n.addAlgoliaAgent("docsearch",Yr),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",Yr),r(n)}),[e,t,r])}(t,r,O),$=yt.useRef(br({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,J=yt.useRef(br({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:0===$.getAll().length?7:4})).current,z=yt.useCallback((function(e){if(!j){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===$.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&J.add(t)}}),[$,J,j]),W=yt.useCallback((function(e){if(T.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,r={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};T.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(r)}}),[T.context.algoliaInsightsPlugin]),Q=yt.useMemo((function(){return dt({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:V,context:{searchSuggestions:[]}},insights:k,navigator:y,onStateChange:function(e){q(e.state)},getSources:function(e){var o=e.query,i=e.state,u=e.setContext,s=e.setStatus;if(!o)return j?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),rn(r)||l()},getItemUrl:function(e){return e.item.url},getItems:function(){return J.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),rn(r)||l()},getItemUrl:function(e){return e.item.url},getItems:function(){return $.getAll()}}];var m=Boolean(k);return K.search([{query:o,indexName:n,params:un({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(U.current),"hierarchy.lvl2:".concat(U.current),"hierarchy.lvl3:".concat(U.current),"hierarchy.lvl4:".concat(U.current),"hierarchy.lvl5:".concat(U.current),"hierarchy.lvl6:".concat(U.current),"content:".concat(U.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:m},a)}]).catch((function(e){throw"RetryError"===e.name&&s("error"),e})).then((function(e){var o=e.results[0],a=o.hits,s=o.nbHits,p=nn(a,(function(e){return Qt(e)}),c);i.context.searchSuggestions.length0&&(X(),F.current&&F.current.focus())}),[V,X]),yt.useEffect((function(){function e(){if(L.current){var e=.01*window.innerHeight;L.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),yt.createElement("div",an({ref:R},G({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===T.status&&"DocSearch-Container--Stalled","error"===T.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&l()}}),yt.createElement("div",{className:"DocSearch-Modal",ref:L},yt.createElement("header",{className:"DocSearch-SearchBar",ref:M},yt.createElement(vr,an({},Q,{state:T,autoFocus:0===V.length,inputRef:F,isFromSelection:Boolean(V)&&V===B,translations:C,onClose:l}))),yt.createElement("div",{className:"DocSearch-Dropdown",ref:H},yt.createElement(ur,an({},Q,{indexName:n,state:T,hitComponent:p,resultsFooterComponent:d,disableUserPersonalization:j,recentSearches:J,favoriteSearches:$,inputRef:F,translations:_,getMissingResultsUrl:D,onItemClick:function(e,t){W(e),z(e),rn(t)||l()}}))),yt.createElement("footer",{className:"DocSearch-Footer"},yt.createElement(Ot,{translations:x}))))}}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/17896441.84566de2.js b/versions/beta/assets/js/17896441.84566de2.js new file mode 100644 index 000000000..a6784e61f --- /dev/null +++ b/versions/beta/assets/js/17896441.84566de2.js @@ -0,0 +1 @@ +(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[7918],{3905:function(e,t,n){"use strict";n.d(t,{Zo:function(){return u},kt:function(){return v}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),s=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=s(n),p=r,v=d["".concat(c,".").concat(p)]||d[p]||m[p]||o;return n?a.createElement(v,l(l({ref:t},u),{},{components:n})):a.createElement(v,l({ref:t},u))}));function v(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=p;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:r,l[1]=i;for(var s=2;s0,s=!!(t||n||o);return i||s?a.createElement("footer",{className:(0,u.Z)(y.k.docs.docFooter,"docusaurus-mt-lg")},i&&a.createElement(D,{tags:l}),s&&a.createElement(R,{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:o,formattedLastUpdatedAt:r})):null}var F=n(6043),q=n(6668),G=["parentIndex"];function Y(e){var t=e.map((function(e){return Object.assign({},e,{parentIndex:-1,children:[]})})),n=Array(7).fill(-1);t.forEach((function(e,t){var a=n.slice(2,e.level);e.parentIndex=Math.max.apply(Math,a),n[e.level]=t}));var a=[];return t.forEach((function(e){var n=e.parentIndex,r=(0,H.Z)(e,G);n>=0?t[n].children.push(r):a.push(r)})),a}function $(e){var t=e.toc,n=e.minHeadingLevel,a=e.maxHeadingLevel;return t.flatMap((function(e){var t=$({toc:e.children,minHeadingLevel:n,maxHeadingLevel:a});return function(e){return e.level>=n&&e.level<=a}(e)?[Object.assign({},e,{children:t})]:t}))}function J(e){var t=e.getBoundingClientRect();return t.top===t.bottom?J(e.parentNode):t}function Q(e,t){var n,a,r=t.anchorTopOffset,o=e.find((function(e){return J(e).top>=r}));return o?function(e){return e.top>0&&e.bottom0})).map((function(e){return[e-1,[i]]}));return{lineClassNames:Object.fromEntries(c),code:n}}if(void 0===a)return{lineClassNames:{},code:n};for(var s=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return He(["js","jsBlock"],t);case"jsx":case"tsx":return He(["js","jsBlock","jsx"],t);case"html":return He(["js","jsBlock","html"],t);case"python":case"py":case"bash":return He(["bash"],t);case"markdown":case"md":return He(["html","jsx","bash"],t);default:return He(Object.keys(Oe),t)}}(a,r),u=n.split("\n"),d=Object.fromEntries(r.map((function(e){return[e.className,{start:0,range:""}]}))),m=Object.fromEntries(r.filter((function(e){return e.line})).map((function(e){var t=e.className;return[e.line,t]}))),p=Object.fromEntries(r.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.start,t]}))),v=Object.fromEntries(r.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.end,t]}))),f=0;f0&&e[n-1]===t?e:e.concat(t)};function Ye(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}var $e=function(e){function t(){for(var t=this,n=[],a=arguments.length;a--;)n[a]=arguments[a];e.apply(this,n),Re(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?function(e,t){var n=e.plain,a=Object.create(null),r=e.styles.reduce((function(e,n){var a=n.languages,r=n.style;return a&&!a.includes(t)||n.types.forEach((function(t){var n=We({},e[t],r);e[t]=n})),e}),a);return r.root=n,r.plain=We({},n,{backgroundColor:null}),r}(e.theme,e.language):void 0;return t.themeDict=n})),Re(this,"getLineProps",(function(e){var n=e.key,a=e.className,r=e.style,o=We({},Ye(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),l=t.getThemeDict(t.props);return void 0!==l&&(o.style=l.plain),void 0!==r&&(o.style=void 0!==o.style?We({},o.style,r):r),void 0!==n&&(o.key=n),a&&(o.className+=" "+a),o})),Re(this,"getStyleForToken",(function(e){var n=e.types,a=e.empty,r=n.length,o=t.getThemeDict(t.props);if(void 0!==o){if(1===r&&"plain"===n[0])return a?{display:"inline-block"}:void 0;if(1===r&&!a)return o[n[0]];var l=a?{display:"inline-block"}:{},i=n.map((function(e){return o[e]}));return Object.assign.apply(Object,[l].concat(i))}})),Re(this,"getTokenProps",(function(e){var n=e.key,a=e.className,r=e.style,o=e.token,l=We({},Ye(e,["key","className","style","token"]),{className:"token "+o.types.join(" "),children:o.content,style:t.getStyleForToken(o),key:void 0});return void 0!==r&&(l.style=void 0!==l.style?We({},l.style,r):r),void 0!==n&&(l.key=n),a&&(l.className+=" "+a),l})),Re(this,"tokenize",(function(e,t,n,a){var r={code:t,grammar:n,language:a,tokens:[]};e.hooks.run("before-tokenize",r);var o=r.tokens=e.tokenize(r.code,r.grammar,r.language);return e.hooks.run("after-tokenize",r),o}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,a=e.code,r=e.children,o=this.getThemeDict(this.props),l=t.languages[n];return r({tokens:function(e){for(var t=[[]],n=[e],a=[0],r=[e.length],o=0,l=0,i=[],c=[i];l>-1;){for(;(o=a[l]++)0?u:["plain"],s=d):(u=Ge(u,d.type),d.alias&&(u=Ge(u,d.alias)),s=d.content),"string"==typeof s){var m=s.split(Fe),p=m.length;i.push({types:u,content:m[0]});for(var v=1;v0&&l.getRangeAt(0);a.append(r),r.select(),r.selectionStart=0,r.selectionEnd=e.length;var c=!1;try{c=document.execCommand("copy")}catch(s){}r.remove(),i&&(l.removeAllRanges(),l.addRange(i)),o&&o.focus()}(t),l(!0),i.current=window.setTimeout((function(){l(!1)}),1e3)}),[t]);return(0,a.useEffect)((function(){return function(){return window.clearTimeout(i.current)}}),[]),a.createElement("button",{type:"button","aria-label":o?(0,p.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,p.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,p.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.Z)("clean-btn",n,tt.copyButton,o&&tt.copyButtonCopied),onClick:c},a.createElement("span",{className:tt.copyButtonIcons,"aria-hidden":"true"},a.createElement(Ke,{className:tt.copyButtonIcon}),a.createElement(et,{className:tt.copyButtonSuccessIcon})))}function at(e){return a.createElement("svg",(0,m.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}))}var rt={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function ot(e){var t=e.className,n=e.onClick,r=e.isEnabled,o=(0,p.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return a.createElement("button",{type:"button",onClick:n,className:(0,u.Z)("clean-btn",t,r&&rt.wordWrapButtonEnabled),"aria-label":o,title:o},a.createElement(at,{className:rt.wordWrapButtonIcon,"aria-hidden":"true"}))}function lt(e){var t,n,r,o,l,i,c,s,d,p,v,f=e.children,h=e.className,g=void 0===h?"":h,b=e.metastring,E=e.title,y=e.showLineNumbers,k=e.language,N=(0,q.L)().prism,C=N.defaultLanguage,L=N.magicComments,T=null!=(t=null!=k?k:null==(n=g.split(" ").find((function(e){return e.startsWith("language-")})))?void 0:n.replace(/language-/,""))?t:C,Z=Te(),_=(r=(0,a.useState)(!1),o=r[0],l=r[1],i=(0,a.useState)(!1),c=i[0],s=i[1],d=(0,a.useRef)(null),p=(0,a.useCallback)((function(){var e=d.current.querySelector("code");o?e.removeAttribute("style"):(e.style.whiteSpace="pre-wrap",e.style.overflowWrap="anywhere"),l((function(e){return!e}))}),[d,o]),v=(0,a.useCallback)((function(){var e=d.current,t=e.scrollWidth>e.clientWidth||d.current.querySelector("code").hasAttribute("style");s(t)}),[d]),ze(d,v),(0,a.useEffect)((function(){v()}),[o,v]),(0,a.useEffect)((function(){return window.addEventListener("resize",v,{passive:!0}),function(){window.removeEventListener("resize",v)}}),[v]),{codeBlockRef:d,isEnabled:o,isCodeScrollable:c,toggle:p}),w=function(e){var t,n;return null!=(t=null==e||null==(n=e.match(xe))?void 0:n.groups.title)?t:""}(b)||E,x=je(f,{metastring:b,language:T,magicComments:L}),B=x.lineClassNames,O=x.code,H=null!=y?y:function(e){return Boolean(null==e?void 0:e.includes("showLineNumbers"))}(b);return a.createElement(Se,{as:"div",className:(0,u.Z)(g,T&&!g.includes("language-"+T)&&"language-"+T)},w&&a.createElement("div",{className:Me.codeBlockTitle},w),a.createElement("div",{className:Me.codeBlockContent},a.createElement(Je,(0,m.Z)({},De,{theme:Z,code:O,language:null!=T?T:"text"}),(function(e){var t=e.className,n=e.tokens,r=e.getLineProps,o=e.getTokenProps;return a.createElement("pre",{tabIndex:0,ref:_.codeBlockRef,className:(0,u.Z)(t,Me.codeBlock,"thin-scrollbar")},a.createElement("code",{className:(0,u.Z)(Me.codeBlockLines,H&&Me.codeBlockLinesWithNumbering)},n.map((function(e,t){return a.createElement(Xe,{key:t,line:e,getLineProps:r,getTokenProps:o,classNames:B[t],showLineNumbers:H})}))))})),a.createElement("div",{className:Me.buttonGroup},(_.isEnabled||_.isCodeScrollable)&&a.createElement(ot,{className:Me.codeButton,onClick:function(){return _.toggle()},isEnabled:_.isEnabled}),a.createElement(nt,{className:Me.codeButton,code:O}))))}var it=["children"];function ct(e){var t=e.children,n=(0,H.Z)(e,it),r=(0,Ce.Z)(),o=function(e){return a.Children.toArray(e).some((function(e){return(0,a.isValidElement)(e)}))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof o?lt:Pe;return a.createElement(l,(0,m.Z)({key:String(r)},n),o)}var st={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"},ut=["summary","children"];function dt(e){return!!e&&("SUMMARY"===e.tagName||dt(e.parentElement))}function mt(e,t){return!!e&&(e===t||mt(e.parentElement,t))}function pt(e){var t=e.summary,n=e.children,r=(0,H.Z)(e,ut),o=(0,Ce.Z)(),l=(0,a.useRef)(null),i=(0,F.u)({initialState:!r.open}),c=i.collapsed,s=i.setCollapsed,d=(0,a.useState)(r.open),p=d[0],v=d[1],f=a.isValidElement(t)?t:a.createElement("summary",null,null!=t?t:"Details");return a.createElement("details",(0,m.Z)({},r,{ref:l,open:p,"data-collapsed":c,className:(0,u.Z)(st.details,o&&st.isBrowser,r.className),onMouseDown:function(e){dt(e.target)&&e.detail>1&&e.preventDefault()},onClick:function(e){e.stopPropagation();var t=e.target;dt(t)&&mt(t,l.current)&&(e.preventDefault(),c?(s(!1),v(!0)):s(!0))}}),f,a.createElement(F.z,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:function(e){s(e),v(!e)}},a.createElement("div",{className:st.collapsibleContent},n)))}var vt={details:"details_b_Ee"},ft="alert alert--info";function ht(e){var t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return a.createElement(pt,(0,m.Z)({},t,{className:(0,u.Z)(ft,vt.details,t.className)}))}function gt(e){return a.createElement(Ee,e)}var bt={containsTaskList:"containsTaskList_mC6p"};function Et(e){if(void 0!==e)return(0,u.Z)(e,(null==e?void 0:e.includes("contains-task-list"))&&bt.containsTaskList)}var yt={img:"img_ev3q"};var kt="admonition_LlT9",Nt="admonitionHeading_tbUL",Ct="admonitionIcon_kALy",Lt="admonitionContent_S0QG";var Tt={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:a.createElement(p.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:a.createElement(p.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:a.createElement(p.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:a.createElement(p.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:a.createElement(p.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},Zt={secondary:"note",important:"info",success:"tip",warning:"danger"};function _t(e){var t,n=function(e){var t=a.Children.toArray(e),n=t.find((function(e){var t;return a.isValidElement(e)&&"mdxAdmonitionTitle"===(null==(t=e.props)?void 0:t.mdxType)})),r=a.createElement(a.Fragment,null,t.filter((function(e){return e!==n})));return{mdxAdmonitionTitle:n,rest:r}}(e.children),r=n.mdxAdmonitionTitle,o=n.rest;return Object.assign({},e,{title:null!=(t=e.title)?t:r,children:o})}var wt={head:function(e){var t=a.Children.map(e.children,(function(e){return a.isValidElement(e)?function(e){var t;if(null!=(t=e.props)&&t.mdxType&&e.props.originalType){var n=e.props,r=(n.mdxType,n.originalType,(0,H.Z)(n,Ne));return a.createElement(e.props.originalType,r)}return e}(e):e}));return a.createElement(ke.Z,e,t)},code:function(e){var t=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return a.Children.toArray(e.children).every((function(e){var n;return"string"==typeof e&&!e.includes("\n")||(0,a.isValidElement)(e)&&t.includes(null==(n=e.props)?void 0:n.mdxType)}))?a.createElement("code",e):a.createElement(ct,e)},a:function(e){return a.createElement(v.Z,e)},pre:function(e){var t;return a.createElement(ct,(0,a.isValidElement)(e.children)&&"code"===(null==(t=e.children.props)?void 0:t.originalType)?e.children.props:Object.assign({},e))},details:function(e){var t=a.Children.toArray(e.children),n=t.find((function(e){var t;return a.isValidElement(e)&&"summary"===(null==(t=e.props)?void 0:t.mdxType)})),r=a.createElement(a.Fragment,null,t.filter((function(e){return e!==n})));return a.createElement(ht,(0,m.Z)({},e,{summary:n}),r)},ul:function(e){return a.createElement("ul",(0,m.Z)({},e,{className:Et(e.className)}))},img:function(e){return a.createElement("img",(0,m.Z)({loading:"lazy"},e,{className:(t=e.className,(0,u.Z)(t,yt.img))}));var t},h1:function(e){return a.createElement(gt,(0,m.Z)({as:"h1"},e))},h2:function(e){return a.createElement(gt,(0,m.Z)({as:"h2"},e))},h3:function(e){return a.createElement(gt,(0,m.Z)({as:"h3"},e))},h4:function(e){return a.createElement(gt,(0,m.Z)({as:"h4"},e))},h5:function(e){return a.createElement(gt,(0,m.Z)({as:"h5"},e))},h6:function(e){return a.createElement(gt,(0,m.Z)({as:"h6"},e))},admonition:function(e){var t=_t(e),n=t.children,r=t.type,o=t.title,l=t.icon,i=function(e){var t,n=null!=(t=Zt[e])?t:e,a=Tt[n];return a||(console.warn('No admonition config found for admonition type "'+n+'". Using Info as fallback.'),Tt.info)}(r),c=null!=o?o:i.label,s=i.iconComponent,d=null!=l?l:a.createElement(s,null);return a.createElement("div",{className:(0,u.Z)(y.k.common.admonition,y.k.common.admonitionType(e.type),"alert","alert--"+i.infimaClassName,kt)},a.createElement("div",{className:Nt},a.createElement("span",{className:Ct},d),c),a.createElement("div",{className:Lt},n))},mermaid:function(){return null}};function xt(e){var t=e.children;return a.createElement(ye.Zo,{components:wt},t)}function Bt(e){var t,n,r,o,l=e.children,i=(t=c(),n=t.metadata,r=t.frontMatter,o=t.contentTitle,r.hide_title||void 0!==o?null:n.title);return a.createElement("div",{className:(0,u.Z)(y.k.docs.docMarkdown,"markdown")},i&&a.createElement("header",null,a.createElement(Ee,{as:"h1"},i)),a.createElement(xt,null,l))}var Ot=n(3791),Ht=n(8596),jt=n(4996);function At(e){return a.createElement("svg",(0,m.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}var It={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function St(){var e=(0,jt.Z)("/");return a.createElement("li",{className:"breadcrumbs__item"},a.createElement(v.Z,{"aria-label":(0,p.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e},a.createElement(At,{className:It.breadcrumbHomeIcon})))}var Mt={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function Pt(e){var t=e.children,n=e.href,r="breadcrumbs__link";return e.isLast?a.createElement("span",{className:r,itemProp:"name"},t):n?a.createElement(v.Z,{className:r,href:n,itemProp:"item"},a.createElement("span",{itemProp:"name"},t)):a.createElement("span",{className:r},t)}function Ut(e){var t=e.children,n=e.active,r=e.index,o=e.addMicrodata;return a.createElement("li",(0,m.Z)({},o&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,u.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n})}),t,a.createElement("meta",{itemProp:"position",content:String(r+1)}))}function zt(){var e=(0,Ot.s1)(),t=(0,Ht.Ns)();return e?a.createElement("nav",{className:(0,u.Z)(y.k.docs.docBreadcrumbs,Mt.breadcrumbsContainer),"aria-label":(0,p.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},a.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&a.createElement(St,null),e.map((function(t,n){var r=n===e.length-1;return a.createElement(Ut,{key:n,active:r,index:n,addMicrodata:!!t.href},a.createElement(Pt,{href:t.href,isLast:r},t.label))})))):null}var Vt={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Dt(e){var t,n,r,o,l,i,s=e.children,m=(t=c(),n=t.frontMatter,r=t.toc,o=(0,d.i)(),l=n.hide_table_of_contents,i=!l&&r.length>0,{hidden:l,mobile:i?a.createElement(ue,null):void 0,desktop:!i||"desktop"!==o&&"ssr"!==o?void 0:a.createElement(he,null)});return a.createElement("div",{className:"row"},a.createElement("div",{className:(0,u.Z)("col",!m.hidden&&Vt.docItemCol)},a.createElement(_,null),a.createElement("div",{className:Vt.docItemContainer},a.createElement("article",null,a.createElement(zt,null),a.createElement(w,null),m.mobile,a.createElement(Bt,null,s),a.createElement(W,null)),a.createElement(g,null))),m.desktop&&a.createElement("div",{className:"col col--3"},m.desktop))}function Rt(e){var t="docs-doc-id-"+e.content.metadata.unversionedId,n=e.content;return a.createElement(i,{content:e.content},a.createElement(r.FG,{className:t},a.createElement(s,null),a.createElement(Dt,null,a.createElement(n,null))))}},4477:function(e,t,n){"use strict";n.d(t,{E:function(){return i},q:function(){return l}});var a=n(7294),r=n(9688),o=a.createContext(null);function l(e){var t=e.children,n=e.version;return a.createElement(o.Provider,{value:n},t)}function i(){var e=(0,a.useContext)(o);if(null===e)throw new r.i6("DocsVersionProvider");return e}},7594:function(e,t){function n(e){let t,n=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))n.push(parseInt(a,10));else if(t=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,r,o]=t;if(a&&o){a=parseInt(a),o=parseInt(o);const e=a=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),s=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=s(n),p=r,v=d["".concat(c,".").concat(p)]||d[p]||m[p]||o;return n?a.createElement(v,l(l({ref:t},u),{},{components:n})):a.createElement(v,l({ref:t},u))}));function v(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=p;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i[d]="string"==typeof e?e:r,l[1]=i;for(var s=2;s0,s=!!(t||n||o);return i||s?a.createElement("footer",{className:(0,u.Z)(y.k.docs.docFooter,"docusaurus-mt-lg")},i&&a.createElement(D,{tags:l}),s&&a.createElement(R,{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:o,formattedLastUpdatedAt:r})):null}var F=n(6043),q=n(6668),G=["parentIndex"];function Y(e){var t=e.map((function(e){return Object.assign({},e,{parentIndex:-1,children:[]})})),n=Array(7).fill(-1);t.forEach((function(e,t){var a=n.slice(2,e.level);e.parentIndex=Math.max.apply(Math,a),n[e.level]=t}));var a=[];return t.forEach((function(e){var n=e.parentIndex,r=(0,H.Z)(e,G);n>=0?t[n].children.push(r):a.push(r)})),a}function $(e){var t=e.toc,n=e.minHeadingLevel,a=e.maxHeadingLevel;return t.flatMap((function(e){var t=$({toc:e.children,minHeadingLevel:n,maxHeadingLevel:a});return function(e){return e.level>=n&&e.level<=a}(e)?[Object.assign({},e,{children:t})]:t}))}function J(e){var t=e.getBoundingClientRect();return t.top===t.bottom?J(e.parentNode):t}function Q(e,t){var n,a,r=t.anchorTopOffset,o=e.find((function(e){return J(e).top>=r}));return o?function(e){return e.top>0&&e.bottom0})).map((function(e){return[e-1,[i]]}));return{lineClassNames:Object.fromEntries(c),code:n}}if(void 0===a)return{lineClassNames:{},code:n};for(var s=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return He(["js","jsBlock"],t);case"jsx":case"tsx":return He(["js","jsBlock","jsx"],t);case"html":return He(["js","jsBlock","html"],t);case"python":case"py":case"bash":return He(["bash"],t);case"markdown":case"md":return He(["html","jsx","bash"],t);default:return He(Object.keys(Oe),t)}}(a,r),u=n.split("\n"),d=Object.fromEntries(r.map((function(e){return[e.className,{start:0,range:""}]}))),m=Object.fromEntries(r.filter((function(e){return e.line})).map((function(e){var t=e.className;return[e.line,t]}))),p=Object.fromEntries(r.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.start,t]}))),v=Object.fromEntries(r.filter((function(e){return e.block})).map((function(e){var t=e.className;return[e.block.end,t]}))),f=0;f0&&e[n-1]===t?e:e.concat(t)};function Ye(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}var $e=function(e){function t(){for(var t=this,n=[],a=arguments.length;a--;)n[a]=arguments[a];e.apply(this,n),Re(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?function(e,t){var n=e.plain,a=Object.create(null),r=e.styles.reduce((function(e,n){var a=n.languages,r=n.style;return a&&!a.includes(t)||n.types.forEach((function(t){var n=We({},e[t],r);e[t]=n})),e}),a);return r.root=n,r.plain=We({},n,{backgroundColor:null}),r}(e.theme,e.language):void 0;return t.themeDict=n})),Re(this,"getLineProps",(function(e){var n=e.key,a=e.className,r=e.style,o=We({},Ye(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),l=t.getThemeDict(t.props);return void 0!==l&&(o.style=l.plain),void 0!==r&&(o.style=void 0!==o.style?We({},o.style,r):r),void 0!==n&&(o.key=n),a&&(o.className+=" "+a),o})),Re(this,"getStyleForToken",(function(e){var n=e.types,a=e.empty,r=n.length,o=t.getThemeDict(t.props);if(void 0!==o){if(1===r&&"plain"===n[0])return a?{display:"inline-block"}:void 0;if(1===r&&!a)return o[n[0]];var l=a?{display:"inline-block"}:{},i=n.map((function(e){return o[e]}));return Object.assign.apply(Object,[l].concat(i))}})),Re(this,"getTokenProps",(function(e){var n=e.key,a=e.className,r=e.style,o=e.token,l=We({},Ye(e,["key","className","style","token"]),{className:"token "+o.types.join(" "),children:o.content,style:t.getStyleForToken(o),key:void 0});return void 0!==r&&(l.style=void 0!==l.style?We({},l.style,r):r),void 0!==n&&(l.key=n),a&&(l.className+=" "+a),l})),Re(this,"tokenize",(function(e,t,n,a){var r={code:t,grammar:n,language:a,tokens:[]};e.hooks.run("before-tokenize",r);var o=r.tokens=e.tokenize(r.code,r.grammar,r.language);return e.hooks.run("after-tokenize",r),o}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,a=e.code,r=e.children,o=this.getThemeDict(this.props),l=t.languages[n];return r({tokens:function(e){for(var t=[[]],n=[e],a=[0],r=[e.length],o=0,l=0,i=[],c=[i];l>-1;){for(;(o=a[l]++)0?u:["plain"],s=d):(u=Ge(u,d.type),d.alias&&(u=Ge(u,d.alias)),s=d.content),"string"==typeof s){var m=s.split(Fe),p=m.length;i.push({types:u,content:m[0]});for(var v=1;v0&&l.getRangeAt(0);a.append(r),r.select(),r.selectionStart=0,r.selectionEnd=e.length;var c=!1;try{c=document.execCommand("copy")}catch(s){}r.remove(),i&&(l.removeAllRanges(),l.addRange(i)),o&&o.focus()}(t),l(!0),i.current=window.setTimeout((function(){l(!1)}),1e3)}),[t]);return(0,a.useEffect)((function(){return function(){return window.clearTimeout(i.current)}}),[]),a.createElement("button",{type:"button","aria-label":o?(0,p.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,p.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,p.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.Z)("clean-btn",n,tt.copyButton,o&&tt.copyButtonCopied),onClick:c},a.createElement("span",{className:tt.copyButtonIcons,"aria-hidden":"true"},a.createElement(Ke,{className:tt.copyButtonIcon}),a.createElement(et,{className:tt.copyButtonSuccessIcon})))}function at(e){return a.createElement("svg",(0,m.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}))}var rt={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function ot(e){var t=e.className,n=e.onClick,r=e.isEnabled,o=(0,p.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return a.createElement("button",{type:"button",onClick:n,className:(0,u.Z)("clean-btn",t,r&&rt.wordWrapButtonEnabled),"aria-label":o,title:o},a.createElement(at,{className:rt.wordWrapButtonIcon,"aria-hidden":"true"}))}function lt(e){var t,n,r,o,l,i,c,s,d,p,v,f=e.children,h=e.className,g=void 0===h?"":h,b=e.metastring,E=e.title,y=e.showLineNumbers,k=e.language,N=(0,q.L)().prism,C=N.defaultLanguage,L=N.magicComments,T=null!=(t=null!=k?k:null==(n=g.split(" ").find((function(e){return e.startsWith("language-")})))?void 0:n.replace(/language-/,""))?t:C,Z=Te(),_=(r=(0,a.useState)(!1),o=r[0],l=r[1],i=(0,a.useState)(!1),c=i[0],s=i[1],d=(0,a.useRef)(null),p=(0,a.useCallback)((function(){var e=d.current.querySelector("code");o?e.removeAttribute("style"):(e.style.whiteSpace="pre-wrap",e.style.overflowWrap="anywhere"),l((function(e){return!e}))}),[d,o]),v=(0,a.useCallback)((function(){var e=d.current,t=e.scrollWidth>e.clientWidth||d.current.querySelector("code").hasAttribute("style");s(t)}),[d]),ze(d,v),(0,a.useEffect)((function(){v()}),[o,v]),(0,a.useEffect)((function(){return window.addEventListener("resize",v,{passive:!0}),function(){window.removeEventListener("resize",v)}}),[v]),{codeBlockRef:d,isEnabled:o,isCodeScrollable:c,toggle:p}),w=function(e){var t,n;return null!=(t=null==e||null==(n=e.match(xe))?void 0:n.groups.title)?t:""}(b)||E,x=je(f,{metastring:b,language:T,magicComments:L}),B=x.lineClassNames,O=x.code,H=null!=y?y:function(e){return Boolean(null==e?void 0:e.includes("showLineNumbers"))}(b);return a.createElement(Se,{as:"div",className:(0,u.Z)(g,T&&!g.includes("language-"+T)&&"language-"+T)},w&&a.createElement("div",{className:Me.codeBlockTitle},w),a.createElement("div",{className:Me.codeBlockContent},a.createElement(Je,(0,m.Z)({},De,{theme:Z,code:O,language:null!=T?T:"text"}),(function(e){var t=e.className,n=e.tokens,r=e.getLineProps,o=e.getTokenProps;return a.createElement("pre",{tabIndex:0,ref:_.codeBlockRef,className:(0,u.Z)(t,Me.codeBlock,"thin-scrollbar")},a.createElement("code",{className:(0,u.Z)(Me.codeBlockLines,H&&Me.codeBlockLinesWithNumbering)},n.map((function(e,t){return a.createElement(Xe,{key:t,line:e,getLineProps:r,getTokenProps:o,classNames:B[t],showLineNumbers:H})}))))})),a.createElement("div",{className:Me.buttonGroup},(_.isEnabled||_.isCodeScrollable)&&a.createElement(ot,{className:Me.codeButton,onClick:function(){return _.toggle()},isEnabled:_.isEnabled}),a.createElement(nt,{className:Me.codeButton,code:O}))))}var it=["children"];function ct(e){var t=e.children,n=(0,H.Z)(e,it),r=(0,Ce.Z)(),o=function(e){return a.Children.toArray(e).some((function(e){return(0,a.isValidElement)(e)}))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof o?lt:Pe;return a.createElement(l,(0,m.Z)({key:String(r)},n),o)}var st={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"},ut=["summary","children"];function dt(e){return!!e&&("SUMMARY"===e.tagName||dt(e.parentElement))}function mt(e,t){return!!e&&(e===t||mt(e.parentElement,t))}function pt(e){var t=e.summary,n=e.children,r=(0,H.Z)(e,ut),o=(0,Ce.Z)(),l=(0,a.useRef)(null),i=(0,F.u)({initialState:!r.open}),c=i.collapsed,s=i.setCollapsed,d=(0,a.useState)(r.open),p=d[0],v=d[1],f=a.isValidElement(t)?t:a.createElement("summary",null,null!=t?t:"Details");return a.createElement("details",(0,m.Z)({},r,{ref:l,open:p,"data-collapsed":c,className:(0,u.Z)(st.details,o&&st.isBrowser,r.className),onMouseDown:function(e){dt(e.target)&&e.detail>1&&e.preventDefault()},onClick:function(e){e.stopPropagation();var t=e.target;dt(t)&&mt(t,l.current)&&(e.preventDefault(),c?(s(!1),v(!0)):s(!0))}}),f,a.createElement(F.z,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:function(e){s(e),v(!e)}},a.createElement("div",{className:st.collapsibleContent},n)))}var vt={details:"details_b_Ee"},ft="alert alert--info";function ht(e){var t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return a.createElement(pt,(0,m.Z)({},t,{className:(0,u.Z)(ft,vt.details,t.className)}))}function gt(e){return a.createElement(Ee,e)}var bt={containsTaskList:"containsTaskList_mC6p"};function Et(e){if(void 0!==e)return(0,u.Z)(e,(null==e?void 0:e.includes("contains-task-list"))&&bt.containsTaskList)}var yt={img:"img_ev3q"};var kt="admonition_LlT9",Nt="admonitionHeading_tbUL",Ct="admonitionIcon_kALy",Lt="admonitionContent_S0QG";var Tt={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:a.createElement(p.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:a.createElement(p.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:a.createElement(p.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:a.createElement(p.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:a.createElement(p.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},Zt={secondary:"note",important:"info",success:"tip",warning:"danger"};function _t(e){var t,n=function(e){var t=a.Children.toArray(e),n=t.find((function(e){var t;return a.isValidElement(e)&&"mdxAdmonitionTitle"===(null==(t=e.props)?void 0:t.mdxType)})),r=a.createElement(a.Fragment,null,t.filter((function(e){return e!==n})));return{mdxAdmonitionTitle:n,rest:r}}(e.children),r=n.mdxAdmonitionTitle,o=n.rest;return Object.assign({},e,{title:null!=(t=e.title)?t:r,children:o})}var wt={head:function(e){var t=a.Children.map(e.children,(function(e){return a.isValidElement(e)?function(e){var t;if(null!=(t=e.props)&&t.mdxType&&e.props.originalType){var n=e.props,r=(n.mdxType,n.originalType,(0,H.Z)(n,Ne));return a.createElement(e.props.originalType,r)}return e}(e):e}));return a.createElement(ke.Z,e,t)},code:function(e){var t=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return a.Children.toArray(e.children).every((function(e){var n;return"string"==typeof e&&!e.includes("\n")||(0,a.isValidElement)(e)&&t.includes(null==(n=e.props)?void 0:n.mdxType)}))?a.createElement("code",e):a.createElement(ct,e)},a:function(e){return a.createElement(v.Z,e)},pre:function(e){var t;return a.createElement(ct,(0,a.isValidElement)(e.children)&&"code"===(null==(t=e.children.props)?void 0:t.originalType)?e.children.props:Object.assign({},e))},details:function(e){var t=a.Children.toArray(e.children),n=t.find((function(e){var t;return a.isValidElement(e)&&"summary"===(null==(t=e.props)?void 0:t.mdxType)})),r=a.createElement(a.Fragment,null,t.filter((function(e){return e!==n})));return a.createElement(ht,(0,m.Z)({},e,{summary:n}),r)},ul:function(e){return a.createElement("ul",(0,m.Z)({},e,{className:Et(e.className)}))},img:function(e){return a.createElement("img",(0,m.Z)({loading:"lazy"},e,{className:(t=e.className,(0,u.Z)(t,yt.img))}));var t},h1:function(e){return a.createElement(gt,(0,m.Z)({as:"h1"},e))},h2:function(e){return a.createElement(gt,(0,m.Z)({as:"h2"},e))},h3:function(e){return a.createElement(gt,(0,m.Z)({as:"h3"},e))},h4:function(e){return a.createElement(gt,(0,m.Z)({as:"h4"},e))},h5:function(e){return a.createElement(gt,(0,m.Z)({as:"h5"},e))},h6:function(e){return a.createElement(gt,(0,m.Z)({as:"h6"},e))},admonition:function(e){var t=_t(e),n=t.children,r=t.type,o=t.title,l=t.icon,i=function(e){var t,n=null!=(t=Zt[e])?t:e,a=Tt[n];return a||(console.warn('No admonition config found for admonition type "'+n+'". Using Info as fallback.'),Tt.info)}(r),c=null!=o?o:i.label,s=i.iconComponent,d=null!=l?l:a.createElement(s,null);return a.createElement("div",{className:(0,u.Z)(y.k.common.admonition,y.k.common.admonitionType(e.type),"alert","alert--"+i.infimaClassName,kt)},a.createElement("div",{className:Nt},a.createElement("span",{className:Ct},d),c),a.createElement("div",{className:Lt},n))},mermaid:function(){return null}};function xt(e){var t=e.children;return a.createElement(ye.Zo,{components:wt},t)}function Bt(e){var t,n,r,o,l=e.children,i=(t=c(),n=t.metadata,r=t.frontMatter,o=t.contentTitle,r.hide_title||void 0!==o?null:n.title);return a.createElement("div",{className:(0,u.Z)(y.k.docs.docMarkdown,"markdown")},i&&a.createElement("header",null,a.createElement(Ee,{as:"h1"},i)),a.createElement(xt,null,l))}var Ot=n(3791),Ht=n(8596),jt=n(4996);function At(e){return a.createElement("svg",(0,m.Z)({viewBox:"0 0 24 24"},e),a.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}var It={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function St(){var e=(0,jt.Z)("/");return a.createElement("li",{className:"breadcrumbs__item"},a.createElement(v.Z,{"aria-label":(0,p.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e},a.createElement(At,{className:It.breadcrumbHomeIcon})))}var Mt={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function Pt(e){var t=e.children,n=e.href,r="breadcrumbs__link";return e.isLast?a.createElement("span",{className:r,itemProp:"name"},t):n?a.createElement(v.Z,{className:r,href:n,itemProp:"item"},a.createElement("span",{itemProp:"name"},t)):a.createElement("span",{className:r},t)}function Ut(e){var t=e.children,n=e.active,r=e.index,o=e.addMicrodata;return a.createElement("li",(0,m.Z)({},o&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,u.Z)("breadcrumbs__item",{"breadcrumbs__item--active":n})}),t,a.createElement("meta",{itemProp:"position",content:String(r+1)}))}function zt(){var e=(0,Ot.s1)(),t=(0,Ht.Ns)();return e?a.createElement("nav",{className:(0,u.Z)(y.k.docs.docBreadcrumbs,Mt.breadcrumbsContainer),"aria-label":(0,p.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},a.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&a.createElement(St,null),e.map((function(t,n){var r=n===e.length-1;return a.createElement(Ut,{key:n,active:r,index:n,addMicrodata:!!t.href},a.createElement(Pt,{href:t.href,isLast:r},t.label))})))):null}var Vt={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Dt(e){var t,n,r,o,l,i,s=e.children,m=(t=c(),n=t.frontMatter,r=t.toc,o=(0,d.i)(),l=n.hide_table_of_contents,i=!l&&r.length>0,{hidden:l,mobile:i?a.createElement(ue,null):void 0,desktop:!i||"desktop"!==o&&"ssr"!==o?void 0:a.createElement(he,null)});return a.createElement("div",{className:"row"},a.createElement("div",{className:(0,u.Z)("col",!m.hidden&&Vt.docItemCol)},a.createElement(_,null),a.createElement("div",{className:Vt.docItemContainer},a.createElement("article",null,a.createElement(zt,null),a.createElement(w,null),m.mobile,a.createElement(Bt,null,s),a.createElement(W,null)),a.createElement(g,null))),m.desktop&&a.createElement("div",{className:"col col--3"},m.desktop))}function Rt(e){var t="docs-doc-id-"+e.content.metadata.unversionedId,n=e.content;return a.createElement(i,{content:e.content},a.createElement(r.FG,{className:t},a.createElement(s,null),a.createElement(Dt,null,a.createElement(n,null))))}},4477:function(e,t,n){"use strict";n.d(t,{E:function(){return i},q:function(){return l}});var a=n(7294),r=n(9688),o=a.createContext(null);function l(e){var t=e.children,n=e.version;return a.createElement(o.Provider,{value:n},t)}function i(){var e=(0,a.useContext)(o);if(null===e)throw new r.i6("DocsVersionProvider");return e}},7594:function(e,t){function n(e){let t,n=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))n.push(parseInt(a,10));else if(t=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,r,o]=t;if(a&&o){a=parseInt(a),o=parseInt(o);const e=a0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},8131:function(e,t,r){"use strict";var n=r(9374),i=r(7775),a=r(3076);function s(e,t,r){return new n(e,t,r)}s.version=r(4336),s.AlgoliaSearchHelper=n,s.SearchParameters=i,s.SearchResults=a,e.exports=s},8078:function(e,t,r){"use strict";var n=r(7331);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(4853)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},2437:function(e,t,r){"use strict";var n=r(2344),i=r(116),a=r(9803),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return a(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},7775:function(e,t,r){"use strict";var n=r(2344),i=r(7888),a=r(2686),s=r(185),c=r(116),u=r(9803),o=r(8023),h=r(6801),f=r(2437);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return s({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=o(r);if(this.isNumericRefined(e,t,n))return this;var i=s({},this.numericRefinements);return i[e]=s({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&l(r.val,o(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var a,s,c=o(r),u=void 0!==(a=this.numericRefinements[e][t],s=c,i(a,(function(e){return l(e,s)})));return n&&u},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?u(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},210:function(e,t,r){"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",h=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),l=e._getHierarchicalShowParentLevel(n),m=a(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),v=function(e,t,r,n,a){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m-1})));if(o){var h=o.attributes.indexOf(t),l=c(e.hierarchicalFacets,(function(e){return e.name===o.name}));u.hierarchicalFacets[l][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var m,d=-1!==e.disjunctiveFacets.indexOf(t),g=-1!==e.facets.indexOf(t);d&&(m=p[t],u.disjunctiveFacets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},v(u.disjunctiveFacets[m],a.facets_stats,t)),g&&(m=f[t],u.facets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},v(u.facets[m],a.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),h.forEach((function(r){var n=t[g],s=n&&n.facets?n.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(s).forEach((function(t){var r,f=s[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=c(u.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;u.hierarchicalFacets[r][m].data=o({},u.hierarchicalFacets[r][m].data,f)}else{r=p[t];var d=a.facets&&a.facets[t]||{};u.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:n.exhaustiveFacetsCount},v(u.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!u.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(u.disjunctiveFacets[r].data[n]=0)}))}})),g++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(g).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var o=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=c(u.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(s.length>0){var m=s[0].split(a)[0];l[m]=u.hierarchicalFacets[h][f].data[m]}u.hierarchicalFacets[h][f].data=i(l,o,u.hierarchicalFacets[h][f].data)}})),g++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=f[t];u.facets[n]={name:t,data:y[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){u.facets[n]=u.facets[n]||{name:t},u.facets[n].data=u.facets[n].data||{},u.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function g(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=s(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=s(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var a=s(e.hierarchicalFacets,r);if(!a)return a;var c=e._state.getHierarchicalFacetByName(t),u=e._state._getHierarchicalFacetSeparator(c),o=l(e._state.getHierarchicalRefinement(t)[0]||"");0===o.indexOf(c.rootPath)&&(o=o.replace(c.rootPath+u,""));var h=o.split(u);return h.unshift(t),y(a,h,0),a}}function y(e,t,r){e.isRefined=e.name===t[r],e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return R(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function F(e,t){var r=s(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var a=s(i,(function(e){return e.name===r})),c=a&&a.data&&a.data[n]?a.data[n]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:c,exhaustive:u}}p.prototype.getFacetByName=function(e){function t(t){return t.name===e}return s(this.facets,t)||s(this.disjunctiveFacets,t)||s(this.hierarchicalFacets,t)},p.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],p.prototype.getFacetValues=function(e,t){var r=g(this,e);if(r){var n,a=i({},t,{sortBy:p.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this;if(Array.isArray(r))n=[e];else n=s._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(a.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(s,t);if(r)return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var a,s=t.sortRemainingBy;return"hidden"===s?r:(a="alpha"===s?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(n,a[0],a[1])))}(e,r)}if(Array.isArray(a.sortBy)){var n=u(a.sortBy,p.DEFAULT_SORT);return h(e,n[0],n[1])}if("function"==typeof a.sortBy)return function(e,t){return t.sort(e)}(a.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},p.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},p.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),c=r.split(a),u=s(n,(function(e){return e.name===t})),o=c.reduce((function(e,t){var r=e&&s(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=p},9374:function(e,t,r){"use strict";var n=r(7331),i=r(8078),a=r(4039).escapeFacetValue,s=r(4853),c=r(185),u=r(116),o=r(9803),h=r(6394),f=r(7775),l=r(3076),m=r(4336);function d(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.setClient(e);var n=r||{};n.index=t,this.state=f.make(n),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function v(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function p(){return this.state.page}s(d,n),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return h._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=h._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new l(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new l(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:o(h._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var s=this.client.initIndex(n.index);if("function"!=typeof s.findAnswers)throw new Error(a);return s.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,s="function"==typeof this.client.initIndex;if(!i&&!s&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),o=h.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var f,l=this;return i?f=this.client.searchForFacetValues([{indexName:c.index,params:o}]):s?f=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,f=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),f.then((function(t){return l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=a(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=v,d.prototype.setPage=v,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:f.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new f(e),this},d.prototype.hasRefinements=function(e){return!!u(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=p,d.prototype.getPage=p,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=h._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?h._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),s=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,s));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(c){this.emit("error",{error:c})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new i(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},4587:function(e){"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},2344:function(e){"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},4039:function(e){"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},7888:function(e){"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},4853:function(e){"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},2686:function(e){"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},185:function(e){"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n0}},9803:function(e){"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},2148:function(e){"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},8023:function(e){"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},6394:function(e,t,r){"use strict";var n=r(185);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var u=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(n,s){var c=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===s);function o(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!o(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||o(t)||e.push(t),e}),[]),f=u[s-1];c.facetFilters=s>0?h.concat(f.attribute+":"+f.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),s.length>0&&(u.numericFilters=s),i(n({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),u=a._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),s.length>0&&(o.facetFilters=s),i(n({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).sort().forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).sort().forEach((function(e){(a[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).sort().forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(h)||!f&&!0===r||f&&f.split(h).length===a.split(h).length)return;f?(u=f.split(h).length-1,a=f):(u=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=o.attributes[u]}else u=a.split(h).length-1,s=o.attributes[u];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),u))}};e.exports=a},6801:function(e){"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},4336:function(e){"use strict";e.exports="3.14.2"},290:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){c();var t=JSON.stringify(e);return a()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},v=1,p=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function P(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===v||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function j(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),u=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),o=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:O(s)};var m={data:c,headers:u,method:o,url:E(h,n.path,f),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},v={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:p))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,v)}))};return P(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function E(e,t,r){var n=x(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function x(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var N=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:h,hosts:o.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},H=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},T=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=n(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:I}}).searchForFacetValues(s,c,r(r({},i),u))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},I=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},k=1,D=2,q=3;function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return k>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return D>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.20.0","-").concat(e)}),u()]}),userAgent:_("4.20.0").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return N(r(r(r({},a),n),{},{methods:{search:S,searchForFacetValues:T,multipleQueries:S,multipleSearchForFacetValues:T,customRequest:A,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:C,searchForFacetValues:I,findAnswers:Q}})}}}}))}return V.version="4.20.0",V}()},6675:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return A}});var n=r(7294),i=r(6010),a=r(8131),s=r.n(a),c=r(290),u=r.n(c),o=r(412),h=r(5742),f=r(9960),l=r(143),m=r(2263),d=["zero","one","two","few","many","other"];function v(e){return d.filter((function(t){return e.includes(t)}))}var p={locale:"en",pluralForms:v(["one","other"]),select:function(e){return 1===e?"one":"other"}};function g(){var e=(0,m.Z)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:v(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),p}var t,r}),[e])}function y(){var e=g();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}}var R=r(6177),F=r(9688),b=r(833),P=r(2128),j=r(5999),_=r(6278),E=r(239),x=r(9439),O={searchQueryInput:"searchQueryInput_u2C7",searchVersionInput:"searchVersionInput_m0Ui",searchResultsColumn:"searchResultsColumn_JPFH",algoliaLogo:"algoliaLogo_rT1R",algoliaLogoPathFill:"algoliaLogoPathFill_WdUC",searchResultItem:"searchResultItem_Tv2o",searchResultItemHeading:"searchResultItemHeading_KbCB",searchResultItemPath:"searchResultItemPath_lhe1",searchResultItemSummary:"searchResultItemSummary_AEaO",searchQueryColumn:"searchQueryColumn_RTkw",searchVersionColumn:"searchVersionColumn_ypXd",searchLogoColumn:"searchLogoColumn_rJIA",loadingSpinner:"loadingSpinner_XVxU","loading-spin":"loading-spin_vzvp",loader:"loader_vvXV"};function w(e){var t=e.docsSearchVersionsHelpers,r=Object.entries(t.allDocsData).filter((function(e){return e[1].versions.length>1}));return n.createElement("div",{className:(0,i.Z)("col","col--3","padding-left--none",O.searchVersionColumn)},r.map((function(e){var i=e[0],a=e[1],s=r.length>1?i+": ":"";return n.createElement("select",{key:i,onChange:function(e){return t.setSearchVersion(i,e.target.value)},defaultValue:t.searchVersions[i],className:O.searchVersionInput},a.versions.map((function(e,t){return n.createElement("option",{key:t,label:""+s+e.label,value:e.name})})))})))}function N(){var e,t,r,a,c,d,v=(0,m.Z)().i18n.currentLocale,p=(0,_.L)().algolia,g=p.appId,b=p.apiKey,N=p.indexName,A=(0,E.l)(),H=(e=y().selectMessage,function(t){return e(t,(0,j.I)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}),S=(t=(0,l._r)(),r=(0,n.useState)((function(){return Object.entries(t).reduce((function(e,t){var r,n=t[0],i=t[1];return Object.assign({},e,((r={})[n]=i.versions[0].name,r))}),{})})),a=r[0],c=r[1],d=Object.values(t).some((function(e){return e.versions.length>1})),{allDocsData:t,versioningEnabled:d,searchVersions:a,setSearchVersion:function(e,t){return c((function(r){var n;return Object.assign({},r,((n={})[e]=t,n))}))}}),T=(0,R.K)(),Q=T[0],C=T[1],I={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},k=(0,n.useReducer)((function(e,t){switch(t.type){case"reset":return I;case"loading":return Object.assign({},e,{loading:!0});case"update":return Q!==t.value.query?e:Object.assign({},t.value,{items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)});case"advance":var r=e.totalPages>e.lastPage+1;return Object.assign({},e,{lastPage:r?e.lastPage+1:e.lastPage,hasMore:r});default:return e}}),I),D=k[0],q=k[1],V=u()(g,b),L=s()(V,N,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});L.on("result",(function(e){var t=e.results,r=t.query,n=t.hits,i=t.page,a=t.nbHits,s=t.nbPages;if(""!==r&&Array.isArray(n)){var c=function(e){return e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match")},u=n.map((function(e){var t=e.url,r=e._highlightResult.hierarchy,n=e._snippetResult,i=void 0===n?{}:n,a=Object.keys(r).map((function(e){return c(r[e].value)}));return{title:a.pop(),url:A(t),summary:i.content?c(i.content.value)+"...":"",breadcrumbs:a}}));q({type:"update",value:{items:u,query:r,totalResults:a,totalPages:s,lastPage:i,hasMore:s>i+1,loading:!1}})}else q({type:"reset"})}));var B=(0,n.useState)(null),z=B[0],M=B[1],J=(0,n.useRef)(0),W=(0,n.useRef)(o.Z.canUseIntersectionObserver&&new IntersectionObserver((function(e){var t=e[0],r=t.isIntersecting,n=t.boundingClientRect.y;r&&J.current>n&&q({type:"advance"}),J.current=n}),{threshold:1})),U=function(){return Q?(0,j.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:Q}):(0,j.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})},Z=(0,F.zX)((function(e){void 0===e&&(e=0),L.addDisjunctiveFacetRefinement("docusaurus_tag","default"),L.addDisjunctiveFacetRefinement("language",v),Object.entries(S.searchVersions).forEach((function(e){var t=e[0],r=e[1];L.addDisjunctiveFacetRefinement("docusaurus_tag","docs-"+t+"-"+r)})),L.setQuery(Q).setPage(e).search()}));return(0,n.useEffect)((function(){if(z){var e=W.current;return e?(e.observe(z),function(){return e.unobserve(z)}):function(){return!0}}}),[z]),(0,n.useEffect)((function(){q({type:"reset"}),Q&&(q({type:"loading"}),setTimeout((function(){Z()}),300))}),[Q,S.searchVersions,Z]),(0,n.useEffect)((function(){D.lastPage&&0!==D.lastPage&&Z(D.lastPage)}),[Z,D.lastPage]),n.createElement(x.Z,null,n.createElement(h.Z,null,n.createElement("title",null,(0,P.p)(U())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,U()),n.createElement("form",{className:"row",onSubmit:function(e){return e.preventDefault()}},n.createElement("div",{className:(0,i.Z)("col",O.searchQueryColumn,{"col--9":S.versioningEnabled,"col--12":!S.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:O.searchQueryInput,placeholder:(0,j.I)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,j.I)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:function(e){return C(e.target.value)},value:Q,autoComplete:"off",autoFocus:!0})),S.versioningEnabled&&n.createElement(w,{docsSearchVersionsHelpers:S})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.Z)("col","col--8",O.searchResultsColumn)},!!D.totalResults&&H(D.totalResults)),n.createElement("div",{className:(0,i.Z)("col","col--4","text--right",O.searchLogoColumn)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,j.I)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:O.algoliaLogo},n.createElement("g",{fill:"none"},n.createElement("path",{className:O.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),D.items.length>0?n.createElement("main",null,D.items.map((function(e,t){var r=e.title,a=e.url,s=e.summary,c=e.breadcrumbs;return n.createElement("article",{key:t,className:O.searchResultItem},n.createElement("h2",{className:O.searchResultItemHeading},n.createElement(f.Z,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.Z)("breadcrumbs",O.searchResultItemPath)},c.map((function(e,t){return n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}})})))),s&&n.createElement("p",{className:O.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}}))}))):[Q&&!D.loading&&n.createElement("p",{key:"no-results"},n.createElement(j.Z,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!D.loading&&n.createElement("div",{key:"spinner",className:O.loadingSpinner})],D.hasMore&&n.createElement("div",{className:O.loader,ref:M},n.createElement(j.Z,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function A(){return n.createElement(b.FG,{className:"search-page-wrapper"},n.createElement(N,null))}}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/1a4e3797.d61ec1d4.js.LICENSE.txt b/versions/beta/assets/js/1a4e3797.48d11da5.js.LICENSE.txt similarity index 100% rename from versions/beta/assets/js/1a4e3797.d61ec1d4.js.LICENSE.txt rename to versions/beta/assets/js/1a4e3797.48d11da5.js.LICENSE.txt diff --git a/versions/beta/assets/js/1a4e3797.d61ec1d4.js b/versions/beta/assets/js/1a4e3797.d61ec1d4.js deleted file mode 100644 index 2b4c6f201..000000000 --- a/versions/beta/assets/js/1a4e3797.d61ec1d4.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 1a4e3797.d61ec1d4.js.LICENSE.txt */ -(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[920],{7331:function(e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,a,s,c,u,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(a=this._events[e]))return!1;if(r(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),a.apply(this,c)}else if(n(a))for(c=Array.prototype.slice.call(arguments,1),s=(o=a.slice()).length,u=0;u0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},8131:function(e,t,r){"use strict";var n=r(9374),i=r(7775),a=r(3076);function s(e,t,r){return new n(e,t,r)}s.version=r(4336),s.AlgoliaSearchHelper=n,s.SearchParameters=i,s.SearchResults=a,e.exports=s},8078:function(e,t,r){"use strict";var n=r(7331);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(4853)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},2437:function(e,t,r){"use strict";var n=r(2344),i=r(116),a=r(9803),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return a(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},7775:function(e,t,r){"use strict";var n=r(2344),i=r(7888),a=r(2686),s=r(185),c=r(116),u=r(9803),o=r(8023),h=r(6801),f=r(2437);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return s({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=o(r);if(this.isNumericRefined(e,t,n))return this;var i=s({},this.numericRefinements);return i[e]=s({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&l(r.val,o(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var a,s,c=o(r),u=void 0!==(a=this.numericRefinements[e][t],s=c,i(a,(function(e){return l(e,s)})));return n&&u},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?u(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},210:function(e,t,r){"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",h=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),l=e._getHierarchicalShowParentLevel(n),m=a(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),v=function(e,t,r,n,a){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m-1})));if(o){var h=o.attributes.indexOf(t),l=c(e.hierarchicalFacets,(function(e){return e.name===o.name}));u.hierarchicalFacets[l][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var m,d=-1!==e.disjunctiveFacets.indexOf(t),g=-1!==e.facets.indexOf(t);d&&(m=p[t],u.disjunctiveFacets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},v(u.disjunctiveFacets[m],a.facets_stats,t)),g&&(m=f[t],u.facets[m]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},v(u.facets[m],a.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),h.forEach((function(r){var n=t[g],s=n&&n.facets?n.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(s).forEach((function(t){var r,f=s[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=c(u.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;u.hierarchicalFacets[r][m].data=o({},u.hierarchicalFacets[r][m].data,f)}else{r=p[t];var d=a.facets&&a.facets[t]||{};u.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:n.exhaustiveFacetsCount},v(u.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!u.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(u.disjunctiveFacets[r].data[n]=0)}))}})),g++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(g).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var o=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=c(u.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(s.length>0){var m=s[0].split(a)[0];l[m]=u.hierarchicalFacets[h][f].data[m]}u.hierarchicalFacets[h][f].data=i(l,o,u.hierarchicalFacets[h][f].data)}})),g++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=f[t];u.facets[n]={name:t,data:y[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){u.facets[n]=u.facets[n]||{name:t},u.facets[n].data=u.facets[n].data||{},u.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function g(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=s(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=s(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var a=s(e.hierarchicalFacets,r);if(!a)return a;var c=e._state.getHierarchicalFacetByName(t),u=e._state._getHierarchicalFacetSeparator(c),o=l(e._state.getHierarchicalRefinement(t)[0]||"");0===o.indexOf(c.rootPath)&&(o=o.replace(c.rootPath+u,""));var h=o.split(u);return h.unshift(t),y(a,h,0),a}}function y(e,t,r){e.isRefined=e.name===t[r],e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return R(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function F(e,t){var r=s(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var a=s(i,(function(e){return e.name===r})),c=a&&a.data&&a.data[n]?a.data[n]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:c,exhaustive:u}}p.prototype.getFacetByName=function(e){function t(t){return t.name===e}return s(this.facets,t)||s(this.disjunctiveFacets,t)||s(this.hierarchicalFacets,t)},p.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],p.prototype.getFacetValues=function(e,t){var r=g(this,e);if(r){var n,a=i({},t,{sortBy:p.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this;if(Array.isArray(r))n=[e];else n=s._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(a.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(s,t);if(r)return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var a,s=t.sortRemainingBy;return"hidden"===s?r:(a="alpha"===s?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(n,a[0],a[1])))}(e,r)}if(Array.isArray(a.sortBy)){var n=u(a.sortBy,p.DEFAULT_SORT);return h(e,n[0],n[1])}if("function"==typeof a.sortBy)return function(e,t){return t.sort(e)}(a.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},p.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},p.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),c=r.split(a),u=s(n,(function(e){return e.name===t})),o=c.reduce((function(e,t){var r=e&&s(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=p},9374:function(e,t,r){"use strict";var n=r(7331),i=r(8078),a=r(4039).escapeFacetValue,s=r(4853),c=r(185),u=r(116),o=r(9803),h=r(6394),f=r(7775),l=r(3076),m=r(4336);function d(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.setClient(e);var n=r||{};n.index=t,this.state=f.make(n),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function v(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function p(){return this.state.page}s(d,n),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return h._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=h._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new l(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new l(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:o(h._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var s=this.client.initIndex(n.index);if("function"!=typeof s.findAnswers)throw new Error(a);return s.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,s="function"==typeof this.client.initIndex;if(!i&&!s&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),o=h.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var f,l=this;return i?f=this.client.searchForFacetValues([{indexName:c.index,params:o}]):s?f=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,f=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),f.then((function(t){return l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=a(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=v,d.prototype.setPage=v,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:f.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new f(e),this},d.prototype.hasRefinements=function(e){return!!u(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=p,d.prototype.getPage=p,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=h._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?h._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),s=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,s));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(c){this.emit("error",{error:c})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new i(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},4587:function(e){"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},2344:function(e){"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},4039:function(e){"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},7888:function(e){"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},4853:function(e){"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},2686:function(e){"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},185:function(e){"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n0}},9803:function(e){"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},2148:function(e){"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},8023:function(e){"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},6394:function(e,t,r){"use strict";var n=r(185);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var u=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(n,s){var c=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===s);function o(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!o(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||o(t)||e.push(t),e}),[]),f=u[s-1];c.facetFilters=s>0?h.concat(f.attribute+":"+f.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),s.length>0&&(u.numericFilters=s),i(n({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),u=a._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),s.length>0&&(o.facetFilters=s),i(n({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).sort().forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).sort().forEach((function(e){(a[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).sort().forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(h)||!f&&!0===r||f&&f.split(h).length===a.split(h).length)return;f?(u=f.split(h).length-1,a=f):(u=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=o.attributes[u]}else u=a.split(h).length-1,s=o.attributes[u];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),u))}};e.exports=a},6801:function(e){"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},4336:function(e){"use strict";e.exports="3.14.2"},290:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){c();var t=JSON.stringify(e);return a()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},v=1,p=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function P(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===v||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function j(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),u=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),o=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:O(s)};var m={data:c,headers:u,method:o,url:E(h,n.path,f),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},v={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:p))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,v)}))};return P(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function _(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function E(e,t,r){var n=x(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function x(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var N=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:h,hosts:o.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return j(f,f.hosts.filter((function(e){return 0!=(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},H=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},T=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=n(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:I}}).searchForFacetValues(s,c,r(r({},i),u))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},I=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},k=1,D=2,q=3;function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return k>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return D>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.20.0","-").concat(e)}),u()]}),userAgent:_("4.20.0").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return N(r(r(r({},a),n),{},{methods:{search:S,searchForFacetValues:T,multipleQueries:S,multipleSearchForFacetValues:T,customRequest:A,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:C,searchForFacetValues:I,findAnswers:Q}})}}}}))}return V.version="4.20.0",V}()},6675:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return A}});var n=r(7294),i=r(6010),a=r(8131),s=r.n(a),c=r(290),u=r.n(c),o=r(412),h=r(5742),f=r(9960),l=r(143),m=r(2263),d=["zero","one","two","few","many","other"];function v(e){return d.filter((function(t){return e.includes(t)}))}var p={locale:"en",pluralForms:v(["one","other"]),select:function(e){return 1===e?"one":"other"}};function g(){var e=(0,m.Z)().i18n.currentLocale;return(0,n.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:v(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),p}var t,r}),[e])}function y(){var e=g();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}}var R=r(6177),F=r(9688),b=r(833),P=r(2128),j=r(5999),_=r(6278),E=r(239),x=r(9439),O={searchQueryInput:"searchQueryInput_u2C7",searchVersionInput:"searchVersionInput_m0Ui",searchResultsColumn:"searchResultsColumn_JPFH",algoliaLogo:"algoliaLogo_rT1R",algoliaLogoPathFill:"algoliaLogoPathFill_WdUC",searchResultItem:"searchResultItem_Tv2o",searchResultItemHeading:"searchResultItemHeading_KbCB",searchResultItemPath:"searchResultItemPath_lhe1",searchResultItemSummary:"searchResultItemSummary_AEaO",searchQueryColumn:"searchQueryColumn_RTkw",searchVersionColumn:"searchVersionColumn_ypXd",searchLogoColumn:"searchLogoColumn_rJIA",loadingSpinner:"loadingSpinner_XVxU","loading-spin":"loading-spin_vzvp",loader:"loader_vvXV"};function w(e){var t=e.docsSearchVersionsHelpers,r=Object.entries(t.allDocsData).filter((function(e){return e[1].versions.length>1}));return n.createElement("div",{className:(0,i.Z)("col","col--3","padding-left--none",O.searchVersionColumn)},r.map((function(e){var i=e[0],a=e[1],s=r.length>1?i+": ":"";return n.createElement("select",{key:i,onChange:function(e){return t.setSearchVersion(i,e.target.value)},defaultValue:t.searchVersions[i],className:O.searchVersionInput},a.versions.map((function(e,t){return n.createElement("option",{key:t,label:""+s+e.label,value:e.name})})))})))}function N(){var e,t,r,a,c,d,v=(0,m.Z)().i18n.currentLocale,p=(0,_.L)().algolia,g=p.appId,b=p.apiKey,N=p.indexName,A=(0,E.l)(),H=(e=y().selectMessage,function(t){return e(t,(0,j.I)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}),S=(t=(0,l._r)(),r=(0,n.useState)((function(){return Object.entries(t).reduce((function(e,t){var r,n=t[0],i=t[1];return Object.assign({},e,((r={})[n]=i.versions[0].name,r))}),{})})),a=r[0],c=r[1],d=Object.values(t).some((function(e){return e.versions.length>1})),{allDocsData:t,versioningEnabled:d,searchVersions:a,setSearchVersion:function(e,t){return c((function(r){var n;return Object.assign({},r,((n={})[e]=t,n))}))}}),T=(0,R.K)(),Q=T[0],C=T[1],I={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},k=(0,n.useReducer)((function(e,t){switch(t.type){case"reset":return I;case"loading":return Object.assign({},e,{loading:!0});case"update":return Q!==t.value.query?e:Object.assign({},t.value,{items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)});case"advance":var r=e.totalPages>e.lastPage+1;return Object.assign({},e,{lastPage:r?e.lastPage+1:e.lastPage,hasMore:r});default:return e}}),I),D=k[0],q=k[1],V=u()(g,b),L=s()(V,N,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});L.on("result",(function(e){var t=e.results,r=t.query,n=t.hits,i=t.page,a=t.nbHits,s=t.nbPages;if(""!==r&&Array.isArray(n)){var c=function(e){return e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match")},u=n.map((function(e){var t=e.url,r=e._highlightResult.hierarchy,n=e._snippetResult,i=void 0===n?{}:n,a=Object.keys(r).map((function(e){return c(r[e].value)}));return{title:a.pop(),url:A(t),summary:i.content?c(i.content.value)+"...":"",breadcrumbs:a}}));q({type:"update",value:{items:u,query:r,totalResults:a,totalPages:s,lastPage:i,hasMore:s>i+1,loading:!1}})}else q({type:"reset"})}));var B=(0,n.useState)(null),z=B[0],M=B[1],J=(0,n.useRef)(0),W=(0,n.useRef)(o.Z.canUseIntersectionObserver&&new IntersectionObserver((function(e){var t=e[0],r=t.isIntersecting,n=t.boundingClientRect.y;r&&J.current>n&&q({type:"advance"}),J.current=n}),{threshold:1})),U=function(){return Q?(0,j.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:Q}):(0,j.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})},Z=(0,F.zX)((function(e){void 0===e&&(e=0),L.addDisjunctiveFacetRefinement("docusaurus_tag","default"),L.addDisjunctiveFacetRefinement("language",v),Object.entries(S.searchVersions).forEach((function(e){var t=e[0],r=e[1];L.addDisjunctiveFacetRefinement("docusaurus_tag","docs-"+t+"-"+r)})),L.setQuery(Q).setPage(e).search()}));return(0,n.useEffect)((function(){if(z){var e=W.current;return e?(e.observe(z),function(){return e.unobserve(z)}):function(){return!0}}}),[z]),(0,n.useEffect)((function(){q({type:"reset"}),Q&&(q({type:"loading"}),setTimeout((function(){Z()}),300))}),[Q,S.searchVersions,Z]),(0,n.useEffect)((function(){D.lastPage&&0!==D.lastPage&&Z(D.lastPage)}),[Z,D.lastPage]),n.createElement(x.Z,null,n.createElement(h.Z,null,n.createElement("title",null,(0,P.p)(U())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,U()),n.createElement("form",{className:"row",onSubmit:function(e){return e.preventDefault()}},n.createElement("div",{className:(0,i.Z)("col",O.searchQueryColumn,{"col--9":S.versioningEnabled,"col--12":!S.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:O.searchQueryInput,placeholder:(0,j.I)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,j.I)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:function(e){return C(e.target.value)},value:Q,autoComplete:"off",autoFocus:!0})),S.versioningEnabled&&n.createElement(w,{docsSearchVersionsHelpers:S})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.Z)("col","col--8",O.searchResultsColumn)},!!D.totalResults&&H(D.totalResults)),n.createElement("div",{className:(0,i.Z)("col","col--4","text--right",O.searchLogoColumn)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,j.I)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:O.algoliaLogo},n.createElement("g",{fill:"none"},n.createElement("path",{className:O.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),D.items.length>0?n.createElement("main",null,D.items.map((function(e,t){var r=e.title,a=e.url,s=e.summary,c=e.breadcrumbs;return n.createElement("article",{key:t,className:O.searchResultItem},n.createElement("h2",{className:O.searchResultItemHeading},n.createElement(f.Z,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.Z)("breadcrumbs",O.searchResultItemPath)},c.map((function(e,t){return n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}})})))),s&&n.createElement("p",{className:O.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}}))}))):[Q&&!D.loading&&n.createElement("p",{key:"no-results"},n.createElement(j.Z,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!D.loading&&n.createElement("div",{key:"spinner",className:O.loadingSpinner})],D.hasMore&&n.createElement("div",{className:O.loader,ref:M},n.createElement(j.Z,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function A(){return n.createElement(b.FG,{className:"search-page-wrapper"},n.createElement(N,null))}}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/1bdfe715.3450d8fe.js b/versions/beta/assets/js/1bdfe715.3450d8fe.js new file mode 100644 index 000000000..cfd2f276e --- /dev/null +++ b/versions/beta/assets/js/1bdfe715.3450d8fe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[7099],{3905:function(e,n,t){t.d(n,{Zo:function(){return d},kt:function(){return g}});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=r.createContext({}),p=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},d=function(e){var n=p(e.components);return r.createElement(l.Provider,{value:n},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),c=p(t),m=a,g=c["".concat(l,".").concat(m)]||c[m]||u[m]||o;return t?r.createElement(g,i(i({ref:n},d),{},{components:t})):r.createElement(g,i({ref:n},d))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=m;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[c]="string"==typeof e?e:a,i[1]=s;for(var p=2;p)")),(0,o.kt)("p",null,"Create an new Instance without starting it"),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"When directly starting the instance, ",(0,o.kt)("a",{parentName:"p",href:"#static-run"},(0,o.kt)("inlineCode",{parentName:"a"},"run"))," should be used")),(0,o.kt)("h3",{id:"debug"},"debug"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"private debug(msg: string): void")),(0,o.kt)("p",null,"Format input with debug-message template"),(0,o.kt)("h3",{id:"create"},"create"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"static async create(opts: Partial): Promise")),(0,o.kt)("p",null,"Create an new Instance and start it (while being an Promise)"),(0,o.kt)("h3",{id:"preparecommandargs"},"prepareCommandArgs"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"prepareCommandArgs(): string[]")),(0,o.kt)("p",null,"Constructs the Command Arguments"),(0,o.kt)("h3",{id:"start"},"start"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async start(): Promise")),(0,o.kt)("p",null,"Start the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," and the watcher processes"),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Currently does not check if the instance is in a correct state and just resets all values, see ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/nodkz/mongodb-memory-server/issues/662"},"#662"),".")),(0,o.kt)("h3",{id:"stop"},"stop"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async stop(): Promise")),(0,o.kt)("p",null,"Stop the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," and the watcher processes"),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Will not Error if instance is not running")),(0,o.kt)("h3",{id:"_launchmongod"},"_launchMongod"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"_launchMongod(mongoBin: string): ChildProcess")),(0,o.kt)("p",null,"Actually spawn the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process with ",(0,o.kt)("inlineCode",{parentName:"p"},"ChildProcess"),", used by ",(0,o.kt)("a",{parentName:"p",href:"#run"},(0,o.kt)("inlineCode",{parentName:"a"},"run"))),(0,o.kt)("h3",{id:"_launchkiller"},"_launchKiller"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"_launchKiller(parentPid: number, childPid: number): ChildProcess")),(0,o.kt)("p",null,"Spawn an killer process that keeps watch over the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process"),(0,o.kt)("h3",{id:"errorhandler"},"errorHandler"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"errorHandler(err: string): void")),(0,o.kt)("p",null,"Error handler for the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process"),(0,o.kt)("h3",{id:"closehandler"},"closeHandler"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"closeHandler(code: number, signal: string): void")),(0,o.kt)("p",null,"Close handler for the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process"),(0,o.kt)("h3",{id:"stderrhandler"},"stderrHandler"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"stderrHandler(message: string | Buffer): void")),(0,o.kt)("p",null,"STDERR handler for the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process"),(0,o.kt)("h3",{id:"stdouthandler"},"stdoutHandler"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"stdoutHandler(message: string | Buffer): void")),(0,o.kt)("p",null,"STDOUT handler for the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process",(0,o.kt)("br",{parentName:"p"}),"\n","Matches process output against known formats and raise events"),(0,o.kt)("h2",{id:"values"},"Values"),(0,o.kt)("h3",{id:"instanceopts"},"instanceOpts"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"instanceOpts: MongoInstanceOpts")),(0,o.kt)("p",null,"Stores the Instance Options"),(0,o.kt)("h3",{id:"binaryopts"},"binaryOpts"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"readonly binaryOpts: Readonly")),(0,o.kt)("p",null,"Stores the Binary Options"),(0,o.kt)("h3",{id:"spawnopts"},"spawnOpts"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"readonly spawnOpts: Readonly")),(0,o.kt)("p",null,"Stores the Spawn Options"),(0,o.kt)("h3",{id:"extraconnectionoptions"},"extraConnectionOptions"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"extraConnectionOptions?: MongoClientOptions")),(0,o.kt)("p",null,"Contains extra Connection options used for ",(0,o.kt)("inlineCode",{parentName:"p"},"mongoClient.connect"),", this is mainly used for authentication"),(0,o.kt)("h3",{id:"mongodprocess"},"mongodProcess"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodProcess?: ChildProcess")),(0,o.kt)("p",null,"Stores the active process reference for the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process"),(0,o.kt)("h3",{id:"killerprocess"},"killerProcess"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"killerProcess?: ChildProcess")),(0,o.kt)("p",null,"Stores the active process reference for the killer process"),(0,o.kt)("h3",{id:"isinstanceprimary"},"isInstancePrimary"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"isInstancePrimary: boolean")),(0,o.kt)("p",null,"Stores that the process is an Primary (ReplSet) (event emitted when found in STDOUT)"),(0,o.kt)("h3",{id:"isinstanceready"},"isInstanceReady"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"isInstanceReady: boolean")," (event emitted when found in STDOUT)"),(0,o.kt)("p",null,"Stores that the process is fully started"),(0,o.kt)("h3",{id:"isreplset"},"isReplSet"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"isReplSet: boolean")),(0,o.kt)("p",null,"Stores that the process is in an ReplSet, is ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," when ",(0,o.kt)("a",{parentName:"p",href:"#instanceopts"},(0,o.kt)("inlineCode",{parentName:"a"},"instanceOpts.replSet"))," is defined and truthy"))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/1bdfe715.54c751d5.js b/versions/beta/assets/js/1bdfe715.54c751d5.js deleted file mode 100644 index 0d34eb744..000000000 --- a/versions/beta/assets/js/1bdfe715.54c751d5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[99],{3905:function(e,n,t){t.d(n,{Zo:function(){return d},kt:function(){return g}});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=r.createContext({}),p=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},d=function(e){var n=p(e.components);return r.createElement(l.Provider,{value:n},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),c=p(t),m=a,g=c["".concat(l,".").concat(m)]||c[m]||u[m]||o;return t?r.createElement(g,i(i({ref:n},d),{},{components:t})):r.createElement(g,i({ref:n},d))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=m;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[c]="string"==typeof e?e:a,i[1]=s;for(var p=2;p)")),(0,o.kt)("p",null,"Create an new Instance without starting it"),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"When directly starting the instance, ",(0,o.kt)("a",{parentName:"p",href:"#static-run"},(0,o.kt)("inlineCode",{parentName:"a"},"run"))," should be used")),(0,o.kt)("h3",{id:"debug"},"debug"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"private debug(msg: string): void")),(0,o.kt)("p",null,"Format input with debug-message template"),(0,o.kt)("h3",{id:"create"},"create"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"static async create(opts: Partial): Promise")),(0,o.kt)("p",null,"Create an new Instance and start it (while being an Promise)"),(0,o.kt)("h3",{id:"preparecommandargs"},"prepareCommandArgs"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"prepareCommandArgs(): string[]")),(0,o.kt)("p",null,"Constructs the Command Arguments"),(0,o.kt)("h3",{id:"start"},"start"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async start(): Promise")),(0,o.kt)("p",null,"Start the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," and the watcher processes"),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Currently does not check if the instance is in a correct state and just resets all values, see ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/nodkz/mongodb-memory-server/issues/662"},"#662"),".")),(0,o.kt)("h3",{id:"stop"},"stop"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async stop(): Promise")),(0,o.kt)("p",null,"Stop the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," and the watcher processes"),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Will not Error if instance is not running")),(0,o.kt)("h3",{id:"_launchmongod"},"_launchMongod"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"_launchMongod(mongoBin: string): ChildProcess")),(0,o.kt)("p",null,"Actually spawn the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process with ",(0,o.kt)("inlineCode",{parentName:"p"},"ChildProcess"),", used by ",(0,o.kt)("a",{parentName:"p",href:"#run"},(0,o.kt)("inlineCode",{parentName:"a"},"run"))),(0,o.kt)("h3",{id:"_launchkiller"},"_launchKiller"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"_launchKiller(parentPid: number, childPid: number): ChildProcess")),(0,o.kt)("p",null,"Spawn an killer process that keeps watch over the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process"),(0,o.kt)("h3",{id:"errorhandler"},"errorHandler"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"errorHandler(err: string): void")),(0,o.kt)("p",null,"Error handler for the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process"),(0,o.kt)("h3",{id:"closehandler"},"closeHandler"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"closeHandler(code: number, signal: string): void")),(0,o.kt)("p",null,"Close handler for the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process"),(0,o.kt)("h3",{id:"stderrhandler"},"stderrHandler"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"stderrHandler(message: string | Buffer): void")),(0,o.kt)("p",null,"STDERR handler for the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process"),(0,o.kt)("h3",{id:"stdouthandler"},"stdoutHandler"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"stdoutHandler(message: string | Buffer): void")),(0,o.kt)("p",null,"STDOUT handler for the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process",(0,o.kt)("br",{parentName:"p"}),"\n","Matches process output against known formats and raise events"),(0,o.kt)("h2",{id:"values"},"Values"),(0,o.kt)("h3",{id:"instanceopts"},"instanceOpts"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"instanceOpts: MongoInstanceOpts")),(0,o.kt)("p",null,"Stores the Instance Options"),(0,o.kt)("h3",{id:"binaryopts"},"binaryOpts"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"readonly binaryOpts: Readonly")),(0,o.kt)("p",null,"Stores the Binary Options"),(0,o.kt)("h3",{id:"spawnopts"},"spawnOpts"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"readonly spawnOpts: Readonly")),(0,o.kt)("p",null,"Stores the Spawn Options"),(0,o.kt)("h3",{id:"extraconnectionoptions"},"extraConnectionOptions"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"extraConnectionOptions?: MongoClientOptions")),(0,o.kt)("p",null,"Contains extra Connection options used for ",(0,o.kt)("inlineCode",{parentName:"p"},"mongoClient.connect"),", this is mainly used for authentication"),(0,o.kt)("h3",{id:"mongodprocess"},"mongodProcess"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodProcess?: ChildProcess")),(0,o.kt)("p",null,"Stores the active process reference for the ",(0,o.kt)("inlineCode",{parentName:"p"},"mongod")," process"),(0,o.kt)("h3",{id:"killerprocess"},"killerProcess"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"killerProcess?: ChildProcess")),(0,o.kt)("p",null,"Stores the active process reference for the killer process"),(0,o.kt)("h3",{id:"isinstanceprimary"},"isInstancePrimary"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"isInstancePrimary: boolean")),(0,o.kt)("p",null,"Stores that the process is an Primary (ReplSet) (event emitted when found in STDOUT)"),(0,o.kt)("h3",{id:"isinstanceready"},"isInstanceReady"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"isInstanceReady: boolean")," (event emitted when found in STDOUT)"),(0,o.kt)("p",null,"Stores that the process is fully started"),(0,o.kt)("h3",{id:"isreplset"},"isReplSet"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"isReplSet: boolean")),(0,o.kt)("p",null,"Stores that the process is in an ReplSet, is ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," when ",(0,o.kt)("a",{parentName:"p",href:"#instanceopts"},(0,o.kt)("inlineCode",{parentName:"a"},"instanceOpts.replSet"))," is defined and truthy"))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/1be78505.bd147cf0.js b/versions/beta/assets/js/1be78505.bd147cf0.js deleted file mode 100644 index 1cb606270..000000000 --- a/versions/beta/assets/js/1be78505.bd147cf0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[514,972],{9963:function(e,t,n){n.r(t),n.d(t,{default:function(){return Ie}});var a=n(7294),r=n(6010),o=n(833),l=n(5281),i=n(3320),c=n(3791),d=n(4477),s=n(1116),m=n(9439),u=n(5999),b=n(2466),p=n(5936);var v={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};function h(){var e=function(e){var t=e.threshold,n=(0,a.useState)(!1),r=n[0],o=n[1],l=(0,a.useRef)(!1),i=(0,b.Ct)(),c=i.startScroll,d=i.cancelScroll;return(0,b.RF)((function(e,n){var a=e.scrollY,r=null==n?void 0:n.scrollY;r&&(l.current?l.current=!1:a>=r?(d(),o(!1)):a=r?(d(),o(!1)):a=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),d=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=d(e.components);return a.createElement(p.Provider,{value:t},e.children)},k="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},N=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),k=d(n),N=r,c=k["".concat(p,".").concat(N)]||k[N]||s[N]||i;return n?a.createElement(c,o(o({ref:t},m),{},{components:n})):a.createElement(c,o({ref:t},m))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=N;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[k]="string"==typeof e?e:r,o[1]=l;for(var d=2;d=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),d=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=d(e.components);return a.createElement(p.Provider,{value:t},e.children)},k="mdxType",s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},N=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),k=d(n),N=r,c=k["".concat(p,".").concat(N)]||k[N]||s[N]||i;return n?a.createElement(c,o(o({ref:t},m),{},{components:n})):a.createElement(c,o({ref:t},m))}));function c(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=N;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[k]="string"==typeof e?e:r,o[1]=l;for(var d=2;d=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),l=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=l(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,p=e.parentName,m=s(e,["components","mdxType","originalType","parentName"]),u=l(n),d=r,k=u["".concat(p,".").concat(d)]||u[d]||c[d]||o;return n?a.createElement(k,i(i({ref:t},m),{},{components:n})):a.createElement(k,i({ref:t},m))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var l=2;l")),(0,o.kt)("p",null,"Create an new Instance and start it (while being an Promise), uses ",(0,o.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-opts"},(0,o.kt)("inlineCode",{parentName:"a"},"MongoMemoryServerOpts")),"."),(0,o.kt)("h3",{id:"statechange"},"stateChange"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"protected stateChange(newState: MongoMemoryServerStates): void")),(0,o.kt)("p",null,"Used to change the state of the class, uses ",(0,o.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-server-states"},(0,o.kt)("inlineCode",{parentName:"a"},"MongoMemoryServerStates")," enum"),", it is ",(0,o.kt)("inlineCode",{parentName:"p"},"protected")," to not accidentally use it."),(0,o.kt)("h3",{id:"start"},"start"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async start(forceSamePort: boolean = false): Promise")),(0,o.kt)("p",null,"Used to start an new Instance or to Re-Start an stopped instance"),(0,o.kt)("p",null,"with ",(0,o.kt)("inlineCode",{parentName:"p"},"forceSamePort")," set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," and having ",(0,o.kt)("inlineCode",{parentName:"p"},"instance.port")," set, it will use that port and not generate a new port.",(0,o.kt)("br",{parentName:"p"}),"\n","with ",(0,o.kt)("inlineCode",{parentName:"p"},"forceSamePort")," set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," and not having ",(0,o.kt)("inlineCode",{parentName:"p"},"instance.port")," set, it will generate a new free port. "),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Will Error if instance is already running")),(0,o.kt)("h3",{id:"getnewport"},"getNewPort"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"protected async getNewPort(port?: number): Promise")),(0,o.kt)("p",null,"Finds an new non-locked port, uses ",(0,o.kt)("inlineCode",{parentName:"p"},"port")," if available or as a starting point."),(0,o.kt)("h3",{id:"getstartoptions"},"getStartOptions"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"protected async getStartOptions(forceSamePort: boolean = false): Promise")),(0,o.kt)("p",null,"with ",(0,o.kt)("inlineCode",{parentName:"p"},"forceSamePort")," set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," and having ",(0,o.kt)("inlineCode",{parentName:"p"},"instance.port")," set, it will use that port and not generate a new port.",(0,o.kt)("br",{parentName:"p"}),"\n","with ",(0,o.kt)("inlineCode",{parentName:"p"},"forceSamePort")," set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," and not having ",(0,o.kt)("inlineCode",{parentName:"p"},"instance.port")," set, it will generate a new free port. "),(0,o.kt)("p",null,"Constructs the Starting Options"),(0,o.kt)("h3",{id:"_startupinstance"},"_startUpInstance"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async _startUpInstance(forceSamePort: boolean = false): Promise")),(0,o.kt)("p",null,"Internal Functions used by ",(0,o.kt)("a",{parentName:"p",href:"#start"},(0,o.kt)("inlineCode",{parentName:"a"},"start"))),(0,o.kt)("h3",{id:"stop"},"stop"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async stop(cleanupOptions?: Cleanup): Promise")),(0,o.kt)("p",null,"Stop an running instance, this function will by default call ",(0,o.kt)("a",{parentName:"p",href:"#cleanup"},(0,o.kt)("inlineCode",{parentName:"a"},".cleanup"))," with ",(0,o.kt)("inlineCode",{parentName:"p"},"{ doCleanup: true, force: false }"),"."),(0,o.kt)("p",null,"With ",(0,o.kt)("inlineCode",{parentName:"p"},"cleanupOptions")," options for cleanup can be manually set."),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Will not Error if instance is not running")),(0,o.kt)("h3",{id:"cleanup"},"cleanup"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async cleanup(options?: Cleanup): Promise")),(0,o.kt)("p",null,"Cleanup all files used by this instance, by default ",(0,o.kt)("inlineCode",{parentName:"p"},"{ doCleanup: true, force: false }")," is used."),(0,o.kt)("p",null,"With ",(0,o.kt)("inlineCode",{parentName:"p"},"options")," can be set how to run a cleanup."),(0,o.kt)("h3",{id:"ensureinstance"},"ensureInstance"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async ensureInstance(): Promise")),(0,o.kt)("p",null,"Ensure that the instance is running, will run ",(0,o.kt)("a",{parentName:"p",href:"#start"},(0,o.kt)("inlineCode",{parentName:"a"},"start"))," if stopped, will wait if state is ",(0,o.kt)("inlineCode",{parentName:"p"},"starting"),"."),(0,o.kt)("p",null,"It is recommended to ",(0,o.kt)("inlineCode",{parentName:"p"},"await")," the promise returned from ",(0,o.kt)("inlineCode",{parentName:"p"},"start")," when available."),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Will Error if instance cannot be started")),(0,o.kt)("h3",{id:"geturi"},"getUri"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"getUri(otherDbName?: string, otherIp?: string): string")),(0,o.kt)("p",null,"Get an mongodb-usable uri (can also be used in mongoose)"),(0,o.kt)("p",null,"When no arguments are set, the URI will always use ip ",(0,o.kt)("inlineCode",{parentName:"p"},"127.0.0.1")," and end with ",(0,o.kt)("inlineCode",{parentName:"p"},"/")," (not setting a database).",(0,o.kt)("br",{parentName:"p"}),"\n","When setting ",(0,o.kt)("inlineCode",{parentName:"p"},"otherDbName"),", the value of ",(0,o.kt)("inlineCode",{parentName:"p"},"otherDbName")," will be appended after ",(0,o.kt)("inlineCode",{parentName:"p"},"/")," and before any query arguments.",(0,o.kt)("br",{parentName:"p"}),"\n","When setting ",(0,o.kt)("inlineCode",{parentName:"p"},"otherIp"),", the ip will be the value of ",(0,o.kt)("inlineCode",{parentName:"p"},"otherIp")," instead of ",(0,o.kt)("inlineCode",{parentName:"p"},"127.0.0.1"),"."),(0,o.kt)("h3",{id:"createauth"},"createAuth"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async createAuth(data: StartupInstanceData): Promise")),(0,o.kt)("p",null,"Logs in into the currently running instance and restarts it with auth enabled"),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"The Instance will not be restarted if the storage engine is ",(0,o.kt)("inlineCode",{parentName:"p"},"ephemeralForTest")," because data will not persist across restarts",(0,o.kt)("br",null),"\nIt is still usefull if an user is always required in connection logic and mongodb throws an error that an user does not exists / cannot login")),(0,o.kt)("h2",{id:"values"},"Values"),(0,o.kt)("h3",{id:"instanceinfo"},"instanceInfo"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"get instanceInfo(): MongoInstanceData | undefined")),(0,o.kt)("p",null,"Getter for ",(0,o.kt)("a",{parentName:"p",href:"#_instanceInfo"},(0,o.kt)("inlineCode",{parentName:"a"},"_instanceInfo"))),(0,o.kt)("h3",{id:"_instanceinfo"},"_instanceInfo"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"protected _instanceInfo?: MongoInstanceData")),(0,o.kt)("p",null,"Stores the instance information"),(0,o.kt)("h3",{id:"opts"},"opts"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"opts: MongoMemoryServerOpts")),(0,o.kt)("p",null,"Store the instance options, uses ",(0,o.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-opts"},(0,o.kt)("inlineCode",{parentName:"a"},"MongoMemoryServerOpts")),"."),(0,o.kt)("h3",{id:"state"},"state"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"get state(): MongoMemoryServerStates")),(0,o.kt)("p",null,"Getter for ",(0,o.kt)("a",{parentName:"p",href:"#_state"},(0,o.kt)("inlineCode",{parentName:"a"},"_state_"))),(0,o.kt)("h3",{id:"_state"},"_state"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"protected _state: MongoMemoryServerStates")),(0,o.kt)("p",null,"Stores the current State, uses ",(0,o.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-server-states"},(0,o.kt)("inlineCode",{parentName:"a"},"MongoMemoryServerStates")," enum"),"."),(0,o.kt)("h3",{id:"auth"},"auth"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"readonly auth?: Required")),(0,o.kt)("p",null,"Stores automatic auth creation options, uses ",(0,o.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-automaticauth"},(0,o.kt)("inlineCode",{parentName:"a"},"AutomaticAuth"))," with all values defined."))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/28ece197.ec0a2f5d.js b/versions/beta/assets/js/28ece197.ec0a2f5d.js new file mode 100644 index 000000000..f47fe6a65 --- /dev/null +++ b/versions/beta/assets/js/28ece197.ec0a2f5d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[5898],{3905:function(e,t,n){n.d(t,{Zo:function(){return m},kt:function(){return k}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),l=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=l(e.components);return a.createElement(p.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,p=e.parentName,m=s(e,["components","mdxType","originalType","parentName"]),u=l(n),d=r,k=u["".concat(p,".").concat(d)]||u[d]||c[d]||o;return n?a.createElement(k,i(i({ref:t},m),{},{components:n})):a.createElement(k,i({ref:t},m))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=d;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var l=2;l")),(0,o.kt)("p",null,"Create an new Instance and start it (while being an Promise), uses ",(0,o.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-opts"},(0,o.kt)("inlineCode",{parentName:"a"},"MongoMemoryServerOpts")),"."),(0,o.kt)("h3",{id:"statechange"},"stateChange"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"protected stateChange(newState: MongoMemoryServerStates): void")),(0,o.kt)("p",null,"Used to change the state of the class, uses ",(0,o.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-server-states"},(0,o.kt)("inlineCode",{parentName:"a"},"MongoMemoryServerStates")," enum"),", it is ",(0,o.kt)("inlineCode",{parentName:"p"},"protected")," to not accidentally use it."),(0,o.kt)("h3",{id:"start"},"start"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async start(forceSamePort: boolean = false): Promise")),(0,o.kt)("p",null,"Used to start an new Instance or to Re-Start an stopped instance"),(0,o.kt)("p",null,"with ",(0,o.kt)("inlineCode",{parentName:"p"},"forceSamePort")," set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," and having ",(0,o.kt)("inlineCode",{parentName:"p"},"instance.port")," set, it will use that port and not generate a new port.",(0,o.kt)("br",{parentName:"p"}),"\n","with ",(0,o.kt)("inlineCode",{parentName:"p"},"forceSamePort")," set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," and not having ",(0,o.kt)("inlineCode",{parentName:"p"},"instance.port")," set, it will generate a new free port. "),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Will Error if instance is already running")),(0,o.kt)("h3",{id:"getnewport"},"getNewPort"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"protected async getNewPort(port?: number): Promise")),(0,o.kt)("p",null,"Finds an new non-locked port, uses ",(0,o.kt)("inlineCode",{parentName:"p"},"port")," if available or as a starting point."),(0,o.kt)("h3",{id:"getstartoptions"},"getStartOptions"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"protected async getStartOptions(forceSamePort: boolean = false): Promise")),(0,o.kt)("p",null,"with ",(0,o.kt)("inlineCode",{parentName:"p"},"forceSamePort")," set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," and having ",(0,o.kt)("inlineCode",{parentName:"p"},"instance.port")," set, it will use that port and not generate a new port.",(0,o.kt)("br",{parentName:"p"}),"\n","with ",(0,o.kt)("inlineCode",{parentName:"p"},"forceSamePort")," set to ",(0,o.kt)("inlineCode",{parentName:"p"},"true")," and not having ",(0,o.kt)("inlineCode",{parentName:"p"},"instance.port")," set, it will generate a new free port. "),(0,o.kt)("p",null,"Constructs the Starting Options"),(0,o.kt)("h3",{id:"_startupinstance"},"_startUpInstance"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async _startUpInstance(forceSamePort: boolean = false): Promise")),(0,o.kt)("p",null,"Internal Functions used by ",(0,o.kt)("a",{parentName:"p",href:"#start"},(0,o.kt)("inlineCode",{parentName:"a"},"start"))),(0,o.kt)("h3",{id:"stop"},"stop"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async stop(cleanupOptions?: Cleanup): Promise")),(0,o.kt)("p",null,"Stop an running instance, this function will by default call ",(0,o.kt)("a",{parentName:"p",href:"#cleanup"},(0,o.kt)("inlineCode",{parentName:"a"},".cleanup"))," with ",(0,o.kt)("inlineCode",{parentName:"p"},"{ doCleanup: true, force: false }"),"."),(0,o.kt)("p",null,"With ",(0,o.kt)("inlineCode",{parentName:"p"},"cleanupOptions")," options for cleanup can be manually set."),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Will not Error if instance is not running")),(0,o.kt)("h3",{id:"cleanup"},"cleanup"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async cleanup(options?: Cleanup): Promise")),(0,o.kt)("p",null,"Cleanup all files used by this instance, by default ",(0,o.kt)("inlineCode",{parentName:"p"},"{ doCleanup: true, force: false }")," is used."),(0,o.kt)("p",null,"With ",(0,o.kt)("inlineCode",{parentName:"p"},"options")," can be set how to run a cleanup."),(0,o.kt)("h3",{id:"ensureinstance"},"ensureInstance"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async ensureInstance(): Promise")),(0,o.kt)("p",null,"Ensure that the instance is running, will run ",(0,o.kt)("a",{parentName:"p",href:"#start"},(0,o.kt)("inlineCode",{parentName:"a"},"start"))," if stopped, will wait if state is ",(0,o.kt)("inlineCode",{parentName:"p"},"starting"),"."),(0,o.kt)("p",null,"It is recommended to ",(0,o.kt)("inlineCode",{parentName:"p"},"await")," the promise returned from ",(0,o.kt)("inlineCode",{parentName:"p"},"start")," when available."),(0,o.kt)("admonition",{type:"caution"},(0,o.kt)("p",{parentName:"admonition"},"Will Error if instance cannot be started")),(0,o.kt)("h3",{id:"geturi"},"getUri"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"getUri(otherDbName?: string, otherIp?: string): string")),(0,o.kt)("p",null,"Get an mongodb-usable uri (can also be used in mongoose)"),(0,o.kt)("p",null,"When no arguments are set, the URI will always use ip ",(0,o.kt)("inlineCode",{parentName:"p"},"127.0.0.1")," and end with ",(0,o.kt)("inlineCode",{parentName:"p"},"/")," (not setting a database).",(0,o.kt)("br",{parentName:"p"}),"\n","When setting ",(0,o.kt)("inlineCode",{parentName:"p"},"otherDbName"),", the value of ",(0,o.kt)("inlineCode",{parentName:"p"},"otherDbName")," will be appended after ",(0,o.kt)("inlineCode",{parentName:"p"},"/")," and before any query arguments.",(0,o.kt)("br",{parentName:"p"}),"\n","When setting ",(0,o.kt)("inlineCode",{parentName:"p"},"otherIp"),", the ip will be the value of ",(0,o.kt)("inlineCode",{parentName:"p"},"otherIp")," instead of ",(0,o.kt)("inlineCode",{parentName:"p"},"127.0.0.1"),"."),(0,o.kt)("h3",{id:"createauth"},"createAuth"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"async createAuth(data: StartupInstanceData): Promise")),(0,o.kt)("p",null,"Logs in into the currently running instance and restarts it with auth enabled"),(0,o.kt)("admonition",{type:"info"},(0,o.kt)("p",{parentName:"admonition"},"The Instance will not be restarted if the storage engine is ",(0,o.kt)("inlineCode",{parentName:"p"},"ephemeralForTest")," because data will not persist across restarts",(0,o.kt)("br",null),"\nIt is still usefull if an user is always required in connection logic and mongodb throws an error that an user does not exists / cannot login")),(0,o.kt)("h2",{id:"values"},"Values"),(0,o.kt)("h3",{id:"instanceinfo"},"instanceInfo"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"get instanceInfo(): MongoInstanceData | undefined")),(0,o.kt)("p",null,"Getter for ",(0,o.kt)("a",{parentName:"p",href:"#_instanceInfo"},(0,o.kt)("inlineCode",{parentName:"a"},"_instanceInfo"))),(0,o.kt)("h3",{id:"_instanceinfo"},"_instanceInfo"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"protected _instanceInfo?: MongoInstanceData")),(0,o.kt)("p",null,"Stores the instance information"),(0,o.kt)("h3",{id:"opts"},"opts"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"opts: MongoMemoryServerOpts")),(0,o.kt)("p",null,"Store the instance options, uses ",(0,o.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-opts"},(0,o.kt)("inlineCode",{parentName:"a"},"MongoMemoryServerOpts")),"."),(0,o.kt)("h3",{id:"state"},"state"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"get state(): MongoMemoryServerStates")),(0,o.kt)("p",null,"Getter for ",(0,o.kt)("a",{parentName:"p",href:"#_state"},(0,o.kt)("inlineCode",{parentName:"a"},"_state_"))),(0,o.kt)("h3",{id:"_state"},"_state"),(0,o.kt)("span",{class:"badge badge--warning"},"Internal"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"protected _state: MongoMemoryServerStates")),(0,o.kt)("p",null,"Stores the current State, uses ",(0,o.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-server-states"},(0,o.kt)("inlineCode",{parentName:"a"},"MongoMemoryServerStates")," enum"),"."),(0,o.kt)("h3",{id:"auth"},"auth"),(0,o.kt)("p",null,"Typings: ",(0,o.kt)("inlineCode",{parentName:"p"},"readonly auth?: Required")),(0,o.kt)("p",null,"Stores automatic auth creation options, uses ",(0,o.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-automaticauth"},(0,o.kt)("inlineCode",{parentName:"a"},"AutomaticAuth"))," with all values defined."))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/32c6e8e6.3b864a84.js b/versions/beta/assets/js/32c6e8e6.3b864a84.js new file mode 100644 index 000000000..9d5077489 --- /dev/null +++ b/versions/beta/assets/js/32c6e8e6.3b864a84.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[2182],{3905:function(e,n,t){t.d(n,{Zo:function(){return m},kt:function(){return g}});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var d=r.createContext({}),l=function(e){var n=r.useContext(d),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},m=function(e){var n=l(e.components);return r.createElement(d.Provider,{value:n},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},c=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,d=e.parentName,m=s(e,["components","mdxType","originalType","parentName"]),p=l(t),c=o,g=p["".concat(d,".").concat(c)]||p[c]||u[c]||i;return t?r.createElement(g,a(a({ref:n},m),{},{components:t})):r.createElement(g,a({ref:n},m))}));function g(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=c;var s={};for(var d in n)hasOwnProperty.call(n,d)&&(s[d]=n[d]);s.originalType=e,s[p]="string"==typeof e?e:o,a[1]=s;for(var l=2;l16",id:"minimal-nodejs-version-is-now-16",level:3},{value:"Mongodb Driver Version upgraded to 6.x",id:"mongodb-driver-version-upgraded-to-6x",level:3},{value:"Default binary version is now 7.x",id:"default-binary-version-is-now-7x",level:3},{value:"Non-Breaking changes / Additions",id:"non-breaking-changes--additions",level:2},{value:"Compiler target is now es2021",id:"compiler-target-is-now-es2021",level:3},{value:"Getport now uses net0listen by default",id:"getport-now-uses-net0listen-by-default",level:3}],u={toc:p},c="wrapper";function g(e){var n=e.components,t=(0,o.Z)(e,a);return(0,i.kt)(c,(0,r.Z)({},u,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Here are the Important changes made for 10.0.0"),(0,i.kt)("admonition",{title:"Important, Read this first",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"This Guide is written for migration from version ",(0,i.kt)("inlineCode",{parentName:"p"},"9.4.0")," to ",(0,i.kt)("inlineCode",{parentName:"p"},"10.0.0"),", for versions ",(0,i.kt)("inlineCode",{parentName:"p"},">10.0.0 <11.0.0"),", please consult the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/nodkz/mongodb-memory-server/blob/master/CHANGELOG.md"},"CHANGELOG"))),(0,i.kt)("h2",{id:"breaking-changes"},"Breaking Changes"),(0,i.kt)("h3",{id:"minimal-nodejs-version-is-now-16"},"Minimal NodeJS version is now ",(0,i.kt)("inlineCode",{parentName:"h3"},"16")),(0,i.kt)("p",null,"With 10.0.0 the minimal nodejs required is ",(0,i.kt)("inlineCode",{parentName:"p"},"16.20.1"),"."),(0,i.kt)("h3",{id:"mongodb-driver-version-upgraded-to-6x"},"Mongodb Driver Version upgraded to 6.x"),(0,i.kt)("p",null,"The used MongoDB Driver version is now ",(0,i.kt)("inlineCode",{parentName:"p"},"6.7.0"),"."),(0,i.kt)("h3",{id:"default-binary-version-is-now-7x"},"Default binary version is now 7.x"),(0,i.kt)("p",null,"The default binary version has been upgraded from ",(0,i.kt)("inlineCode",{parentName:"p"},"6.0.x")," to ",(0,i.kt)("inlineCode",{parentName:"p"},"7.0.x"),". For more specifics see ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/guides/mongodb-server-versions"},"mongodb-server-versions"),"."),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"In mongodb ",(0,i.kt)("inlineCode",{parentName:"p"},"7.0.0")," storage engine ",(0,i.kt)("inlineCode",{parentName:"p"},"ephemeralForTest")," has been removed, mongodb-memory-server will automatically translate any occurrence to ",(0,i.kt)("inlineCode",{parentName:"p"},"wiredTiger")," with a warning."),(0,i.kt)("p",{parentName:"admonition"},"It is recommended to run the tests against a tmpfs or equivalent (default ",(0,i.kt)("inlineCode",{parentName:"p"},"/tmp")," on linux / macos).")),(0,i.kt)("h2",{id:"non-breaking-changes--additions"},"Non-Breaking changes / Additions"),(0,i.kt)("h3",{id:"compiler-target-is-now-es2021"},"Compiler target is now ",(0,i.kt)("inlineCode",{parentName:"h3"},"es2021")),(0,i.kt)("p",null,"The tsconfig ",(0,i.kt)("inlineCode",{parentName:"p"},"target")," option has been updated to ",(0,i.kt)("inlineCode",{parentName:"p"},"es2021"),", which will result in less polyfills.\nThis should be a non-breaking change."),(0,i.kt)("h3",{id:"getport-now-uses-net0listen-by-default"},"Getport now uses ",(0,i.kt)("inlineCode",{parentName:"h3"},"net0listen")," by default"),(0,i.kt)("p",null,"This means a port is now generated by the engine (like nodejs) itself, previously known as ",(0,i.kt)("inlineCode",{parentName:"p"},"EXP_NET0LISTEN"),".\nThis should reduce amount of ",(0,i.kt)("inlineCode",{parentName:"p"},"Max port tries exceeded")," errors."))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/426.dd3b7fe9.js b/versions/beta/assets/js/426.dd3b7fe9.js deleted file mode 100644 index 05f55f55e..000000000 --- a/versions/beta/assets/js/426.dd3b7fe9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[426],{1426:function(e,t,r){function n(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t=3||2===r&&n>=4||1===r&&n>=10);function i(t,r,n){if(o&&void 0!==n){var i=n[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(p(r),[{headers:a}]))}else e.apply(void 0,[t].concat(p(r)))}return{init:function(t,r){e("init",{appId:t,apiKey:r})},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDsAfterSearch",g(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("clickedObjectIDs",g(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["clickedFilters"].concat(r))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDsAfterSearch",g(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&i("convertedObjectIDs",g(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,r=new Array(t),n=0;n0&&e.apply(void 0,["convertedFilters"].concat(r))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&t.reduce((function(e,t){var r=t.items,n=d(t,f);return[].concat(p(e),p(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n0&&e.apply(void 0,["viewedFilters"].concat(r))}}}function S(e){var t=e.items.reduce((function(e,t){var r;return e[t.__autocomplete_indexName]=(null!==(r=e[t.__autocomplete_indexName])&&void 0!==r?r:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function j(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function w(e){return w="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},w(e)}function E(e){return function(e){if(Array.isArray(e))return P(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 P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(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 P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&C({onItemsChange:o,items:r,insights:f,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,r=e.onSelect,n=e.onActive;s("addAlgoliaAgent","insights-plugin"),t({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:f}}),r((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&u({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Selected"},c({item:t,items:m.current}))]})})),n((function(e){var t=e.item,r=e.state,n=e.event;j(t)&&l({state:r,event:n,insights:f,item:t,insightsEvents:[D({eventName:"Item Active"},c({item:t,items:m.current}))]})}))},onStateChange:function(e){var t=e.state;p({state:t})},__autocomplete_pluginOptions:e}}function N(e){return N="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},N(e)}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==N(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===N(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e,t,r){var n,o=t.initialState;return{getState:function(){return o},dispatch:function(n,i){var a=function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0},reshape:function(e){return e.sources}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(V++),plugins:o,initialState:X({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(Q(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var r=[];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,r.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));r.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:a,onResolve:a};Object.keys(t).forEach((function(e){t[e].__default=!0}));var n=$($({},t),e);return Promise.resolve(n)})))}))}(e,r)}))).then((function(e){return L(e)})).then((function(e){return e.map((function(e){return X(X({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onActive:function(r){e.onActive(r),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,r)}))},onResolve:function(r){e.onResolve(r),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:X({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}function te(e){return te="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},te(e)}function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Ie,De,Ae,ke=null,xe=(Ie=-1,De=-1,Ae=void 0,function(e){var t=++Ie;return Promise.resolve(e).then((function(e){return Ae&&t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var Me=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function He(e){return He="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},He(e)}var Fe=["props","refresh","store"],Ue=["inputElement","formElement","panelElement"],Be=["inputElement"],Ve=["inputElement","maxLength"],Ke=["sourceIndex"],$e=["sourceIndex"],Je=["item","source","sourceIndex"];function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ge(e){var t=e.props,r=e.refresh,n=e.store,o=Ze(e,Fe),i=function(e,t){return void 0!==t?"".concat(e,"-").concat(t):e};return{getEnvironmentProps:function(e){var r=e.inputElement,o=e.formElement,i=e.panelElement;function a(e){!n.getState().isOpen&&n.pendingRequests.isEmpty()||e.target===r||!1===[o,i].some((function(t){return r=t,n=e.target,r===n||r.contains(n);var r,n}))&&(n.dispatch("blur",null),t.debug||n.pendingRequests.cancelAll())}return We({onTouchStart:a,onMouseDown:a,onTouchMove:function(e){!1!==n.getState().isOpen&&r===t.environment.document.activeElement&&e.target!==r&&r.blur()}},Ze(e,Ue))},getRootProps:function(e){return We({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return We({action:"",noValidate:!0,role:"search",onSubmit:function(i){var a;i.preventDefault(),t.onSubmit(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(a=e.inputElement)||void 0===a||a.blur()},onReset:function(i){var a;i.preventDefault(),t.onReset(We({event:i,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(a=e.inputElement)||void 0===a||a.focus()}},Ze(e,Be))},getLabelProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,Ke);return We({htmlFor:"".concat(i(t.id,n),"-input"),id:"".concat(i(t.id,n),"-label")},o)},getInputProps:function(e){var i;function c(e){(t.openOnFocus||Boolean(n.getState().query))&&Ce(We({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var u=e||{},l=(u.inputElement,u.maxLength),s=void 0===l?512:l,f=Ze(u,Ve),m=ge(n.getState()),p=function(e){return Boolean(e&&e.match(Me))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),v=null!=m&&m.itemUrl&&!p?"go":"search";return We({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().activeItemId?"".concat(t.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:v,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:s,type:"search",onChange:function(e){Ce(We({event:e,props:t,query:e.currentTarget.value.slice(0,s),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,i=Le(e,Ne);if("ArrowUp"===t.key||"ArrowDown"===t.key){var a=function(){var e=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},c=function(){var e=ge(o.getState());if(null!==o.getState().activeItemId&&e){var r=e.item,a=e.itemInputValue,c=e.itemUrl,u=e.source;u.onActive(qe({event:t,item:r,itemInputValue:a,itemUrl:c,refresh:n,source:u,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(r.openOnFocus||Boolean(o.getState().query))?Ce(qe({event:t,props:r,query:o.getState().query,refresh:n,store:o},i)).then((function(){o.dispatch(t.key,{nextActiveItemId:r.defaultActiveItemId}),c(),setTimeout(a,0)})):(o.dispatch(t.key,{}),c(),a())}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(r.debug||o.pendingRequests.cancelAll());t.preventDefault();var u=ge(o.getState()),l=u.item,s=u.itemInputValue,f=u.itemUrl,m=u.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(m.onSelect(qe({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewTab({itemUrl:f,item:l,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(m.onSelect(qe({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),r.navigator.navigateNewWindow({itemUrl:f,item:l,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return m.onSelect(qe({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i)),void r.navigator.navigate({itemUrl:f,item:l,state:o.getState()});Ce(qe({event:t,nextState:{isOpen:!1},props:r,query:s,refresh:n,store:o},i)).then((function(){m.onSelect(qe({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:n,source:m,state:o.getState()},i))}))}}}(We({event:e,props:t,refresh:r,store:n},o))},onFocus:c,onBlur:a,onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||c(r)}},f)},getPanelProps:function(e){return We({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){var r=e||{},n=r.sourceIndex,o=Ze(r,$e);return We({role:"listbox","aria-labelledby":"".concat(i(t.id,n),"-label"),id:"".concat(i(t.id,n),"-list")},o)},getItemProps:function(e){var a=e.item,c=e.source,u=e.sourceIndex,l=Ze(e,Je);return We({id:"".concat(i(t.id,u),"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=ge(n.getState());if(null!==n.getState().activeItemId&&t){var i=t.item,c=t.itemInputValue,u=t.itemUrl,l=t.source;l.onActive(We({event:e,item:i,itemInputValue:c,itemUrl:u,refresh:r,source:l,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),u=c.getItemUrl({item:a,state:n.getState()});(u?Promise.resolve():Ce(We({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(We({event:e,item:a,itemInputValue:i,itemUrl:u,refresh:r,source:c,state:n.getState()},o))}))}},l)}}}var Xe=[{segment:"autocomplete-core",version:"1.9.3"}];function Ye(e){return Ye="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},Ye(e)}function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t=r?null===n?null:0:o}function at(e){return at="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},at(e)}function ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ut(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function kt(e){var t=e.translations,r=void 0===t?{}:t,n=At(e,Pt),o=r.noResultsText,i=void 0===o?"No results for":o,a=r.suggestedQueryText,c=void 0===a?"Try searching for":a,u=r.reportMissingResultsText,l=void 0===u?"Believe this query should return results?":u,s=r.reportMissingResultsLinkText,f=void 0===s?"Let us know.":s,m=n.state.context.searchSuggestions;return yt.createElement("div",{className:"DocSearch-NoResults"},yt.createElement("div",{className:"DocSearch-Screen-Icon"},yt.createElement(Et,null)),yt.createElement("p",{className:"DocSearch-Title"},i,' "',yt.createElement("strong",null,n.state.query),'"'),m&&m.length>0&&yt.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},yt.createElement("p",{className:"DocSearch-Help"},c,":"),yt.createElement("ul",null,m.slice(0,3).reduce((function(e,t){return[].concat(It(e),[yt.createElement("li",{key:t},yt.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){n.setQuery(t.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},t))])}),[]))),n.getMissingResultsUrl&&yt.createElement("p",{className:"DocSearch-Help"},"".concat(l," "),yt.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var xt=function(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Ct(e){switch(e.type){case"lvl1":return yt.createElement(xt,null);case"content":return yt.createElement(Nt,null);default:return yt.createElement(_t,null)}}function _t(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Nt(){return yt.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Tt(){return yt.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},yt.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},yt.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),yt.createElement("path",{d:"M8 17l-6-6 6-6"})))}var qt=["hit","attribute","tagName"];function Rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ft(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function Ut(e){var t=e.hit,r=e.attribute,n=e.tagName,o=void 0===n?"span":n,i=Ht(e,qt);return(0,yt.createElement)(o,Lt(Lt({},i),{},{dangerouslySetInnerHTML:{__html:Ft(t,"_snippetResult.".concat(r,".value"))||Ft(t,r)}}))}function Bt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r|<\/mark>)/g,Wt=RegExp(zt.source);function Qt(e){var t,r,n=e;if(!n.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=((n.__docsearch_parent?null===(t=n.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(r=e._highlightResult)||void 0===r||null===(r=r.hierarchy)||void 0===r?void 0:r.lvl0)||{}).value;return o&&Wt.test(o)?o.replace(zt,""):o}function Zt(){return Zt=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function or(e){var t=e.translations,r=void 0===t?{}:t,n=nr(e,tr),o=r.recentSearchesTitle,i=void 0===o?"Recent":o,a=r.noRecentSearchesText,c=void 0===a?"No recent searches":a,u=r.saveRecentSearchButtonTitle,l=void 0===u?"Save this search":u,s=r.removeRecentSearchButtonTitle,f=void 0===s?"Remove this search from history":s,m=r.favoriteSearchesTitle,p=void 0===m?"Favorite":m,v=r.removeFavoriteSearchButtonTitle,d=void 0===v?"Remove this search from favorites":v;return"idle"===n.state.status&&!1===n.hasCollections?n.disableUserPersonalization?null:yt.createElement("div",{className:"DocSearch-StartScreen"},yt.createElement("p",{className:"DocSearch-Help"},c)):!1===n.hasCollections?null:yt.createElement("div",{className:"DocSearch-Dropdown-Container"},yt.createElement($t,rr({},n,{title:i,collection:n.state.collections[0],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Xt,null))},renderAction:function(e){var t=e.item,r=e.runFavoriteTransition,o=e.runDeleteTransition;return yt.createElement(yt.Fragment,null,yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:l,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.add(t),n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(Yt,null))),yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){n.recentSearches.remove(t),n.refresh()}))}},yt.createElement(er,null))))}})),yt.createElement($t,rr({},n,{title:p,collection:n.state.collections[1],renderIcon:function(){return yt.createElement("div",{className:"DocSearch-Hit-icon"},yt.createElement(Yt,null))},renderAction:function(e){var t=e.item,r=e.runDeleteTransition;return yt.createElement("div",{className:"DocSearch-Hit-action"},yt.createElement("button",{className:"DocSearch-Hit-action-button",title:d,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),r((function(){n.favoriteSearches.remove(t),n.refresh()}))}},yt.createElement(er,null)))}})))}var ir=["translations"];function ar(){return ar=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var ur=yt.memo((function(e){var t=e.translations,r=void 0===t?{}:t,n=cr(e,ir);if("error"===n.state.status)return yt.createElement(wt,{translations:null==r?void 0:r.errorScreen});var o=n.state.collections.some((function(e){return e.items.length>0}));return n.state.query?!1===o?yt.createElement(kt,ar({},n,{translations:null==r?void 0:r.noResultsScreen})):yt.createElement(Gt,n):yt.createElement(or,ar({},n,{hasCollections:o,translations:null==r?void 0:r.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function lr(){return yt.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},yt.createElement("g",{fill:"none",fillRule:"evenodd"},yt.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},yt.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),yt.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},yt.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var sr=r(830),fr=["translations"];function mr(){return mr=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function vr(e){var t=e.translations,r=void 0===t?{}:t,n=pr(e,fr),o=r.resetButtonTitle,i=void 0===o?"Clear the query":o,a=r.resetButtonAriaLabel,c=void 0===a?"Clear the query":a,u=r.cancelButtonText,l=void 0===u?"Cancel":u,s=r.cancelButtonAriaLabel,f=void 0===s?"Cancel":s,m=n.getFormProps({inputElement:n.inputRef.current}).onReset;return yt.useEffect((function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()}),[n.autoFocus,n.inputRef]),yt.useEffect((function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()}),[n.isFromSelection,n.inputRef]),yt.createElement(yt.Fragment,null,yt.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:m},yt.createElement("label",mr({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),yt.createElement(sr.W,null)),yt.createElement("div",{className:"DocSearch-LoadingIndicator"},yt.createElement(lr,null)),yt.createElement("input",mr({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:ht}))),yt.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":c,hidden:!n.state.query},yt.createElement(er,null))),yt.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:n.onClose},l))}var dr=["_highlightResult","_snippetResult"];function yr(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function hr(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function br(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=hr(t),i=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,yr(t,dr)),a=i.findIndex((function(e){return e.objectID===r.objectID}));a>-1&&i.splice(a,1),i.unshift(r),i=i.slice(0,n),o.setItem(i)},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),o.setItem(i)},getAll:function(){return i}}}function gr(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}"),i=e=>{n().setItem(t,JSON.stringify(e))};return{get(t,r,n={miss:()=>Promise.resolve()}){return Promise.resolve().then((()=>{(()=>{const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),n=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(i(n),!t)return;const a=Object.fromEntries(Object.entries(n).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+tPromise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||n.miss(e)]))).then((([e])=>e))},set(e,r){return Promise.resolve().then((()=>{const i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:r},n().setItem(t,JSON.stringify(i)),r}))},delete(e){return Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))}))},clear(){return Promise.resolve().then((()=>{n().removeItem(t)}))}}}function Or(e){const t=[...e.caches],r=t.shift();return void 0===r?{get(e,t,r={miss:()=>Promise.resolve()}){return t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e))},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}:{get(e,n,o={miss:()=>Promise.resolve()}){return r.get(e,n,o).catch((()=>Or({caches:t}).get(e,n,o)))},set(e,n){return r.set(e,n).catch((()=>Or({caches:t}).set(e,n)))},delete(e){return r.delete(e).catch((()=>Or({caches:t}).delete(e)))},clear(){return r.clear().catch((()=>Or({caches:t}).clear()))}}}function Sr(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const i=JSON.stringify(r);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);const a=n(),c=o&&o.miss||(()=>Promise.resolve());return a.then((e=>c(e))).then((()=>a))},set(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}function jr(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function wr(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Er(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Pr="4.20.0",Ir={WithinQueryParameters:0,WithinHeaders:1};function Dr(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Ar={Read:1,Write:2,Any:3},kr={Up:1,Down:2,Timeouted:3},xr=12e4;function Cr(e,t=kr.Up){return{...e,status:t,lastUpdate:Date.now()}}function _r(e){return"string"==typeof e?{protocol:"https",url:e,accept:Ar.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Ar.Any}}const Nr={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};function Tr(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(Cr(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===kr.Up||Date.now()-e.lastUpdate>xr}(e))),n=e.filter((e=>function(e){return e.status===kr.Timeouted&&Date.now()-e.lastUpdate<=xr}(e))),o=[...r,...n];return{getTimeout(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:o.length>0?o.map((e=>_r(e))):t}}))}const qr=(e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&0==~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSuccess(e):t.onFail(e);function Rr(e,t,r,n){const o=[],i=function(e,t){if(e.method===Nr.Get||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),a=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),c=r.method,u=r.method!==Nr.Get?{}:{...r.data,...n.data},l={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...u,...n.queryParameters};let s=0;const f=(t,u)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Fr(o)};const p={data:i,headers:a,method:c,url:Mr(m,r.path,l),connectTimeout:u(s,e.timeouts.connect),responseTimeout:u(s,n.timeout)},v=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},d={onSuccess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=v(r);return r.isTimedOut&&s++,Promise.all([e.logger.info("Retryable failure",Ur(n)),e.hostsCache.set(m,Cr(m,r.isTimedOut?kr.Timeouted:kr.Down))]).then((()=>f(t,u)))},onFail(e){throw v(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,Fr(o))}};return e.requester.send(p).then((e=>qr(e,d)))};return Tr(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function Lr(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function Mr(e,t,r){const n=Hr(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function Hr(e){return Object.keys(e).map((t=>{return Er("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function Fr(e){return e.map((e=>Ur(e)))}function Ur(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const Br=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers(){return e===Ir.WithinHeaders?n:{}},queryParameters(){return e===Ir.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:Ir.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,hosts:u,queryParameters:l,headers:s}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:i,timeouts:a,userAgent:c,headers:s,queryParameters:l,hosts:u.map((e=>_r(e))),read(e,t){const r=Dr(t,f.timeouts.read),n=()=>Rr(f,f.hosts.filter((e=>0!=(e.accept&Ar.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write(e,t){return Rr(f,f.hosts.filter((e=>0!=(e.accept&Ar.Write))),e,Dr(t,f.timeouts.write))}};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Ar.Read},{url:`${t}.algolia.net`,accept:Ar.Write}].concat(jr([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}}),o={transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache(){return Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))}};return wr(o,e.methods)},Vr=e=>(t,r)=>t.method===Nr.Get?e.transporter.read(t,r):e.transporter.write(t,r),Kr=e=>(t,r={})=>wr({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),$r=e=>(t,r)=>{const n=t.map((e=>({...e,params:Hr(e.params||{})})));return e.transporter.read({method:Nr.Post,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},Jr=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...i}=t.params;return Kr(e)(t.indexName,{methods:{searchForFacetValues:Qr}}).searchForFacetValues(n,o,{...r,...i})}))),zr=e=>(t,r,n)=>e.transporter.read({method:Nr.Post,path:Er("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),Wr=e=>(t,r)=>e.transporter.read({method:Nr.Post,path:Er("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),Qr=e=>(t,r,n)=>e.transporter.read({method:Nr.Post,path:Er("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),Zr={Debug:1,Info:2,Error:3};function Gr(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let i;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===i&&(clearTimeout(o),i=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(i),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(i),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(o=Zr.Error,{debug(e,t){return Zr.Debug>=o&&console.debug(e,t),Promise.resolve()},info(e,t){return Zr.Info>=o&&console.info(e,t),Promise.resolve()},error(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:Sr(),requestsCache:Sr({serializable:!1}),hostsCache:Or({caches:[gr({key:`${Pr}-${e}`}),Sr()]}),userAgent:Lr(Pr).add({segment:"Browser",version:"lite"}),authMode:Ir.WithinQueryParameters};var o;return Br({...n,...r,methods:{search:$r,searchForFacetValues:Jr,multipleQueries:$r,multipleSearchForFacetValues:Jr,customRequest:Vr,initIndex:e=>t=>Kr(e)(t,{methods:{search:Wr,searchForFacetValues:Qr,findAnswers:zr}})}})}Gr.version=Pr;var Xr=Gr,Yr="3.5.2";function en(){}function tn(e){return e}function rn(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function nn(e,t,r){return e.reduce((function(e,n){var o=t(n);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(r||5)&&e[o].push(n),e}),{})}var on=["footer","searchBox"];function an(){return an=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function pn(e){var t=e.appId,r=e.apiKey,n=e.indexName,o=e.placeholder,i=void 0===o?"Search docs":o,a=e.searchParameters,c=e.maxResultsPerGroup,u=e.onClose,l=void 0===u?en:u,s=e.transformItems,f=void 0===s?tn:s,m=e.hitComponent,p=void 0===m?St:m,v=e.resultsFooterComponent,d=void 0===v?function(){return null}:v,y=e.navigator,h=e.initialScrollY,b=void 0===h?0:h,g=e.transformSearchClient,O=void 0===g?tn:g,S=e.disableUserPersonalization,j=void 0!==S&&S,w=e.initialQuery,E=void 0===w?"":w,P=e.translations,I=void 0===P?{}:P,D=e.getMissingResultsUrl,A=e.insights,k=void 0!==A&&A,x=I.footer,C=I.searchBox,_=mn(I,on),N=sn(yt.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),T=N[0],q=N[1],R=yt.useRef(null),L=yt.useRef(null),M=yt.useRef(null),H=yt.useRef(null),F=yt.useRef(null),U=yt.useRef(10),B=yt.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,ht):"").current,V=yt.useRef(E||B).current,K=function(e,t,r){return yt.useMemo((function(){var n=Xr(e,t);return n.addAlgoliaAgent("docsearch",Yr),!1===/docsearch.js \(.*\)/.test(n.transporter.userAgent.value)&&n.addAlgoliaAgent("docsearch-react",Yr),r(n)}),[e,t,r])}(t,r,O),$=yt.useRef(br({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,J=yt.useRef(br({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:0===$.getAll().length?7:4})).current,z=yt.useCallback((function(e){if(!j){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===$.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&J.add(t)}}),[$,J,j]),W=yt.useCallback((function(e){if(T.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,r={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};T.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(r)}}),[T.context.algoliaInsightsPlugin]),Q=yt.useMemo((function(){return dt({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:V,context:{searchSuggestions:[]}},insights:k,navigator:y,onStateChange:function(e){q(e.state)},getSources:function(e){var o=e.query,i=e.state,u=e.setContext,s=e.setStatus;if(!o)return j?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),rn(r)||l()},getItemUrl:function(e){return e.item.url},getItems:function(){return J.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,r=e.event;z(t),rn(r)||l()},getItemUrl:function(e){return e.item.url},getItems:function(){return $.getAll()}}];var m=Boolean(k);return K.search([{query:o,indexName:n,params:un({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(U.current),"hierarchy.lvl2:".concat(U.current),"hierarchy.lvl3:".concat(U.current),"hierarchy.lvl4:".concat(U.current),"hierarchy.lvl5:".concat(U.current),"hierarchy.lvl6:".concat(U.current),"content:".concat(U.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:m},a)}]).catch((function(e){throw"RetryError"===e.name&&s("error"),e})).then((function(e){var o=e.results[0],a=o.hits,s=o.nbHits,p=nn(a,(function(e){return Qt(e)}),c);i.context.searchSuggestions.length0&&(X(),F.current&&F.current.focus())}),[V,X]),yt.useEffect((function(){function e(){if(L.current){var e=.01*window.innerHeight;L.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),yt.createElement("div",an({ref:R},G({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===T.status&&"DocSearch-Container--Stalled","error"===T.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&l()}}),yt.createElement("div",{className:"DocSearch-Modal",ref:L},yt.createElement("header",{className:"DocSearch-SearchBar",ref:M},yt.createElement(vr,an({},Q,{state:T,autoFocus:0===V.length,inputRef:F,isFromSelection:Boolean(V)&&V===B,translations:C,onClose:l}))),yt.createElement("div",{className:"DocSearch-Dropdown",ref:H},yt.createElement(ur,an({},Q,{indexName:n,state:T,hitComponent:p,resultsFooterComponent:d,disableUserPersonalization:j,recentSearches:J,favoriteSearches:$,inputRef:F,translations:_,getMissingResultsUrl:D,onItemClick:function(e,t){W(e),z(e),rn(t)||l()}}))),yt.createElement("footer",{className:"DocSearch-Footer"},yt.createElement(Ot,{translations:x}))))}}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/44df2d52.47924fb4.js b/versions/beta/assets/js/44df2d52.47924fb4.js new file mode 100644 index 000000000..166f88855 --- /dev/null +++ b/versions/beta/assets/js/44df2d52.47924fb4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[3118],{3905:function(e,t,n){n.d(t,{Zo:function(){return m},kt:function(){return g}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(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 i(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 s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),c=l(n),d=o,g=c["".concat(s,".").concat(d)]||c[d]||u[d]||a;return n?r.createElement(g,i(i({ref:t},m),{},{components:n})):r.createElement(g,i({ref:t},m))}));function g(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[c]="string"==typeof e?e:o,i[1]=p;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,m=p(e,["components","mdxType","originalType","parentName"]),c=l(n),d=a,g=c["".concat(s,".").concat(d)]||c[d]||u[d]||o;return n?r.createElement(g,i(i({ref:t},m),{},{components:n})):r.createElement(g,i({ref:t},m))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var p={};for(var s in t)hasOwnProperty.call(t,s)&&(p[s]=t[s]);p.originalType=e,p[c]="string"==typeof e?e:a,i[1]=p;for(var l=2;l=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=a.createContext({}),s=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(i.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),p=s(n),m=r,f=p["".concat(i,".").concat(m)]||p[m]||d[m]||o;return n?a.createElement(f,l(l({ref:t},c),{},{components:n})):a.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=m;var u={};for(var i in t)hasOwnProperty.call(t,i)&&(u[i]=t[i]);u.originalType=e,u[p]="string"==typeof e?e:r,l[1]=u;for(var s=2;s child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function f(e){var t=e.values,n=e.children;return(0,o.useMemo)((function(){var e=null!=t?t:m(n);return function(e){var t=(0,p.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function b(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function g(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId,r=(0,s.k6)(),l=function(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:n,groupId:a});return[(0,c._X)(l),(0,o.useCallback)((function(e){if(l){var t=new URLSearchParams(r.location.search);t.set(l,e),r.replace(Object.assign({},r.location,{search:t.toString()}))}}),[l,r])]}function v(e){var t,n,a,r,l=e.defaultValue,u=e.queryString,i=void 0!==u&&u,s=e.groupId,c=f(e),p=(0,o.useState)((function(){return function(e){var t,n=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!b({value:n,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var r=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:l,tabValues:c})})),m=p[0],v=p[1],h=g({queryString:i,groupId:s}),k=h[0],y=h[1],w=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:s}.groupId),n=(0,d.Nk)(t),a=n[0],r=n[1],[a,(0,o.useCallback)((function(e){t&&r.set(e)}),[t,r])]),N=w[0],T=w[1],E=function(){var e=null!=k?k:N;return b({value:e,tabValues:c})?e:null}();return(0,o.useLayoutEffect)((function(){E&&v(E)}),[E]),{selectedValue:m,selectValue:(0,o.useCallback)((function(e){if(!b({value:e,tabValues:c}))throw new Error("Can't select invalid tab value="+e);v(e),y(e),T(e)}),[y,T,c]),tabValues:c}}var h=n(2389),k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){var t=e.className,n=e.block,r=e.selectedValue,l=e.selectValue,s=e.tabValues,c=[],p=(0,i.o5)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=c.indexOf(t),a=s[n].value;a!==r&&(p(t),l(a))},m=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var a,r=c.indexOf(e.currentTarget)+1;n=null!=(a=c[r])?a:c[0];break;case"ArrowLeft":var o,l=c.indexOf(e.currentTarget)-1;n=null!=(o=c[l])?o:c[c.length-1]}null==(t=n)||t.focus()};return o.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,u.Z)("tabs",{"tabs--block":n},t)},s.map((function(e){var t=e.value,n=e.label,l=e.attributes;return o.createElement("li",(0,a.Z)({role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,key:t,ref:function(e){return c.push(e)},onKeyDown:m,onClick:d},l,{className:(0,u.Z)("tabs__item",k.tabItem,null==l?void 0:l.className,{"tabs__item--active":r===t})}),null!=n?n:t)})))}function w(e){var t=e.lazy,n=e.children,a=e.selectedValue,r=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var l=r.find((function(e){return e.props.value===a}));return l?(0,o.cloneElement)(l,{className:"margin-top--md"}):null}return o.createElement("div",{className:"margin-top--md"},r.map((function(e,t){return(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==a})})))}function N(e){var t=v(e);return o.createElement("div",{className:(0,u.Z)("tabs-container",k.tabList)},o.createElement(y,(0,a.Z)({},e,t)),o.createElement(w,(0,a.Z)({},e,t)))}function T(e){var t=(0,h.Z)();return o.createElement(N,(0,a.Z)({key:String(t)},e))}var E={tabItem:"tabItem_Ymn6"};function x(e){var t=e.children,n=e.hidden,a=e.className;return o.createElement("div",{role:"tabpanel",className:(0,u.Z)(E.tabItem,a),hidden:n},t)}var O=["components"],S={id:"test",title:"Docusaurus Testing"},C=void 0,D={unversionedId:"test",id:"test",title:"Docusaurus Testing",description:"This file is meant to show what Docusaurus is capable of and how it looks in this projects styles",source:"@site/../docs/test.mdx",sourceDirName:".",slug:"/test",permalink:"/mongodb-memory-server/versions/beta/docs/test",draft:!1,editUrl:"https://github.com/nodkz/mongodb-memory-server/edit/master/docs/../docs/test.mdx",tags:[],version:"current",frontMatter:{id:"test",title:"Docusaurus Testing"}},I={},j=[{value:"Callouts / Admonitions",id:"callouts--admonitions",level:2},{value:"Specify type and title",id:"specify-type-and-title",level:3},{value:"Badges",id:"badges",level:2},{value:"Tabs",id:"tabs",level:2},{value:"Extra Code Block Styling",id:"extra-code-block-styling",level:2}],V={toc:j},P="wrapper";function _(e){var t=e.components,n=(0,r.Z)(e,O);return(0,l.kt)(P,(0,a.Z)({},V,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"This file is meant to show what Docusaurus is capable of and how it looks in this projects styles"),(0,l.kt)("p",null,"Sources:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://docusaurus.io/docs/"},"Docusaurus Documentation")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://infima.dev/docs/getting-started/introduction"},"infima Documentation"))),(0,l.kt)("h2",{id:"callouts--admonitions"},"Callouts / Admonitions"),(0,l.kt)("admonition",{type:"note"},(0,l.kt)("p",{parentName:"admonition"},"The content and title ",(0,l.kt)("em",{parentName:"p"},"can")," include markdown.")),(0,l.kt)("admonition",{title:"You can specify an optional title",type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"Heads up! Here's a pro-tip.")),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Useful information.")),(0,l.kt)("admonition",{type:"caution"},(0,l.kt)("p",{parentName:"admonition"},"Warning! You better pay attention!")),(0,l.kt)("admonition",{type:"danger"},(0,l.kt)("p",{parentName:"admonition"},"Danger danger, mayday!")),(0,l.kt)("h3",{id:"specify-type-and-title"},"Specify type and title"),(0,l.kt)("admonition",{title:"Your Title",type:"note"},(0,l.kt)("p",{parentName:"admonition"},"The content and title ",(0,l.kt)("em",{parentName:"p"},"can")," include markdown.")),(0,l.kt)("h2",{id:"badges"},"Badges"),(0,l.kt)("span",{class:"badge badge--primary"},"Primary"),(0,l.kt)("span",{class:"badge badge--secondary"},"Secondary"),(0,l.kt)("span",{class:"badge badge--success"},"Success"),(0,l.kt)("span",{class:"badge badge--info"},"Info"),(0,l.kt)("span",{class:"badge badge--warning"},"Warning"),(0,l.kt)("span",{class:"badge badge--danger"},"Danger"),(0,l.kt)("h2",{id:"tabs"},"Tabs"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/docs/markdown-features/tabs"},"Tabs")),(0,l.kt)(T,{groupId:"test-tabs",mdxType:"Tabs"},(0,l.kt)(x,{value:"tab1",label:"Tab 1",default:!0,mdxType:"TabItem"},(0,l.kt)("p",null,"Hello Tab 1, text first"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-txt"},"Code in Tab 1\n"))),(0,l.kt)(x,{value:"tab2",label:"Tab 2",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-txt"},"Code in Tab 2\n")),(0,l.kt)("p",null,"Hello Tab 2, text last"))),(0,l.kt)("h2",{id:"extra-code-block-styling"},"Extra Code Block Styling"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/docs/markdown-features/code-blocks"},"Extra Code Block Styling")),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/docs/markdown-features/code-blocks#line-highlighting"},"Highlighting lines"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},'import something from "some";\n\n// highlight-start\nclass SomeClass {\n public hello?: string\n}\n// highlight-end\n\nexport SomeClass;\n')),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/docs/markdown-features/code-blocks#line-numbering"},"Line Numbering"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts",metastring:"showLineNumbers",showLineNumbers:!0},'import something from "some";\n\nclass SomeClass {\n public hello?: string\n}\n\nexport SomeClass;\n')),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/docs/markdown-features/code-blocks#npm2yarn-remark-plugin"},"Yarn & NPM"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash",metastring:"npm2yarn",npm2yarn:!0},"npm install somepackage\n")))}_.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/66a4ae68.d7687130.js b/versions/beta/assets/js/66a4ae68.d7687130.js deleted file mode 100644 index 6de8dd2e6..000000000 --- a/versions/beta/assets/js/66a4ae68.d7687130.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[646],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return f}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=a.createContext({}),s=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(i.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),p=s(n),m=r,f=p["".concat(i,".").concat(m)]||p[m]||d[m]||o;return n?a.createElement(f,l(l({ref:t},c),{},{components:n})):a.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,l=new Array(o);l[0]=m;var u={};for(var i in t)hasOwnProperty.call(t,i)&&(u[i]=t[i]);u.originalType=e,u[p]="string"==typeof e?e:r,l[1]=u;for(var s=2;s child <"+("string"==typeof e.type?e.type:e.type.name)+'>: all children of the component should be , and every should have a unique "value" prop.')})))?void 0:n.filter(Boolean))?t:[]}(e).map((function(e){var t=e.props;return{value:t.value,label:t.label,attributes:t.attributes,default:t.default}}))}function f(e){var t=e.values,n=e.children;return(0,o.useMemo)((function(){var e=null!=t?t:m(n);return function(e){var t=(0,p.l)(e,(function(e,t){return e.value===t.value}));if(t.length>0)throw new Error('Docusaurus error: Duplicate values "'+t.map((function(e){return e.value})).join(", ")+'" found in . Every value needs to be unique.')}(e),e}),[t,n])}function b(e){var t=e.value;return e.tabValues.some((function(e){return e.value===t}))}function g(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId,r=(0,s.k6)(),l=function(e){var t=e.queryString,n=void 0!==t&&t,a=e.groupId;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=a?a:null}({queryString:n,groupId:a});return[(0,c._X)(l),(0,o.useCallback)((function(e){if(l){var t=new URLSearchParams(r.location.search);t.set(l,e),r.replace(Object.assign({},r.location,{search:t.toString()}))}}),[l,r])]}function v(e){var t,n,a,r,l=e.defaultValue,u=e.queryString,i=void 0!==u&&u,s=e.groupId,c=f(e),p=(0,o.useState)((function(){return function(e){var t,n=e.defaultValue,a=e.tabValues;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!b({value:n,tabValues:a}))throw new Error('Docusaurus error: The has a defaultValue "'+n+'" but none of its children has the corresponding value. Available values are: '+a.map((function(e){return e.value})).join(", ")+". If you intend to show no default tab, use defaultValue={null} instead.");return n}var r=null!=(t=a.find((function(e){return e.default})))?t:a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:l,tabValues:c})})),m=p[0],v=p[1],h=g({queryString:i,groupId:s}),k=h[0],y=h[1],w=(t=function(e){return e?"docusaurus.tab."+e:null}({groupId:s}.groupId),n=(0,d.Nk)(t),a=n[0],r=n[1],[a,(0,o.useCallback)((function(e){t&&r.set(e)}),[t,r])]),N=w[0],T=w[1],E=function(){var e=null!=k?k:N;return b({value:e,tabValues:c})?e:null}();return(0,o.useLayoutEffect)((function(){E&&v(E)}),[E]),{selectedValue:m,selectValue:(0,o.useCallback)((function(e){if(!b({value:e,tabValues:c}))throw new Error("Can't select invalid tab value="+e);v(e),y(e),T(e)}),[y,T,c]),tabValues:c}}var h=n(2389),k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function y(e){var t=e.className,n=e.block,r=e.selectedValue,l=e.selectValue,s=e.tabValues,c=[],p=(0,i.o5)().blockElementScrollPositionUntilNextRender,d=function(e){var t=e.currentTarget,n=c.indexOf(t),a=s[n].value;a!==r&&(p(t),l(a))},m=function(e){var t,n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":var a,r=c.indexOf(e.currentTarget)+1;n=null!=(a=c[r])?a:c[0];break;case"ArrowLeft":var o,l=c.indexOf(e.currentTarget)-1;n=null!=(o=c[l])?o:c[c.length-1]}null==(t=n)||t.focus()};return o.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,u.Z)("tabs",{"tabs--block":n},t)},s.map((function(e){var t=e.value,n=e.label,l=e.attributes;return o.createElement("li",(0,a.Z)({role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,key:t,ref:function(e){return c.push(e)},onKeyDown:m,onClick:d},l,{className:(0,u.Z)("tabs__item",k.tabItem,null==l?void 0:l.className,{"tabs__item--active":r===t})}),null!=n?n:t)})))}function w(e){var t=e.lazy,n=e.children,a=e.selectedValue,r=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){var l=r.find((function(e){return e.props.value===a}));return l?(0,o.cloneElement)(l,{className:"margin-top--md"}):null}return o.createElement("div",{className:"margin-top--md"},r.map((function(e,t){return(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==a})})))}function N(e){var t=v(e);return o.createElement("div",{className:(0,u.Z)("tabs-container",k.tabList)},o.createElement(y,(0,a.Z)({},e,t)),o.createElement(w,(0,a.Z)({},e,t)))}function T(e){var t=(0,h.Z)();return o.createElement(N,(0,a.Z)({key:String(t)},e))}var E={tabItem:"tabItem_Ymn6"};function x(e){var t=e.children,n=e.hidden,a=e.className;return o.createElement("div",{role:"tabpanel",className:(0,u.Z)(E.tabItem,a),hidden:n},t)}var O=["components"],S={id:"test",title:"Docusaurus Testing"},C=void 0,D={unversionedId:"test",id:"test",title:"Docusaurus Testing",description:"This file is meant to show what Docusaurus is capable of and how it looks in this projects styles",source:"@site/../docs/test.mdx",sourceDirName:".",slug:"/test",permalink:"/mongodb-memory-server/versions/beta/docs/test",draft:!1,editUrl:"https://github.com/nodkz/mongodb-memory-server/edit/master/docs/../docs/test.mdx",tags:[],version:"current",frontMatter:{id:"test",title:"Docusaurus Testing"}},I={},j=[{value:"Callouts / Admonitions",id:"callouts--admonitions",level:2},{value:"Specify type and title",id:"specify-type-and-title",level:3},{value:"Badges",id:"badges",level:2},{value:"Tabs",id:"tabs",level:2},{value:"Extra Code Block Styling",id:"extra-code-block-styling",level:2}],V={toc:j},P="wrapper";function _(e){var t=e.components,n=(0,r.Z)(e,O);return(0,l.kt)(P,(0,a.Z)({},V,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"This file is meant to show what Docusaurus is capable of and how it looks in this projects styles"),(0,l.kt)("p",null,"Sources:"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://docusaurus.io/docs/"},"Docusaurus Documentation")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"https://infima.dev/docs/getting-started/introduction"},"infima Documentation"))),(0,l.kt)("h2",{id:"callouts--admonitions"},"Callouts / Admonitions"),(0,l.kt)("admonition",{type:"note"},(0,l.kt)("p",{parentName:"admonition"},"The content and title ",(0,l.kt)("em",{parentName:"p"},"can")," include markdown.")),(0,l.kt)("admonition",{title:"You can specify an optional title",type:"tip"},(0,l.kt)("p",{parentName:"admonition"},"Heads up! Here's a pro-tip.")),(0,l.kt)("admonition",{type:"info"},(0,l.kt)("p",{parentName:"admonition"},"Useful information.")),(0,l.kt)("admonition",{type:"caution"},(0,l.kt)("p",{parentName:"admonition"},"Warning! You better pay attention!")),(0,l.kt)("admonition",{type:"danger"},(0,l.kt)("p",{parentName:"admonition"},"Danger danger, mayday!")),(0,l.kt)("h3",{id:"specify-type-and-title"},"Specify type and title"),(0,l.kt)("admonition",{title:"Your Title",type:"note"},(0,l.kt)("p",{parentName:"admonition"},"The content and title ",(0,l.kt)("em",{parentName:"p"},"can")," include markdown.")),(0,l.kt)("h2",{id:"badges"},"Badges"),(0,l.kt)("span",{class:"badge badge--primary"},"Primary"),(0,l.kt)("span",{class:"badge badge--secondary"},"Secondary"),(0,l.kt)("span",{class:"badge badge--success"},"Success"),(0,l.kt)("span",{class:"badge badge--info"},"Info"),(0,l.kt)("span",{class:"badge badge--warning"},"Warning"),(0,l.kt)("span",{class:"badge badge--danger"},"Danger"),(0,l.kt)("h2",{id:"tabs"},"Tabs"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/docs/markdown-features/tabs"},"Tabs")),(0,l.kt)(T,{groupId:"test-tabs",mdxType:"Tabs"},(0,l.kt)(x,{value:"tab1",label:"Tab 1",default:!0,mdxType:"TabItem"},(0,l.kt)("p",null,"Hello Tab 1, text first"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-txt"},"Code in Tab 1\n"))),(0,l.kt)(x,{value:"tab2",label:"Tab 2",mdxType:"TabItem"},(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-txt"},"Code in Tab 2\n")),(0,l.kt)("p",null,"Hello Tab 2, text last"))),(0,l.kt)("h2",{id:"extra-code-block-styling"},"Extra Code Block Styling"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/docs/markdown-features/code-blocks"},"Extra Code Block Styling")),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/docs/markdown-features/code-blocks#line-highlighting"},"Highlighting lines"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},'import something from "some";\n\n// highlight-start\nclass SomeClass {\n public hello?: string\n}\n// highlight-end\n\nexport SomeClass;\n')),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/docs/markdown-features/code-blocks#line-numbering"},"Line Numbering"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts",metastring:"showLineNumbers",showLineNumbers:!0},'import something from "some";\n\nclass SomeClass {\n public hello?: string\n}\n\nexport SomeClass;\n')),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://docusaurus.io/docs/markdown-features/code-blocks#npm2yarn-remark-plugin"},"Yarn & NPM"),":"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-bash",metastring:"npm2yarn",npm2yarn:!0},"npm install somepackage\n")))}_.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/6945.709aa745.js b/versions/beta/assets/js/6945.709aa745.js new file mode 100644 index 000000000..0f9c79d46 --- /dev/null +++ b/versions/beta/assets/js/6945.709aa745.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[6945],{6945:function(e,s,r){r.r(s)}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/6d7d5585.19246c6d.js b/versions/beta/assets/js/6d7d5585.19246c6d.js new file mode 100644 index 000000000..6a586d036 --- /dev/null +++ b/versions/beta/assets/js/6d7d5585.19246c6d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[5181],{3905:function(e,n,t){t.d(n,{Zo:function(){return c},kt:function(){return g}});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=r.createContext({}),u=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=u(e.components);return r.createElement(l.Provider,{value:n},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(t),m=o,g=p["".concat(l,".").concat(m)]||p[m]||d[m]||a;return t?r.createElement(g,i(i({ref:n},c),{},{components:t})):r.createElement(g,i({ref:n},c))}));function g(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=m;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[p]="string"==typeof e?e:o,i[1]=s;for(var u=2;upackage.json config",id:"via-packagejson-config",level:3},{value:"Extra Notes",id:"extra-notes",level:2},{value:"npm quirks",id:"npm-quirks",level:3}],d={toc:p},m="wrapper";function g(e){var n=e.components,t=(0,o.Z)(e,i);return(0,a.kt)(m,(0,r.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The Debug Mode can be enabled by setting the ",(0,a.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#debug"},(0,a.kt)("inlineCode",{parentName:"a"},"DEBUG"))," config options, which can be done by either setting it as a ",(0,a.kt)("a",{parentName:"p",href:"../api/config-options#how-to-use-them-as-environment-variables"},"Environment Variable")," or ",(0,a.kt)("a",{parentName:"p",href:"../api/config-options#how-to-use-them-in-the-packagejson"},(0,a.kt)("inlineCode",{parentName:"a"},"package.json")," option"),"."),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("h3",{id:"via-environment-variable"},"Via Environment Variable"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},'# also available case-insensitive values: "on" "yes" "true"\nMONGOMS_DEBUG=1 npm run test\n')),(0,a.kt)("h3",{id:"via-packagejson-config"},"Via ",(0,a.kt)("inlineCode",{parentName:"h3"},"package.json")," config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "config": {\n "mongodbMemoryServer": {\n "debug": "1", // also available case-insensitive values: "on" "yes" "true"\n }\n }\n}\n')),(0,a.kt)("h2",{id:"extra-notes"},"Extra Notes"),(0,a.kt)("h3",{id:"npm-quirks"},"npm quirks"),(0,a.kt)("p",null,"Starting with NPM 7, scripts (like ",(0,a.kt)("inlineCode",{parentName:"p"},"postinstall"),") will run in parallel and will not output any logging, but sometimes in ",(0,a.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server")," it is required to provide the Debug Log from a ",(0,a.kt)("inlineCode",{parentName:"p"},"postinstall")," script."),(0,a.kt)("p",null,"Logging can be temporarly enabled with:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"# Change scripts to be executed on the NPM main proccess instead of workers AND log script output\nMONGOMS_DEBUG=1 npm install --foreground-scripts\n")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/6d7d5585.4f7500b1.js b/versions/beta/assets/js/6d7d5585.4f7500b1.js deleted file mode 100644 index 07d115d15..000000000 --- a/versions/beta/assets/js/6d7d5585.4f7500b1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[181],{3905:function(e,n,t){t.d(n,{Zo:function(){return c},kt:function(){return g}});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=r.createContext({}),u=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=u(e.components);return r.createElement(l.Provider,{value:n},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(t),m=o,g=p["".concat(l,".").concat(m)]||p[m]||d[m]||a;return t?r.createElement(g,i(i({ref:n},c),{},{components:t})):r.createElement(g,i({ref:n},c))}));function g(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=m;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[p]="string"==typeof e?e:o,i[1]=s;for(var u=2;upackage.json config",id:"via-packagejson-config",level:3},{value:"Extra Notes",id:"extra-notes",level:2},{value:"npm quirks",id:"npm-quirks",level:3}],d={toc:p},m="wrapper";function g(e){var n=e.components,t=(0,o.Z)(e,i);return(0,a.kt)(m,(0,r.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The Debug Mode can be enabled by setting the ",(0,a.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#debug"},(0,a.kt)("inlineCode",{parentName:"a"},"DEBUG"))," config options, which can be done by either setting it as a ",(0,a.kt)("a",{parentName:"p",href:"../api/config-options#how-to-use-them-as-environment-variables"},"Environment Variable")," or ",(0,a.kt)("a",{parentName:"p",href:"../api/config-options#how-to-use-them-in-the-packagejson"},(0,a.kt)("inlineCode",{parentName:"a"},"package.json")," option"),"."),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("h3",{id:"via-environment-variable"},"Via Environment Variable"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},'# also available case-insensitive values: "on" "yes" "true"\nMONGOMS_DEBUG=1 npm run test\n')),(0,a.kt)("h3",{id:"via-packagejson-config"},"Via ",(0,a.kt)("inlineCode",{parentName:"h3"},"package.json")," config"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "config": {\n "mongodbMemoryServer": {\n "debug": "1", // also available case-insensitive values: "on" "yes" "true"\n }\n }\n}\n')),(0,a.kt)("h2",{id:"extra-notes"},"Extra Notes"),(0,a.kt)("h3",{id:"npm-quirks"},"npm quirks"),(0,a.kt)("p",null,"Starting with NPM 7, scripts (like ",(0,a.kt)("inlineCode",{parentName:"p"},"postinstall"),") will run in parallel and will not output any logging, but sometimes in ",(0,a.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server")," it is required to provide the Debug Log from a ",(0,a.kt)("inlineCode",{parentName:"p"},"postinstall")," script."),(0,a.kt)("p",null,"Logging can be temporarly enabled with:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-sh"},"# Change scripts to be executed on the NPM main proccess instead of workers AND log script output\nMONGOMS_DEBUG=1 npm install --foreground-scripts\n")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/6fc6bd8d.6c5061d2.js b/versions/beta/assets/js/6fc6bd8d.6c5061d2.js deleted file mode 100644 index 730783208..000000000 --- a/versions/beta/assets/js/6fc6bd8d.6c5061d2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[84],{3905:function(e,t,n){n.d(t,{Zo:function(){return l},kt:function(){return y}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var m=r.createContext({}),p=function(e){var t=r.useContext(m),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},l=function(e){var t=p(e.components);return r.createElement(m.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,m=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),u=p(n),d=o,y=u["".concat(m,".").concat(d)]||u[d]||c[d]||i;return n?r.createElement(y,a(a({ref:t},l),{},{components:n})):r.createElement(y,a({ref:t},l))}));function y(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=d;var s={};for(var m in t)hasOwnProperty.call(t,m)&&(s[m]=t[m]);s.originalType=e,s[u]="string"==typeof e?e:o,a[1]=s;for(var p=2;p=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var m=r.createContext({}),p=function(e){var t=r.useContext(m),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},l=function(e){var t=p(e.components);return r.createElement(m.Provider,{value:t},e.children)},u="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,m=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),u=p(n),d=o,y=u["".concat(m,".").concat(d)]||u[d]||c[d]||i;return n?r.createElement(y,a(a({ref:t},l),{},{components:n})):r.createElement(y,a({ref:t},l))}));function y(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=d;var s={};for(var m in t)hasOwnProperty.call(t,m)&&(s[m]=t[m]);s.originalType=e,s[u]="string"==typeof e?e:o,a[1]=s;for(var p=2;p=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},l="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),l=s(n),m=o,f=l["".concat(p,".").concat(m)]||l[m]||d[m]||i;return n?r.createElement(f,a(a({ref:t},u),{},{components:n})):r.createElement(f,a({ref:t},u))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=m;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[l]="string"==typeof e?e:o,a[1]=c;for(var s=2;s=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),s=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(p.Provider,{value:t},e.children)},l="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),l=s(n),m=o,f=l["".concat(p,".").concat(m)]||l[m]||d[m]||i;return n?r.createElement(f,a(a({ref:t},u),{},{components:n})):r.createElement(f,a({ref:t},u))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=m;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[l]="string"==typeof e?e:o,a[1]=c;for(var s=2;s=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=r.createContext({}),p=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},c=function(e){var n=p(e.components);return r.createElement(l.Provider,{value:n},e.children)},m="mdxType",y={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},u=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=p(t),u=a,d=m["".concat(l,".").concat(u)]||m[u]||y[u]||i;return t?r.createElement(d,o(o({ref:n},c),{},{components:t})):r.createElement(d,o({ref:n},c))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=u;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[m]="string"==typeof e?e:a,o[1]=s;for(var p=2;p")),(0,i.kt)("p",null,"Try to locate a existing binary without downloading or touching the filesystem much."),(0,i.kt)("h3",{id:"generateoptions"},"generateOptions"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async generateOptions(opts?: DryMongoBinaryOptions): Promise>")),(0,i.kt)("p",null,"Generate a full ",(0,i.kt)("inlineCode",{parentName:"p"},"DryMongoBinaryOptions")," from partial input."),(0,i.kt)("h3",{id:"parsearchivenameregex"},"parseArchiveNameRegex"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static parseArchiveNameRegex(input: string, opts: Required): Required")),(0,i.kt)("p",null,"Parse a archive name into useable options."),(0,i.kt)("h3",{id:"getbinaryname"},"getBinaryName"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async getBinaryName(opts: DryMongoBinaryNameOptions): Promise")),(0,i.kt)("p",null,"Get what the binary name should be formatted like.",(0,i.kt)("br",{parentName:"p"}),"\n","If ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#use_archive_name_for_binary_name"},(0,i.kt)("inlineCode",{parentName:"a"},"USE_ARCHIVE_NAME_FOR_BINARY_NAME"))," is ",(0,i.kt)("inlineCode",{parentName:"p"},"true"),", then the archive name will be used instead of what MMS uses by default."),(0,i.kt)("h3",{id:"combinebinaryname"},"combineBinaryName"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static combineBinaryName(basePath: string, binaryName: string): string")),(0,i.kt)("p",null,"Helper function to consistently combine a ",(0,i.kt)("inlineCode",{parentName:"p"},"basePath")," with the ",(0,i.kt)("inlineCode",{parentName:"p"},"binaryName")," (eg. ",(0,i.kt)("inlineCode",{parentName:"p"},"/path/to/binary"),")"),(0,i.kt)("h3",{id:"getsytempath"},"getSytemPath"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async getSystemPath(systemBinary: string): Promise")),(0,i.kt)("p",null,"Check if the given path has all the permissions required to be executed."),(0,i.kt)("h3",{id:"generatepaths"},"generatePaths"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async generatePaths(opts: DryMongoBinaryOptions & DryMongoBinaryNameOptions): Promise")),(0,i.kt)("p",null,"Get the Paths where binaries may be located in."),(0,i.kt)("h3",{id:"generatedownloadpath"},"generateDownloadPath"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async generateDownloadPath(opts: DryMongoBinaryOptions & DryMongoBinaryNameOptions): Promise<[boolean, string]>")),(0,i.kt)("p",null,"Get the path where the binary will be downloaded to."),(0,i.kt)("h3",{id:"homedir"},"homedir"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"private static homedir(): string")),(0,i.kt)("p",null,"Used to get the Home-Dir of the current user, it is a function on the class for easy-mocking, because ",(0,i.kt)("inlineCode",{parentName:"p"},"os.homedir")," cannot be easily be mocked in jest."),(0,i.kt)("h2",{id:"values"},"Values"),(0,i.kt)("h3",{id:"binarycache"},"binaryCache"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static binaryCache: Map = new Map()")),(0,i.kt)("p",null,"Cache for already found binaries to not hit the filesystem too much."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/7f2a500a.f5729b7c.js b/versions/beta/assets/js/7f2a500a.f5729b7c.js new file mode 100644 index 000000000..dbe009bfa --- /dev/null +++ b/versions/beta/assets/js/7f2a500a.f5729b7c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[4695],{3905:function(e,n,t){t.d(n,{Zo:function(){return c},kt:function(){return d}});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l=r.createContext({}),p=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},c=function(e){var n=p(e.components);return r.createElement(l.Provider,{value:n},e.children)},m="mdxType",y={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},u=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),m=p(t),u=a,d=m["".concat(l,".").concat(u)]||m[u]||y[u]||i;return t?r.createElement(d,o(o({ref:n},c),{},{components:t})):r.createElement(d,o({ref:n},c))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=u;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[m]="string"==typeof e?e:a,o[1]=s;for(var p=2;p")),(0,i.kt)("p",null,"Try to locate a existing binary without downloading or touching the filesystem much."),(0,i.kt)("h3",{id:"generateoptions"},"generateOptions"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async generateOptions(opts?: DryMongoBinaryOptions): Promise>")),(0,i.kt)("p",null,"Generate a full ",(0,i.kt)("inlineCode",{parentName:"p"},"DryMongoBinaryOptions")," from partial input."),(0,i.kt)("h3",{id:"parsearchivenameregex"},"parseArchiveNameRegex"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static parseArchiveNameRegex(input: string, opts: Required): Required")),(0,i.kt)("p",null,"Parse a archive name into useable options."),(0,i.kt)("h3",{id:"getbinaryname"},"getBinaryName"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async getBinaryName(opts: DryMongoBinaryNameOptions): Promise")),(0,i.kt)("p",null,"Get what the binary name should be formatted like.",(0,i.kt)("br",{parentName:"p"}),"\n","If ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#use_archive_name_for_binary_name"},(0,i.kt)("inlineCode",{parentName:"a"},"USE_ARCHIVE_NAME_FOR_BINARY_NAME"))," is ",(0,i.kt)("inlineCode",{parentName:"p"},"true"),", then the archive name will be used instead of what MMS uses by default."),(0,i.kt)("h3",{id:"combinebinaryname"},"combineBinaryName"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static combineBinaryName(basePath: string, binaryName: string): string")),(0,i.kt)("p",null,"Helper function to consistently combine a ",(0,i.kt)("inlineCode",{parentName:"p"},"basePath")," with the ",(0,i.kt)("inlineCode",{parentName:"p"},"binaryName")," (eg. ",(0,i.kt)("inlineCode",{parentName:"p"},"/path/to/binary"),")"),(0,i.kt)("h3",{id:"getsytempath"},"getSytemPath"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async getSystemPath(systemBinary: string): Promise")),(0,i.kt)("p",null,"Check if the given path has all the permissions required to be executed."),(0,i.kt)("h3",{id:"generatepaths"},"generatePaths"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async generatePaths(opts: DryMongoBinaryOptions & DryMongoBinaryNameOptions): Promise")),(0,i.kt)("p",null,"Get the Paths where binaries may be located in."),(0,i.kt)("h3",{id:"generatedownloadpath"},"generateDownloadPath"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async generateDownloadPath(opts: DryMongoBinaryOptions & DryMongoBinaryNameOptions): Promise<[boolean, string]>")),(0,i.kt)("p",null,"Get the path where the binary will be downloaded to."),(0,i.kt)("h3",{id:"homedir"},"homedir"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"private static homedir(): string")),(0,i.kt)("p",null,"Used to get the Home-Dir of the current user, it is a function on the class for easy-mocking, because ",(0,i.kt)("inlineCode",{parentName:"p"},"os.homedir")," cannot be easily be mocked in jest."),(0,i.kt)("h2",{id:"values"},"Values"),(0,i.kt)("h3",{id:"binarycache"},"binaryCache"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static binaryCache: Map = new Map()")),(0,i.kt)("p",null,"Cache for already found binaries to not hit the filesystem too much."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/812a5cd9.7100ceac.js b/versions/beta/assets/js/812a5cd9.7100ceac.js new file mode 100644 index 000000000..37ee20cb3 --- /dev/null +++ b/versions/beta/assets/js/812a5cd9.7100ceac.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[6120],{3905:function(e,n,t){t.d(n,{Zo:function(){return d},kt:function(){return c}});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},d=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},k=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=p(t),k=a,c=u["".concat(s,".").concat(k)]||u[k]||m[k]||i;return t?r.createElement(c,o(o({ref:n},d),{},{components:t})):r.createElement(c,o({ref:n},d))}));function c(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=k;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var p=2;p=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},d=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},k=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=p(t),k=a,c=u["".concat(s,".").concat(k)]||u[k]||m[k]||i;return t?r.createElement(c,o(o({ref:n},d),{},{components:t})):r.createElement(c,o({ref:n},d))}));function c(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,o=new Array(i);o[0]=k;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[u]="string"==typeof e?e:a,o[1]=l;for(var p=2;p=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),m=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=m(e.components);return n.createElement(l.Provider,{value:t},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),c=m(r),f=o,d=c["".concat(l,".").concat(f)]||c[f]||p[f]||a;return r?n.createElement(d,i(i({ref:t},u),{},{components:r})):n.createElement(d,i({ref:t},u))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:o,i[1]=s;for(var m=2;m=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),m=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=m(e.components);return n.createElement(l.Provider,{value:t},e.children)},c="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),c=m(r),f=o,d=c["".concat(l,".").concat(f)]||c[f]||p[f]||a;return r?n.createElement(d,i(i({ref:t},u),{},{components:r})):n.createElement(d,i({ref:t},u))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:o,i[1]=s;for(var m=2;m=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=r.createContext({}),u=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},c=function(e){var n=u(e.components);return r.createElement(l.Provider,{value:n},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(t),m=o,b=d["".concat(l,".").concat(m)]||d[m]||p[m]||i;return t?r.createElement(b,a(a({ref:n},c),{},{components:t})):r.createElement(b,a({ref:n},c))}));function b(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=m;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[d]="string"==typeof e?e:o,a[1]=s;for(var u=2;u=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=r.createContext({}),u=function(e){var n=r.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},c=function(e){var n=u(e.components);return r.createElement(l.Provider,{value:n},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},m=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(t),m=o,b=d["".concat(l,".").concat(m)]||d[m]||p[m]||i;return t?r.createElement(b,a(a({ref:n},c),{},{components:t})):r.createElement(b,a({ref:n},c))}));function b(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=m;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[d]="string"==typeof e?e:o,a[1]=s;for(var u=2;u=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=o.createContext({}),p=function(e){var n=o.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):r(r({},n),e)),t},d=function(e){var n=p(e.components);return o.createElement(s.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},u=o.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),c=p(t),u=a,g=c["".concat(s,".").concat(u)]||c[u]||m[u]||i;return t?o.createElement(g,r(r({ref:n},d),{},{components:t})):o.createElement(g,r({ref:n},d))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,r=new Array(i);r[0]=u;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:a,r[1]=l;for(var p=2;p7.0.0 <8.0.0"),", please consult the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/nodkz/mongodb-memory-server/blob/master/CHANGELOG.md"},"CHANGELOG"))),(0,i.kt)("h2",{id:"requirement-changes"},"Requirement Changes"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Nodejs ",(0,i.kt)("inlineCode",{parentName:"li"},"10")," & ",(0,i.kt)("inlineCode",{parentName:"li"},"11")," are now unsupported, lowest supported version is now ",(0,i.kt)("inlineCode",{parentName:"li"},"14.0"))),(0,i.kt)("h2",{id:"breaking-changes"},"Breaking Changes"),(0,i.kt)("h3",{id:"no-function-other-than-start-create-ensureinstance-will-be-starting-anything"},"no function other than start, create, ensureInstance will be starting anything"),(0,i.kt)("p",null,"For 7.0.0, the only functions that start / wait for an starting instance will be ",(0,i.kt)("inlineCode",{parentName:"p"},"create"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"start")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"ensureInstance")),(0,i.kt)("p",null,"Example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"// this no longer works\nconst mongo = new MongoMemoryServer();\nconst uri = await mongo.getUri(); // ERROR: instance not started\n\n// it is now\nconst mongo = await MongoMemoryServer.create();\nconst uri = mongo.getUri();\n")),(0,i.kt)("h3",{id:"geturi-is-no-longer-async"},"getUri is no longer async"),(0,i.kt)("p",null,"For 7.0.0, all ",(0,i.kt)("inlineCode",{parentName:"p"},".getUri")," are now sync, see ",(0,i.kt)("a",{parentName:"p",href:"#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"},"this change")),(0,i.kt)("h3",{id:"new-no-longer-automatically-starts"},"new no longer automatically starts"),(0,i.kt)("p",null,"Until 7.0.0, ",(0,i.kt)("inlineCode",{parentName:"p"},"new")," (",(0,i.kt)("inlineCode",{parentName:"p"},"constructor"),") automatically started the instance, which is no longer the case, for this behaviour use ",(0,i.kt)("inlineCode",{parentName:"p"},".create"),", see ",(0,i.kt)("a",{parentName:"p",href:"#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"},"this change")),(0,i.kt)("h3",{id:"mongod-binaries-storage-path-changed"},"mongod binaries storage path changed"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"mongod")," binary path changed from ",(0,i.kt)("inlineCode",{parentName:"p"},"basePath/version/mongod")," to ",(0,i.kt)("inlineCode",{parentName:"p"},"basePath/mongod-arch-dist-version"),(0,i.kt)("br",{parentName:"p"}),"\n","This will make it easier to work with sharing the project folder (like host to docker)"),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This package will ",(0,i.kt)("strong",{parentName:"p"},"not")," delete the old binaries, these need to be manually deleted, see ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#download_dir"},"storage paths")," for where binaries are stored")),(0,i.kt)("h3",{id:"getconnectionstring-got-removed"},"getConnectionString got removed"),(0,i.kt)("p",null,"Function ",(0,i.kt)("inlineCode",{parentName:"p"},"getConnectionString")," got removed in favor of just ",(0,i.kt)("inlineCode",{parentName:"p"},"getUri")),(0,i.kt)("h3",{id:"mongoinstancewaitprimaryready-got-removed"},"MongoInstance.waitPrimaryReady got removed"),(0,i.kt)("p",null,"Function ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoInstance.prototype.waitPrimaryReady")," got removed, in favor of listening to event ",(0,i.kt)("inlineCode",{parentName:"p"},"instancePrimary")),(0,i.kt)("h3",{id:"functions-that-returned-public-values-on-classes-got-removed"},"Functions that returned public values on classes got removed"),(0,i.kt)("p",null,"Functions like ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoMemoryServer.prototype.getInstanceInfo")," got removed in favor of ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoMemoryServer.prototype.instanceInfo")," (readonly value)"),(0,i.kt)("p",null,"These include:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.getInstanceInfo")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.instanceInfo")," (readonly value)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.getPort")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.instanceInfo.port")," (readonly value)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.getDbPath")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.instanceInfo.dbPath")," (readonly value)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.getDbName")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.instanceInfo.dbName")," (readonly value)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryReplSet.prototype.getDbName")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryReplSet.prototype.opts.replSet.db")," (readonly value)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.getPid")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.mongodProcess.pid")," (readonly value)")),(0,i.kt)("h3",{id:"manager-class-functions-got-unified"},"Manager Class functions got unified"),(0,i.kt)("p",null,"Manager-Classes got unified, these include ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoMemoryServer"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoMemoryReplSet"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoInstance"),(0,i.kt)("br",{parentName:"p"}),"\n","This means that all of them have unified typings for ",(0,i.kt)("inlineCode",{parentName:"p"},"start"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"stop"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"create"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"getUri"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"cleanup")),(0,i.kt)("p",null,"This also includes function renames:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"(static) ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.run")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.create")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.run")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.start")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.kill")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.stop"))),(0,i.kt)("h3",{id:"geturi-by-default-does-not-include-any-dbname-anymore"},"getUri by default does not include any dbName anymore"),(0,i.kt)("p",null,"This was changed to allow mongodb and mongoose URI's to work at the same time (they slightly differ)."),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/nodkz/mongodb-memory-server/blob/3624253f509a54cff04997943894b9eb7e7e64fe/packages/mongodb-memory-server-core/src/util/utils.ts#L13-L17"},"See the code comment for more information")),(0,i.kt)("h2",{id:"non-breaking-changes--additions"},"Non-Breaking changes / Additions"),(0,i.kt)("h3",{id:"config-values-are-now-collected-in-an-enum"},"Config Values are now collected in an enum"),(0,i.kt)("p",null,"Config values like ",(0,i.kt)("inlineCode",{parentName:"p"},"DOWNLOAD_DIR")," are now collected in an enum called ",(0,i.kt)("inlineCode",{parentName:"p"},"ResolveConfigVariables"),", ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options"},"see more here")),(0,i.kt)("h3",{id:"config-helper-function-envname"},'Config helper function "envName"'),(0,i.kt)("p",null,"An helper function named ",(0,i.kt)("inlineCode",{parentName:"p"},"envName")," is introduced into 7.0.0, which does:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"// previously\nprocess.env[ENV_CONFIG_PREFIX + ResolveConfigVariables.DOWNLOAD_DIR] = 'someValue';\n\n// now\nprocess.env(envName(ResolveConfigVariables.DOWNLOAD_DIR)) = 'someValue';\n")),(0,i.kt)("p",null,"this does not only save space, but also provide direct auto-completion-suggestions for ",(0,i.kt)("inlineCode",{parentName:"p"},"ResolveConfigVariables")),(0,i.kt)("h3",{id:"all-manager-classes-are-now-extending-eventemitter"},"All Manager Classes are now extending EventEmitter"),(0,i.kt)("p",null,"All Manager-Classes are now extending ",(0,i.kt)("inlineCode",{parentName:"p"},"EventEmitter"),", which makes them easier to use and listen for changes"),(0,i.kt)("h3",{id:"automatic-authentication-creation"},"Automatic Authentication creation"),(0,i.kt)("p",null,"For 7.0.0 there is now Automatic Authentication created, which can be enabled by providing config option ",(0,i.kt)("inlineCode",{parentName:"p"},"auth")," in the code"),(0,i.kt)("p",null,"Example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},'// This will create an Auth-enabled instance with default auth-values\nconst mongoServer = await MongoMemoryServer.create({\n auth: {}, // anything else than "undefined / null" will enable auth, can be explicitly disabled with "auth: { disable: true }"\n instance: {\n auth: true,\n storageEngine: \'wiredTiger\',\n },\n});\n')),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"The Instance will not be restarted if the storage engine is ",(0,i.kt)("inlineCode",{parentName:"p"},"ephemeralForTest")," because data will not persist across restarts",(0,i.kt)("br",null))),(0,i.kt)("p",null,"For available Values look into either the source code or let intellisense show values"),(0,i.kt)("h3",{id:"explicit--implicit-cleanup"},"Explicit & Implicit Cleanup"),(0,i.kt)("p",null,"Cleanup behaviour can now be controlled, default is an ",(0,i.kt)("inlineCode",{parentName:"p"},"tmpDir")," that will get automatically removed on instance-stop / process exit, if it is not an ",(0,i.kt)("inlineCode",{parentName:"p"},"tmpDir")," then ",(0,i.kt)("inlineCode",{parentName:"p"},".cleanup")," needs to be manually called with ",(0,i.kt)("inlineCode",{parentName:"p"},"true")," (force) "),(0,i.kt)("p",null,"If persistence between restarts is wanted (even if it is an ",(0,i.kt)("inlineCode",{parentName:"p"},"tmpDir"),"), then call ",(0,i.kt)("inlineCode",{parentName:"p"},".stop")," with ",(0,i.kt)("inlineCode",{parentName:"p"},"false")," (",(0,i.kt)("inlineCode",{parentName:"p"},"cleanup")," for ",(0,i.kt)("inlineCode",{parentName:"p"},"tmpDir")," will still be run on process exit)"),(0,i.kt)("h3",{id:"replsets-can-now-gracefully-exit"},"ReplSet's can now gracefully exit"),(0,i.kt)("p",null,"Since Mongod ~4.2 replset's dont exit anymore on ",(0,i.kt)("inlineCode",{parentName:"p"},"SIGTERM")," if they cannot step-down (no other instance to give primary to)",(0,i.kt)("br",{parentName:"p"}),"\n","In 7.0.0 this is now handled with mongodb command ",(0,i.kt)("inlineCode",{parentName:"p"},"replSetStepDown: 1, force: true")),(0,i.kt)("h3",{id:"linux-distribution-detection-enhanced"},"Linux Distribution Detection enhanced"),(0,i.kt)("p",null,"For 7.0.0, the Linux Distribution Detection got enhanced, now preferring to use ",(0,i.kt)("inlineCode",{parentName:"p"},"/etc/upstream-release/lsb-release")," instead of the ",(0,i.kt)("inlineCode",{parentName:"p"},"/etc/")," ones, which enables based-on distributions to be easier mapped (and fallback correctly)"),(0,i.kt)("p",null,"This mostly impacts Debian based distros and Ubuntu based distros"),(0,i.kt)("h3",{id:"archlinux-got-somewhat-supported"},"ArchLinux got somewhat supported"),(0,i.kt)("p",null,"Some reports said that the ubuntu binaries work on arch, so there is now an automatic fallback to ubuntu binaries (MongoDB still dosnt have binaries for arch)"),(0,i.kt)("h3",{id:"runtime-downloads-can-now-be-disabled-or-explicitly-enabled"},"Runtime downloads can now be disabled or explicitly enabled"),(0,i.kt)("p",null,"Version 7.0.0 brings an new config value named ",(0,i.kt)("inlineCode",{parentName:"p"},"RUNTIME_DOWNLOAD"),", which is an boolean, to disable Runtime Downloads or explicitly enable them"),(0,i.kt)("h3",{id:"unified-common-errors"},"Unified Common Errors"),(0,i.kt)("p",null,"In pre-7.0.0, errors were all over the place, now the most common are unified into custom errors"))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/8f715786.763cd578.js b/versions/beta/assets/js/8f715786.763cd578.js new file mode 100644 index 000000000..a95b572b8 --- /dev/null +++ b/versions/beta/assets/js/8f715786.763cd578.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[2332],{3905:function(e,n,t){t.d(n,{Zo:function(){return d},kt:function(){return g}});var o=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function r(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s=o.createContext({}),p=function(e){var n=o.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):r(r({},n),e)),t},d=function(e){var n=p(e.components);return o.createElement(s.Provider,{value:n},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},u=o.forwardRef((function(e,n){var t=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),c=p(t),u=a,g=c["".concat(s,".").concat(u)]||c[u]||m[u]||i;return t?o.createElement(g,r(r({ref:n},d),{},{components:t})):o.createElement(g,r({ref:n},d))}));function g(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var i=t.length,r=new Array(i);r[0]=u;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[c]="string"==typeof e?e:a,r[1]=l;for(var p=2;p7.0.0 <8.0.0"),", please consult the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/nodkz/mongodb-memory-server/blob/master/CHANGELOG.md"},"CHANGELOG"))),(0,i.kt)("h2",{id:"requirement-changes"},"Requirement Changes"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Nodejs ",(0,i.kt)("inlineCode",{parentName:"li"},"10")," & ",(0,i.kt)("inlineCode",{parentName:"li"},"11")," are now unsupported, lowest supported version is now ",(0,i.kt)("inlineCode",{parentName:"li"},"14.0"))),(0,i.kt)("h2",{id:"breaking-changes"},"Breaking Changes"),(0,i.kt)("h3",{id:"no-function-other-than-start-create-ensureinstance-will-be-starting-anything"},"no function other than start, create, ensureInstance will be starting anything"),(0,i.kt)("p",null,"For 7.0.0, the only functions that start / wait for an starting instance will be ",(0,i.kt)("inlineCode",{parentName:"p"},"create"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"start")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"ensureInstance")),(0,i.kt)("p",null,"Example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"// this no longer works\nconst mongo = new MongoMemoryServer();\nconst uri = await mongo.getUri(); // ERROR: instance not started\n\n// it is now\nconst mongo = await MongoMemoryServer.create();\nconst uri = mongo.getUri();\n")),(0,i.kt)("h3",{id:"geturi-is-no-longer-async"},"getUri is no longer async"),(0,i.kt)("p",null,"For 7.0.0, all ",(0,i.kt)("inlineCode",{parentName:"p"},".getUri")," are now sync, see ",(0,i.kt)("a",{parentName:"p",href:"#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"},"this change")),(0,i.kt)("h3",{id:"new-no-longer-automatically-starts"},"new no longer automatically starts"),(0,i.kt)("p",null,"Until 7.0.0, ",(0,i.kt)("inlineCode",{parentName:"p"},"new")," (",(0,i.kt)("inlineCode",{parentName:"p"},"constructor"),") automatically started the instance, which is no longer the case, for this behaviour use ",(0,i.kt)("inlineCode",{parentName:"p"},".create"),", see ",(0,i.kt)("a",{parentName:"p",href:"#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"},"this change")),(0,i.kt)("h3",{id:"mongod-binaries-storage-path-changed"},"mongod binaries storage path changed"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"mongod")," binary path changed from ",(0,i.kt)("inlineCode",{parentName:"p"},"basePath/version/mongod")," to ",(0,i.kt)("inlineCode",{parentName:"p"},"basePath/mongod-arch-dist-version"),(0,i.kt)("br",{parentName:"p"}),"\n","This will make it easier to work with sharing the project folder (like host to docker)"),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"This package will ",(0,i.kt)("strong",{parentName:"p"},"not")," delete the old binaries, these need to be manually deleted, see ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#download_dir"},"storage paths")," for where binaries are stored")),(0,i.kt)("h3",{id:"getconnectionstring-got-removed"},"getConnectionString got removed"),(0,i.kt)("p",null,"Function ",(0,i.kt)("inlineCode",{parentName:"p"},"getConnectionString")," got removed in favor of just ",(0,i.kt)("inlineCode",{parentName:"p"},"getUri")),(0,i.kt)("h3",{id:"mongoinstancewaitprimaryready-got-removed"},"MongoInstance.waitPrimaryReady got removed"),(0,i.kt)("p",null,"Function ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoInstance.prototype.waitPrimaryReady")," got removed, in favor of listening to event ",(0,i.kt)("inlineCode",{parentName:"p"},"instancePrimary")),(0,i.kt)("h3",{id:"functions-that-returned-public-values-on-classes-got-removed"},"Functions that returned public values on classes got removed"),(0,i.kt)("p",null,"Functions like ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoMemoryServer.prototype.getInstanceInfo")," got removed in favor of ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoMemoryServer.prototype.instanceInfo")," (readonly value)"),(0,i.kt)("p",null,"These include:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.getInstanceInfo")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.instanceInfo")," (readonly value)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.getPort")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.instanceInfo.port")," (readonly value)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.getDbPath")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.instanceInfo.dbPath")," (readonly value)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.getDbName")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryServer.prototype.instanceInfo.dbName")," (readonly value)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryReplSet.prototype.getDbName")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoMemoryReplSet.prototype.opts.replSet.db")," (readonly value)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.getPid")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.mongodProcess.pid")," (readonly value)")),(0,i.kt)("h3",{id:"manager-class-functions-got-unified"},"Manager Class functions got unified"),(0,i.kt)("p",null,"Manager-Classes got unified, these include ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoMemoryServer"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoMemoryReplSet"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoInstance"),(0,i.kt)("br",{parentName:"p"}),"\n","This means that all of them have unified typings for ",(0,i.kt)("inlineCode",{parentName:"p"},"start"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"stop"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"create"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"getUri"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"cleanup")),(0,i.kt)("p",null,"This also includes function renames:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"(static) ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.run")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.create")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.run")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.start")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.kill")," -> ",(0,i.kt)("inlineCode",{parentName:"li"},"MongoInstance.prototype.stop"))),(0,i.kt)("h3",{id:"geturi-by-default-does-not-include-any-dbname-anymore"},"getUri by default does not include any dbName anymore"),(0,i.kt)("p",null,"This was changed to allow mongodb and mongoose URI's to work at the same time (they slightly differ)."),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/nodkz/mongodb-memory-server/blob/3624253f509a54cff04997943894b9eb7e7e64fe/packages/mongodb-memory-server-core/src/util/utils.ts#L13-L17"},"See the code comment for more information")),(0,i.kt)("h2",{id:"non-breaking-changes--additions"},"Non-Breaking changes / Additions"),(0,i.kt)("h3",{id:"config-values-are-now-collected-in-an-enum"},"Config Values are now collected in an enum"),(0,i.kt)("p",null,"Config values like ",(0,i.kt)("inlineCode",{parentName:"p"},"DOWNLOAD_DIR")," are now collected in an enum called ",(0,i.kt)("inlineCode",{parentName:"p"},"ResolveConfigVariables"),", ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options"},"see more here")),(0,i.kt)("h3",{id:"config-helper-function-envname"},'Config helper function "envName"'),(0,i.kt)("p",null,"An helper function named ",(0,i.kt)("inlineCode",{parentName:"p"},"envName")," is introduced into 7.0.0, which does:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"// previously\nprocess.env[ENV_CONFIG_PREFIX + ResolveConfigVariables.DOWNLOAD_DIR] = 'someValue';\n\n// now\nprocess.env(envName(ResolveConfigVariables.DOWNLOAD_DIR)) = 'someValue';\n")),(0,i.kt)("p",null,"this does not only save space, but also provide direct auto-completion-suggestions for ",(0,i.kt)("inlineCode",{parentName:"p"},"ResolveConfigVariables")),(0,i.kt)("h3",{id:"all-manager-classes-are-now-extending-eventemitter"},"All Manager Classes are now extending EventEmitter"),(0,i.kt)("p",null,"All Manager-Classes are now extending ",(0,i.kt)("inlineCode",{parentName:"p"},"EventEmitter"),", which makes them easier to use and listen for changes"),(0,i.kt)("h3",{id:"automatic-authentication-creation"},"Automatic Authentication creation"),(0,i.kt)("p",null,"For 7.0.0 there is now Automatic Authentication created, which can be enabled by providing config option ",(0,i.kt)("inlineCode",{parentName:"p"},"auth")," in the code"),(0,i.kt)("p",null,"Example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},'// This will create an Auth-enabled instance with default auth-values\nconst mongoServer = await MongoMemoryServer.create({\n auth: {}, // anything else than "undefined / null" will enable auth, can be explicitly disabled with "auth: { disable: true }"\n instance: {\n auth: true,\n storageEngine: \'wiredTiger\',\n },\n});\n')),(0,i.kt)("admonition",{type:"info"},(0,i.kt)("p",{parentName:"admonition"},"The Instance will not be restarted if the storage engine is ",(0,i.kt)("inlineCode",{parentName:"p"},"ephemeralForTest")," because data will not persist across restarts",(0,i.kt)("br",null))),(0,i.kt)("p",null,"For available Values look into either the source code or let intellisense show values"),(0,i.kt)("h3",{id:"explicit--implicit-cleanup"},"Explicit & Implicit Cleanup"),(0,i.kt)("p",null,"Cleanup behaviour can now be controlled, default is an ",(0,i.kt)("inlineCode",{parentName:"p"},"tmpDir")," that will get automatically removed on instance-stop / process exit, if it is not an ",(0,i.kt)("inlineCode",{parentName:"p"},"tmpDir")," then ",(0,i.kt)("inlineCode",{parentName:"p"},".cleanup")," needs to be manually called with ",(0,i.kt)("inlineCode",{parentName:"p"},"true")," (force) "),(0,i.kt)("p",null,"If persistence between restarts is wanted (even if it is an ",(0,i.kt)("inlineCode",{parentName:"p"},"tmpDir"),"), then call ",(0,i.kt)("inlineCode",{parentName:"p"},".stop")," with ",(0,i.kt)("inlineCode",{parentName:"p"},"false")," (",(0,i.kt)("inlineCode",{parentName:"p"},"cleanup")," for ",(0,i.kt)("inlineCode",{parentName:"p"},"tmpDir")," will still be run on process exit)"),(0,i.kt)("h3",{id:"replsets-can-now-gracefully-exit"},"ReplSet's can now gracefully exit"),(0,i.kt)("p",null,"Since Mongod ~4.2 replset's dont exit anymore on ",(0,i.kt)("inlineCode",{parentName:"p"},"SIGTERM")," if they cannot step-down (no other instance to give primary to)",(0,i.kt)("br",{parentName:"p"}),"\n","In 7.0.0 this is now handled with mongodb command ",(0,i.kt)("inlineCode",{parentName:"p"},"replSetStepDown: 1, force: true")),(0,i.kt)("h3",{id:"linux-distribution-detection-enhanced"},"Linux Distribution Detection enhanced"),(0,i.kt)("p",null,"For 7.0.0, the Linux Distribution Detection got enhanced, now preferring to use ",(0,i.kt)("inlineCode",{parentName:"p"},"/etc/upstream-release/lsb-release")," instead of the ",(0,i.kt)("inlineCode",{parentName:"p"},"/etc/")," ones, which enables based-on distributions to be easier mapped (and fallback correctly)"),(0,i.kt)("p",null,"This mostly impacts Debian based distros and Ubuntu based distros"),(0,i.kt)("h3",{id:"archlinux-got-somewhat-supported"},"ArchLinux got somewhat supported"),(0,i.kt)("p",null,"Some reports said that the ubuntu binaries work on arch, so there is now an automatic fallback to ubuntu binaries (MongoDB still dosnt have binaries for arch)"),(0,i.kt)("h3",{id:"runtime-downloads-can-now-be-disabled-or-explicitly-enabled"},"Runtime downloads can now be disabled or explicitly enabled"),(0,i.kt)("p",null,"Version 7.0.0 brings an new config value named ",(0,i.kt)("inlineCode",{parentName:"p"},"RUNTIME_DOWNLOAD"),", which is an boolean, to disable Runtime Downloads or explicitly enable them"),(0,i.kt)("h3",{id:"unified-common-errors"},"Unified Common Errors"),(0,i.kt)("p",null,"In pre-7.0.0, errors were all over the place, now the most common are unified into custom errors"))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/9082ebdf.48c9f20a.js b/versions/beta/assets/js/9082ebdf.48c9f20a.js new file mode 100644 index 000000000..44010c83f --- /dev/null +++ b/versions/beta/assets/js/9082ebdf.48c9f20a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[7895],{3905:function(e,t,r){r.d(t,{Zo:function(){return s},kt:function(){return b}});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),d=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=d(e.components);return n.createElement(l.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=m(e,["components","mdxType","originalType","parentName"]),p=d(r),g=a,b=p["".concat(l,".").concat(g)]||p[g]||c[g]||o;return r?n.createElement(b,i(i({ref:t},s),{},{components:r})):n.createElement(b,i({ref:t},s))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var m={};for(var l in t)hasOwnProperty.call(t,l)&&(m[l]=t[l]);m.originalType=e,m[p]="string"==typeof e?e:a,i[1]=m;for(var d=2;dmongodb-memory-server-core Version Table",id:"mongodb-memory-server-core-version-table",level:2},{value:"mongodb-memory-server-global-* Version Table",id:"mongodb-memory-server-global--version-table",level:2}],c={toc:p},g="wrapper";function b(e){var t=e.components,r=(0,a.Z)(e,i);return(0,o.kt)(g,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"This Guide will show what MongoDB Server versions are / were the default for versions of ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-core")," and the guidelines of when a version gets changed."),(0,o.kt)("p",null,(0,o.kt)("em",{parentName:"p"},(0,o.kt)("sub",null,"Some expressions will use ",(0,o.kt)("a",{parentName:"em",href:"https://www.npmjs.com/package/semver"},"npm's semver convention"),"."))),(0,o.kt)("h2",{id:"when-a-version-gets-upgraded"},"When a Version gets upgraded"),(0,o.kt)("p",null,"In a new major version of ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-core")," (",(0,o.kt)("inlineCode",{parentName:"p"},"X.0.0"),"), the default mongodb binary version may be upgraded to any newer version (",(0,o.kt)("inlineCode",{parentName:"p"},"X.X.X"),").",(0,o.kt)("br",{parentName:"p"}),"\n","In a minor version of ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-core")," (",(0,o.kt)("inlineCode",{parentName:"p"},"0.X.0"),"), the default mongodb binary version may be upgraded to the latest patch version ",(0,o.kt)("inlineCode",{parentName:"p"},"0.0.X"),".",(0,o.kt)("br",{parentName:"p"}),"\n","In a patch version of ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-core")," (",(0,o.kt)("inlineCode",{parentName:"p"},"0.0.X"),"), the default mongodb binary version will not be changed."),(0,o.kt)("p",null,"There are some exceptions:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"A mongodb binary may go offline (not being able to download it anymore), then the default version will be changed and a ",(0,o.kt)("em",{parentName:"li"},"minor")," (",(0,o.kt)("inlineCode",{parentName:"li"},"0.X.0"),") release will happen."),(0,o.kt)("li",{parentName:"ul"},"A mongodb binary may be broken, then the default version will be changed and a ",(0,o.kt)("em",{parentName:"li"},"minor")," (",(0,o.kt)("inlineCode",{parentName:"li"},"0.X.0"),") release will happen.")),(0,o.kt)("p",null,"The versions with a broken default binary may get deprecated (when possible)."),(0,o.kt)("p",null,"For Packages that are named with a version (like ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-global-4.2"),"), the patch version (",(0,o.kt)("inlineCode",{parentName:"p"},"0.0.X"),") of a binary may be changed with minor (",(0,o.kt)("inlineCode",{parentName:"p"},"0.X.0"),") releases."),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"Starting with MongoDB version 5.0, the default versions for ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-core")," will only be major ",(0,o.kt)("inlineCode",{parentName:"p"},"X.0.0")," versions (no ",(0,o.kt)("inlineCode",{parentName:"p"},"X.X.0")," versions), see ",(0,o.kt)("a",{parentName:"p",href:"https://docs.mongodb.com/manual/reference/versioning/#std-label-release-version-numbers"},"MongoDB Versioning"),".")),(0,o.kt)("h2",{id:"mongodb-memory-server-core-version-table"},(0,o.kt)("inlineCode",{parentName:"h2"},"mongodb-memory-server-core")," Version Table"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"th"},"mongodb-memory-server-core")," Version"),(0,o.kt)("th",{parentName:"tr",align:"center"},"Default MongoDB Version"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"10.0.x - 10.0.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"7.0.9")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"9.2.x - 9.2.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"6.0.14")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"9.0.x - 9.1.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"6.0.9")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"8.14.x - 8.16.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"5.0.19")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"8.13.x - 8.13.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"5.0.18")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"8.11.x - 8.12.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"5.0.13")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"8.6.x - 8.10.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"5.0.8")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"8.0.x - 8.5.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"5.0.3")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"7.5.x - 7.5.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.0.27")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"7.0.x - 7.4.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.0.25")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"6.4.x - 6.9.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.0.14")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"6.0.x - 6.4.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.0.3")))),(0,o.kt)("h2",{id:"mongodb-memory-server-global--version-table"},(0,o.kt)("inlineCode",{parentName:"h2"},"mongodb-memory-server-global-*")," Version Table"),(0,o.kt)("p",null,"This Section will show all ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-global-*")," packages that ever existed for this Project, what Version they provide in the latest version and what Branch they will be updated from."),(0,o.kt)("p",null,"If the branch is named like ",(0,o.kt)("inlineCode",{parentName:"p"},"old/"),", then it means that this package will not be updated for new major MMS versions anymore. (Example if the package is in ",(0,o.kt)("inlineCode",{parentName:"p"},"old/6.x"),", then it will not get any updates to MMS 7.0 or higher)"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:"center"},"Package Name"),(0,o.kt)("th",{parentName:"tr",align:"center"},"Provided MongoDB Version"),(0,o.kt)("th",{parentName:"tr",align:"center"},"Current Branch"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"mongodb-memory-server-global-4.4")),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.4.28"),(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"master"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"mongodb-memory-server-global-4.2")),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.2.24"),(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"master"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"mongodb-memory-server-global-4.0")),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.0.28"),(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"master"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"mongodb-memory-server-global-3.6")),(0,o.kt)("td",{parentName:"tr",align:"center"},"3.6.23"),(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"old/7.x"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"mongodb-memory-server-global-3.4")),(0,o.kt)("td",{parentName:"tr",align:"center"},"3.4.20"),(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"old/6.x"))))))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/9082ebdf.8f93a6fa.js b/versions/beta/assets/js/9082ebdf.8f93a6fa.js deleted file mode 100644 index a9b2e5d44..000000000 --- a/versions/beta/assets/js/9082ebdf.8f93a6fa.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[895],{3905:function(e,t,r){r.d(t,{Zo:function(){return s},kt:function(){return b}});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),d=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=d(e.components);return n.createElement(l.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,s=m(e,["components","mdxType","originalType","parentName"]),p=d(r),g=a,b=p["".concat(l,".").concat(g)]||p[g]||c[g]||o;return r?n.createElement(b,i(i({ref:t},s),{},{components:r})):n.createElement(b,i({ref:t},s))}));function b(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=g;var m={};for(var l in t)hasOwnProperty.call(t,l)&&(m[l]=t[l]);m.originalType=e,m[p]="string"==typeof e?e:a,i[1]=m;for(var d=2;dmongodb-memory-server-core Version Table",id:"mongodb-memory-server-core-version-table",level:2},{value:"mongodb-memory-server-global-* Version Table",id:"mongodb-memory-server-global--version-table",level:2}],c={toc:p},g="wrapper";function b(e){var t=e.components,r=(0,a.Z)(e,i);return(0,o.kt)(g,(0,n.Z)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"This Guide will show what MongoDB Server versions are / were the default for versions of ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-core")," and the guidelines of when a version gets changed."),(0,o.kt)("p",null,(0,o.kt)("em",{parentName:"p"},(0,o.kt)("sub",null,"Some expressions will use ",(0,o.kt)("a",{parentName:"em",href:"https://www.npmjs.com/package/semver"},"npm's semver convention"),"."))),(0,o.kt)("h2",{id:"when-a-version-gets-upgraded"},"When a Version gets upgraded"),(0,o.kt)("p",null,"In a new major version of ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-core")," (",(0,o.kt)("inlineCode",{parentName:"p"},"X.0.0"),"), the default mongodb binary version may be upgraded to any newer version (",(0,o.kt)("inlineCode",{parentName:"p"},"X.X.X"),").",(0,o.kt)("br",{parentName:"p"}),"\n","In a minor version of ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-core")," (",(0,o.kt)("inlineCode",{parentName:"p"},"0.X.0"),"), the default mongodb binary version may be upgraded to the latest patch version ",(0,o.kt)("inlineCode",{parentName:"p"},"0.0.X"),".",(0,o.kt)("br",{parentName:"p"}),"\n","In a patch version of ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-core")," (",(0,o.kt)("inlineCode",{parentName:"p"},"0.0.X"),"), the default mongodb binary version will not be changed."),(0,o.kt)("p",null,"There are some exceptions:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"A mongodb binary may go offline (not being able to download it anymore), then the default version will be changed and a ",(0,o.kt)("em",{parentName:"li"},"minor")," (",(0,o.kt)("inlineCode",{parentName:"li"},"0.X.0"),") release will happen."),(0,o.kt)("li",{parentName:"ul"},"A mongodb binary may be broken, then the default version will be changed and a ",(0,o.kt)("em",{parentName:"li"},"minor")," (",(0,o.kt)("inlineCode",{parentName:"li"},"0.X.0"),") release will happen.")),(0,o.kt)("p",null,"The versions with a broken default binary may get deprecated (when possible)."),(0,o.kt)("p",null,"For Packages that are named with a version (like ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-global-4.2"),"), the patch version (",(0,o.kt)("inlineCode",{parentName:"p"},"0.0.X"),") of a binary may be changed with minor (",(0,o.kt)("inlineCode",{parentName:"p"},"0.X.0"),") releases."),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"Starting with MongoDB version 5.0, the default versions for ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-core")," will only be major ",(0,o.kt)("inlineCode",{parentName:"p"},"X.0.0")," versions (no ",(0,o.kt)("inlineCode",{parentName:"p"},"X.X.0")," versions), see ",(0,o.kt)("a",{parentName:"p",href:"https://docs.mongodb.com/manual/reference/versioning/#std-label-release-version-numbers"},"MongoDB Versioning"),".")),(0,o.kt)("h2",{id:"mongodb-memory-server-core-version-table"},(0,o.kt)("inlineCode",{parentName:"h2"},"mongodb-memory-server-core")," Version Table"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"th"},"mongodb-memory-server-core")," Version"),(0,o.kt)("th",{parentName:"tr",align:"center"},"Default MongoDB Version"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"9.2.x - 9.2.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"6.0.14")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"9.0.x - 9.1.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"6.0.9")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"8.14.x - 8.16.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"5.0.19")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"8.13.x - 8.13.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"5.0.18")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"8.11.x - 8.12.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"5.0.13")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"8.6.x - 8.10.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"5.0.8")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"8.0.x - 8.5.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"5.0.3")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"7.5.x - 7.5.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.0.27")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"7.0.x - 7.4.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.0.25")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"6.4.x - 6.9.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.0.14")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"6.0.x - 6.4.x"),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.0.3")))),(0,o.kt)("h2",{id:"mongodb-memory-server-global--version-table"},(0,o.kt)("inlineCode",{parentName:"h2"},"mongodb-memory-server-global-*")," Version Table"),(0,o.kt)("p",null,"This Section will show all ",(0,o.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server-global-*")," packages that ever existed for this Project, what Version they provide in the latest version and what Branch they will be updated from."),(0,o.kt)("p",null,"If the branch is named like ",(0,o.kt)("inlineCode",{parentName:"p"},"old/"),", then it means that this package will not be updated for new major MMS versions anymore. (Example if the package is in ",(0,o.kt)("inlineCode",{parentName:"p"},"old/6.x"),", then it will not get any updates to MMS 7.0 or higher)"),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:"center"},"Package Name"),(0,o.kt)("th",{parentName:"tr",align:"center"},"Provided MongoDB Version"),(0,o.kt)("th",{parentName:"tr",align:"center"},"Current Branch"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"mongodb-memory-server-global-4.4")),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.4.28"),(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"master"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"mongodb-memory-server-global-4.2")),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.2.24"),(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"master"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"mongodb-memory-server-global-4.0")),(0,o.kt)("td",{parentName:"tr",align:"center"},"4.0.28"),(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"master"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"mongodb-memory-server-global-3.6")),(0,o.kt)("td",{parentName:"tr",align:"center"},"3.6.23"),(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"old/7.x"))),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"mongodb-memory-server-global-3.4")),(0,o.kt)("td",{parentName:"tr",align:"center"},"3.4.20"),(0,o.kt)("td",{parentName:"tr",align:"center"},(0,o.kt)("inlineCode",{parentName:"td"},"old/6.x"))))))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/935f2afb.20db8333.js b/versions/beta/assets/js/935f2afb.20db8333.js new file mode 100644 index 000000000..35e7f9140 --- /dev/null +++ b/versions/beta/assets/js/935f2afb.20db8333.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[53],{1109:function(e){e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"api":[{"type":"category","label":"Start","items":[{"type":"link","label":"Welcome to the API","href":"/mongodb-memory-server/versions/beta/docs/api/index-api","docId":"api/index-api"},{"type":"link","label":"Config Options","href":"/mongodb-memory-server/versions/beta/docs/api/config-options","docId":"api/config-options"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Classes","items":[{"type":"link","label":"MongoMemoryServer","href":"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-memory-server","docId":"api/classes/mongo-memory-server"},{"type":"link","label":"MongoMemoryReplSet","href":"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-memory-replset","docId":"api/classes/mongo-memory-replset"},{"type":"link","label":"MongoInstance","href":"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-instance","docId":"api/classes/mongo-instance"},{"type":"link","label":"MongoBinary","href":"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-binary","docId":"api/classes/mongo-binary"},{"type":"link","label":"DryMongoBinary","href":"/mongodb-memory-server/versions/beta/docs/api/classes/dry-mongo-binary","docId":"api/classes/dry-mongo-binary"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Enums","items":[{"type":"link","label":"MongoMemoryServerStates","href":"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-server-states","docId":"api/enums/mongo-memory-server-states"},{"type":"link","label":"MongoMemoryReplSetStates","href":"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-replset-states","docId":"api/enums/mongo-memory-replset-states"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Interfaces","items":[{"type":"link","label":"MongoMemoryServerOpts","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-opts","docId":"api/interfaces/mongo-memory-server-opts"},{"type":"link","label":"AutomaticAuth","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-automaticauth","docId":"api/interfaces/mongo-memory-server-automaticauth"},{"type":"link","label":"CreateUser","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-createuser","docId":"api/interfaces/mongo-memory-server-createuser"},{"type":"link","label":"MongoMemoryInstanceOpts","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-instance-opts","docId":"api/interfaces/mongo-memory-instance-opts"},{"type":"link","label":"ReplicaMemberConfig","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-instance-replicamemberconfig","docId":"api/interfaces/mongo-memory-instance-replicamemberconfig"},{"type":"link","label":"MongoBinaryOpts","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-binary-opts","docId":"api/interfaces/mongo-memory-binary-opts"},{"type":"link","label":"MongoMemoryReplSetOpts","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-replset-opts","docId":"api/interfaces/mongo-memory-replset-opts"},{"type":"link","label":"DisposeOptions","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-dispose-opts","docId":"api/interfaces/mongo-memory-dispose-opts"},{"type":"link","label":"ReplSetOpts","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/replset-opts","docId":"api/interfaces/replset-opts"}],"collapsed":true,"collapsible":true}],"guides":[{"type":"category","label":"Getting Started","items":[{"type":"link","label":"Quick Start Guide","href":"/mongodb-memory-server/versions/beta/docs/guides/quick-start-guide","docId":"guides/quick-start-guide"},{"type":"link","label":"Frequently Asked Questions","href":"/mongodb-memory-server/versions/beta/docs/guides/faq","docId":"guides/faq"},{"type":"link","label":"Known Issues","href":"/mongodb-memory-server/versions/beta/docs/guides/known-issues","docId":"guides/known-issues"},{"type":"link","label":"Supported Systems","href":"/mongodb-memory-server/versions/beta/docs/guides/supported-systems","docId":"guides/supported-systems"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Guides","items":[{"type":"category","label":"Integration Examples","items":[{"type":"link","label":"Integration with Test Runners","href":"/mongodb-memory-server/versions/beta/docs/guides/integration-examples/test-runners","docId":"guides/integration-examples/test-runners"},{"type":"link","label":"Integration with Docker","href":"/mongodb-memory-server/versions/beta/docs/guides/integration-examples/docker","docId":"guides/integration-examples/docker"}],"collapsed":true,"collapsible":true},{"type":"link","label":"Enable Debug Mode","href":"/mongodb-memory-server/versions/beta/docs/guides/enable-debug-mode","docId":"guides/enable-debug-mode"},{"type":"link","label":"Known Issues","href":"/mongodb-memory-server/versions/beta/docs/guides/known-issues","docId":"guides/known-issues"},{"type":"link","label":"Details for Errors & Warnings","href":"/mongodb-memory-server/versions/beta/docs/guides/error-warning-details","docId":"guides/error-warning-details"},{"type":"link","label":"Mongodb Server Versions","href":"/mongodb-memory-server/versions/beta/docs/guides/mongodb-server-versions","docId":"guides/mongodb-server-versions"},{"type":"link","label":"Common Issues","href":"/mongodb-memory-server/versions/beta/docs/guides/common-issues","docId":"guides/common-issues"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Migration","items":[{"type":"link","label":"Migrate to version 10.0.0","href":"/mongodb-memory-server/versions/beta/docs/guides/migration/migrate10","docId":"guides/migration/migrate10"},{"type":"link","label":"Migrate to version 9.0.0","href":"/mongodb-memory-server/versions/beta/docs/guides/migration/migrate9","docId":"guides/migration/migrate9"},{"type":"link","label":"Migrate to version 8.0.0","href":"/mongodb-memory-server/versions/beta/docs/guides/migration/migrate8","docId":"guides/migration/migrate8"},{"type":"link","label":"Migrate to version 7.0.0","href":"/mongodb-memory-server/versions/beta/docs/guides/migration/migrate7","docId":"guides/migration/migrate7"}],"collapsed":true,"collapsible":true}]},"docs":{"api/classes/dry-mongo-binary":{"id":"api/classes/dry-mongo-binary","title":"DryMongoBinary","description":"API Documentation of DryMongoBinary-Class","sidebar":"api"},"api/classes/mongo-binary":{"id":"api/classes/mongo-binary","title":"MongoBinary","description":"API Documentation of MongoBinary-Class","sidebar":"api"},"api/classes/mongo-instance":{"id":"api/classes/mongo-instance","title":"MongoInstance","description":"API Documentation of MongoInstance-Class","sidebar":"api"},"api/classes/mongo-memory-replset":{"id":"api/classes/mongo-memory-replset","title":"MongoMemoryReplSet","description":"API Documentation of MongoMemoryReplSet-Class","sidebar":"api"},"api/classes/mongo-memory-server":{"id":"api/classes/mongo-memory-server","title":"MongoMemoryServer","description":"API Documentation of MongoMemoryServer-Class","sidebar":"api"},"api/config-options":{"id":"api/config-options","title":"Config Options","description":"List of all Config Options","sidebar":"api"},"api/enums/mongo-memory-replset-states":{"id":"api/enums/mongo-memory-replset-states","title":"MongoMemoryReplSetStates","description":"API Documentation of MongoMemoryReplSetStates-Enum","sidebar":"api"},"api/enums/mongo-memory-server-states":{"id":"api/enums/mongo-memory-server-states","title":"MongoMemoryServerStates","description":"API Documentation of MongoMemoryServerStates-Enum","sidebar":"api"},"api/index-api":{"id":"api/index-api","title":"Welcome to the API","description":"In API will be documented what functions & values do, even internal protected / private ones","sidebar":"api"},"api/interfaces/mongo-memory-binary-opts":{"id":"api/interfaces/mongo-memory-binary-opts","title":"MongoBinaryOpts","description":"API Documentation of MongoBinaryOpts-Interface","sidebar":"api"},"api/interfaces/mongo-memory-dispose-opts":{"id":"api/interfaces/mongo-memory-dispose-opts","title":"DisposeOptions","description":"API Documentation of DisposeOptions-Interface","sidebar":"api"},"api/interfaces/mongo-memory-instance-opts":{"id":"api/interfaces/mongo-memory-instance-opts","title":"MongoMemoryInstanceOpts","description":"API Documentation of MongoMemoryInstanceOpts-Interface","sidebar":"api"},"api/interfaces/mongo-memory-instance-replicamemberconfig":{"id":"api/interfaces/mongo-memory-instance-replicamemberconfig","title":"ReplicaMemberConfig","description":"API Documentation of ReplicaMemberConfig-Interface","sidebar":"api"},"api/interfaces/mongo-memory-replset-opts":{"id":"api/interfaces/mongo-memory-replset-opts","title":"MongoMemoryReplSetOpts","description":"API Documentation of MongoMemoryReplSetOpts-Interface","sidebar":"api"},"api/interfaces/mongo-memory-server-automaticauth":{"id":"api/interfaces/mongo-memory-server-automaticauth","title":"AutomaticAuth","description":"API Documentation of AutomaticAuth-Interface","sidebar":"api"},"api/interfaces/mongo-memory-server-createuser":{"id":"api/interfaces/mongo-memory-server-createuser","title":"CreateUser","description":"API Documentation of CreateUser-Interface","sidebar":"api"},"api/interfaces/mongo-memory-server-opts":{"id":"api/interfaces/mongo-memory-server-opts","title":"MongoMemoryServerOpts","description":"API Documentation of MongoMemoryServerOpts-Interface","sidebar":"api"},"api/interfaces/replset-opts":{"id":"api/interfaces/replset-opts","title":"ReplSetOpts","description":"API Documentation of ReplSetOpts-Interface","sidebar":"api"},"guides/common-issues":{"id":"guides/common-issues","title":"Common Issues","description":"There are some common issues you may encounter with mongodb-memory-server (or also manually handling mongod instances), this guide will try to explain why they happen how to fix those issues.","sidebar":"guides"},"guides/enable-debug-mode":{"id":"guides/enable-debug-mode","title":"Enable Debug Mode","description":"The Debug Mode can be enabled by setting the DEBUG config options, which can be done by either setting it as a Environment Variable or package.json option.","sidebar":"guides"},"guides/error-warning-details":{"id":"guides/error-warning-details","title":"Details for Errors & Warnings","description":"StateError","sidebar":"guides"},"guides/faq":{"id":"guides/faq","title":"Frequently Asked Questions","description":"Do binaries get automatically deleted?","sidebar":"guides"},"guides/integration-examples/docker":{"id":"guides/integration-examples/docker","title":"Integration with Docker","description":"This Guide will show how mongodb-memory-server can be used with Docker & dockerfiles.","sidebar":"guides"},"guides/integration-examples/test-runners":{"id":"guides/integration-examples/test-runners","title":"Integration with Test Runners","description":"This Guide will show how mongodb-memory-server can be used with different frameworks","sidebar":"guides"},"guides/known-issues":{"id":"guides/known-issues","title":"Known Issues","description":"ArchLinux on Docker","sidebar":"guides"},"guides/migration/migrate10":{"id":"guides/migration/migrate10","title":"Migrate to version 10.0.0","description":"Here are the Important changes made for 10.0.0","sidebar":"guides"},"guides/migration/migrate7":{"id":"guides/migration/migrate7","title":"Migrate to version 7.0.0","description":"Here are the Important changes made for 7.0.0","sidebar":"guides"},"guides/migration/migrate8":{"id":"guides/migration/migrate8","title":"Migrate to version 8.0.0","description":"Here are the Important changes made for 8.0.0","sidebar":"guides"},"guides/migration/migrate9":{"id":"guides/migration/migrate9","title":"Migrate to version 9.0.0","description":"Here are the Important changes made for 9.0.0","sidebar":"guides"},"guides/mongodb-server-versions":{"id":"guides/mongodb-server-versions","title":"Mongodb Server Versions","description":"This Guide will show what MongoDB Server versions are / were the default for versions of mongodb-memory-server-core and the guidelines of when a version gets changed.","sidebar":"guides"},"guides/quick-start-guide":{"id":"guides/quick-start-guide","title":"Quick Start Guide","description":"This Guide will show how to setup this package for basic use","sidebar":"guides"},"guides/supported-systems":{"id":"guides/supported-systems","title":"Supported Systems","description":"Currently Supported platforms:","sidebar":"guides"},"test":{"id":"test","title":"Docusaurus Testing","description":"This file is meant to show what Docusaurus is capable of and how it looks in this projects styles"}}}')}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/935f2afb.5fdaff59.js b/versions/beta/assets/js/935f2afb.5fdaff59.js deleted file mode 100644 index 298429c8b..000000000 --- a/versions/beta/assets/js/935f2afb.5fdaff59.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[53],{1109:function(e){e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"api":[{"type":"category","label":"Start","items":[{"type":"link","label":"Welcome to the API","href":"/mongodb-memory-server/versions/beta/docs/api/index-api","docId":"api/index-api"},{"type":"link","label":"Config Options","href":"/mongodb-memory-server/versions/beta/docs/api/config-options","docId":"api/config-options"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Classes","items":[{"type":"link","label":"MongoMemoryServer","href":"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-memory-server","docId":"api/classes/mongo-memory-server"},{"type":"link","label":"MongoMemoryReplSet","href":"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-memory-replset","docId":"api/classes/mongo-memory-replset"},{"type":"link","label":"MongoInstance","href":"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-instance","docId":"api/classes/mongo-instance"},{"type":"link","label":"MongoBinary","href":"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-binary","docId":"api/classes/mongo-binary"},{"type":"link","label":"DryMongoBinary","href":"/mongodb-memory-server/versions/beta/docs/api/classes/dry-mongo-binary","docId":"api/classes/dry-mongo-binary"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Enums","items":[{"type":"link","label":"MongoMemoryServerStates","href":"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-server-states","docId":"api/enums/mongo-memory-server-states"},{"type":"link","label":"MongoMemoryReplSetStates","href":"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-replset-states","docId":"api/enums/mongo-memory-replset-states"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Interfaces","items":[{"type":"link","label":"MongoMemoryServerOpts","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-opts","docId":"api/interfaces/mongo-memory-server-opts"},{"type":"link","label":"AutomaticAuth","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-automaticauth","docId":"api/interfaces/mongo-memory-server-automaticauth"},{"type":"link","label":"CreateUser","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-server-createuser","docId":"api/interfaces/mongo-memory-server-createuser"},{"type":"link","label":"MongoMemoryInstanceOpts","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-instance-opts","docId":"api/interfaces/mongo-memory-instance-opts"},{"type":"link","label":"ReplicaMemberConfig","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-instance-replicamemberconfig","docId":"api/interfaces/mongo-memory-instance-replicamemberconfig"},{"type":"link","label":"MongoBinaryOpts","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-binary-opts","docId":"api/interfaces/mongo-memory-binary-opts"},{"type":"link","label":"MongoMemoryReplSetOpts","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/mongo-memory-replset-opts","docId":"api/interfaces/mongo-memory-replset-opts"},{"type":"link","label":"ReplSetOpts","href":"/mongodb-memory-server/versions/beta/docs/api/interfaces/replset-opts","docId":"api/interfaces/replset-opts"}],"collapsed":true,"collapsible":true}],"guides":[{"type":"category","label":"Getting Started","items":[{"type":"link","label":"Quick Start Guide","href":"/mongodb-memory-server/versions/beta/docs/guides/quick-start-guide","docId":"guides/quick-start-guide"},{"type":"link","label":"Frequently Asked Questions","href":"/mongodb-memory-server/versions/beta/docs/guides/faq","docId":"guides/faq"},{"type":"link","label":"Known Issues","href":"/mongodb-memory-server/versions/beta/docs/guides/known-issues","docId":"guides/known-issues"},{"type":"link","label":"Supported Systems","href":"/mongodb-memory-server/versions/beta/docs/guides/supported-systems","docId":"guides/supported-systems"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Guides","items":[{"type":"category","label":"Integration Examples","items":[{"type":"link","label":"Integration with Test Runners","href":"/mongodb-memory-server/versions/beta/docs/guides/integration-examples/test-runners","docId":"guides/integration-examples/test-runners"},{"type":"link","label":"Integration with Docker","href":"/mongodb-memory-server/versions/beta/docs/guides/integration-examples/docker","docId":"guides/integration-examples/docker"}],"collapsed":true,"collapsible":true},{"type":"link","label":"Enable Debug Mode","href":"/mongodb-memory-server/versions/beta/docs/guides/enable-debug-mode","docId":"guides/enable-debug-mode"},{"type":"link","label":"Known Issues","href":"/mongodb-memory-server/versions/beta/docs/guides/known-issues","docId":"guides/known-issues"},{"type":"link","label":"Details for Errors & Warnings","href":"/mongodb-memory-server/versions/beta/docs/guides/error-warning-details","docId":"guides/error-warning-details"},{"type":"link","label":"Mongodb Server Versions","href":"/mongodb-memory-server/versions/beta/docs/guides/mongodb-server-versions","docId":"guides/mongodb-server-versions"},{"type":"link","label":"Common Issues","href":"/mongodb-memory-server/versions/beta/docs/guides/common-issues","docId":"guides/common-issues"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Migration","items":[{"type":"link","label":"Migrate to version 9.0.0","href":"/mongodb-memory-server/versions/beta/docs/guides/migration/migrate9","docId":"guides/migration/migrate9"},{"type":"link","label":"Migrate to version 8.0.0","href":"/mongodb-memory-server/versions/beta/docs/guides/migration/migrate8","docId":"guides/migration/migrate8"},{"type":"link","label":"Migrate to version 7.0.0","href":"/mongodb-memory-server/versions/beta/docs/guides/migration/migrate7","docId":"guides/migration/migrate7"}],"collapsed":true,"collapsible":true}]},"docs":{"api/classes/dry-mongo-binary":{"id":"api/classes/dry-mongo-binary","title":"DryMongoBinary","description":"API Documentation of DryMongoBinary-Class","sidebar":"api"},"api/classes/mongo-binary":{"id":"api/classes/mongo-binary","title":"MongoBinary","description":"API Documentation of MongoBinary-Class","sidebar":"api"},"api/classes/mongo-instance":{"id":"api/classes/mongo-instance","title":"MongoInstance","description":"API Documentation of MongoInstance-Class","sidebar":"api"},"api/classes/mongo-memory-replset":{"id":"api/classes/mongo-memory-replset","title":"MongoMemoryReplSet","description":"API Documentation of MongoMemoryReplSet-Class","sidebar":"api"},"api/classes/mongo-memory-server":{"id":"api/classes/mongo-memory-server","title":"MongoMemoryServer","description":"API Documentation of MongoMemoryServer-Class","sidebar":"api"},"api/config-options":{"id":"api/config-options","title":"Config Options","description":"List of all Config Options","sidebar":"api"},"api/enums/mongo-memory-replset-states":{"id":"api/enums/mongo-memory-replset-states","title":"MongoMemoryReplSetStates","description":"API Documentation of MongoMemoryReplSetStates-Enum","sidebar":"api"},"api/enums/mongo-memory-server-states":{"id":"api/enums/mongo-memory-server-states","title":"MongoMemoryServerStates","description":"API Documentation of MongoMemoryServerStates-Enum","sidebar":"api"},"api/index-api":{"id":"api/index-api","title":"Welcome to the API","description":"In API will be documented what functions & values do, even internal protected / private ones","sidebar":"api"},"api/interfaces/mongo-memory-binary-opts":{"id":"api/interfaces/mongo-memory-binary-opts","title":"MongoBinaryOpts","description":"API Documentation of MongoBinaryOpts-Interface","sidebar":"api"},"api/interfaces/mongo-memory-instance-opts":{"id":"api/interfaces/mongo-memory-instance-opts","title":"MongoMemoryInstanceOpts","description":"API Documentation of MongoMemoryInstanceOpts-Interface","sidebar":"api"},"api/interfaces/mongo-memory-instance-replicamemberconfig":{"id":"api/interfaces/mongo-memory-instance-replicamemberconfig","title":"ReplicaMemberConfig","description":"API Documentation of ReplicaMemberConfig-Interface","sidebar":"api"},"api/interfaces/mongo-memory-replset-opts":{"id":"api/interfaces/mongo-memory-replset-opts","title":"MongoMemoryReplSetOpts","description":"API Documentation of MongoMemoryReplSetOpts-Interface","sidebar":"api"},"api/interfaces/mongo-memory-server-automaticauth":{"id":"api/interfaces/mongo-memory-server-automaticauth","title":"AutomaticAuth","description":"API Documentation of AutomaticAuth-Interface","sidebar":"api"},"api/interfaces/mongo-memory-server-createuser":{"id":"api/interfaces/mongo-memory-server-createuser","title":"CreateUser","description":"API Documentation of CreateUser-Interface","sidebar":"api"},"api/interfaces/mongo-memory-server-opts":{"id":"api/interfaces/mongo-memory-server-opts","title":"MongoMemoryServerOpts","description":"API Documentation of MongoMemoryServerOpts-Interface","sidebar":"api"},"api/interfaces/replset-opts":{"id":"api/interfaces/replset-opts","title":"ReplSetOpts","description":"API Documentation of ReplSetOpts-Interface","sidebar":"api"},"guides/common-issues":{"id":"guides/common-issues","title":"Common Issues","description":"There are some common issues you may encounter with mongodb-memory-server (or also manually handling mongod instances), this guide will try to explain why they happen how to fix those issues.","sidebar":"guides"},"guides/enable-debug-mode":{"id":"guides/enable-debug-mode","title":"Enable Debug Mode","description":"The Debug Mode can be enabled by setting the DEBUG config options, which can be done by either setting it as a Environment Variable or package.json option.","sidebar":"guides"},"guides/error-warning-details":{"id":"guides/error-warning-details","title":"Details for Errors & Warnings","description":"StateError","sidebar":"guides"},"guides/faq":{"id":"guides/faq","title":"Frequently Asked Questions","description":"Do binaries get automatically deleted?","sidebar":"guides"},"guides/integration-examples/docker":{"id":"guides/integration-examples/docker","title":"Integration with Docker","description":"This Guide will show how mongodb-memory-server can be used with Docker & dockerfiles.","sidebar":"guides"},"guides/integration-examples/test-runners":{"id":"guides/integration-examples/test-runners","title":"Integration with Test Runners","description":"This Guide will show how mongodb-memory-server can be used with different frameworks","sidebar":"guides"},"guides/known-issues":{"id":"guides/known-issues","title":"Known Issues","description":"ArchLinux on Docker","sidebar":"guides"},"guides/migration/migrate7":{"id":"guides/migration/migrate7","title":"Migrate to version 7.0.0","description":"Here are the Important changes made for 7.0.0","sidebar":"guides"},"guides/migration/migrate8":{"id":"guides/migration/migrate8","title":"Migrate to version 8.0.0","description":"Here are the Important changes made for 8.0.0","sidebar":"guides"},"guides/migration/migrate9":{"id":"guides/migration/migrate9","title":"Migrate to version 9.0.0","description":"Here are the Important changes made for 9.0.0","sidebar":"guides"},"guides/mongodb-server-versions":{"id":"guides/mongodb-server-versions","title":"Mongodb Server Versions","description":"This Guide will show what MongoDB Server versions are / were the default for versions of mongodb-memory-server-core and the guidelines of when a version gets changed.","sidebar":"guides"},"guides/quick-start-guide":{"id":"guides/quick-start-guide","title":"Quick Start Guide","description":"This Guide will show how to setup this package for basic use","sidebar":"guides"},"guides/supported-systems":{"id":"guides/supported-systems","title":"Supported Systems","description":"Currently Supported platforms:","sidebar":"guides"},"test":{"id":"test","title":"Docusaurus Testing","description":"This file is meant to show what Docusaurus is capable of and how it looks in this projects styles"}}}')}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/945.5275906c.js b/versions/beta/assets/js/945.5275906c.js deleted file mode 100644 index ea3b550d8..000000000 --- a/versions/beta/assets/js/945.5275906c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[945],{6945:function(e,s,r){r.r(s)}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/972.c8906e03.js b/versions/beta/assets/js/972.c8906e03.js deleted file mode 100644 index 3e71fa413..000000000 --- a/versions/beta/assets/js/972.c8906e03.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[972],{4972:function(e,t,n){n.r(t),n.d(t,{default:function(){return i}});var o=n(7294),a=n(5999),r=n(833),l=n(9439);function i(){return o.createElement(o.Fragment,null,o.createElement(r.d,{title:(0,a.I)({id:"theme.NotFound.title",message:"Page Not Found"})}),o.createElement(l.Z,null,o.createElement("main",{className:"container margin-vert--xl"},o.createElement("div",{className:"row"},o.createElement("div",{className:"col col--6 col--offset-3"},o.createElement("h1",{className:"hero__title"},o.createElement(a.Z,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),o.createElement("p",null,o.createElement(a.Z,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),o.createElement("p",null,o.createElement(a.Z,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/9795f834.076ac77b.js b/versions/beta/assets/js/9795f834.076ac77b.js new file mode 100644 index 000000000..4530635c6 --- /dev/null +++ b/versions/beta/assets/js/9795f834.076ac77b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[1515],{3905:function(e,n,t){t.d(n,{Zo:function(){return c},kt:function(){return g}});var o=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function a(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var d=o.createContext({}),s=function(e){var n=o.useContext(d),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},c=function(e){var n=s(e.components);return o.createElement(d.Provider,{value:n},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},u=o.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,d=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=s(t),u=r,g=m["".concat(d,".").concat(u)]||m[u]||p[u]||i;return t?o.createElement(g,a(a({ref:n},c),{},{components:t})):o.createElement(g,a({ref:n},c))}));function g(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,a=new Array(i);a[0]=u;var l={};for(var d in n)hasOwnProperty.call(n,d)&&(l[d]=n[d]);l.originalType=e,l[m]="string"==typeof e?e:r,a[1]=l;for(var s=2;s.dockerignore",id:"dockerignore",level:3},{value:"dockerfile",id:"dockerfile",level:3}],p={toc:m},u="wrapper";function g(e){var n=e.components,t=(0,r.Z)(e,a);return(0,i.kt)(u,(0,o.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"This Guide will show how ",(0,i.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server")," can be used with Docker & dockerfiles."),(0,i.kt)("h2",{id:"important-notes-before-starting"},"Important Notes before Starting"),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"It is common that images like ",(0,i.kt)("inlineCode",{parentName:"p"},"node:16-alpine")," are used, which will not work with this package, because mongodb does not provide binaries for Alpine yet.\nIt is recommended to switch to images like ",(0,i.kt)("inlineCode",{parentName:"p"},"node:16")," (or ",(0,i.kt)("inlineCode",{parentName:"p"},"node:16-buster"),") for Debian builds."),(0,i.kt)("p",{parentName:"admonition"},"See ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/guides/known-issues#no-build-available-for-alpine-linux"},"No Build available for Alpine Linux"),".")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Docker Debian builds (at least with ",(0,i.kt)("inlineCode",{parentName:"p"},"debian:11"),"), extra packages have to be installed:"),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"apt-get install libcurl4 # for Debian 10+ to fix CURL_OPENSSL_4\n# OR\napt-get install libcurl3 # for Debian 9 (and before) to fix CURL_OPENSSL_3\n"))),(0,i.kt)("h2",{id:"writing-a-dockerfile-with-mongodb-binary-caching"},"Writing a dockerfile with mongodb binary caching"),(0,i.kt)("p",null,"Sometimes you want to have the tests isolated from the host system and also have caching working for mongodb-memory-server."),(0,i.kt)("h3",{id:"dockerignore"},(0,i.kt)("inlineCode",{parentName:"h3"},".dockerignore")),(0,i.kt)("p",null,"It is recommended to have the following added to the ",(0,i.kt)("inlineCode",{parentName:"p"},".dockerignore")," file to make sure that no host-specific things are copied into the image:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-dockerignore"},"# ignore all node_modules, no matter where, like when having a monorepo\n**/node_modules\n")),(0,i.kt)("p",null,"If the above is not added to the ",(0,i.kt)("inlineCode",{parentName:"p"},".dockeringore")," then the following may happen:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Best case is just added bloat if the host system is not debian (like having the host's mongodb binary copied into the image)"),(0,i.kt)("li",{parentName:"ul"},"If the host system is Debian (and to that not matching version), then the host's mongodb binary is copied in and will be used instead of downloading the actual required mongodb binary")),(0,i.kt)("p",null,"Alternatively, if no ",(0,i.kt)("inlineCode",{parentName:"p"},".dockeringore")," is used, the following could also be added to the ",(0,i.kt)("inlineCode",{parentName:"p"},"dockerfile"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-dockerfile"},'# ...\nCOPY node:node . /project\n\n# Put this Instruction between the COPY and the RUN "npm install" steps\n# The following recursively deletes all directories it finds that are a directory AND have a name matching "node_modules"\nRUN find . -type d -iname "node_modules" -exec rm -rf {} \\;\n\nRUN npm install\n# ...\n')),(0,i.kt)("h3",{id:"dockerfile"},(0,i.kt)("inlineCode",{parentName:"h3"},"dockerfile")),(0,i.kt)("p",null,"The following ",(0,i.kt)("inlineCode",{parentName:"p"},"dockerfile")," contains the recommended steps to build a good MMS image:"),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"The following ",(0,i.kt)("inlineCode",{parentName:"p"},"dockerfile")," has examples for 2 package managers: ",(0,i.kt)("inlineCode",{parentName:"p"},"npm")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"yarn"),", be sure to remove the one that will not be used.")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-dockerfile"},'# Using a Debian build\nFROM node:16\n\n# Installing "libcurl4" because some Debian images may not come with this package installed, but is required by the mongodb binaries\nRUN apt-get install libcurl4\n\n# Settings the CWD (Current Work Directory) to "/project" to have a isolated folder for the project\n# Note: it is not recommended to set it to "/home/dockeruser", but to use "/home/dockeruser/project"\nWORKDIR /project\n\n# Copy the project (all files) into the image into "/project" as user "node:node"\n# User "node:node" is the default nodejs user in the docker images\nCOPY node:node . /project\n\n# Explicitly set the user that will be used for the next Instructions and ENTRYPOINT\nUSER node\n\n# Install all required dependencies locked to the package-lock (or yarn.lock)\n# Replace "npm install" with your package manager command of choice\nRUN npm install --ci\n# OR\nRUN yarn install --frozen-lockfile\n\n# Set the default command that will be used when running the image\n# Replace this with your command / package manager command of choice\nENTRYPOINT ["npm", "run", "test"]\n# OR\nENTRYPOINT ["yarn", "run", "test"]\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/9795f834.2ef1fb17.js b/versions/beta/assets/js/9795f834.2ef1fb17.js deleted file mode 100644 index 3ebdaf579..000000000 --- a/versions/beta/assets/js/9795f834.2ef1fb17.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[515],{3905:function(e,n,t){t.d(n,{Zo:function(){return c},kt:function(){return g}});var o=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function a(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var d=o.createContext({}),s=function(e){var n=o.useContext(d),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},c=function(e){var n=s(e.components);return o.createElement(d.Provider,{value:n},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},u=o.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,d=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=s(t),u=r,g=m["".concat(d,".").concat(u)]||m[u]||p[u]||i;return t?o.createElement(g,a(a({ref:n},c),{},{components:t})):o.createElement(g,a({ref:n},c))}));function g(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,a=new Array(i);a[0]=u;var l={};for(var d in n)hasOwnProperty.call(n,d)&&(l[d]=n[d]);l.originalType=e,l[m]="string"==typeof e?e:r,a[1]=l;for(var s=2;s.dockerignore",id:"dockerignore",level:3},{value:"dockerfile",id:"dockerfile",level:3}],p={toc:m},u="wrapper";function g(e){var n=e.components,t=(0,r.Z)(e,a);return(0,i.kt)(u,(0,o.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"This Guide will show how ",(0,i.kt)("inlineCode",{parentName:"p"},"mongodb-memory-server")," can be used with Docker & dockerfiles."),(0,i.kt)("h2",{id:"important-notes-before-starting"},"Important Notes before Starting"),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"It is common that images like ",(0,i.kt)("inlineCode",{parentName:"p"},"node:16-alpine")," are used, which will not work with this package, because mongodb does not provide binaries for Alpine yet.\nIt is recommended to switch to images like ",(0,i.kt)("inlineCode",{parentName:"p"},"node:16")," (or ",(0,i.kt)("inlineCode",{parentName:"p"},"node:16-buster"),") for Debian builds."),(0,i.kt)("p",{parentName:"admonition"},"See ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/guides/known-issues#no-build-available-for-alpine-linux"},"No Build available for Alpine Linux"),".")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Docker Debian builds (at least with ",(0,i.kt)("inlineCode",{parentName:"p"},"debian:11"),"), extra packages have to be installed:"),(0,i.kt)("pre",{parentName:"admonition"},(0,i.kt)("code",{parentName:"pre",className:"language-sh"},"apt-get install libcurl4 # for Debian 10+ to fix CURL_OPENSSL_4\n# OR\napt-get install libcurl3 # for Debian 9 (and before) to fix CURL_OPENSSL_3\n"))),(0,i.kt)("h2",{id:"writing-a-dockerfile-with-mongodb-binary-caching"},"Writing a dockerfile with mongodb binary caching"),(0,i.kt)("p",null,"Sometimes you want to have the tests isolated from the host system and also have caching working for mongodb-memory-server."),(0,i.kt)("h3",{id:"dockerignore"},(0,i.kt)("inlineCode",{parentName:"h3"},".dockerignore")),(0,i.kt)("p",null,"It is recommended to have the following added to the ",(0,i.kt)("inlineCode",{parentName:"p"},".dockerignore")," file to make sure that no host-specific things are copied into the image:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-dockerignore"},"# ignore all node_modules, no matter where, like when having a monorepo\n**/node_modules\n")),(0,i.kt)("p",null,"If the above is not added to the ",(0,i.kt)("inlineCode",{parentName:"p"},".dockeringore")," then the following may happen:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Best case is just added bloat if the host system is not debian (like having the host's mongodb binary copied into the image)"),(0,i.kt)("li",{parentName:"ul"},"If the host system is Debian (and to that not matching version), then the host's mongodb binary is copied in and will be used instead of downloading the actual required mongodb binary")),(0,i.kt)("p",null,"Alternatively, if no ",(0,i.kt)("inlineCode",{parentName:"p"},".dockeringore")," is used, the following could also be added to the ",(0,i.kt)("inlineCode",{parentName:"p"},"dockerfile"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-dockerfile"},'# ...\nCOPY node:node . /project\n\n# Put this Instruction between the COPY and the RUN "npm install" steps\n# The following recursively deletes all directories it finds that are a directory AND have a name matching "node_modules"\nRUN find . -type d -iname "node_modules" -exec rm -rf {} \\;\n\nRUN npm install\n# ...\n')),(0,i.kt)("h3",{id:"dockerfile"},(0,i.kt)("inlineCode",{parentName:"h3"},"dockerfile")),(0,i.kt)("p",null,"The following ",(0,i.kt)("inlineCode",{parentName:"p"},"dockerfile")," contains the recommended steps to build a good MMS image:"),(0,i.kt)("admonition",{type:"note"},(0,i.kt)("p",{parentName:"admonition"},"The following ",(0,i.kt)("inlineCode",{parentName:"p"},"dockerfile")," has examples for 2 package managers: ",(0,i.kt)("inlineCode",{parentName:"p"},"npm")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"yarn"),", be sure to remove the one that will not be used.")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-dockerfile"},'# Using a Debian build\nFROM node:16\n\n# Installing "libcurl4" because some Debian images may not come with this package installed, but is required by the mongodb binaries\nRUN apt-get install libcurl4\n\n# Settings the CWD (Current Work Directory) to "/project" to have a isolated folder for the project\n# Note: it is not recommended to set it to "/home/dockeruser", but to use "/home/dockeruser/project"\nWORKDIR /project\n\n# Copy the project (all files) into the image into "/project" as user "node:node"\n# User "node:node" is the default nodejs user in the docker images\nCOPY node:node . /project\n\n# Explicitly set the user that will be used for the next Instructions and ENTRYPOINT\nUSER node\n\n# Install all required dependencies locked to the package-lock (or yarn.lock)\n# Replace "npm install" with your package manager command of choice\nRUN npm install --ci\n# OR\nRUN yarn install --frozen-lockfile\n\n# Set the default command that will be used when running the image\n# Replace this with your command / package manager command of choice\nENTRYPOINT ["npm", "run", "test"]\n# OR\nENTRYPOINT ["yarn", "run", "test"]\n')))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/9f6ab2c9.d99afea6.js b/versions/beta/assets/js/9f6ab2c9.d99afea6.js new file mode 100644 index 000000000..2b154becc --- /dev/null +++ b/versions/beta/assets/js/9f6ab2c9.d99afea6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[3848],{3905:function(e,r,n){n.d(r,{Zo:function(){return u},kt:function(){return p}});var t=n(7294);function o(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function i(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function a(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=t.createContext({}),l=function(e){var r=t.useContext(d),n=r;return e&&(n="function"==typeof e?e(r):a(a({},r),e)),n},u=function(e){var r=l(e.components);return t.createElement(d.Provider,{value:r},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},g=t.forwardRef((function(e,r){var n=e.components,o=e.mdxType,i=e.originalType,d=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),m=l(n),g=o,p=m["".concat(d,".").concat(g)]||m[g]||c[g]||i;return n?t.createElement(p,a(a({ref:r},u),{},{components:n})):t.createElement(p,a({ref:r},u))}));function p(e,r){var n=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=g;var s={};for(var d in r)hasOwnProperty.call(r,d)&&(s[d]=r[d]);s.originalType=e,s[m]="string"==typeof e?e:o,a[1]=s;for(var l=2;linstance.auth is no longer required to enable Authentication",id:"instanceauth-is-no-longer-required-to-enable-authentication",level:3},{value:"More Errors moved to Custom Error classes",id:"more-errors-moved-to-custom-error-classes",level:3}],c={toc:m},g="wrapper";function p(e){var r=e.components,n=(0,o.Z)(e,a);return(0,i.kt)(g,(0,t.Z)({},c,n,{components:r,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Here are the Important changes made for 8.0.0"),(0,i.kt)("admonition",{title:"Important, Read this first",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"This Guide is written for migration from version ",(0,i.kt)("inlineCode",{parentName:"p"},"7.6.0")," to ",(0,i.kt)("inlineCode",{parentName:"p"},"8.0.0"),", for versions ",(0,i.kt)("inlineCode",{parentName:"p"},">8.0.0 <9.0.0"),", please consult the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/nodkz/mongodb-memory-server/blob/master/CHANGELOG.md"},"CHANGELOG"))),(0,i.kt)("h2",{id:"breaking-changes"},"Breaking Changes"),(0,i.kt)("h3",{id:"default-mongodb-server-version-upgraded-to-503"},"Default MongoDB Server version upgraded to 5.0.3"),(0,i.kt)("p",null,"The Default MongoDB Server version for 8.0 is ",(0,i.kt)("inlineCode",{parentName:"p"},"5.0.3"),", see ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/guides/mongodb-server-versions"},"MongoDB Server Versions"),"."),(0,i.kt)("h3",{id:"mongodb-driver-version-upgraded-to-4x"},"Mongodb Driver Version upgraded to 4.x"),(0,i.kt)("p",null,"The used MongoDB Driver version is now ",(0,i.kt)("inlineCode",{parentName:"p"},"4.1.2"),"."),(0,i.kt)("h2",{id:"non-breaking-changes--additions"},"Non-Breaking changes / Additions"),(0,i.kt)("h3",{id:"binary-file-name-is-now-parsed-from-archive_name-and-download_url"},"Binary file name is now parsed from ARCHIVE_NAME and DOWNLOAD_URL"),(0,i.kt)("p",null,"The Binary file name (like ",(0,i.kt)("inlineCode",{parentName:"p"},"mongod-x64-ubuntu-4.0.0"),") is now parsed from ",(0,i.kt)("a",{parentName:"p",href:"../../api/config-options#archive_name"},(0,i.kt)("inlineCode",{parentName:"a"},"ARCHIVE_NAME"))," and ",(0,i.kt)("a",{parentName:"p",href:"../../api/config-options#download_url"},(0,i.kt)("inlineCode",{parentName:"a"},"DOWNLOAD_URL")),"."),(0,i.kt)("h3",{id:"a-error-now-gets-thrown-if-debian-10-or-higher-is-used-with-mongodb-version-below-420"},"A Error now gets thrown if Debian 10 (or higher) is used with mongodb version below 4.2.0"),(0,i.kt)("p",null,"A Error now gets thrown, if Debian 10 (or higher) is used with a requested mongodb version of below 4.2.0, because there are no version available for Debian 10 below 4.2.0 and Debian 9 binaries are incompatible with Debian 10. (because of libcurl3)"),(0,i.kt)("h3",{id:"instanceauth-is-no-longer-required-to-enable-authentication"},(0,i.kt)("inlineCode",{parentName:"h3"},"instance.auth")," is no longer required to enable Authentication"),(0,i.kt)("p",null,"Option ",(0,i.kt)("inlineCode",{parentName:"p"},"instance.auth")," is now no longer required to be set to enable Authentication when ",(0,i.kt)("inlineCode",{parentName:"p"},"auth")," (top-level) is set."),(0,i.kt)("h3",{id:"more-errors-moved-to-custom-error-classes"},"More Errors moved to Custom Error classes"),(0,i.kt)("p",null,"More Errors have been moved to a custom Error class."))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/9f6ab2c9.ff9cf4eb.js b/versions/beta/assets/js/9f6ab2c9.ff9cf4eb.js deleted file mode 100644 index 5385500ff..000000000 --- a/versions/beta/assets/js/9f6ab2c9.ff9cf4eb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[848],{3905:function(e,r,n){n.d(r,{Zo:function(){return u},kt:function(){return p}});var t=n(7294);function o(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function i(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function a(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=t.createContext({}),l=function(e){var r=t.useContext(d),n=r;return e&&(n="function"==typeof e?e(r):a(a({},r),e)),n},u=function(e){var r=l(e.components);return t.createElement(d.Provider,{value:r},e.children)},m="mdxType",c={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},g=t.forwardRef((function(e,r){var n=e.components,o=e.mdxType,i=e.originalType,d=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),m=l(n),g=o,p=m["".concat(d,".").concat(g)]||m[g]||c[g]||i;return n?t.createElement(p,a(a({ref:r},u),{},{components:n})):t.createElement(p,a({ref:r},u))}));function p(e,r){var n=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=g;var s={};for(var d in r)hasOwnProperty.call(r,d)&&(s[d]=r[d]);s.originalType=e,s[m]="string"==typeof e?e:o,a[1]=s;for(var l=2;linstance.auth is no longer required to enable Authentication",id:"instanceauth-is-no-longer-required-to-enable-authentication",level:3},{value:"More Errors moved to Custom Error classes",id:"more-errors-moved-to-custom-error-classes",level:3}],c={toc:m},g="wrapper";function p(e){var r=e.components,n=(0,o.Z)(e,a);return(0,i.kt)(g,(0,t.Z)({},c,n,{components:r,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Here are the Important changes made for 8.0.0"),(0,i.kt)("admonition",{title:"Important, Read this first",type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"This Guide is written for migration from version ",(0,i.kt)("inlineCode",{parentName:"p"},"7.6.0")," to ",(0,i.kt)("inlineCode",{parentName:"p"},"8.0.0"),", for versions ",(0,i.kt)("inlineCode",{parentName:"p"},">8.0.0 <9.0.0"),", please consult the ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/nodkz/mongodb-memory-server/blob/master/CHANGELOG.md"},"CHANGELOG"))),(0,i.kt)("h2",{id:"breaking-changes"},"Breaking Changes"),(0,i.kt)("h3",{id:"default-mongodb-server-version-upgraded-to-503"},"Default MongoDB Server version upgraded to 5.0.3"),(0,i.kt)("p",null,"The Default MongoDB Server version for 8.0 is ",(0,i.kt)("inlineCode",{parentName:"p"},"5.0.3"),", see ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/guides/mongodb-server-versions"},"MongoDB Server Versions"),"."),(0,i.kt)("h3",{id:"mongodb-driver-version-upgraded-to-4x"},"Mongodb Driver Version upgraded to 4.x"),(0,i.kt)("p",null,"The used MongoDB Driver version is now ",(0,i.kt)("inlineCode",{parentName:"p"},"4.1.2"),"."),(0,i.kt)("h2",{id:"non-breaking-changes--additions"},"Non-Breaking changes / Additions"),(0,i.kt)("h3",{id:"binary-file-name-is-now-parsed-from-archive_name-and-download_url"},"Binary file name is now parsed from ARCHIVE_NAME and DOWNLOAD_URL"),(0,i.kt)("p",null,"The Binary file name (like ",(0,i.kt)("inlineCode",{parentName:"p"},"mongod-x64-ubuntu-4.0.0"),") is now parsed from ",(0,i.kt)("a",{parentName:"p",href:"../../api/config-options#archive_name"},(0,i.kt)("inlineCode",{parentName:"a"},"ARCHIVE_NAME"))," and ",(0,i.kt)("a",{parentName:"p",href:"../../api/config-options#download_url"},(0,i.kt)("inlineCode",{parentName:"a"},"DOWNLOAD_URL")),"."),(0,i.kt)("h3",{id:"a-error-now-gets-thrown-if-debian-10-or-higher-is-used-with-mongodb-version-below-420"},"A Error now gets thrown if Debian 10 (or higher) is used with mongodb version below 4.2.0"),(0,i.kt)("p",null,"A Error now gets thrown, if Debian 10 (or higher) is used with a requested mongodb version of below 4.2.0, because there are no version available for Debian 10 below 4.2.0 and Debian 9 binaries are incompatible with Debian 10. (because of libcurl3)"),(0,i.kt)("h3",{id:"instanceauth-is-no-longer-required-to-enable-authentication"},(0,i.kt)("inlineCode",{parentName:"h3"},"instance.auth")," is no longer required to enable Authentication"),(0,i.kt)("p",null,"Option ",(0,i.kt)("inlineCode",{parentName:"p"},"instance.auth")," is now no longer required to be set to enable Authentication when ",(0,i.kt)("inlineCode",{parentName:"p"},"auth")," (top-level) is set."),(0,i.kt)("h3",{id:"more-errors-moved-to-custom-error-classes"},"More Errors moved to Custom Error classes"),(0,i.kt)("p",null,"More Errors have been moved to a custom Error class."))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/a5852e81.1d6e1f1c.js b/versions/beta/assets/js/a5852e81.1d6e1f1c.js new file mode 100644 index 000000000..ba069f284 --- /dev/null +++ b/versions/beta/assets/js/a5852e81.1d6e1f1c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[8551],{1614:function(e,r,t){t.r(r);var n=t(7294),o=t(6550),s=t(4996);r.default=function(){return n.createElement(o.l_,{to:(0,s.Z)("/")})}}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/a5852e81.358fc4f2.js b/versions/beta/assets/js/a5852e81.358fc4f2.js deleted file mode 100644 index 7a8f99647..000000000 --- a/versions/beta/assets/js/a5852e81.358fc4f2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[551],{1614:function(e,r,t){t.r(r);var n=t(7294),o=t(6550),s=t(4996);r.default=function(){return n.createElement(o.l_,{to:(0,s.Z)("/")})}}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/a8d48a20.775f0be6.js b/versions/beta/assets/js/a8d48a20.775f0be6.js deleted file mode 100644 index 64f370c0c..000000000 --- a/versions/beta/assets/js/a8d48a20.775f0be6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[61],{3905:function(e,n,t){t.d(n,{Zo:function(){return d},kt:function(){return f}});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},d=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},c=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=p(t),c=o,f=u["".concat(s,".").concat(c)]||u[c]||m[c]||i;return t?r.createElement(f,a(a({ref:n},d),{},{components:t})):r.createElement(f,a({ref:n},d))}));function f(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=c;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[u]="string"==typeof e?e:o,a[1]=l;for(var p=2;pMongoBinaryOpts",id:"values-for-mongobinaryopts",level:2},{value:"checkMD5",id:"checkmd5",level:3},{value:"Values for BaseDryMongoBinaryOptions",id:"values-for-basedrymongobinaryoptions",level:2},{value:"version",id:"version",level:3},{value:"downloadDir",id:"downloaddir",level:3},{value:"os",id:"os",level:3},{value:"arch",id:"arch",level:3},{value:"platform",id:"platform",level:3},{value:"systemBinary",id:"systembinary",level:3},{value:"Helper Type AnyOS",id:"helper-type-anyos",level:2},{value:"Values for OtherOS",id:"values-for-otheros",level:2},{value:"os",id:"otheros-os",level:3},{value:"Values for LinuxOS",id:"values-for-linuxos",level:2},{value:"os",id:"linuxos-os",level:3},{value:"dist",id:"dist",level:3},{value:"release",id:"release",level:3},{value:"codename",id:"codename",level:3},{value:"id_like",id:"id_like",level:3}],m={toc:u},c="wrapper";function f(e){var n=e.components,t=(0,o.Z)(e,a);return(0,i.kt)(c,(0,r.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"API Documentation of ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoBinaryOpts"),"-Interface"),(0,i.kt)("h2",{id:"values-for-mongobinaryopts"},"Values for ",(0,i.kt)("inlineCode",{parentName:"h2"},"MongoBinaryOpts")),(0,i.kt)("p",null,"Inherits most values from ",(0,i.kt)("a",{parentName:"p",href:"#values-for-basedrymongobinaryoptions"},(0,i.kt)("inlineCode",{parentName:"a"},"BaseDryMongoBinaryOptions")),"."),(0,i.kt)("h3",{id:"checkmd5"},"checkMD5"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"checkMD5?: boolean")),(0,i.kt)("p",null,"Set wheter to perform a MD5 check on the downloaded archive."),(0,i.kt)("h2",{id:"values-for-basedrymongobinaryoptions"},"Values for ",(0,i.kt)("inlineCode",{parentName:"h2"},"BaseDryMongoBinaryOptions")),(0,i.kt)("h3",{id:"version"},"version"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"version?: string")),(0,i.kt)("p",null,"Set which binary version to download, see ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#version"},"config option ",(0,i.kt)("inlineCode",{parentName:"a"},"VERSION"))," for more."),(0,i.kt)("h3",{id:"downloaddir"},"downloadDir"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"downloadDir?: string")),(0,i.kt)("p",null,"Set the directory where binaries will be downloaded to, when a download needs to happen. If a binary is not found in this directory, the other default directories will also be searched."),(0,i.kt)("h3",{id:"os"},"os"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"os?: AnyOS")),(0,i.kt)("p",null,"Set OS information that is necessary for generating the archive name, uses ",(0,i.kt)("a",{parentName:"p",href:"#helper-type-anyos"},(0,i.kt)("inlineCode",{parentName:"a"},"AnyOS")),"."),(0,i.kt)("h3",{id:"arch"},"arch"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"arch?: string")),(0,i.kt)("p",null,"Set which Architecture to use,supports the same values as ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#arch"},"config option ",(0,i.kt)("inlineCode",{parentName:"a"},"ARCH")),"."),(0,i.kt)("h3",{id:"platform"},"platform"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"platform?: string")),(0,i.kt)("p",null,"Set which Platform to use,supports the same values as ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#platform"},"config option ",(0,i.kt)("inlineCode",{parentName:"a"},"PLATFORM")),"."),(0,i.kt)("h3",{id:"systembinary"},"systemBinary"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"systemBinary?: string")),(0,i.kt)("p",null,"Set the SystemBinary path, if set this path will be used instead of finding a binary.",(0,i.kt)("br",{parentName:"p"}),"\n","If this path does not exist or does not have the required permissions, a error will be thrown instead of downloading."),(0,i.kt)("h2",{id:"helper-type-anyos"},"Helper Type ",(0,i.kt)("inlineCode",{parentName:"h2"},"AnyOS")),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"AnyOS = OtherOS | LinuxOS")),(0,i.kt)("p",null,"Uses either ",(0,i.kt)("a",{parentName:"p",href:"#values-for-otheros"},(0,i.kt)("inlineCode",{parentName:"a"},"OtherOS"))," or ",(0,i.kt)("a",{parentName:"p",href:"#values-for-linuxos"},(0,i.kt)("inlineCode",{parentName:"a"},"LinuxOS")),"."),(0,i.kt)("h2",{id:"values-for-otheros"},"Values for ",(0,i.kt)("inlineCode",{parentName:"h2"},"OtherOS")),(0,i.kt)("h3",{id:"otheros-os"},"os"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"os: 'aix' | 'android' | 'darwin' | 'freebsd' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | string")),(0,i.kt)("p",null,"Set the Platform the current system is on."),(0,i.kt)("h2",{id:"values-for-linuxos"},"Values for ",(0,i.kt)("inlineCode",{parentName:"h2"},"LinuxOS")),(0,i.kt)("p",null,"Inherits from ",(0,i.kt)("a",{parentName:"p",href:"#values-for-otheros"},(0,i.kt)("inlineCode",{parentName:"a"},"OtherOS")),"."),(0,i.kt)("h3",{id:"linuxos-os"},"os"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"os: 'linux'")),(0,i.kt)("p",null,"Value of the current Platform the system is on. In ",(0,i.kt)("a",{parentName:"p",href:"#values-for-linuxos"},(0,i.kt)("inlineCode",{parentName:"a"},"LinuxOS")),", this value can only be ",(0,i.kt)("inlineCode",{parentName:"p"},"linux"),"."),(0,i.kt)("h3",{id:"dist"},"dist"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"dist: string")),(0,i.kt)("p",null,"Value of the current Distribution the current system is on."),(0,i.kt)("h3",{id:"release"},"release"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"release: string")),(0,i.kt)("p",null,"Value of the current Release the Distribution is on."),(0,i.kt)("h3",{id:"codename"},"codename"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"codename?: string")),(0,i.kt)("p",null,"Value of the codename of the current Distribution Release."),(0,i.kt)("h3",{id:"id_like"},"id_like"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"id_like?: string[]")),(0,i.kt)("p",null,"List of Distributions this Distribution is like."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/a8d48a20.7884a7c0.js b/versions/beta/assets/js/a8d48a20.7884a7c0.js new file mode 100644 index 000000000..92e976835 --- /dev/null +++ b/versions/beta/assets/js/a8d48a20.7884a7c0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[8061],{3905:function(e,n,t){t.d(n,{Zo:function(){return d},kt:function(){return f}});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},d=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},c=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=p(t),c=o,f=u["".concat(s,".").concat(c)]||u[c]||m[c]||i;return t?r.createElement(f,a(a({ref:n},d),{},{components:t})):r.createElement(f,a({ref:n},d))}));function f(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var i=t.length,a=new Array(i);a[0]=c;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[u]="string"==typeof e?e:o,a[1]=l;for(var p=2;pMongoBinaryOpts",id:"values-for-mongobinaryopts",level:2},{value:"checkMD5",id:"checkmd5",level:3},{value:"Values for BaseDryMongoBinaryOptions",id:"values-for-basedrymongobinaryoptions",level:2},{value:"version",id:"version",level:3},{value:"downloadDir",id:"downloaddir",level:3},{value:"os",id:"os",level:3},{value:"arch",id:"arch",level:3},{value:"platform",id:"platform",level:3},{value:"systemBinary",id:"systembinary",level:3},{value:"Helper Type AnyOS",id:"helper-type-anyos",level:2},{value:"Values for OtherOS",id:"values-for-otheros",level:2},{value:"os",id:"otheros-os",level:3},{value:"Values for LinuxOS",id:"values-for-linuxos",level:2},{value:"os",id:"linuxos-os",level:3},{value:"dist",id:"dist",level:3},{value:"release",id:"release",level:3},{value:"codename",id:"codename",level:3},{value:"id_like",id:"id_like",level:3}],m={toc:u},c="wrapper";function f(e){var n=e.components,t=(0,o.Z)(e,a);return(0,i.kt)(c,(0,r.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"API Documentation of ",(0,i.kt)("inlineCode",{parentName:"p"},"MongoBinaryOpts"),"-Interface"),(0,i.kt)("h2",{id:"values-for-mongobinaryopts"},"Values for ",(0,i.kt)("inlineCode",{parentName:"h2"},"MongoBinaryOpts")),(0,i.kt)("p",null,"Inherits most values from ",(0,i.kt)("a",{parentName:"p",href:"#values-for-basedrymongobinaryoptions"},(0,i.kt)("inlineCode",{parentName:"a"},"BaseDryMongoBinaryOptions")),"."),(0,i.kt)("h3",{id:"checkmd5"},"checkMD5"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"checkMD5?: boolean")),(0,i.kt)("p",null,"Set wheter to perform a MD5 check on the downloaded archive."),(0,i.kt)("h2",{id:"values-for-basedrymongobinaryoptions"},"Values for ",(0,i.kt)("inlineCode",{parentName:"h2"},"BaseDryMongoBinaryOptions")),(0,i.kt)("h3",{id:"version"},"version"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"version?: string")),(0,i.kt)("p",null,"Set which binary version to download, see ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#version"},"config option ",(0,i.kt)("inlineCode",{parentName:"a"},"VERSION"))," for more."),(0,i.kt)("h3",{id:"downloaddir"},"downloadDir"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"downloadDir?: string")),(0,i.kt)("p",null,"Set the directory where binaries will be downloaded to, when a download needs to happen. If a binary is not found in this directory, the other default directories will also be searched."),(0,i.kt)("h3",{id:"os"},"os"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"os?: AnyOS")),(0,i.kt)("p",null,"Set OS information that is necessary for generating the archive name, uses ",(0,i.kt)("a",{parentName:"p",href:"#helper-type-anyos"},(0,i.kt)("inlineCode",{parentName:"a"},"AnyOS")),"."),(0,i.kt)("h3",{id:"arch"},"arch"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"arch?: string")),(0,i.kt)("p",null,"Set which Architecture to use,supports the same values as ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#arch"},"config option ",(0,i.kt)("inlineCode",{parentName:"a"},"ARCH")),"."),(0,i.kt)("h3",{id:"platform"},"platform"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"platform?: string")),(0,i.kt)("p",null,"Set which Platform to use,supports the same values as ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#platform"},"config option ",(0,i.kt)("inlineCode",{parentName:"a"},"PLATFORM")),"."),(0,i.kt)("h3",{id:"systembinary"},"systemBinary"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"systemBinary?: string")),(0,i.kt)("p",null,"Set the SystemBinary path, if set this path will be used instead of finding a binary.",(0,i.kt)("br",{parentName:"p"}),"\n","If this path does not exist or does not have the required permissions, a error will be thrown instead of downloading."),(0,i.kt)("h2",{id:"helper-type-anyos"},"Helper Type ",(0,i.kt)("inlineCode",{parentName:"h2"},"AnyOS")),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"AnyOS = OtherOS | LinuxOS")),(0,i.kt)("p",null,"Uses either ",(0,i.kt)("a",{parentName:"p",href:"#values-for-otheros"},(0,i.kt)("inlineCode",{parentName:"a"},"OtherOS"))," or ",(0,i.kt)("a",{parentName:"p",href:"#values-for-linuxos"},(0,i.kt)("inlineCode",{parentName:"a"},"LinuxOS")),"."),(0,i.kt)("h2",{id:"values-for-otheros"},"Values for ",(0,i.kt)("inlineCode",{parentName:"h2"},"OtherOS")),(0,i.kt)("h3",{id:"otheros-os"},"os"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"os: 'aix' | 'android' | 'darwin' | 'freebsd' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | string")),(0,i.kt)("p",null,"Set the Platform the current system is on."),(0,i.kt)("h2",{id:"values-for-linuxos"},"Values for ",(0,i.kt)("inlineCode",{parentName:"h2"},"LinuxOS")),(0,i.kt)("p",null,"Inherits from ",(0,i.kt)("a",{parentName:"p",href:"#values-for-otheros"},(0,i.kt)("inlineCode",{parentName:"a"},"OtherOS")),"."),(0,i.kt)("h3",{id:"linuxos-os"},"os"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"os: 'linux'")),(0,i.kt)("p",null,"Value of the current Platform the system is on. In ",(0,i.kt)("a",{parentName:"p",href:"#values-for-linuxos"},(0,i.kt)("inlineCode",{parentName:"a"},"LinuxOS")),", this value can only be ",(0,i.kt)("inlineCode",{parentName:"p"},"linux"),"."),(0,i.kt)("h3",{id:"dist"},"dist"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"dist: string")),(0,i.kt)("p",null,"Value of the current Distribution the current system is on."),(0,i.kt)("h3",{id:"release"},"release"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"release: string")),(0,i.kt)("p",null,"Value of the current Release the Distribution is on."),(0,i.kt)("h3",{id:"codename"},"codename"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"codename?: string")),(0,i.kt)("p",null,"Value of the codename of the current Distribution Release."),(0,i.kt)("h3",{id:"id_like"},"id_like"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"id_like?: string[]")),(0,i.kt)("p",null,"List of Distributions this Distribution is like."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/a97422aa.3ff8bfad.js b/versions/beta/assets/js/a97422aa.3ff8bfad.js new file mode 100644 index 000000000..aae8aa7bf --- /dev/null +++ b/versions/beta/assets/js/a97422aa.3ff8bfad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[3170],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return f}});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=a.createContext({}),l=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=l(e.components);return a.createElement(p.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=l(n),m=o,f=d["".concat(p,".").concat(m)]||d[m]||u[m]||r;return n?a.createElement(f,i(i({ref:t},c),{},{components:n})):a.createElement(f,i({ref:t},c))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=m;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[d]="string"==typeof e?e:o,i[1]=s;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(n),m=a,f=u["".concat(l,".").concat(m)]||u[m]||d[m]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var c=2;c=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=p(n),d=a,g=m["".concat(s,".").concat(d)]||m[d]||u[d]||i;return n?r.createElement(g,o(o({ref:t},c),{},{components:n})):r.createElement(g,o({ref:t},c))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[m]="string"==typeof e?e:a,o[1]=l;for(var p=2;p {\n // async code in where\n})();\n"))),(0,i.kt)("h2",{id:"requirements"},"Requirements"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"NodeJS: 16.20.1+"),(0,i.kt)("li",{parentName:"ul"},"Typescript: 5.3+ (if used)")),(0,i.kt)("p",null,"When on Linux, one of the following are required:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"having ",(0,i.kt)("inlineCode",{parentName:"li"},"lsb-core")," installed (or any that provides the ",(0,i.kt)("inlineCode",{parentName:"li"},"lsb_release")," command)"),(0,i.kt)("li",{parentName:"ul"},"having an ",(0,i.kt)("inlineCode",{parentName:"li"},"/etc/os-release")," file that is compliant to the ",(0,i.kt)("a",{parentName:"li",href:"https://www.freedesktop.org/software/systemd/man/os-release.html"},"OS-Release Spec")),(0,i.kt)("li",{parentName:"ul"},"having an ",(0,i.kt)("inlineCode",{parentName:"li"},"/etc/*-release")," file that is compliant to the ",(0,i.kt)("a",{parentName:"li",href:"https://www.freedesktop.org/software/systemd/man/os-release.html"},"OS-Release Spec")," (and does not include ",(0,i.kt)("inlineCode",{parentName:"li"},"lsb"),")"),(0,i.kt)("li",{parentName:"ul"},"manually specify which version & system should be used")),(0,i.kt)("p",null,"On Linux, you will also need ",(0,i.kt)("inlineCode",{parentName:"p"},"libcurl")," (or ",(0,i.kt)("inlineCode",{parentName:"p"},"libcurl3"),' on some older distro versions). This will probably only be an issue on "slim" Docker images.'),(0,i.kt)("h2",{id:"choose-the-right-package"},"Choose the right package"),(0,i.kt)("p",null,"There are multiple packages for this project, here are the differences:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"mongodb-memory-server-core")," is the main package, which does not have any hooks on install"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"mongodb-memory-server")," adds hooks to install on ",(0,i.kt)("inlineCode",{parentName:"li"},"yarn install")," or ",(0,i.kt)("inlineCode",{parentName:"li"},"npm install")," to install the ",(0,i.kt)("em",{parentName:"li"},"latest package locally")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"mongodb-memory-server-global")," adds hooks to install on ",(0,i.kt)("inlineCode",{parentName:"li"},"yarn install")," or ",(0,i.kt)("inlineCode",{parentName:"li"},"npm install")," to install the ",(0,i.kt)("em",{parentName:"li"},"latest package globally")," (into $HOME)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"mongodb-memory-server-global-X.X")," adds hooks to install on ",(0,i.kt)("inlineCode",{parentName:"li"},"yarn install")," or ",(0,i.kt)("inlineCode",{parentName:"li"},"npm install")," to install ",(0,i.kt)("em",{parentName:"li"},"MongoDB with version ",(0,i.kt)("inlineCode",{parentName:"em"},"X.X")," globally")," (into $HOME)")),(0,i.kt)("h2",{id:"normal-server"},"Normal Server"),(0,i.kt)("p",null,"A Normal Server can be easily started with:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { MongoMemoryServer } from 'mongodb-memory-server';\n\n// This will create an new instance of \"MongoMemoryServer\" and automatically start it\nconst mongod = await MongoMemoryServer.create();\n\nconst uri = mongod.getUri();\n\n// The Server can be stopped again with\nawait mongod.stop();\n")),(0,i.kt)("h2",{id:"replicaset"},"ReplicaSet"),(0,i.kt)("p",null,"A ReplicaSet can be easily started with:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},'import { MongoMemoryReplSet } from \'mongodb-memory-server\';\n\n// This will create an new instance of "MongoMemoryReplSet" and automatically start all Servers\nconst replset = await MongoMemoryReplSet.create({ replSet: { count: 4 } }); // This will create an ReplSet with 4 members\n// To use Transactions, the "storageEngine" needs to be changed to `wiredTiger`\nconst replset = await MongoMemoryReplSet.create({ replSet: { count: 4, storageEngine: \'wiredTiger\' } }); // This will create an ReplSet with 4 members and storage-engine "wiredTiger"\n\nconst uri = replset.getUri();\n\n// The ReplSet can be stopped again with\nawait replset.stop();\n')),(0,i.kt)("h2",{id:"final-notes"},"Final Notes"),(0,i.kt)("admonition",{type:"danger"},(0,i.kt)("p",{parentName:"admonition"},"When you are not using a global instance for tests and run multi-threaded tests, it can cause Race Conditions.")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/af543849.f99034a3.js b/versions/beta/assets/js/af543849.f99034a3.js deleted file mode 100644 index 0f2892ce2..000000000 --- a/versions/beta/assets/js/af543849.f99034a3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[748],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return g}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),m=p(n),d=a,g=m["".concat(s,".").concat(d)]||m[d]||u[d]||i;return n?r.createElement(g,o(o({ref:t},c),{},{components:n})):r.createElement(g,o({ref:t},c))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[m]="string"==typeof e?e:a,o[1]=l;for(var p=2;p {\n // async code in where\n})();\n"))),(0,i.kt)("h2",{id:"requirements"},"Requirements"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"NodeJS: 14.20.1+"),(0,i.kt)("li",{parentName:"ul"},"Typescript: 5.0+ (if used)")),(0,i.kt)("p",null,"When on Linux, one of the following are required:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"having ",(0,i.kt)("inlineCode",{parentName:"li"},"lsb-core")," installed (or any that provides the ",(0,i.kt)("inlineCode",{parentName:"li"},"lsb_release")," command)"),(0,i.kt)("li",{parentName:"ul"},"having an ",(0,i.kt)("inlineCode",{parentName:"li"},"/etc/os-release")," file that is compliant to the ",(0,i.kt)("a",{parentName:"li",href:"https://www.freedesktop.org/software/systemd/man/os-release.html"},"OS-Release Spec")),(0,i.kt)("li",{parentName:"ul"},"having an ",(0,i.kt)("inlineCode",{parentName:"li"},"/etc/*-release")," file that is compliant to the ",(0,i.kt)("a",{parentName:"li",href:"https://www.freedesktop.org/software/systemd/man/os-release.html"},"OS-Release Spec")," (and does not include ",(0,i.kt)("inlineCode",{parentName:"li"},"lsb"),")"),(0,i.kt)("li",{parentName:"ul"},"manually specify which version & system should be used")),(0,i.kt)("p",null,"On Linux, you will also need ",(0,i.kt)("inlineCode",{parentName:"p"},"libcurl")," (or ",(0,i.kt)("inlineCode",{parentName:"p"},"libcurl3"),' on some older distro versions). This will probably only be an issue on "slim" Docker images.'),(0,i.kt)("h2",{id:"choose-the-right-package"},"Choose the right package"),(0,i.kt)("p",null,"There are multiple packages for this project, here are the differences:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"mongodb-memory-server-core")," is the main package, which does not have any hooks on install"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"mongodb-memory-server")," adds hooks to install on ",(0,i.kt)("inlineCode",{parentName:"li"},"yarn install")," or ",(0,i.kt)("inlineCode",{parentName:"li"},"npm install")," to install the ",(0,i.kt)("em",{parentName:"li"},"latest package locally")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"mongodb-memory-server-global")," adds hooks to install on ",(0,i.kt)("inlineCode",{parentName:"li"},"yarn install")," or ",(0,i.kt)("inlineCode",{parentName:"li"},"npm install")," to install the ",(0,i.kt)("em",{parentName:"li"},"latest package globally")," (into $HOME)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"mongodb-memory-server-global-X.X")," adds hooks to install on ",(0,i.kt)("inlineCode",{parentName:"li"},"yarn install")," or ",(0,i.kt)("inlineCode",{parentName:"li"},"npm install")," to install ",(0,i.kt)("em",{parentName:"li"},"MongoDB with version ",(0,i.kt)("inlineCode",{parentName:"em"},"X.X")," globally")," (into $HOME)")),(0,i.kt)("h2",{id:"normal-server"},"Normal Server"),(0,i.kt)("p",null,"A Normal Server can be easily started with:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},"import { MongoMemoryServer } from 'mongodb-memory-server';\n\n// This will create an new instance of \"MongoMemoryServer\" and automatically start it\nconst mongod = await MongoMemoryServer.create();\n\nconst uri = mongod.getUri();\n\n// The Server can be stopped again with\nawait mongod.stop();\n")),(0,i.kt)("h2",{id:"replicaset"},"ReplicaSet"),(0,i.kt)("p",null,"A ReplicaSet can be easily started with:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ts"},'import { MongoMemoryReplSet } from \'mongodb-memory-server\';\n\n// This will create an new instance of "MongoMemoryReplSet" and automatically start all Servers\nconst replset = await MongoMemoryReplSet.create({ replSet: { count: 4 } }); // This will create an ReplSet with 4 members\n// To use Transactions, the "storageEngine" needs to be changed to `wiredTiger`\nconst replset = await MongoMemoryReplSet.create({ replSet: { count: 4, storageEngine: \'wiredTiger\' } }); // This will create an ReplSet with 4 members and storage-engine "wiredTiger"\n\nconst uri = replset.getUri();\n\n// The ReplSet can be stopped again with\nawait replset.stop();\n')),(0,i.kt)("h2",{id:"final-notes"},"Final Notes"),(0,i.kt)("admonition",{type:"danger"},(0,i.kt)("p",{parentName:"admonition"},"When you are not using a global instance for tests and run multi-threaded tests, it can cause Race Conditions.")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/b0db94fd.3912a435.js b/versions/beta/assets/js/b0db94fd.3912a435.js deleted file mode 100644 index ae6d41d1c..000000000 --- a/versions/beta/assets/js/b0db94fd.3912a435.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[615],{3905:function(e,t,r){r.d(t,{Zo:function(){return p},kt:function(){return f}});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),c=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),m=c(r),d=o,f=m["".concat(l,".").concat(d)]||m[d]||u[d]||a;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[m]="string"==typeof e?e:o,i[1]=s;for(var c=2;c=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=n.createContext({}),c=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),m=c(r),d=o,f=m["".concat(l,".").concat(d)]||m[d]||u[d]||a;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[m]="string"==typeof e?e:o,i[1]=s;for(var c=2;c=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=t.createContext({}),u=function(e){var r=t.useContext(c),n=r;return e&&(n="function"==typeof e?e(r):i(i({},r),e)),n},m=function(e){var r=u(e.components);return t.createElement(c.Provider,{value:r},e.children)},l="mdxType",p={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},d=t.forwardRef((function(e,r){var n=e.components,o=e.mdxType,s=e.originalType,c=e.parentName,m=a(e,["components","mdxType","originalType","parentName"]),l=u(n),d=o,y=l["".concat(c,".").concat(d)]||l[d]||p[d]||s;return n?t.createElement(y,i(i({ref:r},m),{},{components:n})):t.createElement(y,i({ref:r},m))}));function y(e,r){var n=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var s=n.length,i=new Array(s);i[0]=d;var a={};for(var c in r)hasOwnProperty.call(r,c)&&(a[c]=r[c]);a.originalType=e,a[l]="string"==typeof e?e:o,i[1]=a;for(var u=2;u 0) {\n retries -= 1;\n try {\n await _setup(db);\n } catch (err) {\n if (err instanceof mongodb.MongoWriteConcernError && /operation was interrupted/.test(err.message)) {\n continue;\n }\n\n throw err;\n }\n }\n}\n\nasync function _setup(db) {\n await db.dropDatabase();\n}\n")),(0,s.kt)("p",null,"See ",(0,s.kt)("a",{parentName:"p",href:"https://www.mongodb.com/docs/manual/core/retryable-writes/#retryable-write-operations"},"Operations which are retry-able"),"."))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/b46a53f4.df9c6b36.js b/versions/beta/assets/js/b46a53f4.df9c6b36.js new file mode 100644 index 000000000..1f87d609f --- /dev/null +++ b/versions/beta/assets/js/b46a53f4.df9c6b36.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[8750],{3905:function(e,r,n){n.d(r,{Zo:function(){return m},kt:function(){return y}});var t=n(7294);function o(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function s(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function i(e){for(var r=1;r=0||(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=t.createContext({}),u=function(e){var r=t.useContext(c),n=r;return e&&(n="function"==typeof e?e(r):i(i({},r),e)),n},m=function(e){var r=u(e.components);return t.createElement(c.Provider,{value:r},e.children)},l="mdxType",p={inlineCode:"code",wrapper:function(e){var r=e.children;return t.createElement(t.Fragment,{},r)}},d=t.forwardRef((function(e,r){var n=e.components,o=e.mdxType,s=e.originalType,c=e.parentName,m=a(e,["components","mdxType","originalType","parentName"]),l=u(n),d=o,y=l["".concat(c,".").concat(d)]||l[d]||p[d]||s;return n?t.createElement(y,i(i({ref:r},m),{},{components:n})):t.createElement(y,i({ref:r},m))}));function y(e,r){var n=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var s=n.length,i=new Array(s);i[0]=d;var a={};for(var c in r)hasOwnProperty.call(r,c)&&(a[c]=r[c]);a.originalType=e,a[l]="string"==typeof e?e:o,i[1]=a;for(var u=2;u 0) {\n retries -= 1;\n try {\n await _setup(db);\n } catch (err) {\n if (err instanceof mongodb.MongoWriteConcernError && /operation was interrupted/.test(err.message)) {\n continue;\n }\n\n throw err;\n }\n }\n}\n\nasync function _setup(db) {\n await db.dropDatabase();\n}\n")),(0,s.kt)("p",null,"See ",(0,s.kt)("a",{parentName:"p",href:"https://www.mongodb.com/docs/manual/core/retryable-writes/#retryable-write-operations"},"Operations which are retry-able"),"."))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/c4f5d8e4.40c4fa41.js b/versions/beta/assets/js/c4f5d8e4.40c4fa41.js new file mode 100644 index 000000000..5f4ef7e29 --- /dev/null +++ b/versions/beta/assets/js/c4f5d8e4.40c4fa41.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[4195],{5239:function(e,t,r){r.r(t),r.d(t,{default:function(){return b}});var n=r(7462),a=r(7294),s=r(6010),l=r(9439),m=r(9960),o=r(2263),c=r(4996),i={heroBanner:"heroBanner_UJJx",buttons:"buttons_pzbO",features:"features_keug",featureImage:"featureImage_yA8i"},u=[{title:"Easy to Use",description:a.createElement(a.Fragment,null,'mongodb-memory-server was build with "easy-to-use" in mind')},{title:"Focus on What Matters",description:a.createElement(a.Fragment,null,"mongodb-memory-server can be quickly added to projects on many systems")},{title:"Supports Many Systems",description:a.createElement(a.Fragment,null,"mongodb-memory-server supports many different systems without problems (exceptions are some linux distributions)")}];function d(e){var t=e.imageUrl,r=e.title,n=e.description,l=(0,c.Z)(t);return a.createElement("div",{className:(0,s.Z)("col col--4",i.feature)},l&&a.createElement("div",{className:"text--center"},a.createElement("img",{className:i.featureImage,src:l,alt:r})),a.createElement("h3",null,r),a.createElement("p",null,n))}var b=function(){var e=(0,o.Z)().siteConfig,t=void 0===e?{}:e;return a.createElement(l.Z,{title:t.title,description:t.tagline},a.createElement("header",{className:(0,s.Z)("hero hero--primary",i.heroBanner)},a.createElement("div",{className:"container"},a.createElement("h1",{className:"hero__title"},t.title),a.createElement("p",{className:"hero__subtitle"},t.tagline),a.createElement("div",{className:i.buttons},a.createElement(m.Z,{className:(0,s.Z)("button button--outline button--secondary button--lg",i.getStarted),to:(0,c.Z)("docs/")},"Get Started")))),a.createElement("main",null,u&&u.length>0&&a.createElement("section",{className:i.features},a.createElement("div",{className:"container"},a.createElement("div",{className:"row"},u.map((function(e,t){return a.createElement(d,(0,n.Z)({key:t},e))})))))))}}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/c4f5d8e4.69c2c86c.js b/versions/beta/assets/js/c4f5d8e4.69c2c86c.js deleted file mode 100644 index 681193224..000000000 --- a/versions/beta/assets/js/c4f5d8e4.69c2c86c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[195],{5239:function(e,t,r){r.r(t),r.d(t,{default:function(){return b}});var n=r(7462),a=r(7294),s=r(6010),l=r(9439),m=r(9960),o=r(2263),c=r(4996),i={heroBanner:"heroBanner_UJJx",buttons:"buttons_pzbO",features:"features_keug",featureImage:"featureImage_yA8i"},u=[{title:"Easy to Use",description:a.createElement(a.Fragment,null,'mongodb-memory-server was build with "easy-to-use" in mind')},{title:"Focus on What Matters",description:a.createElement(a.Fragment,null,"mongodb-memory-server can be quickly added to projects on many systems")},{title:"Supports Many Systems",description:a.createElement(a.Fragment,null,"mongodb-memory-server supports many different systems without problems (exceptions are some linux distributions)")}];function d(e){var t=e.imageUrl,r=e.title,n=e.description,l=(0,c.Z)(t);return a.createElement("div",{className:(0,s.Z)("col col--4",i.feature)},l&&a.createElement("div",{className:"text--center"},a.createElement("img",{className:i.featureImage,src:l,alt:r})),a.createElement("h3",null,r),a.createElement("p",null,n))}var b=function(){var e=(0,o.Z)().siteConfig,t=void 0===e?{}:e;return a.createElement(l.Z,{title:t.title,description:t.tagline},a.createElement("header",{className:(0,s.Z)("hero hero--primary",i.heroBanner)},a.createElement("div",{className:"container"},a.createElement("h1",{className:"hero__title"},t.title),a.createElement("p",{className:"hero__subtitle"},t.tagline),a.createElement("div",{className:i.buttons},a.createElement(m.Z,{className:(0,s.Z)("button button--outline button--secondary button--lg",i.getStarted),to:(0,c.Z)("docs/")},"Get Started")))),a.createElement("main",null,u&&u.length>0&&a.createElement("section",{className:i.features},a.createElement("div",{className:"container"},a.createElement("div",{className:"row"},u.map((function(e,t){return a.createElement(d,(0,n.Z)({key:t},e))})))))))}}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/ca5259b8.4ece3d55.js b/versions/beta/assets/js/ca5259b8.4ece3d55.js deleted file mode 100644 index ed5262812..000000000 --- a/versions/beta/assets/js/ca5259b8.4ece3d55.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[686],{3905:function(e,n,t){t.d(n,{Zo:function(){return s},kt:function(){return f}});var r=t(7294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var p=r.createContext({}),m=function(e){var n=r.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},s=function(e){var n=m(e.components);return r.createElement(p.Provider,{value:n},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},u=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=m(t),u=a,f=c["".concat(p,".").concat(u)]||c[u]||d[u]||o;return t?r.createElement(f,i(i({ref:n},s),{},{components:t})):r.createElement(f,i({ref:n},s))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=u;var l={};for(var p in n)hasOwnProperty.call(n,p)&&(l[p]=n[p]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var m=2;m=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var p=r.createContext({}),m=function(e){var n=r.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},s=function(e){var n=m(e.components);return r.createElement(p.Provider,{value:n},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},u=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),c=m(t),u=a,f=c["".concat(p,".").concat(u)]||c[u]||d[u]||o;return t?r.createElement(f,i(i({ref:n},s),{},{components:t})):r.createElement(f,i({ref:n},s))}));function f(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=u;var l={};for(var p in n)hasOwnProperty.call(n,p)&&(l[p]=n[p]);l.originalType=e,l[c]="string"==typeof e?e:a,i[1]=l;for(var m=2;m=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var c=o.createContext({}),l=function(e){var n=o.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):s(s({},n),e)),t},m=function(e){var n=l(e.components);return o.createElement(c.Provider,{value:n},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},d=o.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,m=i(e,["components","mdxType","originalType","parentName"]),p=l(t),d=r,g=p["".concat(c,".").concat(d)]||p[d]||u[d]||a;return t?o.createElement(g,s(s({ref:n},m),{},{components:t})):o.createElement(g,s({ref:n},m))}));function g(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,s=new Array(a);s[0]=d;var i={};for(var c in n)hasOwnProperty.call(n,c)&&(i[c]=n[c]);i.originalType=e,i[p]="string"==typeof e?e:r,s[1]=i;for(var l=2;l/test/globalSetup.ts",\n "globalTeardown": "/test/globalTeardown.ts",\n "setupFilesAfterEnv": [\n "/test/setupFile.ts"\n ]\n}\n\n')),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"globalSetup.ts"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { MongoMemoryServer } from 'mongodb-memory-server';\nimport * as mongoose from 'mongoose';\nimport { config } from './utils/config';\n\nexport = async function globalSetup() {\n if (config.Memory) { // Config to decide if an mongodb-memory-server instance should be used\n // it's needed in global space, because we don't want to create a new instance every test-suite\n const instance = await MongoMemoryServer.create();\n const uri = instance.getUri();\n (global as any).__MONGOINSTANCE = instance;\n process.env.MONGO_URI = uri.slice(0, uri.lastIndexOf('/'));\n } else {\n process.env.MONGO_URI = `mongodb://${config.IP}:${config.Port}`;\n }\n\n // The following is to make sure the database is clean before an test starts\n const conn = await mongoose.connect(`${process.env.MONGO_URI}/${config.Database}`);\n await conn.connection.db.dropDatabase();\n await mongoose.disconnect();\n};\n\n")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"globalTeardown.ts"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { MongoMemoryServer } from 'mongodb-memory-server';\nimport { config } from './utils/config';\n\nexport = async function globalTeardown() {\n if (config.Memory) { // Config to decide if an mongodb-memory-server instance should be used\n const instance: MongoMemoryServer = (global as any).__MONGOINSTANCE;\n await instance.stop();\n }\n};\n")),(0,a.kt)("p",null,"and an ",(0,a.kt)("a",{parentName:"p",href:"https://jestjs.io/docs/en/configuration#setupfilesafterenv-array"},(0,a.kt)("inlineCode",{parentName:"a"},"setupFilesAfterEnv"))," can be used to connect something like ",(0,a.kt)("inlineCode",{parentName:"p"},"mongoose")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"mongodb")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"setupFile.ts"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"beforeAll(async () => {\n // put your client connection code here, example with mongoose:\n await mongoose.connect(process.env['MONGO_URI']);\n});\n\nafterAll(async () => {\n // put your client disconnection code here, example with mongodb:\n await mongoose.disconnect();\n});\n")),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"It is very important to limit the spawned number of Jest workers on machines that have many cores, because otherwise the tests may run slower than with fewer workers, because the database instance(s) may be hit very hard.",(0,a.kt)("br",{parentName:"p"}),"\n","Use either ",(0,a.kt)("a",{parentName:"p",href:"https://jestjs.io/docs/configuration#maxworkers-number--string"},(0,a.kt)("inlineCode",{parentName:"a"},"--maxWorkers 4"))," or ",(0,a.kt)("a",{parentName:"p",href:"https://jestjs.io/docs/cli#--runinband"},(0,a.kt)("inlineCode",{parentName:"a"},"--runInBand"))," to limit the workers.")),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Keep in mind that jest's global-setup and global-teardown do ",(0,a.kt)("strong",{parentName:"p"},"not")," share a environment with the tests themself, and so require ",(0,a.kt)("inlineCode",{parentName:"p"},"setupFile")," / ",(0,a.kt)("inlineCode",{parentName:"p"},"setupFilesAfterEnv")," to actually connect.")),(0,a.kt)("h2",{id:"mocha--chai"},"mocha / chai"),(0,a.kt)("span",{class:"badge badge--secondary"},"mocha version (unknown)"),(0,a.kt)("p",null,"Start Mocha with ",(0,a.kt)("inlineCode",{parentName:"p"},"--timeout 60000")," cause first download of MongoDB binaries may take a time."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"import mongoose from 'mongoose';\nimport { MongoMemoryServer } from 'mongodb-memory-server';\n\nlet mongoServer;\nconst opts = { useMongoClient: true }; // remove this option if you use mongoose 5 and above\n\nbefore(async () => {\n mongoServer = await MongoMemoryServer.create();\n const mongoUri = mongoServer.getUri();\n await mongoose.connect(mongoUri, opts);\n});\n\nafter(async () => {\n await mongoose.disconnect();\n await mongoServer.stop();\n});\n\ndescribe('...', () => {\n it('...', async () => {\n const User = mongoose.model('User', new mongoose.Schema({ name: String }));\n const cnt = await User.count();\n expect(cnt).to.equal(0);\n });\n});\n")),(0,a.kt)("h2",{id:"ava-test-runner"},"AVA test runner"),(0,a.kt)("p",null,"For AVA written ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/zellwk/ava/blob/8b7ccba1d80258b272ae7cae6ba4967cd1c13030/docs/recipes/endpoint-testing-with-mongoose.md"},"detailed tutorial")," how to test mongoose models by @zellwk."),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Note that this mentioned tutorial is pre 7.x")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/d5016940.63b0e8e9.js b/versions/beta/assets/js/d5016940.63b0e8e9.js new file mode 100644 index 000000000..9eba2f316 --- /dev/null +++ b/versions/beta/assets/js/d5016940.63b0e8e9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[9416],{3905:function(e,n,t){t.d(n,{Zo:function(){return m},kt:function(){return g}});var o=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function s(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var c=o.createContext({}),l=function(e){var n=o.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):s(s({},n),e)),t},m=function(e){var n=l(e.components);return o.createElement(c.Provider,{value:n},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},d=o.forwardRef((function(e,n){var t=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,m=i(e,["components","mdxType","originalType","parentName"]),p=l(t),d=r,g=p["".concat(c,".").concat(d)]||p[d]||u[d]||a;return t?o.createElement(g,s(s({ref:n},m),{},{components:t})):o.createElement(g,s({ref:n},m))}));function g(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var a=t.length,s=new Array(a);s[0]=d;var i={};for(var c in n)hasOwnProperty.call(n,c)&&(i[c]=n[c]);i.originalType=e,i[p]="string"==typeof e?e:r,s[1]=i;for(var l=2;l/test/globalSetup.ts",\n "globalTeardown": "/test/globalTeardown.ts",\n "setupFilesAfterEnv": [\n "/test/setupFile.ts"\n ]\n}\n\n')),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"globalSetup.ts"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { MongoMemoryServer } from 'mongodb-memory-server';\nimport * as mongoose from 'mongoose';\nimport { config } from './utils/config';\n\nexport = async function globalSetup() {\n if (config.Memory) { // Config to decide if an mongodb-memory-server instance should be used\n // it's needed in global space, because we don't want to create a new instance every test-suite\n const instance = await MongoMemoryServer.create();\n const uri = instance.getUri();\n (global as any).__MONGOINSTANCE = instance;\n process.env.MONGO_URI = uri.slice(0, uri.lastIndexOf('/'));\n } else {\n process.env.MONGO_URI = `mongodb://${config.IP}:${config.Port}`;\n }\n\n // The following is to make sure the database is clean before an test starts\n const conn = await mongoose.connect(`${process.env.MONGO_URI}/${config.Database}`);\n await conn.connection.db.dropDatabase();\n await mongoose.disconnect();\n};\n\n")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"globalTeardown.ts"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"import { MongoMemoryServer } from 'mongodb-memory-server';\nimport { config } from './utils/config';\n\nexport = async function globalTeardown() {\n if (config.Memory) { // Config to decide if an mongodb-memory-server instance should be used\n const instance: MongoMemoryServer = (global as any).__MONGOINSTANCE;\n await instance.stop();\n }\n};\n")),(0,a.kt)("p",null,"and an ",(0,a.kt)("a",{parentName:"p",href:"https://jestjs.io/docs/en/configuration#setupfilesafterenv-array"},(0,a.kt)("inlineCode",{parentName:"a"},"setupFilesAfterEnv"))," can be used to connect something like ",(0,a.kt)("inlineCode",{parentName:"p"},"mongoose")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"mongodb")),(0,a.kt)("p",null,(0,a.kt)("inlineCode",{parentName:"p"},"setupFile.ts"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-ts"},"beforeAll(async () => {\n // put your client connection code here, example with mongoose:\n await mongoose.connect(process.env['MONGO_URI']);\n});\n\nafterAll(async () => {\n // put your client disconnection code here, example with mongodb:\n await mongoose.disconnect();\n});\n")),(0,a.kt)("admonition",{type:"caution"},(0,a.kt)("p",{parentName:"admonition"},"It is very important to limit the spawned number of Jest workers on machines that have many cores, because otherwise the tests may run slower than with fewer workers, because the database instance(s) may be hit very hard.",(0,a.kt)("br",{parentName:"p"}),"\n","Use either ",(0,a.kt)("a",{parentName:"p",href:"https://jestjs.io/docs/configuration#maxworkers-number--string"},(0,a.kt)("inlineCode",{parentName:"a"},"--maxWorkers 4"))," or ",(0,a.kt)("a",{parentName:"p",href:"https://jestjs.io/docs/cli#--runinband"},(0,a.kt)("inlineCode",{parentName:"a"},"--runInBand"))," to limit the workers.")),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Keep in mind that jest's global-setup and global-teardown do ",(0,a.kt)("strong",{parentName:"p"},"not")," share a environment with the tests themself, and so require ",(0,a.kt)("inlineCode",{parentName:"p"},"setupFile")," / ",(0,a.kt)("inlineCode",{parentName:"p"},"setupFilesAfterEnv")," to actually connect.")),(0,a.kt)("h2",{id:"mocha--chai"},"mocha / chai"),(0,a.kt)("span",{class:"badge badge--secondary"},"mocha version (unknown)"),(0,a.kt)("p",null,"Start Mocha with ",(0,a.kt)("inlineCode",{parentName:"p"},"--timeout 60000")," cause first download of MongoDB binaries may take a time."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"import mongoose from 'mongoose';\nimport { MongoMemoryServer } from 'mongodb-memory-server';\n\nlet mongoServer;\nconst opts = { useMongoClient: true }; // remove this option if you use mongoose 5 and above\n\nbefore(async () => {\n mongoServer = await MongoMemoryServer.create();\n const mongoUri = mongoServer.getUri();\n await mongoose.connect(mongoUri, opts);\n});\n\nafter(async () => {\n await mongoose.disconnect();\n await mongoServer.stop();\n});\n\ndescribe('...', () => {\n it('...', async () => {\n const User = mongoose.model('User', new mongoose.Schema({ name: String }));\n const cnt = await User.count();\n expect(cnt).to.equal(0);\n });\n});\n")),(0,a.kt)("h2",{id:"ava-test-runner"},"AVA test runner"),(0,a.kt)("p",null,"For AVA written ",(0,a.kt)("a",{parentName:"p",href:"https://github.com/zellwk/ava/blob/8b7ccba1d80258b272ae7cae6ba4967cd1c13030/docs/recipes/endpoint-testing-with-mongoose.md"},"detailed tutorial")," how to test mongoose models by @zellwk."),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Note that this mentioned tutorial is pre 7.x")))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/db74d20c.8fb91781.js b/versions/beta/assets/js/db74d20c.8fb91781.js deleted file mode 100644 index e665b6ff8..000000000 --- a/versions/beta/assets/js/db74d20c.8fb91781.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[176],{3905:function(e,t,n){n.d(t,{Zo:function(){return d},kt:function(){return k}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),m=s(n),c=r,k=m["".concat(p,".").concat(c)]||m[c]||u[c]||i;return n?a.createElement(k,o(o({ref:t},d),{},{components:n})):a.createElement(k,o({ref:t},d))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=c;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[m]="string"==typeof e?e:r,o[1]=l;for(var s=2;s = {})")),(0,i.kt)("p",null,"Create an new ReplSet without starting it"),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"When directly starting the replset, ",(0,i.kt)("a",{parentName:"p",href:"#create"},(0,i.kt)("inlineCode",{parentName:"a"},"create"))," should be used")),(0,i.kt)("h3",{id:"create"},"create"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async create(opts?: Partial): Promise")),(0,i.kt)("p",null,"Create an new ReplSet and start it (while being an Promise)"),(0,i.kt)("h3",{id:"statechange"},"stateChange"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected stateChange(newState: MongoMemoryReplSetStates, ...args: any[]): void")),(0,i.kt)("p",null,"Used to change the state of the class, uses ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-replset-states"},(0,i.kt)("inlineCode",{parentName:"a"},"MongoMemoryReplSetStates")," enum"),", it is ",(0,i.kt)("inlineCode",{parentName:"p"},"protected")," to not accidentally use it"),(0,i.kt)("h3",{id:"getinstanceopts"},"getInstanceOpts"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected getInstanceOpts(baseOpts: MongoMemoryInstancePropBase = {}): MongoMemoryInstanceProp")),(0,i.kt)("p",null,"Constructs the options used for an instance"),(0,i.kt)("h3",{id:"geturi"},"getUri"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"getUri(otherDb?: string): string")),(0,i.kt)("p",null,"Get an mongodb-usable uri (can also be used in mongoose)"),(0,i.kt)("p",null,"When no arguments are set, the URI will always use ip ",(0,i.kt)("inlineCode",{parentName:"p"},"127.0.0.1")," and end with ",(0,i.kt)("inlineCode",{parentName:"p"},"/?replicaSet=ReplSetName")," (not setting a database).",(0,i.kt)("br",{parentName:"p"}),"\n","When setting ",(0,i.kt)("inlineCode",{parentName:"p"},"otherDbName"),", the value of ",(0,i.kt)("inlineCode",{parentName:"p"},"otherDbName")," will be appended after ",(0,i.kt)("inlineCode",{parentName:"p"},"/")," and before any query arguments.",(0,i.kt)("br",{parentName:"p"}),"\n","When setting ",(0,i.kt)("inlineCode",{parentName:"p"},"otherIp"),", the ip will be the value of ",(0,i.kt)("inlineCode",{parentName:"p"},"otherIp")," instead of ",(0,i.kt)("inlineCode",{parentName:"p"},"127.0.0.1")," (for all instances)."),(0,i.kt)("h3",{id:"start"},"start"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"async start(): Promise")),(0,i.kt)("p",null,"Used to start an new ReplSet or to Re-Start an stopped ReplSet"),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Error if ReplSet is already running")),(0,i.kt)("h3",{id:"initallservers"},"initAllServers"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected async initAllServers(): Promise")),(0,i.kt)("p",null,"Used by ",(0,i.kt)("a",{parentName:"p",href:"#start"},(0,i.kt)("inlineCode",{parentName:"a"},"start"))," and to restart without fully running everything again"),(0,i.kt)("h3",{id:"ensurekeyfile"},"ensureKeyFile"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected async ensureKeyFile(): Promise")),(0,i.kt)("p",null,"Ensures and returns that ",(0,i.kt)("a",{parentName:"p",href:"#_keyfiletmp"},(0,i.kt)("inlineCode",{parentName:"a"},"_keyfiletmp"))," is defined an exists and also that the keyfile is created"),(0,i.kt)("h3",{id:"stop"},"stop"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"async stop(cleanupOptions?: Cleanup): Promise")),(0,i.kt)("p",null,"Stop an running instance, this function will by default call ",(0,i.kt)("a",{parentName:"p",href:"#cleanup"},(0,i.kt)("inlineCode",{parentName:"a"},".cleanup"))," with ",(0,i.kt)("inlineCode",{parentName:"p"},"{ doCleanup: true, force: false }"),"."),(0,i.kt)("p",null,"With ",(0,i.kt)("inlineCode",{parentName:"p"},"cleanupOptions")," options for cleanup can be manually set."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will not Error if instance is not running")),(0,i.kt)("h3",{id:"cleanup"},"cleanup"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"async cleanup(options?: Cleanup): Promise")),(0,i.kt)("p",null,"Cleanup all files used by this ReplSet's instances, by default ",(0,i.kt)("inlineCode",{parentName:"p"},"{ doCleanup: true, force: false }")," is used."),(0,i.kt)("p",null,"With ",(0,i.kt)("inlineCode",{parentName:"p"},"options")," can be set how to run a cleanup."),(0,i.kt)("h3",{id:"waituntilrunning"},"waitUntilRunning"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"async waitUntilRunning(): Promise")),(0,i.kt)("p",null,"Wait until all instances are running."),(0,i.kt)("p",null,"It is recommended to ",(0,i.kt)("inlineCode",{parentName:"p"},"await")," the promise returned from ",(0,i.kt)("inlineCode",{parentName:"p"},"start")," when available."),(0,i.kt)("p",null,"Does not start the replset instance if not already starting (unlike ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-memory-server#ensureinstance"},(0,i.kt)("inlineCode",{parentName:"a"},"ensureInstance")),")."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Error if state is not ",(0,i.kt)("inlineCode",{parentName:"p"},"running")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"init"),".")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will ",(0,i.kt)("strong",{parentName:"p"},"not")," Error if a error is encountered while waiting.")),(0,i.kt)("h3",{id:"_initreplset"},"_initReplSet"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected async _initReplSet(): Promise")),(0,i.kt)("p",null,"This is used to connect to the first server and initiate the ReplSet with an command",(0,i.kt)("br",null),"\nAlso enables ",(0,i.kt)("inlineCode",{parentName:"p"},"auth")),(0,i.kt)("h3",{id:"_initserver"},"_initServer"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _initServer(instanceOpts: MongoMemoryInstanceProp): MongoMemoryServer")),(0,i.kt)("p",null,"Creates an new ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-memory-server"},(0,i.kt)("inlineCode",{parentName:"a"},"instance"))," for the ReplSet"),(0,i.kt)("h3",{id:"_waitforprimary"},"_waitForPrimary"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected async _waitForPrimary(timeout: number = 1000 * 30, where?: string): Promise")),(0,i.kt)("p",null,"Wait until the ReplSet has elected an Primary, the ",(0,i.kt)("inlineCode",{parentName:"p"},"where")," string will be added to the error if the timeout is reached"),(0,i.kt)("h2",{id:"values"},"Values"),(0,i.kt)("h3",{id:"servers"},"servers"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"servers: MongoMemoryServer[]")),(0,i.kt)("p",null,"Stores all the servers of this ReplSet"),(0,i.kt)("h3",{id:"instanceopts"},"instanceOpts"),(0,i.kt)("p",null,"Typings:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"get instanceOpts(): MongoMemoryInstancePropBase[]")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"set instanceOpts(val: MongoMemoryInstancePropBase[])"))),(0,i.kt)("p",null,"Getter & Setter for ",(0,i.kt)("a",{parentName:"p",href:"#_instanceopts"},(0,i.kt)("inlineCode",{parentName:"a"},"_instanceOpts"))),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Throw an Error if ",(0,i.kt)("inlineCode",{parentName:"p"},"state")," is not ",(0,i.kt)("inlineCode",{parentName:"p"},"stopped"))),(0,i.kt)("h3",{id:"_instanceopts"},"_instanceOpts"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _instanceOpts!: MongoMemoryInstancePropBase[]")),(0,i.kt)("p",null,"Stores Options used for an instance"),(0,i.kt)("h3",{id:"binaryopts"},"binaryOpts"),(0,i.kt)("p",null,"Typings:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"get binaryOpts(): MongoBinaryOpts")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"set binaryOpts(val: MongoBinaryOpts)"))),(0,i.kt)("p",null,"Getter & Setter for ",(0,i.kt)("a",{parentName:"p",href:"#_binaryopts"},(0,i.kt)("inlineCode",{parentName:"a"},"_binaryOpts"))),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Throw an Error if ",(0,i.kt)("inlineCode",{parentName:"p"},"state")," is not ",(0,i.kt)("inlineCode",{parentName:"p"},"stopped"))),(0,i.kt)("h3",{id:"_binaryopts"},"_binaryOpts"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _binaryOpts!: MongoBinaryOpts")),(0,i.kt)("p",null,"Stores the options used for the binary"),(0,i.kt)("h3",{id:"replsetopts"},"replSetOpts"),(0,i.kt)("p",null,"Typings:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"get replSetOpts(): ReplSetOpts")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"set replSetOpts(val: ReplSetOpts)"))),(0,i.kt)("p",null,"Getter & Setter for ",(0,i.kt)("a",{parentName:"p",href:"#_replsetopts"},(0,i.kt)("inlineCode",{parentName:"a"},"_replSetOpts"))),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Throw an Error if ",(0,i.kt)("inlineCode",{parentName:"p"},"state")," is not ",(0,i.kt)("inlineCode",{parentName:"p"},"stopped"))),(0,i.kt)("h3",{id:"_replsetopts"},"_replSetOpts"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _replSetOpts!: Required")),(0,i.kt)("p",null,"Stores the options used for the ReplSet Initiation, uses ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/interfaces/replset-opts"},(0,i.kt)("inlineCode",{parentName:"a"},"ReplSetOpts")),"."),(0,i.kt)("h3",{id:"_keyfiletmp"},"_keyfiletmp"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _keyfiletmp?: string")),(0,i.kt)("p",null,"Stores the path of the created temporary directory for the keyfile location"),(0,i.kt)("h3",{id:"state"},"state"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"get state(): MongoMemoryReplSetStates")),(0,i.kt)("p",null,"Getter for ",(0,i.kt)("a",{parentName:"p",href:"#_state"},(0,i.kt)("inlineCode",{parentName:"a"},"_state"))),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Throw an Error if ",(0,i.kt)("inlineCode",{parentName:"p"},"state")," is not ",(0,i.kt)("inlineCode",{parentName:"p"},"stopped"))),(0,i.kt)("h3",{id:"_state"},"_state"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _state: MongoMemoryReplSetStates")),(0,i.kt)("p",null,"Stores the current State, uses ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-replset-states"},(0,i.kt)("inlineCode",{parentName:"a"},"MongoMemoryReplSetStates")," enum"),"."),(0,i.kt)("h3",{id:"_rancreateauth"},"_ranCreateAuth"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _ranCreateAuth: boolean")),(0,i.kt)("p",null,"Stores if the auth creation has already ran"))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/db74d20c.f17297b8.js b/versions/beta/assets/js/db74d20c.f17297b8.js new file mode 100644 index 000000000..1f6ec0abd --- /dev/null +++ b/versions/beta/assets/js/db74d20c.f17297b8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[1176],{3905:function(e,t,n){n.d(t,{Zo:function(){return d},kt:function(){return k}});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=a.createContext({}),s=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(p.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),m=s(n),c=r,k=m["".concat(p,".").concat(c)]||m[c]||u[c]||i;return n?a.createElement(k,o(o({ref:t},d),{},{components:n})):a.createElement(k,o({ref:t},d))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=c;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[m]="string"==typeof e?e:r,o[1]=l;for(var s=2;s = {})")),(0,i.kt)("p",null,"Create an new ReplSet without starting it"),(0,i.kt)("admonition",{type:"tip"},(0,i.kt)("p",{parentName:"admonition"},"When directly starting the replset, ",(0,i.kt)("a",{parentName:"p",href:"#create"},(0,i.kt)("inlineCode",{parentName:"a"},"create"))," should be used")),(0,i.kt)("h3",{id:"create"},"create"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"static async create(opts?: Partial): Promise")),(0,i.kt)("p",null,"Create an new ReplSet and start it (while being an Promise)"),(0,i.kt)("h3",{id:"statechange"},"stateChange"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected stateChange(newState: MongoMemoryReplSetStates, ...args: any[]): void")),(0,i.kt)("p",null,"Used to change the state of the class, uses ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-replset-states"},(0,i.kt)("inlineCode",{parentName:"a"},"MongoMemoryReplSetStates")," enum"),", it is ",(0,i.kt)("inlineCode",{parentName:"p"},"protected")," to not accidentally use it"),(0,i.kt)("h3",{id:"getinstanceopts"},"getInstanceOpts"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected getInstanceOpts(baseOpts: MongoMemoryInstancePropBase = {}): MongoMemoryInstanceProp")),(0,i.kt)("p",null,"Constructs the options used for an instance"),(0,i.kt)("h3",{id:"geturi"},"getUri"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"getUri(otherDb?: string): string")),(0,i.kt)("p",null,"Get an mongodb-usable uri (can also be used in mongoose)"),(0,i.kt)("p",null,"When no arguments are set, the URI will always use ip ",(0,i.kt)("inlineCode",{parentName:"p"},"127.0.0.1")," and end with ",(0,i.kt)("inlineCode",{parentName:"p"},"/?replicaSet=ReplSetName")," (not setting a database).",(0,i.kt)("br",{parentName:"p"}),"\n","When setting ",(0,i.kt)("inlineCode",{parentName:"p"},"otherDbName"),", the value of ",(0,i.kt)("inlineCode",{parentName:"p"},"otherDbName")," will be appended after ",(0,i.kt)("inlineCode",{parentName:"p"},"/")," and before any query arguments.",(0,i.kt)("br",{parentName:"p"}),"\n","When setting ",(0,i.kt)("inlineCode",{parentName:"p"},"otherIp"),", the ip will be the value of ",(0,i.kt)("inlineCode",{parentName:"p"},"otherIp")," instead of ",(0,i.kt)("inlineCode",{parentName:"p"},"127.0.0.1")," (for all instances)."),(0,i.kt)("h3",{id:"start"},"start"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"async start(): Promise")),(0,i.kt)("p",null,"Used to start an new ReplSet or to Re-Start an stopped ReplSet"),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Error if ReplSet is already running")),(0,i.kt)("h3",{id:"initallservers"},"initAllServers"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected async initAllServers(): Promise")),(0,i.kt)("p",null,"Used by ",(0,i.kt)("a",{parentName:"p",href:"#start"},(0,i.kt)("inlineCode",{parentName:"a"},"start"))," and to restart without fully running everything again"),(0,i.kt)("h3",{id:"ensurekeyfile"},"ensureKeyFile"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected async ensureKeyFile(): Promise")),(0,i.kt)("p",null,"Ensures and returns that ",(0,i.kt)("a",{parentName:"p",href:"#_keyfiletmp"},(0,i.kt)("inlineCode",{parentName:"a"},"_keyfiletmp"))," is defined an exists and also that the keyfile is created"),(0,i.kt)("h3",{id:"stop"},"stop"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"async stop(cleanupOptions?: Cleanup): Promise")),(0,i.kt)("p",null,"Stop an running instance, this function will by default call ",(0,i.kt)("a",{parentName:"p",href:"#cleanup"},(0,i.kt)("inlineCode",{parentName:"a"},".cleanup"))," with ",(0,i.kt)("inlineCode",{parentName:"p"},"{ doCleanup: true, force: false }"),"."),(0,i.kt)("p",null,"With ",(0,i.kt)("inlineCode",{parentName:"p"},"cleanupOptions")," options for cleanup can be manually set."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will not Error if instance is not running")),(0,i.kt)("h3",{id:"cleanup"},"cleanup"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"async cleanup(options?: Cleanup): Promise")),(0,i.kt)("p",null,"Cleanup all files used by this ReplSet's instances, by default ",(0,i.kt)("inlineCode",{parentName:"p"},"{ doCleanup: true, force: false }")," is used."),(0,i.kt)("p",null,"With ",(0,i.kt)("inlineCode",{parentName:"p"},"options")," can be set how to run a cleanup."),(0,i.kt)("h3",{id:"waituntilrunning"},"waitUntilRunning"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"async waitUntilRunning(): Promise")),(0,i.kt)("p",null,"Wait until all instances are running."),(0,i.kt)("p",null,"It is recommended to ",(0,i.kt)("inlineCode",{parentName:"p"},"await")," the promise returned from ",(0,i.kt)("inlineCode",{parentName:"p"},"start")," when available."),(0,i.kt)("p",null,"Does not start the replset instance if not already starting (unlike ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-memory-server#ensureinstance"},(0,i.kt)("inlineCode",{parentName:"a"},"ensureInstance")),")."),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Error if state is not ",(0,i.kt)("inlineCode",{parentName:"p"},"running")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"init"),".")),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will ",(0,i.kt)("strong",{parentName:"p"},"not")," Error if a error is encountered while waiting.")),(0,i.kt)("h3",{id:"_initreplset"},"_initReplSet"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected async _initReplSet(): Promise")),(0,i.kt)("p",null,"This is used to connect to the first server and initiate the ReplSet with an command",(0,i.kt)("br",null),"\nAlso enables ",(0,i.kt)("inlineCode",{parentName:"p"},"auth")),(0,i.kt)("h3",{id:"_initserver"},"_initServer"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _initServer(instanceOpts: MongoMemoryInstanceProp): MongoMemoryServer")),(0,i.kt)("p",null,"Creates an new ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-memory-server"},(0,i.kt)("inlineCode",{parentName:"a"},"instance"))," for the ReplSet"),(0,i.kt)("h3",{id:"_waitforprimary"},"_waitForPrimary"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected async _waitForPrimary(timeout: number = 1000 * 30, where?: string): Promise")),(0,i.kt)("p",null,"Wait until the ReplSet has elected an Primary, the ",(0,i.kt)("inlineCode",{parentName:"p"},"where")," string will be added to the error if the timeout is reached"),(0,i.kt)("h2",{id:"values"},"Values"),(0,i.kt)("h3",{id:"servers"},"servers"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"servers: MongoMemoryServer[]")),(0,i.kt)("p",null,"Stores all the servers of this ReplSet"),(0,i.kt)("h3",{id:"instanceopts"},"instanceOpts"),(0,i.kt)("p",null,"Typings:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"get instanceOpts(): MongoMemoryInstancePropBase[]")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"set instanceOpts(val: MongoMemoryInstancePropBase[])"))),(0,i.kt)("p",null,"Getter & Setter for ",(0,i.kt)("a",{parentName:"p",href:"#_instanceopts"},(0,i.kt)("inlineCode",{parentName:"a"},"_instanceOpts"))),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Throw an Error if ",(0,i.kt)("inlineCode",{parentName:"p"},"state")," is not ",(0,i.kt)("inlineCode",{parentName:"p"},"stopped"))),(0,i.kt)("h3",{id:"_instanceopts"},"_instanceOpts"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _instanceOpts!: MongoMemoryInstancePropBase[]")),(0,i.kt)("p",null,"Stores Options used for an instance"),(0,i.kt)("h3",{id:"binaryopts"},"binaryOpts"),(0,i.kt)("p",null,"Typings:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"get binaryOpts(): MongoBinaryOpts")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"set binaryOpts(val: MongoBinaryOpts)"))),(0,i.kt)("p",null,"Getter & Setter for ",(0,i.kt)("a",{parentName:"p",href:"#_binaryopts"},(0,i.kt)("inlineCode",{parentName:"a"},"_binaryOpts"))),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Throw an Error if ",(0,i.kt)("inlineCode",{parentName:"p"},"state")," is not ",(0,i.kt)("inlineCode",{parentName:"p"},"stopped"))),(0,i.kt)("h3",{id:"_binaryopts"},"_binaryOpts"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _binaryOpts!: MongoBinaryOpts")),(0,i.kt)("p",null,"Stores the options used for the binary"),(0,i.kt)("h3",{id:"replsetopts"},"replSetOpts"),(0,i.kt)("p",null,"Typings:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"get replSetOpts(): ReplSetOpts")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"set replSetOpts(val: ReplSetOpts)"))),(0,i.kt)("p",null,"Getter & Setter for ",(0,i.kt)("a",{parentName:"p",href:"#_replsetopts"},(0,i.kt)("inlineCode",{parentName:"a"},"_replSetOpts"))),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Throw an Error if ",(0,i.kt)("inlineCode",{parentName:"p"},"state")," is not ",(0,i.kt)("inlineCode",{parentName:"p"},"stopped"))),(0,i.kt)("h3",{id:"_replsetopts"},"_replSetOpts"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _replSetOpts!: Required")),(0,i.kt)("p",null,"Stores the options used for the ReplSet Initiation, uses ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/interfaces/replset-opts"},(0,i.kt)("inlineCode",{parentName:"a"},"ReplSetOpts")),"."),(0,i.kt)("h3",{id:"_keyfiletmp"},"_keyfiletmp"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _keyfiletmp?: string")),(0,i.kt)("p",null,"Stores the path of the created temporary directory for the keyfile location"),(0,i.kt)("h3",{id:"state"},"state"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"get state(): MongoMemoryReplSetStates")),(0,i.kt)("p",null,"Getter for ",(0,i.kt)("a",{parentName:"p",href:"#_state"},(0,i.kt)("inlineCode",{parentName:"a"},"_state"))),(0,i.kt)("admonition",{type:"caution"},(0,i.kt)("p",{parentName:"admonition"},"Will Throw an Error if ",(0,i.kt)("inlineCode",{parentName:"p"},"state")," is not ",(0,i.kt)("inlineCode",{parentName:"p"},"stopped"))),(0,i.kt)("h3",{id:"_state"},"_state"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _state: MongoMemoryReplSetStates")),(0,i.kt)("p",null,"Stores the current State, uses ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/enums/mongo-memory-replset-states"},(0,i.kt)("inlineCode",{parentName:"a"},"MongoMemoryReplSetStates")," enum"),"."),(0,i.kt)("h3",{id:"_rancreateauth"},"_ranCreateAuth"),(0,i.kt)("span",{class:"badge badge--warning"},"Internal"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"protected _ranCreateAuth: boolean")),(0,i.kt)("p",null,"Stores if the auth creation has already ran"))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/e3728ee4.2bd6596e.js b/versions/beta/assets/js/e3728ee4.2bd6596e.js new file mode 100644 index 000000000..de6a75959 --- /dev/null +++ b/versions/beta/assets/js/e3728ee4.2bd6596e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[5060],{3905:function(e,t,n){n.d(t,{Zo:function(){return l},kt:function(){return f}});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p=o.createContext({}),c=function(e){var t=o.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},l=function(e){var t=c(e.components);return o.createElement(p.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,p=e.parentName,l=a(e,["components","mdxType","originalType","parentName"]),m=c(n),d=r,f=m["".concat(p,".").concat(d)]||m[d]||u[d]||i;return n?o.createElement(f,s(s({ref:t},l),{},{components:n})):o.createElement(f,s({ref:t},l))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,s=new Array(i);s[0]=d;var a={};for(var p in t)hasOwnProperty.call(t,p)&&(a[p]=t[p]);a.originalType=e,a[m]="string"==typeof e?e:r,s[1]=a;for(var c=2;cDisposeOptions",id:"values-for-disposeoptions",level:2},{value:"enabled",id:"enabled",level:3},{value:"cleanup",id:"cleanup",level:3}],u={toc:m},d="wrapper";function f(e){var t=e.components,n=(0,r.Z)(e,s);return(0,i.kt)(d,(0,o.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"API Documentation of ",(0,i.kt)("inlineCode",{parentName:"p"},"DisposeOptions"),"-Interface"),(0,i.kt)("h2",{id:"values-for-disposeoptions"},"Values for ",(0,i.kt)("inlineCode",{parentName:"h2"},"DisposeOptions")),(0,i.kt)("h3",{id:"enabled"},"enabled"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"enabled?: boolean")),(0,i.kt)("p",null,"Set whether to stop the manager on ",(0,i.kt)("inlineCode",{parentName:"p"},"[Symbol.asyncDispose]")," calls."),(0,i.kt)("h3",{id:"cleanup"},"cleanup"),(0,i.kt)("p",null,"Typings: ",(0,i.kt)("inlineCode",{parentName:"p"},"cleanup?: Cleanup")),(0,i.kt)("p",null,"Set custom cleanup options to be used for disposal, see ",(0,i.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/classes/mongo-memory-server#cleanup"},(0,i.kt)("inlineCode",{parentName:"a"},"cleanup")," function")," (the same options apply for the replset)."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/e9ab2b32.71569523.js b/versions/beta/assets/js/e9ab2b32.71569523.js new file mode 100644 index 000000000..5bbb65904 --- /dev/null +++ b/versions/beta/assets/js/e9ab2b32.71569523.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[4840],{1151:function(e,r,t){t.r(r);var s=t(7294),u=t(6550),n=t(4996);r.default=function(){return s.createElement(u.l_,{to:(0,n.Z)("docs/guides/quick-start-guide")})}}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/e9ab2b32.9d5cf28d.js b/versions/beta/assets/js/e9ab2b32.9d5cf28d.js deleted file mode 100644 index 34746d9c8..000000000 --- a/versions/beta/assets/js/e9ab2b32.9d5cf28d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[840],{1151:function(e,r,t){t.r(r);var s=t(7294),u=t(6550),n=t(4996);r.default=function(){return s.createElement(u.l_,{to:(0,n.Z)("docs/guides/quick-start-guide")})}}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/ea46b895.1030d0b7.js b/versions/beta/assets/js/ea46b895.1030d0b7.js new file mode 100644 index 000000000..f35613c1c --- /dev/null +++ b/versions/beta/assets/js/ea46b895.1030d0b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[5248],{3905:function(e,n,t){t.d(n,{Zo:function(){return p},kt:function(){return y}});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c=r.createContext({}),l=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=l(e.components);return r.createElement(c.Provider,{value:n},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(t),d=o,y=u["".concat(c,".").concat(d)]||u[d]||m[d]||a;return t?r.createElement(y,i(i({ref:n},p),{},{components:t})):r.createElement(y,i({ref:n},p))}));function y(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=d;var s={};for(var c in n)hasOwnProperty.call(n,c)&&(s[c]=n[c]);s.originalType=e,s[u]="string"==typeof e?e:o,i[1]=s;for(var l=2;l): Promise")),(0,a.kt)("p",null,"Try to find the binary and if not found download the binary."),(0,a.kt)("h3",{id:"getpath"},"getPath"),(0,a.kt)("p",null,"Typings: ",(0,a.kt)("inlineCode",{parentName:"p"},"static async getPath(opts: MongoBinaryOpts = {}): Promise")),(0,a.kt)("p",null,"Get a working binary and returns the path to it.",(0,a.kt)("br",{parentName:"p"}),"\n","(Calls ",(0,a.kt)("a",{parentName:"p",href:"#download"},(0,a.kt)("inlineCode",{parentName:"a"},"download"))," if ",(0,a.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#runtime_download"},(0,a.kt)("inlineCode",{parentName:"a"},"RUNTIME_DOWNLOAD"))," is ",(0,a.kt)("inlineCode",{parentName:"p"},"true"),")"))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/ea46b895.af358fb5.js b/versions/beta/assets/js/ea46b895.af358fb5.js deleted file mode 100644 index e2c40ad20..000000000 --- a/versions/beta/assets/js/ea46b895.af358fb5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[248],{3905:function(e,n,t){t.d(n,{Zo:function(){return p},kt:function(){return y}});var r=t(7294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var c=r.createContext({}),l=function(e){var n=r.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},p=function(e){var n=l(e.components);return r.createElement(c.Provider,{value:n},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=l(t),d=o,y=u["".concat(c,".").concat(d)]||u[d]||m[d]||a;return t?r.createElement(y,i(i({ref:n},p),{},{components:t})):r.createElement(y,i({ref:n},p))}));function y(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var a=t.length,i=new Array(a);i[0]=d;var s={};for(var c in n)hasOwnProperty.call(n,c)&&(s[c]=n[c]);s.originalType=e,s[u]="string"==typeof e?e:o,i[1]=s;for(var l=2;l): Promise")),(0,a.kt)("p",null,"Try to find the binary and if not found download the binary."),(0,a.kt)("h3",{id:"getpath"},"getPath"),(0,a.kt)("p",null,"Typings: ",(0,a.kt)("inlineCode",{parentName:"p"},"static async getPath(opts: MongoBinaryOpts = {}): Promise")),(0,a.kt)("p",null,"Get a working binary and returns the path to it.",(0,a.kt)("br",{parentName:"p"}),"\n","(Calls ",(0,a.kt)("a",{parentName:"p",href:"#download"},(0,a.kt)("inlineCode",{parentName:"a"},"download"))," if ",(0,a.kt)("a",{parentName:"p",href:"/mongodb-memory-server/versions/beta/docs/api/config-options#runtime_download"},(0,a.kt)("inlineCode",{parentName:"a"},"RUNTIME_DOWNLOAD"))," is ",(0,a.kt)("inlineCode",{parentName:"p"},"true"),")"))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/versions/beta/assets/js/f9ecf5d9.15428d2e.js b/versions/beta/assets/js/f9ecf5d9.15428d2e.js deleted file mode 100644 index ee69ce701..000000000 --- a/versions/beta/assets/js/f9ecf5d9.15428d2e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmongodb_memory_server_website=self.webpackChunkmongodb_memory_server_website||[]).push([[475],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return d}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(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 i(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 p=r.createContext({}),m=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=m(e.components);return r.createElement(p.Provider,{value:t},e.children)},u="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=m(n),f=o,d=u["".concat(p,".").concat(f)]||u[f]||l[f]||a;return n?r.createElement(d,i(i({ref:t},c),{},{components:n})):r.createElement(d,i({ref:t},c))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=f;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[u]="string"==typeof e?e:o,i[1]=s;for(var m=2;m=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 p=r.createContext({}),m=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=m(e.components);return r.createElement(p.Provider,{value:t},e.children)},l="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),l=m(n),d=o,y=l["".concat(p,".").concat(d)]||l[d]||u[d]||a;return n?r.createElement(y,i(i({ref:t},c),{},{components:n})):r.createElement(y,i({ref:t},c))}));function y(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s[l]="string"==typeof e?e:o,i[1]=s;for(var m=2;m=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var l=a.createContext({}),p=function(e){var n=a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},d=function(e){var n=p(e.components);return a.createElement(l.Provider,{value:n},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},b=a.forwardRef((function(e,n){var t=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=p(t),b=i,k=u["".concat(l,".").concat(b)]||u[b]||m[b]||r;return t?a.createElement(k,o(o({ref:n},d),{},{components:t})):a.createElement(k,o({ref:n},d))}));function k(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var r=t.length,o=new Array(r);o[0]=b;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[u]="string"==typeof e?e:i,o[1]=s;for(var p=2;p=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var l=a.createContext({}),p=function(e){var n=a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},d=function(e){var n=p(e.components);return a.createElement(l.Provider,{value:n},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},b=a.forwardRef((function(e,n){var t=e.components,i=e.mdxType,r=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=p(t),b=i,k=u["".concat(l,".").concat(b)]||u[b]||m[b]||r;return t?a.createElement(k,o(o({ref:n},d),{},{components:t})):a.createElement(k,o({ref:n},d))}));function k(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var r=t.length,o=new Array(r);o[0]=b;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s[u]="string"==typeof e?e:i,o[1]=s;for(var p=2;p1?t-1:0),r=1;r\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(/0)&&(F.current.unobserve(e),F.current.disconnect(),null!=I&&window.docusaurus.prefetch(I))}))})),F.current.observe(e))},to:I},g&&{isActive:y,activeClassName:b}))}var g=a.forwardRef(m)},5999:function(e,t,n){"use strict";n.d(t,{Z:function(){return s},I:function(){return l}});var r=n(7294);function o(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var a=n(7529);function i(e){var t,n,r=e.id,o=e.message;if(void 0===r&&void 0===o)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=a[null!=r?r:o])?n:o)?t:r}function l(e,t){return o(i({message:e.message,id:e.id}),t)}function s(e){var t=e.children,n=e.id,a=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var l=i({message:t,id:n});return r.createElement(r.Fragment,null,o(l,a))}},9935:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r="default"},3919:function(e,t,n){"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{Z:function(){return o},b:function(){return r}})},4996:function(e,t,n){"use strict";n.d(t,{C:function(){return i},Z:function(){return l}});var r=n(7294),o=n(2263),a=n(3919);function i(){var e=(0,o.Z)().siteConfig,t=e.baseUrl,n=e.url,i=(0,r.useCallback)((function(e,r){return function(e,t,n,r){var o=void 0===r?{}:r,i=o.forcePrependBaseUrl,l=void 0!==i&&i,s=o.absolute,u=void 0!==s&&s;if(!n||n.startsWith("#")||(0,a.b)(n))return n;if(l)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;var c=n.startsWith(t)?n:t+n.replace(/^\//,"");return u?e+c:c}(n,t,e,r)}),[n,t]);return{withBaseUrl:i}}function l(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},2263:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),o=n(8940);function a(){return(0,r.useContext)(o._)}},2389:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),o=n(8934);function a(){return(0,r.useContext)(o._)}},9670:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=function(e){return"object"==typeof e&&!!e&&Object.keys(e).length>0};function o(e){var t={};return function e(n,o){Object.entries(n).forEach((function(n){var a=n[0],i=n[1],l=o?o+"."+a:a;r(i)?e(i,l):t[l]=i}))}(e),t}},226:function(e,t,n){"use strict";n.d(t,{_:function(){return o},z:function(){return a}});var r=n(7294),o=r.createContext(null);function a(e){var t=e.children,n=e.value,a=r.useContext(o),i=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;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}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:a,value:n})}),[a,n]);return r.createElement(o.Provider,{value:i},t)}},143:function(e,t,n){"use strict";n.d(t,{Iw:function(){return v},gA:function(){return p},WS:function(){return m},_r:function(){return d},Jo:function(){return b},zh:function(){return f},yW:function(){return h},gB:function(){return g}});var r=n(6550),o=n(2263),a=n(9935);function i(e,t){void 0===t&&(t={});var n=(0,o.Z)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var l=function(e){return e.versions.find((function(e){return e.isLast}))};function s(e,t){var n=l(e);return[].concat(e.versions.filter((function(e){return e!==n})),[n]).find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})}))}function u(e,t){var n,o,a=s(e,t),i=null==a?void 0:a.docs.find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:a,activeDoc:i,alternateDocVersions:i?(n=i.id,o={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(o[e.name]=t)}))})),o):{}}}var c={},d=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:c},f=function(e){return function(e,t,n){void 0===t&&(t=a.m),void 0===n&&(n={});var r=i(e),o=null==r?void 0:r[t];if(!o&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return o}("docusaurus-plugin-content-docs",e,{failfast:!0})};function p(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var o=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.LX)(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((function(e){return e.path})).join(", "));return a}(d(),(0,r.TH)().pathname,e)}function m(e){void 0===e&&(e={});var t=p(e),n=(0,r.TH)().pathname;if(t)return{activePlugin:t,activeVersion:s(t.pluginData,n)}}function g(e){return f(e).versions}function h(e){var t=f(e);return l(t)}function v(e){return u(f(e),(0,r.TH)().pathname)}function b(e){return function(e,t){var n=l(e);return{latestDocSuggestion:u(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(f(e),(0,r.TH)().pathname)}},8320:function(e,t,n){"use strict";n.r(t);var r=n(4865),o=n.n(r);o().configure({showSpinner:!1});var a={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){o().start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){o().done()}};t.default=a},3310:function(e,t,n){"use strict";n.r(t);var r,o,a=n(7410),i=n(6809);r=a.Z,o=i.default.themeConfig.prism.additionalLanguages,globalThis.Prism=r,o.forEach((function(e){n(6726)("./prism-"+e)})),delete globalThis.Prism},9471:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(7294),o={iconExternalLink:"iconExternalLink_nPIU"};function a(e){var t=e.width,n=void 0===t?13.5:t,a=e.height,i=void 0===a?13.5:a;return r.createElement("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:o.iconExternalLink},r.createElement("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"}))}},9439:function(e,t,n){"use strict";n.d(t,{Z:function(){return hn}});var r=n(7294),o=n(6010),a=n(4763),i=n(833),l=n(7462),s=n(6550),u=n(5999),c=n(5936),d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){var e=(0,r.useRef)(null),t=(0,s.k6)().action,n=(0,r.useCallback)((function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&f(n)}),[]);return(0,c.S)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}var m=(0,u.I)({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 g(e){var t,n=null!=(t=e.children)?t:m,o=p(),a=o.containerRef,i=o.onClick;return r.createElement("div",{ref:a,role:"region","aria-label":m},r.createElement("a",(0,l.Z)({},e,{href:"#"+d,onClick:i}),n))}var h=n(5281),v=n(9727),b={skipToContent:"skipToContent_fXgn"};function y(){return r.createElement(g,{className:b.skipToContent})}var w=n(6668),k=n(9689),E=n(3366),S=["width","height","color","strokeWidth","className"];function x(e){var t=e.width,n=void 0===t?21:t,o=e.height,a=void 0===o?21:o,i=e.color,s=void 0===i?"currentColor":i,u=e.strokeWidth,c=void 0===u?1.2:u,d=(e.className,(0,E.Z)(e,S));return r.createElement("svg",(0,l.Z)({viewBox:"0 0 15 15",width:n,height:a},d),r.createElement("g",{stroke:s,strokeWidth:c},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}var _={closeButton:"closeButton_CVFx"};function C(e){return r.createElement("button",(0,l.Z)({type:"button","aria-label":(0,u.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,o.Z)("clean-btn close",_.closeButton,e.className)}),r.createElement(x,{width:14,height:14,strokeWidth:3.1}))}var T={content:"content_knG7"};function A(e){var t=(0,w.L)().announcementBar.content;return r.createElement("div",(0,l.Z)({},e,{className:(0,o.Z)(T.content,e.className),dangerouslySetInnerHTML:{__html:t}}))}var L={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function R(){var e=(0,w.L)().announcementBar,t=(0,k.nT)(),n=t.isActive,o=t.close;if(!n)return null;var a=e.backgroundColor,i=e.textColor,l=e.isCloseable;return r.createElement("div",{className:L.announcementBar,style:{backgroundColor:a,color:i},role:"banner"},l&&r.createElement("div",{className:L.announcementBarPlaceholder}),r.createElement(A,{className:L.announcementBarContent}),l&&r.createElement(C,{onClick:o,className:L.announcementBarClose}))}var N=n(3163),O=n(2466);var P=n(9688),I=n(3102),D=r.createContext(null);function M(e){var t,n,o,a,i,l,s,u=e.children,c=(t=(0,N.e)(),n=(0,I.HY)(),o=(0,r.useState)(!1),a=o[0],i=o[1],l=null!==n.component,s=(0,P.D9)(l),(0,r.useEffect)((function(){l&&!s&&i(!0)}),[l,s]),(0,r.useEffect)((function(){l?t.shown||i(!0):i(!1)}),[t.shown,l]),(0,r.useMemo)((function(){return[a,i]}),[a]));return r.createElement(D.Provider,{value:c},u)}function B(e){if(e.component){var t=e.component;return r.createElement(t,e.props)}}function F(){var e=(0,r.useContext)(D);if(!e)throw new P.i6("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],o=(0,r.useCallback)((function(){return n(!1)}),[n]),a=(0,I.HY)();return(0,r.useMemo)((function(){return{shown:t,hide:o,content:B(a)}}),[o,a,t])}function j(e){var t=e.header,n=e.primaryMenu,a=e.secondaryMenu,i=F().shown;return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,o.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},a)))}var z=n(2949),U=n(2389);function Z(e){return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("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 q(e){return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("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"}))}var $={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function H(e){var t=e.className,n=e.buttonClassName,a=e.value,i=e.onChange,l=(0,U.Z)(),s=(0,u.I)({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"===a?(0,u.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,u.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,o.Z)($.toggle,t)},r.createElement("button",{className:(0,o.Z)("clean-btn",$.toggleButton,!l&&$.toggleButtonDisabled,n),type:"button",onClick:function(){return i("dark"===a?"light":"dark")},disabled:!l,title:s,"aria-label":s,"aria-live":"polite"},r.createElement(Z,{className:(0,o.Z)($.toggleIcon,$.lightToggleIcon)}),r.createElement(q,{className:(0,o.Z)($.toggleIcon,$.darkToggleIcon)})))}var G=r.memo(H),V={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function W(e){var t=e.className,n=(0,w.L)().navbar.style,o=(0,w.L)().colorMode.disableSwitch,a=(0,z.I)(),i=a.colorMode,l=a.setColorMode;return o?null:r.createElement(G,{className:t,buttonClassName:"dark"===n?V.darkNavbarColorModeToggle:void 0,value:i,onChange:l})}var K=n(1327);function Y(){return r.createElement(K.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Q(){var e=(0,N.e)();return r.createElement("button",{type:"button","aria-label":(0,u.I)({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:function(){return e.toggle()}},r.createElement(x,{color:"var(--ifm-color-emphasis-600)"}))}function X(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(Y,null),r.createElement(W,{className:"margin-right--md"}),r.createElement(Q,null))}var J=n(9960),ee=n(4996),te=n(3919),ne=n(8022),re=n(9471),oe=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function ae(e){var t=e.activeBasePath,n=e.activeBaseRegex,o=e.to,a=e.href,i=e.label,s=e.html,u=e.isDropdownLink,c=e.prependBaseUrlToHref,d=(0,E.Z)(e,oe),f=(0,ee.Z)(o),p=(0,ee.Z)(t),m=(0,ee.Z)(a,{forcePrependBaseUrl:!0}),g=i&&a&&!(0,te.Z)(a),h=s?{dangerouslySetInnerHTML:{__html:s}}:{children:r.createElement(r.Fragment,null,i,g&&r.createElement(re.Z,u&&{width:12,height:12}))};return a?r.createElement(J.Z,(0,l.Z)({href:c?m:a},d,h)):r.createElement(J.Z,(0,l.Z)({to:f,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?(0,ne.F)(n,t.pathname):t.pathname.startsWith(p)}},d,h))}var ie=["className","isDropdownItem"],le=["className","isDropdownItem"],se=["mobile","position"];function ue(e){var t=e.className,n=e.isDropdownItem,a=void 0!==n&&n,i=(0,E.Z)(e,ie),s=r.createElement(ae,(0,l.Z)({className:(0,o.Z)(a?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:a},i));return a?r.createElement("li",null,s):s}function ce(e){var t=e.className,n=(e.isDropdownItem,(0,E.Z)(e,le));return r.createElement("li",{className:"menu__list-item"},r.createElement(ae,(0,l.Z)({className:(0,o.Z)("menu__link",t)},n)))}function de(e){var t,n=e.mobile,o=void 0!==n&&n,a=(e.position,(0,E.Z)(e,se)),i=o?ce:ue;return r.createElement(i,(0,l.Z)({},a,{activeClassName:null!=(t=a.activeClassName)?t:o?"menu__link--active":"navbar__link--active"}))}var fe=n(6043),pe=n(8596),me=n(2263);var ge=["items","position","className","onClick"],he=["items","className","position","onClick"],ve=["mobile"];function be(e,t){return e.some((function(e){return function(e,t){return!!(0,pe.Mg)(e.to,t)||!!(0,ne.F)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function ye(e){var t,n=e.items,a=e.position,i=e.className,s=(e.onClick,(0,E.Z)(e,ge)),u=(0,r.useRef)(null),c=(0,r.useState)(!1),d=c[0],f=c[1];return(0,r.useEffect)((function(){var e=function(e){u.current&&!u.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[u]),r.createElement("div",{ref:u,className:(0,o.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===a,"dropdown--show":d})},r.createElement(ae,(0,l.Z)({"aria-haspopup":"true","aria-expanded":d,role:"button",href:s.to?void 0:"#",className:(0,o.Z)("navbar__link",i)},s,{onClick:s.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),f(!d))}}),null!=(t=s.children)?t:s.label),r.createElement("ul",{className:"dropdown__menu"},n.map((function(e,t){return r.createElement(_t,(0,l.Z)({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))}))))}function we(e){var t,n,a=e.items,i=e.className,u=(e.position,e.onClick),c=(0,E.Z)(e,he),d=(n=(0,me.Z)().siteConfig.baseUrl,(0,s.TH)().pathname.replace(n,"/")),f=be(a,d),p=(0,fe.u)({initialState:function(){return!f}}),m=p.collapsed,g=p.toggleCollapsed,h=p.setCollapsed;return(0,r.useEffect)((function(){f&&h(!f)}),[d,f,h]),r.createElement("li",{className:(0,o.Z)("menu__list-item",{"menu__list-item--collapsed":m})},r.createElement(ae,(0,l.Z)({role:"button",className:(0,o.Z)("menu__link menu__link--sublist menu__link--sublist-caret",i)},c,{onClick:function(e){e.preventDefault(),g()}}),null!=(t=c.children)?t:c.label),r.createElement(fe.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:m},a.map((function(e,t){return r.createElement(_t,(0,l.Z)({mobile:!0,isDropdownItem:!0,onClick:u,activeClassName:"menu__link--active"},e,{key:t}))}))))}function ke(e){var t=e.mobile,n=void 0!==t&&t,o=(0,E.Z)(e,ve),a=n?we:ye;return r.createElement(a,o)}var Ee=n(4711),Se=["width","height"];function xe(e){var t=e.width,n=void 0===t?20:t,o=e.height,a=void 0===o?20:o,i=(0,E.Z)(e,Se);return r.createElement("svg",(0,l.Z)({viewBox:"0 0 24 24",width:n,height:a,"aria-hidden":!0},i),r.createElement("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"}))}var _e="iconLanguage_nlXk",Ce=["mobile","dropdownItemsBefore","dropdownItemsAfter"];function Te(){return r.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},r.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}var Ae=n(830),Le=["translations"];function Re(){return Re=Object.assign||function(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 Ie="Ctrl";var De=r.forwardRef((function(e,t){var n=e.translations,o=void 0===n?{}:n,a=Pe(e,Le),i=o.buttonText,l=void 0===i?"Search":i,s=o.buttonAriaLabel,u=void 0===s?"Search":s,c=Ne((0,r.useState)(null),2),d=c[0],f=c[1];return(0,r.useEffect)((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?f("\u2318"):f(Ie))}),[]),r.createElement("button",Re({type:"button",className:"DocSearch DocSearch-Button","aria-label":u},a,{ref:t}),r.createElement("span",{className:"DocSearch-Button-Container"},r.createElement(Ae.W,null),r.createElement("span",{className:"DocSearch-Button-Placeholder"},l)),r.createElement("span",{className:"DocSearch-Button-Keys"},null!==d&&r.createElement(r.Fragment,null,r.createElement("kbd",{className:"DocSearch-Button-Key"},d===Ie?r.createElement(Te,null):d),r.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))})),Me=n(5742),Be=n(6177),Fe=n(239),je=n(3320);var ze=n(3935),Ue={button:{buttonText:(0,u.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,u.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,u.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,u.I)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,u.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,u.I)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,u.I)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,u.I)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,u.I)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,u.I)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,u.I)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,u.I)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,u.I)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,u.I)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,u.I)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,u.I)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,u.I)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,u.I)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,u.I)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,u.I)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,u.I)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})},Ze=["contextualSearch","externalUrlRegex"],qe=null;function $e(e){var t=e.hit,n=e.children;return r.createElement(J.Z,{to:t.url},n)}function He(e){var t=e.state,n=e.onClose,o=(0,Be.M)();return r.createElement(J.Z,{to:o(t.query),onClick:n},r.createElement(u.Z,{id:"theme.SearchBar.seeAll",values:{count:t.context.nbHits}},"See all {count} results"))}function Ge(e){var t,o,a,i,u,c=e.contextualSearch,d=e.externalUrlRegex,f=(0,E.Z)(e,Ze),p=(0,me.Z)().siteMetadata,m=(0,Fe.l)(),g=["language:"+(a=(0,je._q)()).locale,a.tags.map((function(e){return"docusaurus_tag:"+e}))],h=null!=(t=null==(o=f.searchParameters)?void 0:o.facetFilters)?t:[],v=c?(i=h,[].concat((u=function(e){return"string"==typeof e?[e]:e})(g),u(i))):h,b=Object.assign({},f.searchParameters,{facetFilters:v}),y=(0,s.k6)(),w=(0,r.useRef)(null),k=(0,r.useRef)(null),S=(0,r.useState)(!1),x=S[0],_=S[1],C=(0,r.useState)(void 0),T=C[0],A=C[1],L=(0,r.useCallback)((function(){return qe?Promise.resolve():Promise.all([n.e(426).then(n.bind(n,1426)),Promise.all([n.e(532),n.e(945)]).then(n.bind(n,6945)),Promise.all([n.e(532),n.e(894)]).then(n.bind(n,8894))]).then((function(e){var t=e[0].DocSearchModal;qe=t}))}),[]),R=(0,r.useCallback)((function(){L().then((function(){w.current=document.createElement("div"),document.body.insertBefore(w.current,document.body.firstChild),_(!0)}))}),[L,_]),N=(0,r.useCallback)((function(){var e;_(!1),null==(e=w.current)||e.remove()}),[_]),O=(0,r.useCallback)((function(e){L().then((function(){_(!0),A(e.key)}))}),[L,_,A]),P=(0,r.useRef)({navigate:function(e){var t=e.itemUrl;(0,ne.F)(d,t)?window.location.href=t:y.push(t)}}).current,I=(0,r.useRef)((function(e){return f.transformItems?f.transformItems(e):e.map((function(e){return Object.assign({},e,{url:m(e.url)})}))})).current,D=(0,r.useMemo)((function(){return function(e){return r.createElement(He,(0,l.Z)({},e,{onClose:N}))}}),[N]),M=(0,r.useCallback)((function(e){return e.addAlgoliaAgent("docusaurus",p.docusaurusVersion),e}),[p.docusaurusVersion]);return function(e){var t=e.isOpen,n=e.onOpen,o=e.onClose,a=e.onInput,i=e.searchButtonRef;r.useEffect((function(){function e(e){var r;(27===e.keyCode&&t||"k"===(null===(r=e.key)||void 0===r?void 0:r.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)&&(e.preventDefault(),t?o():document.body.classList.contains("DocSearch--active")||document.body.classList.contains("DocSearch--active")||n()),i&&i.current===document.activeElement&&a&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&a(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,o,a,i])}({isOpen:x,onOpen:R,onClose:N,onInput:O,searchButtonRef:k}),r.createElement(r.Fragment,null,r.createElement(Me.Z,null,r.createElement("link",{rel:"preconnect",href:"https://"+f.appId+"-dsn.algolia.net",crossOrigin:"anonymous"})),r.createElement(De,{onTouchStart:L,onFocus:L,onMouseOver:L,onClick:R,ref:k,translations:Ue.button}),x&&qe&&w.current&&(0,ze.createPortal)(r.createElement(qe,(0,l.Z)({onClose:N,initialScrollY:window.scrollY,initialQuery:T,navigator:P,transformItems:I,hitComponent:$e,transformSearchClient:M},f.searchPagePath&&{resultsFooterComponent:D},f,{searchParameters:b,placeholder:Ue.placeholder,translations:Ue.modal})),w.current))}function Ve(){var e=(0,me.Z)().siteConfig;return r.createElement(Ge,e.themeConfig.algolia)}var We={searchBox:"searchBox_ZlJk"};function Ke(e){var t=e.children,n=e.className;return r.createElement("div",{className:(0,o.Z)(n,We.searchBox)},t)}var Ye=n(143),Qe=n(3791),Xe=["docId","label","docsPluginId"];var Je=["sidebarId","label","docsPluginId"];var et=["label","to","docsPluginId"];var tt=n(373),nt=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"],rt=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};var ot={default:de,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,o=e.dropdownItemsAfter,a=(0,E.Z)(e,Ce),i=(0,me.Z)().i18n,c=i.currentLocale,d=i.locales,f=i.localeConfigs,p=(0,Ee.l)(),m=(0,s.TH)(),g=m.search,h=m.hash,v=d.map((function(e){var n=""+("pathname://"+p.createUrl({locale:e,fullyQualified:!1}))+g+h;return{label:f[e].label,lang:f[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===c?t?"menu__link--active":"dropdown__link--active":""}})),b=[].concat(n,v,o),y=t?(0,u.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):f[c].label;return r.createElement(ke,(0,l.Z)({},a,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(xe,{className:_e}),y),items:b}))},search:function(e){var t=e.mobile,n=e.className;return t?null:r.createElement(Ke,{className:n},r.createElement(Ve,null))},dropdown:ke,html:function(e){var t=e.value,n=e.className,a=e.mobile,i=void 0!==a&&a,l=e.isDropdownItem,s=void 0!==l&&l,u=s?"li":"div";return r.createElement(u,{className:(0,o.Z)({navbar__item:!i&&!s,"menu__list-item":i},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,o=e.docsPluginId,a=(0,E.Z)(e,Xe),i=(0,Ye.Iw)(o).activeDoc,s=(0,Qe.vY)(t,o);return null===s?null:r.createElement(de,(0,l.Z)({exact:!0},a,{isActive:function(){return(null==i?void 0:i.path)===s.path||!(null==i||!i.sidebar)&&i.sidebar===s.sidebar},label:null!=n?n:s.id,to:s.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,o=e.docsPluginId,a=(0,E.Z)(e,Je),i=(0,Ye.Iw)(o).activeDoc,s=(0,Qe.oz)(t,o).link;if(!s)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return r.createElement(de,(0,l.Z)({exact:!0},a,{isActive:function(){return(null==i?void 0:i.sidebar)===t},label:null!=n?n:s.label,to:s.path}))},docsVersion:function(e){var t=e.label,n=e.to,o=e.docsPluginId,a=(0,E.Z)(e,et),i=(0,Qe.lO)(o)[0],s=null!=t?t:i.label,u=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(i).path;return r.createElement(de,(0,l.Z)({},a,{label:s,to:u}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,o=e.dropdownActiveClassDisabled,a=e.dropdownItemsBefore,i=e.dropdownItemsAfter,c=(0,E.Z)(e,nt),d=(0,s.TH)(),f=d.search,p=d.hash,m=(0,Ye.Iw)(n),g=(0,Ye.gB)(n),h=(0,tt.J)(n).savePreferredVersionName,v=g.map((function(e){var t,n=null!=(t=m.alternateDocVersions[e.name])?t:rt(e);return{label:e.label,to:""+n.path+f+p,isActive:function(){return e===m.activeVersion},onClick:function(){return h(e.name)}}})),b=[].concat(a,v,i),y=(0,Qe.lO)(n)[0],w=t&&b.length>1?(0,u.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):y.label,k=t&&b.length>1?void 0:rt(y).path;return b.length<=1?r.createElement(de,(0,l.Z)({},c,{mobile:t,label:w,to:k,isActive:o?function(){return!1}:void 0})):r.createElement(ke,(0,l.Z)({},c,{mobile:t,label:w,to:k,items:b,isActive:o?function(){return!1}:void 0}))}},at=n(1002);function it(){it=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof v?t:v,i=Object.create(a.prototype),l=new R(r||[]);return o(i,"_invoke",{value:C(e,n,l)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var f="suspendedStart",p="suspendedYield",m="executing",g="completed",h={};function v(){}function b(){}function y(){}var w={};u(w,i,(function(){return this}));var k=Object.getPrototypeOf,E=k&&k(k(N([])));E&&E!==n&&r.call(E,i)&&(w=E);var S=y.prototype=v.prototype=Object.create(w);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,a,i,l){var s=d(e[o],e,a);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==(0,at.Z)(c)&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,i,l)}),(function(e){n("throw",e,i,l)})):t.resolve(c).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,l)}))}l(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function C(t,n,r){var o=f;return function(a,i){if(o===m)throw new Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var l=r.delegate;if(l){var s=T(l,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var u=d(t,n,r);if("normal"===u.type){if(o=r.done?g:p,u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=g,r.method="throw",r.arg=u.arg)}}}function T(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var a=d(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,h;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}function lt(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function st(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){lt(a,r,o,i,l,"next",e)}function l(e){lt(a,r,o,i,l,"throw",e)}i(void 0)}))}}var ut=["position","className"],ct=["className","position"],dt=["mobile"];function ft(e,t){return"/mongodb-memory-server/"===t?t===e:e.startsWith(t)}function pt(e){var t=(0,r.useState)([]),n=t[0],o=t[1];return(0,r.useEffect)(st(it().mark((function t(){var n,r;return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.label,t.next=3,fetch("/mongodb-memory-server/versions.json").then((function(e){return e.json()})).catch((function(e){var t;console.log("json fetch errored, using default",e);var r,o,a=!!(r=/^\/mongodb-memory-server\/versions\/(\d+\.x|beta)/.exec(window.location.pathname))&&""+r[1];return a?((o={latest:""})[n]=a,o):((t={})[n]="",t)}));case 3:r=t.sent,o(Object.entries(r).map((function(e){return[e[0],"/mongodb-memory-server/"+e[1]]})));case 5:case"end":return t.stop()}}),t)}))),[]),n}function mt(e){var t=e.position,n=e.className,a=(0,E.Z)(e,ut),i=(0,r.useRef)(null),u=(0,r.useState)(!1),c=u[0],d=u[1];(0,r.useEffect)((function(){var e=function(e){i.current&&!i.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[i]);var f=pt(a),p=(0,s.TH)().pathname;return r.createElement("div",{ref:i,id:"versions_dropdown",className:(0,o.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===t,"dropdown--show":c})},r.createElement(ae,(0,l.Z)({"aria-haspopup":"true","aria-expanded":c,role:"button",href:"#",className:(0,o.Z)("navbar__link",n)},a,{onClick:a.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),d(!c))}}),a.label),r.createElement("ul",{className:"dropdown__menu"},f.map((function(e,t){var a=e[0],i=e[1];return r.createElement("li",{key:t},r.createElement("a",{href:i,className:(0,o.Z)(ft(p,i)?"dropdown__link--active":"","dropdown__link",n)},a))}))))}function gt(e){var t=e.className,n=(e.position,(0,E.Z)(e,ct)),a=pt(n),i=(0,fe.u)({initialState:!0}),u=i.collapsed,c=i.toggleCollapsed,d=(0,s.TH)().pathname;return r.createElement("li",{className:(0,o.Z)("menu__list-item",{"menu__list-item--collapsed":u})},r.createElement(ae,(0,l.Z)({role:"button",className:(0,o.Z)("menu__link menu__link--sublist menu__link--sublist-caret",t)},n,{label:"Versions",onClick:function(e){e.preventDefault(),c()}}),"Versions"),r.createElement(fe.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:u},a.map((function(e,n){var a=e[0],i=e[1];return r.createElement("li",{className:"menu__list-item",key:n},r.createElement("a",{href:i,className:(0,o.Z)(ft(d,i)?"menu__link--active":"","menu__link",t)},a))}))))}function ht(e){var t=e.children,n=e.fallback;return(0,U.Z)()?r.createElement(r.Fragment,null,null==t?void 0:t()):null!=n?n:null}var vt=["position","className"],bt=["className","position"],yt=["mobile"];function wt(){var e=function(){var e=/^\/mongodb-memory-server\/versions\/(\d+\.x|beta)/.exec(window.location.pathname);return!!e&&""+e[1]}();return!!e&&("beta"===e&&"Beta Version may not always be up-to-date")}function kt(e){e.position;var t=e.className,n=(0,E.Z)(e,vt),a=wt();return a?r.createElement("div",{id:"test",className:(0,o.Z)("navbar__item",{})},r.createElement(ae,(0,l.Z)({role:"button",className:(0,o.Z)("navbar__link",t)},n,{label:a,onClick:n.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&e.preventDefault()}}),a)):null}function Et(e){var t=e.className,n=(e.position,(0,E.Z)(e,bt)),a=wt();return a?r.createElement("li",{className:(0,o.Z)("menu__list-item",{})},r.createElement(ae,(0,l.Z)({role:"button",className:(0,o.Z)("menu__link",t)},n,{label:a,onClick:function(e){e.preventDefault()}}),a)):null}var St=Object.assign({},ot,{"custom-versions-selector":function(e){var t=e.mobile,n=void 0!==t&&t,o=(0,E.Z)(e,dt),a=n?gt:mt;return r.createElement(a,o)},"custom-beta-notice":function(e){var t=e.mobile,n=void 0!==t&&t,o=(0,E.Z)(e,yt),a=n?Et:kt;return r.createElement(ht,null,(function(){return r.createElement(a,o)}))}}),xt=["type"];function _t(e){var t=e.type,n=(0,E.Z)(e,xt),o=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=St[o];if(!a)throw new Error('No NavbarItem component found for type "'+t+'".');return r.createElement(a,n)}function Ct(){var e=(0,N.e)(),t=(0,w.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map((function(t,n){return r.createElement(_t,(0,l.Z)({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})))}function Tt(e){return r.createElement("button",(0,l.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(u.Z,{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)"},"\u2190 Back to main menu"))}function At(){var e=0===(0,w.L)().navbar.items.length,t=F();return r.createElement(r.Fragment,null,!e&&r.createElement(Tt,{onClick:function(){return t.hide()}}),t.content)}function Lt(){var e,t=(0,N.e)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?r.createElement(j,{header:r.createElement(X,null),primaryMenu:r.createElement(Ct,null),secondaryMenu:r.createElement(At,null)}):null}var Rt={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Nt(e){return r.createElement("div",(0,l.Z)({role:"presentation"},e,{className:(0,o.Z)("navbar-sidebar__backdrop",e.className)}))}function Ot(e){var t=e.children,n=(0,w.L)().navbar,a=n.hideOnScroll,i=n.style,l=(0,N.e)(),s=function(e){var t=(0,r.useState)(e),n=t[0],o=t[1],a=(0,r.useRef)(!1),i=(0,r.useRef)(0),l=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,O.RF)((function(t,n){var r=t.scrollY;if(e)if(r=l?o(!1):r+u0&&r.createElement(nn,{links:n}),logo:o&&r.createElement(ln,{logo:o}),copyright:t&&r.createElement(sn,{copyright:t})})}var dn=r.memo(cn),fn=(0,P.Qc)([z.S,k.pl,O.OC,tt.L5,i.VC,function(e){var t=e.children;return r.createElement(I.n2,null,r.createElement(N.M,null,r.createElement(M,null,t)))}]);function pn(e){var t=e.children;return r.createElement(fn,null,t)}function mn(e){var t=e.error,n=e.tryAgain;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(u.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("div",{className:"margin-vert--lg"},r.createElement(Mt,{onClick:n,className:"button button--primary shadow--lw"})),r.createElement("hr",null),r.createElement("div",{className:"margin-vert--md"},r.createElement(Bt,{error:t})))))}var gn={mainWrapper:"mainWrapper_z2l0"};function hn(e){var t=e.children,n=e.noFooter,l=e.wrapperClassName,s=e.title,u=e.description;return(0,v.t)(),r.createElement(pn,null,r.createElement(i.d,{title:s,description:u}),r.createElement(y,null),r.createElement(R,null),r.createElement(Vt,null),r.createElement("div",{id:d,className:(0,o.Z)(h.k.wrapper.main,gn.mainWrapper,l)},r.createElement(a.Z,{fallback:function(e){return r.createElement(mn,e)}},t)),!n&&r.createElement(dn,null))}},1327:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(7462),o=n(3366),a=n(7294),i=n(9960),l=n(4996),s=n(2263),u=n(6668),c=n(941),d=["imageClassName","titleClassName"];function f(e){var t=e.logo,n=e.alt,r=e.imageClassName,o={light:(0,l.Z)(t.src),dark:(0,l.Z)(t.srcDark||t.src)},i=a.createElement(c.Z,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?a.createElement("div",{className:r},i):i}function p(e){var t,n=(0,s.Z)().siteConfig.title,c=(0,u.L)().navbar,p=c.title,m=c.logo,g=e.imageClassName,h=e.titleClassName,v=(0,o.Z)(e,d),b=(0,l.Z)((null==m?void 0:m.href)||"/"),y=p?"":n,w=null!=(t=null==m?void 0:m.alt)?t:y;return a.createElement(i.Z,(0,r.Z)({to:b},v,(null==m?void 0:m.target)&&{target:m.target}),m&&a.createElement(f,{logo:m,alt:w,imageClassName:g}),null!=p&&a.createElement("b",{className:h},p))}},941:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(7462),o=n(3366),a=n(7294),i=n(6010),l=n(2389),s=n(2949),u={themedImage:"themedImage_ToTc","themedImage--light":"themedImage--light_HNdA","themedImage--dark":"themedImage--dark_i4oU"},c=["sources","className","alt"];function d(e){var t=(0,l.Z)(),n=(0,s.I)().colorMode,d=e.sources,f=e.className,p=e.alt,m=(0,o.Z)(e,c),g=t?"dark"===n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,g.map((function(e){return a.createElement("img",(0,r.Z)({key:e,src:d[e],alt:p,className:(0,i.Z)(u.themedImage,u["themedImage--"+e],f)},m))})))}},6043:function(e,t,n){"use strict";n.d(t,{u:function(){return d},z:function(){return y}});var r=n(7462),o=n(3366),a=n(7294),i=n(412),l=n(1442),s=["collapsed"],u=["lazy"],c="ease-in-out";function d(e){var t=e.initialState,n=(0,a.useState)(null!=t&&t),r=n[0],o=n[1],i=(0,a.useCallback)((function(){o((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:o,toggleCollapsed:i}}var f={display:"none",overflow:"hidden",height:"0px"},p={display:"block",overflow:"visible",height:"auto"};function m(e,t){var n=t?f:p;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function g(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,o=(0,a.useRef)(!1);(0,a.useEffect)((function(){var e,a=t.current;function i(){var e,t,n=a.scrollHeight,o=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,l.n)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+o+"ms "+(null!=(t=null==r?void 0:r.easing)?t:c),height:n+"px"}}function s(){var e=i();a.style.transition=e.transition,a.style.height=e.height}if(!o.current)return m(a,n),void(o.current=!0);return a.style.willChange="height",e=requestAnimationFrame((function(){n?(s(),requestAnimationFrame((function(){a.style.height=f.height,a.style.overflow=f.overflow}))):(a.style.display="block",requestAnimationFrame((function(){s()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function h(e){if(!i.Z.canUseDOM)return e?f:p}function v(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,o=e.children,i=e.animation,l=e.onCollapseTransitionEnd,s=e.className,u=e.disableSSRStyle,c=(0,a.useRef)(null);return g({collapsibleRef:c,collapsed:r,animation:i}),a.createElement(n,{ref:c,style:u?void 0:h(r),onTransitionEnd:function(e){"height"===e.propertyName&&(m(c.current,r),null==l||l(r))},className:s},o)}function b(e){var t=e.collapsed,n=(0,o.Z)(e,s),i=(0,a.useState)(!t),l=i[0],u=i[1],c=(0,a.useState)(t),d=c[0],f=c[1];return(0,a.useLayoutEffect)((function(){t||u(!0)}),[t]),(0,a.useLayoutEffect)((function(){l&&f(t)}),[l,t]),l?a.createElement(v,(0,r.Z)({},n,{collapsed:d})):null}function y(e){var t=e.lazy,n=(0,o.Z)(e,u),r=t?b:v;return a.createElement(r,n)}},9689:function(e,t,n){"use strict";n.d(t,{nT:function(){return m},pl:function(){return p}});var r=n(7294),o=n(2389),a=n(12),i=n(9688),l=n(6668),s=(0,a.WA)("docusaurus.announcement.dismiss"),u=(0,a.WA)("docusaurus.announcement.id"),c=function(){return"true"===s.get()},d=function(e){return s.set(String(e))},f=r.createContext(null);function p(e){var t=e.children,n=function(){var e=(0,l.L)().announcementBar,t=(0,o.Z)(),n=(0,r.useState)((function(){return!!t&&c()})),a=n[0],i=n[1];(0,r.useEffect)((function(){i(c())}),[]);var s=(0,r.useCallback)((function(){d(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=u.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;u.set(t),r&&d(!1),!r&&c()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!a,close:s}}),[e,a,s])}();return r.createElement(f.Provider,{value:n},t)}function m(){var e=(0,r.useContext)(f);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},2949:function(e,t,n){"use strict";n.d(t,{I:function(){return h},S:function(){return g}});var r=n(7294),o=n(412),a=n(9688),i=n(12),l=n(6668),s=r.createContext(void 0),u="theme",c=(0,i.WA)(u),d={light:"light",dark:"dark"},f=function(e){return e===d.dark?d.dark:d.light},p=function(e){return o.Z.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e)},m=function(e){c.set(f(e))};function g(e){var t=e.children,n=function(){var e=(0,l.L)().colorMode,t=e.defaultMode,n=e.disableSwitch,o=e.respectPrefersColorScheme,a=(0,r.useState)(p(t)),i=a[0],s=a[1];(0,r.useEffect)((function(){n&&c.del()}),[n]);var g=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,a=void 0===r||r;e?(s(e),a&&m(e)):(s(o?window.matchMedia("(prefers-color-scheme: dark)").matches?d.dark:d.light:t),c.del())}),[o,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",f(i))}),[i]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===u){var t=c.get();null!==t&&g(f(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,g]);var h=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||o){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||h.current?h.current=window.matchMedia("print").matches:g(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[g,n,o]),(0,r.useMemo)((function(){return{colorMode:i,setColorMode:g,get isDarkTheme(){return i===d.dark},setLightTheme:function(){g(d.light)},setDarkTheme:function(){g(d.dark)}}}),[i,g])}();return r.createElement(s.Provider,{value:n},t)}function h(){var e=(0,r.useContext)(s);if(null==e)throw new a.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},373:function(e,t,n){"use strict";n.d(t,{J:function(){return b},L5:function(){return h},Oh:function(){return y}});var r=n(7294),o=n(143),a=n(9935),i=n(6668),l=n(3791),s=n(9688),u=n(12),c=function(e){return"docs-preferred-version-"+e},d={save:function(e,t,n){(0,u.WA)(c(e),{persistence:t}).set(n)},read:function(e,t){return(0,u.WA)(c(e),{persistence:t}).get()},clear:function(e,t){(0,u.WA)(c(e),{persistence:t}).del()}},f=function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))};var p=r.createContext(null);function m(){var e=(0,o._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),a=(0,r.useState)((function(){return f(n)})),l=a[0],s=a[1];return(0,r.useEffect)((function(){s(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,o=d.read(t,n),r[t].versions.some((function(e){return e.name===o}))?{preferredVersionName:o}:(d.clear(t,n),{preferredVersionName:null}))];var t,o})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[l,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d.save(e,t,n),s((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function g(e){var t=e.children,n=m();return r.createElement(p.Provider,{value:n},t)}function h(e){var t=e.children;return l.cE?r.createElement(g,null,t):r.createElement(r.Fragment,null,t)}function v(){var e=(0,r.useContext)(p);if(!e)throw new s.i6("DocsPreferredVersionContextProvider");return e}function b(e){var t;void 0===e&&(e=a.m);var n=(0,o.zh)(e),i=v(),l=i[0],s=i[1],u=l[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===u})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){s.savePreferredVersion(e,t)}),[s,e])}}function y(){var e=(0,o._r)(),t=v()[0];var n=Object.keys(e);return Object.fromEntries(n.map((function(n){return[n,(r=n,a=e[r],i=t[r].preferredVersionName,null!=(o=a.versions.find((function(e){return e.name===i})))?o:null)];var r,o,a,i})))}},1116:function(e,t,n){"use strict";n.d(t,{V:function(){return s},b:function(){return l}});var r=n(7294),o=n(9688),a=Symbol("EmptyContext"),i=r.createContext(a);function l(e){var t=e.children,n=e.name,o=e.items,a=(0,r.useMemo)((function(){return n&&o?{name:n,items:o}:null}),[n,o]);return r.createElement(i.Provider,{value:a},t)}function s(){var e=(0,r.useContext)(i);if(e===a)throw new o.i6("DocsSidebarProvider");return e}},3163:function(e,t,n){"use strict";n.d(t,{M:function(){return d},e:function(){return f}});var r=n(7294),o=n(3102),a=n(7524),i=n(1980),l=n(6668),s=n(9688),u=r.createContext(void 0);function c(){var e,t=(e=(0,o.HY)(),0===(0,l.L)().navbar.items.length&&!e.component),n=(0,a.i)(),s=!t&&"mobile"===n,u=(0,r.useState)(!1),c=u[0],d=u[1];(0,i.Rb)((function(){if(c)return d(!1),!1}));var f=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:s,toggle:f,shown:c}}),[t,s,f,c])}function d(e){var t=e.children,n=c();return r.createElement(u.Provider,{value:n},t)}function f(){var e=r.useContext(u);if(void 0===e)throw new s.i6("NavbarMobileSidebarProvider");return e}},3102:function(e,t,n){"use strict";n.d(t,{HY:function(){return l},Zo:function(){return s},n2:function(){return i}});var r=n(7294),o=n(9688),a=r.createContext(null);function i(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return r.createElement(a.Provider,{value:n},t)}function l(){var e=(0,r.useContext)(a);if(!e)throw new o.i6("NavbarSecondaryMenuContentProvider");return e[0]}function s(e){var t=e.component,n=e.props,i=(0,r.useContext)(a);if(!i)throw new o.i6("NavbarSecondaryMenuContentProvider");var l=i[1],s=(0,o.Ql)(n);return(0,r.useEffect)((function(){l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((function(){return function(){return l({component:null,props:null})}}),[l]),null}},9727:function(e,t,n){"use strict";n.d(t,{h:function(){return o},t:function(){return a}});var r=n(7294),o="navigation-with-keyboard";function a(){(0,r.useEffect)((function(){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),function(){document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},6177:function(e,t,n){"use strict";n.d(t,{K:function(){return l},M:function(){return s}});var r=n(7294),o=n(2263),a=n(1980),i="q";function l(){return(0,a.Nc)(i)}function s(){var e=(0,o.Z)().siteConfig,t=e.baseUrl,n=e.themeConfig.algolia.searchPagePath;return(0,r.useCallback)((function(e){return""+t+n+"?"+i+"="+encodeURIComponent(e)}),[t,n])}},7524:function(e,t,n){"use strict";n.d(t,{i:function(){return u}});var r=n(7294),o=n(412),a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(){return o.Z.canUseDOM?window.innerWidth>i?a.desktop:a.mobile:a.ssr}var s=!1;function u(){var e=(0,r.useState)((function(){return s?"ssr":l()})),t=e[0],n=e[1];return(0,r.useEffect)((function(){function e(){n(l())}var t=s?window.setTimeout(e,1e3):void 0;return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),clearTimeout(t)}}),[]),t}},5281:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var 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",admonitionType:function(e){return"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:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{}}},1442:function(e,t,n){"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{n:function(){return r}})},3791:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Wl:function(){return m},_F:function(){return v},cE:function(){return p},hI:function(){return S},lO:function(){return w},vY:function(){return E},oz:function(){return k},s1:function(){return y}});var a=n(7294),i=n(6550),l=n(8790),s=n(143),u=n(373),c=n(1116),d=n(7392),f=n(8596),p=!!s._r;function m(e){if(e.href)return e.href;for(var t,n=o(e.items);!(t=n()).done;){var r=t.value;if("link"===r.type)return r.href;if("category"===r.type){var a=m(r);if(a)return a}}}var g=function(e,t){return void 0!==e&&(0,f.Mg)(e,t)},h=function(e,t){return e.some((function(e){return v(e,t)}))};function v(e,t){return"link"===e.type?g(e.href,t):"category"===e.type&&(g(e.href,t)||h(e.items,t))}function b(e){var t=e.sidebarItems,n=e.pathname,r=e.onlyCategories,a=void 0!==r&&r,i=[];return function e(t){for(var r,l=o(t);!(r=l()).done;){var s=r.value;if("category"===s.type&&((0,f.Mg)(s.href,n)||e(s.items))||"link"===s.type&&(0,f.Mg)(s.href,n))return a&&"category"!==s.type||i.unshift(s),!0}return!1}(t),i}function y(){var e,t=(0,c.V)(),n=(0,i.TH)().pathname;return!1!==(null==(e=(0,s.gA)())?void 0:e.pluginData.breadcrumbs)&&t?b({sidebarItems:t.items,pathname:n}):null}function w(e){var t=(0,s.Iw)(e).activeVersion,n=(0,u.J)(e).preferredVersion,r=(0,s.yW)(e);return(0,a.useMemo)((function(){return(0,d.j)([t,n,r].filter(Boolean))}),[t,n,r])}function k(e,t){var n=w(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map((function(e){return e[0]})).join("\n- "));return r[1]}),[e,n])}function E(e,t){var n=w(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return 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((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+(0,d.j)(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function S(e){var t=e.route,n=e.versionMetadata,r=(0,i.TH)(),o=t.routes,a=o.find((function(e){return(0,i.LX)(r.pathname,e)}));if(!a)return null;var s=a.sidebar,u=s?n.docsSidebars[s]:void 0;return{docElement:(0,l.H)(o),sidebarName:s,sidebarItems:u}}},2128:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(2263);function o(e){var t=(0,r.Z)().siteConfig,n=t.title,o=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+o+" "+n:n}},1980:function(e,t,n){"use strict";n.d(t,{Nc:function(){return u},Rb:function(){return l},_X:function(){return s}});var r=n(7294),o=n(6550),a=n(1688),i=n(9688);function l(e){!function(e){var t=(0,o.k6)(),n=(0,i.zX)(e);(0,r.useEffect)((function(){return t.block((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}function s(e){return t=function(t){return null===e?null:new URLSearchParams(t.location.search).get(e)},n=(0,o.k6)(),(0,a.useSyncExternalStore)(n.listen,(function(){return t(n)}),(function(){return t(n)}));var t,n}function u(e){var t,n,a=null!=(t=s(e))?t:"",i=(n=(0,o.k6)(),(0,r.useCallback)((function(e,t,r){var o=new URLSearchParams(n.location.search);t?o.set(e,t):o.delete(e),(null!=r&&r.push?n.push:n.replace)({search:o.toString()})}),[n]));return[a,(0,r.useCallback)((function(t,n){i(e,t,n)}),[i,e])]}},7392:function(e,t,n){"use strict";function r(e,t){return void 0===t&&(t=function(e,t){return e===t}),e.filter((function(n,r){return e.findIndex((function(e){return t(e,n)}))!==r}))}function o(e){return Array.from(new Set(e))}n.d(t,{j:function(){return o},l:function(){return r}})},833:function(e,t,n){"use strict";n.d(t,{FG:function(){return f},d:function(){return c},VC:function(){return p}});var r=n(7294),o=n(6010),a=n(5742),i=n(226);function l(){var e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(4996),u=n(2128);function c(e){var t=e.title,n=e.description,o=e.keywords,i=e.image,l=e.children,c=(0,u.p)(t),d=(0,s.C)().withBaseUrl,f=i?d(i,{absolute:!0}):void 0;return r.createElement(a.Z,null,t&&r.createElement("title",null,c),t&&r.createElement("meta",{property:"og:title",content:c}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),o&&r.createElement("meta",{name:"keywords",content:Array.isArray(o)?o.join(","):o}),f&&r.createElement("meta",{property:"og:image",content:f}),f&&r.createElement("meta",{name:"twitter:image",content:f}),l)}var d=r.createContext(void 0);function f(e){var t=e.className,n=e.children,i=r.useContext(d),l=(0,o.Z)(i,t);return r.createElement(d.Provider,{value:l},r.createElement(a.Z,null,r.createElement("html",{className:l})),n)}function p(e){var t=e.children,n=l(),a="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),i="plugin-id-"+n.plugin.id;return r.createElement(f,{className:(0,o.Z)(a,i)},t)}},9688:function(e,t,n){"use strict";n.d(t,{i6:function(){return p},Qc:function(){return g},zX:function(){return d},D9:function(){return f},Ql:function(){return m}});var r=n(7099),o=n(4578);function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}var i=n(9611);function l(e,t,n){return l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&(0,i.Z)(o,n.prototype),o},l.apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(r,e)},s(e)}var u=n(7294),c=n(412).Z.canUseDOM?u.useLayoutEffect:u.useEffect;function d(e){var t=(0,u.useRef)(e);return c((function(){t.current=e}),[e]),(0,u.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function f(e){var t=(0,u.useRef)();return c((function(){t.current=e})),t.current}var p=function(e){function t(t,n){var o,a,i;return(i=e.call(this)||this).name="ReactContextError",i.message="Hook "+(null!=(o=null==(a=i.stack)||null==(a=a.split("\n")[1])||null==(a=a.match((0,r.Z)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:a.groups.name)?o:"")+" is called outside the <"+t+">. "+(null!=n?n:""),i}return(0,o.Z)(t,e),t}(s(Error));function m(e){var t=Object.entries(e);return t.sort((function(e,t){return e[0].localeCompare(t[0])})),(0,u.useMemo)((function(){return e}),t.flat())}function g(e){return function(t){var n=t.children;return u.createElement(u.Fragment,null,e.reduceRight((function(e,t){return u.createElement(t,null,e)}),n))}}},8022:function(e,t,n){"use strict";function r(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}n.d(t,{F:function(){return r}})},8596:function(e,t,n){"use strict";n.d(t,{Mg:function(){return i},Ns:function(){return l}});var r=n(7294),o=n(723),a=n(2263);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function l(){var e=(0,a.Z)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:o.Z,baseUrl:e})}),[e])}},2466:function(e,t,n){"use strict";n.d(t,{Ct:function(){return p},OC:function(){return s},RF:function(){return d},o5:function(){return f}});var r=n(7294),o=n(412),a=n(2389),i=n(9688);var l=r.createContext(void 0);function s(e){var t,n=e.children,o=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return r.createElement(l.Provider,{value:o},n)}function u(){var e=(0,r.useContext)(l);if(null==e)throw new i.i6("ScrollControllerProvider");return e}var c=function(){return o.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function d(e,t){void 0===t&&(t=[]);var n=u().scrollEventsEnabledRef,o=(0,r.useRef)(c()),a=(0,i.zX)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=c();a(e,o.current),o.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[a,n].concat(t))}function f(){var e,t,n,o=u(),a=(e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((function(t){e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((function(){var t=e.current,n=t.elem,r=t.top;if(!n)return{restored:!1};var o=n.getBoundingClientRect().top-r;return o&&window.scrollBy({left:0,top:o}),e.current={elem:null,top:0},{restored:0!==o}}),[]),(0,r.useMemo)((function(){return{save:t,restore:n}}),[n,t])),i=(0,r.useRef)(void 0),l=(0,r.useCallback)((function(e){a.save(e),o.disableScrollEvents(),i.current=function(){var e=a.restore().restored;if(i.current=void 0,e){window.addEventListener("scroll",(function e(){o.enableScrollEvents(),window.removeEventListener("scroll",e)}))}else o.enableScrollEvents()}}),[o,a]);return(0,r.useLayoutEffect)((function(){queueMicrotask((function(){return null==i.current?void 0:i.current()}))})),{blockElementScrollPositionUntilNextRender:l}}function p(){var e=(0,r.useRef)(null),t=(0,a.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var o=document.documentElement.scrollTop;(n&&o>e||!n&&o=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};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var s=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=l(t),o=l(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},u=n(8776);function c(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(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 p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(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 g(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.Z)({},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 h(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function v(){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=g(e,t,f(),w.location);c.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t
'};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)},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,o){for(var a,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s=d.reach);S+=E.value.length,E=E.next){var x=E.value;if(t.length>e.length)return;if(!(x instanceof o)){var _,C=1;if(b){if(!(_=a(k,S,e,v))||_.index>=e.length)break;var T=_.index,A=_.index+_[0].length,L=S;for(L+=E.value.length;T>=L;)L+=(E=E.next).value.length;if(S=L-=E.value.length,E.value instanceof o)continue;for(var R=E;R!==t.tail&&(Ld.reach&&(d.reach=I);var D=E.prev;if(O&&(D=s(t,D,O),S+=O.length),u(t,D,C),E=s(t,D,new o(f,h?r.tokenize(N,h):N,y,N)),P&&s(t,E,P),C>1){var M={cause:f+","+m,reach:I};i(e,t,n,E.prev,S,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o"+a.content+""},r}(),r=n;n.default=n,r.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:r.languages[t]},n.cdata=/^$/i;var o={"included-cdata":{pattern://i,inside:n}};o["language-"+t]={pattern:/[\s\S]+/,inside:r.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},r.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(e,t){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:r.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.c=r.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),r.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),r.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},r.languages.c.string],char:r.languages.c.char,comment:r.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:r.languages.c}}}}),r.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete r.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(r),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(r),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:o})}(r),r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(r),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(r),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(r),r.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:r.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},r.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var l=f(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s=0&&p(u,"variable-input")}}}}function c(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var o={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(o.code,o.grammar),e.hooks.run("after-tokenize",o),o.tokens}function u(t){var n={};n["interpolation-punctuation"]=o;var a=e.tokenize(t,n);if(3===a.length){var i=[1,1];i.push.apply(i,s(a[1],e.languages.javascript,"javascript")),a.splice.apply(a,i)}return new e.Token("interpolation",a,r.alias,t)}function c(t,n,r){var o=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),i=0,c={},d=s(o.map((function(e){if("string"==typeof e)return e;for(var n,o=e.content;-1!==t.indexOf(n=l(i++,r)););return c[n]=o,n})).join(""),n,r),f=Object.keys(c);return i=0,function e(t){for(var n=0;n=f.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var o=f[i],a="string"==typeof r?r:r.content,l=a.indexOf(o);if(-1!==l){++i;var s=a.substring(0,l),d=u(c[o]),p=a.substring(l+o.length),m=[];if(s&&m.push(s),m.push(d),p){var g=[p];e(g),m.push.apply(m,g)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,o=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(r),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function a(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return o})),RegExp(e,t)}o=a(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:i(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var s=i(o);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=i(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}o.content&&"string"!=typeof o.content&&l(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(r),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(r),r.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},r.languages.go=r.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),r.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete r.languages.go["class-name"],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 g=f.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),v=f.substring(m+p.length),b=[];g&&b.push.apply(b,i([g])),b.push(h),v&&b.push.apply(b,i([v])),"string"==typeof u?l.splice.apply(l,[s,1].concat(b)):u.content=b}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(r),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(r),r.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},r.languages.webmanifest=r.languages.json,r.languages.less=r.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),r.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),r.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},r.languages.objectivec=r.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete r.languages.objectivec["class-name"],r.languages.objc=r.languages.objectivec,r.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},r.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},r.languages.python["string-interpolation"].inside.interpolation.inside.rest=r.languages.python,r.languages.py=r.languages.python,r.languages.reason=r.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),r.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete r.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(r),r.languages.scss=r.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),r.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),r.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),r.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),r.languages.scss.atrule.inside.rest=r.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(r),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(r),r.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},t.Z=r},9901:function(e){e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},2885:function(e,t,n){const r=n(9901),o=n(9642),a=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...a,...Object.keys(Prism.languages)];o(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(6500).resolve(t)],delete Prism.languages[e],n(6500)(t),a.add(e)}))}i.silent=!1,e.exports=i},6726:function(e,t,n){var r={"./":2885};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=6726},6500:function(e,t,n){var r={"./":2885};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=6500},9642:function(e){"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n "));var l={},s=e[r];if(s){function u(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in l))for(var i in o(t,a),l[t]=!0,n[t])l[i]=!0}t(s.require,u),t(s.optional,u),t(s.modify,u)}n[r]=l,a.pop()}}return function(e){var t=n[e];return t||(o(e,r),t=n[e]),t}}function o(e){for(var t in e)return!0;return!1}return function(a,i,l){var s=function(e){var t={};for(var n in e){var r=e[n];for(var o in r)if("meta"!=o){var a=r[o];t[o]="string"==typeof a?{title:a}:a}}return t}(a),u=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var o in n={},e){var a=e[o];t(a&&a.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+o+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+o+" because it is a component.");n[t]=o}))}return n[r]||r}}(s);i=i.map(u),l=(l||[]).map(u);var c=n(i),d=n(l);i.forEach((function e(n){var r=s[n];t(r&&r.require,(function(t){t in d||(c[t]=!0,e(t))}))}));for(var f,p=r(s),m=c;o(m);){for(var g in f={},m){var h=s[g];t(h&&h.modify,(function(e){e in d&&(f[e]=!0)}))}for(var v in d)if(!(v in c))for(var b in p(v))if(b in c){f[v]=!0;break}for(var y in m=f)c[y]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,o){var a=o?o.series:void 0,i=o?o.parallel:e,l={},s={};function u(e){if(e in l)return l[e];s[e]=!0;var o,c=[];for(var d in t(e))d in n&&c.push(d);if(0===c.length)o=r(e);else{var f=i(c.map((function(e){var t=u(e);return delete s[e],t})));a?o=a(f,(function(){return r(e)})):r(e)}return l[e]=o}for(var c in n)u(c);var d=[];for(var f in s)d.push(l[f]);return i(d)}(p,c,t,n)}};return w}}();e.exports=t},2703:function(e,t,n){"use strict";var r=n(414);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}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:function(e,t,n){"use strict";var r=n(7294),o=n(7418),a=n(3840);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n