@powersync/web 1.34.0 → 1.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/_journeyapps_wa-sqlite-_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapp-89f0ba.index.umd.js +79 -76
  2. package/dist/_journeyapps_wa-sqlite-_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapp-89f0ba.index.umd.js.map +1 -1
  3. package/dist/{_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-2530150.index.umd.js → _journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-97ebe9.index.umd.js} +77 -77
  4. package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-97ebe9.index.umd.js.map +1 -0
  5. package/dist/index.umd.js +135 -118
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/worker/SharedSyncImplementation.umd.js +18317 -18177
  8. package/dist/worker/SharedSyncImplementation.umd.js.map +1 -1
  9. package/dist/worker/WASQLiteDB.umd.js +17032 -16895
  10. package/dist/worker/WASQLiteDB.umd.js.map +1 -1
  11. package/dist/worker/node_modules_pnpm_bson_6_10_4_node_modules_bson_lib_bson_mjs.umd.js.map +1 -1
  12. package/dist/worker/node_modules_pnpm_journeyapps_wa-sqlite_1_5_0_node_modules_journeyapps_wa-sqlite_dist_mc-wa-s-b9c070.umd.js +10 -10
  13. package/dist/worker/node_modules_pnpm_journeyapps_wa-sqlite_1_5_0_node_modules_journeyapps_wa-sqlite_dist_mc-wa-s-b9c070.umd.js.map +1 -1
  14. package/dist/worker/node_modules_pnpm_journeyapps_wa-sqlite_1_5_0_node_modules_journeyapps_wa-sqlite_dist_mc-wa-s-c99c07.umd.js +10 -10
  15. package/dist/worker/node_modules_pnpm_journeyapps_wa-sqlite_1_5_0_node_modules_journeyapps_wa-sqlite_dist_mc-wa-s-c99c07.umd.js.map +1 -1
  16. package/dist/worker/node_modules_pnpm_journeyapps_wa-sqlite_1_5_0_node_modules_journeyapps_wa-sqlite_dist_wa-sqli-cc5fcc.umd.js +10 -10
  17. package/dist/worker/node_modules_pnpm_journeyapps_wa-sqlite_1_5_0_node_modules_journeyapps_wa-sqlite_dist_wa-sqli-cc5fcc.umd.js.map +1 -1
  18. package/dist/worker/node_modules_pnpm_journeyapps_wa-sqlite_1_5_0_node_modules_journeyapps_wa-sqlite_dist_wa-sqlite_mjs.umd.js +10 -10
  19. package/dist/worker/node_modules_pnpm_journeyapps_wa-sqlite_1_5_0_node_modules_journeyapps_wa-sqlite_dist_wa-sqlite_mjs.umd.js.map +1 -1
  20. package/dist/worker/node_modules_pnpm_journeyapps_wa-sqlite_1_5_0_node_modules_journeyapps_wa-sqlite_src_examples-0df390.umd.js.map +1 -1
  21. package/dist/worker/node_modules_pnpm_journeyapps_wa-sqlite_1_5_0_node_modules_journeyapps_wa-sqlite_src_examples-151024.umd.js.map +1 -1
  22. package/dist/worker/node_modules_pnpm_journeyapps_wa-sqlite_1_5_0_node_modules_journeyapps_wa-sqlite_src_examples-c01ef0.umd.js.map +1 -1
  23. package/lib/package.json +2 -2
  24. package/lib/src/db/adapters/LockedAsyncDatabaseAdapter.js +9 -6
  25. package/lib/src/index.d.ts +1 -0
  26. package/lib/src/index.js +1 -0
  27. package/lib/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +3 -3
  29. package/src/db/adapters/LockedAsyncDatabaseAdapter.ts +14 -15
  30. package/src/index.ts +1 -0
  31. package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-2530150.index.umd.js.map +0 -1
  32. package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-2530151.index.umd.js +0 -555
  33. package/dist/_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-2530151.index.umd.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powersync/web",
3
- "version": "1.34.0",
3
+ "version": "1.36.0",
4
4
  "description": "PowerSync Web SDK",
5
5
  "main": "lib/src/index.js",
