diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a703f066ea..ea7fe18310a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,17 @@ # RxDB Changelog -- ADD SQLite RxStorage support for Expo SDK 51 with the async API `getSQLiteBasicsExpoSQLiteAsync()` + +### 15.36.1 (16 October 2024) + +- ADD SQLite RxStorage support for Expo SDK 51 with the async API `getSQLiteBasicsExpoSQLiteAsync()` + ### 15.36.0 (16 October 2024) - ADD option to define the RxDB Premium token in an `.env` file diff --git a/dist/cjs/plugins/utils/utils-rxdb-version.js b/dist/cjs/plugins/utils/utils-rxdb-version.js index 755d684d7a7..8bd949e5c10 100644 --- a/dist/cjs/plugins/utils/utils-rxdb-version.js +++ b/dist/cjs/plugins/utils/utils-rxdb-version.js @@ -7,5 +7,5 @@ exports.RXDB_VERSION = void 0; /** * This file is replaced in the 'npm run build:version' script. */ -var RXDB_VERSION = exports.RXDB_VERSION = '15.36.0'; +var RXDB_VERSION = exports.RXDB_VERSION = '15.36.1'; //# sourceMappingURL=utils-rxdb-version.js.map \ No newline at end of file diff --git a/dist/cjs/plugins/utils/utils-rxdb-version.js.map b/dist/cjs/plugins/utils/utils-rxdb-version.js.map index 486cf083bd6..8adccd63003 100644 --- a/dist/cjs/plugins/utils/utils-rxdb-version.js.map +++ b/dist/cjs/plugins/utils/utils-rxdb-version.js.map @@ -1 +1 @@ -{"version":3,"file":"utils-rxdb-version.js","names":["RXDB_VERSION","exports"],"sources":["../../../../src/plugins/utils/utils-rxdb-version.ts"],"sourcesContent":["/**\n * This file is replaced in the 'npm run build:version' script.\n */\nexport const RXDB_VERSION = '15.36.0';\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACO,IAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,SAAS","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"utils-rxdb-version.js","names":["RXDB_VERSION","exports"],"sources":["../../../../src/plugins/utils/utils-rxdb-version.ts"],"sourcesContent":["/**\n * This file is replaced in the 'npm run build:version' script.\n */\nexport const RXDB_VERSION = '15.36.1';\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACO,IAAMA,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/dist/esm/plugins/utils/utils-rxdb-version.js b/dist/esm/plugins/utils/utils-rxdb-version.js index a5419374492..bf161ac5484 100644 --- a/dist/esm/plugins/utils/utils-rxdb-version.js +++ b/dist/esm/plugins/utils/utils-rxdb-version.js @@ -1,5 +1,5 @@ /** * This file is replaced in the 'npm run build:version' script. */ -export var RXDB_VERSION = '15.36.0'; +export var RXDB_VERSION = '15.36.1'; //# sourceMappingURL=utils-rxdb-version.js.map \ No newline at end of file diff --git a/dist/esm/plugins/utils/utils-rxdb-version.js.map b/dist/esm/plugins/utils/utils-rxdb-version.js.map index 6fecd58fe5a..ef3066e51a4 100644 --- a/dist/esm/plugins/utils/utils-rxdb-version.js.map +++ b/dist/esm/plugins/utils/utils-rxdb-version.js.map @@ -1 +1 @@ -{"version":3,"file":"utils-rxdb-version.js","names":["RXDB_VERSION"],"sources":["../../../../src/plugins/utils/utils-rxdb-version.ts"],"sourcesContent":["/**\n * This file is replaced in the 'npm run build:version' script.\n */\nexport const RXDB_VERSION = '15.36.0';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,IAAMA,YAAY,GAAG,SAAS","ignoreList":[]} \ No newline at end of file +{"version":3,"file":"utils-rxdb-version.js","names":["RXDB_VERSION"],"sources":["../../../../src/plugins/utils/utils-rxdb-version.ts"],"sourcesContent":["/**\n * This file is replaced in the 'npm run build:version' script.\n */\nexport const RXDB_VERSION = '15.36.1';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,IAAMA,YAAY,GAAG,SAAS","ignoreList":[]} \ No newline at end of file diff --git a/dist/types/plugins/storage-denokv/index.d.ts b/dist/types/plugins/storage-denokv/index.d.ts index be56836b32a..d3b112cbc57 100644 --- a/dist/types/plugins/storage-denokv/index.d.ts +++ b/dist/types/plugins/storage-denokv/index.d.ts @@ -4,7 +4,7 @@ import { RxStorageInstanceDenoKV } from "./rx-storage-instance-denokv.ts"; export declare class RxStorageDenoKV implements RxStorage, DenoKVSettings> { settings: DenoKVSettings; name: string; - readonly rxdbVersion = "15.36.0"; + readonly rxdbVersion = "15.36.1"; constructor(settings: DenoKVSettings); createStorageInstance(params: RxStorageInstanceCreationParams): Promise>; } diff --git a/dist/types/plugins/storage-dexie/rx-storage-dexie.d.ts b/dist/types/plugins/storage-dexie/rx-storage-dexie.d.ts index 3bce93bd312..af54dd8f597 100644 --- a/dist/types/plugins/storage-dexie/rx-storage-dexie.d.ts +++ b/dist/types/plugins/storage-dexie/rx-storage-dexie.d.ts @@ -4,7 +4,7 @@ import { RxStorageInstanceDexie } from './rx-storage-instance-dexie.ts'; export declare class RxStorageDexie implements RxStorage { settings: DexieSettings; name: string; - readonly rxdbVersion = "15.36.0"; + readonly rxdbVersion = "15.36.1"; constructor(settings: DexieSettings); createStorageInstance(params: RxStorageInstanceCreationParams): Promise>; } diff --git a/dist/types/plugins/storage-lokijs/rx-storage-lokijs.d.ts b/dist/types/plugins/storage-lokijs/rx-storage-lokijs.d.ts index 5413b6a489b..7c9d79c9449 100644 --- a/dist/types/plugins/storage-lokijs/rx-storage-lokijs.d.ts +++ b/dist/types/plugins/storage-lokijs/rx-storage-lokijs.d.ts @@ -4,7 +4,7 @@ import type { LeaderElector } from 'broadcast-channel'; export declare class RxStorageLoki implements RxStorage { databaseSettings: LokiDatabaseSettings; name: string; - readonly rxdbVersion = "15.36.0"; + readonly rxdbVersion = "15.36.1"; /** * Create one leader elector by db name. * This is done inside of the storage, not globally diff --git a/dist/types/plugins/storage-mongodb/rx-storage-mongodb.d.ts b/dist/types/plugins/storage-mongodb/rx-storage-mongodb.d.ts index 70888b0d013..388897f1a4e 100644 --- a/dist/types/plugins/storage-mongodb/rx-storage-mongodb.d.ts +++ b/dist/types/plugins/storage-mongodb/rx-storage-mongodb.d.ts @@ -4,7 +4,7 @@ import { RxStorageInstanceMongoDB } from './rx-storage-instance-mongodb.ts'; export declare class RxStorageMongoDB implements RxStorage { databaseSettings: MongoDBDatabaseSettings; name: string; - readonly rxdbVersion = "15.36.0"; + readonly rxdbVersion = "15.36.1"; constructor(databaseSettings: MongoDBDatabaseSettings); createStorageInstance(params: RxStorageInstanceCreationParams): Promise>; } diff --git a/dist/types/plugins/storage-remote/rx-storage-remote.d.ts b/dist/types/plugins/storage-remote/rx-storage-remote.d.ts index 1201dddf1d7..0f31936ae0f 100644 --- a/dist/types/plugins/storage-remote/rx-storage-remote.d.ts +++ b/dist/types/plugins/storage-remote/rx-storage-remote.d.ts @@ -4,7 +4,7 @@ import type { MessageFromRemote, RemoteMessageChannel, RxStorageRemoteInternals, export declare class RxStorageRemote implements RxStorage { readonly settings: RxStorageRemoteSettings; readonly name: string; - readonly rxdbVersion = "15.36.0"; + readonly rxdbVersion = "15.36.1"; private seed; private lastRequestId; messageChannelIfOneMode?: Promise; diff --git a/dist/types/plugins/utils/utils-rxdb-version.d.ts b/dist/types/plugins/utils/utils-rxdb-version.d.ts index eca1a407f5d..48781151007 100644 --- a/dist/types/plugins/utils/utils-rxdb-version.d.ts +++ b/dist/types/plugins/utils/utils-rxdb-version.d.ts @@ -1,4 +1,4 @@ /** * This file is replaced in the 'npm run build:version' script. */ -export declare const RXDB_VERSION = "15.36.0"; +export declare const RXDB_VERSION = "15.36.1"; diff --git a/dist/types/rx-database.d.ts b/dist/types/rx-database.d.ts index 2f9cd964b95..55f7ed121b1 100644 --- a/dist/types/rx-database.d.ts +++ b/dist/types/rx-database.d.ts @@ -29,7 +29,7 @@ export declare class RxDatabaseBase | undefined; readonly idleQueue: IdleQueue; - readonly rxdbVersion = "15.36.0"; + readonly rxdbVersion = "15.36.1"; /** * Contains all known non-closed storage instances * that belong to this database. diff --git a/docs/404.html b/docs/404.html index ba68fd9d3bd..ec799473102 100644 --- a/docs/404.html +++ b/docs/404.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/adapters.html b/docs/adapters.html index 4ddf6d25e36..cfe21e3f214 100644 --- a/docs/adapters.html +++ b/docs/adapters.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/alternatives.html b/docs/alternatives.html index 988e9529d5b..65789c81743 100644 --- a/docs/alternatives.html +++ b/docs/alternatives.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/angular-database.html b/docs/articles/angular-database.html index b7058dc1c2d..61c0f8edbf6 100644 --- a/docs/articles/angular-database.html +++ b/docs/articles/angular-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/browser-database.html b/docs/articles/browser-database.html index 2d1c42d8fb6..1846b737c27 100644 --- a/docs/articles/browser-database.html +++ b/docs/articles/browser-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/browser-storage.html b/docs/articles/browser-storage.html index 94b03326437..d17d7336ce5 100644 --- a/docs/articles/browser-storage.html +++ b/docs/articles/browser-storage.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/data-base.html b/docs/articles/data-base.html index 2b436eeada9..09a5a5432b5 100644 --- a/docs/articles/data-base.html +++ b/docs/articles/data-base.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/embedded-database.html b/docs/articles/embedded-database.html index 9e277efaeb7..2e8fb96508a 100644 --- a/docs/articles/embedded-database.html +++ b/docs/articles/embedded-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/flutter-database.html b/docs/articles/flutter-database.html index d9844cb23e4..bc6fe3dbfaf 100644 --- a/docs/articles/flutter-database.html +++ b/docs/articles/flutter-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/frontend-database.html b/docs/articles/frontend-database.html index dc47c2ecb26..94b0966f507 100644 --- a/docs/articles/frontend-database.html +++ b/docs/articles/frontend-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/ideas/index.html b/docs/articles/ideas/index.html index 0896236ac75..1033b875263 100644 --- a/docs/articles/ideas/index.html +++ b/docs/articles/ideas/index.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/in-memory-nosql-database.html b/docs/articles/in-memory-nosql-database.html index f35e165cc75..a9b4aff5656 100644 --- a/docs/articles/in-memory-nosql-database.html +++ b/docs/articles/in-memory-nosql-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/ionic-database.html b/docs/articles/ionic-database.html index c4f9fc444db..4ff550546e3 100644 --- a/docs/articles/ionic-database.html +++ b/docs/articles/ionic-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/javascript-vector-database.html b/docs/articles/javascript-vector-database.html index 6ca37a8c133..6e92ed71bd5 100644 --- a/docs/articles/javascript-vector-database.html +++ b/docs/articles/javascript-vector-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/json-database.html b/docs/articles/json-database.html index 031550804fe..6552b1264bb 100644 --- a/docs/articles/json-database.html +++ b/docs/articles/json-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/localstorage-indexeddb-cookies-opfs-sqlite-wasm.html b/docs/articles/localstorage-indexeddb-cookies-opfs-sqlite-wasm.html index 58907d482fd..7654770e917 100644 --- a/docs/articles/localstorage-indexeddb-cookies-opfs-sqlite-wasm.html +++ b/docs/articles/localstorage-indexeddb-cookies-opfs-sqlite-wasm.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/localstorage.html b/docs/articles/localstorage.html index 65e135b0b4b..fad7898c3c0 100644 --- a/docs/articles/localstorage.html +++ b/docs/articles/localstorage.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/mobile-database.html b/docs/articles/mobile-database.html index 6be9745d755..216af76da73 100644 --- a/docs/articles/mobile-database.html +++ b/docs/articles/mobile-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/progressive-web-app-database.html b/docs/articles/progressive-web-app-database.html index 471ae7d2776..258f4f70548 100644 --- a/docs/articles/progressive-web-app-database.html +++ b/docs/articles/progressive-web-app-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/react-database.html b/docs/articles/react-database.html index f43eae2ded6..0db90fc85cd 100644 --- a/docs/articles/react-database.html +++ b/docs/articles/react-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/realtime-database.html b/docs/articles/realtime-database.html index 73b7745e562..2d4f838dfbd 100644 --- a/docs/articles/realtime-database.html +++ b/docs/articles/realtime-database.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/articles/websockets-sse-polling-webrtc-webtransport.html b/docs/articles/websockets-sse-polling-webrtc-webtransport.html index 36b8456563f..94dc1c776f8 100644 --- a/docs/articles/websockets-sse-polling-webrtc-webtransport.html +++ b/docs/articles/websockets-sse-polling-webrtc-webtransport.html @@ -16,8 +16,8 @@ - - + + diff --git a/docs/assets/js/4ed9495b.ccc3c807.js b/docs/assets/js/4ed9495b.e5ec1753.js similarity index 57% rename from docs/assets/js/4ed9495b.ccc3c807.js rename to docs/assets/js/4ed9495b.e5ec1753.js index e5a9d0508f4..b5acdad099d 100644 --- a/docs/assets/js/4ed9495b.ccc3c807.js +++ b/docs/assets/js/4ed9495b.e5ec1753.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrxdb=self.webpackChunkrxdb||[]).push([[1199],{1787:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>n,metadata:()=>o,toc:()=>l});var s=a(4848),i=a(8453);const n={title:"SQLite RxStorage \ud83d\udc51",slug:"rx-storage-sqlite.html"},r="SQLite RxStorage",o={id:"rx-storage-sqlite",title:"SQLite RxStorage \ud83d\udc51",description:"This RxStorage is based on SQLite and is made to work with Node.js, Electron, React Native and Capacitor or SQLite via webassembly in the browser. It can be used with different so called sqliteBasics adapters to account for the differences in the various SQLite bundles and libraries that exist.",source:"@site/docs/rx-storage-sqlite.md",sourceDirName:".",slug:"/rx-storage-sqlite.html",permalink:"/rx-storage-sqlite.html",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"SQLite RxStorage \ud83d\udc51",slug:"rx-storage-sqlite.html"},sidebar:"tutorialSidebar",previous:{title:"IndexedDB RxStorage \ud83d\udc51",permalink:"/rx-storage-indexeddb.html"},next:{title:"Memory RxStorage",permalink:"/rx-storage-memory.html"}},c={},l=[{value:"Performance comparison with other storages",id:"performance-comparison-with-other-storages",level:2},{value:"Using the SQLite RxStorage",id:"using-the-sqlite-rxstorage",level:2},{value:"Usage with the sqlite3 npm package",id:"usage-with-the-sqlite3-npm-package",level:2},{value:"Usage with the node package",id:"usage-with-the-node-package",level:2},{value:"Usage with Webassembly in the Browser",id:"usage-with-webassembly-in-the-browser",level:2},{value:"Usage with React Native",id:"usage-with-react-native",level:2},{value:"Usage with SQLite Capacitor",id:"usage-with-sqlite-capacitor",level:2},{value:"Usage with Expo SQLite",id:"usage-with-expo-sqlite",level:2},{value:"Database Connection",id:"database-connection",level:2},{value:"Known Problems of SQLite in JavaScript apps",id:"known-problems-of-sqlite-in-javascript-apps",level:2},{value:"Related",id:"related",level:2}];function d(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"sqlite-rxstorage",children:"SQLite RxStorage"}),"\n",(0,s.jsxs)(t.p,{children:["This ",(0,s.jsx)(t.a,{href:"/rx-storage.html",children:"RxStorage"})," is based on ",(0,s.jsx)(t.a,{href:"https://www.sqlite.org/index.html",children:"SQLite"})," and is made to work with ",(0,s.jsx)(t.strong,{children:"Node.js"}),", ",(0,s.jsx)(t.a,{href:"/electron-database.html",children:"Electron"}),", ",(0,s.jsx)(t.a,{href:"/react-native-database.html",children:"React Native"})," and ",(0,s.jsx)(t.a,{href:"/capacitor-database.html",children:"Capacitor"})," or SQLite via webassembly in the browser. It can be used with different so called ",(0,s.jsx)(t.code,{children:"sqliteBasics"})," adapters to account for the differences in the various SQLite bundles and libraries that exist."]}),"\n",(0,s.jsx)(t.h2,{id:"performance-comparison-with-other-storages",children:"Performance comparison with other storages"}),"\n",(0,s.jsxs)(t.p,{children:["The SQLite storage is a bit slower compared to other Node.js based storages like the ",(0,s.jsx)(t.a,{href:"/rx-storage-filesystem-node.html",children:"Filesystem Storage"})," because wrapping SQLite has a bit of overhead and sending data from the JavaScript process to SQLite and backwards increases the latency. However for most hybrid apps the SQLite storage is the best option because it can leverage the SQLite version that comes already installed on the smartphones OS (iOS and android). Also for desktop electron apps it can be a viable solution because it is easy to ship SQLite together inside of the electron bundle."]}),"\n",(0,s.jsx)("p",{align:"center",children:(0,s.jsx)("img",{src:"./files/rx-storage-performance-node.png",alt:"SQLite performance - Node.js",width:"700"})}),"\n",(0,s.jsx)(t.h2,{id:"using-the-sqlite-rxstorage",children:"Using the SQLite RxStorage"}),"\n",(0,s.jsxs)(t.p,{children:["To use the SQLite storage you have to import ",(0,s.jsx)(t.code,{children:"getRxStorageSQLite"})," from the ",(0,s.jsx)(t.a,{href:"/premium",children:"RxDB Premium \ud83d\udc51"})," package and then add the correct ",(0,s.jsx)(t.code,{children:"sqliteBasics"})," adapter depending on which sqlite module you want to use. This can then be used as storage when creating the ",(0,s.jsx)(t.a,{href:"/rx-database.html",children:"RxDatabase"}),". In the following you can see some examples for some of the most common SQLite packages."]}),"\n",(0,s.jsxs)(t.h2,{id:"usage-with-the-sqlite3-npm-package",children:["Usage with the ",(0,s.jsx)(t.strong,{children:"sqlite3 npm package"})]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n createRxDatabase\n} from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsNode\n} from 'rxdb-premium/plugins/storage-sqlite';\n\n/**\n * In Node.js, we use the SQLite database\n * from the 'sqlite' npm module.\n * @link https://www.npmjs.com/package/sqlite3\n */\nimport sqlite3 from 'sqlite3';\n\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n storage: getRxStorageSQLite({\n /**\n * Different runtimes have different interfaces to SQLite.\n * For example in node.js we have a callback API,\n * while in capacitor sqlite we have Promises.\n * So we need a helper object that is capable of doing the basic\n * sqlite operations.\n */\n sqliteBasics: getSQLiteBasicsNode(sqlite3)\n })\n});\n"})}),"\n",(0,s.jsxs)(t.h2,{id:"usage-with-the-node-package",children:["Usage with the ",(0,s.jsxs)(t.strong,{children:["node",":sqlite"]})," package"]}),"\n",(0,s.jsxs)(t.p,{children:['With Node.js version 22 and newer, you can use the "native" ',(0,s.jsx)(t.a,{href:"https://nodejs.org/api/sqlite.html",children:"sqlite module"})," that comes shipped with Node.js."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import { createRxDatabase } from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsNodeNative\n} from 'rxdb-premium/plugins/storage-sqlite';\nimport sqlite from 'node:sqlite';\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n storage: getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsNodeNative(sqlite.DatabaseSync)\n })\n});\n"})}),"\n",(0,s.jsx)(t.h2,{id:"usage-with-webassembly-in-the-browser",children:"Usage with Webassembly in the Browser"}),"\n",(0,s.jsxs)(t.p,{children:["In the browser you can use the ",(0,s.jsx)(t.a,{href:"https://github.com/rhashimoto/wa-sqlite",children:"wa-sqlite"})," package to run sQLite in Webassembly. The wa-sqlite module also allows to use persistence with IndexedDB or OPFS. Notice that in general SQLite via Webassembly is slower compared to other storages like ",(0,s.jsx)(t.a,{href:"/rx-storage-indexeddb.html",children:"IndexedDB"})," or ",(0,s.jsx)(t.a,{href:"/rx-storage-opfs.html",children:"OPFS"})," because sending data from the main thread to wasm and backwards is slow in the browser. Have a look the ",(0,s.jsx)(t.a,{href:"/rx-storage-performance.html",children:"performance comparison"}),"."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n createRxDatabase\n} from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsWasm\n} from 'rxdb-premium/plugins/storage-sqlite';\n\n/**\n * In the Browser, we use the SQLite database\n * from the 'wa-sqlite' npm module. This contains the SQLite library\n * compiled to Webassembly\n * @link https://www.npmjs.com/package/wa-sqlite\n */\nimport SQLiteESMFactory from 'wa-sqlite/dist/wa-sqlite-async.mjs';\nimport SQLite from 'wa-sqlite';\nconst sqliteModule = await SQLiteESMFactory();\nconst sqlite3 = SQLite.Factory(module);\n\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n storage: getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsWasm(sqlite3)\n })\n});\n"})}),"\n",(0,s.jsxs)(t.h2,{id:"usage-with-react-native",children:["Usage with ",(0,s.jsx)(t.strong,{children:"React Native"})]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["Install the ",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/react-native-quick-sqlite",children:"react-native-quick-sqlite npm module"})]}),"\n",(0,s.jsxs)(t.li,{children:["Import ",(0,s.jsx)(t.code,{children:"getSQLiteBasicsQuickSQLite"})," from the SQLite plugin and use it to create a ",(0,s.jsx)(t.a,{href:"/rx-database.html",children:"RxDatabase"}),":"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n createRxDatabase\n} from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsQuickSQLite\n} from 'rxdb-premium/plugins/storage-sqlite';\nimport { open } from 'react-native-quick-sqlite';\n\n// create database\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n multiInstance: false, // <- Set multiInstance to false when using RxDB in React Native\n storage: getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsQuickSQLite(open)\n })\n});\n"})}),"\n",(0,s.jsxs)(t.p,{children:["If ",(0,s.jsx)(t.code,{children:"react-native-quick-sqlite"})," does not work for you, as alternative you can use the ",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/react-native-sqlite-2",children:"react-native-sqlite-2"})," library instead:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n getRxStorageSQLite,\n getSQLiteBasicsWebSQL\n} from 'rxdb-premium/plugins/storage-sqlite';\nimport SQLite from 'react-native-sqlite-2';\nconst storage = getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsWebSQL(SQLite.openDatabase)\n});\n"})}),"\n",(0,s.jsxs)(t.h2,{id:"usage-with-sqlite-capacitor",children:["Usage with ",(0,s.jsx)(t.strong,{children:"SQLite Capacitor"})]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["Install the ",(0,s.jsx)(t.a,{href:"https://github.com/capacitor-community/sqlite",children:"sqlite capacitor npm module"})]}),"\n",(0,s.jsx)(t.li,{children:"Add the iOS database location to your capacitor config"}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'{\n "plugins": {\n "CapacitorSQLite": {\n "iosDatabaseLocation": "Library/CapacitorDatabase"\n }\n }\n}\n'})}),"\n",(0,s.jsxs)(t.ol,{start:"3",children:["\n",(0,s.jsxs)(t.li,{children:["Use the function ",(0,s.jsx)(t.code,{children:"getSQLiteBasicsCapacitor"})," to get the capacitor sqlite wrapper."]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n createRxDatabase\n} from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsCapacitor\n} from 'rxdb-premium/plugins/storage-sqlite';\n\n/**\n * Import SQLite from the capacitor plugin.\n */\nimport {\n CapacitorSQLite,\n SQLiteConnection\n} from '@capacitor-community/sqlite';\nimport { Capacitor } from '@capacitor/core';\n\nconst sqlite = new SQLiteConnection(CapacitorSQLite);\n\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n storage: getRxStorageSQLite({\n /**\n * Different runtimes have different interfaces to SQLite.\n * For example in node.js we have a callback API,\n * while in capacitor sqlite we have Promises.\n * So we need a helper object that is capable of doing the basic\n * sqlite operations.\n */\n sqliteBasics: getSQLiteBasicsCapacitor(sqlite, Capacitor)\n })\n});\n"})}),"\n",(0,s.jsxs)(t.h2,{id:"usage-with-expo-sqlite",children:["Usage with ",(0,s.jsx)(t.strong,{children:"Expo SQLite"})]}),"\n",(0,s.jsxs)(t.p,{children:["Notice that ",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/expo-sqlite",children:"expo-sqlite"})," cannot be used on android (but it works on iOS) if you use Expo SDK version 50 or older. Please update to Version 50 or newer to use it."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n createRxDatabase\n} from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsExpoSQLite\n} from 'rxdb-premium/plugins/storage-sqlite';\nimport { openDatabase } from 'expo-sqlite';\n\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n storage: getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsExpoSQLite(openDatabase)\n })\n});\n"})}),"\n",(0,s.jsx)(t.h2,{id:"database-connection",children:"Database Connection"}),"\n",(0,s.jsxs)(t.p,{children:["If you need to access the database connection for any reason you can use ",(0,s.jsx)(t.code,{children:"getDatabaseConnection"})," to do so:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import { getDatabaseConnection } from 'rxdb-premium/plugins/storage-sqlite'\n"})}),"\n",(0,s.jsx)(t.p,{children:"It has the following signature:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"getDatabaseConnection(\n sqliteBasics: SQLiteBasics,\n databaseName: string\n): Promise;\n"})}),"\n",(0,s.jsx)(t.h2,{id:"known-problems-of-sqlite-in-javascript-apps",children:"Known Problems of SQLite in JavaScript apps"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Some JavaScript runtimes do not contain a ",(0,s.jsx)(t.code,{children:"Buffer"})," API which is used by SQLite to store binary attachments data as ",(0,s.jsx)(t.code,{children:"BLOB"}),". You can set ",(0,s.jsx)(t.code,{children:"storeAttachmentsAsBase64String: true"})," if you want to store the attachments data as base64 string instead. This increases the database size but makes it work even without having a ",(0,s.jsx)(t.code,{children:"Buffer"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["The SQlite RxStorage works on SQLite libraries that use SQLite in version ",(0,s.jsx)(t.code,{children:"3.38.0 (2022-02-22)"})," or newer, because it uses the ",(0,s.jsx)(t.a,{href:"https://www.sqlite.org/json1.html",children:"SQLite JSON"})," methods like ",(0,s.jsx)(t.code,{children:"JSON_EXTRACT"}),". If you get an error like ",(0,s.jsx)(t.code,{children:"[Error: no such function: JSON_EXTRACT (code 1 SQLITE_ERROR[1])"}),", you might have a too old version of SQLite."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["To debug all SQL operations, you can pass a log function to ",(0,s.jsx)(t.code,{children:"getRxStorageSQLite()"})," like this:"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"const storage = getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsCapacitor(sqlite, Capacitor),\n // pass log function\n log: console.log.bind(console)\n});\n"})}),"\n",(0,s.jsx)(t.h2,{id:"related",children:"Related"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/react-native-database.html",children:"React Native Databases"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,a)=>{a.d(t,{R:()=>r,x:()=>o});var s=a(6540);const i={},n=s.createContext(i);function r(e){const t=s.useContext(n);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrxdb=self.webpackChunkrxdb||[]).push([[1199],{1787:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var s=a(4848),n=a(8453);const i={title:"SQLite RxStorage \ud83d\udc51",slug:"rx-storage-sqlite.html"},r="SQLite RxStorage",o={id:"rx-storage-sqlite",title:"SQLite RxStorage \ud83d\udc51",description:"This RxStorage is based on SQLite and is made to work with Node.js, Electron, React Native and Capacitor or SQLite via webassembly in the browser. It can be used with different so called sqliteBasics adapters to account for the differences in the various SQLite bundles and libraries that exist.",source:"@site/docs/rx-storage-sqlite.md",sourceDirName:".",slug:"/rx-storage-sqlite.html",permalink:"/rx-storage-sqlite.html",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"SQLite RxStorage \ud83d\udc51",slug:"rx-storage-sqlite.html"},sidebar:"tutorialSidebar",previous:{title:"IndexedDB RxStorage \ud83d\udc51",permalink:"/rx-storage-indexeddb.html"},next:{title:"Memory RxStorage",permalink:"/rx-storage-memory.html"}},c={},l=[{value:"Performance comparison with other storages",id:"performance-comparison-with-other-storages",level:2},{value:"Using the SQLite RxStorage",id:"using-the-sqlite-rxstorage",level:2},{value:"Usage with the sqlite3 npm package",id:"usage-with-the-sqlite3-npm-package",level:2},{value:"Usage with the node package",id:"usage-with-the-node-package",level:2},{value:"Usage with Webassembly in the Browser",id:"usage-with-webassembly-in-the-browser",level:2},{value:"Usage with React Native",id:"usage-with-react-native",level:2},{value:"Usage with Expo SQLite",id:"usage-with-expo-sqlite",level:2},{value:"Usage with SQLite Capacitor",id:"usage-with-sqlite-capacitor",level:2},{value:"Database Connection",id:"database-connection",level:2},{value:"Known Problems of SQLite in JavaScript apps",id:"known-problems-of-sqlite-in-javascript-apps",level:2},{value:"Related",id:"related",level:2}];function d(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h1,{id:"sqlite-rxstorage",children:"SQLite RxStorage"}),"\n",(0,s.jsxs)(t.p,{children:["This ",(0,s.jsx)(t.a,{href:"/rx-storage.html",children:"RxStorage"})," is based on ",(0,s.jsx)(t.a,{href:"https://www.sqlite.org/index.html",children:"SQLite"})," and is made to work with ",(0,s.jsx)(t.strong,{children:"Node.js"}),", ",(0,s.jsx)(t.a,{href:"/electron-database.html",children:"Electron"}),", ",(0,s.jsx)(t.a,{href:"/react-native-database.html",children:"React Native"})," and ",(0,s.jsx)(t.a,{href:"/capacitor-database.html",children:"Capacitor"})," or SQLite via webassembly in the browser. It can be used with different so called ",(0,s.jsx)(t.code,{children:"sqliteBasics"})," adapters to account for the differences in the various SQLite bundles and libraries that exist."]}),"\n",(0,s.jsx)(t.h2,{id:"performance-comparison-with-other-storages",children:"Performance comparison with other storages"}),"\n",(0,s.jsxs)(t.p,{children:["The SQLite storage is a bit slower compared to other Node.js based storages like the ",(0,s.jsx)(t.a,{href:"/rx-storage-filesystem-node.html",children:"Filesystem Storage"})," because wrapping SQLite has a bit of overhead and sending data from the JavaScript process to SQLite and backwards increases the latency. However for most hybrid apps the SQLite storage is the best option because it can leverage the SQLite version that comes already installed on the smartphones OS (iOS and android). Also for desktop electron apps it can be a viable solution because it is easy to ship SQLite together inside of the electron bundle."]}),"\n",(0,s.jsx)("p",{align:"center",children:(0,s.jsx)("img",{src:"./files/rx-storage-performance-node.png",alt:"SQLite performance - Node.js",width:"700"})}),"\n",(0,s.jsx)(t.h2,{id:"using-the-sqlite-rxstorage",children:"Using the SQLite RxStorage"}),"\n",(0,s.jsxs)(t.p,{children:["To use the SQLite storage you have to import ",(0,s.jsx)(t.code,{children:"getRxStorageSQLite"})," from the ",(0,s.jsx)(t.a,{href:"/premium",children:"RxDB Premium \ud83d\udc51"})," package and then add the correct ",(0,s.jsx)(t.code,{children:"sqliteBasics"})," adapter depending on which sqlite module you want to use. This can then be used as storage when creating the ",(0,s.jsx)(t.a,{href:"/rx-database.html",children:"RxDatabase"}),". In the following you can see some examples for some of the most common SQLite packages."]}),"\n",(0,s.jsxs)(t.h2,{id:"usage-with-the-sqlite3-npm-package",children:["Usage with the ",(0,s.jsx)(t.strong,{children:"sqlite3 npm package"})]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n createRxDatabase\n} from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsNode\n} from 'rxdb-premium/plugins/storage-sqlite';\n\n/**\n * In Node.js, we use the SQLite database\n * from the 'sqlite' npm module.\n * @link https://www.npmjs.com/package/sqlite3\n */\nimport sqlite3 from 'sqlite3';\n\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n storage: getRxStorageSQLite({\n /**\n * Different runtimes have different interfaces to SQLite.\n * For example in node.js we have a callback API,\n * while in capacitor sqlite we have Promises.\n * So we need a helper object that is capable of doing the basic\n * sqlite operations.\n */\n sqliteBasics: getSQLiteBasicsNode(sqlite3)\n })\n});\n"})}),"\n",(0,s.jsxs)(t.h2,{id:"usage-with-the-node-package",children:["Usage with the ",(0,s.jsxs)(t.strong,{children:["node",":sqlite"]})," package"]}),"\n",(0,s.jsxs)(t.p,{children:['With Node.js version 22 and newer, you can use the "native" ',(0,s.jsx)(t.a,{href:"https://nodejs.org/api/sqlite.html",children:"sqlite module"})," that comes shipped with Node.js."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import { createRxDatabase } from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsNodeNative\n} from 'rxdb-premium/plugins/storage-sqlite';\nimport sqlite from 'node:sqlite';\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n storage: getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsNodeNative(sqlite.DatabaseSync)\n })\n});\n"})}),"\n",(0,s.jsx)(t.h2,{id:"usage-with-webassembly-in-the-browser",children:"Usage with Webassembly in the Browser"}),"\n",(0,s.jsxs)(t.p,{children:["In the browser you can use the ",(0,s.jsx)(t.a,{href:"https://github.com/rhashimoto/wa-sqlite",children:"wa-sqlite"})," package to run sQLite in Webassembly. The wa-sqlite module also allows to use persistence with IndexedDB or OPFS. Notice that in general SQLite via Webassembly is slower compared to other storages like ",(0,s.jsx)(t.a,{href:"/rx-storage-indexeddb.html",children:"IndexedDB"})," or ",(0,s.jsx)(t.a,{href:"/rx-storage-opfs.html",children:"OPFS"})," because sending data from the main thread to wasm and backwards is slow in the browser. Have a look the ",(0,s.jsx)(t.a,{href:"/rx-storage-performance.html",children:"performance comparison"}),"."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n createRxDatabase\n} from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsWasm\n} from 'rxdb-premium/plugins/storage-sqlite';\n\n/**\n * In the Browser, we use the SQLite database\n * from the 'wa-sqlite' npm module. This contains the SQLite library\n * compiled to Webassembly\n * @link https://www.npmjs.com/package/wa-sqlite\n */\nimport SQLiteESMFactory from 'wa-sqlite/dist/wa-sqlite-async.mjs';\nimport SQLite from 'wa-sqlite';\nconst sqliteModule = await SQLiteESMFactory();\nconst sqlite3 = SQLite.Factory(module);\n\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n storage: getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsWasm(sqlite3)\n })\n});\n"})}),"\n",(0,s.jsxs)(t.h2,{id:"usage-with-react-native",children:["Usage with ",(0,s.jsx)(t.strong,{children:"React Native"})]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["Install the ",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/react-native-quick-sqlite",children:"react-native-quick-sqlite npm module"})]}),"\n",(0,s.jsxs)(t.li,{children:["Import ",(0,s.jsx)(t.code,{children:"getSQLiteBasicsQuickSQLite"})," from the SQLite plugin and use it to create a ",(0,s.jsx)(t.a,{href:"/rx-database.html",children:"RxDatabase"}),":"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n createRxDatabase\n} from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsQuickSQLite\n} from 'rxdb-premium/plugins/storage-sqlite';\nimport { open } from 'react-native-quick-sqlite';\n\n// create database\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n multiInstance: false, // <- Set multiInstance to false when using RxDB in React Native\n storage: getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsQuickSQLite(open)\n })\n});\n"})}),"\n",(0,s.jsxs)(t.p,{children:["If ",(0,s.jsx)(t.code,{children:"react-native-quick-sqlite"})," does not work for you, as alternative you can use the ",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/react-native-sqlite-2",children:"react-native-sqlite-2"})," library instead:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n getRxStorageSQLite,\n getSQLiteBasicsWebSQL\n} from 'rxdb-premium/plugins/storage-sqlite';\nimport SQLite from 'react-native-sqlite-2';\nconst storage = getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsWebSQL(SQLite.openDatabase)\n});\n"})}),"\n",(0,s.jsxs)(t.h2,{id:"usage-with-expo-sqlite",children:["Usage with ",(0,s.jsx)(t.strong,{children:"Expo SQLite"})]}),"\n",(0,s.jsxs)(t.p,{children:["Notice that ",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/expo-sqlite",children:"expo-sqlite"})," cannot be used on android (but it works on iOS) if you use Expo SDK version 50 or older. Please update to Version 50 or newer to use it."]}),"\n",(0,s.jsxs)(t.p,{children:["In the latest expo SDK version, use the ",(0,s.jsx)(t.code,{children:"getSQLiteBasicsExpoSQLiteAsync()"})," method:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n createRxDatabase\n} from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsExpoSQLiteAsync\n} from 'rxdb-premium/plugins/storage-sqlite';\nimport * as SQLite from 'expo-sqlite';\n\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n multiInstance: false,\n storage: getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsExpoSQLiteAsync(SQLite.openDatabaseAsync)\n })\n});\n"})}),"\n",(0,s.jsx)(t.p,{children:"In older Expo SDK versions, you might have to use the non-async API:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n createRxDatabase\n} from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsExpoSQLite\n} from 'rxdb-premium/plugins/storage-sqlite';\nimport { openDatabase } from 'expo-sqlite';\n\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n multiInstance: false,\n storage: getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsExpoSQLite(openDatabase)\n })\n});\n"})}),"\n",(0,s.jsxs)(t.h2,{id:"usage-with-sqlite-capacitor",children:["Usage with ",(0,s.jsx)(t.strong,{children:"SQLite Capacitor"})]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["Install the ",(0,s.jsx)(t.a,{href:"https://github.com/capacitor-community/sqlite",children:"sqlite capacitor npm module"})]}),"\n",(0,s.jsx)(t.li,{children:"Add the iOS database location to your capacitor config"}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'{\n "plugins": {\n "CapacitorSQLite": {\n "iosDatabaseLocation": "Library/CapacitorDatabase"\n }\n }\n}\n'})}),"\n",(0,s.jsxs)(t.ol,{start:"3",children:["\n",(0,s.jsxs)(t.li,{children:["Use the function ",(0,s.jsx)(t.code,{children:"getSQLiteBasicsCapacitor"})," to get the capacitor sqlite wrapper."]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import {\n createRxDatabase\n} from 'rxdb';\nimport {\n getRxStorageSQLite,\n getSQLiteBasicsCapacitor\n} from 'rxdb-premium/plugins/storage-sqlite';\n\n/**\n * Import SQLite from the capacitor plugin.\n */\nimport {\n CapacitorSQLite,\n SQLiteConnection\n} from '@capacitor-community/sqlite';\nimport { Capacitor } from '@capacitor/core';\n\nconst sqlite = new SQLiteConnection(CapacitorSQLite);\n\nconst myRxDatabase = await createRxDatabase({\n name: 'exampledb',\n storage: getRxStorageSQLite({\n /**\n * Different runtimes have different interfaces to SQLite.\n * For example in node.js we have a callback API,\n * while in capacitor sqlite we have Promises.\n * So we need a helper object that is capable of doing the basic\n * sqlite operations.\n */\n sqliteBasics: getSQLiteBasicsCapacitor(sqlite, Capacitor)\n })\n});\n"})}),"\n",(0,s.jsx)(t.h2,{id:"database-connection",children:"Database Connection"}),"\n",(0,s.jsxs)(t.p,{children:["If you need to access the database connection for any reason you can use ",(0,s.jsx)(t.code,{children:"getDatabaseConnection"})," to do so:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"import { getDatabaseConnection } from 'rxdb-premium/plugins/storage-sqlite'\n"})}),"\n",(0,s.jsx)(t.p,{children:"It has the following signature:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"getDatabaseConnection(\n sqliteBasics: SQLiteBasics,\n databaseName: string\n): Promise;\n"})}),"\n",(0,s.jsx)(t.h2,{id:"known-problems-of-sqlite-in-javascript-apps",children:"Known Problems of SQLite in JavaScript apps"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Some JavaScript runtimes do not contain a ",(0,s.jsx)(t.code,{children:"Buffer"})," API which is used by SQLite to store binary attachments data as ",(0,s.jsx)(t.code,{children:"BLOB"}),". You can set ",(0,s.jsx)(t.code,{children:"storeAttachmentsAsBase64String: true"})," if you want to store the attachments data as base64 string instead. This increases the database size but makes it work even without having a ",(0,s.jsx)(t.code,{children:"Buffer"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["The SQlite RxStorage works on SQLite libraries that use SQLite in version ",(0,s.jsx)(t.code,{children:"3.38.0 (2022-02-22)"})," or newer, because it uses the ",(0,s.jsx)(t.a,{href:"https://www.sqlite.org/json1.html",children:"SQLite JSON"})," methods like ",(0,s.jsx)(t.code,{children:"JSON_EXTRACT"}),". If you get an error like ",(0,s.jsx)(t.code,{children:"[Error: no such function: JSON_EXTRACT (code 1 SQLITE_ERROR[1])"}),", you might have a too old version of SQLite."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["To debug all SQL operations, you can pass a log function to ",(0,s.jsx)(t.code,{children:"getRxStorageSQLite()"})," like this:"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-ts",children:"const storage = getRxStorageSQLite({\n sqliteBasics: getSQLiteBasicsCapacitor(sqlite, Capacitor),\n // pass log function\n log: console.log.bind(console)\n});\n"})}),"\n",(0,s.jsx)(t.h2,{id:"related",children:"Related"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/react-native-database.html",children:"React Native Databases"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,a)=>{a.d(t,{R:()=>r,x:()=>o});var s=a(6540);const n={},i=s.createContext(n);function r(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/docs/assets/js/main.8f92ff68.js b/docs/assets/js/main.71a97e64.js similarity index 99% rename from docs/assets/js/main.8f92ff68.js rename to docs/assets/js/main.71a97e64.js index aa3a9211408..989d11428e7 100644 --- a/docs/assets/js/main.8f92ff68.js +++ b/docs/assets/js/main.71a97e64.js @@ -1,2 +1,2 @@ -/*! For license information please see main.8f92ff68.js.LICENSE.txt */ -(self.webpackChunkrxdb=self.webpackChunkrxdb||[]).push([[8792],{8328:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});n(6540);var r=n(3259),a=n.n(r),o=n(4054);const i={"0027230a":[()=>n.e(8382).then(n.bind(n,2081)),"@site/docs/rx-storage-lokijs.md",2081],"01684a0a":[()=>n.e(6616).then(n.bind(n,3395)),"@site/docs/rx-storage-memory-synced.md",3395],"03e37916":[()=>n.e(6465).then(n.bind(n,3184)),"@site/docs/transactions-conflicts-revisions.md",3184],"045bd6f5":[()=>n.e(4475).then(n.bind(n,8201)),"@site/docs/encryption.md",8201],"04b0214f":[()=>n.e(6264).then(n.t.bind(n,4061,19)),"/home/runner/work/rxdb/rxdb/docs-src/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",4061],"0b761dc7":[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(2835)]).then(n.bind(n,2796)),"@site/src/pages/sem/localstorage-database.tsx",2796],"0e268d20":[()=>Promise.all([n.e(8316),n.e(6744),n.e(6902),n.e(2584)]).then(n.bind(n,1980)),"@site/src/pages/premium.tsx",1980],"0e467ee2":[()=>n.e(4989).then(n.bind(n,5008)),"@site/docs/articles/ideas.md",5008],"0e945c41":[()=>n.e(9796).then(n.bind(n,9722)),"@site/docs/replication-server.md",9722],"0f6e10f0":[()=>n.e(1475).then(n.bind(n,654)),"@site/docs/articles/progressive-web-app-database.md",654],"118cde4c":[()=>n.e(5272).then(n.bind(n,7245)),"@site/docs/replication-couchdb.md",7245],"13dc6548":[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(3483)]).then(n.bind(n,4637)),"@site/src/pages/sem/indexeddb-database.tsx",4637],"14d72841":[()=>n.e(9772).then(n.bind(n,5221)),"@site/src/pages/newsletter.tsx",5221],17896441:[()=>Promise.all([n.e(1869),n.e(1968),n.e(8401)]).then(n.bind(n,242)),"@theme/DocItem",242],"187b985e":[()=>n.e(6866).then(n.bind(n,844)),"@site/docs/replication-webrtc.md",844],"1b0f8c91":[()=>n.e(3129).then(n.bind(n,9642)),"@site/docs/backup.md",9642],"1b238727":[()=>n.e(4013).then(n.bind(n,3721)),"@site/docs/rx-storage-performance.md",3721],"1b5fa8ad":[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(9111)]).then(n.bind(n,5347)),"@site/src/pages/sem/nedb-alternative.tsx",5347],"1c0701dd":[()=>n.e(6953).then(n.bind(n,668)),"@site/docs/middleware.md",668],"1da545ff":[()=>n.e(9743).then(n.bind(n,2678)),"@site/docs/releases/9.0.0.md",2678],"1df93b7f":[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(4583)]).then(n.bind(n,3516)),"@site/src/pages/index.tsx",3516],"1e0353aa":[()=>n.e(8588).then(n.bind(n,142)),"@site/docs/rx-storage.md",142],"1f391b9e":[()=>Promise.all([n.e(1869),n.e(1968),n.e(6061)]).then(n.bind(n,7973)),"@theme/MDXPage",7973],"21fa2740":[()=>n.e(5694).then(n.bind(n,763)),"@site/docs/releases/15.0.0.md",763],"2456d5e0":[()=>n.e(2966).then(n.bind(n,5654)),"@site/docs/rx-database.md",5654],"25626d15":[()=>n.e(268).then(n.bind(n,7258)),"@site/src/pages/chat.tsx",7258],"2564bf4f":[()=>n.e(6724).then(n.bind(n,5705)),"@site/docs/rxdb-tradeoffs.md",5705],"25a43fd4":[()=>n.e(4812).then(n.bind(n,3917)),"@site/docs/rx-storage-shared-worker.md",3917],"26b8a621":[()=>n.e(2055).then(n.bind(n,3439)),"@site/docs/replication-p2p.md",3439],"280a2389":[()=>n.e(176).then(n.bind(n,8141)),"@site/src/pages/meeting.tsx",8141],"294ac9d5":[()=>n.e(8744).then(n.bind(n,958)),"@site/docs/plugins.md",958],"2efd0200":[()=>n.e(4132).then(n.bind(n,9839)),"@site/docs/tutorials/typescript.md",9839],"2fe9ecb2":[()=>n.e(5101).then(n.bind(n,581)),"@site/docs/articles/localstorage-indexeddb-cookies-opfs-sqlite-wasm.md",581],"32667c41":[()=>n.e(8191).then(n.bind(n,6895)),"@site/docs/nosql-performance-tips.md",6895],"326aca46":[()=>n.e(4853).then(n.bind(n,3142)),"@site/docs/offline-first.md",3142],"34f94d1b":[()=>n.e(5832).then(n.bind(n,7746)),"@site/docs/electron-database.md",7746],36715375:[()=>n.e(2076).then(n.bind(n,2323)),"@site/src/pages/code.tsx",2323],"380cc66a":[()=>n.e(2061).then(n.bind(n,5668)),"@site/docs/rx-storage-dexie.md",5668],"38a45a95":[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(405)]).then(n.bind(n,4806)),"@site/src/pages/sem/electron-database.tsx",4806],"38bbf12a":[()=>n.e(2078).then(n.bind(n,3762)),"@site/docs/articles/data-base.md",3762],"393be207":[()=>n.e(4134).then(n.bind(n,6602)),"@site/src/pages/markdown-page.md",6602],"39600c95":[()=>n.e(3148).then(n.bind(n,755)),"@site/docs/rx-query.md",755],"401008a8":[()=>n.e(5219).then(n.bind(n,6805)),"@site/docs/nodejs-database.md",6805],"41f941a1":[()=>n.e(5966).then(n.bind(n,3057)),"@site/docs/leader-election.md",3057],"432b83f9":[()=>n.e(4424).then(n.bind(n,9429)),"@site/docs/releases/8.0.0.md",9429],"4616b86a":[()=>n.e(465).then(n.bind(n,81)),"@site/docs/rx-storage-mongodb.md",81],"4777fd9a":[()=>n.e(6386).then(n.bind(n,1600)),"@site/docs/alternatives.md",1600],"4adf80bb":[()=>n.e(9548).then(n.bind(n,4442)),"@site/docs/rx-storage-pouchdb.md",4442],"4af60d2e":[()=>n.e(8545).then(n.bind(n,9249)),"@site/docs/articles/realtime-database.md",9249],"4ba7e5a3":[()=>n.e(9591).then(n.bind(n,8848)),"@site/docs/contribute.md",8848],"4ed9495b":[()=>n.e(1199).then(n.bind(n,1787)),"@site/docs/rx-storage-sqlite.md",1787],"4f17bbdd":[()=>n.e(2373).then(n.bind(n,1206)),"@site/src/pages/meeting-paid.tsx",1206],"502d8946":[()=>n.e(7817).then(n.bind(n,732)),"@site/src/pages/legal-notice.tsx",732],"51014a8a":[()=>n.e(9460).then(n.bind(n,262)),"@site/docs/articles/websockets-sse-polling-webrtc-webtransport.md",262],51038524:[()=>n.e(4889).then(n.bind(n,9262)),"@site/docs/rx-storage-memory-mapped.md",9262],51334108:[()=>n.e(8926).then(n.bind(n,2644)),"@site/docs/articles/mobile-database.md",2644],"55a5b596":[()=>n.e(6717).then(n.bind(n,5536)),"@site/docs/rx-schema.md",5536],"5a273530":[()=>n.e(3881).then(n.bind(n,7589)),"@site/docs/rx-storage-remote.md",7589],"5e95c892":[()=>n.e(9647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"60c23941":[()=>n.e(2915).then(n.t.bind(n,1966,19)),"/home/runner/work/rxdb/rxdb/docs-src/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",1966],"6187b59a":[()=>n.e(5866).then(n.bind(n,7409)),"@site/docs/rx-storage-worker.md",7409],"68a466be":[()=>n.e(3997).then(n.bind(n,3923)),"@site/docs/downsides-of-offline-first.md",3923],"6ae3580c":[()=>n.e(5320).then(n.bind(n,5376)),"@site/docs/replication.md",5376],"6bfb0089":[()=>n.e(6422).then(n.bind(n,300)),"@site/docs/adapters.md",300],"6cbff7c2":[()=>n.e(7408).then(n.bind(n,5943)),"@site/docs/rx-storage-opfs.md",5943],"6fa8aa1a":[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(1264)]).then(n.bind(n,5379)),"@site/src/pages/sem/pouchdb-alternative.tsx",5379],"6fd28feb":[()=>n.e(4618).then(n.bind(n,9408)),"@site/docs/rx-storage-foundationdb.md",9408],"714575d7":[()=>n.e(3185).then(n.bind(n,4880)),"@site/docs/rx-local-document.md",4880],"77d975e6":[()=>n.e(3949).then(n.bind(n,5707)),"@site/docs/articles/in-memory-nosql-database.md",5707],"7815dd0c":[()=>n.e(5335).then(n.bind(n,5515)),"@site/docs/population.md",5515],"7bbb96fd":[()=>n.e(3495).then(n.bind(n,8435)),"@site/src/pages/service-submitted.tsx",8435],"7f02c700":[()=>n.e(9592).then(n.bind(n,9640)),"@site/docs/replication-firestore.md",9640],"8070e160":[()=>n.e(3822).then(n.bind(n,1685)),"@site/docs/quickstart.md",1685],"8288c265":[()=>n.e(9881).then(n.bind(n,1839)),"@site/docs/releases/11.0.0.md",1839],"84a3af36":[()=>n.e(6861).then(n.bind(n,8160)),"@site/docs/articles/json-database.md",8160],"84ae55a4":[()=>n.e(588).then(n.bind(n,2045)),"@site/docs/replication-nats.md",2045],"86b4e356":[()=>n.e(2786).then(n.bind(n,9278)),"@site/docs/orm.md",9278],"8a22f3a9":[()=>n.e(9257).then(n.bind(n,6224)),"@site/docs/errors.md",6224],"8a442806":[()=>n.e(1054).then(n.bind(n,2019)),"@site/docs/fulltext-search.md",2019],"8aa53ed7":[()=>n.e(6723).then(n.bind(n,5870)),"@site/docs/articles/angular-database.md",5870],"8b0a0922":[()=>n.e(4557).then(n.bind(n,767)),"@site/docs/slow-indexeddb.md",767],"8b4bf532":[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(4027)]).then(n.bind(n,7507)),"@site/src/pages/sem/nosql-database.tsx",7507],"8bc07e20":[()=>n.e(1850).then(n.bind(n,5054)),"@site/docs/capacitor-database.md",5054],"8bc82b1f":[()=>n.e(9997).then(n.bind(n,8661)),"@site/docs/rx-pipeline.md",8661],"90102fdf":[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(2633)]).then(n.bind(n,9935)),"@site/src/pages/sem/nodejs-database.tsx",9935],"91b454ee":[()=>n.e(4202).then(n.bind(n,9107)),"@site/docs/rx-storage-sharding.md",9107],"924d6dd6":[()=>n.e(5122).then(n.bind(n,2414)),"@site/docs/electron.md",2414],"92698a99":[()=>n.e(4166).then(n.bind(n,8568)),"@site/docs/rx-storage-indexeddb.md",8568],"931f4566":[()=>n.e(3595).then(n.bind(n,2439)),"@site/docs/schema-validation.md",2439],"935f2afb":[()=>n.e(8581).then(n.t.bind(n,5610,19)),"~docs/default/version-current-metadata-prop-751.json",5610],98405524:[()=>n.e(5504).then(n.bind(n,1934)),"@site/src/pages/survey.tsx",1934],"9dae6e71":[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(3325)]).then(n.bind(n,2231)),"@site/src/pages/sem/firestore-alternative.tsx",2231],"9dd8ea89":[()=>n.e(1715).then(n.bind(n,7919)),"@site/docs/logger.md",7919],"9e91b6f0":[()=>n.e(3021).then(n.bind(n,1844)),"@site/docs/why-nosql.md",1844],a406dc27:[()=>n.e(1500).then(n.bind(n,8306)),"@site/docs/migration-storage.md",8306],a442adcd:[()=>n.e(8760).then(n.bind(n,188)),"@site/docs/reactivity.md",188],a574e172:[()=>n.e(7149).then(n.bind(n,9329)),"@site/docs/replication-http.md",9329],a69eebfc:[()=>n.e(9408).then(n.bind(n,4120)),"@site/docs/query-optimizer.md",4120],a7bd4aaa:[()=>n.e(7098).then(n.bind(n,4532)),"@theme/DocVersionRoot",4532],a7f10198:[()=>n.e(1098).then(n.bind(n,769)),"@site/docs/data-migration.md",769],a94703ab:[()=>Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,2559)),"@theme/DocRoot",2559],aa14e6b1:[()=>n.e(9824).then(n.bind(n,3268)),"@site/docs/replication-graphql.md",3268],ab919a1f:[()=>n.e(6491).then(n.bind(n,4760)),"@site/docs/articles/embedded-database.md",4760],ac62b32d:[()=>n.e(9192).then(n.bind(n,9585)),"@site/docs/replication-websocket.md",9585],ad16b3ea:[()=>n.e(8674).then(n.bind(n,2462)),"@site/docs/dev-mode.md",2462],b0889a22:[()=>n.e(1107).then(n.bind(n,1798)),"@site/docs/cleanup.md",1798],b30f4f1f:[()=>n.e(3779).then(n.bind(n,3449)),"@site/docs/rx-attachment.md",3449],b672caf7:[()=>n.e(813).then(n.bind(n,4107)),"@site/docs/articles/javascript-vector-database.md",4107],b8c49ce4:[()=>n.e(6355).then(n.bind(n,1605)),"@site/docs/releases/13.0.0.md",1605],badcd764:[()=>n.e(8318).then(n.bind(n,6042)),"@site/docs/articles/flutter-database.md",6042],bdd39edd:[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(5852)]).then(n.bind(n,3922)),"@site/src/pages/sem/browser-database.tsx",3922],c3bc9c50:[()=>n.e(9167).then(n.bind(n,4337)),"@site/docs/articles/react-database.md",4337],c44853e1:[()=>n.e(6584).then(n.bind(n,7390)),"@site/docs/rx-state.md",7390],c4de80f8:[()=>n.e(2777).then(n.bind(n,3554)),"@site/docs/install.md",3554],c6349bb6:[()=>n.e(5740).then(n.bind(n,2964)),"@site/docs/releases/14.0.0.md",2964],c6fdd490:[()=>n.e(4141).then(n.bind(n,2627)),"@site/docs/rx-server-scaling.md",2627],c843a053:[()=>n.e(9146).then(n.bind(n,8723)),"@site/docs/third-party-plugins.md",8723],c9c8e0b6:[()=>n.e(7249).then(n.bind(n,7674)),"@site/docs/articles/ionic-database.md",7674],cbbe8f0a:[()=>n.e(3852).then(n.bind(n,8783)),"@site/docs/rx-collection.md",8783],cde77f4f:[()=>Promise.all([n.e(8316),n.e(6744),n.e(6902),n.e(6287)]).then(n.bind(n,6465)),"@site/src/pages/premium-submitted.tsx",6465],d20e74b4:[()=>n.e(5123).then(n.bind(n,2853)),"@site/docs/crdt.md",2853],d2758528:[()=>n.e(2586).then(n.bind(n,7108)),"@site/docs/articles/browser-storage.md",7108],d4da9db3:[()=>n.e(1400).then(n.bind(n,4228)),"@site/docs/rx-storage-memory.md",4228],d622bd51:[()=>n.e(2845).then(n.bind(n,9804)),"@site/docs/migration-schema.md",9804],db34d6b0:[()=>n.e(7320).then(n.bind(n,9891)),"@site/src/pages/license.tsx",9891],dbde2ffe:[()=>n.e(6543).then(n.bind(n,118)),"@site/docs/rx-document.md",118],dc42ba65:[()=>n.e(4962).then(n.bind(n,4494)),"@site/docs/key-compression.md",4494],e24529eb:[()=>n.e(6797).then(n.bind(n,9263)),"@site/docs/rx-storage-localstorage-meta-optimizer.md",9263],e6b4453d:[()=>n.e(2360).then(n.bind(n,9133)),"@site/docs/query-cache.md",9133],e7478ff0:[()=>n.e(5416).then(n.bind(n,1873)),"@site/docs/questions-answers.md",1873],e8a836f3:[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(5265)]).then(n.bind(n,9349)),"@site/src/pages/sem/react-native-database.tsx",9349],eadd9b3c:[()=>n.e(4886).then(n.bind(n,8041)),"@site/docs/rx-storage-filesystem-node.md",8041],ebace26e:[()=>n.e(4028).then(n.bind(n,7016)),"@site/docs/releases/10.0.0.md",7016],ec526260:[()=>n.e(7396).then(n.bind(n,9592)),"@site/docs/articles/browser-database.md",9592],ed2d6610:[()=>n.e(3469).then(n.bind(n,9222)),"@site/docs/releases/12.0.0.md",9222],ee1b9f21:[()=>n.e(6998).then(n.bind(n,3179)),"@site/docs/react-native-database.md",3179],f15938da:[()=>n.e(4630).then(n.bind(n,5674)),"@site/docs/articles/localstorage.md",5674],f43e80a8:[()=>n.e(1558).then(n.bind(n,9544)),"@site/docs/rx-server.md",9544],f44bb875:[()=>n.e(561).then(n.bind(n,46)),"@site/docs/articles/frontend-database.md",46],fe2a63b2:[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(6744),n.e(5351),n.e(1018)]).then(n.bind(n,4324)),"@site/src/pages/consulting.tsx",4324],fe7a07ee:[()=>n.e(2085).then(n.bind(n,9378)),"@site/docs/rx-storage-denokv.md",9378],ff492cda:[()=>Promise.all([n.e(1869),n.e(8316),n.e(4589),n.e(9335),n.e(7722)]).then(n.bind(n,1382)),"@site/src/pages/sem/watermelondb-alternative.tsx",1382]};var s=n(4848);function l(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,s.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,s.jsx)("p",{children:String(t)}),(0,s.jsx)("div",{children:(0,s.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,s.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var c=n(6921),u=n(3102);function d(e,t){if("*"===e)return a()({loading:l,loader:()=>n.e(9293).then(n.bind(n,9293)),modules:["@theme/NotFound"],webpack:()=>[9293],render(e,t){const n=e.default;return(0,s.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,s.jsx)(n,{...t})})}});const r=o[`${e}-${t}`],d={},f=[],p=[],h=(0,c.A)(r);return Object.entries(h).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))})),a().Map({loading:l,loader:d,modules:f,webpack:()=>p,render(t,n){const a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const o=r.default;if(!o)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{o[e]=r[e]}));let i=a;const s=n.split(".");s.slice(0,-1).forEach((e=>{i=i[e]})),i[s[s.length-1]]=o}));const o=a.__comp;delete a.__comp;const i=a.__context;return delete a.__context,(0,s.jsx)(u.W,{value:i,children:(0,s.jsx)(o,{...a,...n})})}})}const f=[{path:"/chat",component:d("/chat","fd7"),exact:!0},{path:"/code",component:d("/code","8ef"),exact:!0},{path:"/consulting",component:d("/consulting","54c"),exact:!0},{path:"/legal-notice",component:d("/legal-notice","cfc"),exact:!0},{path:"/license",component:d("/license","d06"),exact:!0},{path:"/markdown-page",component:d("/markdown-page","784"),exact:!0},{path:"/meeting",component:d("/meeting","6b0"),exact:!0},{path:"/meeting-paid",component:d("/meeting-paid","e3c"),exact:!0},{path:"/newsletter",component:d("/newsletter","d15"),exact:!0},{path:"/premium",component:d("/premium","d94"),exact:!0},{path:"/premium-submitted",component:d("/premium-submitted","714"),exact:!0},{path:"/sem/browser-database",component:d("/sem/browser-database","0a3"),exact:!0},{path:"/sem/electron-database",component:d("/sem/electron-database","71a"),exact:!0},{path:"/sem/firestore-alternative",component:d("/sem/firestore-alternative","a47"),exact:!0},{path:"/sem/indexeddb-database",component:d("/sem/indexeddb-database","c87"),exact:!0},{path:"/sem/localstorage-database",component:d("/sem/localstorage-database","c8d"),exact:!0},{path:"/sem/nedb-alternative",component:d("/sem/nedb-alternative","201"),exact:!0},{path:"/sem/nodejs-database",component:d("/sem/nodejs-database","8f5"),exact:!0},{path:"/sem/nosql-database",component:d("/sem/nosql-database","09d"),exact:!0},{path:"/sem/pouchdb-alternative",component:d("/sem/pouchdb-alternative","6fe"),exact:!0},{path:"/sem/react-native-database",component:d("/sem/react-native-database","440"),exact:!0},{path:"/sem/watermelondb-alternative",component:d("/sem/watermelondb-alternative","06b"),exact:!0},{path:"/service-submitted",component:d("/service-submitted","368"),exact:!0},{path:"/survey",component:d("/survey","9e0"),exact:!0},{path:"/",component:d("/","d82"),exact:!0},{path:"/",component:d("/","9c2"),routes:[{path:"/",component:d("/","ad0"),routes:[{path:"/",component:d("/","6d2"),routes:[{path:"/adapters.html",component:d("/adapters.html","fb4"),exact:!0},{path:"/alternatives.html",component:d("/alternatives.html","d53"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/angular-database.html",component:d("/articles/angular-database.html","e30"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/browser-database.html",component:d("/articles/browser-database.html","b0a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/browser-storage.html",component:d("/articles/browser-storage.html","286"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/data-base.html",component:d("/articles/data-base.html","797"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/embedded-database.html",component:d("/articles/embedded-database.html","596"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/flutter-database.html",component:d("/articles/flutter-database.html","f8a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/frontend-database.html",component:d("/articles/frontend-database.html","a83"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/ideas",component:d("/articles/ideas","aec"),exact:!0},{path:"/articles/in-memory-nosql-database.html",component:d("/articles/in-memory-nosql-database.html","ead"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/ionic-database.html",component:d("/articles/ionic-database.html","df6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/javascript-vector-database.html",component:d("/articles/javascript-vector-database.html","68e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/json-database.html",component:d("/articles/json-database.html","bff"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/localstorage-indexeddb-cookies-opfs-sqlite-wasm.html",component:d("/articles/localstorage-indexeddb-cookies-opfs-sqlite-wasm.html","937"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/localstorage.html",component:d("/articles/localstorage.html","b1b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/mobile-database.html",component:d("/articles/mobile-database.html","1d7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/progressive-web-app-database.html",component:d("/articles/progressive-web-app-database.html","862"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/react-database.html",component:d("/articles/react-database.html","179"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/realtime-database.html",component:d("/articles/realtime-database.html","bc3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/articles/websockets-sse-polling-webrtc-webtransport.html",component:d("/articles/websockets-sse-polling-webrtc-webtransport.html","864"),exact:!0,sidebar:"tutorialSidebar"},{path:"/backup.html",component:d("/backup.html","123"),exact:!0,sidebar:"tutorialSidebar"},{path:"/capacitor-database.html",component:d("/capacitor-database.html","71f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/cleanup.html",component:d("/cleanup.html","d7f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/contribution.html",component:d("/contribution.html","129"),exact:!0,sidebar:"tutorialSidebar"},{path:"/crdt.html",component:d("/crdt.html","c69"),exact:!0,sidebar:"tutorialSidebar"},{path:"/data-migration",component:d("/data-migration","7c7"),exact:!0},{path:"/dev-mode.html",component:d("/dev-mode.html","11d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/downsides-of-offline-first.html",component:d("/downsides-of-offline-first.html","ba4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/electron-database.html",component:d("/electron-database.html","44e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/electron.html",component:d("/electron.html","693"),exact:!0,sidebar:"tutorialSidebar"},{path:"/encryption.html",component:d("/encryption.html","265"),exact:!0,sidebar:"tutorialSidebar"},{path:"/errors.html",component:d("/errors.html","07a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/fulltext-search.html",component:d("/fulltext-search.html","df8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/install.html",component:d("/install.html","9ec"),exact:!0,sidebar:"tutorialSidebar"},{path:"/key-compression.html",component:d("/key-compression.html","171"),exact:!0,sidebar:"tutorialSidebar"},{path:"/leader-election.html",component:d("/leader-election.html","9aa"),exact:!0,sidebar:"tutorialSidebar"},{path:"/logger.html",component:d("/logger.html","949"),exact:!0,sidebar:"tutorialSidebar"},{path:"/middleware.html",component:d("/middleware.html","34f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/migration-schema.html",component:d("/migration-schema.html","618"),exact:!0,sidebar:"tutorialSidebar"},{path:"/migration-storage.html",component:d("/migration-storage.html","34a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/nodejs-database.html",component:d("/nodejs-database.html","6a2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/nosql-performance-tips.html",component:d("/nosql-performance-tips.html","fd8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/offline-first.html",component:d("/offline-first.html","e1b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/orm.html",component:d("/orm.html","798"),exact:!0,sidebar:"tutorialSidebar"},{path:"/plugins.html",component:d("/plugins.html","f25"),exact:!0,sidebar:"tutorialSidebar"},{path:"/population.html",component:d("/population.html","b89"),exact:!0,sidebar:"tutorialSidebar"},{path:"/query-cache.html",component:d("/query-cache.html","45f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/query-optimizer.html",component:d("/query-optimizer.html","bd3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/questions-answers.html",component:d("/questions-answers.html","840"),exact:!0,sidebar:"tutorialSidebar"},{path:"/quickstart.html",component:d("/quickstart.html","417"),exact:!0,sidebar:"tutorialSidebar"},{path:"/react-native-database.html",component:d("/react-native-database.html","7b4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/reactivity.html",component:d("/reactivity.html","4d4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/releases/10.0.0.html",component:d("/releases/10.0.0.html","8ce"),exact:!0,sidebar:"tutorialSidebar"},{path:"/releases/11.0.0.html",component:d("/releases/11.0.0.html","712"),exact:!0,sidebar:"tutorialSidebar"},{path:"/releases/12.0.0.html",component:d("/releases/12.0.0.html","a36"),exact:!0,sidebar:"tutorialSidebar"},{path:"/releases/13.0.0.html",component:d("/releases/13.0.0.html","605"),exact:!0,sidebar:"tutorialSidebar"},{path:"/releases/14.0.0.html",component:d("/releases/14.0.0.html","14c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/releases/15.0.0.html",component:d("/releases/15.0.0.html","4dd"),exact:!0,sidebar:"tutorialSidebar"},{path:"/releases/8.0.0.html",component:d("/releases/8.0.0.html","fdc"),exact:!0,sidebar:"tutorialSidebar"},{path:"/releases/9.0.0.html",component:d("/releases/9.0.0.html","f4b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/replication-couchdb.html",component:d("/replication-couchdb.html","6d5"),exact:!0,sidebar:"tutorialSidebar"},{path:"/replication-firestore.html",component:d("/replication-firestore.html","bcb"),exact:!0,sidebar:"tutorialSidebar"},{path:"/replication-graphql.html",component:d("/replication-graphql.html","a6c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/replication-http.html",component:d("/replication-http.html","16a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/replication-nats.html",component:d("/replication-nats.html","ac4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/replication-p2p.html",component:d("/replication-p2p.html","ec6"),exact:!0},{path:"/replication-server",component:d("/replication-server","aa6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/replication-webrtc.html",component:d("/replication-webrtc.html","ff6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/replication-websocket.html",component:d("/replication-websocket.html","4f9"),exact:!0,sidebar:"tutorialSidebar"},{path:"/replication.html",component:d("/replication.html","62b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-attachment.html",component:d("/rx-attachment.html","7d7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-collection.html",component:d("/rx-collection.html","7dc"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-database.html",component:d("/rx-database.html","e4e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-document.html",component:d("/rx-document.html","e09"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-local-document.html",component:d("/rx-local-document.html","0db"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-pipeline.html",component:d("/rx-pipeline.html","4b1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-query.html",component:d("/rx-query.html","2cf"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-schema.html",component:d("/rx-schema.html","671"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-server-scaling.html",component:d("/rx-server-scaling.html","da1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-server.html",component:d("/rx-server.html","ed5"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-state.html",component:d("/rx-state.html","198"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-denokv.html",component:d("/rx-storage-denokv.html","b6e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-dexie.html",component:d("/rx-storage-dexie.html","bb3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-filesystem-node.html",component:d("/rx-storage-filesystem-node.html","a57"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-foundationdb.html",component:d("/rx-storage-foundationdb.html","3c8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-indexeddb.html",component:d("/rx-storage-indexeddb.html","631"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-localstorage-meta-optimizer.html",component:d("/rx-storage-localstorage-meta-optimizer.html","064"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-lokijs.html",component:d("/rx-storage-lokijs.html","1be"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-memory-mapped.html",component:d("/rx-storage-memory-mapped.html","16d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-memory-synced.html",component:d("/rx-storage-memory-synced.html","65f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-memory.html",component:d("/rx-storage-memory.html","c21"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-mongodb.html",component:d("/rx-storage-mongodb.html","5ad"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-opfs.html",component:d("/rx-storage-opfs.html","6f7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-performance.html",component:d("/rx-storage-performance.html","b12"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-pouchdb.html",component:d("/rx-storage-pouchdb.html","d82"),exact:!0},{path:"/rx-storage-remote.html",component:d("/rx-storage-remote.html","5df"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-sharding.html",component:d("/rx-storage-sharding.html","b30"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-shared-worker.html",component:d("/rx-storage-shared-worker.html","0f4"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-sqlite.html",component:d("/rx-storage-sqlite.html","ad7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage-worker.html",component:d("/rx-storage-worker.html","a4e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rx-storage.html",component:d("/rx-storage.html","144"),exact:!0,sidebar:"tutorialSidebar"},{path:"/rxdb-tradeoffs.html",component:d("/rxdb-tradeoffs.html","5cb"),exact:!0},{path:"/schema-validation.html",component:d("/schema-validation.html","b8d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/slow-indexeddb.html",component:d("/slow-indexeddb.html","a40"),exact:!0,sidebar:"tutorialSidebar"},{path:"/third-party-plugins.html",component:d("/third-party-plugins.html","549"),exact:!0,sidebar:"tutorialSidebar"},{path:"/transactions-conflicts-revisions.html",component:d("/transactions-conflicts-revisions.html","53a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/tutorials/typescript.html",component:d("/tutorials/typescript.html","a33"),exact:!0,sidebar:"tutorialSidebar"},{path:"/why-nosql.html",component:d("/why-nosql.html","ad0"),exact:!0,sidebar:"tutorialSidebar"}]}]}]},{path:"*",component:d("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>o,x:()=>i});var r=n(6540),a=n(4848);const o=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,a.jsx)(o.Provider,{value:n,children:t})}},8522:(e,t,n)=>{"use strict";var r=n(6540),a=n(5338),o=n(4625),i=n(545),s=n(8193);const l=[n(1911),n(119),n(6134),n(6294),n(1043)];var c=n(8328),u=n(6347),d=n(2831),f=n(2303),p=n(9961),h=n(4848);function m(e){let{children:t}=e;const n=(0,f.A)();return(0,r.useEffect)((()=>{n&&(function(){if(!location.pathname.includes(".html"))return;const e=[{text:"Follow",keyword:"@twitter",url:"https://twitter.com/intent/user?screen_name=rxdbjs",icon:"\ud83d\udc26"},{text:"Follow",keyword:"@LinkedIn",url:"https://www.linkedin.com/company/rxdb",icon:"[in]"},{text:"Chat",keyword:"@discord",url:"https://rxdb.info/chat",icon:"\ud83d\udcac"},{text:"Star",keyword:"@github",url:"https://rxdb.info/code",icon:"\ud83d\udc19\ud83d\udcbb"},{text:"Subscribe",keyword:"@newsletter",url:"https://rxdb.info/newsletter",icon:"\ud83d\udcf0"}];function t(e,t){e.parentNode.insertBefore(t,e.nextSibling)}const n="rxdb-call-to-action-button";function r(){console.log("set call to action button");const r=6e5,a=Date.now(),o=(a-a%r)/r;console.log("timeslot "+o);const i=o%e.length;console.log("randid: "+i);const s=e[i],l=document.querySelector(".call-to-action");l&&l.parentNode.removeChild(l);const c=document.querySelector(".navbar__items");if(!c)return;const u=document.createElement("div");u.classList.add("call-to-action");const d=document.createElement("a");d.onclick=()=>{window.trigger("call-to-action",.35)},d.classList.add("hover-shadow-top"),d.id=n,d.innerHTML=s.text+' '+s.keyword+''+s.icon+"",d.href=s.url,d.target="_blank",u.append(d),t(c,u)}r()}(),async function(){const e="console-log-click",t=new URLSearchParams(window.location.search);if(!t.has("console"))return;const n=await(0,p.C3)();await n.getLocal(e)?console.log("# already tracked "+e):(window.trigger(e+"_"+t.get("console"),10),await n.upsertLocal(e,{}))}())})),(0,h.jsx)(h.Fragment,{children:t})}var g=n(5260),y=n(4586),b=n(6025),v=n(6342),w=n(1003),x=n(2131),k=n(4090),_=n(2967),S=n(440),E=n(1463);function C(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,y.A)(),r=(0,x.o)(),a=n[e].htmlLang,o=e=>e.replace("-","_");return(0,h.jsxs)(g.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,h.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,h.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,h.jsx)("meta",{property:"og:locale",content:o(a)}),Object.values(n).filter((e=>a!==e.htmlLang)).map((e=>(0,h.jsx)("meta",{property:"og:locale:alternate",content:o(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function O(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,y.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,y.A)(),{pathname:r}=(0,u.zy)();return e+(0,S.applyTrailingSlash)((0,b.A)(r),{trailingSlash:n,baseUrl:t})}(),a=t?`${n}${t}`:r;return(0,h.jsxs)(g.A,{children:[(0,h.jsx)("meta",{property:"og:url",content:a}),(0,h.jsx)("link",{rel:"canonical",href:a})]})}function T(){const{i18n:{currentLocale:e}}=(0,y.A)(),{metadata:t,image:n}=(0,v.p)();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(g.A,{children:[(0,h.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,h.jsx)("body",{className:k.w})]}),n&&(0,h.jsx)(w.be,{image:n}),(0,h.jsx)(O,{}),(0,h.jsx)(C,{}),(0,h.jsx)(E.A,{tag:_.Cy,locale:e}),(0,h.jsx)(g.A,{children:t.map(((e,t)=>(0,h.jsx)("meta",{...e},t)))})]})}const A=new Map;function j(e){if(A.has(e.pathname))return{...e,pathname:A.get(e.pathname)};if((0,d.u)(c.A,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return A.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return A.set(e.pathname,t),{...e,pathname:t}}var P=n(6125),R=n(6988),D=n(205);function I(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>a.forEach((e=>e?.()))}const N=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,D.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,a=t.hash===n.hash,o=t.search===n.search;if(r&&a&&!o)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),I("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function L(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.u)(c.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class M extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=s.A.canUseDOM?I("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=I("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),L(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,h.jsx)(N,{previousLocation:this.previousLocation,location:t,children:(0,h.jsx)(u.qh,{location:t,render:()=>e})})}}const F=M,B="__docusaurus-base-url-issue-banner-suggestion-container";function $(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '__docusaurus-base-url-issue-banner-container';\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

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

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const a=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;a?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Q=n(6921);const Y=new Set,Z=new Set,J=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,X={prefetch(e){if(!(e=>!J()&&!Z.has(e)&&!Y.has(e))(e))return!1;Y.add(e);const t=(0,d.u)(c.A,e).flatMap((e=>{return t=e.route.path,Object.entries(V).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Q.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?G(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!J()&&!Z.has(e))(e)&&(Z.add(e),L(e))},ee=Object.freeze(X),te=Boolean(!0);if(s.A.canUseDOM){window.docusaurus=ee;const e=document.getElementById("__docusaurus"),t=(0,h.jsx)(i.vd,{children:(0,h.jsx)(o.Kd,{children:(0,h.jsx)(W,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},s=()=>{if(te)r.startTransition((()=>{a.hydrateRoot(e,t,{onRecoverableError:n})}));else{const o=a.createRoot(e,{onRecoverableError:n});r.startTransition((()=>{o.render(t)}))}};L(window.location.pathname).then(s)}},6988:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>f});var r=n(6540),a=n(4784);const o=JSON.parse('{"docusaurus-plugin-google-tag-manager":{"default":{"containerId":"GTM-PL63TR5","id":"default"}},"docusaurus-lunr-search":{"default":{"fileNames":{"searchDoc":"search-doc-1729069270821.json","lunrIndex":"lunr-index-1729069270821.json"}}},"docusaurus-plugin-google-gtag":{"default":{"trackingID":["G-62D63SY3S0"],"anonymizeIP":false,"id":"default"}},"docusaurus-plugin-content-docs":{"default":{"path":"/","versions":[{"name":"current","label":"Next","isLast":true,"path":"/","mainDocId":"quickstart","docs":[{"id":"adapters","path":"/adapters.html"},{"id":"alternatives","path":"/alternatives.html","sidebar":"tutorialSidebar"},{"id":"articles/angular-database","path":"/articles/angular-database.html","sidebar":"tutorialSidebar"},{"id":"articles/browser-database","path":"/articles/browser-database.html","sidebar":"tutorialSidebar"},{"id":"articles/browser-storage","path":"/articles/browser-storage.html","sidebar":"tutorialSidebar"},{"id":"articles/data-base","path":"/articles/data-base.html","sidebar":"tutorialSidebar"},{"id":"articles/embedded-database","path":"/articles/embedded-database.html","sidebar":"tutorialSidebar"},{"id":"articles/flutter-database","path":"/articles/flutter-database.html","sidebar":"tutorialSidebar"},{"id":"articles/frontend-database","path":"/articles/frontend-database.html","sidebar":"tutorialSidebar"},{"id":"articles/ideas","path":"/articles/ideas"},{"id":"articles/in-memory-nosql-database","path":"/articles/in-memory-nosql-database.html","sidebar":"tutorialSidebar"},{"id":"articles/ionic-database","path":"/articles/ionic-database.html","sidebar":"tutorialSidebar"},{"id":"articles/javascript-vector-database","path":"/articles/javascript-vector-database.html","sidebar":"tutorialSidebar"},{"id":"articles/json-database","path":"/articles/json-database.html","sidebar":"tutorialSidebar"},{"id":"articles/localstorage","path":"/articles/localstorage.html","sidebar":"tutorialSidebar"},{"id":"articles/localstorage-indexeddb-cookies-opfs-sqlite-wasm","path":"/articles/localstorage-indexeddb-cookies-opfs-sqlite-wasm.html","sidebar":"tutorialSidebar"},{"id":"articles/mobile-database","path":"/articles/mobile-database.html","sidebar":"tutorialSidebar"},{"id":"articles/progressive-web-app-database","path":"/articles/progressive-web-app-database.html","sidebar":"tutorialSidebar"},{"id":"articles/react-database","path":"/articles/react-database.html","sidebar":"tutorialSidebar"},{"id":"articles/realtime-database","path":"/articles/realtime-database.html","sidebar":"tutorialSidebar"},{"id":"articles/websockets-sse-polling-webrtc-webtransport","path":"/articles/websockets-sse-polling-webrtc-webtransport.html","sidebar":"tutorialSidebar"},{"id":"backup","path":"/backup.html","sidebar":"tutorialSidebar"},{"id":"capacitor-database","path":"/capacitor-database.html","sidebar":"tutorialSidebar"},{"id":"cleanup","path":"/cleanup.html","sidebar":"tutorialSidebar"},{"id":"contribute","path":"/contribution.html","sidebar":"tutorialSidebar"},{"id":"crdt","path":"/crdt.html","sidebar":"tutorialSidebar"},{"id":"data-migration","path":"/data-migration"},{"id":"dev-mode","path":"/dev-mode.html","sidebar":"tutorialSidebar"},{"id":"downsides-of-offline-first","path":"/downsides-of-offline-first.html","sidebar":"tutorialSidebar"},{"id":"electron","path":"/electron.html","sidebar":"tutorialSidebar"},{"id":"electron-database","path":"/electron-database.html","sidebar":"tutorialSidebar"},{"id":"encryption","path":"/encryption.html","sidebar":"tutorialSidebar"},{"id":"errors","path":"/errors.html","sidebar":"tutorialSidebar"},{"id":"fulltext-search","path":"/fulltext-search.html","sidebar":"tutorialSidebar"},{"id":"install","path":"/install.html","sidebar":"tutorialSidebar"},{"id":"key-compression","path":"/key-compression.html","sidebar":"tutorialSidebar"},{"id":"leader-election","path":"/leader-election.html","sidebar":"tutorialSidebar"},{"id":"logger","path":"/logger.html","sidebar":"tutorialSidebar"},{"id":"middleware","path":"/middleware.html","sidebar":"tutorialSidebar"},{"id":"migration-schema","path":"/migration-schema.html","sidebar":"tutorialSidebar"},{"id":"migration-storage","path":"/migration-storage.html","sidebar":"tutorialSidebar"},{"id":"nodejs-database","path":"/nodejs-database.html","sidebar":"tutorialSidebar"},{"id":"nosql-performance-tips","path":"/nosql-performance-tips.html","sidebar":"tutorialSidebar"},{"id":"offline-first","path":"/offline-first.html","sidebar":"tutorialSidebar"},{"id":"orm","path":"/orm.html","sidebar":"tutorialSidebar"},{"id":"plugins","path":"/plugins.html","sidebar":"tutorialSidebar"},{"id":"population","path":"/population.html","sidebar":"tutorialSidebar"},{"id":"query-cache","path":"/query-cache.html","sidebar":"tutorialSidebar"},{"id":"query-optimizer","path":"/query-optimizer.html","sidebar":"tutorialSidebar"},{"id":"questions-answers","path":"/questions-answers.html","sidebar":"tutorialSidebar"},{"id":"quickstart","path":"/quickstart.html","sidebar":"tutorialSidebar"},{"id":"react-native-database","path":"/react-native-database.html","sidebar":"tutorialSidebar"},{"id":"reactivity","path":"/reactivity.html","sidebar":"tutorialSidebar"},{"id":"releases/10.0.0","path":"/releases/10.0.0.html","sidebar":"tutorialSidebar"},{"id":"releases/11.0.0","path":"/releases/11.0.0.html","sidebar":"tutorialSidebar"},{"id":"releases/12.0.0","path":"/releases/12.0.0.html","sidebar":"tutorialSidebar"},{"id":"releases/13.0.0","path":"/releases/13.0.0.html","sidebar":"tutorialSidebar"},{"id":"releases/14.0.0","path":"/releases/14.0.0.html","sidebar":"tutorialSidebar"},{"id":"releases/15.0.0","path":"/releases/15.0.0.html","sidebar":"tutorialSidebar"},{"id":"releases/8.0.0","path":"/releases/8.0.0.html","sidebar":"tutorialSidebar"},{"id":"releases/9.0.0","path":"/releases/9.0.0.html","sidebar":"tutorialSidebar"},{"id":"replication","path":"/replication.html","sidebar":"tutorialSidebar"},{"id":"replication-couchdb","path":"/replication-couchdb.html","sidebar":"tutorialSidebar"},{"id":"replication-firestore","path":"/replication-firestore.html","sidebar":"tutorialSidebar"},{"id":"replication-graphql","path":"/replication-graphql.html","sidebar":"tutorialSidebar"},{"id":"replication-http","path":"/replication-http.html","sidebar":"tutorialSidebar"},{"id":"replication-nats","path":"/replication-nats.html","sidebar":"tutorialSidebar"},{"id":"replication-p2p","path":"/replication-p2p.html"},{"id":"replication-server","path":"/replication-server","sidebar":"tutorialSidebar"},{"id":"replication-webrtc","path":"/replication-webrtc.html","sidebar":"tutorialSidebar"},{"id":"replication-websocket","path":"/replication-websocket.html","sidebar":"tutorialSidebar"},{"id":"rx-attachment","path":"/rx-attachment.html","sidebar":"tutorialSidebar"},{"id":"rx-collection","path":"/rx-collection.html","sidebar":"tutorialSidebar"},{"id":"rx-database","path":"/rx-database.html","sidebar":"tutorialSidebar"},{"id":"rx-document","path":"/rx-document.html","sidebar":"tutorialSidebar"},{"id":"rx-local-document","path":"/rx-local-document.html","sidebar":"tutorialSidebar"},{"id":"rx-pipeline","path":"/rx-pipeline.html","sidebar":"tutorialSidebar"},{"id":"rx-query","path":"/rx-query.html","sidebar":"tutorialSidebar"},{"id":"rx-schema","path":"/rx-schema.html","sidebar":"tutorialSidebar"},{"id":"rx-server","path":"/rx-server.html","sidebar":"tutorialSidebar"},{"id":"rx-server-scaling","path":"/rx-server-scaling.html","sidebar":"tutorialSidebar"},{"id":"rx-state","path":"/rx-state.html","sidebar":"tutorialSidebar"},{"id":"rx-storage","path":"/rx-storage.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-denokv","path":"/rx-storage-denokv.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-dexie","path":"/rx-storage-dexie.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-filesystem-node","path":"/rx-storage-filesystem-node.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-foundationdb","path":"/rx-storage-foundationdb.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-indexeddb","path":"/rx-storage-indexeddb.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-localstorage-meta-optimizer","path":"/rx-storage-localstorage-meta-optimizer.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-lokijs","path":"/rx-storage-lokijs.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-memory","path":"/rx-storage-memory.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-memory-mapped","path":"/rx-storage-memory-mapped.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-memory-synced","path":"/rx-storage-memory-synced.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-mongodb","path":"/rx-storage-mongodb.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-opfs","path":"/rx-storage-opfs.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-performance","path":"/rx-storage-performance.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-pouchdb","path":"/rx-storage-pouchdb.html"},{"id":"rx-storage-remote","path":"/rx-storage-remote.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-sharding","path":"/rx-storage-sharding.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-shared-worker","path":"/rx-storage-shared-worker.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-sqlite","path":"/rx-storage-sqlite.html","sidebar":"tutorialSidebar"},{"id":"rx-storage-worker","path":"/rx-storage-worker.html","sidebar":"tutorialSidebar"},{"id":"rxdb-tradeoffs","path":"/rxdb-tradeoffs.html"},{"id":"schema-validation","path":"/schema-validation.html","sidebar":"tutorialSidebar"},{"id":"slow-indexeddb","path":"/slow-indexeddb.html","sidebar":"tutorialSidebar"},{"id":"third-party-plugins","path":"/third-party-plugins.html","sidebar":"tutorialSidebar"},{"id":"transactions-conflicts-revisions","path":"/transactions-conflicts-revisions.html","sidebar":"tutorialSidebar"},{"id":"tutorials/typescript","path":"/tutorials/typescript.html","sidebar":"tutorialSidebar"},{"id":"why-nosql","path":"/why-nosql.html","sidebar":"tutorialSidebar"}],"draftIds":[],"sidebars":{"tutorialSidebar":{"link":{"path":"/quickstart.html","label":"quickstart"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(2654);const l=JSON.parse('{"docusaurusVersion":"3.0.1","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.0.1"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.0.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.0.1"},"docusaurus-plugin-google-gtag":{"type":"package","name":"@docusaurus/plugin-google-gtag","version":"3.0.1"},"docusaurus-plugin-google-tag-manager":{"type":"package","name":"@docusaurus/plugin-google-tag-manager","version":"3.0.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.0.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.0.1"},"docusaurus-lunr-search":{"type":"package","name":"docusaurus-lunr-search","version":"3.3.1"}}}');var c=n(4848);const u={siteConfig:a.default,siteMetadata:l,globalData:o,i18n:i,codeTranslations:s},d=r.createContext(u);function f(e){let{children:t}=e;return(0,c.jsx)(d.Provider,{value:u,children:t})}},7489:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(6540),a=n(8193),o=n(5260),i=n(440),s=n(8465),l=n(4848);function c(e){let{error:t,tryAgain:n}=e;return(0,l.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,l.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,l.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,l.jsx)(u,{error:t})]})}function u(e){let{error:t}=e;const n=(0,i.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,l.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function d(e){let{error:t,tryAgain:n}=e;return(0,l.jsxs)(p,{fallback:()=>(0,l.jsx)(c,{error:t,tryAgain:n}),children:[(0,l.jsx)(o.A,{children:(0,l.jsx)("title",{children:"Page Error"})}),(0,l.jsx)(s.A,{children:(0,l.jsx)(c,{error:t,tryAgain:n})})]})}const f=e=>(0,l.jsx)(d,{...e});class p extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??f)(e)}return e??null}}},8193:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);var r=n(545),a=n(4848);function o(e){return(0,a.jsx)(r.mg,{...e})}},5489:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(6540),a=n(4625),o=n(440),i=n(4586),s=n(6654),l=n(8193),c=n(4848);const u=r.createContext({collectLink:()=>{}});var d=n(6025);function f(e,t){let{isNavLink:n,to:f,href:p,activeClassName:h,isActive:m,"data-noBrokenLinkCheck":g,autoAddBaseUrl:y=!0,...b}=e;const{siteConfig:{trailingSlash:v,baseUrl:w}}=(0,i.A)(),{withBaseUrl:x}=(0,d.h)(),k=(0,r.useContext)(u),_=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>_.current));const S=f||p;const E=(0,s.A)(S),C=S?.replace("pathname://","");let O=void 0!==C?(T=C,y&&(e=>e.startsWith("/"))(T)?x(T):T):void 0;var T;O&&E&&(O=(0,o.applyTrailingSlash)(O,{trailingSlash:v,baseUrl:w}));const A=(0,r.useRef)(!1),j=n?a.k2:a.N_,P=l.A.canUseIntersectionObserver,R=(0,r.useRef)(),D=()=>{A.current||null==O||(window.docusaurus.preload(O),A.current=!0)};(0,r.useEffect)((()=>(!P&&E&&null!=O&&window.docusaurus.prefetch(O),()=>{P&&R.current&&R.current.disconnect()})),[R,O,P,E]);const I=O?.startsWith("#")??!1,N=!O||!E||I;return N||g||k.collectLink(O),N?(0,c.jsx)("a",{ref:_,href:O,...S&&!E&&{target:"_blank",rel:"noopener noreferrer"},...b}):(0,c.jsx)(j,{...b,onMouseEnter:D,onTouchStart:D,innerRef:e=>{_.current=e,P&&e&&E&&(R.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(R.current.unobserve(e),R.current.disconnect(),null!=O&&window.docusaurus.prefetch(O))}))})),R.current.observe(e))},to:O,...n&&{isActive:m,activeClassName:h}})}const p=r.forwardRef(f)},1312:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,T:()=>l});var r=n(6540),a=n(4848);function o(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(2654);function s(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return o(s({message:n,id:r}),t)}function c(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const i=s({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},7065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},6654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},6025:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,h:()=>i});var r=n(6540),a=n(4586),o=n(6654);function i(){const{siteConfig:{baseUrl:e,url:t}}=(0,a.A)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:a=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,o.z)(n))return n;if(a)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const s=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+s:s}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function s(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6988);function o(){return(0,r.useContext)(a.o)}},6588:(e,t,n)=>{"use strict";n.d(t,{P_:()=>i,kh:()=>o});var r=n(4586),a=n(7065);function o(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,r.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}function i(e,t,n){void 0===t&&(t=a.W),void 0===n&&(n={});const r=o(e),i=r?.[t];if(!i&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return i}},2303:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6125);function o(){return(0,r.useContext)(a.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540);const a=n(8193).A.canUseDOM?r.useLayoutEffect:r.useEffect},6921:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function a(e){const t={};return function e(n,a){Object.entries(n).forEach((n=>{let[o,i]=n;const s=a?`${a}.${o}`:o;r(i)?e(i,s):t[s]=i}))}(e),t}},3102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>o});var r=n(6540),a=n(4848);const o=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(o),s=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,a.jsx)(o.Provider,{value:s,children:t})}},8295:(e,t,n)=>{"use strict";n.d(t,{zK:()=>p,vT:()=>u,Gy:()=>l,HW:()=>h,ht:()=>c,r7:()=>f,jh:()=>d});var r=n(6347),a=n(6588);const o=e=>e.versions.find((e=>e.isLast));function i(e,t){const n=function(e,t){const n=o(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}(e,t),a=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const s={},l=()=>(0,a.kh)("docusaurus-plugin-content-docs")??s,c=e=>(0,a.P_)("docusaurus-plugin-content-docs",e,{failfast:!0});function u(e){void 0===e&&(e={});const t=l(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return o}(t,n,e)}function d(e){return c(e).versions}function f(e){const t=c(e);return o(t)}function p(e){const t=c(e),{pathname:n}=(0,r.zy)();return i(t,n)}function h(e){const t=c(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=o(e);return{latestDocSuggestion:i(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},1911:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={onRouteDidUpdate(e){let{location:t,previousLocation:n}=e;!n||t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash||setTimeout((()=>{window.gtag("set","page_path",t.pathname+t.search+t.hash),window.gtag("event","page_view")}))}}},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5947),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{a().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){a().done()}}},6134:(e,t,n)=>{"use strict";var r=n(1765),a=n(4784);!function(e){const{themeConfig:{prism:t}}=a.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(9700),n(8692)(`./prism-${e}`)})),delete globalThis.Prism}(r.My)},1107:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});n(6540);var r=n(4164),a=n(1312),o=n(6342),i=n(5489);const s={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var l=n(4848);function c(e){let{as:t,id:n,...c}=e;const{navbar:{hideOnScroll:u}}=(0,o.p)();if("h1"===t||!n)return(0,l.jsx)(t,{...c,id:void 0});const d=(0,a.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof c.children?c.children:n});return(0,l.jsxs)(t,{...c,className:(0,r.A)("anchor",u?s.anchorWithHideOnScrollNavbar:s.anchorWithStickyNavbar,c.className),id:n,children:[c.children,(0,l.jsx)(i.A,{className:"hash-link",to:`#${n}`,"aria-label":d,title:d,children:"\u200b"})]})}},3186:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);const r={iconExternalLink:"iconExternalLink_nPIU"};var a=n(4848);function o(e){let{width:t=13.5,height:n=13.5}=e;return(0,a.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,a.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},8465:(e,t,n)=>{"use strict";n.d(t,{A:()=>rt});var r=n(6540),a=n(4164),o=n(7489),i=n(1003),s=n(6347),l=n(1312),c=n(5062),u=n(4848);const d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){const e=(0,r.useRef)(null),{action:t}=(0,s.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&f(t)}),[]);return(0,c.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}const h=(0,l.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function m(e){const t=e.children??h,{containerRef:n,onClick:r}=p();return(0,u.jsx)("div",{ref:n,role:"region","aria-label":h,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var g=n(7559),y=n(4090);const b={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(m,{className:b.skipToContent})}var w=n(6342),x=n(5041);function k(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:a=1.2,className:o,...i}=e;return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,u.jsx)("g",{stroke:r,strokeWidth:a,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const _={closeButton:"closeButton_CVFx"};function S(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,l.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,a.A)("clean-btn close",_.closeButton,e.className),children:(0,u.jsx)(k,{width:14,height:14,strokeWidth:3.1})})}const E={content:"content_knG7"};function C(e){const{announcementBar:t}=(0,w.p)(),{content:n}=t;return(0,u.jsx)("div",{...e,className:(0,a.A)(E.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const O={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function T(){const{announcementBar:e}=(0,w.p)(),{isActive:t,close:n}=(0,x.Mj)();if(!t)return null;const{backgroundColor:r,textColor:a,isCloseable:o}=e;return(0,u.jsxs)("div",{className:O.announcementBar,style:{backgroundColor:r,color:a},role:"banner",children:[o&&(0,u.jsx)("div",{className:O.announcementBarPlaceholder}),(0,u.jsx)(C,{className:O.announcementBarContent}),o&&(0,u.jsx)(S,{onClick:n,className:O.announcementBarClose})]})}var A=n(9876),j=n(3104);var P=n(9532),R=n(5600);const D=r.createContext(null);function I(e){let{children:t}=e;const n=function(){const e=(0,A.M)(),t=(0,R.YL)(),[n,a]=(0,r.useState)(!1),o=null!==t.component,i=(0,P.ZC)(o);return(0,r.useEffect)((()=>{o&&!i&&a(!0)}),[o,i]),(0,r.useEffect)((()=>{o?e.shown||a(!0):a(!1)}),[e.shown,o]),(0,r.useMemo)((()=>[n,a]),[n])}();return(0,u.jsx)(D.Provider,{value:n,children:t})}function N(e){if(e.component){const t=e.component;return(0,u.jsx)(t,{...e.props})}}function L(){const e=(0,r.useContext)(D);if(!e)throw new P.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,a=(0,r.useCallback)((()=>n(!1)),[n]),o=(0,R.YL)();return(0,r.useMemo)((()=>({shown:t,hide:a,content:N(o)})),[a,o,t])}function M(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:o}=L();return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var F=n(5293),B=n(2303);function $(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function q(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const z={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function U(e){let{className:t,buttonClassName:n,value:r,onChange:o}=e;const i=(0,B.A)(),s=(0,l.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,l.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,a.A)(z.toggle,t),children:(0,u.jsxs)("button",{className:(0,a.A)("clean-btn",z.toggleButton,!i&&z.toggleButtonDisabled,n),type:"button",onClick:()=>o("dark"===r?"light":"dark"),disabled:!i,title:s,"aria-label":s,"aria-live":"polite",children:[(0,u.jsx)($,{className:(0,a.A)(z.toggleIcon,z.lightToggleIcon)}),(0,u.jsx)(q,{className:(0,a.A)(z.toggleIcon,z.darkToggleIcon)})]})})}const K=r.memo(U),H={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function W(e){let{className:t}=e;const n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode.disableSwitch,{colorMode:a,setColorMode:o}=(0,F.G)();return r?null:(0,u.jsx)(K,{className:t,buttonClassName:"dark"===n?H.darkNavbarColorModeToggle:void 0,value:a,onChange:o})}var V=n(9529);function G(){return(0,u.jsx)(V.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Q(){const e=(0,A.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,l.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(k,{color:"var(--ifm-color-emphasis-600)"})})}function Y(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(G,{}),(0,u.jsx)(W,{className:"margin-right--md"}),(0,u.jsx)(Q,{})]})}var Z=n(5489),J=n(6025),X=n(6654);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(3186);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:a,label:o,html:i,isDropdownLink:s,prependBaseUrlToHref:l,...c}=e;const d=(0,J.A)(r),f=(0,J.A)(t),p=(0,J.A)(a,{forcePrependBaseUrl:!0}),h=o&&a&&!(0,X.A)(a),m=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[o,h&&(0,u.jsx)(te.A,{...s&&{width:12,height:12}})]})};return a?(0,u.jsx)(Z.A,{href:l?p:a,...c,...m}):(0,u.jsx)(Z.A,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(f)},...c,...m})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const o=(0,u.jsx)(ne,{className:(0,a.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,u.jsx)("li",{children:o}):o}function ae(e){let{className:t,isDropdownItem:n,...r}=e;return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(ne,{className:(0,a.A)("menu__link",t),...r})})}function oe(e){let{mobile:t=!1,position:n,...r}=e;const a=t?ae:re;return(0,u.jsx)(a,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(1422),se=n(9169),le=n(4586);const ce="dropdownNavbarItemMobile_S0Fm";function ue(e,t){return e.some((e=>function(e,t){return!!(0,se.ys)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:o,onClick:i,...s}=e;const l=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[l]),(0,u.jsxs)("div",{ref:l,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c}),children:[(0,u.jsx)(ne,{"aria-haspopup":"true","aria-expanded":c,role:"button",href:s.to?void 0:"#",className:(0,a.A)("navbar__link",o),...s,onClick:s.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))},children:s.children??s.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(Ae,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function fe(e){let{items:t,className:n,position:o,onClick:i,...l}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,le.A)(),{pathname:t}=(0,s.zy)();return t.replace(e,"/")}(),d=ue(t,c),{collapsed:f,toggleCollapsed:p,setCollapsed:h}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&h(!d)}),[c,d,h]),(0,u.jsxs)("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":f}),children:[(0,u.jsx)(ne,{role:"button",className:(0,a.A)(ce,"menu__link menu__link--sublist menu__link--sublist-caret",n),...l,onClick:e=>{e.preventDefault(),p()},children:l.children??l.label}),(0,u.jsx)(ie.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:f,children:t.map(((e,t)=>(0,r.createElement)(Ae,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function pe(e){let{mobile:t=!1,...n}=e;const r=t?fe:de;return(0,u.jsx)(r,{...n})}var he=n(2131);function me(e){let{width:t=20,height:n=20,...r}=e;return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const ge="iconLanguage_nlXk";var ye=n(6588),be=n(689),ve=n.n(be);function we(){const e=(0,s.zy)(),t=(0,s.W6)(),{siteConfig:{baseUrl:n}}=(0,le.A)(),[a,o]=(0,r.useState)({wordToHighlight:"",isTitleSuggestion:!1,titleText:""});return(0,r.useEffect)((()=>{if(!e.state?.highlightState||0===e.state.highlightState.wordToHighlight.length)return;o(e.state.highlightState);const{highlightState:n,...r}=e.state;t.replace({...e,state:r})}),[e.state?.highlightState,t,e]),(0,r.useEffect)((()=>{if(0===a.wordToHighlight.length)return;const e=document.getElementsByTagName("article")[0]??document.getElementsByTagName("main")[0];if(!e)return;const t=new(ve())(e),n={ignoreJoiners:!0};return t.mark(a.wordToHighlight,n),()=>t.unmark(n)}),[a,n]),null}const xe=e=>{const t=(0,r.useRef)(!1),o=(0,r.useRef)(null),[i,l]=(0,r.useState)(!1),c=(0,s.W6)(),{siteConfig:d={}}=(0,le.A)(),f=(d.plugins||[]).find((e=>Array.isArray(e)&&"string"==typeof e[0]&&e[0].includes("docusaurus-lunr-search"))),p=(0,B.A)(),{baseUrl:h}=d,m=f&&f[1]?.assetUrl||h,g=(0,ye.P_)("docusaurus-lunr-search"),y=()=>{t.current||(Promise.all([fetch(`${m}${g.fileNames.searchDoc}`).then((e=>e.json())),fetch(`${m}${g.fileNames.lunrIndex}`).then((e=>e.json())),Promise.all([n.e(4250),n.e(7443)]).then(n.bind(n,4004)),Promise.all([n.e(1869),n.e(9187)]).then(n.bind(n,9187))]).then((e=>{let[t,n,{default:r}]=e;const{searchDocs:a,options:o}=t;a&&0!==a.length&&(((e,t,n,r)=>{new n({searchDocs:e,searchIndex:t,baseUrl:h,inputSelector:"#search_input_react",handleSelected:(e,t,n)=>{const a=n.url||"/";document.createElement("a").href=a,e.setVal(""),t.target.blur();let o="";if(r.highlightResult)try{const e=(n.text||n.subcategory||n.title).match(new RegExp("\\w*","g"));if(e&&e.length>0){const t=document.createElement("div");t.innerHTML=e[0],o=t.textContent}}catch(i){console.log(i)}c.push(a,{highlightState:{wordToHighlight:o}})},maxHits:r.maxHits})})(a,n,r,o),l(!0))})),t.current=!0)},b=(0,r.useCallback)((t=>{o.current.contains(t.target)||o.current.focus(),e.handleSearchBarToggle&&e.handleSearchBarToggle(!e.isSearchBarExpanded)}),[e.isSearchBarExpanded]);let v;return p&&(y(),v=window.navigator.platform.startsWith("Mac")?"Search \u2318+K":"Search Ctrl+K"),(0,u.jsxs)("div",{className:"navbar__search",children:[(0,u.jsx)("span",{"aria-label":"expand searchbar",role:"button",className:(0,a.A)("search-icon",{"search-icon-hidden":e.isSearchBarExpanded}),onClick:b,onKeyDown:b,tabIndex:0}),(0,u.jsx)("input",{id:"search_input_react",type:"search",placeholder:i?v:"Loading...","aria-label":"Search",className:(0,a.A)("navbar__search-input",{"search-bar-expanded":e.isSearchBarExpanded},{"search-bar":!e.isSearchBarExpanded}),onClick:y,onMouseOver:y,onFocus:b,onBlur:b,ref:o,disabled:!i}),(0,u.jsx)(we,{})]},"search-box")},ke={navbarSearchContainer:"navbarSearchContainer_Bca1"};function _e(e){let{children:t,className:n}=e;return(0,u.jsx)("div",{className:(0,a.A)(n,ke.navbarSearchContainer),children:t})}var Se=n(8295),Ee=n(1754);var Ce=n(5597);const Oe=e=>e.docs.find((t=>t.id===e.mainDocId));const Te={default:oe,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:a="",...o}=e;const{i18n:{currentLocale:i,locales:c,localeConfigs:d}}=(0,le.A)(),f=(0,he.o)(),{search:p,hash:h}=(0,s.zy)(),m=[...n,...c.map((e=>{const n=`${`pathname://${f.createUrl({locale:e,fullyQualified:!1})}`}${p}${h}${a}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],g=t?(0,l.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,u.jsx)(pe,{...o,mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(me,{className:ge}),g]}),items:m})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,u.jsx)(_e,{className:n,children:(0,u.jsx)(xe,{})})},dropdown:pe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:o=!1}=e;const i=o?"li":"div";return(0,u.jsx)(i,{className:(0,a.A)({navbar__item:!r&&!o,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...a}=e;const{activeDoc:o}=(0,Se.zK)(r),i=(0,Ee.QB)(t,r),s=o?.path===i?.path;return null===i||i.unlisted&&!s?null:(0,u.jsx)(oe,{exact:!0,...a,isActive:()=>s||!!o?.sidebar&&o.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...a}=e;const{activeDoc:o}=(0,Se.zK)(r),i=(0,Ee.fW)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,u.jsx)(oe,{exact:!0,...a,isActive:()=>o?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...a}=e;const o=(0,Ee.Vd)(r)[0],i=t??o.label,s=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(o).path;return(0,u.jsx)(oe,{...a,label:i,to:s})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:a,dropdownItemsAfter:o,...i}=e;const{search:c,hash:d}=(0,s.zy)(),f=(0,Se.zK)(n),p=(0,Se.jh)(n),{savePreferredVersionName:h}=(0,Ce.g1)(n),m=[...a,...p.map((e=>{const t=f.alternateDocVersions[e.name]??Oe(e);return{label:e.label,to:`${t.path}${c}${d}`,isActive:()=>e===f.activeVersion,onClick:()=>h(e.name)}})),...o],g=(0,Ee.Vd)(n)[0],y=t&&m.length>1?(0,l.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,b=t&&m.length>1?void 0:Oe(g).path;return m.length<=1?(0,u.jsx)(oe,{...i,mobile:t,label:y,to:b,isActive:r?()=>!1:void 0}):(0,u.jsx)(pe,{...i,mobile:t,label:y,to:b,items:m,isActive:r?()=>!1:void 0})}};function Ae(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=Te[r];if(!a)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,u.jsx)(a,{...n})}function je(){const e=(0,A.M)(),t=(0,w.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(Ae,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function Pe(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(l.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Re(){const e=0===(0,w.p)().navbar.items.length,t=L();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(Pe,{onClick:()=>t.hide()}),t.content]})}function De(){const e=(0,A.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,u.jsx)(M,{header:(0,u.jsx)(Y,{}),primaryMenu:(0,u.jsx)(je,{}),secondaryMenu:(0,u.jsx)(Re,{})}):null}const Ie={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Ne(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,a.A)("navbar-sidebar__backdrop",e.className)})}function Le(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:o}}=(0,w.p)(),i=(0,A.M)(),{navbarRef:s,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(!1),o=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,j.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=s?n(!1):i+c{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return a.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,u.jsxs)("nav",{ref:s,"aria-label":(0,l.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,a.A)("navbar","navbar--fixed-top",n&&[Ie.navbarHideable,!d&&Ie.navbarHidden],{"navbar--dark":"dark"===o,"navbar--primary":"primary"===o,"navbar-sidebar--show":i.shown}),children:[t,(0,u.jsx)(Ne,{onClick:i.toggle}),(0,u.jsx)(De,{})]})}var Me=n(440);const Fe={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function Be(e){return(0,u.jsx)("button",{type:"button",...e,children:(0,u.jsx)(l.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function $e(e){let{error:t}=e;const n=(0,Me.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,u.jsx)("p",{className:Fe.errorBoundaryError,children:n})}class qe extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const ze="right";function Ue(e){let{width:t=30,height:n=30,className:r,...a}=e;return(0,u.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...a,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function Ke(){const{toggle:e,shown:t}=(0,A.M)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,l.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(Ue,{})})}const He={colorModeToggle:"colorModeToggle_DEke"};function We(e){let{items:t}=e;return(0,u.jsx)(u.Fragment,{children:t.map(((e,t)=>(0,u.jsx)(qe,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,u.jsx)(Ae,{...e})},t)))})}function Ve(e){let{left:t,right:n}=e;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:"navbar__items",children:t}),(0,u.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function Ge(){const e=(0,A.M)(),t=(0,w.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??ze)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),a=t.find((e=>"search"===e.type));return(0,u.jsx)(Ve,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(Ke,{}),(0,u.jsx)(G,{}),(0,u.jsx)(We,{items:n})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(We,{items:r}),(0,u.jsx)(W,{className:He.colorModeToggle}),!a&&(0,u.jsx)(_e,{children:(0,u.jsx)(xe,{})})]})})}function Qe(){return(0,u.jsx)(Le,{children:(0,u.jsx)(Ge,{})})}function Ye(e){const[t,n]=(0,r.useState)(0),a=()=>{const e=((document.documentElement.scrollTop+document.body.scrollTop)/(document.documentElement.scrollHeight-document.documentElement.clientHeight)*100).toFixed(2);n(e)};return(0,r.useEffect)((()=>(window.addEventListener("scroll",a,{passive:!0}),()=>{window.removeEventListener("scroll",a)})),[]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Qe,{...e}),(0,u.jsx)("div",{style:{position:"fixed",display:"block",zIndex:10,height:3,backgroundColor:"var(--color-top)",top:60,borderTopRightRadius:2,borderBottomRightRadius:2,width:t+"%"}})]})}function Ze(){const e={navLinks:[{label:"Pricing",href:"/premium"},{href:"/consulting",label:"Consulting"},{label:"Documentation",href:"/quickstart.html"},{label:"Discord",target:"_blank",href:"/chat"},{label:"Github",target:"_blank",href:"/code"},{label:"Twitter",href:"https://twitter.com/intent/user?screen_name=rxdbjs",target:"_blank"},{label:"LinkedIn",href:"https://www.linkedin.com/company/rxdb",target:"_blank"}],communityLinks:[{label:"Discord",target:"_blank",href:"/chat",logo:"/img/community-links/discord-logo.svg"},{label:"Github",target:"_blank",href:"/code",logo:"/img/community-links/github-logo.svg"},{label:"Twitter",href:"https://twitter.com/intent/user?screen_name=rxdbjs",target:"_blank",logo:"/img/community-links/x-logo.svg"},{label:"LinkedIn",href:"https://www.linkedin.com/company/rxdb",target:"_blank",logo:"/img/community-links/linkedin-logo.svg"},{label:"Stack Overflow",href:"https://stackoverflow.com/questions/tagged/rxdb",target:"_blank",logo:"/img/community-links/stack-overflow-logo.svg"}],policyLinks:[{label:"Legal Notice",target:"_blank",href:"/legal-notice"}]},t=`\xa9 ${(new Date).getFullYear()} RxDB. All rights reserved.`;return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(u.Fragment,{children:(0,u.jsx)("div",{className:"block footer",children:(0,u.jsxs)("div",{className:"footer-block",children:[(0,u.jsxs)("div",{className:"footer-links",children:[(0,u.jsxs)("span",{children:[(0,u.jsxs)("a",{variant:"text",href:"/",className:"footer-logo-button",children:[(0,u.jsx)("img",{src:"/files/logo/logo.svg",alt:"RxDB"}),(0,u.jsx)("div",{children:"RxDB"})]}),(0,u.jsx)("div",{className:"footer-community-links",children:e.communityLinks.map(((e,t)=>(0,u.jsx)("a",{variant:"text",href:e.href,target:e.target?"_blank":"",children:(0,u.jsx)("img",{src:e.logo,alt:"logo"})},e.href+t)))})]}),(0,u.jsx)("div",{className:"footer-nav-links",children:e.navLinks.map(((e,t)=>(0,u.jsx)("a",{variant:"text",href:e.href,target:e.target?"_blank":"",children:e.label},e.href+t)))})]}),(0,u.jsxs)("div",{className:"footer-policy",children:[(0,u.jsx)("div",{children:e.policyLinks.map(((e,t)=>(0,u.jsx)("a",{variant:"text",href:e.href,target:e.target?"_blank":"",children:e.label},e.href+t)))}),(0,u.jsx)("span",{className:"footer-rights",children:t})]}),(0,u.jsx)("img",{className:"footer-img desktop-img",src:"/img/footer-column.svg",alt:"columns"})]})})})})}const Je=(0,P.fM)([F.a,x.oq,j.Tv,Ce.VQ,i.Jx,function(e){let{children:t}=e;return(0,u.jsx)(R.y_,{children:(0,u.jsx)(A.e,{children:(0,u.jsx)(I,{children:t})})})}]);function Xe(e){let{children:t}=e;return(0,u.jsx)(Je,{children:t})}var et=n(1107);function tt(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(et.A,{as:"h1",className:"hero__title",children:(0,u.jsx)(l.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(Be,{onClick:n,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)($e,{error:t})})]})})})}const nt={mainWrapper:"mainWrapper_z2l0"};function rt(e){const{children:t,noFooter:n,wrapperClassName:r,title:s,description:l}=e;return(0,y.J)(),(0,u.jsxs)(Xe,{children:[(0,u.jsx)(i.be,{title:s,description:l}),(0,u.jsx)(v,{}),(0,u.jsx)(T,{}),(0,u.jsx)(Ye,{}),(0,u.jsx)("div",{id:d,className:(0,a.A)(g.G.wrapper.main,nt.mainWrapper,r),children:(0,u.jsx)(o.A,{fallback:e=>(0,u.jsx)(tt,{...e}),children:t})}),!n&&(0,u.jsx)(Ze,{})]})}},9529:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(6540),a=n(5489),o=n(6025),i=n(4586),s=n(6342),l=n(4164),c=n(2303),u=n(5293);const d={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var f=n(4848);function p(e){let{className:t,children:n}=e;const a=(0,c.A)(),{colorMode:o}=(0,u.G)();return(0,f.jsx)(f.Fragment,{children:(a?"dark"===o?["dark"]:["light"]:["light","dark"]).map((e=>{const a=n({theme:e,className:(0,l.A)(t,d.themedComponent,d[`themedComponent--${e}`])});return(0,f.jsx)(r.Fragment,{children:a},e)}))})}function h(e){const{sources:t,className:n,alt:r,...a}=e;return(0,f.jsx)(p,{className:n,children:e=>{let{theme:n,className:o}=e;return(0,f.jsx)("img",{src:t[n],alt:r,className:o,...a})}})}function m(e){let{logo:t,alt:n,imageClassName:r}=e;const a={light:(0,o.A)(t.src),dark:(0,o.A)(t.srcDark||t.src)},i=(0,f.jsx)(h,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,f.jsx)("div",{className:r,children:i}):i}function g(e){const{siteConfig:{title:t}}=(0,i.A)(),{navbar:{title:n,logo:r}}=(0,s.p)(),{imageClassName:l,titleClassName:c,...u}=e,d=(0,o.A)(r?.href||"/"),p=n?"":t,h=r?.alt??p;return(0,f.jsxs)(a.A,{to:d,...u,...r?.target&&{target:r.target},children:[r&&(0,f.jsx)(m,{logo:r,alt:h,imageClassName:l}),null!=n&&(0,f.jsx)("b",{className:c,children:n})]})}},1463:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(6540);var r=n(5260),a=n(4848);function o(e){let{locale:t,version:n,tag:o}=e;const i=t;return(0,a.jsxs)(r.A,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},1422:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,u:()=>c});var r=n(6540),a=n(8193),o=n(205),i=n(3109),s=n(4848);const l="ease-in-out";function c(e){let{initialState:t}=e;const[n,a]=(0,r.useState)(t??!1),o=(0,r.useCallback)((()=>{a((e=>!e))}),[]);return{collapsed:n,setCollapsed:a,toggleCollapsed:o}}const u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function f(e,t){const n=t?u:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function p(e){let{collapsibleRef:t,collapsed:n,animation:a}=e;const o=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=a?.duration??function(e){if((0,i.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${a?.easing??l}`,height:`${t}px`}}function s(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!o.current)return f(e,n),void(o.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(s(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{s()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,a])}function h(e){if(!a.A.canUseDOM)return e?u:d}function m(e){let{as:t="div",collapsed:n,children:a,animation:o,onCollapseTransitionEnd:i,className:l,disableSSRStyle:c}=e;const u=(0,r.useRef)(null);return p({collapsibleRef:u,collapsed:n,animation:o}),(0,s.jsx)(t,{ref:u,style:c?void 0:h(n),onTransitionEnd:e=>{"height"===e.propertyName&&(f(u.current,n),i?.(n))},className:l,children:a})}function g(e){let{collapsed:t,...n}=e;const[a,i]=(0,r.useState)(!t),[l,c]=(0,r.useState)(t);return(0,o.A)((()=>{t||i(!0)}),[t]),(0,o.A)((()=>{a&&c(t)}),[a,t]),a?(0,s.jsx)(m,{...n,collapsed:l}):null}function y(e){let{lazy:t,...n}=e;const r=t?g:m;return(0,s.jsx)(r,{...n})}},5041:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>m,oq:()=>h});var r=n(6540),a=n(2303),o=n(9466),i=n(9532),s=n(6342),l=n(4848);const c=(0,o.Wf)("docusaurus.announcement.dismiss"),u=(0,o.Wf)("docusaurus.announcement.id"),d=()=>"true"===c.get(),f=e=>c.set(String(e)),p=r.createContext(null);function h(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,s.p)(),t=(0,a.A)(),[n,o]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{o(d())}),[]);const i=(0,r.useCallback)((()=>{f(!0),o(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&f(!1),!r&&d()||o(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,l.jsx)(p.Provider,{value:n,children:t})}function m(){const e=(0,r.useContext)(p);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},5293:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>g});var r=n(6540),a=n(8193),o=n(9532),i=n(9466),s=n(6342),l=n(4848);const c=r.createContext(void 0),u="theme",d=(0,i.Wf)(u),f={light:"light",dark:"dark"},p=e=>e===f.dark?f.dark:f.light,h=e=>a.A.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e),m=e=>{d.set(p(e))};function g(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.p)(),[a,o]=(0,r.useState)(h(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:a=!0}=r;t?(o(t),a&&m(t)):(o(n?window.matchMedia("(prefers-color-scheme: dark)").matches?f.dark:f.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",p(a))}),[a]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=d.get();null!==t&&i(p(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const l=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||l.current?l.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:a,setColorMode:i,get isDarkTheme(){return a===f.dark},setLightTheme(){i(f.light)},setDarkTheme(){i(f.dark)}})),[a,i])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function y(){const e=(0,r.useContext)(c);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},5597:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>y,g1:()=>v});var r=n(6540),a=n(8295),o=n(7065),i=n(6342),s=n(1754),l=n(9532),c=n(9466),u=n(4848);const d=e=>`docs-preferred-version-${e}`,f={save:(e,t,n)=>{(0,c.Wf)(d(e),{persistence:t}).set(n)},read:(e,t)=>(0,c.Wf)(d(e),{persistence:t}).get(),clear:(e,t)=>{(0,c.Wf)(d(e),{persistence:t}).del()}},p=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const h=r.createContext(null);function m(){const e=(0,a.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[o,s]=(0,r.useState)((()=>p(n)));(0,r.useEffect)((()=>{s(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function a(e){const t=f.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(f.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,a(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[o,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){f.save(e,t,n),s((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function g(e){let{children:t}=e;const n=m();return(0,u.jsx)(h.Provider,{value:n,children:t})}function y(e){let{children:t}=e;return s.C5?(0,u.jsx)(g,{children:t}):(0,u.jsx)(u.Fragment,{children:t})}function b(){const e=(0,r.useContext)(h);if(!e)throw new l.dV("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=o.W);const t=(0,a.ht)(e),[n,i]=b(),{preferredVersionName:s}=n[e];return{preferredVersion:t.versions.find((e=>e.name===s))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}},1826:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,t:()=>c});var r=n(6540),a=n(9532),o=n(4848);const i=Symbol("EmptyContext"),s=r.createContext(i);function l(e){let{children:t,name:n,items:a}=e;const i=(0,r.useMemo)((()=>n&&a?{name:n,items:a}:null),[n,a]);return(0,o.jsx)(s.Provider,{value:i,children:t})}function c(){const e=(0,r.useContext)(s);if(e===i)throw new a.dV("DocsSidebarProvider");return e}},2252:(e,t,n)=>{"use strict";n.d(t,{n:()=>s,r:()=>l});var r=n(6540),a=n(9532),o=n(4848);const i=r.createContext(null);function s(e){let{children:t,version:n}=e;return(0,o.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(null===e)throw new a.dV("DocsVersionProvider");return e}},9876:(e,t,n)=>{"use strict";n.d(t,{e:()=>p,M:()=>h});var r=n(6540),a=n(5600),o=n(4581),i=n(6347),s=n(9532);function l(e){!function(e){const t=(0,i.W6)(),n=(0,s._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}var c=n(6342),u=n(4848);const d=r.createContext(void 0);function f(){const e=function(){const e=(0,a.YL)(),{items:t}=(0,c.p)().navbar;return 0===t.length&&!e.component}(),t=(0,o.l)(),n=!e&&"mobile"===t,[i,s]=(0,r.useState)(!1);l((()=>{if(i)return s(!1),!1}));const u=(0,r.useCallback)((()=>{s((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&s(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:i})),[e,n,u,i])}function p(e){let{children:t}=e;const n=f();return(0,u.jsx)(d.Provider,{value:n,children:t})}function h(){const e=r.useContext(d);if(void 0===e)throw new s.dV("NavbarMobileSidebarProvider");return e}},5600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>c,YL:()=>l,y_:()=>s});var r=n(6540),a=n(9532),o=n(4848);const i=r.createContext(null);function s(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:t,props:n}=e;const o=(0,r.useContext)(i);if(!o)throw new a.dV("NavbarSecondaryMenuContentProvider");const[,s]=o,l=(0,a.Be)(n);return(0,r.useEffect)((()=>{s({component:t,props:l})}),[s,t,l]),(0,r.useEffect)((()=>()=>s({component:null,props:null})),[s]),null}},4090:(e,t,n)=>{"use strict";n.d(t,{w:()=>a,J:()=>o});var r=n(6540);const a="navigation-with-keyboard";function o(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},4581:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(6540),a=n(8193);const o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function s(){const[e,t]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){t(function(){if(!a.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>i?o.desktop:o.mobile}())}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),e}},7559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},3109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},1754:(e,t,n)=>{"use strict";n.d(t,{Nr:()=>p,w8:()=>g,C5:()=>f,B5:()=>S,Vd:()=>x,QB:()=>_,fW:()=>k,OF:()=>w,Y:()=>b});var r=n(6540),a=n(6347),o=n(2831),i=n(8295),s=n(5597),l=n(2252),c=n(1826);function u(e){return Array.from(new Set(e))}var d=n(9169);const f=!!i.Gy;function p(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=p(t);if(e)return e}}(e):void 0:e.href}const h=(e,t)=>void 0!==e&&(0,d.ys)(e,t),m=(e,t)=>e.some((e=>g(e,t)));function g(e,t){return"link"===e.type?h(e.href,t):"category"===e.type&&(h(e.href,t)||m(e.items,t))}function y(e,t){switch(e.type){case"category":return g(e,t)||e.items.some((e=>y(e,t)));case"link":return!e.unlisted||g(e,t);default:return!0}}function b(e,t){return(0,r.useMemo)((()=>e.filter((e=>y(e,t)))),[e,t])}function v(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const a=[];return function e(t){for(const o of t)if("category"===o.type&&((0,d.ys)(o.href,n)||e(o.items))||"link"===o.type&&(0,d.ys)(o.href,n)){return r&&"category"!==o.type||a.unshift(o),!0}return!1}(t),a}function w(){const e=(0,c.t)(),{pathname:t}=(0,a.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?v({sidebarItems:e.items,pathname:t}):null}function x(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,s.g1)(e),a=(0,i.r7)(e);return(0,r.useMemo)((()=>u([t,n,a].filter(Boolean))),[t,n,a])}function k(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function _(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${u(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function S(e){let{route:t}=e;const n=(0,a.zy)(),r=(0,l.r)(),i=t.routes,s=i.find((e=>(0,a.B6)(n.pathname,e)));if(!s)return null;const c=s.sidebar,u=c?r.docsSidebars[c]:void 0;return{docElement:(0,o.v)(i),sidebarName:c,sidebarItems:u}}},1003:(e,t,n)=>{"use strict";n.d(t,{e3:()=>p,be:()=>d,Jx:()=>h});var r=n(6540),a=n(4164),o=n(5260),i=n(3102);function s(){const e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(6025),c=n(4586);var u=n(4848);function d(e){let{title:t,description:n,keywords:r,image:a,children:i}=e;const s=function(e){const{siteConfig:t}=(0,c.A)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,l.h)(),f=a?d(a,{absolute:!0}):void 0;return(0,u.jsxs)(o.A,{children:[t&&(0,u.jsx)("title",{children:s}),t&&(0,u.jsx)("meta",{property:"og:title",content:s}),n&&(0,u.jsx)("meta",{name:"description",content:n}),n&&(0,u.jsx)("meta",{property:"og:description",content:n}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),f&&(0,u.jsx)("meta",{property:"og:image",content:f}),f&&(0,u.jsx)("meta",{name:"twitter:image",content:f}),i]})}const f=r.createContext(void 0);function p(e){let{className:t,children:n}=e;const i=r.useContext(f),s=(0,a.A)(i,t);return(0,u.jsxs)(f.Provider,{value:s,children:[(0,u.jsx)(o.A,{children:(0,u.jsx)("html",{className:s})}),n]})}function h(e){let{children:t}=e;const n=s(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const o=`plugin-id-${n.plugin.id}`;return(0,u.jsx)(p,{className:(0,a.A)(r,o),children:t})}},9532:(e,t,n)=>{"use strict";n.d(t,{Be:()=>c,ZC:()=>s,_q:()=>i,dV:()=>l,fM:()=>u});var r=n(6540),a=n(205),o=n(4848);function i(e){const t=(0,r.useRef)(e);return(0,a.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function s(e){const t=(0,r.useRef)();return(0,a.A)((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function c(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return(0,o.jsx)(o.Fragment,{children:e.reduceRight(((e,t)=>(0,o.jsx)(t,{children:e})),n)})}}},9169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>s,ys:()=>i});var r=n(6540),a=n(8328),o=n(4586);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function s(){const{baseUrl:e}=(0,o.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(a).flatMap((e=>e.routes??[])))}(n)}({routes:a.A,baseUrl:e})),[e])}},3104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>f,Tv:()=>c,gk:()=>p});var r=n(6540),a=n(8193),o=n(2303),i=(n(205),n(9532)),s=n(4848);const l=r.createContext(void 0);function c(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,s.jsx)(l.Provider,{value:n,children:t})}function u(){const e=(0,r.useContext)(l);if(null==e)throw new i.dV("ScrollControllerProvider");return e}const d=()=>a.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function f(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=u(),a=(0,r.useRef)(d()),o=(0,i._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=d();o(e,a.current),a.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[o,n,...t])}function p(){const e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const a=document.documentElement.scrollTop;(n&&a>e||!n&&at&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},2967:(e,t,n)=>{"use strict";n.d(t,{Cy:()=>r,tU:()=>a});n(4586);const r="default";function a(e,t){return`docs-${e}-${t}`}},9466:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>l});n(6540);const r="localStorage";function a(e){let{key:t,oldValue:n,newValue:r,storage:a}=e;if(n===r)return;const o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}function o(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,i||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),i=!0),null}var t}let i=!1;const s={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function l(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(e);const n=o(t?.persistence);return null===n?s:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),a({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),a({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}},2131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(4586),a=n(6347),o=n(440);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:s}}=(0,r.A)(),{pathname:l}=(0,a.zy)(),c=(0,o.applyTrailingSlash)(l,{trailingSlash:n,baseUrl:e}),u=s===i?e:e.replace(`/${s}/`,"/"),d=c.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${u}`:`${u}${e}/`}(n)}${d}`}}}},5062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(6540),a=n(6347),o=n(9532);function i(e){const t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(4586);function a(){return(0,r.A)().siteConfig.themeConfig}},2983:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[a]=e.split(/[#?]/),o="/"===a||a===r?a:(i=a,n?function(e){return e.endsWith("/")?e:`${e}/`}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));var i;return e.replace(a,o)}},253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t,...e(t.cause)]:[t]}},440:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var a=n(2983);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}});var o=n(253);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return o.getErrorCausalChain}})},9961:(e,t,n)=>{"use strict";n.d(t,{Tj:()=>Gi,C3:()=>Vi,IA:()=>Wi});var r=n(8900);const a=Symbol.for("Dexie"),o=globalThis[a]||(globalThis[a]=r);if(r.semVer!==o.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${r.semVer} and ${o.semVer}`);const{liveQuery:i,mergeRanges:s,rangesOverlap:l,RangeSet:c,cmp:u,Entity:d,PropModSymbol:f,PropModification:p,replacePrefix:h,add:m,remove:g}=o;function y(e,t){var n=e.get(t);if(void 0===n)throw new Error("missing value from map "+t);return n}function b(e,t,n,r){var a=e.get(t);return void 0===a?(a=n(),e.set(t,a)):r&&r(a),a}function v(e){return Object.assign({},e)}function w(e,t){if(void 0===t&&(t=!1),!e)return e;if(!t&&Array.isArray(e))return e.sort(((e,t)=>"string"==typeof e&&"string"==typeof t?e.localeCompare(t):"object"==typeof e?1:-1)).map((e=>w(e,t)));if("object"==typeof e&&!Array.isArray(e)){var n={};return Object.keys(e).sort(((e,t)=>e.localeCompare(t))).forEach((r=>{n[r]=w(e[r],t)})),n}return e}var x=function e(t){if(!t)return t;if(null===t||"object"!=typeof t)return t;if(Array.isArray(t)){for(var n=new Array(t.length),r=n.length;r--;)n[r]=e(t[r]);return n}var a={};for(var o in t)a[o]=e(t[o]);return a};function k(e,t,n){return Object.defineProperty(e,t,{get:function(){return n}}),n}var _=e=>{var t=typeof e;return null!==e&&("object"===t||"function"===t)},S=new Set(["__proto__","prototype","constructor"]),E=new Set("0123456789");function C(e){var t=[],n="",r="start",a=!1;for(var o of e)switch(o){case"\\":if("index"===r)throw new Error("Invalid character in an index");if("indexEnd"===r)throw new Error("Invalid character after an index");a&&(n+=o),r="property",a=!a;break;case".":if("index"===r)throw new Error("Invalid character in an index");if("indexEnd"===r){r="property";break}if(a){a=!1,n+=o;break}if(S.has(n))return[];t.push(n),n="",r="property";break;case"[":if("index"===r)throw new Error("Invalid character in an index");if("indexEnd"===r){r="index";break}if(a){a=!1,n+=o;break}if("property"===r){if(S.has(n))return[];t.push(n),n=""}r="index";break;case"]":if("index"===r){t.push(Number.parseInt(n,10)),n="",r="indexEnd";break}if("indexEnd"===r)throw new Error("Invalid character after an index");default:if("index"===r&&!E.has(o))throw new Error("Invalid character in an index");if("indexEnd"===r)throw new Error("Invalid character after an index");"start"===r&&(r="property"),a&&(a=!1,n+="\\"),n+=o}switch(a&&(n+="\\"),r){case"property":if(S.has(n))return[];t.push(n);break;case"index":throw new Error("Index was not closed");case"start":t.push("")}return t}function O(e,t){if("number"!=typeof t&&Array.isArray(e)){var n=Number.parseInt(t,10);return Number.isInteger(n)&&e[n]===e[t]}return!1}function T(e,t){if(O(e,t))throw new Error("Cannot use string index")}function A(e,t,n){if(Array.isArray(t)&&(t=t.join(".")),!t.includes(".")&&!t.includes("["))return e[t];if(!_(e)||"string"!=typeof t)return void 0===n?e:n;var r=C(t);if(0===r.length)return n;for(var a=0;a!1,deepFreezeWhenDevMode:e=>e,tunnelErrorMessage:e=>"RxDB Error-Code "+e+".\n Error messages are not included in RxDB core to reduce build size.\n "};function z(e,t,n){return"RxError ("+t+"):\n"+e+"\n"+function(e){var t="";return 0===Object.keys(e).length?t:(t+="Given parameters: {\n",t+=Object.keys(e).map((t=>{var n="[object Object]";try{n="errors"===t?e[t].map((e=>JSON.stringify(e,Object.getOwnPropertyNames(e)))):JSON.stringify(e[t],(function(e,t){return void 0===t?null:t}),2)}catch(r){}return t+":"+n})).join("\n"),t+="}")}(n)}var U=function(e){function t(t,n,r){var a;void 0===r&&(r={});var o=z(n,t,r);return(a=e.call(this,o)||this).code=t,a.message=o,a.url=H(t),a.parameters=r,a.rxdb=!0,a}return M(t,e),t.prototype.toString=function(){return this.message},N(t,[{key:"name",get:function(){return"RxError ("+this.code+")"}},{key:"typeError",get:function(){return!1}}])}($(Error)),K=function(e){function t(t,n,r){var a;void 0===r&&(r={});var o=z(n,t,r);return(a=e.call(this,o)||this).code=t,a.message=o,a.url=H(t),a.parameters=r,a.rxdb=!0,a}return M(t,e),t.prototype.toString=function(){return this.message},N(t,[{key:"name",get:function(){return"RxTypeError ("+this.code+")"}},{key:"typeError",get:function(){return!0}}])}($(TypeError));function H(e){return"https://rxdb.info/errors.html?console=errors#"+e}function W(e){return"\n You can find out more about this error here: "+H(e)+" "}function V(e,t){return new U(e,q.tunnelErrorMessage(e)+W(e),t)}function G(e,t){return new K(e,q.tunnelErrorMessage(e)+W(e),t)}function Q(e){return!(!e||409!==e.status)&&e}var Y={409:"document write conflict",422:"schema validation error",510:"attachment data missing"};var Z=/\./g,J=n(8342);function X(e,t){var n=t;return n="properties."+(n=n.replace(Z,".properties.")),A(e,n=(0,J.L$)(n))}function ee(e){return"string"==typeof e?e:e.key}function te(e,t){if("string"==typeof e.primaryKey)return t[e.primaryKey];var n=e.primaryKey;return n.fields.map((e=>{var n=A(t,e);if(void 0===n)throw V("DOC18",{args:{field:e,documentData:t}});return n})).join(n.separator)}function ne(e){var t=ee((e=v(e)).primaryKey);e.properties=v(e.properties),e.additionalProperties=!1,Object.prototype.hasOwnProperty.call(e,"keyCompression")||(e.keyCompression=!1),e.indexes=e.indexes?e.indexes.slice(0):[],e.required=e.required?e.required.slice(0):[],e.encrypted=e.encrypted?e.encrypted.slice(0):[],e.properties._rev={type:"string",minLength:1},e.properties._attachments={type:"object"},e.properties._deleted={type:"boolean"},e.properties._meta=re,e.required=e.required?e.required.slice(0):[],e.required.push("_deleted"),e.required.push("_rev"),e.required.push("_meta"),e.required.push("_attachments");var n=ae(e);(0,P.Hb)(e.required,n),e.required=e.required.filter((e=>!e.includes("."))).filter(((e,t,n)=>n.indexOf(e)===t)),e.version=e.version||0;var r=e.indexes.map((e=>{var n=(0,P.k_)(e)?e.slice(0):[e];return n.includes(t)||n.push(t),"_deleted"!==n[0]&&n.unshift("_deleted"),n}));0===r.length&&r.push(function(e){return["_deleted",e]}(t)),r.push(["_meta.lwt",t]),e.internalIndexes&&e.internalIndexes.map((e=>{r.push(e)}));var a=new Set;return r.filter((e=>{var t=e.join(",");return!a.has(t)&&(a.add(t),!0)})),e.indexes=r,e}var re={type:"object",properties:{lwt:{type:"number",minimum:1,maximum:1e15,multipleOf:.01}},additionalProperties:!0,required:["lwt"]};function ae(e){var t=Object.keys(e.properties).filter((t=>e.properties[t].final)),n=ee(e.primaryKey);return t.push(n),"string"!=typeof e.primaryKey&&e.primaryKey.fields.forEach((e=>t.push(e))),t}var oe="docs",ie="changes",se="attachments",le="dexie",ce=new Map,ue=new Map;var de="__";function fe(e){var t=e.split(".");if(t.length>1)return t.map((e=>fe(e))).join(".");if(e.startsWith("|")){var n=e.substring(1);return de+n}return e}function pe(e){var t=e.split(".");return t.length>1?t.map((e=>pe(e))).join("."):e.startsWith(de)?"|"+e.substring(de.length):e}function he(e,t){if(!t)return t;var n=v(t);return n=ge(n),e.forEach((e=>{var r=A(t,e)?"1":"0",a=fe(e);j(n,a,r)})),n}function me(e,t){return t?(t=ye(t=v(t)),e.forEach((e=>{var n=A(t,e);j(t,e,"1"===n)})),t):t}function ge(e){if(!e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e;if(Array.isArray(e))return e.map((e=>ge(e)));if("object"==typeof e){var t={};return Object.entries(e).forEach((e=>{let[n,r]=e;"object"==typeof r&&(r=ge(r)),t[fe(n)]=r})),t}}function ye(e){if(!e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e;if(Array.isArray(e))return e.map((e=>ye(e)));if("object"==typeof e){var t={};return Object.entries(e).forEach((n=>{let[r,a]=n;("object"==typeof a||Array.isArray(e))&&(a=ye(a)),t[pe(r)]=a})),t}}function be(e){var t=[],n=ee(e.primaryKey);t.push([n]),t.push(["_deleted",n]),e.indexes&&e.indexes.forEach((e=>{var n=(0,P.$r)(e);t.push(n)})),t.push(["_meta.lwt",n]),t.push(["_meta.lwt"]);var r=(t=t.map((e=>e.map((e=>fe(e)))))).map((e=>1===e.length?e[0]:"["+e.join("+")+"]"));return(r=r.filter(((e,t,n)=>n.indexOf(e)===t))).join(", ")}async function ve(e,t){var n=await e;return(await n.dexieTable.bulkGet(t)).map((e=>me(n.booleanIndexes,e)))}function we(e,t){return e+"||"+t}function xe(e){var t=new Set,n=[];return e.indexes?(e.indexes.forEach((r=>{(0,P.$r)(r).forEach((r=>{t.has(r)||(t.add(r),"boolean"===X(e,r).type&&n.push(r))}))})),n.push("_deleted"),(0,P.jw)(n)):n}var ke=n(4629),_e=n(4134),Se=n(2258),Ee=(0,n(5383).L)((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Ce=n(34),Oe=n(3004),Te=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,ke.C6)(t,e),t.prototype.lift=function(e){var t=new Ae(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ee},t.prototype.next=function(e){var t=this;(0,Oe.Y)((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=(0,ke.Ju)(t.currentObservers),o=a.next();!o.done;o=a.next()){o.value.next(e)}}catch(i){n={error:i}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;(0,Oe.Y)((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;(0,Oe.Y)((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,a=n.isStopped,o=n.observers;return r||a?Se.Kn:(this.currentObservers=null,o.push(e),new Se.yU((function(){t.currentObservers=null,(0,Ce.o)(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,a=t.isStopped;n?e.error(r):a&&e.complete()},t.prototype.asObservable=function(){var e=new _e.c;return e.source=this,e},t.create=function(e,t){return new Ae(e,t)},t}(_e.c),Ae=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return(0,ke.C6)(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:Se.Kn},t}(Te),je=n(5734),Pe={},Re=n(1507),De=n(3337),Ie=String.fromCharCode(65535),Ne=Number.MIN_SAFE_INTEGER;function Le(e,t){var n=t.selector,r=e.indexes?e.indexes.slice(0):[];t.index&&(r=[t.index]);var a=!!t.sort.find((e=>"desc"===Object.values(e)[0])),o=new Set;Object.keys(n).forEach((t=>{var r=X(e,t);r&&"boolean"===r.type&&Object.prototype.hasOwnProperty.call(n[t],"$eq")&&o.add(t)}));var i,s=t.sort.map((e=>Object.keys(e)[0])).filter((e=>!o.has(e))).join(","),l=-1;if(r.forEach((e=>{var r=!0,c=!0,u=e.map((e=>{var t=n[e],a=t?Object.keys(t):[],o={};t&&a.length?a.forEach((e=>{if(Me.has(e)){var n=function(e,t){switch(e){case"$eq":return{startKey:t,endKey:t,inclusiveEnd:!0,inclusiveStart:!0};case"$lte":return{endKey:t,inclusiveEnd:!0};case"$gte":return{startKey:t,inclusiveStart:!0};case"$lt":return{endKey:t,inclusiveEnd:!1};case"$gt":return{startKey:t,inclusiveStart:!1};default:throw new Error("SNH")}}(e,t[e]);o=Object.assign(o,n)}})):o={startKey:c?Ne:Ie,endKey:r?Ie:Ne,inclusiveStart:!0,inclusiveEnd:!0};return void 0===o.startKey&&(o.startKey=Ne),void 0===o.endKey&&(o.endKey=Ie),void 0===o.inclusiveStart&&(o.inclusiveStart=!0),void 0===o.inclusiveEnd&&(o.inclusiveEnd=!0),c&&!o.inclusiveStart&&(c=!1),r&&!o.inclusiveEnd&&(r=!1),o})),d=u.map((e=>e.startKey)),f=u.map((e=>e.endKey)),p={index:e,startKeys:d,endKeys:f,inclusiveEnd:r,inclusiveStart:c,sortSatisfiedByIndex:!a&&s===e.filter((e=>!o.has(e))).join(","),selectorSatisfiedByIndex:$e(e,t.selector,d,f)},h=function(e,t,n){var r=0,a=e=>{e>0&&(r+=e)},o=10,i=(0,P.Sd)(n.startKeys,(e=>e!==Ne&&e!==Ie));a(i*o);var s=(0,P.Sd)(n.startKeys,(e=>e!==Ie&&e!==Ne));a(s*o);var l=(0,P.Sd)(n.startKeys,((e,t)=>e===n.endKeys[t]));a(l*o*1.5);var c=n.sortSatisfiedByIndex?5:0;return a(c),r}(0,0,p);(h>=l||t.index)&&(l=h,i=p)})),!i)throw V("SNH",{query:t});return i}var Me=new Set(["$eq","$gt","$gte","$lt","$lte"]),Fe=new Set(["$eq","$gt","$gte"]),Be=new Set(["$eq","$lt","$lte"]);function $e(e,t,n,r){var a=Object.entries(t).find((t=>{let[n,r]=t;return!e.includes(n)||Object.entries(r).find((e=>{let[t,n]=e;return!Me.has(t)}))}));if(a)return!1;if(t.$and||t.$or)return!1;var o=[],i=new Set;for(var[s,l]of Object.entries(t)){if(!e.includes(s))return!1;var c=Object.keys(l).filter((e=>Fe.has(e)));if(c.length>1)return!1;var u=c[0];if(u&&i.add(s),"$eq"!==u){if(o.length>0)return!1;o.push(u)}}var d=[],f=new Set;for(var[p,h]of Object.entries(t)){if(!e.includes(p))return!1;var m=Object.keys(h).filter((e=>Be.has(e)));if(m.length>1)return!1;var g=m[0];if(g&&f.add(p),"$eq"!==g){if(d.length>0)return!1;d.push(g)}}var y=0;for(var b of e){for(var v of[i,f]){if(!v.has(b)&&v.size>0)return!1;v.delete(b)}if(n[y]!==r[y]&&i.size>0&&f.size>0)return!1;y++}return!0}class qe extends Error{}const ze=Number.MAX_SAFE_INTEGER,Ue=Number.MIN_SAFE_INTEGER,Ke=Symbol("missing"),He=Object.freeze(new Error("mingo: cycle detected while processing object/array")),We=/^\[object ([a-zA-Z0-9]+)\]$/,Ve=e=>{const t=Et(e);let n=0,r=t.length;for(;r;)n=(n<<5)-n^t.charCodeAt(--r);return n>>>0},Ge=new Set(["null","undefined","boolean","number","string","date","regexp"]),Qe={null:0,undefined:0,number:1,string:2,object:3,array:4,boolean:5,date:6,regexp:7,function:8},Ye=(e,t)=>{e===Ke&&(e=void 0),t===Ke&&(t=void 0);const[n,r]=[e,t].map((e=>Qe[Je(e).toLowerCase()]));return n!==r?n-r:1===n||2===n||6===n?et?1:0:_t(e,t)?0:et?1:0};function Ze(e,t){if(!e)throw new qe(t)}const Je=e=>We.exec(Object.prototype.toString.call(e))[1],Xe=e=>"boolean"==typeof e,et=e=>"string"==typeof e,tt=e=>!isNaN(e)&&"number"==typeof e,nt=Array.isArray,rt=e=>{if(!e)return!1;const t=Object.getPrototypeOf(e);return(t===Object.prototype||null===t)&&"[object Object]"===Object.prototype.toString.call(e)},at=e=>e===Object(e),ot=e=>e instanceof Date,it=e=>e instanceof RegExp,st=e=>"function"==typeof e,lt=e=>null==e,ct=(e,t)=>e.includes(t),ut=(e,t)=>!ct(e,t),dt=e=>lt(e)||et(e)&&!e||e instanceof Array&&0===e.length||rt(e)&&0===Object.keys(e).length,ft=e=>e===Ke,pt=e=>e instanceof Array?e:[e],ht=(e,t)=>!!e&&Object.prototype.hasOwnProperty.call(e,t),mt=e=>"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView(e),gt=[ot,it,mt],yt=(e,t)=>{if(lt(e))return e;if(t.has(e))throw He;const n=e.constructor;if(gt.some((t=>t(e))))return new n(e);try{if(t.add(e),nt(e))return e.map((e=>yt(e,t)));if(rt(e)){const n={};for(const r in e)n[r]=yt(e[r],t);return n}}finally{t.delete(e)}return e},bt=e=>yt(e,new Set);function vt(e,t,n){if(n=n||{flatten:!1},ft(e)||lt(e))return t;if(ft(t)||lt(t))return e;if(a=t,!(rt(r=e)&&rt(a)||nt(r)&&nt(a))){if(n.skipValidation)return t||e;throw Error("mismatched types. must both be array or object")}var r,a;if(n.skipValidation=!0,nt(e)){const r=e,a=t;if(n.flatten){let e=0,o=0;for(;e{const o=Ct(r,t);n.has(o)?n.get(o).some((t=>_t(e[t],r)))||n.get(o).push(a):n.set(o,[a])})),n}function xt(e,t=Ve){if(e.some((e=>0==e.length)))return[];if(1===e.length)return Array.from(e);const n=function(e,t,n=Ye){if(dt(e))return e;const r=new Array,a=new Array;for(let o=0;on(e[0],t[0]))),At(a,r.map((e=>e[1])))}(e.map(((e,t)=>[t,e.length])),(e=>e[1])),r=e[n[0][0]],a=wt(r,t),o=new Map,i=new Array;return a.forEach(((t,a)=>{const s=t.map((e=>r[e])),l=s.map((e=>0)),c=s.map((e=>[n[0][0],0]));let u=!1;for(let r=1;rd[e]));u=s.map(((n,i)=>e.some(((e,s)=>{const u=l[i];return _t(n,e)&&(l[i]++,tt===e.length-1?[s[n],c[n]]:Ke)).filter((e=>e!==Ke)))})),i.sort(((e,t)=>{const[n,[r,a]]=e,[o,[i,s]]=t,l=Ye(r,i);return 0!==l?l:Ye(a,s)})).map((e=>e[0]))}function kt(e,t=0){const n=new Array;return function e(t,r){for(let a=0,o=t.length;a0||r<0)?e(t[a],Math.max(-1,r-1)):n.push(t[a])}(e,t),n}function _t(e,t){if(e===t||Object.is(e,t))return!0;const n=!!e&&e.constructor||e;if(null===e||null===t||void 0===e||void 0===t||n!==t.constructor||n===Function)return!1;if(n===Array||n===Object){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;if(new Set([...n,...r]).size!=n.length)return!1;for(const a of n)if(!_t(e[a],t[a]))return!1;return!0}const r=Object.getPrototypeOf(e);return(mt(e)||r!==Object.prototype&&r!==Array.prototype&&Object.prototype.hasOwnProperty.call(r,"toString"))&&e.toString()===t.toString()}const St=(e,t)=>{if(null===e)return"null";if(void 0===e)return"undefined";const n=e.constructor;switch(n){case RegExp:case Number:case Boolean:case Function:case Symbol:return e.toString();case String:return JSON.stringify(e);case Date:return e.toISOString()}if(mt(e))return n.name+"["+e.toString()+"]";if(t.has(e))throw He;try{if(t.add(e),nt(e))return"["+e.map((e=>St(e,t))).join(",")+"]";if(n===Object)return"{"+Object.keys(e).sort().map((n=>n+":"+St(e[n],t))).join(",")+"}";const r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==Array.prototype&&Object.prototype.hasOwnProperty.call(r,"toString"))return n.name+"("+JSON.stringify(e.toString())+")";const[a,o]=(e=>{let[t,n]=[Object.getPrototypeOf(e),Object.getOwnPropertyNames(e)],r=t;for(;!n.length&&t!==Object.prototype&&t!==Array.prototype;)r=t,n=Object.getOwnPropertyNames(t),t=Object.getPrototypeOf(t);const a={};return n.forEach((t=>a[t]=e[t])),[a,r]})(e);return n.name+St(a,t)}finally{t.delete(e)}},Et=e=>St(e,new Set);function Ct(e,t){return t=t||Ve,lt(e)?null:t(e).toString()}function Ot(e,t,n=Ve){if(e.length<1)return new Map;const r=new Map,a=new Map;for(let o=0;o_t(e,s))):null;lt(e)?(a.set(s,[i]),r.has(l)?r.get(l).push(s):r.set(l,[s])):a.get(e).push(i)}}return a}const Tt=5e4;function At(e,...t){return e instanceof Array?t.reduce(((e,t)=>{let n=Math.ceil(t.length/Tt),r=0;for(;n-- >0;)Array.prototype.push.apply(e,t.slice(r,r+Tt)),r+=Tt;return e}),e):t.filter(at).reduce(((e,t)=>(Object.assign(e,t),e)),e)}function jt(e,t){return at(e)?e[t]:void 0}function Pt(e,t,n){let r=0;const a=Ge.has(Je(e).toLowerCase())?e:function e(t,n){let a=t;for(let o=0;o0)break;r+=1;const t=n.slice(o);a=a.reduce(((n,r)=>{const a=e(r,t);return void 0!==a&&n.push(a),n}),[]);break}if(a=jt(a,t),void 0===a)break}return a}(e,t.split("."));return a instanceof Array&&n?.unwrapArray?function(e,t){if(t<1)return e;for(;t--&&1===e.length;)e=e[0];return e}(a,r):a}function Rt(e,t,n){const r=t.split("."),a=r[0],o=r.slice(1).join("."),i=null!==/^\d+$/.exec(a),s=r.length>1;let l,c;if(e instanceof Array)if(i)l=jt(e,Number(a)),s&&(l=Rt(l,o,n)),l=[l];else{l=[];for(const r of e)c=Rt(r,t,n),n?.preserveMissing?(void 0===c&&(c=Ke),l.push(c)):void 0!==c&&l.push(c)}else{if(c=jt(e,a),s&&(c=Rt(c,o,n)),void 0===c)return;l=n?.preserveKeys?{...e}:{},l[a]=c}return l}function Dt(e){if(e instanceof Array)for(let t=e.length-1;t>=0;t--)e[t]===Ke?e.splice(t,1):Dt(e[t]);else if(rt(e))for(const t in e)ht(e,t)&&Dt(e[t])}const It=/^\d+$/;function Nt(e,t,n,r){const a=t.split("."),o=a[0],i=a.slice(1).join(".");if(1===a.length)(rt(e)||nt(e)&&It.test(o))&&n(e,o);else{r?.buildGraph&<(e[o])&&(e[o]={});const t=e[o];if(!t)return;const s=!!(a.length>1&&It.test(a[1]));t instanceof Array&&r?.descendArray&&!s?t.forEach((e=>Nt(e,i,n,r))):Nt(t,i,n,r)}}function Lt(e,t,n){Nt(e,t,((e,t)=>{e[t]=st(n)?n(e[t]):n}),{buildGraph:!0})}function Mt(e,t,n){Nt(e,t,((e,t)=>{if(e instanceof Array){if(/^\d+$/.test(t))e.splice(parseInt(t),1);else if(n&&n.descendArray)for(const n of e)rt(n)&&delete n[t]}else rt(e)&&delete e[t]}),n)}const Ft=/^\$[a-zA-Z0-9_]+$/;function Bt(e){return Ft.test(e)}function $t(e){if(Ge.has(Je(e).toLowerCase()))return it(e)?{$regex:e}:{$eq:e};if(at(e)){const t=e;if(!Object.keys(t).some(Bt))return{$eq:e};if(ht(e,"$regex")){const t={...e};return t.$regex=new RegExp(e.$regex,e.$options),delete t.$options,t}}return e}var qt=(e=>(e.CLONE_ALL="CLONE_ALL",e.CLONE_INPUT="CLONE_INPUT",e.CLONE_OUTPUT="CLONE_OUTPUT",e.CLONE_OFF="CLONE_OFF",e))(qt||{});class zt{constructor(e,t,n,r=Date.now()){this._opts=e,this._root=t,this._local=n,this.timestamp=r,this.update(t,n)}static init(e,t,n){return e instanceof zt?new zt(e._opts,lt(e.root)?t:e.root,Object.assign({},e.local,n)):new zt(e,t,n)}update(e,t){return this._root=e,this._local=t?Object.assign({},t,{variables:Object.assign({},this._local?.variables,t?.variables)}):t,this}getOptions(){return Object.freeze({...this._opts,context:Ht.from(this._opts.context)})}get root(){return this._root}get local(){return this._local}get idKey(){return this._opts.idKey}get collation(){return this._opts?.collation}get processingMode(){return this._opts?.processingMode||"CLONE_OFF"}get useStrictMode(){return this._opts?.useStrictMode}get scriptEnabled(){return this._opts?.scriptEnabled}get useGlobalContext(){return this._opts?.useGlobalContext}get hashFunction(){return this._opts?.hashFunction}get collectionResolver(){return this._opts?.collectionResolver}get jsonSchemaValidator(){return this._opts?.jsonSchemaValidator}get variables(){return this._opts?.variables}get context(){return this._opts?.context}}function Ut(e){return e instanceof zt?e.getOptions():Object.freeze({idKey:"_id",scriptEnabled:!0,useStrictMode:!0,useGlobalContext:!0,processingMode:"CLONE_OFF",...e,context:e?.context?Ht.from(e?.context):Ht.init({})})}var Kt=(e=>(e.ACCUMULATOR="accumulator",e.EXPRESSION="expression",e.PIPELINE="pipeline",e.PROJECTION="projection",e.QUERY="query",e.WINDOW="window",e))(Kt||{});class Ht{constructor(e){this.operators={accumulator:{},expression:{},pipeline:{},projection:{},query:{},window:{}};for(const[t,n]of Object.entries(e))this.addOperators(t,n)}static init(e={}){return new Ht(e)}static from(e){return new Ht(e.operators)}addOperators(e,t){for(const[n,r]of Object.entries(t))this.getOperator(e,n)||(this.operators[e][n]=r);return this}addAccumulatorOps(e){return this.addOperators("accumulator",e)}addExpressionOps(e){return this.addOperators("expression",e)}addQueryOps(e){return this.addOperators("query",e)}addPipelineOps(e){return this.addOperators("pipeline",e)}addProjectionOps(e){return this.addOperators("projection",e)}addWindowOps(e){return this.addOperators("window",e)}getOperator(e,t){return e in this.operators&&this.operators[e][t]||null}}const Wt=Ht.init();function Vt(e,t){for(const[n,r]of Object.entries(t)){Ze(st(r)&&Bt(n),`'${n}' is not a valid operator`);const t=Gt(e,n,null);Ze(!t||r===t,`${n} already exists for '${e}' operators. Cannot change operator function once registered.`)}switch(e){case"accumulator":Wt.addAccumulatorOps(t);break;case"expression":Wt.addExpressionOps(t);break;case"pipeline":Wt.addPipelineOps(t);break;case"projection":Wt.addProjectionOps(t);break;case"query":Wt.addQueryOps(t);break;case"window":Wt.addWindowOps(t)}}function Gt(e,t,n){const{context:r,useGlobalContext:a}=n||{},o=r?r.getOperator(e,t):null;return!o&&a?Wt.getOperator(e,t):o}const Qt={$$ROOT:(e,t,n)=>n.root,$$CURRENT:(e,t,n)=>e,$$REMOVE(e,t,n){},$$NOW:(e,t,n)=>new Date(n.timestamp)},Yt={$$KEEP:(e,t,n)=>e,$$PRUNE(e,t,n){},$$DESCEND(e,t,n){if(!ht(t,"$cond"))return e;let r;for(const[a,o]of Object.entries(e))if(at(o)){if(o instanceof Array){const e=[];for(let r of o)rt(r)&&(r=Jt(r,t,n.update(r))),lt(r)||e.push(r);r=e}else r=Jt(o,t,n.update(o));lt(r)?delete e[a]:e[a]=r}return e}};function Zt(e,t,n,r){const a=zt.init(r,e);if(Bt(n=n||"")){const o=Gt("expression",n,r);if(o)return o(e,t,a);const i=Gt("accumulator",n,r);if(i)return e instanceof Array||(e=Zt(e,t,null,a),t=null),Ze(e instanceof Array,`'${n}' target must be an array.`),i(e,t,a.update(null,a.local));throw new qe(`operator '${n}' is not registered`)}if(et(t)&&t.length>0&&"$"===t[0]){if(ht(Yt,t))return t;let n=a.root;const r=t.split(".");if(ht(Qt,r[0]))n=Qt[r[0]](e,null,a),t=t.slice(r[0].length+1);else if("$$"===r[0].slice(0,2)){n=Object.assign({},a.variables,{this:e},a.local?.variables);const o=r[0].slice(2);Ze(ht(n,o),`Use of undefined variable: ${o}`),t=t.slice(2)}else t=t.slice(1);return""===t?n:Pt(n,t)}if(nt(t))return t.map((t=>Zt(e,t,null,a)));if(rt(t)){const n={};for(const[o,i]of Object.entries(t))if(n[o]=Zt(e,i,o,a),["expression","accumulator"].some((e=>!!Gt(e,o,r))))return Ze(1===Object.keys(t).length,"Invalid aggregation expression '"+JSON.stringify(t)+"'"),n[o];return n}return t}function Jt(e,t,n){const r=Zt(e,t,null,n);return ht(Yt,r)?Yt[r](e,t,n):r}function Xt(e){return e instanceof nn?e:new nn(e)}function en(e,t){const n=e.slice(t+1);e.splice(t),Array.prototype.push.apply(e,n)}const tn=new Error;class nn{constructor(e){let t;if(this.iteratees=[],this.yieldedValues=[],this.isDone=!1,e instanceof Function&&(e={next:e}),(n=e)&&"object"==typeof n&&n?.next instanceof Function){const n=e;t=()=>{const e=n.next();if(e.done)throw tn;return e.value}}else if(e instanceof Array){const n=e,r=n.length;let a=0;t=()=>{if(a0?this.push(2,e):this}drop(e){return e>0?this.push(3,e):this}transform(e){const t=this;let n;return Xt((()=>(n||(n=Xt(e(t.value()))),n.next())))}value(){return this.isDone||(this.isDone=this.getNext(!0).done),this.yieldedValues}each(e){for(;;){const t=this.next();if(t.done)break;if(!1===e(t.value))return!1}return!0}reduce(e,t){let n=this.next();for(void 0!==t||n.done||(t=n.value,n=this.next());!n.done;)t=e(t,n.value),n=this.next();return t}size(){return this.reduce(((e,t)=>++e),0)}[Symbol.iterator](){return this}}class rn{constructor(e,t){this.pipeline=e,this.options=Ut(t)}stream(e){let t=Xt(e);const n=this.options.processingMode;n!=qt.CLONE_ALL&&n!=qt.CLONE_INPUT||t.map(bt);const r=new Array;if(!dt(this.pipeline))for(const a of this.pipeline){const e=Object.keys(a),n=e[0],o=Gt(Kt.PIPELINE,n,this.options);Ze(1===e.length&&!!o,`invalid pipeline operator ${n}`),r.push(n),t=o(t,a[n],this.options)}return(n==qt.CLONE_OUTPUT||n==qt.CLONE_ALL&&xt([["$group","$unwind"],r]).length)&&t.map(bt),t}run(e){return this.stream(e).value()}}class an{constructor(e,t,n,r){this.source=e,this.predicate=t,this.projection=n,this.options=r,this.operators=[],this.result=null,this.buffer=[]}fetch(){return this.result||(rt(this.projection)&&this.operators.push({$project:this.projection}),this.result=Xt(this.source).filter(this.predicate),this.operators.length>0&&(this.result=new rn(this.operators,this.options).stream(this.result))),this.result}fetchAll(){const e=Xt([...this.buffer]);return this.buffer=[],function(...e){let t=0;return Xt((()=>{for(;t0)return this.buffer.pop();const e=this.fetch().next();return e.done?void 0:e.value}hasNext(){if(this.buffer.length>0)return!0;const e=this.fetch().next();return!e.done&&(this.buffer.push(e.value),!0)}map(e){return this.all().map(e)}forEach(e){this.all().forEach(e)}[Symbol.iterator](){return this.fetchAll()}}class on{constructor(e,t){this.condition=e,this.options=Ut(t),this.compiled=[],this.compile()}compile(){Ze(rt(this.condition),`query criteria must be an object: ${JSON.stringify(this.condition)}`);const e={};for(const[t,n]of Object.entries(this.condition)){if("$where"===t)Object.assign(e,{field:t,expr:n});else if(ct(["$and","$or","$nor","$expr","$jsonSchema"],t))this.processOperator(t,t,n);else{Ze(!Bt(t),`unknown top level operator: ${t}`);for(const[e,r]of Object.entries($t(n)))this.processOperator(t,e,r)}e.field&&this.processOperator(e.field,e.field,e.expr)}}processOperator(e,t,n){const r=Gt(Kt.QUERY,t,this.options);if(!r)throw new qe(`unknown query operator ${t}`);const a=r(e,n,this.options);this.compiled.push(a)}test(e){for(let t=0,n=this.compiled.length;tthis.test(e)),t||{},this.options)}remove(e){return e.reduce(((e,t)=>(this.test(t)||e.push(t),e)),[])}}const sn=(e,t,n)=>{if(dt(t)||!rt(t))return e;let r=Ye;const a=n.collation;return rt(a)&&et(a.locale)&&(r=function(e){const t={sensitivity:ln[e.strength||3],caseFirst:"off"===e.caseFirst?"false":e.caseFirst||"false",numeric:e.numericOrdering||!1,ignorePunctuation:"shifted"===e.alternate};!0===(e.caseLevel||!1)&&("base"===t.sensitivity&&(t.sensitivity="case"),"accent"===t.sensitivity&&(t.sensitivity="variant"));const n=new Intl.Collator(e.locale,t);return(e,t)=>{if(!et(e)||!et(t))return Ye(e,t);const r=n.compare(e,t);return r<0?-1:r>0?1:0}}(a)),e.transform((e=>{const a=Object.keys(t);for(const o of a.reverse()){const a=Ot(e,(e=>Pt(e,o)),n.hashFunction),i=Array.from(a.keys()).sort(r);-1===t[o]&&i.reverse(),e=[],i.reduce(((e,t)=>At(e,a.get(t))),e)}return e}))},ln={1:"base",2:"accent",3:"variant"};function cn(e){const t=(t,n,r)=>{const a={unwrapArray:!0},o=Math.max(1,t.split(".").length-1);return i=>{const s=Pt(i,t,a);return e(s,n,{...r,depth:o})}};return t.op="query",t}function un(e){return(t,n,r)=>{const a=Zt(t,n,null,r);return e(...a)}}function dn(e,t,n){if(_t(e,t))return!0;if(lt(e)&<(t))return!0;if(e instanceof Array){const r=_t.bind(null,t);return e.some(r)||kt(e,n?.depth).some(r)}return!1}function fn(e,t,n){return!dn(e,t,n)}function pn(e,t,n){return lt(e)?t.some((e=>null===e)):xt([pt(e),t],n?.hashFunction).length>0}function hn(e,t,n){return!pn(e,t,n)}function mn(e,t,n){return Cn(e,t,((e,t)=>Ye(e,t)<0))}function gn(e,t,n){return Cn(e,t,((e,t)=>Ye(e,t)<=0))}function yn(e,t,n){return Cn(e,t,((e,t)=>Ye(e,t)>0))}function bn(e,t,n){return Cn(e,t,((e,t)=>Ye(e,t)>=0))}function vn(e){return Bt(e)&&-1===["$and","$or","$nor"].indexOf(e)}function wn(e,t,n){if(nt(e)&&!dt(e)){let r=e=>e,a=t;Object.keys(t).every(vn)&&(a={temp:t},r=e=>({temp:e}));const o=new on(a,n);for(let t=0,n=e.length;tnull===e,kn=e=>tt(e)&&e>=-2147483648&&e<=2147483647&&-1===e.toString().indexOf("."),_n=e=>tt(e)&&e>=Ue&&e<=ze&&-1===e.toString().indexOf("."),Sn={array:nt,bool:Xe,boolean:Xe,date:ot,decimal:tt,double:tt,int:kn,long:_n,number:tt,null:xn,object:rt,regex:it,regexp:it,string:et,undefined:lt,function:e=>{throw new qe("unsupported type key `function`.")},1:tt,2:et,3:rt,4:nt,6:lt,8:Xe,9:ot,10:xn,11:it,16:kn,18:_n,19:tt};function En(e,t,n){const r=Sn[t];return!!r&&r(e)}function Cn(e,t,n){return pt(e).some((e=>Je(e)===Je(t)&&n(e,t)))}un(hn);const On=(e,t)=>(n,r,a)=>{Ze(nt(r),`${e}: expression must be an array.`);const o=Zt(n,r,null,a);return o.some(lt)?null:(Ze(o.every(tt),`${e}: expression must evalue to array of numbers.`),t(o))};On("$bitAnd",(e=>e.reduce(((e,t)=>e&t),-1))),On("$bitOr",(e=>e.reduce(((e,t)=>e|t),0))),On("$bitXor",(e=>e.reduce(((e,t)=>e^t),0))),un(dn),un(yn),un(bn),un(mn),un(gn),un(fn);const Tn=(e,t)=>{const n={};return e.split("").forEach(((e,r)=>n[e]=t*(r+1))),n};Tn("ABCDEFGHIKLM",1),Tn("NOPQRSTUVWXY",-1);const An={undefined:null,null:null,NaN:NaN,Infinity:new Error,"-Infinity":new Error};function jn(e,t=An){const n=Object.assign({},An,t),r=new Set(Object.keys(n));return(t,a,o)=>{const i=Zt(t,a,null,o);if(r.has(`${i}`)){const t=n[`${i}`];if(t instanceof Error)throw new qe(`cannot apply $${e.name} to -inf, value must in (-inf,inf)`);return t}return e(i)}}jn(Math.acos,{Infinity:1/0,0:new Error}),jn(Math.acosh,{Infinity:1/0,0:new Error}),jn(Math.asin),jn(Math.asinh,{Infinity:1/0,"-Infinity":-1/0}),jn(Math.atan),jn(Math.atanh,{1:1/0,"-1":-1/0}),jn(Math.cos),jn(Math.cosh,{"-Infinity":1/0,Infinity:1/0});const Pn=Math.PI/180,Rn=(jn((e=>e*Pn),{Infinity:1/0,"-Infinity":1/0}),180/Math.PI);jn((e=>e*Rn),{Infinity:1/0,"-Infinity":-1/0}),jn(Math.sin),jn(Math.sinh,{"-Infinity":-1/0,Infinity:1/0}),jn(Math.tan);Error;const Dn=(e,t,n)=>{if(dt(t))return e;let r=Object.keys(t),a=!1;Nn(t,n);const o=n.idKey;if(ct(r,o)){const e=t[o];0!==e&&!1!==e||(r=r.filter(ut.bind(null,[o])),a=0==r.length)}else r.push(o);const i=zt.init(n);return e.map((e=>In(e,t,i.update(e),r,a)))};function In(e,t,n,r,a){let o={},i=!1,s=!1;const l=[];a&&l.push(n.idKey);for(const c of r){let r;const a=t[c];if(c!==n.idKey&&ct([0,!1],a)&&(s=!0),c===n.idKey&&dt(a))r=e[c];else if(et(a))r=Zt(e,a,c,n);else if(ct([1,!0],a));else if(a instanceof Array)r=a.map((t=>{const r=Zt(e,t,null,n);return lt(r)?null:r}));else{if(!rt(a)){l.push(c);continue}{const t=a,o=Object.keys(a),s=1==o.length?o[0]:"",l=Gt(Kt.PROJECTION,s,n);if(l)"$slice"===s?pt(t[s]).every(tt)?(r=l(e,t[s],c,n),i=!0):r=Zt(e,t,c,n):r=l(e,t[s],c,n);else if(Bt(s))r=Zt(e,t[s],s,n);else if(ht(e,c)){Nn(t,n);let a=e[c];a instanceof Array?r=a.map((e=>In(e,t,n,o,!1))):(a=rt(a)?a:e,r=In(a,t,n,o,!1))}else r=Zt(e,a,null,n)}}const u=Rt(e,c,{preserveMissing:!0});void 0!==u&&vt(o,u,{flatten:!0}),ut([0,1,!1,!0],a)&&(void 0===r?Mt(o,c,{descendArray:!0}):Lt(o,c,r))}if(Dt(o),(i||s||a)&&(o=At({},e,o),l.length>0))for(const c of l)Mt(o,c,{descendArray:!0});return o}function Nn(e,t){const n=[!1,!1];for(const[r,a]of Object.entries(e)){if(r===t?.idKey)return;0===a||!1===a?n[0]=!0:1!==a&&!0!==a||(n[1]=!0),Ze(!(n[0]&&n[1]),"Projection cannot have a mix of inclusion and exclusion.")}}const Ln=(e,t,n)=>{Ze(nt(t),"Invalid expression: $and expects value to be an Array.");const r=t.map((e=>new on(e,n)));return e=>r.every((t=>t.test(e)))},Mn=(e,t,n)=>{Ze(nt(t),"Invalid expression. $or expects value to be an Array");const r=t.map((e=>new on(e,n)));return e=>r.some((t=>t.test(e)))},Fn=(e,t,n)=>{Ze(nt(t),"Invalid expression. $nor expects value to be an array.");const r=Mn(0,t,n);return e=>!r(e)},Bn=(e,t,n)=>{const r={};r[e]=$t(t);const a=new on(r,n);return e=>!a.test(e)},$n=cn(dn),qn=cn(yn),zn=cn(bn),Un=cn(pn),Kn=cn(mn),Hn=cn(gn),Wn=cn(fn),Vn=cn(hn);const Gn=cn((function(e,t,n){return pt(e).some((e=>2===t.length&&e%t[0]===t[1]))})),Qn=cn((function(e,t,n){const r=pt(e),a=e=>et(e)&&((e,t=!0)=>!!e||t&&""===e)(t.exec(e),n?.useStrictMode);return r.some(a)||kt(r,1).some(a)}));cn((function(e,t,n){if(!(nt(e)&&nt(t)&&e.length&&t.length))return!1;let r=!0;for(const a of t){if(!r)break;r=rt(a)&&ct(Object.keys(a),"$elemMatch")?wn(e,a.$elemMatch,n):a instanceof RegExp?e.some((e=>"string"==typeof e&&a.test(e))):e.some((e=>_t(a,e)))}return r}));const Yn=cn(wn),Zn=cn((function(e,t,n){return Array.isArray(e)&&e.length===t})),Jn=cn((function(e,t,n){return(!1===t||0===t)&&void 0===e||(!0===t||1===t)&&void 0!==e})),Xn=cn((function(e,t,n){return Array.isArray(t)?t.findIndex((t=>En(e,t)))>=0:En(e,t)}));var er=!1;function tr(e,t){var n=ee(e.primaryKey);t=v(t);var r=x(t);if("number"!=typeof r.skip&&(r.skip=0),r.selector?(r.selector=r.selector,Object.entries(r.selector).forEach((e=>{let[t,n]=e;"object"==typeof n&&null!==n||(r.selector[t]={$eq:n})}))):r.selector={},r.index){var a=(0,P.$r)(r.index);a.includes(n)||a.push(n),r.index=a}if(r.sort){var o=r.sort.find((e=>{return t=e,Object.keys(t)[0]===n;var t}));o||(r.sort=r.sort.slice(0),r.sort.push({[n]:"asc"}))}else if(r.index)r.sort=r.index.map((e=>({[e]:"asc"})));else{if(e.indexes){var i=new Set;Object.entries(r.selector).forEach((e=>{let[t,n]=e;("object"!=typeof n||null===n||!!Object.keys(n).find((e=>Me.has(e))))&&i.add(t)}));var s,l=-1;e.indexes.forEach((e=>{var t=(0,P.k_)(e)?e:[e],n=t.findIndex((e=>!i.has(e)));n>0&&n>l&&(l=n,s=t)})),s&&(r.sort=s.map((e=>({[e]:"asc"}))))}r.sort||(r.sort=[{[n]:"asc"}])}return r}function nr(e,t){if(!t.sort)throw V("SNH",{query:t});var n=[];t.sort.forEach((e=>{var t,r,a,o=Object.keys(e)[0],i=Object.values(e)[0];n.push({key:o,direction:i,getValueFn:(t=o,r=t.split("."),a=r.length,1===a?e=>e[t]:e=>{for(var t=e,n=0;n{for(var r=0;rr.test(e)}async function ar(e,t){var n=await e.exec();return n?Array.isArray(n)?Promise.all(n.map((e=>t(e)))):await t(n):null}function or(e){return e===Ne?-1/0:e}function ir(e,t,n){return e.includes(t)?n===Ie||!0===n?"1":"0":n}function sr(e,t,n){if(!n){if("undefined"==typeof window)throw new Error("IDBKeyRange missing");n=window.IDBKeyRange}var r=t.startKeys.map(((n,r)=>{var a=t.index[r];return ir(e,a,n)})).map(or),a=t.endKeys.map(((n,r)=>{var a=t.index[r];return ir(e,a,n)})).map(or);return n.bound(r,a,!t.inclusiveStart,!t.inclusiveEnd)}async function lr(e,t){var n=await e.internals,r=t.query,a=r.skip?r.skip:0,o=a+(r.limit?r.limit:1/0),i=t.queryPlan,s=!1;i.selectorSatisfiedByIndex||(s=rr(e.schema,t.query));var l=sr(n.booleanIndexes,i,n.dexieDb._options.IDBKeyRange),c=i.index,u=[];if(await n.dexieDb.transaction("r",n.dexieTable,(async e=>{var t,r=e.idbtrans.objectStore(oe);t="["+c.map((e=>fe(e))).join("+")+"]";var a=r.index(t).openCursor(l);await new Promise((e=>{a.onsuccess=function(t){var r=t.target.result;if(r){var a=me(n.booleanIndexes,r.value);s&&!s(a)||u.push(a),i.sortSatisfiedByIndex&&u.length===o?e():r.continue()}else e()}}))})),!i.sortSatisfiedByIndex){var d=nr(e.schema,t.query);u=u.sort(d)}return{documents:u=u.slice(a,o)}}function cr(e){for(var t="",n=0;n0&&dr[e].forEach((e=>e(t)))}function pr(e,t){return Promise.all(dr[e].map((e=>e(t))))}var hr="_rxdb_internal";async function mr(e,t){var n=(await e.findDocumentsById([t],!1))[0];return n||void 0}async function gr(e,t,n){var r=await e.bulkWrite([t],n);if(r.error.length>0)throw r.error[0];return _r(ee(e.schema.primaryKey),[t],r)[0]}function yr(e,t,n,r){if(r)throw 409===r.status?V("CONFLICT",{collection:e.name,id:t,writeError:r,data:n}):422===r.status?V("VD2",{collection:e.name,id:t,writeError:r,data:n}):r}function br(e){return{previous:e.previous,document:vr(e.document)}}function vr(e){if(!e._attachments||0===Object.keys(e._attachments).length)return e;var t=v(e);return t._attachments={},Object.entries(e._attachments).forEach((e=>{let[n,r]=e;var a,o,i;t._attachments[n]=(i=(a=r).data)?{length:(o=i,atob(o).length),digest:a.digest,type:a.type}:a})),t}function wr(e){return Object.assign({},e,{_meta:v(e._meta)})}var xr=new WeakMap;function kr(e,t,n){q.deepFreezeWhenDevMode(n);var r=ee(t.schema.primaryKey),a={originalStorageInstance:t,schema:t.schema,internals:t.internals,collectionName:t.collectionName,databaseName:t.databaseName,options:t.options,bulkWrite(n,a){for(var o=e.token,i=new Array(n.length),s=(0,je.t)(),l=0;lt.bulkWrite(i,a))).then((n=>{var o={error:[]},s=_r(r,i,n);xr.set(o,s);var l=0===n.error.length?[]:n.error.filter((e=>!(409!==e.status||e.writeRow.previous||e.writeRow.document._deleted||!(0,De.ZN)(e.documentInDb)._deleted)||(o.error.push(e),!1)));if(l.length>0){var c=l.map((t=>({previous:t.documentInDb,document:Object.assign({},t.writeRow.document,{_rev:ur(e.token,t.documentInDb)})})));return e.lockedRun((()=>t.bulkWrite(c,a))).then((e=>{(0,P.Hb)(o.error,e.error);var t=_r(r,c,e);return(0,P.Hb)(s,t),o}))}return o}))},query:n=>e.lockedRun((()=>t.query(n))),count:n=>e.lockedRun((()=>t.count(n))),findDocumentsById:(n,r)=>e.lockedRun((()=>t.findDocumentsById(n,r))),getAttachmentData:(n,r,a)=>e.lockedRun((()=>t.getAttachmentData(n,r,a))),getChangedDocumentsSince:t.getChangedDocumentsSince?(n,r)=>e.lockedRun((()=>t.getChangedDocumentsSince((0,De.ZN)(n),r))):void 0,cleanup:n=>e.lockedRun((()=>t.cleanup(n))),remove:()=>(e.storageInstances.delete(a),e.lockedRun((()=>t.remove()))),close:()=>(e.storageInstances.delete(a),e.lockedRun((()=>t.close()))),changeStream:()=>t.changeStream(),conflictResultionTasks:()=>t.conflictResultionTasks(),resolveConflictResultionTask(e){if(e.output.isEqual)return t.resolveConflictResultionTask(e);var n=v(Object.assign({},e.output.documentData,{_meta:{lwt:1},_rev:"",_attachments:{}}));return delete n._meta,delete n._rev,delete n._attachments,t.resolveConflictResultionTask({id:e.id,output:{isEqual:!1,documentData:n}})}};return e.storageInstances.add(a),a}function _r(e,t,n){var r=xr.get(n);if(r)return r;var a=[];if(n.error.length>0){for(var o=new Set,i=0;i{this._to=!1,function(e){const t=Mr()-e.ttl,n=e.map[Symbol.iterator]();for(;;){const r=n.next().value;if(!r)return;const a=r[0];if(!(r[1]0&&void 0!==arguments[0]?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return void 0===t.webWorkerSupport&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=45e3),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&"function"==typeof e.idb.onclose&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=6e4),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=12e4),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),void 0===t.node.useFastPath&&(t.node.useFastPath=!0),t}var Br="messages",$r={durability:"relaxed"};function qr(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function zr(e){e.commit&&e.commit()}function Ur(e,t){var n=e.transaction(Br,"readonly",$r),r=n.objectStore(Br),a=[],o=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var i=r.getAll(o);return new Promise((function(e,t){i.onerror=function(e){return t(e)},i.onsuccess=function(t){e(t.target.result)}}))}return new Promise((function(e,i){var s=function(){try{return o=IDBKeyRange.bound(t+1,1/0),r.openCursor(o)}catch(e){return r.openCursor()}}();s.onerror=function(e){return i(e)},s.onsuccess=function(r){var o=r.target.result;o?o.value.ide.lastCursorId&&(e.lastCursorId=t.id),t})).filter((function(t){return function(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time0||e._addEL.internal.length>0}function la(e,t,n){e._addEL[t].push(n),function(e){if(!e._iL&&sa(e)){var t=function(t){e._addEL[t.type].forEach((function(e){t.time>=e.time&&e.fn(t.data)}))},n=e.method.microSeconds();e._prepP?e._prepP.then((function(){e._iL=!0,e.method.onMessage(e._state,t,n)})):(e._iL=!0,e.method.onMessage(e._state,t,n))}}(e)}function ca(e,t,n){e._addEL[t]=e._addEL[t].filter((function(e){return e!==n})),function(e){if(e._iL&&!sa(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}(e)}oa._pubkey=!0,oa.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return ia(this,"message",e)},postInternal:function(e){return ia(this,"internal",e)},set onmessage(e){var t={time:this.method.microSeconds(),fn:e};ca(this,"message",this._onML),e&&"function"==typeof e?(this._onML=t,la(this,"message",t)):this._onML=null},addEventListener:function(e,t){la(this,e,{time:this.method.microSeconds(),fn:t})},removeEventListener:function(e,t){ca(this,e,this._addEL[e].find((function(e){return e.fn===t})))},close:function(){var e=this;if(!this.closed){ra.delete(this),this.closed=!0;var t=this._prepP?this._prepP:jr;return this._onML=null,this._addEL.message=[],t.then((function(){return Promise.all(Array.from(e._uMP))})).then((function(){return Promise.all(e._befC.map((function(e){return e()})))})).then((function(){return e.method.close(e._state)}))}},get type(){return this.method.type},get isClosed(){return this.closed}};var ua=new Map;function da(e,t){var n=ua.get(e);if(n)return n.refs.delete(t),0===n.refs.size?(ua.delete(e),n.bc.close()):void 0}function fa(e,t,n,r){if(t.multiInstance){var a=r||function(e,t,n,r){var a=ua.get(t);return a||(a={bc:new oa(["RxDB:",e,n].join("|")),refs:new Set},ua.set(t,a)),a.refs.add(r),a.bc}(e,t.databaseInstanceToken,n.databaseName,n),o=new Te,i=n=>{n.storageName===e&&n.databaseName===t.databaseName&&n.collectionName===t.collectionName&&n.version===t.schema.version&&o.next(n.eventBulk)};a.addEventListener("message",i);var s=n.changeStream(),l=!1,c=s.subscribe((n=>{l||a.postMessage({storageName:e,databaseName:t.databaseName,collectionName:t.collectionName,version:t.schema.version,eventBulk:n})}));n.changeStream=function(){return o.asObservable().pipe(function(){for(var e=[],t=0;t{if(!e.document._rev||e.previous&&!e.previous._rev)throw V("SNH",{args:{row:e}})}));var n=await this.internals,r={error:[]};this.devMode&&(e=e.map((e=>{var t=wr(e.document);return{previous:e.previous,document:t}})));var a,o=e.map((e=>e.document[this.primaryPath]));if(await n.dexieDb.transaction("rw",n.dexieTable,n.dexieAttachmentsTable,(async()=>{var i=new Map;(await ve(this.internals,o)).forEach((e=>{var t=e;return t&&i.set(t[this.primaryPath],t),t})),a=function(e,t,n,r,a,o,i){for(var s,l=!!e.schema.attachments,c=[],u=[],d=[],f={id:(0,J.z3)(10),events:[],checkpoint:null,context:a,startTime:(0,je.t)(),endTime:0},p=f.events,h=[],m=[],g=[],y=n.size>0,b=r.length,v=function(){var e,a=r[w],f=a.document,b=a.previous,v=f[t],x=f._deleted,k=b&&b._deleted,_=void 0;if(y&&(_=n.get(v)),_){var S=_._rev;if(!b||b&&S!==b._rev){var E={isError:!0,status:409,documentId:v,writeRow:a,documentInDb:_};return d.push(E),1}var C=l?br(a):a;l&&(x?b&&Object.keys(b._attachments).forEach((e=>{m.push({documentId:v,attachmentId:e,digest:(0,De.ZN)(b)._attachments[e].digest})})):(Object.entries(f._attachments).find((t=>{let[n,r]=t;return(b?b._attachments[n]:void 0)||r.data||(e={documentId:v,documentInDb:_,isError:!0,status:510,writeRow:a,attachmentId:n}),!0})),e||Object.entries(f._attachments).forEach((e=>{let[t,n]=e;var r=b?b._attachments[t]:void 0;if(r){var a=C.document._attachments[t].digest;n.data&&r.digest!==a&&g.push({documentId:v,attachmentId:t,attachmentData:n,digest:n.digest})}else h.push({documentId:v,attachmentId:t,attachmentData:n,digest:n.digest})})))),e?d.push(e):(l?(u.push(br(C)),i&&i(f)):(u.push(C),i&&i(f)),s=C);var O=null,T=null,A=null;if(k&&!x)A="INSERT",O=l?vr(f):f;else if(!b||k||x){if(!x)throw V("SNH",{args:{writeRow:a}});A="DELETE",O=(0,De.ZN)(f),T=b}else A="UPDATE",O=l?vr(f):f,T=b;var j={documentId:v,documentData:O,previousDocumentData:T,operation:A};p.push(j)}else{var P=!!x;if(l&&Object.entries(f._attachments).forEach((t=>{let[n,r]=t;r.data?h.push({documentId:v,attachmentId:n,attachmentData:r,digest:r.digest}):(e={documentId:v,isError:!0,status:510,writeRow:a,attachmentId:n},d.push(e))})),e||(l?(c.push(br(a)),o&&o(f)):(c.push(a),o&&o(f)),s=a),!P){var R={documentId:v,operation:"INSERT",documentData:l?vr(f):f,previousDocumentData:l&&b?vr(b):b};p.push(R)}}},w=0;w{s.push(e.document)})),a.bulkUpdateDocs.forEach((e=>{s.push(e.document)})),(s=s.map((e=>he(n.booleanIndexes,e)))).length>0&&await n.dexieTable.bulkPut(s);var l=[];a.attachmentsAdd.forEach((e=>{l.push({id:we(e.documentId,e.attachmentId),data:e.attachmentData.data})})),a.attachmentsUpdate.forEach((e=>{l.push({id:we(e.documentId,e.attachmentId),data:e.attachmentData.data})})),await n.dexieAttachmentsTable.bulkPut(l),await n.dexieAttachmentsTable.bulkDelete(a.attachmentsRemove.map((e=>we(e.documentId,e.attachmentId))))})),(a=(0,De.ZN)(a)).eventBulk.events.length>0){var i=(0,De.ZN)(a.newestRow).document;a.eventBulk.checkpoint={id:i[this.primaryPath],lwt:i._meta.lwt},a.eventBulk.endTime=(0,je.t)(),this.changes$.next(a.eventBulk)}return r},t.findDocumentsById=async function(e,t){ya(this);var n=await this.internals,r=[];return await n.dexieDb.transaction("r",n.dexieTable,(async()=>{(await ve(this.internals,e)).forEach((e=>{!e||e._deleted&&!t||r.push(e)}))})),r},t.query=function(e){return ya(this),lr(this,e)},t.count=async function(e){if(e.queryPlan.selectorSatisfiedByIndex){var t=await async function(e,t){var n=await e.internals,r=t.queryPlan,a=r.index,o=sr(n.booleanIndexes,r,n.dexieDb._options.IDBKeyRange),i=-1;return await n.dexieDb.transaction("r",n.dexieTable,(async e=>{var t,n=e.idbtrans.objectStore(oe);t="["+a.map((e=>fe(e))).join("+")+"]";var r=n.index(t).count(o);i=await new Promise(((e,t)=>{r.onsuccess=function(){e(r.result)},r.onerror=e=>t(e)}))})),i}(this,e);return{count:t,mode:"fast"}}return{count:(await lr(this,e)).documents.length,mode:"slow"}},t.changeStream=function(){return ya(this),this.changes$.asObservable()},t.cleanup=async function(e){ya(this);var t=await this.internals;return await t.dexieDb.transaction("rw",t.dexieTable,(async()=>{var n=(0,je.t)()-e,r=await t.dexieTable.where("_meta.lwt").below(n).toArray(),a=[];r.forEach((e=>{"1"===e._deleted&&a.push(e[this.primaryPath])})),await t.dexieTable.bulkDelete(a)})),!0},t.getAttachmentData=async function(e,t,n){ya(this);var r=await this.internals,a=we(e,t);return await r.dexieDb.transaction("r",r.dexieAttachmentsTable,(async()=>{var n=await r.dexieAttachmentsTable.get(a);if(n)return n.data;throw new Error("attachment missing documentId: "+e+" attachmentId: "+t)}))},t.remove=async function(){ya(this);var e=await this.internals;return await e.dexieTable.clear(),this.close()},t.close=function(){return this.closed||(this.closed=(async()=>{this.changes$.complete(),await async function(e){var t=await e,n=ue.get(e)-1;0===n?(t.dexieDb.close(),ue.delete(e)):ue.set(e,n)}(this.internals)})()),this.closed},t.conflictResultionTasks=function(){return new Te},t.resolveConflictResultionTask=async function(e){},e}();async function ga(e,t,n){var r=function(e,t,n,r){var a="rxdb-dexie-"+e+"--"+r.version+"--"+t,i=b(ce,a,(()=>{var e=(async()=>{var e=v(n);e.autoOpen=!1;var t=new o(a,e),i={[oe]:be(r),[ie]:"++sequence, id",[se]:"id"};return t.version(1).stores(i),await t.open(),{dexieDb:t,dexieTable:t[oe],dexieAttachmentsTable:t[se],booleanIndexes:xe(r)}})();return ce.set(a,i),ue.set(i,0),e}));return i}(t.databaseName,t.collectionName,n,t.schema),a=new ma(e,t.databaseName,t.collectionName,t.schema,r,t.options,n,t.devMode);return await fa(le,t,a),Promise.resolve(a)}function ya(e){if(e.closed)throw new Error("RxStorageInstanceDexie is closed "+e.databaseName+"-"+e.collectionName)}var ba="15.36.0",va=function(){function e(e){this.name=le,this.rxdbVersion=ba,this.settings=e}return e.prototype.createStorageInstance=function(e){return function(e){if(e.schema.keyCompression)throw V("UT5",{args:{params:e}});if((t=e.schema).encrypted&&t.encrypted.length>0||t.attachments&&t.attachments.encrypted)throw V("UT6",{args:{params:e}});var t;if(e.schema.attachments&&e.schema.attachments.compression)throw V("UT7",{args:{params:e}})}(e),ga(this,e,this.settings)},e}();function wa(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r;if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!wa(e[r],t[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var a=Object.keys(e);if((n=a.length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){var o=a[r];if(!wa(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}var xa=function(){function e(e,t){this.jsonSchema=e,this.hashFunction=t,this.indexes=function(e){return(e.indexes||[]).map((e=>(0,P.k_)(e)?e:[e]))}(this.jsonSchema),this.primaryPath=ee(this.jsonSchema.primaryKey),this.finalFields=ae(this.jsonSchema)}var t=e.prototype;return t.validateChange=function(e,t){this.finalFields.forEach((n=>{if(!wa(e[n],t[n]))throw V("DOC9",{dataBefore:e,dataAfter:t,fieldName:n,schema:this.jsonSchema})}))},t.getDocumentPrototype=function(){var e={},t=X(this.jsonSchema,"");return Object.keys(t).forEach((t=>{var n=t;e.__defineGetter__(t,(function(){if(this.get&&"function"==typeof this.get)return this.get(n)})),Object.defineProperty(e,t+"$",{get:function(){return this.get$(n)},enumerable:!1,configurable:!1}),Object.defineProperty(e,t+"$$",{get:function(){return this.get$$(n)},enumerable:!1,configurable:!1}),Object.defineProperty(e,t+"_",{get:function(){return this.populate(n)},enumerable:!1,configurable:!1})})),k(this,"getDocumentPrototype",(()=>e)),e},t.getPrimaryOfDocumentData=function(e){return te(this.jsonSchema,e)},N(e,[{key:"version",get:function(){return this.jsonSchema.version}},{key:"defaultValues",get:function(){var e={};return Object.entries(this.jsonSchema.properties).filter((e=>{let[,t]=e;return Object.prototype.hasOwnProperty.call(t,"default")})).forEach((t=>{let[n,r]=t;return e[n]=r.default})),k(this,"defaultValues",e)}},{key:"hash",get:function(){return k(this,"hash",this.hashFunction(JSON.stringify(this.jsonSchema)))}}])}();function ka(e,t,n){void 0===n&&(n=!0),n&&fr("preCreateRxSchema",e);var r=ne(e);r=function(e){return w(e,!0)}(r),q.deepFreezeWhenDevMode(r);var a=new xa(r,t);return fr("createRxSchema",a),a}var _a=n(7708),Sa=n(4370);function Ea(e,t){return(0,Sr.N)((function(n,r){var a=0;n.subscribe((0,Sa._)(r,(function(n){return e.call(t,n,a++)&&r.next(n)})))}))}function Ca(){for(var e=[],t=0;t0&&(t=new Ra.Ms({next:function(e){return m.next(e)},error:function(e){u=!0,d(),r=Da(f,a,e),m.error(e)},complete:function(){c=!0,d(),r=Da(f,i),m.complete()}}),(0,Pa.Tg)(e).subscribe(t))}))(e)}}({connector:function(){return new ja(i,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}var Na=n(1753);function La(e){var t=e.split("-"),n="RxDB";return t.forEach((e=>{n+=(0,J.Z2)(e)})),n+="Plugin",new Error("You are using a function which must be overwritten by a plugin.\n You should either prevent the usage of this function or add the plugin via:\n import { "+n+" } from 'rxdb/plugins/"+e+"';\n addRxPlugin("+n+");\n ")}function Ma(e){return e.documentData?e.documentData:e.previousDocumentData}var Fa=function(){function e(e,t,n,r){this.queueByDocId=new Map,this.isRunning=!1,this.storageInstance=e,this.primaryPath=t,this.preWrite=n,this.postWrite=r}var t=e.prototype;return t.addWrite=function(e,t){var n=e[this.primaryPath],r=b(this.queueByDocId,n,(()=>[]));return new Promise(((n,a)=>{var o={lastKnownDocumentState:e,modifier:t,resolve:n,reject:a};(0,De.ZN)(r).push(o),this.triggerRun()}))},t.triggerRun=async function(){if(!0!==this.isRunning&&0!==this.queueByDocId.size){this.isRunning=!0;var e=[],t=this.queueByDocId;this.queueByDocId=new Map,await Promise.all(Array.from(t.entries()).map((async t=>{let[n,r]=t;var a,o,i,s=(a=r.map((e=>e.lastKnownDocumentState)),o=a[0],i=cr(o._rev),a.forEach((e=>{var t=cr(e._rev);t>i&&(o=e,i=t)})),o),l=s;for(var c of r)try{l=await c.modifier(x(l))}catch(u){c.reject(u),c.reject=()=>{},c.resolve=()=>{}}try{await this.preWrite(l,s)}catch(u){return void r.forEach((e=>e.reject(u)))}e.push({previous:s,document:l})})));var n=e.length>0?await this.storageInstance.bulkWrite(e,"incremental-write"):{error:[]};return await Promise.all(_r(this.primaryPath,e,n).map((e=>{var n=e[this.primaryPath];this.postWrite(e),y(t,n).forEach((t=>t.resolve(e)))}))),n.error.forEach((e=>{var n,r=e.documentId,a=y(t,r),o=Q(e);if(o){var i=b(this.queueByDocId,r,(()=>[]));a.reverse().forEach((e=>{e.lastKnownDocumentState=(0,De.ZN)(o.documentInDb),(0,De.ZN)(i).unshift(e)}))}else{var s=V("COL20",{name:Y[(n=e).status],document:n.documentId,writeError:n});a.forEach((e=>e.reject(s)))}})),this.isRunning=!1,this.triggerRun()}},e}();function Ba(e){return async t=>{var n=function(e){return Object.assign({},e,{_meta:void 0,_deleted:void 0,_rev:void 0})}(t);n._deleted=t._deleted;var r=await e(n),a=Object.assign({},r,{_meta:t._meta,_attachments:t._attachments,_rev:t._rev,_deleted:void 0!==r._deleted?r._deleted:t._deleted});return void 0===a._deleted&&(a._deleted=!1),a}}var $a={get primaryPath(){if(this.isInstanceOfRxDocument)return this.collection.schema.primaryPath},get primary(){var e=this;if(e.isInstanceOfRxDocument)return e._data[e.primaryPath]},get revision(){if(this.isInstanceOfRxDocument)return this._data._rev},get deleted$(){if(this.isInstanceOfRxDocument)return this.$.pipe((0,_a.T)((e=>e._data._deleted)))},get deleted$$(){var e=this;return e.collection.database.getReactivityFactory().fromObservable(e.deleted$,e.getLatest().deleted,e.collection.database)},get deleted(){if(this.isInstanceOfRxDocument)return this._data._deleted},getLatest(){var e=this.collection._docCache.getLatestDocumentData(this.primary);return this.collection._docCache.getCachedRxDocument(e)},get $(){return this.collection.$.pipe(Ea((e=>!e.isLocal)),Ea((e=>e.documentId===this.primary)),(0,_a.T)((e=>Ma(e))),Oa(this.collection._docCache.getLatestDocumentData(this.primary)),(0,Ta.F)(((e,t)=>e._rev===t._rev)),(0,_a.T)((e=>this.collection._docCache.getCachedRxDocument(e))),Ia(De.bz))},get $$(){var e=this;return e.collection.database.getReactivityFactory().fromObservable(e.$,e.getLatest()._data,e.collection.database)},get$(e){if(q.isDevMode()){if(e.includes(".item."))throw V("DOC1",{path:e});if(e===this.primaryPath)throw V("DOC2");if(this.collection.schema.finalFields.includes(e))throw V("DOC3",{path:e});if(!X(this.collection.schema.jsonSchema,e))throw V("DOC4",{path:e})}return this.$.pipe((0,_a.T)((t=>A(t,e))),(0,Ta.F)())},get$$(e){var t=this.get$(e);return this.collection.database.getReactivityFactory().fromObservable(t,this.getLatest().get(e),this.collection.database)},populate(e){var t=X(this.collection.schema.jsonSchema,e),n=this.get(e);if(!n)return Na.$A;if(!t)throw V("DOC5",{path:e});if(!t.ref)throw V("DOC6",{path:e,schemaObj:t});var r=this.collection.database.collections[t.ref];if(!r)throw V("DOC7",{ref:t.ref,path:e,schemaObj:t});return"array"===t.type?r.findByIds(n).exec().then((e=>{var t=e.values();return Array.from(t)})):r.findOne(n).exec()},get(e){return Ua(this,e)},toJSON(e){if(void 0===e&&(e=!1),e)return q.deepFreezeWhenDevMode(this._data);var t=v(this._data);return delete t._rev,delete t._attachments,delete t._deleted,delete t._meta,q.deepFreezeWhenDevMode(t)},toMutableJSON(e){return void 0===e&&(e=!1),x(this.toJSON(e))},update(e){throw La("update")},incrementalUpdate(e){throw La("update")},updateCRDT(e){throw La("crdt")},putAttachment(){throw La("attachments")},getAttachment(){throw La("attachments")},allAttachments(){throw La("attachments")},get allAttachments$(){throw La("attachments")},async modify(e,t){var n=this._data,r=await Ba(e)(n);return this._saveData(r,n)},incrementalModify(e,t){return this.collection.incrementalWriteQueue.addWrite(this._data,Ba(e)).then((e=>this.collection._docCache.getCachedRxDocument(e)))},patch(e){var t=this._data,n=x(t);return Object.entries(e).forEach((e=>{let[t,r]=e;n[t]=r})),this._saveData(n,t)},incrementalPatch(e){return this.incrementalModify((t=>(Object.entries(e).forEach((e=>{let[n,r]=e;t[n]=r})),t)))},async _saveData(e,t){if(e=v(e),this._data._deleted)throw V("DOC11",{id:this.primary,document:this});await za(this.collection,e,t);var n=[{previous:t,document:e}],r=await this.collection.storageInstance.bulkWrite(n,"rx-document-save-data"),a=r.error[0];return yr(this.collection,this.primary,e,a),await this.collection._runHooks("post","save",e,this),this.collection._docCache.getCachedRxDocument(_r(this.collection.schema.primaryPath,n,r)[0])},remove(){var e=this.collection;if(this.deleted)return Promise.reject(V("DOC13",{document:this,id:this.primary}));var t,n=v(this._data);return e._runHooks("pre","remove",n,this).then((async()=>{n._deleted=!0;var t=[{previous:this._data,document:n}],r=await e.storageInstance.bulkWrite(t,"rx-document-remove"),a=r.error[0];return yr(e,this.primary,n,a),_r(this.collection.schema.primaryPath,t,r)[0]})).then((e=>(t=e,this.collection._runHooks("post","remove",n,this)))).then((()=>this.collection._docCache.getCachedRxDocument(t)))},incrementalRemove(){return this.incrementalModify((async e=>(await this.collection._runHooks("pre","remove",e,this),e._deleted=!0,e))).then((async e=>(await this.collection._runHooks("post","remove",e._data,e),e)))},destroy(){throw V("DOC14")}};function qa(e){void 0===e&&(e=$a);var t=function(e,t){this.collection=e,this._data=t,this._propertyCache=new Map,this.isInstanceOfRxDocument=!0};return t.prototype=e,t}function za(e,t,n){return t._meta=Object.assign({},n._meta,t._meta),q.isDevMode()&&e.schema.validateChange(n,t),e._runHooks("pre","save",t,n)}function Ua(e,t){return b(e._propertyCache,t,(()=>{var n=A(e._data,t);if("object"!=typeof n||null===n||Array.isArray(n))return q.deepFreezeWhenDevMode(n);var r=new Proxy(v(n),{get(n,r){if("string"!=typeof r)return n[r];var a=r.charAt(r.length-1);if("$"===a){if(r.endsWith("$$")){var o=r.slice(0,-2);return e.get$$((0,J.L$)(t+"."+o))}var i=r.slice(0,-1);return e.get$((0,J.L$)(t+"."+i))}if("_"===a){var s=r.slice(0,-1);return e.populate((0,J.L$)(t+"."+s))}var l=n[r];return"number"==typeof l||"string"==typeof l||"boolean"==typeof l?l:Ua(e,(0,J.L$)(t+"."+r))}});return r}))}var Ka=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return(0,ke.C6)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Te),Ha=n(4157),Wa=n(2442);const Va=e=>{e.previousResults.unshift(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},Ga=e=>{e.previousResults.push(e.changeEvent.doc),e.keyDocumentMap&&e.keyDocumentMap.set(e.changeEvent.id,e.changeEvent.doc)},Qa=e=>{const t=e.previousResults.shift();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},Ya=e=>{const t=e.previousResults.pop();e.keyDocumentMap&&t&&e.keyDocumentMap.delete(t[e.queryParams.primaryKey])},Za=e=>{e.keyDocumentMap&&e.keyDocumentMap.delete(e.changeEvent.id);const t=e.queryParams.primaryKey,n=e.previousResults;for(let r=0;r{const t=e.changeEvent.id,n=e.changeEvent.doc;if(e.keyDocumentMap){if(e.keyDocumentMap.has(t))return;e.keyDocumentMap.set(t,n)}else{if(e.previousResults.find((n=>n[e.queryParams.primaryKey]===t)))return}!function(e,t,n,r){var a,o=e.length,i=o-1,s=0;if(0===o)return e.push(t),0;for(;r<=i;)n(a=e[s=r+(i-r>>1)],t)<=0?r=s+1:i=s-1;n(a,t)<=0&&s++,e.splice(s,0,t)}(e.previousResults,n,e.queryParams.sortComparator,0)},Xa=["doNothing","insertFirst","insertLast","removeFirstItem","removeLastItem","removeFirstInsertLast","removeLastInsertFirst","removeFirstInsertFirst","removeLastInsertLast","removeExisting","replaceExisting","alwaysWrong","insertAtSortPosition","removeExistingAndInsertAtSortPosition","runFullQueryAgain","unknownAction"],eo={doNothing:e=>{},insertFirst:Va,insertLast:Ga,removeFirstItem:Qa,removeLastItem:Ya,removeFirstInsertLast:e=>{Qa(e),Ga(e)},removeLastInsertFirst:e=>{Ya(e),Va(e)},removeFirstInsertFirst:e=>{Qa(e),Va(e)},removeLastInsertLast:e=>{Ya(e),Ga(e)},removeExisting:Za,replaceExisting:e=>{const t=e.changeEvent.doc,n=e.queryParams.primaryKey,r=e.previousResults;for(let a=0;a{const t={_id:"wrongHuman"+(new Date).getTime()};e.previousResults.length=0,e.previousResults.push(t),e.keyDocumentMap&&(e.keyDocumentMap.clear(),e.keyDocumentMap.set(t._id,t))},insertAtSortPosition:Ja,removeExistingAndInsertAtSortPosition:e=>{Za(e),Ja(e)},runFullQueryAgain:e=>{throw new Error("Action runFullQueryAgain must be implemented by yourself")},unknownAction:e=>{throw new Error("Action unknownAction should never be called")}};!function(e=6){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let r=0;r!!e.queryParams.limit,so=e=>1===e.queryParams.limit,lo=e=>!!(e.queryParams.skip&&e.queryParams.skip>0),co=e=>"DELETE"===e.changeEvent.operation,uo=e=>"INSERT"===e.changeEvent.operation,fo=e=>"UPDATE"===e.changeEvent.operation,po=e=>io(e)&&e.previousResults.length>=e.queryParams.limit,ho=e=>{const t=e.queryParams.sortFields,n=e.changeEvent.previous,r=e.changeEvent.doc;if(!r)return!1;if(!n)return!0;for(let a=0;a{const t=e.changeEvent.id;if(e.keyDocumentMap){return e.keyDocumentMap.has(t)}{const n=e.queryParams.primaryKey,r=e.previousResults;for(let e=0;e{const t=e.previousResults[0];return!(!t||t[e.queryParams.primaryKey]!==e.changeEvent.id)},yo=e=>{const t=ro(e.previousResults);return!(!t||t[e.queryParams.primaryKey]!==e.changeEvent.id)},bo=e=>{const t=e.changeEvent.previous;if(!t)return!1;const n=e.previousResults[0];if(!n)return!1;if(n[e.queryParams.primaryKey]===e.changeEvent.id)return!0;return e.queryParams.sortComparator(t,n)<0},vo=e=>{const t=e.changeEvent.previous;if(!t)return!1;const n=ro(e.previousResults);if(!n)return!1;if(n[e.queryParams.primaryKey]===e.changeEvent.id)return!0;return e.queryParams.sortComparator(t,n)>0},wo=e=>{const t=e.changeEvent.doc;if(!t)return!1;const n=e.previousResults[0];if(!n)return!1;if(n[e.queryParams.primaryKey]===e.changeEvent.id)return!0;return e.queryParams.sortComparator(t,n)<0},xo=e=>{const t=e.changeEvent.doc;if(!t)return!1;const n=ro(e.previousResults);if(!n)return!1;if(n[e.queryParams.primaryKey]===e.changeEvent.id)return!0;return e.queryParams.sortComparator(t,n)>0},ko=e=>{const t=e.changeEvent.previous;return!!t&&e.queryParams.queryMatcher(t)},_o=e=>{const t=e.changeEvent.doc;if(!t)return!1;return e.queryParams.queryMatcher(t)},So=e=>0===e.previousResults.length,Eo={0:uo,1:fo,2:co,3:io,4:so,5:lo,6:So,7:po,8:go,9:yo,10:ho,11:mo,12:bo,13:vo,14:wo,15:xo,16:ko,17:_o};let Co;function Oo(){return Co||(Co=function(e){const t=new Map,n=2+2*parseInt(e.charAt(0)+e.charAt(1),10),r=to(e.substring(2,n),2);for(let l=0;lfunction(e,t,n){let r=e,a=e.l;for(;;){if(r=r[t[a](n)?"1":"0"],"number"==typeof r||"string"==typeof r)return r;a=r.l}}(Oo(),Eo,e))(e);return Xa[t]}function Ao(e,t){return t.sort&&0!==t.sort.length?t.sort.map((e=>Object.keys(e)[0])):[e]}var jo=new WeakMap;function Po(e,t){if(!e.collection.database.eventReduce)return{runFullQueryAgain:!0};var n=function(e){return b(jo,e,(()=>{var t=e.collection,n=tr(t.storageInstance.schema,x(e.mangoQuery)),r=t.schema.primaryPath,a=nr(t.schema.jsonSchema,n),o=rr(t.schema.jsonSchema,n);return{primaryKey:e.collection.schema.primaryPath,skip:n.skip,limit:n.limit,sortFields:Ao(r,n),sortComparator:(t,n)=>{var r={docA:t,docB:n,rxQuery:e};return a(r.docA,r.docB)},queryMatcher:t=>o({doc:t,rxQuery:e}.doc)}}))}(e),r=(0,De.ZN)(e._result).docsData.slice(0),a=(0,De.ZN)(e._result).docsDataMap,o=!1,i=t.map((e=>function(e){switch(e.operation){case"INSERT":return{operation:e.operation,id:e.documentId,doc:e.documentData,previous:null};case"UPDATE":return{operation:e.operation,id:e.documentId,doc:q.deepFreezeWhenDevMode(e.documentData),previous:e.previousDocumentData?e.previousDocumentData:"UNKNOWN"};case"DELETE":return{operation:e.operation,id:e.documentId,doc:null,previous:e.previousDocumentData}}}(e))).filter(P.S7).find((e=>{var t=To({queryParams:n,changeEvent:e,previousResults:r,keyDocumentMap:a});return"runFullQueryAgain"===t||("doNothing"!==t?(o=!0,function(e,t,n,r,a){(0,eo[e])({queryParams:t,changeEvent:n,previousResults:r,keyDocumentMap:a})}(t,n,e,r,a),!1):void 0)}));return i?{runFullQueryAgain:!0}:{runFullQueryAgain:!1,changed:o,newResults:r}}var Ro=function(){function e(){this._map=new Map}return e.prototype.getByQuery=function(e){var t=e.toString();return b(this._map,t,(()=>e))},e}();function Do(e,t){t.uncached=!0;var n=t.toString();e._map.delete(n)}function Io(e){return e.refCount$.observers.length}var No,Lo,Mo=(No=100,Lo=3e4,(e,t)=>{if(!(t._map.size0||(0===o._lastEnsureEqual&&o._creationTimee._lastEnsureEqual-t._lastEnsureEqual)).slice(0,i).forEach((e=>Do(t,e)))}}),Fo=new WeakSet;var Bo=function(){function e(e,t,n){this.cacheItemByDocId=new Map,this.tasks=new Set,this.registry="function"==typeof FinalizationRegistry?new FinalizationRegistry((e=>{var t=e.docId,n=this.cacheItemByDocId.get(t);n&&(n[0].delete(e.revisionHeight),0===n[0].size&&this.cacheItemByDocId.delete(t))})):void 0,this.primaryPath=e,this.changes$=t,this.documentCreator=n,t.subscribe((e=>{this.tasks.add((()=>{for(var t=this.cacheItemByDocId,n=0;n{this.processTasks()}))}))}var t=e.prototype;return t.processTasks=function(){0!==this.tasks.size&&(Array.from(this.tasks).forEach((e=>e())),this.tasks.clear())},t.getLatestDocumentData=function(e){return this.processTasks(),y(this.cacheItemByDocId,e)[1]},t.getLatestDocumentDataIfExists=function(e){this.processTasks();var t=this.cacheItemByDocId.get(e);if(t)return t[1]},N(e,[{key:"getCachedRxDocuments",get:function(){return k(this,"getCachedRxDocuments",$o(this))}},{key:"getCachedRxDocument",get:function(){var e=$o(this);return k(this,"getCachedRxDocument",(t=>e([t])[0]))}}])}();function $o(e){var t=e.primaryPath,n=e.cacheItemByDocId,r=e.registry,a=q.deepFreezeWhenDevMode,o=e.documentCreator;return i=>{for(var s=new Array(i.length),l=[],c=0;c0&&r&&(e.tasks.add((()=>{for(var e=0;e{e.processTasks()}))),s}}function qo(e,t){return(0,e.getCachedRxDocuments)(t)}var zo="function"==typeof WeakRef?function(e){return new WeakRef(e)}:function(e){return{deref:()=>e}};var Uo=function(){function e(e,t,n){this.time=(0,je.t)(),this.query=e,this.count=n,this.documents=qo(this.query.collection._docCache,t)}return e.prototype.getValue=function(e){var t=this.query.op;if("count"===t)return this.count;if("findOne"===t){var n=0===this.documents.length?null:this.documents[0];if(!n&&e)throw V("QU10",{collection:this.query.collection.name,query:this.query.mangoQuery,op:t});return n}return"findByIds"===t?this.docsMap:this.documents.slice(0)},N(e,[{key:"docsData",get:function(){return k(this,"docsData",this.documents.map((e=>e._data)))}},{key:"docsDataMap",get:function(){var e=new Map;return this.documents.forEach((t=>{e.set(t.primary,t._data)})),k(this,"docsDataMap",e)}},{key:"docsMap",get:function(){for(var e=new Map,t=this.documents,n=0;n"string"!=typeof e)))return n.$eq}return!1}(this.collection.schema.primaryPath,t)}var t=e.prototype;return t._setResultData=function(e){if(void 0===e)throw V("QU18",{database:this.collection.database.name,collection:this.collection.name});if("number"!=typeof e){e instanceof Map&&(e=Array.from(e.values()));var t=new Uo(this,e,e.length);this._result=t}else this._result=new Uo(this,[],e)},t._execOverDatabase=async function(){if(this._execOverDatabaseCount=this._execOverDatabaseCount+1,this._lastExecStart=(0,je.t)(),"count"===this.op){var e=this.getPreparedQuery(),t=await this.collection.storageInstance.count(e);if("slow"!==t.mode||this.collection.database.allowSlowCount)return t.count;throw V("QU14",{collection:this.collection,queryObj:this.mangoQuery})}if("findByIds"===this.op){var n=(0,De.ZN)(this.mangoQuery.selector)[this.collection.schema.primaryPath].$in,r=new Map,a=[];if(n.forEach((e=>{var t=this.collection._docCache.getLatestDocumentDataIfExists(e);if(t){if(!t._deleted){var n=this.collection._docCache.getCachedRxDocument(t);r.set(e,n)}}else a.push(e)})),a.length>0)(await this.collection.storageInstance.findDocumentsById(a,!1)).forEach((e=>{var t=this.collection._docCache.getCachedRxDocument(e);r.set(t.primary,t)}));return r}var o=async function(e){var t=[],n=e.collection;if(e.isFindOneByIdQuery)if(Array.isArray(e.isFindOneByIdQuery)){var r=e.isFindOneByIdQuery;if(r=r.filter((n=>{var r=e.collection._docCache.getLatestDocumentDataIfExists(n);return!r||(r._deleted||t.push(r),!1)})),r.length>0){var a=await n.storageInstance.findDocumentsById(r,!1);(0,P.Hb)(t,a)}}else{var o=e.isFindOneByIdQuery,i=e.collection._docCache.getLatestDocumentDataIfExists(o);if(!i){var s=await n.storageInstance.findDocumentsById([o],!1);s[0]&&(i=s[0])}i&&!i._deleted&&t.push(i)}else{var l=e.getPreparedQuery(),c=await n.storageInstance.query(l);t=c.documents}return t}(this);return o.then((e=>(this._lastExecEnd=(0,je.t)(),e)))},t.exec=async function(e){if(e&&"findOne"!==this.op)throw V("QU9",{collection:this.collection.name,query:this.mangoQuery,op:this.op});return await Go(this),(0,De.ZN)(this._result).getValue(e)},t.toString=function(){var e=w({op:this.op,query:this.mangoQuery,other:this.other},!0),t=JSON.stringify(e);return this.toString=()=>t,t},t.getPreparedQuery=function(){var e={rxQuery:this,mangoQuery:tr(this.collection.schema.jsonSchema,this.mangoQuery)};e.mangoQuery.selector._deleted={$eq:!1},e.mangoQuery.index&&e.mangoQuery.index.unshift("_deleted"),fr("prePrepareQuery",e);var t=Qo(this.collection.schema.jsonSchema,e.mangoQuery);return this.getPreparedQuery=()=>t,t},t.doesDocumentDataMatch=function(e){return!e._deleted&&this.queryMatcher(e)},t.remove=function(){return this.exec().then((e=>Array.isArray(e)?Promise.all(e.map((e=>e.remove()))):e.remove()))},t.incrementalRemove=function(){return ar(this.asRxQuery,(e=>e.incrementalRemove()))},t.update=function(e){throw La("update")},t.patch=function(e){return ar(this.asRxQuery,(t=>t.patch(e)))},t.incrementalPatch=function(e){return ar(this.asRxQuery,(t=>t.incrementalPatch(e)))},t.modify=function(e){return ar(this.asRxQuery,(t=>t.modify(e)))},t.incrementalModify=function(e){return ar(this.asRxQuery,(t=>t.incrementalModify(e)))},t.where=function(e){throw La("query-builder")},t.sort=function(e){throw La("query-builder")},t.skip=function(e){throw La("query-builder")},t.limit=function(e){throw La("query-builder")},N(e,[{key:"$",get:function(){if(!this._$){var e=this.collection.$.pipe(Ea((e=>!e.isLocal)),Oa(null),(0,Wa.Z)((()=>Go(this))),(0,_a.T)((()=>this._result)),Ia(De.bz),(0,Ta.F)(((e,t)=>!(!e||e.time!==(0,De.ZN)(t).time))),Ea((e=>!!e)),(0,_a.T)((e=>(0,De.ZN)(e).getValue())));this._$=(0,Ha.h)(e,this.refCount$.pipe(Ea((()=>!1))))}return this._$}},{key:"$$",get:function(){return this.collection.database.getReactivityFactory().fromObservable(this.$,void 0,this.collection.database)}},{key:"queryMatcher",get:function(){this.collection.schema.jsonSchema;return k(this,"queryMatcher",rr(0,tr(this.collection.schema.jsonSchema,this.mangoQuery)))}},{key:"asRxQuery",get:function(){return this}}])}();function Wo(e,t,n,r){fr("preCreateRxQuery",{op:e,queryObj:t,collection:n,other:r});var a,o,i=new Ho(e,t,n,r);return i=(a=i).collection._queryCache.getByQuery(a),o=n,Fo.has(o)||(Fo.add(o),(0,Na.dY)().then((()=>(0,Na.Ve)(200))).then((()=>{o.destroyed||o.cacheReplacementPolicy(o,o._queryCache),Fo.delete(o)}))),i}function Vo(e){var t=e.asRxQuery.collection._changeEventBuffer.getCounter();return e._latestChangeEvent>=t}async function Go(e){return e.collection.awaitBeforeReads.size>0&&await Promise.all(Array.from(e.collection.awaitBeforeReads).map((e=>e()))),!e.collection.database.destroyed&&!Vo(e)&&(e._ensureEqualQueue=e._ensureEqualQueue.then((()=>function(e){if(e._lastEnsureEqual=(0,je.t)(),e.collection.database.destroyed||Vo(e))return Na.Dr;var t=!1,n=!1;-1===e._latestChangeEvent&&(n=!0);if(!n){var r=e.asRxQuery.collection._changeEventBuffer.getFrom(e._latestChangeEvent+1);if(null===r)n=!0;else{e._latestChangeEvent=e.asRxQuery.collection._changeEventBuffer.getCounter();var a=e.asRxQuery.collection._changeEventBuffer.reduceByLastOfDoc(r);if("count"===e.op){var o=(0,De.ZN)(e._result).count,i=o;a.forEach((t=>{var n=t.previousDocumentData&&e.doesDocumentDataMatch(t.previousDocumentData),r=e.doesDocumentDataMatch(t.documentData);!n&&r&&i++,n&&!r&&i--})),i!==o&&(t=!0,e._setResultData(i))}else{var s=Po(e,a);s.runFullQueryAgain?n=!0:s.changed&&(t=!0,e._setResultData(s.newResults))}}}if(n)return e._execOverDatabase().then((n=>(e._latestChangeEvent=e.collection._changeEventBuffer.getCounter(),"number"==typeof n?(e._result&&n===e._result.count||(t=!0,e._setResultData(n)),t):(e._result&&function(e,t,n){if(t.length!==n.length)return!1;for(var r=0,a=t.length;re.data.name===a)),l=[];s.forEach((e=>{l.push({collectionName:e.data.name,schema:e.data.schema,isCollection:!0}),e.data.connectedStorages.forEach((e=>l.push({collectionName:e.collectionName,isCollection:!1,schema:e.schema})))}));var c=new Set;if(l=l.filter((e=>{var t=e.collectionName+"||"+e.schema.version;return!c.has(t)&&(c.add(t),!0)})),await Promise.all(l.map((async t=>{var i=await e.createStorageInstance({collectionName:t.collectionName,databaseInstanceToken:n,databaseName:r,multiInstance:!1,options:{},schema:t.schema,password:o,devMode:q.isDevMode()});await i.remove(),t.isCollection&&await pr("postRemoveRxCollection",{storage:e,databaseName:r,collectionName:a})}))),i){var u=s.map((e=>{var t=wr(e);return t._deleted=!0,t._meta.lwt=(0,je.t)(),t._rev=ur(n,e),{previous:e,document:t}}));await t.bulkWrite(u,"rx-database-remove-collection-all")}}function ii(e){if(e.destroyed)throw V("COL21",{collection:e.name,version:e.schema.version})}var si=function(){function e(e){this.subs=[],this.counter=0,this.eventCounterMap=new WeakMap,this.buffer=[],this.limit=100,this.tasks=new Set,this.collection=e,this.subs.push(this.collection.database.eventBulks$.pipe(Ea((e=>e.collectionName===this.collection.name)),Ea((e=>!e.events[0].isLocal))).subscribe((e=>{this.tasks.add((()=>this._handleChangeEvents(e.events))),this.tasks.size<=1&&(0,Na.vN)().then((()=>{this.processTasks()}))})))}var t=e.prototype;return t.processTasks=function(){0!==this.tasks.size&&(Array.from(this.tasks).forEach((e=>e())),this.tasks.clear())},t._handleChangeEvents=function(e){var t=this.counter;this.counter=this.counter+e.length,e.length>this.limit?this.buffer=e.slice(-1*e.length):((0,P.Hb)(this.buffer,e),this.buffer=this.buffer.slice(-1*this.limit));for(var n=t+1,r=this.eventCounterMap,a=0;at(e)))},t.reduceByLastOfDoc=function(e){return this.processTasks(),e.slice(0)},t.destroy=function(){this.tasks.clear(),this.subs.forEach((e=>e.unsubscribe()))},e}();var li=new WeakMap;function ci(e){var t=e.schema.getDocumentPrototype(),n=function(e){var t={};return Object.entries(e.methods).forEach((e=>{let[n,r]=e;t[n]=r})),t}(e),r={};return[t,n,$a].forEach((e=>{Object.getOwnPropertyNames(e).forEach((t=>{var n=Object.getOwnPropertyDescriptor(e,t),a=!0;(t.startsWith("_")||t.endsWith("_")||t.startsWith("$")||t.endsWith("$"))&&(a=!1),"function"==typeof n.value?Object.defineProperty(r,t,{get(){return n.value.bind(this)},enumerable:a,configurable:!1}):(n.enumerable=a,n.configurable=!1,n.writable&&(n.writable=!1),Object.defineProperty(r,t,n))}))})),r}function ui(e,t,n){var r=function(e,t,n){var r=new e(t,n);return fr("createRxDocument",r),r}(t,e,q.deepFreezeWhenDevMode(n));return e._runHooksSync("post","create",n,r),fr("postCreateRxDocument",r),r}var di=function(e,t){return wa(vr(e.newDocumentState),vr(e.realMasterState))?Promise.resolve({isEqual:!0}):Promise.resolve({isEqual:!1,documentData:e.realMasterState})};var fi=["pre","post"],pi=["insert","save","remove","create"],hi=!1,mi=function(){function e(e,t,n,r,a,o,i,s,l,c,u,d){void 0===a&&(a={}),void 0===o&&(o={}),void 0===i&&(i={}),void 0===s&&(s={}),void 0===l&&(l={}),void 0===c&&(c=Mo),void 0===u&&(u={}),void 0===d&&(d=di),this.storageInstance={},this.timeouts=new Set,this.incrementalWriteQueue={},this.awaitBeforeReads=new Set,this._incrementalUpsertQueues=new Map,this.synced=!1,this.hooks={},this._subs=[],this._docCache={},this._queryCache=new Ro,this.$={},this.checkpoint$={},this._changeEventBuffer={},this.onDestroy=[],this.destroyed=!1,this.onRemove=[],this.database=e,this.name=t,this.schema=n,this.internalStorageInstance=r,this.instanceCreationOptions=a,this.migrationStrategies=o,this.methods=i,this.attachments=s,this.options=l,this.cacheReplacementPolicy=c,this.statics=u,this.conflictHandler=d,function(e){if(hi)return;hi=!0;var t=Object.getPrototypeOf(e);pi.forEach((e=>{fi.map((n=>{var r=n+(0,J.Z2)(e);t[r]=function(t,r){return this.addHook(n,e,t,r)}}))}))}(this.asRxCollection)}var t=e.prototype;return t.prepare=async function(){this.storageInstance=kr(this.database,this.internalStorageInstance,this.schema.jsonSchema),this.incrementalWriteQueue=new Fa(this.storageInstance,this.schema.primaryPath,((e,t)=>za(this,e,t)),(e=>this._runHooks("post","save",e)));var e,t,n=this.database.eventBulks$.pipe(Ea((e=>e.collectionName===this.name)));this.$=n.pipe((0,Wa.Z)((e=>e.events))),this.checkpoint$=n.pipe((0,_a.T)((e=>e.checkpoint))),this._changeEventBuffer=(e=this.asRxCollection,new si(e)),this._docCache=new Bo(this.schema.primaryPath,this.database.eventBulks$.pipe(Ea((e=>e.collectionName===this.name&&!e.events[0].isLocal)),(0,_a.T)((e=>e.events))),(e=>{var n;return t||(n=this.asRxCollection,t=b(li,n,(()=>qa(ci(n))))),ui(this.asRxCollection,t,e)}));var r=this.database.internalStore.changeStream().pipe(Ea((e=>{var t=this.name+"-"+this.schema.version;return!!e.events.find((e=>"collection"===e.documentData.context&&e.documentData.key===t&&"DELETE"===e.operation))}))).subscribe((async()=>{await this.destroy(),await Promise.all(this.onRemove.map((e=>e())))}));this._subs.push(r);var a=await this.database.storageToken,o=this.storageInstance.changeStream().subscribe((e=>{for(var t=new Array(e.events.length),n=e.events,r=this.name,o=q.deepFreezeWhenDevMode,i=0;i{this.conflictHandler(e.input,e.context).then((t=>{this.storageInstance.resolveConflictResultionTask({id:e.id,output:t})}))}))),Na.em},t.cleanup=function(e){throw ii(this),La("cleanup")},t.migrationNeeded=function(){throw La("migration-schema")},t.getMigrationState=function(){throw La("migration-schema")},t.startMigration=function(e){return void 0===e&&(e=10),ii(this),this.getMigrationState().startMigration(e)},t.migratePromise=function(e){return void 0===e&&(e=10),this.getMigrationState().migratePromise(e)},t.insert=async function(e){ii(this);var t=await this.bulkInsert([e]),n=t.error[0];return yr(this,e[this.schema.primaryPath],e,n),(0,De.ZN)(t.success[0])},t.bulkInsert=async function(e){if(ii(this),0===e.length)return{success:[],error:[]};var t,n=this.schema.primaryPath;if(this.hasHooks("pre","insert"))t=await Promise.all(e.map((e=>{var t=ai(this.schema,e);return this._runHooks("pre","insert",t).then((()=>({document:t})))})));else{t=new Array(e.length);for(var r=this.schema,a=0;a{var t=e.document;u.set(t[n],t)})),await Promise.all(c.success.map((e=>this._runHooks("post","insert",u.get(e.primary),e))))}return c},t.bulkRemove=async function(e){ii(this);var t=this.schema.primaryPath;if(0===e.length)return{success:[],error:[]};var n=await this.findByIds(e).exec(),r=[],a=new Map;Array.from(n.values()).forEach((e=>{var t=e.toMutableJSON(!0);r.push(t),a.set(e.primary,t)})),await Promise.all(r.map((e=>{var t=e[this.schema.primaryPath];return this._runHooks("pre","remove",e,n.get(t))})));var o=r.map((e=>{var t=v(e);return t._deleted=!0,{previous:e,document:t}})),i=await this.storageInstance.bulkWrite(o,"rx-collection-bulk-remove"),s=_r(this.schema.primaryPath,o,i).map((e=>e[t]));return await Promise.all(s.map((e=>this._runHooks("post","remove",a.get(e),n.get(e))))),{success:s.map((e=>y(n,e))),error:i.error}},t.bulkUpsert=async function(e){ii(this);var t=[],n=new Map;e.forEach((e=>{var r=ai(this.schema,e),a=r[this.schema.primaryPath];if(!a)throw V("COL3",{primaryPath:this.schema.primaryPath,data:r,schema:this.schema.jsonSchema});n.set(a,r),t.push(r)}));var r=await this.bulkInsert(t),a=r.success.slice(0),o=[];return await Promise.all(r.error.map((async e=>{if(409!==e.status)o.push(e);else{var t=e.documentId,r=y(n,t),i=(0,De.ZN)(e.documentInDb),s=this._docCache.getCachedRxDocuments([i])[0],l=await s.incrementalModify((()=>r));a.push(l)}}))),{error:o,success:a}},t.upsert=async function(e){ii(this);var t=await this.bulkUpsert([e]);return yr(this.asRxCollection,e[this.schema.primaryPath],e,t.error[0]),t.success[0]},t.incrementalUpsert=function(e){ii(this);var t=ai(this.schema,e),n=t[this.schema.primaryPath];if(!n)throw V("COL4",{data:e});var r=this._incrementalUpsertQueues.get(n);return r||(r=Na.em),r=r.then((()=>function(e,t,n){var r=e._docCache.getLatestDocumentDataIfExists(t);if(r)return Promise.resolve({doc:e._docCache.getCachedRxDocuments([r])[0],inserted:!1});return e.findOne(t).exec().then((t=>t?{doc:t,inserted:!1}:e.insert(n).then((e=>({doc:e,inserted:!0})))))}(this,n,t))).then((e=>e.inserted?e.doc:function(e,t){return e.incrementalModify((e=>t))}(e.doc,t))),this._incrementalUpsertQueues.set(n,r),r},t.find=function(e){if(ii(this),"string"==typeof e)throw V("COL5",{queryObj:e});return e||(e={selector:{}}),Wo("find",e,this)},t.findOne=function(e){if(ii(this),"number"==typeof e||Array.isArray(e))throw G("COL6",{queryObj:e});var t;if("string"==typeof e)t=Wo("findOne",{selector:{[this.schema.primaryPath]:e},limit:1},this);else{if(e||(e={selector:{}}),e.limit)throw V("QU6");(e=v(e)).limit=1,t=Wo("findOne",e,this)}return t},t.count=function(e){return ii(this),e||(e={selector:{}}),Wo("count",e,this)},t.findByIds=function(e){return ii(this),Wo("findByIds",{selector:{[this.schema.primaryPath]:{$in:e.slice(0)}}},this)},t.exportJSON=function(){throw La("json-dump")},t.importJSON=function(e){throw La("json-dump")},t.insertCRDT=function(e){throw La("crdt")},t.addPipeline=function(e){throw La("pipeline")},t.addHook=function(e,t,n,r){if(void 0===r&&(r=!1),"function"!=typeof n)throw G("COL7",{key:t,when:e});if(!fi.includes(e))throw G("COL8",{key:t,when:e});if(!pi.includes(t))throw V("COL9",{key:t});if("post"===e&&"create"===t&&!0===r)throw V("COL10",{when:e,key:t,parallel:r});var a=n.bind(this),o=r?"parallel":"series";this.hooks[t]=this.hooks[t]||{},this.hooks[t][e]=this.hooks[t][e]||{series:[],parallel:[]},this.hooks[t][e][o].push(a)},t.getHooks=function(e,t){return this.hooks[t]&&this.hooks[t][e]?this.hooks[t][e]:{series:[],parallel:[]}},t.hasHooks=function(e,t){if(!this.hooks[t]||!this.hooks[t][e])return!1;var n=this.getHooks(e,t);return!!n&&(n.series.length>0||n.parallel.length>0)},t._runHooks=function(e,t,n,r){var a=this.getHooks(e,t);if(!a)return Na.em;var o=a.series.map((e=>()=>e(n,r)));return(0,Na.h$)(o).then((()=>Promise.all(a.parallel.map((e=>e(n,r))))))},t._runHooksSync=function(e,t,n,r){if(this.hasHooks(e,t)){var a=this.getHooks(e,t);a&&a.series.forEach((e=>e(n,r)))}},t.promiseWait=function(e){return new Promise((t=>{var n=setTimeout((()=>{this.timeouts.delete(n),t()}),e);this.timeouts.add(n)}))},t.destroy=async function(){return this.destroyed?Na.Dr:(await Promise.all(this.onDestroy.map((e=>e()))),this.destroyed=!0,Array.from(this.timeouts).forEach((e=>clearTimeout(e))),this._changeEventBuffer&&this._changeEventBuffer.destroy(),this.database.requestIdlePromise().then((()=>this.storageInstance.close())).then((()=>(this._subs.forEach((e=>e.unsubscribe())),delete this.database.collections[this.name],pr("postDestroyRxCollection",this).then((()=>!0))))))},t.remove=async function(){await this.destroy(),await Promise.all(this.onRemove.map((e=>e()))),await oi(this.database.storage,this.database.internalStore,this.database.token,this.database.name,this.name,this.database.password,this.database.hashFunction)},N(e,[{key:"insert$",get:function(){return this.$.pipe(Ea((e=>"INSERT"===e.operation)))}},{key:"update$",get:function(){return this.$.pipe(Ea((e=>"UPDATE"===e.operation)))}},{key:"remove$",get:function(){return this.$.pipe(Ea((e=>"DELETE"===e.operation)))}},{key:"asRxCollection",get:function(){return this}}])}();var gi=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this._parallels=e||1,this._qC=0,this._iC=new Set,this._lHN=0,this._hPM=new Map,this._pHM=new Map};function yi(e,t){if(t){if(t._timeoutObj&&clearTimeout(t._timeoutObj),e._pHM.has(t)){var n=e._pHM.get(t);e._hPM.delete(n),e._pHM.delete(t)}e._iC.delete(t)}}function bi(e){e._tryIR||0===e._iC.size||(e._tryIR=!0,setTimeout((function(){e.isIdle()?setTimeout((function(){e.isIdle()?(!function(e){0!==e._iC.size&&(e._iC.values().next().value._manRes(),setTimeout((function(){return bi(e)}),0))}(e),e._tryIR=!1):e._tryIR=!1}),0):e._tryIR=!1}),0))}gi.prototype={isIdle:function(){return this._qCe.events))),this.storageToken=Na.Dr,this.storageTokenDocument=Na.Dr,this.emittedEventBulkIds=new Lr(6e4),this.name=e,this.token=t,this.storage=n,this.instanceCreationOptions=r,this.password=a,this.multiInstance=o,this.eventReduce=i,this.options=s,this.internalStore=l,this.hashFunction=c,this.cleanupPolicy=u,this.allowSlowCount=d,this.reactivity=f,"pseudoInstance"!==this.name&&(this.internalStore=kr(this.asRxDatabase,l,Jo),this.storageTokenDocument=async function(e){var t=(0,J.z3)(10),n=e.password?await e.hashFunction(JSON.stringify(e.password)):void 0,r=[{document:{id:ni,context:Zo,key:ti,data:{rxdbVersion:e.rxdbVersion,token:t,instanceToken:e.token,passwordHash:n},_deleted:!1,_meta:{lwt:1},_rev:"",_attachments:{}}}],a=await e.internalStore.bulkWrite(r,"internal-add-storage-token");if(!a.error[0])return _r("id",r,a)[0];var o=(0,De.ZN)(a.error[0]);if(o.isError&&Q(o)){var i=o;if(l=i.documentInDb.data.rxdbVersion,c=e.rxdbVersion,!l||c.includes("beta")&&c!==l||l.split(".")[0]!==c.split(".")[0])throw V("DM5",{args:{database:e.name,databaseStateVersion:i.documentInDb.data.rxdbVersion,codeVersion:e.rxdbVersion}});if(n&&n!==i.documentInDb.data.passwordHash)throw V("DB1",{passwordHash:n,existingPasswordHash:i.documentInDb.data.passwordHash});var s=i.documentInDb;return(0,De.ZN)(s)}var l,c;throw o}(this.asRxDatabase).catch((e=>this.startupErrors.push(e))),this.storageToken=this.storageTokenDocument.then((e=>e.data.token)).catch((e=>this.startupErrors.push(e))))}var t=e.prototype;return t.getReactivityFactory=function(){if(!this.reactivity)throw V("DB14",{database:this.name});return this.reactivity},t.$emit=function(e){this.emittedEventBulkIds.has(e.id)||(this.emittedEventBulkIds.add(e.id),this.eventBulks$.next(e))},t.removeCollectionDoc=async function(e,t){var n=await mr(this.internalStore,Xo(ri(e,t),Yo));if(!n)throw V("SNH",{name:e,schema:t});var r=wr(n);r._deleted=!0,await this.internalStore.bulkWrite([{document:r,previous:n}],"rx-database-remove-collection")},t.addCollections=async function(e){var t={},n={},r=[],a={};await Promise.all(Object.entries(e).map((async e=>{let[o,i]=e;var s=o,l=i.schema;t[s]=l;var c=ka(l,this.hashFunction);if(n[s]=c,this.collections[o])throw V("DB3",{name:o});var u=ri(o,l),d={id:Xo(u,Yo),key:u,context:Yo,data:{name:s,schemaHash:await c.hash,schema:c.jsonSchema,version:c.version,connectedStorages:[]},_deleted:!1,_meta:{lwt:1},_rev:"",_attachments:{}};r.push({document:d});var f=Object.assign({},i,{name:s,schema:c,database:this}),p=v(i);p.database=this,p.name=o,fr("preCreateRxCollection",p),f.conflictHandler=p.conflictHandler,a[s]=f})));var o=await this.internalStore.bulkWrite(r,"rx-database-add-collection");await async function(e){if(await e.storageToken,e.startupErrors[0])throw e.startupErrors[0]}(this),await Promise.all(o.error.map((async e=>{if(409!==e.status)throw V("DB12",{database:this.name,writeError:e});var r=(0,De.ZN)(e.documentInDb),a=r.data.name,o=n[a];if(r.data.schemaHash!==await o.hash)throw V("DB6",{database:this.name,collection:a,previousSchemaHash:r.data.schemaHash,schemaHash:await o.hash,previousSchema:r.data.schema,schema:(0,De.ZN)(t[a])})})));var i={};return await Promise.all(Object.keys(e).map((async e=>{var t=a[e],n=await function(e){let{database:t,name:n,schema:r,instanceCreationOptions:a={},migrationStrategies:o={},autoMigrate:i=!0,statics:s={},methods:l={},attachments:c={},options:u={},localDocuments:d=!1,cacheReplacementPolicy:f=Mo,conflictHandler:p=di}=e;var h={databaseInstanceToken:t.token,databaseName:t.name,collectionName:n,schema:r.jsonSchema,options:a,multiInstance:t.multiInstance,password:t.password,devMode:q.isDevMode()};return fr("preCreateRxStorageInstance",h),async function(e,t){return t.multiInstance=e.multiInstance,await e.storage.createStorageInstance(t)}(t,h).then((e=>{var h=new mi(t,n,r,e,a,o,l,c,u,f,s,p);return h.prepare().then((()=>{Object.entries(s).forEach((e=>{let[t,n]=e;Object.defineProperty(h,t,{get:()=>n.bind(h)})}));var e=Na.em;return i&&0!==h.schema.version&&(e=h.migratePromise()),e})).then((()=>(fr("createRxCollection",{collection:h,creator:{name:n,schema:r,storageInstance:e,instanceCreationOptions:a,migrationStrategies:o,methods:l,attachments:c,options:u,cacheReplacementPolicy:f,localDocuments:d,statics:s}}),h))).catch((t=>e.close().then((()=>Promise.reject(t)))))}))}(t);i[e]=n,this.collections[e]=n,this[e]||Object.defineProperty(this,e,{get:()=>this.collections[e]})}))),i},t.lockedRun=function(e){return this.idleQueue.wrapCall(e)},t.requestIdlePromise=function(){return this.idleQueue.requestIdlePromise()},t.exportJSON=function(e){throw La("json-dump")},t.addState=function(e){throw La("state")},t.importJSON=function(e){throw La("json-dump")},t.backup=function(e){throw La("backup")},t.leaderElector=function(){throw La("leader-election")},t.isLeader=function(){throw La("leader-election")},t.waitForLeadership=function(){throw La("leader-election")},t.migrationStates=function(){throw La("migration-schema")},t.destroy=async function(){return this.destroyed?Na.Dr:(this.destroyed=!0,await pr("preDestroyRxDatabase",this),this.eventBulks$.complete(),this._subs.map((e=>e.unsubscribe())),"pseudoInstance"===this.name?Na.Dr:this.requestIdlePromise().then((()=>Promise.all(this.onDestroy.map((e=>e()))))).then((()=>Promise.all(Object.keys(this.collections).map((e=>this.collections[e])).map((e=>e.destroy()))))).then((()=>this.internalStore.close())).then((()=>vi.delete(this.storage.name+"|"+this.name))).then((()=>!0)))},t.remove=function(){return this.destroy().then((()=>async function(e,t,n){var r=(0,J.z3)(10),a=await xi(r,t,e,{},!1,n),o=await ei(a),i=new Set;o.forEach((e=>i.add(e.data.name)));var s=Array.from(i);return await Promise.all(s.map((o=>oi(t,a,r,e,o,n)))),await pr("postRemoveRxDatabase",{databaseName:e,storage:t}),await a.remove(),s}(this.name,this.storage,this.password)))},N(e,[{key:"$",get:function(){return this.observable$}},{key:"asRxDatabase",get:function(){return this}}])}();async function xi(e,t,n,r,a,o){return await t.createStorageInstance({databaseInstanceToken:e,databaseName:n,collectionName:hr,schema:Jo,options:r,multiInstance:a,password:o,devMode:q.isDevMode()})}function ki(e){let{storage:t,instanceCreationOptions:n,name:r,password:a,multiInstance:o=!0,eventReduce:i=!0,ignoreDuplicate:s=!1,options:l={},cleanupPolicy:c,allowSlowCount:u=!1,localDocuments:d=!1,hashFunction:f=Re.V0,reactivity:p}=e;fr("preCreateRxDatabase",{storage:t,instanceCreationOptions:n,name:r,password:a,multiInstance:o,eventReduce:i,ignoreDuplicate:s,options:l,localDocuments:d}),s||function(e,t){var n=t.name+"|"+e;if(vi.has(n))throw V("DB8",{name:e,storage:t.name,link:"https://rxdb.info/rx-database.html#ignoreduplicate"})}(r,t),vi.add(t.name+"|"+r);var h=(0,J.z3)(10);return xi(h,t,r,n,o,a).catch((e=>{throw vi.delete(t.name+"|"+r),e})).then((e=>{var m=new wi(r,h,t,n,a,o,i,l,e,f,c,u,p);return pr("createRxDatabase",{database:m,creator:{storage:t,instanceCreationOptions:n,name:r,password:a,multiInstance:o,eventReduce:i,ignoreDuplicate:s,options:l,localDocuments:d}}).then((()=>m))}))}var _i={RxSchema:xa.prototype,RxDocument:$a,RxQuery:Ho.prototype,RxCollection:mi.prototype,RxDatabase:wi.prototype},Si=new Set,Ei=new Set;var Ci=function(e){function t(t,n,r){var a;return(a=e.call(this,null,n)||this).id=t,a.parent=r,a}return M(t,e),t}(qa()),Oi={get isLocal(){return!0},get allAttachments$(){throw V("LD1",{document:this})},get primaryPath(){return"id"},get primary(){return this.id},get $(){var e=y(Ri,this.parent);return this.parent.$.pipe(Ea((e=>e.documentId===this.primary)),Ea((e=>e.isLocal)),(0,_a.T)((e=>Ma(e))),Oa(e.docCache.getLatestDocumentData(this.primary)),(0,Ta.F)(((e,t)=>e._rev===t._rev)),(0,_a.T)((t=>e.docCache.getCachedRxDocument(t))),Ia(De.bz))},get $$(){var e=this,t=ji(e);return t.getReactivityFactory().fromObservable(e.$,e.getLatest()._data,t)},get deleted$$(){var e=this,t=ji(e);return t.getReactivityFactory().fromObservable(e.deleted$,e.getLatest().deleted,t)},getLatest(){var e=y(Ri,this.parent),t=e.docCache.getLatestDocumentData(this.primary);return e.docCache.getCachedRxDocument(t)},get(e){if(e="data."+e,this._data){if("string"!=typeof e)throw G("LD2",{objPath:e});var t=A(this._data,e);return t=q.deepFreezeWhenDevMode(t)}},get$(e){if(e="data."+e,q.isDevMode()){if(e.includes(".item."))throw V("LD3",{objPath:e});if(e===this.primaryPath)throw V("LD4")}return this.$.pipe((0,_a.T)((e=>e._data)),(0,_a.T)((t=>A(t,e))),(0,Ta.F)())},get$$(e){var t=ji(this);return t.getReactivityFactory().fromObservable(this.get$(e),this.getLatest().get(e),t)},async incrementalModify(e){var t=await Ii(this.parent);return t.incrementalWriteQueue.addWrite(this._data,(async t=>(t.data=await e(t.data,this),t))).then((e=>t.docCache.getCachedRxDocument(e)))},incrementalPatch(e){return this.incrementalModify((t=>(Object.entries(e).forEach((e=>{let[n,r]=e;t[n]=r})),t)))},async _saveData(e){var t=await Ii(this.parent),n=this._data;e.id=this.id;var r=[{previous:n,document:e}];return t.storageInstance.bulkWrite(r,"local-document-save-data").then((t=>{if(t.error[0])throw t.error[0];var n=_r(this.collection.schema.primaryPath,r,t)[0];(e=v(e))._rev=n._rev}))},async remove(){var e=await Ii(this.parent),t=v(this._data);return t._deleted=!0,gr(e.storageInstance,{previous:this._data,document:t},"local-document-remove").then((t=>e.docCache.getCachedRxDocument(t)))}},Ti=!1,Ai=()=>{if(!Ti){Ti=!0;var e=$a;Object.getOwnPropertyNames(e).forEach((t=>{if(!Object.getOwnPropertyDescriptor(Oi,t)){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(Oi,t,n)}}));["populate","update","putAttachment","getAttachment","allAttachments"].forEach((e=>Oi[e]=(e=>()=>{throw V("LD6",{functionName:e})})(e)))}};function ji(e){var t=e.parent;return t instanceof wi?t:t.database}var Pi=new WeakMap,Ri=new WeakMap;function Di(e){var t=e.database?e.database:e,n=e.database?e.name:"",r=(async()=>{var r=await Ni(t.token,t.storage,t.name,n,t.instanceCreationOptions,t.multiInstance);r=kr(t,r,Bi);var a=new Bo("id",t.eventBulks$.pipe(Ea((e=>{var t=!1;return(""===n&&!e.collectionName||""!==n&&e.collectionName===n)&&(t=!0),t&&e.events[0].isLocal})),(0,_a.T)((e=>e.events))),(t=>function(e,t){Ai();var n=new Ci(e.id,e,t);return Object.setPrototypeOf(n,Oi),n.prototype=Oi,n}(t,e))),o=new Fa(r,"id",(()=>{}),(()=>{})),i=await t.storageToken,s=r.changeStream().subscribe((n=>{for(var r=new Array(n.events.length),a=n.events,o=e.database?e.name:void 0,s=0;se.storageInstance.close()))}async function Mi(e,t,n){var r=(0,J.z3)(10),a=await Ni(r,e,t,n,{},!1);await a.remove()}function Fi(e){return"plugin-local-documents-"+e}var Bi=ne({title:"RxLocalDocument",version:0,primaryKey:"id",type:"object",properties:{id:{type:"string",maxLength:128},data:{type:"object",additionalProperties:!0}},required:["id","data"]});async function $i(e,t){var n=await Ii(this),r={id:e,data:t,_deleted:!1,_meta:{lwt:1},_rev:"",_attachments:{}};return gr(n.storageInstance,{document:r},"local-document-insert").then((e=>n.docCache.getCachedRxDocument(e)))}function qi(e,t){return this.getLocal(e).then((n=>n?n.incrementalModify((()=>t)):this.insertLocal(e,t)))}async function zi(e){var t=await Ii(this),n=t.docCache,r=n.getLatestDocumentDataIfExists(e);return r?Promise.resolve(n.getCachedRxDocument(r)):mr(t.storageInstance,e).then((e=>e?t.docCache.getCachedRxDocument(e):null))}function Ui(e){return this.$.pipe(Oa(null),(0,Wa.Z)((async t=>t?{changeEvent:t}:{doc:await this.getLocal(e)})),(0,Wa.Z)((async t=>{if(t.changeEvent){var n=t.changeEvent;return n.isLocal&&n.documentId===e?{use:!0,doc:await this.getLocal(e)}:{use:!1}}return{use:!0,doc:t.doc}})),Ea((e=>e.use)),(0,_a.T)((e=>e.doc)))}var Ki={name:"local-documents",rxdb:!0,prototypes:{RxCollection:e=>{e.insertLocal=$i,e.upsertLocal=qi,e.getLocal=zi,e.getLocal$=Ui},RxDatabase:e=>{e.insertLocal=$i,e.upsertLocal=qi,e.getLocal=zi,e.getLocal$=Ui}},hooks:{createRxDatabase:{before:e=>{e.creator.localDocuments&&Di(e.database)}},createRxCollection:{before:e=>{e.creator.localDocuments&&Di(e.collection)}},preDestroyRxDatabase:{after:e=>Li(e)},postDestroyRxCollection:{after:e=>Li(e)},postRemoveRxDatabase:{after:e=>Mi(e.storage,e.databaseName,"")},postRemoveRxCollection:{after:e=>Mi(e.storage,e.databaseName,e.collectionName)}},overwritable:{}};let Hi;function Wi(){return"undefined"!=typeof window&&window.indexedDB}function Vi(){return Hi||(Hi=(async()=>{!function(e){if(fr("preAddRxPlugin",{plugin:e,plugins:Si}),!Si.has(e)){if(Ei.has(e.name))throw V("PL3",{name:e.name,plugin:e});if(Si.add(e),Ei.add(e.name),!e.rxdb)throw G("PL1",{plugin:e});e.init&&e.init(),e.prototypes&&Object.entries(e.prototypes).forEach((e=>{let[t,n]=e;return n(_i[t])})),e.overwritable&&Object.assign(q,e.overwritable),e.hooks&&Object.entries(e.hooks).forEach((e=>{let[t,n]=e;n.after&&dr[t].push(n.after),n.before&&dr[t].unshift(n.before)}))}}(Ki);var e;return await ki({name:"rxdb-landing-v3",localDocuments:!0,storage:(void 0===e&&(e={}),new va(e))})})()),Hi}const Gi=["#e6008d","#8d2089","#5f2688"]},1513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>w,TM:()=>C,yJ:()=>p,sC:()=>T,AO:()=>f});var r=n(8168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&a(i[0])||i.unshift("");var h=i.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};var s=n(1561);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function h(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!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,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=p(e,t,m(),w.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(4363),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||a}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var a=p(n);a&&a!==h&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),m=l(n),g=0;g{"use strict";e.exports=function(e,t,n,r,a,o,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,o,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},689:function(e){e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=a,this.iframesTimeout=o}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(t){var n=e.filter((function(e){return e.contains(t)})).length>0;-1!==e.indexOf(t)||n||e.push(t)})),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var a=e.contentWindow;if(r=a.document,!a||!r)throw new Error("iframe inaccessible")}catch(o){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,a=!1,o=null,i=function i(){if(!a){a=!0,clearTimeout(o);try{r.isIframeBlank(e)||(e.removeEventListener("load",i),r.getIframeContents(e,t,n))}catch(s){n()}}};e.addEventListener("load",i),o=setTimeout(i,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(r){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,(function(){return!0}),(function(e){r++,n.waitForIframes(e.querySelector("html"),(function(){--r||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,n,r){var a=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=t.querySelectorAll("iframe"),s=i.length,l=0;i=Array.prototype.slice.call(i);var c=function(){--s<=0&&o(l)};s||c(),i.forEach((function(t){e.matches(t,a.exclude)?c():a.onIframeReady(t,(function(e){n(t)&&(l++,r(e)),c()}),c)}))}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var a=!1,o=!1;return r.forEach((function(e,t){e.val===n&&(a=t,o=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==a||o?!1===a||o||(r[a].handled=!0):r.push({val:n,handled:!0}),!0):(!1===a&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var a=this;e.forEach((function(e){e.handled||a.getIframeContents(e.val,(function(e){a.createInstanceOnIframe(e).forEachNode(t,n,r)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,r,a){for(var o=this,i=this.createIterator(t,e,r),s=[],l=[],c=void 0,u=void 0,d=function(){var e=o.getIteratorNode(i);return u=e.prevNode,c=e.node};d();)this.iframes&&this.forEachIframe(t,(function(e){return o.checkIframeFilter(c,u,e,s)}),(function(t){o.createInstanceOnIframe(t).forEachNode(e,(function(e){return l.push(e)}),r)})),l.push(c);l.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(s,e,n,r),a()}},{key:"forEachNode",value:function(e,t,n){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),i=o.length;i||a(),o.forEach((function(o){var s=function(){r.iterateThroughNodes(e,o,t,n,(function(){--i<=0&&a()}))};r.iframes?r.waitForIframes(o,s):s()}))}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var a=!1;return n.every((function(t){return!r.call(e,t)||(a=!0,!1)})),a}return!1}}]),e}(),o=function(){function o(e){t(this,o),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(o,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var a in t)if(t.hasOwnProperty(a)){var o=t[a],i="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(a):this.escapeStr(a),s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==i&&""!==s&&(e=e.replace(new RegExp("("+this.escapeStr(i)+"|"+this.escapeStr(s)+")","gm"+n),r+"("+this.processSynomyms(i)+"|"+this.processSynomyms(s)+")"+r))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,(function(e){return"\\"===e.charAt(0)?"?":"\x01"}))).replace(/(?:\\)*\*/g,(function(e){return"\\"===e.charAt(0)?"*":"\x02"}))}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,(function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"}))}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105","A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010d","C\xc7\u0106\u010c","d\u0111\u010f","D\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119","E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012b","I\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142","L\u0141","n\xf1\u0148\u0144","N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014d","O\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159","R\u0158","s\u0161\u015b\u0219\u015f","S\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163","T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016b","U\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xff","Y\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017a","Z\u017d\u017b\u0179"]:["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010dC\xc7\u0106\u010c","d\u0111\u010fD\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012bI\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142L\u0141","n\xf1\u0148\u0144N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014dO\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159R\u0158","s\u0161\u015b\u0219\u015fS\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016bU\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xffY\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017aZ\u017d\u017b\u0179"],r=[];return e.split("").forEach((function(a){n.every((function(n){if(-1!==n.indexOf(a)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0}))})),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\xa1\xbf",r=this.opt.accuracy,a="string"==typeof r?r:r.value,o="string"==typeof r?[]:r.limiters,i="";switch(o.forEach((function(e){i+="|"+t.escapeStr(e)})),a){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(i="\\s"+(i||this.escapeStr(n)))+"]*"+e+"[^"+i+"]*)";case"exactly":return"(^|\\s"+i+")("+e+")(?=$|\\s"+i+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach((function(e){t.opt.separateWordSearch?e.split(" ").forEach((function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)})):e.trim()&&-1===n.indexOf(e)&&n.push(e)})),{keywords:n.sort((function(e,t){return t.length-e.length})),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var a=t.callNoMatchOnInvalidRanges(e,r),o=a.start,i=a.end;a.valid&&(e.start=o,e.length=i-o,n.push(e),r=i)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,a=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?a=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:a}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,a=!0,o=n.length,i=t-o,s=parseInt(e.start,10)-i;return(r=(s=s>o?o:s)+parseInt(e.length,10))>o&&(r=o,this.log("End range automatically set to the max value of "+o)),s<0||r-s<0||s>o||r>o?(a=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(s,r).replace(/\s+/g,"")&&(a=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:s,end:r,valid:a}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})}),(function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){e({value:n,nodes:r})}))}},{key:"matchesExclude",value:function(e){return a.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",a=e.splitText(t),o=a.splitText(n-t),i=document.createElement(r);return i.setAttribute("data-markjs","true"),this.opt.className&&i.setAttribute("class",this.opt.className),i.textContent=a.textContent,a.parentNode.replaceChild(i,a),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,a){var o=this;e.nodes.every((function(i,s){var l=e.nodes[s+1];if(void 0===l||l.start>t){if(!r(i.node))return!1;var c=t-i.start,u=(n>i.end?i.end:n)-i.start,d=e.value.substr(0,i.start),f=e.value.substr(u+i.start);if(i.node=o.wrapRangeInTextNode(i.node,c,u),e.value=d+f,e.nodes.forEach((function(t,n){n>=s&&(e.nodes[n].start>0&&n!==s&&(e.nodes[n].start-=u),e.nodes[n].end-=u)})),n-=u,a(i.node.previousSibling,i.start),!(n>i.end))return!1;t=i.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,r,a){var o=this,i=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var a=void 0;null!==(a=e.exec(t.textContent))&&""!==a[i];)if(n(a[i],t)){var s=a.index;if(0!==i)for(var l=1;l{"use strict";n.r(t)},1043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}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=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),c=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,i(e,u,d)),1===e?(l(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){l(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),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)*a(Math.random()*t,.1,.95)),t=a(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");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),s=e?"-100":o(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),c!=document.body&&u(c,"nprogress-custom-parent"),c.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 s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=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,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function c(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=f(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);c(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===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},5302:(e,t,n)=>{var r=n(4634);e.exports=h,e.exports.parse=o,e.exports.compile=function(e,t){return l(o(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=p;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,s=0,l="",c=t&&t.delimiter||"/";null!=(n=a.exec(e));){var d=n[0],f=n[1],p=n.index;if(l+=e.slice(s,p),s=p+d.length,f)l+=f[1];else{var h=e[s],m=n[2],g=n[3],y=n[4],b=n[5],v=n[6],w=n[7];l&&(r.push(l),l="");var x=null!=m&&null!=h&&h!==m,k="+"===v||"*"===v,_="?"===v||"*"===v,S=m||c,E=y||b,C=m||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:g||o++,prefix:m||"",delimiter:S,optional:_,repeat:k,partial:x,asterisk:!!w,pattern:E?u(E):w?".*":i(S,C)})}}return s-1?"[^"+c(e)+"]+?":c(t)+"|(?:(?!"+c(t)+")[^"+c(e)+"])+?"}function s(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),a=0;a{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"}}})},8722:(e,t,n)=>{const r=n(6969),a=n(8380),o=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...o,...Object.keys(Prism.languages)];a(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(3157).resolve(t)],delete Prism.languages[e],n(3157)(t),o.add(e)}))}i.silent=!1,e.exports=i},9700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,s=i.length;-1!==n.code.indexOf(a=t(r,s));)++s;return i[s]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(s){for(var l=0;l=o.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=o[a],d=n.tokenStack[u],f="string"==typeof c?c:c.content,p=t(r,u),h=f.indexOf(p);if(h>-1){++a;var m=f.substring(0,h),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=f.substring(h+p.length),b=[];m&&b.push.apply(b,i([m])),b.push(g),y&&b.push.apply(b,i([y])),"string"==typeof c?s.splice.apply(s,[l,1].concat(b)):c.content=b}}else c.content&&i(c.content)}return s}(n.tokens)}}}})}(Prism)},8692:(e,t,n)=>{var r={"./":8722};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=8692},3157:(e,t,n)=>{var r={"./":8722};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=3157},8380: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 s={},l=e[r];if(l){function c(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in s))for(var i in a(t,o),s[t]=!0,n[t])s[i]=!0}t(l.require,c),t(l.optional,c),t(l.modify,c)}n[r]=s,o.pop()}}return function(e){var t=n[e];return t||(a(e,r),t=n[e]),t}}function a(e){for(var t in e)return!0;return!1}return function(o,i,s){var l=function(e){var t={};for(var n in e){var r=e[n];for(var a in r)if("meta"!=a){var o=r[a];t[a]="string"==typeof o?{title:o}:o}}return t}(o),c=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var a in n={},e){var o=e[a];t(o&&o.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+a+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+a+" because it is a component.");n[t]=a}))}return n[r]||r}}(l);i=i.map(c),s=(s||[]).map(c);var u=n(i),d=n(s);i.forEach((function e(n){var r=l[n];t(r&&r.require,(function(t){t in d||(u[t]=!0,e(t))}))}));for(var f,p=r(l),h=u;a(h);){for(var m in f={},h){var g=l[m];t(g&&g.modify,(function(e){e in d&&(f[e]=!0)}))}for(var y in d)if(!(y in u))for(var b in p(y))if(b in u){f[y]=!0;break}for(var v in h=f)u[v]=!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,a){var o=a?a.series:void 0,i=a?a.parallel:e,s={},l={};function c(e){if(e in s)return s[e];l[e]=!0;var a,u=[];for(var d in t(e))d in n&&u.push(d);if(0===u.length)a=r(e);else{var f=i(u.map((function(e){var t=c(e);return delete l[e],t})));o?a=o(f,(function(){return r(e)})):r(e)}return s[e]=a}for(var u in n)c(u);var d=[];for(var f in l)d.push(s[f]);return i(d)}(p,u,t,n)}};return w}}();e.exports=t},2694:(e,t,n)=>{"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=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 s.name="Invariant Violation",s}}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:o,resetWarningCache:a};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),a=n(9982);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n