6
6
  "module": "lib/src/index.js",
@@ -56,14 +56,14 @@
56
56
  "license": "Apache-2.0",
57
57
  "peerDependencies": {
58
58
  "@journeyapps/wa-sqlite": "^1.5.0",
59
- "@powersync/common": "^1.47.0"
59
+ "@powersync/common": "^1.49.0"
60
60
  },
61
61
  "dependencies": {
62
62
  "async-mutex": "^0.5.0",
63
63
  "bson": "^6.10.4",
64
64
  "comlink": "^4.4.2",
65
65
  "commander": "^12.1.0",
66
- "@powersync/common": "1.47.0"
66
+ "@powersync/common": "1.49.0"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@journeyapps/wa-sqlite": "^1.5.0",
@@ -7,6 +7,7 @@ import {
7
7
  DBLockOptions,
8
8
  LockContext,
9
9
  QueryResult,
10
+ SqlExecutor,
10
11
  Transaction,
11
12
  createLogger,
12
13
  type ILogger
@@ -90,7 +91,8 @@ export class LockedAsyncDatabaseAdapter
90
91
 
91
92
  this.dbGetHelpers = this.generateDBHelpers({
92
93
  execute: (query, params) => this.acquireLock(() => this._execute(query, params)),
93
- executeRaw: (query, params) => this.acquireLock(() => this._executeRaw(query, params))
94
+ executeRaw: (query, params) => this.acquireLock(() => this._executeRaw(query, params)),
95
+ executeBatch: (query, params) => this.acquireLock(() => this._executeBatch(query, params))
94
96
  });
95
97
  this.initPromise = this._init();
96
98
  }
@@ -269,19 +271,21 @@ export class LockedAsyncDatabaseAdapter
269
271
  }
270
272
 
271
273
  async readLock<T>(fn: (tx: LockContext) => Promise<T>, options?: DBLockOptions | undefined): Promise<T> {
272
- await this.waitForInitialized();
273
- return this.acquireLock(
274
- async () => fn(this.generateDBHelpers({ execute: this._execute, executeRaw: this._executeRaw })),
275
- {
276
- timeoutMs: options?.timeoutMs ?? this.options.defaultLockTimeoutMs
277
- }
278
- );
274
+ // Read and write locks are the same because we only have one underlying connection.
275
+ return this.writeLock(fn, options);
279
276
  }
280
277
 
281
278
  async writeLock<T>(fn: (tx: LockContext) => Promise<T>, options?: DBLockOptions | undefined): Promise<T> {
282
279
  await this.waitForInitialized();
283
280
  return this.acquireLock(
284
- async () => fn(this.generateDBHelpers({ execute: this._execute, executeRaw: this._executeRaw })),
281
+ async () =>
282
+ fn(
283
+ this.generateDBHelpers({
284
+ execute: this._execute,
285
+ executeRaw: this._executeRaw,
286
+ executeBatch: this._executeBatch
287
+ })
288
+ ),
285
289
  {
286
290
  timeoutMs: options?.timeoutMs ?? this.options.defaultLockTimeoutMs
287
291
  }
@@ -370,12 +374,7 @@ export class LockedAsyncDatabaseAdapter
370
374
  return this.writeLock(this.wrapTransaction(fn, true));
371
375
  }
372
376
 
373
- private generateDBHelpers<
374
- T extends {
375
- execute: (sql: string, params?: any[]) => Promise<QueryResult>;
376
- executeRaw: (sql: string, params?: any[]) => Promise<any[][]>;
377
- }
378
- >(tx: T): T & DBGetUtils {
377
+ private generateDBHelpers<T extends SqlExecutor>(tx: T): T & LockContext {
379
378
  return {
380
379
  ...tx,
381
380
  /**
package/src/index.ts CHANGED
@@ -12,3 +12,4 @@ export * from './db/PowerSyncDatabase.js';
12
12
  export * from './db/sync/SharedWebStreamingSyncImplementation.js';
13
13
  export * from './db/sync/WebRemote.js';
14
14
  export * from './db/sync/WebStreamingSyncImplementation.js';
15
+ export * from './db/adapters/WebDBAdapter.js';
@@ -1 +0,0 @@
1
- {"version":3,"file":"_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-2530150.index.umd.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACXA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACRA;AACA;AACA;AACA;AACA;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;;;;;AELA;AACA","sources":["webpack://sdk_web/webpack/universalModuleDefinition","webpack://sdk_web/./lib/src/worker/db/SharedWASQLiteConnection.js","webpack://sdk_web/./lib/src/worker/db/WASQLiteDB.worker.js","webpack://sdk_web/./lib/src/worker/db/WorkerWASQLiteConnection.js","webpack://sdk_web/external umd \"@journeyapps/wa-sqlite\"","webpack://sdk_web/external umd \"@journeyapps/wa-sqlite/src/examples/AccessHandlePoolVFS.js\"","webpack://sdk_web/external umd \"@journeyapps/wa-sqlite/src/examples/IDBBatchAtomicVFS.js\"","webpack://sdk_web/external umd \"@journeyapps/wa-sqlite/src/examples/OPFSCoopSyncVFS.js\"","webpack://sdk_web/external umd \"@powersync/common\"","webpack://sdk_web/external umd \"async-mutex\"","webpack://sdk_web/external umd \"comlink\"","webpack://sdk_web/webpack/bootstrap","webpack://sdk_web/webpack/runtime/chunk loaded","webpack://sdk_web/webpack/runtime/create fake namespace object","webpack://sdk_web/webpack/runtime/define property getters","webpack://sdk_web/webpack/runtime/ensure chunk","webpack://sdk_web/webpack/runtime/get javascript chunk filename","webpack://sdk_web/webpack/runtime/global","webpack://sdk_web/webpack/runtime/hasOwnProperty shorthand","webpack://sdk_web/webpack/runtime/make namespace object","webpack://sdk_web/webpack/runtime/publicPath","webpack://sdk_web/webpack/runtime/importScripts chunk loading","webpack://sdk_web/webpack/runtime/startup chunk dependencies","webpack://sdk_web/webpack/before-startup","webpack://sdk_web/webpack/startup","webpack://sdk_web/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@journeyapps/wa-sqlite\"), require(\"@journeyapps/wa-sqlite/src/examples/AccessHandlePoolVFS.js\"), require(\"@journeyapps/wa-sqlite/src/examples/IDBBatchAtomicVFS.js\"), require(\"@journeyapps/wa-sqlite/src/examples/OPFSCoopSyncVFS.js\"), require(\"@powersync/common\"), require(\"async-mutex\"), require(\"comlink\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@journeyapps/wa-sqlite\", \"@journeyapps/wa-sqlite/src/examples/AccessHandlePoolVFS.js\", \"@journeyapps/wa-sqlite/src/examples/IDBBatchAtomicVFS.js\", \"@journeyapps/wa-sqlite/src/examples/OPFSCoopSyncVFS.js\", \"@powersync/common\", \"async-mutex\", \"comlink\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sdk_web\"] = factory(require(\"@journeyapps/wa-sqlite\"), require(\"@journeyapps/wa-sqlite/src/examples/AccessHandlePoolVFS.js\"), require(\"@journeyapps/wa-sqlite/src/examples/IDBBatchAtomicVFS.js\"), require(\"@journeyapps/wa-sqlite/src/examples/OPFSCoopSyncVFS.js\"), require(\"@powersync/common\"), require(\"async-mutex\"), require(\"comlink\"));\n\telse\n\t\troot[\"sdk_web\"] = factory(root[\"@journeyapps/wa-sqlite\"], root[\"@journeyapps/wa-sqlite/src/examples/AccessHandlePoolVFS.js\"], root[\"@journeyapps/wa-sqlite/src/examples/IDBBatchAtomicVFS.js\"], root[\"@journeyapps/wa-sqlite/src/examples/OPFSCoopSyncVFS.js\"], root[\"@powersync/common\"], root[\"async-mutex\"], root[\"comlink\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE__journeyapps_wa_sqlite__, __WEBPACK_EXTERNAL_MODULE__journeyapps_wa_sqlite_src_examples_AccessHandlePoolVFS_js__, __WEBPACK_EXTERNAL_MODULE__journeyapps_wa_sqlite_src_examples_IDBBatchAtomicVFS_js__, __WEBPACK_EXTERNAL_MODULE__journeyapps_wa_sqlite_src_examples_OPFSCoopSyncVFS_js__, __WEBPACK_EXTERNAL_MODULE__powersync_common__, __WEBPACK_EXTERNAL_MODULE_async_mutex__, __WEBPACK_EXTERNAL_MODULE_comlink__) => {\nreturn ","export class SharedWASQLiteConnection {\n options;\n isClosing;\n // Keeps track if this current hold if the shared connection has a hold\n activeHoldId;\n constructor(options) {\n this.options = options;\n // Add this client ID to the set of known clients\n this.clientIds.add(options.clientId);\n this.isClosing = false;\n this.activeHoldId = null;\n }\n get logger() {\n return this.options.logger;\n }\n get dbEntry() {\n return this.options.dbMap.get(this.options.dbFilename);\n }\n get connection() {\n return this.dbEntry.db;\n }\n get clientIds() {\n return this.dbEntry.clientIds;\n }\n async init() {\n // No-op since the connection is already initialized when it was created\n }\n async markHold() {\n this.activeHoldId = await this.connection.markHold();\n return this.activeHoldId;\n }\n async releaseHold(id) {\n try {\n await this.connection.releaseHold(id);\n }\n finally {\n this.activeHoldId = null;\n }\n }\n async isAutoCommit() {\n return this.connection.isAutoCommit();\n }\n /**\n * Handles closing of a shared connection.\n * The connection is only closed if there are no active clients using it.\n */\n async close() {\n // This prevents further statements on this connection from being executed\n this.isClosing = true;\n const { clientIds, logger } = this;\n const { clientId, dbFilename, dbMap } = this.options;\n logger.debug(`Close requested from client ${clientId} of ${[...clientIds]}`);\n clientIds.delete(clientId);\n if (this.activeHoldId) {\n // We can't cleanup here since we're not in a lock context.\n // The cleanup will occur once a new hold is acquired.\n this.logger.info(`Hold ${this.activeHoldId} was still active when the connection was closed. Cleanup will occur once a new hold is acquired.`);\n }\n if (clientIds.size == 0) {\n logger.debug(`Closing connection to ${this.options}.`);\n const connection = this.connection;\n dbMap.delete(dbFilename);\n await connection.close();\n return;\n }\n logger.debug(`Connection to ${dbFilename} not closed yet due to active clients.`);\n return;\n }\n async withClosing(action) {\n if (this.isClosing) {\n throw new Error('Connection is closing');\n }\n return action();\n }\n async execute(sql, params) {\n return this.withClosing(() => this.connection.execute(sql, params));\n }\n async executeRaw(sql, params) {\n return this.withClosing(() => this.connection.executeRaw(sql, params));\n }\n executeBatch(sql, params) {\n return this.withClosing(() => this.connection.executeBatch(sql, params));\n }\n registerOnTableChange(callback) {\n return this.connection.registerOnTableChange(callback);\n }\n getConfig() {\n return this.connection.getConfig();\n }\n}\n","/**\n * Supports both shared and dedicated workers, based on how the worker is constructed (new SharedWorker vs new Worker()).\n */\nimport '@journeyapps/wa-sqlite';\nimport { createBaseLogger, createLogger } from '@powersync/common';\nimport * as Comlink from 'comlink';\nimport { getNavigatorLocks } from '../../shared/navigator.js';\nimport { SharedWASQLiteConnection } from './SharedWASQLiteConnection.js';\nimport { WorkerWASQLiteConnection } from './WorkerWASQLiteConnection.js';\nconst baseLogger = createBaseLogger();\nbaseLogger.useDefaults();\nconst logger = createLogger('db-worker');\nconst DBMap = new Map();\nconst OPEN_DB_LOCK = 'open-wasqlite-db';\nlet nextClientId = 1;\nconst openDBShared = async (options) => {\n // Prevent multiple simultaneous opens from causing race conditions\n return getNavigatorLocks().request(OPEN_DB_LOCK, async () => {\n const clientId = nextClientId++;\n const { dbFilename, logLevel } = options;\n logger.setLevel(logLevel);\n if (!DBMap.has(dbFilename)) {\n const clientIds = new Set();\n // This format returns proxy objects for function callbacks\n const connection = new WorkerWASQLiteConnection(options);\n await connection.init();\n connection.registerListener({\n holdOverwritten: async () => {\n /**\n * The previous hold has been overwritten, without being released.\n * we need to cleanup any resources associated with it.\n * We can perform a rollback to release any potential transactions that were started.\n */\n await connection.execute('ROLLBACK').catch(() => { });\n }\n });\n DBMap.set(dbFilename, {\n clientIds,\n db: connection\n });\n }\n // Associates this clientId with the shared connection entry\n const sharedConnection = new SharedWASQLiteConnection({\n dbMap: DBMap,\n dbFilename,\n clientId,\n logger\n });\n return Comlink.proxy(sharedConnection);\n });\n};\n// Check if we're in a SharedWorker context\nif (typeof SharedWorkerGlobalScope !== 'undefined') {\n const _self = self;\n _self.onconnect = function (event) {\n const port = event.ports[0];\n Comlink.expose(openDBShared, port);\n };\n}\nelse {\n // A dedicated worker can be shared externally\n Comlink.expose(openDBShared);\n}\naddEventListener('unload', () => {\n Array.from(DBMap.values()).forEach(async (dbConnection) => {\n const { db } = dbConnection;\n db.close?.();\n });\n});\n","import * as Comlink from 'comlink';\nimport { WASqliteConnection } from '../../db/adapters/wa-sqlite/WASQLiteConnection.js';\n/**\n * A Small proxy wrapper around the WASqliteConnection.\n * This ensures that certain return types are properly proxied.\n */\nexport class WorkerWASQLiteConnection extends WASqliteConnection {\n async registerOnTableChange(callback) {\n // Proxy the callback remove function\n return Comlink.proxy(await super.registerOnTableChange(callback));\n }\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__journeyapps_wa_sqlite__;","module.exports = __WEBPACK_EXTERNAL_MODULE__journeyapps_wa_sqlite_src_examples_AccessHandlePoolVFS_js__;","module.exports = __WEBPACK_EXTERNAL_MODULE__journeyapps_wa_sqlite_src_examples_IDBBatchAtomicVFS_js__;","module.exports = __WEBPACK_EXTERNAL_MODULE__journeyapps_wa_sqlite_src_examples_OPFSCoopSyncVFS_js__;","module.exports = __WEBPACK_EXTERNAL_MODULE__powersync_common__;","module.exports = __WEBPACK_EXTERNAL_MODULE_async_mutex__;","module.exports = __WEBPACK_EXTERNAL_MODULE_comlink__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Check if module exists (development only)\n\tif (__webpack_modules__[moduleId] === undefined) {\n\t\tvar e = new Error(\"Cannot find module '\" + moduleId + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tvar __webpack_exports__ = __webpack_require__.O(undefined, [\"main\"], () => (__webpack_require__(\"./lib/src/worker/db/WASQLiteDB.worker.js\")))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and chunks that the entrypoint depends on\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = self.location + \"\";\n\n// object to store loaded chunks\n// \"1\" means \"already loaded\"\nvar installedChunks = {\n\t\"_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js-_journeyapps_wa-sqlite_src_example-2530150\": 1\n};\n\n// importScripts chunk loading\nvar installChunk = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\twhile(chunkIds.length)\n\t\tinstalledChunks[chunkIds.pop()] = 1;\n\tparentChunkLoadingFunction(data);\n};\n__webpack_require__.f.i = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\timportScripts(__webpack_require__.p + __webpack_require__.u(chunkId));\n\t\t}\n\t}\n};\n\nvar chunkLoadingGlobal = self[\"webpackChunksdk_web\"] = self[\"webpackChunksdk_web\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = installChunk;\n\n// no HMR\n\n// no HMR manifest","var next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\treturn Promise.all([\n\n\t]).then(next);\n};","","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n",""],"names":[],"ignoreList":[],"sourceRoot":""}